39 #ifndef ORO_EXECUTION_SCRIPTING_ACCESS 40 #define ORO_EXECUTION_SCRIPTING_ACCESS 48 #include "../Service.hpp" 52 {
namespace scripting {
96 bool deleteProgram(
const std::string& name);
103 bool unloadProgram(
const std::string& name);
118 std::string getProgramStatusStr(
const std::string& name)
const;
124 std::vector<std::string> getProgramList()
const;
144 bool unloadStateMachine(
const std::string& name );
152 bool deleteStateMachine(
const std::string& name );
162 std::string getStateMachineStatusStr(
const std::string& name)
const;
167 std::vector<std::string> getStateMachineList()
const;
189 int execute(
const std::string& code );
207 bool eval(
const std::string& code );
219 bool runScript(
const std::string& filename);
236 virtual Functions loadFunctions(
const std::string& filename,
bool do_throw );
249 virtual Functions loadFunctions(
const std::string& code,
const std::string& filename,
bool do_throw );
262 virtual bool loadPrograms(
const std::string& filename,
bool do_throw );
276 virtual bool loadPrograms(
const std::string& code,
const std::string& filename,
bool do_throw );
287 virtual bool unloadProgram(
const std::string& name,
bool do_throw );
299 virtual int getProgramLine(
const std::string& name)
const;
308 virtual std::string getProgramText(
const std::string& name )
const;
321 virtual bool loadStateMachines(
const std::string& filename,
bool do_throw );
335 virtual bool loadStateMachines(
const std::string& code,
const std::string& filename,
bool do_throw );
346 virtual bool unloadStateMachine(
const std::string& name,
bool do_throw );
355 virtual std::string getStateMachineText(
const std::string& name )
const;
367 virtual int getStateMachineLine(
const std::string& name )
const;
377 bool startProgram(
const std::string& name);
383 bool stopProgram(
const std::string& name);
389 bool pauseProgram(
const std::string& name);
395 bool stepProgram(
const std::string& name);
411 virtual bool hasProgram(
const std::string& name)
const;
420 bool isProgramRunning(
const std::string& name)
const;
429 bool isProgramPaused(
const std::string& name)
const;
438 bool inProgramError(
const std::string& name)
const;
451 bool activateStateMachine(
const std::string& name);
457 bool deactivateStateMachine(
const std::string& name);
463 bool startStateMachine(
const std::string& name);
469 bool pauseStateMachine(
const std::string& name);
475 bool stopStateMachine(
const std::string& name);
481 bool resetStateMachine(
const std::string& name);
489 bool requestStateMachineState(
const std::string& name,
const std::string& state);
505 virtual bool hasStateMachine(
const std::string& name)
const;
511 bool isStateMachineActive(
const std::string& name)
const;
517 bool isStateMachineRunning(
const std::string& name)
const;
523 bool inStateMachineError(
const std::string& name)
const;
529 bool isStateMachinePaused(
const std::string& name)
const;
535 std::string getStateMachineState(
const std::string& name)
const;
543 bool inStateMachineState(
const std::string& name,
const std::string& state)
const;
549 bool doExecute(
const std::string& code);
551 bool evalInternal(
const std::string& filename,
const std::string& code);
552 bool doLoadPrograms(
const std::string& filename );
553 bool doLoadProgramText(
const std::string& code );
554 bool doUnloadProgram(
const std::string& name );
556 bool doLoadStateMachines(
const std::string& filename );
557 bool doLoadStateMachineText(
const std::string& code );
558 bool doUnloadStateMachine(
const std::string& name );
560 void createInterface(
void);
567 typedef std::map<std::string,StateMachinePtr>
StateMap;
571 typedef std::map<std::string,ProgramInterfacePtr>
ProgMap;
boost::shared_ptr< ScriptingService > shared_ptr
StateMap::const_iterator StateMapIt
ProgramStatus
Enumerates the statuses of a ProgramInterface.
This class parses and executes a single scripting statement.
std::map< std::string, ProgramInterfacePtr > ProgMap
StatementProcessor * sproc
#define RTT_SCRIPTING_API
ProgMap::const_iterator ProgMapIt
boost::shared_ptr< ProgramInterface > ProgramInterfacePtr
This class allows storage and retrieval of operations, ports, attributes and properties provided by a...
Placeholder of the ProgramStatus.
ProgramInterface::Status ProgramStatus
boost::shared_ptr< StateMachine > StateMachinePtr
Enumerates all possible state machine statuses.
std::vector< ProgramInterfacePtr > Functions
List of executed functions.
scripting::StateMachine::Status StateMachineStatus
The TaskContext is the C++ representation of an Orocos component.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
This interface allows to load program scripts and state machines and allows execution of code...
bool ZeroPeriodWarning
This is a property of the Scripting service It is true by default If this is set to false...
std::map< std::string, StateMachinePtr > StateMap