#include <ParsedStateMachine.hpp>
Public Member Functions | |
void | addParameter (const std::string &name, base::AttributeBase *var) |
ParsedStateMachinePtr | copy (std::map< const base::DataSourceBase *, base::DataSourceBase * > &replacements, bool instantiate=false) const |
void | finish () |
base::AttributeBase * | getParameter (const std::string &name) const |
std::vector< std::string > | getParameterNames () const |
VisibleWritableValuesMap | getParameters () const |
boost::shared_ptr< StateMachineService > | getService () const |
std::string | getText () const |
bool | inState (const std::string &name) |
ParsedStateMachine () | |
void | setName (const std::string &name, bool recursive) |
void | setService (boost::shared_ptr< StateMachineService > tc) |
void | setText (std::string text) |
virtual | ~ParsedStateMachine () |
Public Member Functions inherited from RTT::scripting::StateMachine | |
bool | activate () |
void | addChild (StateMachinePtr child) |
void | addState (StateInterface *s) |
bool | automatic () |
bool | createEventTransition (ServicePtr sp, ExecutionEngine *target_engine, const std::string &ename, std::vector< base::DataSourceBase::shared_ptr > args, StateInterface *from, StateInterface *to, ConditionInterface *guard, boost::shared_ptr< ProgramInterface > transprog, StateInterface *elseto=0, boost::shared_ptr< ProgramInterface > elseprog=boost::shared_ptr< ProgramInterface >()) |
ProgramInterface * | currentProgram () const |
StateInterface * | currentState () const |
bool | deactivate () |
bool | execute () |
bool | executePending (bool stepping=false) |
const ChildList & | getChildren () const |
const std::string & | getCurrentStateName () const |
StateInterface * | getFinalState () const |
base::ActionInterface * | getInitCommand () const |
StateInterface * | getInitialState () const |
int | getLineNumber () const |
const std::string & | getName () const |
StateMachinePtr | getParent () const |
StateInterface * | getState (const std::string &name) const |
std::vector< std::string > | getStateList () const |
Status::StateMachineStatus | getStatus () const |
std::string | getStatusStr () const |
bool | inError () const |
bool | inFinalState () const |
bool | inInitialState () const |
bool | inState (const std::string &state) const |
bool | inStrictState (const std::string &state) const |
bool | interruptible () const |
bool | inTransition () const |
bool | isActive () const |
bool | isAutomatic () const |
bool | isPaused () const |
bool | isReactive () const |
bool | isStopped () const |
bool | isStrictlyActive () const |
void | loading () |
StateInterface * | nextState () |
bool | pause () |
void | preconditionSet (StateInterface *state, ConditionInterface *cnd, int line) |
bool | reactive () |
bool | requestFinalState () |
bool | requestInitialState () |
StateInterface * | requestNextState (bool stepping=false) |
StateInterface * | requestNextStateStep () |
bool | requestState (const std::string &statename) |
bool | requestStateChange (StateInterface *s_n) |
bool | reset () |
void | setFinalState (StateInterface *s) |
void | setInitCommand (base::ActionInterface *c) |
void | setInitialState (StateInterface *s) |
void | setParent (StateMachinePtr parent) |
bool | start () |
StateMachine (StateMachinePtr parent, const std::string &name="Default") | |
bool | step () |
bool | stepDone () const |
bool | stop () |
void | trace (bool on_off) |
void | transitionSet (StateInterface *from, StateInterface *to, ConditionInterface *cnd, int priority, int line) |
void | transitionSet (StateInterface *from, StateInterface *to, ConditionInterface *cnd, boost::shared_ptr< ProgramInterface > transprog, int priority, int line) |
void | unloading () |
virtual | ~StateMachine () |
Public Member Functions inherited from RTT::base::ExecutableInterface | |
ExecutableInterface () | |
ExecutionEngine * | getEngine () |
bool | isLoaded () |
void | loaded (ExecutionEngine *ee) |
void | unloaded () |
virtual | ~ExecutableInterface () |
Protected Member Functions | |
virtual void | unloading () |
Protected Member Functions inherited from RTT::scripting::StateMachine | |
void | changeState (StateInterface *s, ProgramInterface *tprog, bool stepping=false) |
int | checkConditions (StateInterface *state, bool stepping=false) |
void | disableEvents (StateInterface *s) |
void | disableGlobalEvents () |
void | enableEvents (StateInterface *s) |
void | enableGlobalEvents () |
void | enterState (StateInterface *s) |
bool | executeProgram (ProgramInterface *&cp, bool stepping) |
void | handleState (StateInterface *s) |
void | leaveState (StateInterface *s) |
void | runState (StateInterface *s) |
Private Types | |
typedef std::map< std::string, base::AttributeBase * > | VisibleWritableValuesMap |
Private Attributes | |
boost::shared_ptr< std::string > | _text |
boost::shared_ptr< StateMachineService > | object |
VisibleWritableValuesMap | parametervalues |
State machine created by the scripting engine which represents a parsed state machine.
Definition at line 54 of file ParsedStateMachine.hpp.
|
private |
Definition at line 57 of file ParsedStateMachine.hpp.
RTT::ParsedStateMachine::ParsedStateMachine | ( | ) |
Definition at line 219 of file ParsedStateMachine.cpp.
|
virtual |
Definition at line 195 of file ParsedStateMachine.cpp.
void RTT::ParsedStateMachine::addParameter | ( | const std::string & | name, |
base::AttributeBase * | var | ||
) |
Definition at line 238 of file ParsedStateMachine.cpp.
ParsedStateMachinePtr RTT::ParsedStateMachine::copy | ( | std::map< const base::DataSourceBase *, base::DataSourceBase * > & | replacements, |
bool | instantiate = false |
||
) | const |
Create a copy, set instantiate to 'true' if instantiating a RootMachine.
Definition at line 64 of file ParsedStateMachine.cpp.
void RTT::ParsedStateMachine::finish | ( | ) |
Call this function if the state machine is parsed.
Definition at line 314 of file ParsedStateMachine.cpp.
AttributeBase * RTT::ParsedStateMachine::getParameter | ( | const std::string & | name | ) | const |
Definition at line 246 of file ParsedStateMachine.cpp.
std::vector< std::string > RTT::ParsedStateMachine::getParameterNames | ( | ) | const |
Definition at line 258 of file ParsedStateMachine.cpp.
ParsedStateMachine::VisibleWritableValuesMap RTT::ParsedStateMachine::getParameters | ( | ) | const |
Definition at line 253 of file ParsedStateMachine.cpp.
StateMachineServicePtr RTT::ParsedStateMachine::getService | ( | ) | const |
Definition at line 300 of file ParsedStateMachine.cpp.
|
virtual |
Return the text to which getLineNumber() refers.
Reimplemented from RTT::scripting::StateMachine.
Definition at line 290 of file ParsedStateMachine.cpp.
bool RTT::ParsedStateMachine::inState | ( | const std::string & | name | ) |
Definition at line 307 of file ParsedStateMachine.cpp.
void RTT::ParsedStateMachine::setName | ( | const std::string & | name, |
bool | recursive | ||
) |
Set the name of this machine. If recurisive == true, this also sets subMachines' names, to the given name + "." + the name they have been instantiated by in this machine.
Definition at line 263 of file ParsedStateMachine.cpp.
void RTT::ParsedStateMachine::setService | ( | boost::shared_ptr< StateMachineService > | tc | ) |
Definition at line 303 of file ParsedStateMachine.cpp.
void RTT::ParsedStateMachine::setText | ( | std::string | text | ) |
Definition at line 295 of file ParsedStateMachine.cpp.
|
protectedvirtual |
Informs this object that it got unloaded from an ExecutionEngine. Called by unload() before the engine pointer is cleared.
Reimplemented from RTT::base::ExecutableInterface.
Definition at line 225 of file ParsedStateMachine.cpp.
|
private |
Definition at line 98 of file ParsedStateMachine.hpp.
|
private |
Definition at line 100 of file ParsedStateMachine.hpp.
|
private |
Definition at line 96 of file ParsedStateMachine.hpp.