public override void HandleMsg(CmdMsgType msgType) { if (this.State == CommandState.Failed) { return; } switch (msgType) { case CmdMsgType.Pause: if (this.State == CommandState.Running) { this.State = CommandState.Pause; } break; case CmdMsgType.Resume: if (this.State == CommandState.Pause) { this.State = CommandState.Running; } break; case CmdMsgType.Stop: this.State = CommandState.Failed; break; } }
public override void HandleMsg(CmdMsgType msgType) { if (this.State == CommandState.Failed) { return; } switch (msgType) { case CmdMsgType.Pause: if (this.State == CommandState.Running) { this.State = CommandState.Pause; this.MoveSmoothStop(); } break; case CmdMsgType.Resume: if (this.State == CommandState.Pause) { this.Call(); } break; case CmdMsgType.Stop: this.State = CommandState.Failed; this.MoveSmoothStop(); break; default: break; } }
public override void HandleMsg(CmdMsgType msgType) { if (this.State == CommandState.Failed) { return; } switch (msgType) { case CmdMsgType.Pause: if (this.State == CommandState.Running) { this.card.Executor.StopCrd(this.card.CardId, this.TrcPrm.CsId); this.State = CommandState.Pause; } break; case CmdMsgType.Resume: if (this.State == CommandState.Pause) { this.card.Executor.StartCrd(this.card.CardId, this.TrcPrm.CsId); this.State = CommandState.Running; } break; case CmdMsgType.Stop: this.card.Executor.StopCrd(this.card.CardId, this.TrcPrm.CsId); this.card.Executor.ClrCrdBuf(this.card.CardId, this.TrcPrm.CsId); this.card.Executor.Cmp2dStop(card.CardId, this.Cmp2dPrm.Chn); this.State = CommandState.Failed; break; } }
public void HandleMsg(CmdMsgType msgType) { if (this.State == CommandState.Failed) { return; } switch (msgType) { case CmdMsgType.Pause: if (this.State == CommandState.Running) { this.Timeout = this.Timeout - (DateTime.Now - this.dateTimeStart); this.State = CommandState.Pause; } break; case CmdMsgType.Resume: if (this.State == CommandState.Pause) { this.Call(); } break; case CmdMsgType.Stop: this.State = CommandState.Failed; break; } }
public void NotifyAll(CmdMsgType msg) { Telegram telegram = new Telegram() { Msg = msg, IsNotifyAll = true }; this.msgQueue.Enqueue(telegram); }
public void Notify(CmdMsgType msg, List <IActive> observers) { Telegram telegram = new Telegram() { Msg = msg, IsNotifyAll = false, Observers = observers }; this.msgQueue.Enqueue(telegram); }
public void HandleMsg(CmdMsgType msgType) { if (this.currentCommand != null) { //this.State = ActiveItemState.Busy; this.currentCommand.HandleMsg(msgType); } else { //this.State = ActiveItemState.Idel; } }
public override void HandleMsg(CmdMsgType msgType) { if (this.State == CommandState.Failed) { return; } switch (msgType) { case CmdMsgType.Stop: this.State = CommandState.Succeed; this.MoveSmoothStop(); break; default: break; } }
public void HandleMsg(CmdMsgType msgType) { if (this.State == CommandState.Failed) { return; } switch (msgType) { case CmdMsgType.Pause: break; case CmdMsgType.Resume: break; case CmdMsgType.Stop: break; case CmdMsgType.Flag: this.flag = true; break; } }
public abstract void HandleMsg(CmdMsgType msgType);
public void HandleMsg(CmdMsgType msgType) { }
public override void HandleMsg(CmdMsgType msgType) { }