Detailed Description

The default policy of the CommandProcessor is to dequeue one command in each step() and execute it. If you want to change this policy, subclass the CommandProcessor and override the virtual functions, such as step() or process(). The current command queue is non blocking for push and pop operations. process() fails when the queue is full; step() does nothing when the queue is empty. A subclass may install a new command queue with for example blocking semantics.

This method is called by the framework to break out of the loop() method.

Reimplement this method to signal loop() to return and return true on success. When this method is not reimplemented by you, it will always return false, denoting that the loop can not be broken. If breakLoop() returns true, the caller will wait until loop() returns.

The command is executed in step() or loop() directly after all other queued CommandInterface objects. The constructor parameter queue_size limits how many commands can be queued in between step()s or loop().

The command number. You can check if the given command was processed by calling CommandProcessor::isProcessed( command id ). The command number is reset to one each time the CommandProcessor is (re-)started.