Beispiel #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;
 }
Beispiel #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));
         }
     }
 }
Beispiel #3
0
 public DriverClient(IDriverClient client)
 {
     Client = client;
 }