Пример #1
0
 public void SendToArmlet(byte armlet_id, byte[] payload)
 {
     var sendCommand = new ServerToArmletCommand(ServerToArmletCommands.SendDataToArmlet,
                                                  new byte[] {armlet_id}.Concat(payload).ToArray());
     _daemon.inputMessageQueue.Enqueue(sendCommand);
 }
Пример #2
0
 private void SendHourUpdate(object state)
 {
     for (byte i = 1; i <= 120; i++)
     {
         var hourCommand = new ServerToArmletCommand(ServerToArmletCommands.SendDataToArmlet,
                                                     new byte[]
                                                         {
                                                             i, 9, 0, 0, Convert.ToByte(DateTime.Now.Hour),
                                                             Convert.ToByte(DateTime.Now.Minute)
                                                         });
         inputMessageQueue.Enqueue(hourCommand);
     }
 }