示例#1
0
 /// <summary>
 /// The resolve thread.
 /// </summary>
 public void StartService()
 {
     try
     {
         SqlDal.UpdateAllDtuStatus();
         this._modbusWrapper = ModBusWrapper.CreateInstance(Protocol.TCPIP);
         this._modbusWrapper.OnDataReceived             += this.Wrapper_ReceiveData;
         this._modbusWrapper.OnConnectionChangedHandler += OnConnectionChangedEvevt;
         this._modbusWrapper.StartService();
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message);
     }
 }
示例#2
0
 public rfid_scence()
 {
     InitializeComponent();
     this.Wrapper        = ModBusWrapper.CreateInstance(Protocol.TCPIP);
     this.Wrapper.Logger = this;
 }