Пример #1
0
 /// <summary>
 /// result = true when Mini has 1 client and clientstatus 'ConnectionWithClient' = false
 /// Check with max. 1 client, due to the missing client info in payload (duo)
 /// </summary>
 /// <returns></returns>
 private bool ClientNotConnected()
 {
     if (_context.Mini.QboxStatus.ClientStatuses.Count() == 1)
     {
         var state = new ClientMiniStatus(_context.Mini.QboxStatus.ClientStatuses.First().Value, _context.Mini.QboxStatus.FirmwareVersion);
         return(!state.ConnectionWithClient);
     }
     return(false);
 }
Пример #2
0
 public ClientStatusPayload(DateTime measurementTime, byte client, byte b, int protocolNr)
 {
     MeasurementTime = measurementTime;
     State           = new ClientMiniStatus(b, protocolNr);
     Data            = new BitArray(new byte[1] {
         b
     });
     RawValue = b;
     Client   = client;
 }
Пример #3
0
 /// <summary>
 /// Auto commands allowed for given client based on ClientState
 /// </summary>
 private bool ClientAutoCommandsAllowed(ClientMiniStatus inClient)
 {
     return((inClient == null) || ((inClient.State != ClientState.Unknown) && (inClient.State != ClientState.UpgradeInProgress)));
 }