예제 #1
0
 public Packet Request(byte cmd, string address, byte[] data)
 {
     if (IsOpened)
     {
         lock (_DataLocker)
         {
             _PacketReceived.Reset();
             _RecievedData.Clear();
             _Response = null;
         }
         byte[] p = CreateRequest(cmd, address, data);
         _Commport.SendData(p);
         _PacketReceived.WaitOne(2000);
         return(_Response);
     }
     return(null);
 }
예제 #2
0
 public void SendMessage(byte[] msg)
 {
     _Commport.SendData(msg);
 }