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