You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.2 KiB
49 lines
1.2 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.ServiceModel;
|
|
|
|
namespace OpcServerTest
|
|
{
|
|
[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IChatCallbackTest))]
|
|
public interface IPLCServiceTest
|
|
{
|
|
/// <summary>
|
|
/// 注册双通道
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[OperationContract(IsInitiating = true, IsTerminating = false)]
|
|
int Register(string machineNo);
|
|
|
|
|
|
/// <summary>
|
|
/// 注销双通道
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[OperationContract(IsInitiating = false, IsTerminating = true)]
|
|
int Logout(string machineNo);
|
|
|
|
/// <summary>
|
|
///向设备发送可以进行操作的指令
|
|
/// </summary>
|
|
[OperationContract]
|
|
void SendOperateOrder(string config);
|
|
|
|
|
|
}
|
|
|
|
public interface IChatCallbackTest
|
|
{
|
|
|
|
[OperationContract(IsOneWay = true)]
|
|
void ReturnProductCode(string name);
|
|
}
|
|
|
|
public class ChatEventArgsTest : EventArgs
|
|
{
|
|
//public MessageType msgType;
|
|
public string name;
|
|
public string message;
|
|
}
|
|
}
|
|
|