Exemplo n.º 1
0
 public Driver(int id, IDriverClient connection, int positionId, bool isFree, Order order)
 {
     this.id         = id;
     this.connection = connection;
     this.positionId = positionId;
     this.isFree     = isFree;
     this.order      = order;
 }
Exemplo n.º 2
0
 T WaitResponse <T>(IDriverClient client, Func <IList <byte>, T> extractFunc, int addr = 0)
 {
     while (true)
     {
         var parcel = client.Read(TbProtocol.StartByte, TbProtocol.EndByte, TbProtocol.MaxParcelSize);
         var result = TbProtocol.FindParcel(parcel, addr == 0 ? _address : addr);
         if (result != null)
         {
             return(extractFunc(parcel));
         }
     }
 }
Exemplo n.º 3
0
 public DriverClient(IDriverClient client)
 {
     Client = client;
 }