예제 #1
0
        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;
            }
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
        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;
            }
        }
예제 #4
0
        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;
            }
        }
예제 #5
0
        public void NotifyAll(CmdMsgType msg)
        {
            Telegram telegram = new Telegram()
            {
                Msg         = msg,
                IsNotifyAll = true
            };

            this.msgQueue.Enqueue(telegram);
        }
예제 #6
0
        public void Notify(CmdMsgType msg, List <IActive> observers)
        {
            Telegram telegram = new Telegram()
            {
                Msg         = msg,
                IsNotifyAll = false,
                Observers   = observers
            };

            this.msgQueue.Enqueue(telegram);
        }
예제 #7
0
 public void HandleMsg(CmdMsgType msgType)
 {
     if (this.currentCommand != null)
     {
         //this.State = ActiveItemState.Busy;
         this.currentCommand.HandleMsg(msgType);
     }
     else
     {
         //this.State = ActiveItemState.Idel;
     }
 }
예제 #8
0
        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;
            }
        }
예제 #9
0
        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;
            }
        }
예제 #10
0
 public abstract void HandleMsg(CmdMsgType msgType);
예제 #11
0
 public void HandleMsg(CmdMsgType msgType)
 {
 }
예제 #12
0
 public override void HandleMsg(CmdMsgType msgType)
 {
 }