public void SendCommand(EtcCommand s) { Debug.Console(2, this, "Command: {0}", s._cmd); Communication.SendText(s._cmd); TestTx = s._cmd; TestTxFeedback.FireUpdate(); }
public void SendNextQueuedCommand() { if (!CommandQueue.IsEmpty) { cmdTimer.StartTimer(60); CommandQueueInProgress = true; if (CommandQueue.Peek() is EtcCommand) { EtcCommand nextCommand = (EtcCommand)CommandQueue.Dequeue(); SendCommand(nextCommand); } else { string nextCommand = (string)CommandQueue.Dequeue(); SendLine(nextCommand); } } else { CommandQueueInProgress = false; cmdTimer.StopTimer(); } }
public void SetScene() { EtcCommand cmd; Debug.Console(2, "Set Scene: {0}", sceneName); cmdType = "pst"; cmdAction = "act"; if (this.space != null) { if (this.fadeTime != null) { cmd = new EtcCommand(this.cmdType, this.cmdAction, this.sceneName, this.space, this.fadeTime, _etx); } else { cmd = new EtcCommand(this.cmdType, this.cmdAction, this.sceneName, this.space, _etx); } } else { cmd = new EtcCommand(this.cmdType, this.cmdAction, this.sceneName, _etx); } devPollTimer.StartTimer(1); _Parent.SendCommand(cmd); //_Parent.EnqueueCommand(cmd); }
public void pollScene() { EtcCommand cmd = new EtcCommand(string.Format("pst get {0}{1}", this.sceneName, _etx)); //_Parent.SendCommand(cmd); _Parent.EnqueueCommand(cmd); }
public void EnqueueCommand(EtcCommand CommandToQueue) { CommandQueue.Enqueue(CommandToQueue); if (!CommandQueueInProgress) { SendNextQueuedCommand(); } }
public void SetScene(string name) { Debug.Console(2, "Set Scene by Name: {0}", name); EtcCommand cmd = new EtcCommand(string.Format("pst act {0}{1}", name, _etx)); devPollTimer.StartTimer(1); _Parent.SendCommand(cmd); //_Parent.EnqueueCommand(cmd); }