#include <rtt/StateMachineProcessor.hpp>

If you want to change this policy, subclass the StateMachineProcessor and override the virtual functions, such as step().
Definition at line 68 of file StateMachineProcessor.hpp.
Public Types | |
|
typedef StateMachine::Status | Status |
| The status of a StateMachine. | |
Public Member Functions | |
| StateMachineProcessor () | |
| Constructs a new StateMachineProcessor. | |
| virtual | ~StateMachineProcessor () |
| bool | loadStateMachine (StateMachinePtr sc) |
| Load a new State Machine and all its children. | |
| bool | unloadStateMachine (const std::string &name) |
| Unload a deactivated State Machine and all its children. | |
| bool | deleteStateMachine (const std::string &name) |
| Delete a deactivated State Machine and all its children. | |
| void | clear () |
| Stop and unload all programs from the StateMachineProcessor. | |
| Status::StateMachineStatus | getStateMachineStatus (const std::string &name) const |
| Return the status of a StateMachine. | |
| std::string | getStateMachineStatusStr (const std::string &name) const |
| Return the status of a StateMachine as a human readable string. | |
| virtual bool | initialize () |
| The method that will be called before the first periodical execution of step() ( or non periodical execution of loop() ), when the thread is started. | |
| virtual void | step () |
| The method that will be periodically executed when this class is run in a periodic thread. | |
| virtual void | finalize () |
| The method that will be called after the last periodical execution of step() ( or non periodical execution of loop() ), when the RunnableInterface is stopped. | |
|
std::vector < std::string > | getStateMachineList () const |
| Get a list of all loaded StateMachines and their children. | |
| const StateMachinePtr | getStateMachine (const std::string &name) const |
| Get a pointer to a loaded StateMachine. | |
| StateMachinePtr | getStateMachine (const std::string &name) |
| Get a pointer to a loaded StateMachine. | |
| virtual void | loop () |
| The method that will be executed once when this class is run in a non periodic thread. | |
| virtual bool | breakLoop () |
| This method is called by the framework to break out of the loop() method. | |
| ThreadInterface * | getThread () const |
| Get the thread this object is run in. | |
| virtual void | setThread (ThreadInterface *t) |
| Set the thread this object will be run in. | |
Protected Types | |
|
typedef ListLockFree < StateMachinePtr > | StateMap |
Protected Member Functions | |
| void | recursiveLoadStateMachine (StateMachinePtr sc) |
| bool | recursiveCheckLoadStateMachine (StateMachinePtr sc) |
| void | recursiveUnloadStateMachine (StateMachinePtr sc) |
| bool | recursiveCheckUnloadStateMachine (StateMachinePtr si) |
Protected Attributes | |
| StateMap * | states |
| bool loadStateMachine | ( | StateMachinePtr | sc | ) |
Load a new State Machine and all its children.
| program_load_exception | if a state machine with the same name already exists. |
Definition at line 143 of file StateMachineProcessor.cpp.
References ORO_THROW_OR_RETURN, and StateMachineProcessor::recursiveLoadStateMachine().
| bool unloadStateMachine | ( | const std::string & | name | ) |
Unload a deactivated State Machine and all its children.
| program_unload_exception | if the state machine or one of its children is still active. |
Definition at line 198 of file StateMachineProcessor.cpp.
References ListLockFree::find_if(), StateMachine::getName(), ORO_THROW_OR_RETURN, StateMachineProcessor::recursiveCheckUnloadStateMachine(), StateMachineProcessor::recursiveUnloadStateMachine(), and StateMachineProcessor::states.
Referenced by StateMachineProcessor::clear(), and StateMachineProcessor::deleteStateMachine().
| bool deleteStateMachine | ( | const std::string & | name | ) |
Delete a deactivated State Machine and all its children.
| program_unload_exception | if the state machine or one of its children is still active. |
Definition at line 270 of file StateMachineProcessor.cpp.
References StateMachineProcessor::unloadStateMachine().
| void loop | ( | ) | [virtual, inherited] |
The method that will be executed once when this class is run in a non periodic thread.
The default implementation calls step() once.
Reimplemented in Timer.
Definition at line 60 of file RunnableInterface.cpp.
References RunnableInterface::step().
Referenced by SlaveActivity::execute(), SingleThread::loop(), and NonPeriodicActivity::loop().
| bool breakLoop | ( | ) | [virtual, inherited] |
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.
Reimplemented in EventProcessor, ExecutionEngine, and Timer.
Definition at line 62 of file RunnableInterface.cpp.
Referenced by SingleThread::breakLoop(), NonPeriodicActivity::breakLoop(), and SlaveActivity::stop().
| ThreadInterface * getThread | ( | ) | const [inherited] |
Get the thread this object is run in.
Definition at line 69 of file RunnableInterface.cpp.
Referenced by Timer::initialize().
1.5.3