This class parses commands. More...
Public Member Functions
|CommandParser (TaskContext *context, CommonParser &cp, bool as_action)|
|Create a CommandParser operating in a taskcontext. |
|rule_t &||parser ()|
|ConditionInterface *||wrapCondition (ConditionInterface *)|
|Each condition, which relates to this command, might be subject to wrapping. |
|ConditionInterface *||dispatchCondition ()|
|Return a condition evaluating to true if the command is dispatched and accepted. |
|CommandInterface *||getCommand ()|
|Get the parsed command. |
|ConditionInterface *||getImplTermCondition ()|
|The implicit termination condition associated with the command, if any. |
|resets the CommandParser, use this after you've succesfully used the created command and implicit termination condition. |
This class parses commands.
Actually, it only parses call commands, and the keyword 'nothing'. Value Set Commands are parsed by the ValueChangeParser. It also takes care of checking whether a command needs to be dispatched, and otherwise wraps the generated command in an AsynchCommandDecorator.
Return a condition evaluating to true if the command is dispatched and accepted.
Return zero if not applicable. This method is needed, because the CommandParser can only save state for one command. If multiple commands are involved, this condition must be kept by the parent of this parser and used if necessary.