#include </home/sspr/src/www/orocos-1.0/export/build/orocos-rtt-1.2.2/build/rtt/ProgramProcessor.hpp>
Inheritance diagram for ProgramProcessor:

It executes Realtime Programs when running.
If you want to change this policy, subclass the ProgramProcessor and override the virtual functions, such as step().
Public Types | |
| typedef ProgramInterface::Status | Status |
Public Member Functions | |
| ProgramProcessor (int f_queue_size=ORONUM_EXECUTION_PROC_QUEUE_SIZE) | |
| Constructs a new ProgramProcessor. | |
| bool | loadProgram (ProgramInterfacePtr pi) |
| Load a new Program. | |
| bool | deleteProgram (const std::string &name) |
| Completely discard a loaded Program. | |
| bool | unloadProgram (const std::string &name) |
| Unload a program from this processor. | |
| void | clear () |
| Stop and unload all programs from the ProgramProcessor. | |
| Status::ProgramStatus | getProgramStatus (const std::string &name) const |
| Return the status of a Program. | |
| std::string | getProgramStatusStr (const std::string &name) const |
| Return the status of a Program 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. | |
| virtual bool | runFunction (ProgramInterface *f) |
| Run a given function in step() or loop(). | |
| virtual bool | removeFunction (ProgramInterface *f) |
| Remove a running function added with runFunction. | |
| std::vector< std::string > | getProgramList () const |
| Get a list of all loaded Programs. | |
| const ProgramInterfacePtr | getProgram (const std::string &name) const |
| Get a pointer to a loaded Program. | |
| ProgramInterfacePtr | getProgram (const std::string &name) |
| ActivityInterface * | getActivity () const |
| Query for the task this interface is run in. | |
| virtual void | setActivity (ActivityInterface *task) |
| Set the task this interface is run in. | |
| 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< ProgramInterfacePtr > | ProgMap |
Protected Attributes | |
| ProgMap * | programs |
| std::vector< ProgramInterface * > | funcs |
|
AtomicQueue< ProgramInterface *, NonBlockingPolicy, NonBlockingPolicy > * | f_queue |
| ProgramProcessor | ( | int | f_queue_size = ORONUM_EXECUTION_PROC_QUEUE_SIZE |
) |
Constructs a new ProgramProcessor.
| f_queue_size | The maximum number of 'functions' this processor can execute |
| bool 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. |
| bool deleteProgram | ( | const std::string & | name | ) |
Completely discard a loaded Program.
| program_unload_exception | if the program is not stopped or does not exist. |
| bool 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 bool runFunction | ( | ProgramInterface * | f | ) | [virtual] |
Run a given function in step() or loop().
The function may only be destroyed after isFunctionFinished() returns true,the Processor is stopped or removeFunction() was invoked. The number of functions the Processor can run in parallel is set in its constructor argument queue_size. In addition to that number, a queue of the same size is allocated for pending functions to execute.
| virtual bool removeFunction | ( | ProgramInterface * | f | ) | [virtual] |
Remove a running function added with runFunction.
This method is only required if the function is to be destroyed and is still present in the ProgramProcessor.
| ActivityInterface * getActivity | ( | ) | const [inline, inherited] |
Query for the task this interface is run in.
Zero denotes that no task is present to run it, and hence no detailed information is available.
| virtual void setActivity | ( | ActivityInterface * | task | ) | [virtual, inherited] |
Set the task this interface is run in.
A Zero means no task is running it.
| task | The ActivityInterface running this interface. |
Reimplemented in ExecutionEngine.
| virtual 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.
| virtual 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, and ExecutionEngine.
| ThreadInterface* getThread | ( | ) | const [inherited] |
Get the thread this object is run in.
1.5.1