#include <ScriptingService.hpp>
Public Types | |
typedef std::vector< ProgramInterfacePtr > | Functions |
typedef ProgramInterface::Status | ProgramStatus |
typedef boost::shared_ptr< ScriptingService > | shared_ptr |
typedef scripting::StateMachine::Status | StateMachineStatus |
Public Types inherited from RTT::Service | |
typedef OperationInterface | Factory |
typedef std::vector< std::string > | ProviderNames |
typedef boost::shared_ptr< const Service > | shared_constptr |
typedef boost::shared_ptr< Service > | shared_ptr |
Public Types inherited from RTT::OperationInterface | |
typedef std::vector< base::DataSourceBase::shared_ptr > | Arguments |
typedef std::vector< ArgumentDescription > | Descriptions |
Public Types inherited from RTT::ConfigurationInterface | |
typedef std::vector< std::string > | AttributeNames |
typedef std::vector< base::AttributeBase * > | AttributeObjects |
Public Types inherited from RTT::DataFlowInterface | |
typedef std::vector< std::string > | PortNames |
typedef std::vector< base::PortInterface * > | Ports |
typedef boost::function< void(base::PortInterface *)> | SlotFunction |
Public Member Functions | |
void | clear () |
bool | deleteProgram (const std::string &name) |
bool | deleteStateMachine (const std::string &name) |
bool | eval (const std::string &code) |
int | execute (const std::string &code) |
const ProgramInterfacePtr | getProgram (const std::string &name) const |
ProgramInterfacePtr | getProgram (const std::string &name) |
virtual int | getProgramLine (const std::string &name) const |
std::vector< std::string > | getProgramList () const |
ProgramStatus::ProgramStatus | getProgramStatus (const std::string &name) const |
std::string | getProgramStatusStr (const std::string &name) const |
virtual std::string | getProgramText (const std::string &name) const |
const StateMachinePtr | getStateMachine (const std::string &name) const |
StateMachinePtr | getStateMachine (const std::string &name) |
virtual int | getStateMachineLine (const std::string &name) const |
std::vector< std::string > | getStateMachineList () const |
StateMachineStatus::StateMachineStatus | getStateMachineStatus (const std::string &name) const |
std::string | getStateMachineStatusStr (const std::string &name) const |
virtual std::string | getStateMachineText (const std::string &name) const |
virtual Functions | loadFunctions (const std::string &filename, bool do_throw) |
virtual Functions | loadFunctions (const std::string &code, const std::string &filename, bool do_throw) |
bool | loadProgram (ProgramInterfacePtr pi) |
virtual bool | loadPrograms (const std::string &filename, bool do_throw) |
virtual bool | loadPrograms (const std::string &code, const std::string &filename, bool do_throw) |
bool | loadStateMachine (StateMachinePtr sc) |
virtual bool | loadStateMachines (const std::string &filename, bool do_throw) |
virtual bool | loadStateMachines (const std::string &code, const std::string &filename, bool do_throw) |
bool | runScript (const std::string &filename) |
ScriptingService (TaskContext *parent) | |
bool | unloadProgram (const std::string &name) |
virtual bool | unloadProgram (const std::string &name, bool do_throw) |
bool | unloadStateMachine (const std::string &name) |
virtual bool | unloadStateMachine (const std::string &name, bool do_throw) |
virtual | ~ScriptingService () |
Script Program Commands | |
bool | startProgram (const std::string &name) |
bool | stopProgram (const std::string &name) |
bool | pauseProgram (const std::string &name) |
bool | stepProgram (const std::string &name) |
Script Program OperationCallers | |
virtual bool | hasProgram (const std::string &name) const |
bool | isProgramRunning (const std::string &name) const |
bool | isProgramPaused (const std::string &name) const |
bool | inProgramError (const std::string &name) const |
Script State Machine Commands | |
bool | activateStateMachine (const std::string &name) |
bool | deactivateStateMachine (const std::string &name) |
bool | startStateMachine (const std::string &name) |
bool | pauseStateMachine (const std::string &name) |
bool | stopStateMachine (const std::string &name) |
bool | resetStateMachine (const std::string &name) |
bool | requestStateMachineState (const std::string &name, const std::string &state) |
Script State Machine OperationCallers | |
virtual bool | hasStateMachine (const std::string &name) const |
bool | isStateMachineActive (const std::string &name) const |
bool | isStateMachineRunning (const std::string &name) const |
bool | inStateMachineError (const std::string &name) const |
bool | isStateMachinePaused (const std::string &name) const |
std::string | getStateMachineState (const std::string &name) const |
bool | inStateMachineState (const std::string &name, const std::string &state) const |
Public Member Functions inherited from RTT::Service | |
bool | addLocalOperation (base::OperationBase &op) |
template<class Signature > | |
Operation< Signature > & | addOperation (Operation< Signature > &op) |
template<class Func , class Class > | |
Operation< typename internal::GetSignature< Func >::Signature > & | addOperation (const std::string name, Func func, Class *obj, ExecutionThread et=ClientThread) |
template<class Func > | |
Operation< Func > & | addOperation (const std::string name, Func *func, ExecutionThread et=ClientThread) |
template<class Func , class ObjT > | |
Operation< typename internal::GetSignatureDS< Func >::Signature > & | addOperationDS (const std::string &name, Func func, internal::DataSource< boost::shared_ptr< ObjT > > *sp, ExecutionThread et=ClientThread) |
template<class Signature , class ObjT > | |
Operation< Signature > & | addOperationDS (internal::DataSource< boost::shared_ptr< ObjT > > *sp, Operation< Signature > &op) |
virtual bool | addService (shared_ptr obj) |
template<class Signature > | |
Operation< Signature > & | addSynchronousOperation (Operation< Signature > &op) |
template<class Func , class Class > | |
Operation< typename internal::GetSignature< Func >::Signature > & | addSynchronousOperation (const std::string name, Func func, Class *obj, ExecutionThread et=ClientThread) |
void | clear () |
internal::OperationCallerC | create (std::string name, ExecutionEngine *caller) |
const std::string & | doc () const |
void | doc (const std::string &description) |
boost::shared_ptr< base::DisposableInterface > | getLocalOperation (std::string name) |
const std::string & | getName () const |
OperationInterfacePart * | getOperation (std::string name) |
base::DataSourceBase::shared_ptr | getOperation (std::string name, const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const |
std::vector< std::string > | getOperationNames () const |
TaskContext * | getOwner () const |
ExecutionEngine * | getOwnerExecutionEngine () const |
shared_ptr | getParent () const |
virtual ProviderNames | getProviderNames () const |
shared_ptr | getService (const std::string &service_name) |
bool | hasOperation (const std::string &name) const |
bool | hasService (const std::string &service_name) |
Service::shared_ptr | provides () |
Service::shared_ptr | provides (const std::string &service_name) |
void | removeOperation (const std::string &name) |
virtual void | removeService (std::string const &service_name) |
bool | resetOperation (std::string name, base::OperationBase *impl) |
Service (const std::string &name, TaskContext *owner=0) | |
void | setName (const std::string &name) |
bool | setOperationThread (std::string const &name, ExecutionThread et) |
void | setOwner (TaskContext *new_owner) |
void | setParent (shared_ptr new_parent) |
virtual | ~Service () |
Public Member Functions inherited from RTT::OperationInterface | |
void | add (const std::string &name, OperationInterfacePart *part) |
void | clear () |
Descriptions | getArgumentList (const std::string &name) const |
int | getArity (const std::string &name) const |
int | getCollectArity (const std::string &name) const |
std::string | getDescription (const std::string &name) const |
std::vector< std::string > | getNames () const |
OperationInterfacePart * | getPart (const std::string &name) |
std::string | getResultType (const std::string &name) const |
bool | hasMember (const std::string &name) const |
bool | isSynchronous (const std::string &name) const |
base::DataSourceBase::shared_ptr | produce (const std::string &name, const Arguments &args, ExecutionEngine *caller) const |
base::DataSourceBase::shared_ptr | produceCollect (const std::string &name, const Arguments &args, internal::DataSource< bool >::shared_ptr blocking) const |
base::DataSourceBase::shared_ptr | produceHandle (const std::string &name) const |
base::DataSourceBase::shared_ptr | produceSend (const std::string &name, const Arguments &args, ExecutionEngine *caller) const |
void | remove (const std::string &name) |
Public Member Functions inherited from RTT::ConfigurationInterface | |
template<class T > | |
bool | addAttribute (const std::string &name, T &attr) |
template<class T > | |
Attribute< T > & | addAttribute (const std::string &name, Attribute< T > &attr) |
bool | addAttribute (base::AttributeBase &a) |
template<class T > | |
bool | addConstant (const std::string &name, const T &cnst) |
template<class T > | |
Constant< T > & | addConstant (const std::string &name, Constant< T > &cnst) |
bool | addConstant (base::AttributeBase &c) |
template<class T > | |
Property< T > & | addProperty (const std::string &name, T &prop) |
template<class T > | |
Property< T > & | addProperty (const std::string &name, Property< T > &prop) |
bool | addProperty (base::PropertyBase &pb) |
void | clear () |
ConfigurationInterface () | |
ConfigurationInterface * | copy (std::map< const base::DataSourceBase *, base::DataSourceBase * > &repl, bool instantiate) const |
base::AttributeBase * | getAttribute (const std::string &name) const |
AttributeNames | getAttributeNames () const |
base::AttributeBase * | getConstant (const std::string &name) const |
base::PropertyBase * | getProperty (const std::string &name) const |
base::AttributeBase * | getValue (const std::string &name) const |
AttributeObjects const & | getValues () const |
bool | hasAttribute (const std::string &name) const |
bool | hasProperty (const std::string &name) const |
void | loadValues (AttributeObjects const &new_values) |
PropertyBag * | properties () |
void | removeAttribute (const std::string &name) |
bool | removeProperty (base::PropertyBase &p) |
bool | removeValue (const std::string &name) |
bool | setValue (base::AttributeBase *ab) |
~ConfigurationInterface () | |
Public Member Functions inherited from RTT::DataFlowInterface | |
base::InputPortInterface & | addEventPort (const std::string &name, base::InputPortInterface &port, SlotFunction callback=SlotFunction()) |
base::InputPortInterface & | addEventPort (base::InputPortInterface &port, SlotFunction callback=SlotFunction()) |
base::InputPortInterface & | addLocalEventPort (base::InputPortInterface &port, SlotFunction callback=SlotFunction()) |
base::PortInterface & | addLocalPort (base::PortInterface &port) |
base::PortInterface & | addPort (const std::string &name, base::PortInterface &port) |
base::PortInterface & | addPort (base::PortInterface &port) |
void | clear () |
DataFlowInterface (Service *parent=0) | |
void | dataOnPort (base::PortInterface *port) |
TaskContext * | getOwner () const |
base::PortInterface * | getPort (const std::string &name) const |
std::string | getPortDescription (const std::string &name) const |
PortNames | getPortNames () const |
Ports | getPorts () const |
template<class Type > | |
Type * | getPortType (const std::string &name) |
Service * | getService () const |
void | removeLocalPort (const std::string &name) |
void | removePort (const std::string &name) |
bool | setPortDescription (const std::string &name, const std::string description) |
~DataFlowInterface () | |
Static Public Member Functions | |
static shared_ptr | Create (TaskContext *parent) |
Static Public Member Functions inherited from RTT::Service | |
static Service::shared_ptr | Create (const std::string &name, TaskContext *owner=0) |
Protected Types | |
typedef std::map< std::string, ProgramInterfacePtr > | ProgMap |
typedef ProgMap::const_iterator | ProgMapIt |
typedef std::map< std::string, StateMachinePtr > | StateMap |
typedef StateMap::const_iterator | StateMapIt |
Protected Types inherited from RTT::Service | |
typedef std::vector< base::OperationBase * > | OperationList |
typedef std::map< std::string, shared_ptr > | Services |
typedef std::map< std::string, base::OperationBase * > | SimpleOperations |
Protected Types inherited from RTT::OperationInterface | |
typedef std::map< std::string, OperationInterfacePart * > | map_t |
Protected Types inherited from RTT::ConfigurationInterface | |
typedef std::vector< base::AttributeBase * > | map_t |
Protected Member Functions | |
void | createInterface (void) |
bool | doExecute (const std::string &code) |
bool | doLoadPrograms (const std::string &filename) |
bool | doLoadProgramText (const std::string &code) |
bool | doLoadStateMachines (const std::string &filename) |
bool | doLoadStateMachineText (const std::string &code) |
bool | doUnloadProgram (const std::string &name) |
bool | doUnloadStateMachine (const std::string &name) |
bool | evalInternal (const std::string &filename, const std::string &code) |
bool | recursiveCheckLoadStateMachine (StateMachinePtr sc) |
bool | recursiveCheckUnloadStateMachine (StateMachinePtr si) |
void | recursiveLoadStateMachine (StateMachinePtr sc) |
void | recursiveUnloadStateMachine (StateMachinePtr sc) |
Protected Member Functions inherited from RTT::Service | |
bool | testOperation (base::OperationBase &op) |
Protected Member Functions inherited from RTT::ConfigurationInterface | |
bool | chkPtr (const std::string &where, const std::string &name, const void *ptr) |
Protected Member Functions inherited from RTT::DataFlowInterface | |
bool | chkPtr (const std::string &where, const std::string &name, const void *ptr) |
Service * | createPortObject (const std::string &name) |
Protected Attributes | |
ProgMap | programs |
StatementProcessor * | sproc |
StateMap | states |
bool | ZeroPeriodWarning |
Protected Attributes inherited from RTT::Service | |
std::string | mdescription |
std::string | mname |
TaskContext * | mowner |
OperationList | ownedoperations |
shared_ptr | parent |
Services | services |
the services we implement. More... | |
SimpleOperations | simpleoperations |
Protected Attributes inherited from RTT::OperationInterface | |
map_t | data |
Protected Attributes inherited from RTT::ConfigurationInterface | |
PropertyBag | bag |
map_t | values |
Protected Attributes inherited from RTT::DataFlowInterface | |
Ports | mports |
Service * | mservice |
This interface allows to load program scripts and state machines and allows execution of code. It keeps track of all loaded scripts of the parent component. It can be found as the scripting object of a TaskContext.
Definition at line 60 of file ScriptingService.hpp.
typedef std::vector< ProgramInterfacePtr > RTT::scripting::ScriptingService::Functions |
List of executed functions.
Definition at line 224 of file ScriptingService.hpp.
|
protected |
Definition at line 571 of file ScriptingService.hpp.
|
protected |
Definition at line 573 of file ScriptingService.hpp.
Definition at line 80 of file ScriptingService.hpp.
typedef boost::shared_ptr<ScriptingService> RTT::scripting::ScriptingService::shared_ptr |
Definition at line 64 of file ScriptingService.hpp.
Definition at line 81 of file ScriptingService.hpp.
|
protected |
Definition at line 567 of file ScriptingService.hpp.
|
protected |
Definition at line 569 of file ScriptingService.hpp.
RTT::ScriptingService::ScriptingService | ( | TaskContext * | parent | ) |
Creates a ScriptingService object. You need to add the service to parent yourself, or use Create().
Definition at line 71 of file ScriptingService.cpp.
|
virtual |
Definition at line 84 of file ScriptingService.cpp.
bool RTT::ScriptingService::activateStateMachine | ( | const std::string & | name | ) |
Activate a previously loaded StateMachine.
name | The name of the StateMachine. |
Definition at line 869 of file ScriptingService.cpp.
void RTT::ScriptingService::clear | ( | ) |
Stop and unload all program scripts.
Definition at line 92 of file ScriptingService.cpp.
|
static |
Creates a ScriptingService object and registers the service to parent.
Definition at line 65 of file ScriptingService.cpp.
|
protected |
Definition at line 448 of file ScriptingService.cpp.
bool RTT::ScriptingService::deactivateStateMachine | ( | const std::string & | name | ) |
Deactivate a stopped StateMachine.
name | The name of the StateMachine. |
Definition at line 877 of file ScriptingService.cpp.
bool RTT::scripting::ScriptingService::deleteProgram | ( | const std::string & | name | ) |
Completely discard a loaded Program.
program_unload_exception | if the program is not stopped or does not exist. |
bool RTT::ScriptingService::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 306 of file ScriptingService.cpp.
|
protected |
Definition at line 416 of file ScriptingService.cpp.
|
protected |
Definition at line 421 of file ScriptingService.cpp.
|
protected |
Definition at line 426 of file ScriptingService.cpp.
|
protected |
Definition at line 435 of file ScriptingService.cpp.
|
protected |
Definition at line 439 of file ScriptingService.cpp.
|
protected |
Definition at line 430 of file ScriptingService.cpp.
|
protected |
Definition at line 443 of file ScriptingService.cpp.
bool RTT::ScriptingService::eval | ( | const std::string & | code | ) |
Evaluate and run all statements in code. This function is in functionality equivalent to runScript, except that runScript takes a filename as an argument, while this function takes the contents of the script itself as an argument. All possible syntax may be used.
code | A list of statements, program/function definitions etc. which get evaluated in the context of this component |
parse_exception | and its derivatives for parse errors in code. |
Definition at line 596 of file ScriptingService.cpp.
|
protected |
Definition at line 600 of file ScriptingService.cpp.
int RTT::ScriptingService::execute | ( | const std::string & | code | ) |
Parse and execute a statement.
code | A single statement to execute. |
-1 | if the code could not be parsed. |
0 | if the code was an expression and could be executed. |
>0 | if the code was a command and is being executed. |
Definition at line 516 of file ScriptingService.cpp.
const ProgramInterfacePtr RTT::scripting::ScriptingService::getProgram | ( | const std::string & | name | ) | const |
Get a pointer to a loaded Program.
ProgramInterfacePtr RTT::scripting::ScriptingService::getProgram | ( | const std::string & | name | ) |
|
virtual |
Get the current line of execution of a loaded program script.
name | The name of the program. |
-1 | if the program does not exist. |
0 | if the program is not running. |
n | the line number if the program is executing. |
Definition at line 789 of file ScriptingService.cpp.
vector< string > RTT::ScriptingService::getProgramList | ( | ) | const |
Get a list of all loaded Programs.
Definition at line 398 of file ScriptingService.cpp.
ProgramInterface::Status::ProgramStatus RTT::ScriptingService::getProgramStatus | ( | const std::string & | name | ) | const |
Return the status of a Program.
Definition at line 328 of file ScriptingService.cpp.
string RTT::ScriptingService::getProgramStatusStr | ( | const std::string & | name | ) | const |
Return the status of a Program as a human readable string.
Definition at line 337 of file ScriptingService.cpp.
|
virtual |
Get the original script description of a loaded program.
name | The name of the program. |
Definition at line 794 of file ScriptingService.cpp.
const StateMachinePtr RTT::scripting::ScriptingService::getStateMachine | ( | const std::string & | name | ) | const |
Get a pointer to a loaded StateMachine.
StateMachinePtr RTT::scripting::ScriptingService::getStateMachine | ( | const std::string & | name | ) |
Get a pointer to a loaded StateMachine.
|
virtual |
Get the current line of execution of a loaded state machine script.
name | The name of the state machine. |
-1 | if the state machine does not exist. |
0 | if the state machine is not running. |
n | the line number if the state machine is executing. |
Definition at line 808 of file ScriptingService.cpp.
vector< string > RTT::ScriptingService::getStateMachineList | ( | ) | const |
Get a list of all loaded StateMachines and their children.
Definition at line 323 of file ScriptingService.cpp.
string RTT::ScriptingService::getStateMachineState | ( | const std::string & | name | ) | const |
Get the current state of a state machine.
name | The name of the StateMachine. |
Definition at line 941 of file ScriptingService.cpp.
StateMachine::Status::StateMachineStatus RTT::ScriptingService::getStateMachineStatus | ( | const std::string & | name | ) | const |
Return the status of a StateMachine.
Definition at line 132 of file ScriptingService.cpp.
string RTT::ScriptingService::getStateMachineStatusStr | ( | const std::string & | name | ) | const |
Return the status of a StateMachine as a human readable string
Definition at line 141 of file ScriptingService.cpp.
|
virtual |
Get the original script description of a loaded state machine.
name | The name of the state machine. |
Definition at line 803 of file ScriptingService.cpp.
|
virtual |
Check if a program is loaded
name | The name of the program. |
Definition at line 785 of file ScriptingService.cpp.
|
virtual |
Check if a state machine is loaded.
name | The name of the state machine. |
Definition at line 799 of file ScriptingService.cpp.
bool RTT::ScriptingService::inProgramError | ( | const std::string & | name | ) | const |
Inspect if a loaded program is in the error state
name | The name of the Program. |
Definition at line 837 of file ScriptingService.cpp.
bool RTT::ScriptingService::inStateMachineError | ( | const std::string & | name | ) | const |
Returns true if the state machine is in error.
name | The name of the StateMachine. |
Definition at line 933 of file ScriptingService.cpp.
bool RTT::ScriptingService::inStateMachineState | ( | const std::string & | name, |
const std::string & | state | ||
) | const |
Check if a state machine is in a given state
name | The name of the StateMachine. |
state | The state to enter. |
Definition at line 957 of file ScriptingService.cpp.
bool RTT::ScriptingService::isProgramPaused | ( | const std::string & | name | ) | const |
Inspect if a loaded program is in the paused state
name | The name of the Program. |
Definition at line 829 of file ScriptingService.cpp.
bool RTT::ScriptingService::isProgramRunning | ( | const std::string & | name | ) | const |
Inspect if a loaded program is in the running state
name | The name of the Program. |
Definition at line 821 of file ScriptingService.cpp.
bool RTT::ScriptingService::isStateMachineActive | ( | const std::string & | name | ) | const |
Returns true if the state machine has been activated.
name | The name of the StateMachine. |
Definition at line 917 of file ScriptingService.cpp.
bool RTT::ScriptingService::isStateMachinePaused | ( | const std::string & | name | ) | const |
Returns true if the state machine is paused.
name | The name of the StateMachine. |
Definition at line 909 of file ScriptingService.cpp.
bool RTT::ScriptingService::isStateMachineRunning | ( | const std::string & | name | ) | const |
Returns true if the state machine was successfully started.
name | The name of the StateMachine. |
Definition at line 925 of file ScriptingService.cpp.
|
virtual |
Load and execute a set of functions into the Program Processor for execution
filename | The file to load |
do_throw | Set to yes to cause the parse errors to be thrown instead of being printed to the Logger interface. |
|
virtual |
Load and execute a set of functions into the Program Processor for execution
code | A string containing the function definitions. |
filename | The file name to use in the error messages. |
do_throw | Set to yes to cause the parse errors to be thrown instead of being printed to the Logger interface. |
bool RTT::ScriptingService::loadProgram | ( | ProgramInterfacePtr | pi | ) |
Load a new Program. The Processor takes full ownership and will delete it upon destruction.
program_load_exception | if a program with the same name already exists. |
Definition at line 360 of file ScriptingService.cpp.
|
virtual |
Load a set of programs into the Program Processor for execution. The programs are just loaded, not started yet.
filename | The file to load |
do_throw | Set to yes to cause the parse errors to be thrown instead of being printed to the Logger interface. |
|
virtual |
Load a set of programs into the Program Processor for execution. The programs are just loaded, not started yet.
code | A string containing the function definitions. |
filename | The file name to use in the error messages. |
do_throw | Set to yes to cause the parse errors to be thrown instead of being printed to the Logger interface. |
bool RTT::ScriptingService::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 185 of file ScriptingService.cpp.
|
virtual |
Load a set of state machines into the StateMachineProcessor for execution. The state machines are just loaded, not started yet.
filename | The file to load |
do_throw | Set to yes to cause the parse errors to be thrown instead of being printed to the Logger interface. |
|
virtual |
Load a set of state machines into the StateMachineProcessor for execution. The state machines are just loaded, not started yet.
code | A string containing the function definitions. |
filename | The file name to use in the error messages. |
do_throw | Set to yes to cause the parse errors to be thrown instead of being printed to the Logger interface. |
bool RTT::ScriptingService::pauseProgram | ( | const std::string & | name | ) |
Pauses the execution of a running program.
name | The name of the Program. |
Definition at line 853 of file ScriptingService.cpp.
bool RTT::ScriptingService::pauseStateMachine | ( | const std::string & | name | ) |
Pause a previously activated StateMachine.
name | The name of the StateMachine. |
Definition at line 893 of file ScriptingService.cpp.
|
protected |
Definition at line 210 of file ScriptingService.cpp.
|
protected |
Definition at line 266 of file ScriptingService.cpp.
|
protected |
Definition at line 230 of file ScriptingService.cpp.
|
protected |
Definition at line 288 of file ScriptingService.cpp.
bool RTT::ScriptingService::requestStateMachineState | ( | const std::string & | name, |
const std::string & | state | ||
) |
Request a state change in a state machine.
name | The name of the StateMachine. |
state | The state to enter. |
Definition at line 949 of file ScriptingService.cpp.
bool RTT::ScriptingService::resetStateMachine | ( | const std::string & | name | ) |
Resets the execution of a scripting::StateMachine and enters the Initial_State.
name | The name of the StateMachine. |
Definition at line 965 of file ScriptingService.cpp.
bool RTT::ScriptingService::runScript | ( | const std::string & | filename | ) |
Run a script which is stored in a file.
filename | The local file to load and execute |
parse_exception | and its derivatives for parse errors in code. |
Definition at line 578 of file ScriptingService.cpp.
bool RTT::ScriptingService::startProgram | ( | const std::string & | name | ) |
Start a Program.
name | The name of the Program. |
Definition at line 813 of file ScriptingService.cpp.
bool RTT::ScriptingService::startStateMachine | ( | const std::string & | name | ) |
Start a previously activated StateMachine.
name | The name of the StateMachine. |
Definition at line 885 of file ScriptingService.cpp.
bool RTT::ScriptingService::stepProgram | ( | const std::string & | name | ) |
Steps a single instruction of a paused program.
name | The name of the Program. |
Definition at line 861 of file ScriptingService.cpp.
bool RTT::ScriptingService::stopProgram | ( | const std::string & | name | ) |
Stops the execution of a program.
name | The name of the Program. |
Definition at line 845 of file ScriptingService.cpp.
bool RTT::ScriptingService::stopStateMachine | ( | const std::string & | name | ) |
Stops the execution of a scripting::StateMachine and enters the Final_State.
name | The name of the StateMachine. |
Definition at line 901 of file ScriptingService.cpp.
bool RTT::scripting::ScriptingService::unloadProgram | ( | const std::string & | name | ) |
Unload a program from this processor.
program_unload_exception | if the program is not stopped or does not exist. |
|
virtual |
Unload a program from the Program Processor.
name | The name of the loaded program. |
do_throw | Set to yes to cause the unloading errors to be thrown instead of being printed to the Logger interface. |
bool RTT::scripting::ScriptingService::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. |
|
virtual |
Unload a state machine from the StateMachineProcessor.
name | The name of the loaded program. |
do_throw | Set to yes to cause the unloading errors to be thrown instead of being printed to the Logger interface. |
|
protected |
Definition at line 572 of file ScriptingService.hpp.
|
protected |
Definition at line 548 of file ScriptingService.hpp.
|
protected |
Definition at line 568 of file ScriptingService.hpp.
|
protected |
This is a property of the Scripting service It is true by default If this is set to false, the warning log when loading a program or a state machine into a Component with a null period will not be printed.
Be sure you have something else triggering periodically your Component activity unless your script may not work.
Definition at line 583 of file ScriptingService.hpp.