Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
RTT::scripting::ParsedStateMachine Class Reference

#include <ParsedStateMachine.hpp>

Inheritance diagram for RTT::scripting::ParsedStateMachine:
Inheritance graph

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::AttributeBasegetParameter (const std::string &name) const
std::vector< std::string > getParameterNames () const
VisibleWritableValuesMap getParameters () const
boost::shared_ptr< StateMachineServicegetService () 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 >())
ProgramInterfacecurrentProgram () const
StateInterfacecurrentState () const
bool deactivate ()
bool execute ()
bool executePending (bool stepping=false)
const ChildListgetChildren () const
const std::string & getCurrentStateName () const
StateInterfacegetFinalState () const
base::ActionInterfacegetInitCommand () const
StateInterfacegetInitialState () const
int getLineNumber () const
const std::string & getName () const
StateMachinePtr getParent () const
StateInterfacegetState (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 ()
StateInterfacenextState ()
bool pause ()
void preconditionSet (StateInterface *state, ConditionInterface *cnd, int line)
bool reactive ()
bool requestFinalState ()
bool requestInitialState ()
StateInterfacerequestNextState (bool stepping=false)
StateInterfacerequestNextStateStep ()
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 ()
ExecutionEnginegetEngine ()
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< StateMachineServiceobject
VisibleWritableValuesMap parametervalues

Additional Inherited Members

- Public Types inherited from RTT::scripting::StateMachine
typedef std::vector< StateMachinePtrChildList
- Protected Types inherited from RTT::scripting::StateMachine
typedef std::vector< boost::tuple< ServicePtr, std::string, std::vector< base::DataSourceBase::shared_ptr >, StateInterface *, ConditionInterface *, boost::shared_ptr< ProgramInterface >, Handle, StateInterface *, boost::shared_ptr< ProgramInterface > > > EventList
typedef std::map< StateInterface *, EventListEventMap
typedef std::multimap< StateInterface *, std::pair< ConditionInterface *, int > > PreConditionMap
typedef boost::weak_ptr< StateMachineStateMachineParentPtr
typedef std::map< StateInterface *, TransListTransitionMap
typedef std::vector< boost::tuple< ConditionInterface *, StateInterface *, int, int, boost::shared_ptr< ProgramInterface > > > TransList
- Protected Attributes inherited from RTT::scripting::StateMachine
std::vector< StateMachinePtr_children
std::string _name
StateMachineParentPtr _parent
EventMap eventMap
PreConditionMap precondMap
Status::StateMachineStatus smStatus
TransitionMap stateMap
- Protected Attributes inherited from RTT::base::ExecutableInterface

Detailed Description

State machine created by the scripting engine which represents a parsed state machine.

Definition at line 54 of file ParsedStateMachine.hpp.

Member Typedef Documentation

Definition at line 57 of file ParsedStateMachine.hpp.

Constructor & Destructor Documentation

RTT::ParsedStateMachine::ParsedStateMachine ( )

Definition at line 219 of file ParsedStateMachine.cpp.

RTT::ParsedStateMachine::~ParsedStateMachine ( )

Definition at line 195 of file ParsedStateMachine.cpp.

Member Function Documentation

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.

  1. add copy/clone semantics to StateInterface and StateMachine. 2a. rewrite ParsedStateMachine::copy to use (1) 2b. remove all old StateMachine in DataSource code ( code is deprecated by StateMachineCommands implementation)
  2. refactor SM copying code in StateGraphParser to this file (and vice versa).
  3. in the end, no dynamic_casts should be needed anymore.

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.

std::string RTT::ParsedStateMachine::getText ( ) const

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.

void RTT::ParsedStateMachine::unloading ( )

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.

Member Data Documentation

boost::shared_ptr<std::string> RTT::scripting::ParsedStateMachine::_text

Definition at line 98 of file ParsedStateMachine.hpp.

boost::shared_ptr<StateMachineService> RTT::scripting::ParsedStateMachine::object

Definition at line 100 of file ParsedStateMachine.hpp.

VisibleWritableValuesMap RTT::scripting::ParsedStateMachine::parametervalues

Definition at line 96 of file ParsedStateMachine.hpp.

The documentation for this class was generated from the following files:

Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:47