Exemplo n.º 1
0
 public void PushTxCommand(SureCmd cmd, byte[] payload)
 {
     if (payload.Length > 255)
     {
         Console.WriteLine("WARNING: Payload is too large for command!");
         return;
     }
     byte[] command = new byte[3 + payload.Length];
     command[0] = 0x7E;
     command[1] = (byte)cmd;
     command[2] = (byte)payload.Length;
     for (int bIndex = 0; bIndex < payload.Length; bIndex++)
     {
         command[3 + bIndex] = payload[bIndex];
     }
     PushTxBytes(command);
     PushHistoryItem(false, command);
 }
Exemplo n.º 2
0
 public void PushTxCommandNoBytes(SureCmd cmd)
 {
     byte[] command = { 0x7E, (byte)cmd, 0x00 };
     PushTxBytes(command);
     PushHistoryItem(false, command);
 }