天津投入产出系统后端
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.
 
 
 
 
 
 

66 lines
1.5 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using QMAPP.FJC.Entity.Basic;
namespace OpcHost
{
/// <summary>
/// 工控机与opc服务实现双通道的操作接口
/// 作者:闫永刚
/// 日期:2015-05-29
/// </summary>
[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IChatCallback))]
public interface IPLCService
{
/// <summary>
/// 注册双通道
/// </summary>
/// <returns></returns>
[OperationContract(IsInitiating = true, IsTerminating = false)]
int Register();
//[OperationContract(IsOneWay = true, IsInitiating = false, IsTerminating = false)]
//void CheckConnect(string msg);
/// <summary>
/// 注销双通道
/// </summary>
/// <returns></returns>
[OperationContract(IsInitiating = false, IsTerminating = true)]
int Logout();
/// <summary>
///向设备发送可以进行操作的指令
/// </summary>
void SendOperateOrder(ParameterConfig config);
}
/// <summary>
/// 双向通信的回调接口
/// </summary>
public interface IChatCallback
{
[OperationContract(IsOneWay = true)]
void ReturnProductCode(string name);
}
public class ChatEventArgs : EventArgs
{
//public MessageType msgType;
public string name;
public string message;
}
}