예제 #1
0
        private States ProcessCommands()
        {
            if (loopStopRequested)
            {
                return(States.Stopping);
            }
            else if (CommandQueue.Available)
            {
                var command = CommandQueue.DequeueCommand();
                // TODO: add commands
            }

            return(States.ReadSequence);
        }
예제 #2
0
        private States ProcessCommands()
        {
            if (loopStopRequested)
            {
                return(States.Stopping);
            }
            else if (CommandQueue.Available)
            {
                var command = CommandQueue.DequeueCommand();
                switch ((Commands)command.CommandSignal)
                {
                case Commands.StartTask:
                    var taskStartRequest = (TaskStartRequest)command.Parameters[0];
                    this.task = new Task(this, taskStartRequest);
                    return(States.StartTask);
                }
            }

            return(States.Idle);
        }