private States ProcessCommands() { if (loopStopRequested) { return(States.Stopping); } else if (CommandQueue.Available) { var command = CommandQueue.DequeueCommand(); // TODO: add commands } return(States.ReadSequence); }
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); }