Ejemplo n.º 1
0
        public void SendCommand(byte[] command, Link link, string description = "")
        {
            if (command.Length > 1023)
            {
                throw new Exception("WT32 command length limit is 10 bytes. Can't send: " + description);
            }
            var cmd = new MuxCommand(command, link, description);

            queue.Enqueue(cmd);
        }
Ejemplo n.º 2
0
        public void SendCommand(string command, Link link = Link.Control)
        {
            /*if (isSleeping)
             * {
             *  isSleeping = false;
             *  SendCommand(" AT"); // wakes up after SLEEP
             * }*/
            if (link == Link.Control)
            {
                lastControlCommand = command;
            }
            object cmd;

            if (!IsMuxMode)
            {
                cmd = command;
            }
            else
            {
                cmd = new MuxCommand(command, link);
            }
            queue.Enqueue(cmd);
        }
Ejemplo n.º 3
0
 public void SendCommand(byte[] command, Link link, string description = "")
 {
     if (command.Length > 1023)
     {
         throw new Exception("WT32 command length limit is 10 bytes. Can't send: " + description);
     }
     var cmd = new MuxCommand(command, link, description);
     queue.Enqueue(cmd);
 }
Ejemplo n.º 4
0
 public void SendCommand(string command, Link link = Link.Control)
 {
     /*if (isSleeping)
     {
         isSleeping = false;
         SendCommand(" AT"); // wakes up after SLEEP
     }*/
     if (link == Link.Control)
     {
         lastControlCommand = command;
     }
     object cmd;
     if (!IsMuxMode)
     {
         cmd = command;
     }
     else
     {
         cmd = new MuxCommand(command, link);
     }
     queue.Enqueue(cmd);
 }