#include <DeploymentComponent.hpp>
Classes | |
struct | ComponentData |
struct | ConnectionData |
Public Member Functions | |
bool | addPeer (const std::string &from, const std::string &target) |
bool | addPeer (const std::string &from, const std::string &target) |
bool | cleanupComponent (const std::string &comp_name) |
bool | cleanupComponent (RTT::TaskContext *instance) |
bool | cleanupComponent (const std::string &comp_name) |
bool | cleanupComponent (RTT::TaskContext *instance) |
bool | cleanupComponents () |
bool | cleanupComponents () |
bool | cleanupComponentsGroup (const int group) |
bool | cleanupComponentsGroup (const int group) |
void | clearConfiguration () |
void | clearConfiguration () |
bool | configure (const std::string &name) |
bool | configure (const std::string &name) |
bool | configureComponents () |
bool | configureComponents () |
bool | configureComponentsGroup (const int group) |
bool | configureComponentsGroup (const int group) |
bool | configureFromFile (const std::string &name, const std::string &filename) |
bool | configureFromFile (const std::string &name, const std::string &filename) |
bool | connect (const std::string &one, const std::string &other, ConnPolicy policy) |
bool | connect (const std::string &one, const std::string &other, ConnPolicy policy) |
bool | connectPeers (const std::string &one, const std::string &other) |
bool | connectPeers (const std::string &one, const std::string &other) |
bool | connectPorts (const std::string &one, const std::string &one_port, const std::string &other, const std::string &other_port) |
bool | connectPorts (const std::string &one, const std::string &other) |
bool | connectPorts (const std::string &one, const std::string &one_port, const std::string &other, const std::string &other_port) |
bool | connectPorts (const std::string &one, const std::string &other) |
bool | connectServices (const std::string &one, const std::string &other) |
bool | connectServices (const std::string &one, const std::string &other) |
bool | createStream (const std::string &component, const std::string &port, ConnPolicy policy) |
bool | createStream (const std::string &component, const std::string &port, ConnPolicy policy) |
DeploymentComponent (std::string name="Deployer", std::string siteFile="") | |
DeploymentComponent (std::string name="Deployer", std::string siteFile="") | |
void | displayComponentTypes () const |
void | displayComponentTypes () const |
std::vector< std::string > | getComponentTypes () const |
std::vector< std::string > | getComponentTypes () const |
FactoryMap & | getFactories () |
FactoryMap & | getFactories () |
bool | import (const std::string &package) |
bool | import (const std::string &package) |
void | kickOut (const std::string &config_file) |
void | kickOut (const std::string &config_file) |
bool | kickOutAll () |
bool | kickOutAll () |
bool | kickOutComponent (const std::string &comp_name) |
bool | kickOutComponent (const std::string &comp_name) |
bool | kickOutGroup (const int group) |
bool | kickOutGroup (const int group) |
bool | kickStart (const std::string &file_name) |
bool | kickStart (const std::string &file_name) |
bool | loadComponent (const std::string &name, const std::string &type) |
bool | loadComponent (const std::string &name, const std::string &type) |
bool | loadComponents (const std::string &config_file) |
bool | loadComponents (const std::string &config_file) |
bool | loadComponentsInGroup (const std::string &config_file, const int group) |
bool | loadComponentsInGroup (const std::string &config_file, const int group) |
bool | loadConfiguration (const std::string &config_file) |
bool | loadConfiguration (const std::string &config_file) |
bool | loadConfigurationString (const std::string &config_text) |
bool | loadConfigurationString (const std::string &config_text) |
bool | loadLibrary (const std::string &name) |
bool | loadLibrary (const std::string &name) |
bool | loadService (const std::string &component, const std::string &service) |
bool | loadService (const std::string &component, const std::string &service) |
RTT::TaskContext * | myGetPeer (std::string name) |
RTT::TaskContext * | myGetPeer (std::string name) |
void | path (const std::string &path) |
void | path (const std::string &path) |
bool | runScript (const std::string &file_name) |
bool | runScript (const std::string &file_name) |
bool | setActivity (const std::string &comp_name, double period, int priority, int scheduler) |
bool | setActivity (const std::string &comp_name, double period, int priority, int scheduler) |
bool | setMasterSlaveActivity (const std::string &comp_name, const std::string &master_name) |
bool | setMasterSlaveActivity (const std::string &comp_name, const std::string &master_name) |
bool | setNamedActivity (const std::string &comp_name, const std::string &act_type, double period, int priority, int scheduler, const std::string &master_name="") |
bool | setNamedActivity (const std::string &comp_name, const std::string &act_type, double period, int priority, int scheduler, const std::string &master_name="") |
bool | setPeriodicActivity (const std::string &comp_name, double period, int priority, int scheduler) |
bool | setPeriodicActivity (const std::string &comp_name, double period, int priority, int scheduler) |
bool | setSequentialActivity (const std::string &comp_name) |
bool | setSequentialActivity (const std::string &comp_name) |
bool | setSlaveActivity (const std::string &comp_name, double period) |
bool | setSlaveActivity (const std::string &comp_name, double period) |
bool | startComponents () |
bool | startComponents () |
bool | startComponentsGroup (const int group) |
bool | startComponentsGroup (const int group) |
bool | stopComponent (const std::string &comp_name) |
bool | stopComponent (RTT::TaskContext *instance) |
bool | stopComponent (const std::string &comp_name) |
bool | stopComponent (RTT::TaskContext *instance) |
bool | stopComponents () |
bool | stopComponents () |
bool | stopComponentsGroup (const int group) |
bool | stopComponentsGroup (const int group) |
bool | stream (const std::string &port, ConnPolicy policy) |
bool | stream (const std::string &port, ConnPolicy policy) |
bool | unloadComponent (const std::string &name) |
bool | unloadComponent (const std::string &name) |
bool | unloadComponents () |
bool | unloadComponents () |
bool | unloadComponentsGroup (const int group) |
bool | unloadComponentsGroup (const int group) |
~DeploymentComponent () | |
~DeploymentComponent () | |
Protected Types | |
typedef std::map< std::string, ComponentData > | CompList |
typedef std::map< std::string, ComponentData > | CompList |
typedef std::map< std::string, ConnectionData > | ConMap |
typedef std::map< std::string, ConnectionData > | ConMap |
Protected Member Functions | |
virtual bool | componentLoaded (RTT::TaskContext *c) |
virtual bool | componentLoaded (RTT::TaskContext *c) |
virtual void | componentUnloaded (RTT::TaskContext *c) |
virtual void | componentUnloaded (RTT::TaskContext *c) |
bool | configureHook () |
bool | configureHook () |
base::PortInterface * | stringToPort (string const &names) |
base::PortInterface * | stringToPort (string const &names) |
Service::shared_ptr | stringToService (string const &names) |
Service::shared_ptr | stringToService (string const &names) |
bool | unloadComponentImpl (CompList::iterator cit) |
bool | unloadComponentImpl (CompList::iterator cit) |
Protected Attributes | |
RTT::Property< bool > | autoUnload |
std::string | compPath |
CompList | comps |
ConMap | conmap |
RTT::Constant< int > | highest_Priority |
RTT::Constant< int > | lowest_Priority |
int | nextGroup |
Next group number. | |
RTT::PropertyBag | root |
RTT::Constant< int > | sched_OTHER |
RTT::Constant< int > | sched_RT |
RTT::Attribute< std::string > | target |
RTT::Attribute< bool > | validConfig |
A Component for deploying (configuring) other components in an application. It allows to create connections between components, load the properties and scripts for components and setup component activities.
The main idea is to load an XML file as described in the Deployment Component Manual. It dictates the libraries to load, the components to create, configure and start. Every aspect of the XML file can be expressed in a program script as well. If you want this component to execute a program script, assign it a periodic activity using either a 'site local' XML script (see below), or by listing the DeploymentComponent in your main XML file.
It is possible to store site local settings in a separate XML configuration file which will be automatically loaded when the DeploymentComponent is created. The default name of this file is 'this->getName() + "-site.cpf"'. It is only looked for and loaded in the constructor of this class.
When reading an XML file (for example, when using kickStart() or loadComponents() ) the DeploymentComponent checks if a section is devoted to itself by comparing the listed component name with its own name ( this->getName() ). If it matches, it applies the configuration instructions to itself in the same manner as it would configure other components.
Definition at line 86 of file deployment/DeploymentComponent.hpp.
typedef std::map<std::string, ComponentData> OCL::DeploymentComponent::CompList [protected] |
This vector holds the dynamically loaded components.
Definition at line 169 of file install/include/orocos/ocl/DeploymentComponent.hpp.
typedef std::map<std::string, ComponentData> OCL::DeploymentComponent::CompList [protected] |
This vector holds the dynamically loaded components.
Definition at line 169 of file deployment/DeploymentComponent.hpp.
typedef std::map<std::string, ConnectionData> OCL::DeploymentComponent::ConMap [protected] |
This maps connection names to associated ports.
Definition at line 163 of file install/include/orocos/ocl/DeploymentComponent.hpp.
typedef std::map<std::string, ConnectionData> OCL::DeploymentComponent::ConMap [protected] |
This maps connection names to associated ports.
Definition at line 163 of file deployment/DeploymentComponent.hpp.
OCL::DeploymentComponent::DeploymentComponent | ( | std::string | name = "Deployer" , |
|
std::string | siteFile = "" | |||
) |
Constructs and configures this component.
The constructor looks for the site local configuration XML file ('name + "-site.cpf"') and if found, kickStart()'s it. You need to set AutoConf to true in order to force a call to configureHook(). In case this file is not present in the current working directory, the component is configured and is thus constructed in the Stopped state. Using a site file does not prevent you from kickstarting or loading other XML files lateron.
name | The name of this component. By default: Deployer | |
siteFile | The site-specific XML file which, if found, will be used for a site-specific kickStart. If left empty, the value becomes by default: name + "-site.cpf" |
Definition at line 74 of file DeploymentComponent.cpp.
OCL::DeploymentComponent::~DeploymentComponent | ( | ) |
Cleans up all configuration related information. If the property 'AutoUnload' is set to true, it will also call kickOutAll(), otherwise, the loaded components are left as-is.
Definition at line 236 of file DeploymentComponent.cpp.
OCL::DeploymentComponent::DeploymentComponent | ( | std::string | name = "Deployer" , |
|
std::string | siteFile = "" | |||
) |
Constructs and configures this component.
The constructor looks for the site local configuration XML file ('name + "-site.cpf"') and if found, kickStart()'s it. You need to set AutoConf to true in order to force a call to configureHook(). In case this file is not present in the current working directory, the component is configured and is thus constructed in the Stopped state. Using a site file does not prevent you from kickstarting or loading other XML files lateron.
name | The name of this component. By default: Deployer | |
siteFile | The site-specific XML file which, if found, will be used for a site-specific kickStart. If left empty, the value becomes by default: name + "-site.cpf" |
OCL::DeploymentComponent::~DeploymentComponent | ( | ) |
Cleans up all configuration related information. If the property 'AutoUnload' is set to true, it will also call kickOutAll(), otherwise, the loaded components are left as-is.
bool OCL::DeploymentComponent::addPeer | ( | const std::string & | from, | |
const std::string & | target | |||
) |
Make one component a peer of the other, in one direction, such that one can use the services of the other.
from | The component that must 'see' target and use its services. | |
target | The component that is 'seen' and used by from. |
bool OCL::DeploymentComponent::addPeer | ( | const std::string & | from, | |
const std::string & | target | |||
) |
Make one component a peer of the other, in one direction, such that one can use the services of the other.
from | The component that must 'see' target and use its services. | |
target | The component that is 'seen' and used by from. |
Definition at line 261 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::cleanupComponent | ( | const std::string & | comp_name | ) | [inline] |
Cleanup a single loaded and not running component.
comp_name | name of the component. |
Definition at line 765 of file install/include/orocos/ocl/DeploymentComponent.hpp.
bool OCL::DeploymentComponent::cleanupComponent | ( | RTT::TaskContext * | instance | ) |
Cleanup a single loaded and not running component.
instance | instance pointer of the component. |
bool OCL::DeploymentComponent::cleanupComponent | ( | const std::string & | comp_name | ) | [inline] |
Cleanup a single loaded and not running component.
comp_name | name of the component. |
Definition at line 765 of file deployment/DeploymentComponent.hpp.
bool OCL::DeploymentComponent::cleanupComponent | ( | RTT::TaskContext * | instance | ) |
Cleanup a single loaded and not running component.
instance | instance pointer of the component. |
Definition at line 1845 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::cleanupComponents | ( | ) |
Cleanup all loaded and not running components.
bool OCL::DeploymentComponent::cleanupComponents | ( | ) |
Cleanup all loaded and not running components.
Definition at line 1363 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::cleanupComponentsGroup | ( | const int | group | ) |
Cleanup all loaded and not running components.
group | The group number to cleanup |
bool OCL::DeploymentComponent::cleanupComponentsGroup | ( | const int | group | ) |
Cleanup all loaded and not running components.
group | The group number to cleanup |
Definition at line 1373 of file DeploymentComponent.cpp.
void OCL::DeploymentComponent::clearConfiguration | ( | ) |
Clear all loaded configuration options. This does not alter any component.
void OCL::DeploymentComponent::clearConfiguration | ( | ) |
Clear all loaded configuration options. This does not alter any component.
Definition at line 1454 of file DeploymentComponent.cpp.
virtual bool OCL::DeploymentComponent::componentLoaded | ( | RTT::TaskContext * | c | ) | [protected, virtual] |
Hook function for subclasses. Allows a subclass to abort or extend the loading of a component. By default, this function returns true.
Reimplemented in OCL::CorbaDeploymentComponent, and OCL::CorbaDeploymentComponent.
bool OCL::DeploymentComponent::componentLoaded | ( | RTT::TaskContext * | c | ) | [protected, virtual] |
Hook function for subclasses. Allows a subclass to abort or extend the loading of a component. By default, this function returns true.
Reimplemented in OCL::CorbaDeploymentComponent, and OCL::CorbaDeploymentComponent.
Definition at line 232 of file DeploymentComponent.cpp.
virtual void OCL::DeploymentComponent::componentUnloaded | ( | RTT::TaskContext * | c | ) | [protected, virtual] |
Hook function for subclasses. Allows a subclass to take notice of a component being deleted.
c | a valid TaskContext object. |
Reimplemented in OCL::CorbaDeploymentComponent, and OCL::CorbaDeploymentComponent.
virtual void OCL::DeploymentComponent::componentUnloaded | ( | RTT::TaskContext * | c | ) | [protected, virtual] |
Hook function for subclasses. Allows a subclass to take notice of a component being deleted.
c | a valid TaskContext object. |
Reimplemented in OCL::CorbaDeploymentComponent, and OCL::CorbaDeploymentComponent.
bool OCL::DeploymentComponent::configure | ( | const std::string & | name | ) |
Configure a component by loading the property file 'name.cpf' for component with name name.
name | The name of the component to configure. The file used will be 'name.cpf'. |
bool OCL::DeploymentComponent::configure | ( | const std::string & | name | ) |
Configure a component by loading the property file 'name.cpf' for component with name name.
name | The name of the component to configure. The file used will be 'name.cpf'. |
Definition at line 1786 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::configureComponents | ( | ) |
Configure the components with loaded configuration(s). This function connects components and data ports, reads properties for the components, attaches activities and loads program and state machine scripts. If a component XML entry has the AutoConf element, configure() will be called upon this component as well. If the configuration fails halfway, the system is configured as complete as possible. You can try to reconfigure by loading a new configuration (using loadConfiguration ) and call configureComponents again to resolve remaining issues.
This function tries to apply the configuration with a best effort. For example, if a program must be loaded in the component, and a program with that same name is already present, the present one is unloaded and the new one is attempted to be loaded. If that fails, the configuration process leaves the scripts as-is and proceeds with further configuration steps of the same component and other components.
The order of configuration depends on the order of components during loadConfiguration. The first encountered component is configured first. If additional loadConfiguration operations refer to the same component, the configuration order is not changed.
bool OCL::DeploymentComponent::configureComponents | ( | ) |
Configure the components with loaded configuration(s). This function connects components and data ports, reads properties for the components, attaches activities and loads program and state machine scripts. If a component XML entry has the AutoConf element, configure() will be called upon this component as well. If the configuration fails halfway, the system is configured as complete as possible. You can try to reconfigure by loading a new configuration (using loadConfiguration ) and call configureComponents again to resolve remaining issues.
This function tries to apply the configuration with a best effort. For example, if a program must be loaded in the component, and a program with that same name is already present, the present one is unloaded and the new one is attempted to be loaded. If that fails, the configuration process leaves the scripts as-is and proceeds with further configuration steps of the same component and other components.
The order of configuration depends on the order of components during loadConfiguration. The first encountered component is configured first. If additional loadConfiguration operations refer to the same component, the configuration order is not changed.
Definition at line 985 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::configureComponentsGroup | ( | const int | group | ) |
Configure the components in group group.
bool OCL::DeploymentComponent::configureComponentsGroup | ( | const int | group | ) |
Configure the components in group group.
Definition at line 996 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::configureFromFile | ( | const std::string & | name, | |
const std::string & | filename | |||
) |
Configure a component by loading a property file.
name | The name of the component to configure | |
filename | The filename where the configuration is in. |
bool OCL::DeploymentComponent::configureFromFile | ( | const std::string & | name, | |
const std::string & | filename | |||
) |
Configure a component by loading a property file.
name | The name of the component to configure | |
filename | The filename where the configuration is in. |
Definition at line 1791 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::configureHook | ( | ) | [protected] |
This function imports available plugins from the path formed by the expression
ComponentPath + "/rtt/"+ Target + "/plugins"
bool OCL::DeploymentComponent::configureHook | ( | ) | [protected] |
This function imports available plugins from the path formed by the expression
ComponentPath + "/rtt/"+ Target + "/plugins"
Definition at line 211 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::connect | ( | const std::string & | one, | |
const std::string & | other, | |||
ConnPolicy | policy | |||
) |
Connect two named ports of components. The direction of the connection is determined by the read/write port types.
one | A dot-separated path to a port in a service | |
other | A dot-separated path to a port in a service | |
policy | The connection policy of the new connetion. |
bool OCL::DeploymentComponent::connect | ( | const std::string & | one, | |
const std::string & | other, | |||
ConnPolicy | policy | |||
) |
Connect two named ports of components. The direction of the connection is determined by the read/write port types.
one | A dot-separated path to a port in a service | |
other | A dot-separated path to a port in a service | |
policy | The connection policy of the new connetion. |
Definition at line 412 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::connectPeers | ( | const std::string & | one, | |
const std::string & | other | |||
) |
Make two components peers in both directions, such that both can use each other's services.
one | The component that must 'see' other. | |
other | The component that must 'see' one. |
bool OCL::DeploymentComponent::connectPeers | ( | const std::string & | one, | |
const std::string & | other | |||
) |
Make two components peers in both directions, such that both can use each other's services.
one | The component that must 'see' other. | |
other | The component that must 'see' one. |
Definition at line 245 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::connectPorts | ( | const std::string & | one, | |
const std::string & | one_port, | |||
const std::string & | other, | |||
const std::string & | other_port | |||
) |
Connect two named ports of components. The direction of the connection is determined by the read/write port types.
one | Name of the first component or a dot-separated path to its service | |
one_port | Name of the port of the first component to connect to other_port | |
other | Name of the second component or a dot-separated path to its service | |
other_port | Name of the port of the second component to connect to one_port |
bool OCL::DeploymentComponent::connectPorts | ( | const std::string & | one, | |
const std::string & | other | |||
) |
Establish a data flow connection between two tasks. The direction of the connection is determined by the read/write port types.
one | The first component | |
other | The second component |
bool OCL::DeploymentComponent::connectPorts | ( | const std::string & | one, | |
const std::string & | one_port, | |||
const std::string & | other, | |||
const std::string & | other_port | |||
) |
Connect two named ports of components. The direction of the connection is determined by the read/write port types.
one | Name of the first component or a dot-separated path to its service | |
one_port | Name of the port of the first component to connect to other_port | |
other | Name of the second component or a dot-separated path to its service | |
other_port | Name of the port of the second component to connect to one_port |
Definition at line 359 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::connectPorts | ( | const std::string & | one, | |
const std::string & | other | |||
) |
Establish a data flow connection between two tasks. The direction of the connection is determined by the read/write port types.
one | The first component | |
other | The second component |
Definition at line 341 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::connectServices | ( | const std::string & | one, | |
const std::string & | other | |||
) |
Connects the required services of one component to the provided services of another and vice versa.
one | The name of a provided service or a dot-separated path to a Service | |
one | The name of a required service or a dot-separated path to a ServiceRequester |
bool OCL::DeploymentComponent::connectServices | ( | const std::string & | one, | |
const std::string & | other | |||
) |
Connects the required services of one component to the provided services of another and vice versa.
one | The name of a provided service or a dot-separated path to a Service | |
one | The name of a required service or a dot-separated path to a ServiceRequester |
Definition at line 448 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::createStream | ( | const std::string & | component, | |
const std::string & | port, | |||
ConnPolicy | policy | |||
) |
bool OCL::DeploymentComponent::createStream | ( | const std::string & | component, | |
const std::string & | port, | |||
ConnPolicy | policy | |||
) |
Definition at line 398 of file DeploymentComponent.cpp.
void OCL::DeploymentComponent::displayComponentTypes | ( | ) | const |
This function prints out the component types this DeploymentComponent can create.
void OCL::DeploymentComponent::displayComponentTypes | ( | ) | const |
This function prints out the component types this DeploymentComponent can create.
Definition at line 1610 of file DeploymentComponent.cpp.
std::vector<std::string> OCL::DeploymentComponent::getComponentTypes | ( | ) | const |
This function returns the component types this DeploymentComponent can create in a comma separated list.
std::vector< std::string > OCL::DeploymentComponent::getComponentTypes | ( | ) | const |
This function returns the component types this DeploymentComponent can create in a comma separated list.
Definition at line 1621 of file DeploymentComponent.cpp.
FactoryMap& OCL::DeploymentComponent::getFactories | ( | ) |
Returns the factory singleton which creates all types of components for the DeploymentComponent.
FactoryMap & OCL::DeploymentComponent::getFactories | ( | ) |
Returns the factory singleton which creates all types of components for the DeploymentComponent.
Definition at line 1808 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::import | ( | const std::string & | package | ) |
Import a component package or directory. The import statement searches through the component paths set with path() or set using the RTT_COMPONENT_PATH environment variable.
package | A (ros) package or directory name. All components, plugins and typekits in package will be loaded and become available to the application. As a special case, you may specify a path to a library directly, which will be loaded when found. |
bool OCL::DeploymentComponent::import | ( | const std::string & | package | ) |
Import a component package or directory. The import statement searches through the component paths set with path() or set using the RTT_COMPONENT_PATH environment variable.
package | A (ros) package or directory name. All components, plugins and typekits in package will be loaded and become available to the application. As a special case, you may specify a path to a library directly, which will be loaded when found. |
Definition at line 1461 of file DeploymentComponent.cpp.
void OCL::DeploymentComponent::kickOut | ( | const std::string & | config_file | ) |
Identical to kickOutAll, but it reads the name of the Components to kickOut from an XML file.
config_file | name of an XML file (probably the same used by loadComponents() or kickStart() ). |
void OCL::DeploymentComponent::kickOut | ( | const std::string & | config_file | ) |
Identical to kickOutAll, but it reads the name of the Components to kickOut from an XML file.
config_file | name of an XML file (probably the same used by loadComponents() or kickStart() ). |
Definition at line 1813 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::kickOutAll | ( | ) |
Stop, cleanup and unload all components loaded by the DeploymentComponent.
bool OCL::DeploymentComponent::kickOutAll | ( | ) |
Stop, cleanup and unload all components loaded by the DeploymentComponent.
Definition at line 511 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::kickOutComponent | ( | const std::string & | comp_name | ) |
Stop, cleanup and unload a single component which were loaded by this component.
comp_name | name of the component. |
bool OCL::DeploymentComponent::kickOutComponent | ( | const std::string & | comp_name | ) |
Stop, cleanup and unload a single component which were loaded by this component.
comp_name | name of the component. |
Definition at line 1882 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::kickOutGroup | ( | const int | group | ) |
Stop, cleanup and unload all components in group group.
bool OCL::DeploymentComponent::kickOutGroup | ( | const int | group | ) |
Stop, cleanup and unload all components in group group.
Definition at line 524 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::kickStart | ( | const std::string & | file_name | ) |
This function runs loadComponents, configureComponents and startComponents in a row, given no failures occur along the way.
bool OCL::DeploymentComponent::kickStart | ( | const std::string & | file_name | ) |
This function runs loadComponents, configureComponents and startComponents in a row, given no failures occur along the way.
Definition at line 490 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::loadComponent | ( | const std::string & | name, | |
const std::string & | type | |||
) |
Load a new component in the current process. It wil appear as a peer with name name of this component.
name | Name the new component will receive. | |
type | The type of the component. This is usually a library (.dll or .so) name. |
bool OCL::DeploymentComponent::loadComponent | ( | const std::string & | name, | |
const std::string & | type | |||
) |
Load a new component in the current process. It wil appear as a peer with name name of this component.
name | Name the new component will receive. | |
type | The type of the component. This is usually a library (.dll or .so) name. |
Definition at line 1496 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::loadComponents | ( | const std::string & | config_file | ) |
Load a (partial) application XML configuration from disk. The necessary components are located or loaded, but no component configuration is yet applied. One can load multiple configurations and call configureComponents() once to apply all settings. In case of duplicate information is the latest loaded configuration option used. The components are loaded into the next group number, and the next group number is incremented.
config_file | A file on local disk containing the XML configuration. |
bool OCL::DeploymentComponent::loadComponents | ( | const std::string & | config_file | ) |
Load a (partial) application XML configuration from disk. The necessary components are located or loaded, but no component configuration is yet applied. One can load multiple configurations and call configureComponents() once to apply all settings. In case of duplicate information is the latest loaded configuration option used. The components are loaded into the next group number, and the next group number is incremented.
config_file | A file on local disk containing the XML configuration. |
Definition at line 550 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::loadComponentsInGroup | ( | const std::string & | config_file, | |
const int | group | |||
) |
Load a (partial) application XML configuration from disk into a specific group.
If the group already exists, then adds to that group. Does not affect existing members of the group.
config_file | A file on local disk containing the XML configuration. | |
group | The group number to load into |
bool OCL::DeploymentComponent::loadComponentsInGroup | ( | const std::string & | config_file, | |
const int | group | |||
) |
Load a (partial) application XML configuration from disk into a specific group.
If the group already exists, then adds to that group. Does not affect existing members of the group.
config_file | A file on local disk containing the XML configuration. | |
group | The group number to load into |
Definition at line 557 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::loadConfiguration | ( | const std::string & | config_file | ) |
Load a (partial) application XML configuration from disk. The necessary components are located or loaded, but no component configuration is yet applied. One can load multiple configurations and call configureComponents() once to apply all settings. In case of duplicate information is the latest loaded configuration option used.
config_file | A file on local disk containing the XML configuration. |
bool OCL::DeploymentComponent::loadConfiguration | ( | const std::string & | config_file | ) |
Load a (partial) application XML configuration from disk. The necessary components are located or loaded, but no component configuration is yet applied. One can load multiple configurations and call configureComponents() once to apply all settings. In case of duplicate information is the latest loaded configuration option used.
config_file | A file on local disk containing the XML configuration. |
Definition at line 545 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::loadConfigurationString | ( | const std::string & | config_text | ) |
Identical to loadConfiguration, but reads the XML from a string instead of a file.
config_text | A string containing the XML configuration. |
bool OCL::DeploymentComponent::loadConfigurationString | ( | const std::string & | config_text | ) |
Identical to loadConfiguration, but reads the XML from a string instead of a file.
config_text | A string containing the XML configuration. |
Definition at line 476 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::loadLibrary | ( | const std::string & | name | ) |
Use this command to load a dynamic library into the memory of the current process.
name | an absolute or relative path to a loadable library. |
bool OCL::DeploymentComponent::loadLibrary | ( | const std::string & | name | ) |
Use this command to load a dynamic library into the memory of the current process.
name | an absolute or relative path to a loadable library. |
Definition at line 1474 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::loadService | ( | const std::string & | component, | |
const std::string & | service | |||
) |
Loads a service in the given component. If a service with the name of service is already loaded, does nothing and returns true.
component | A peer of this component. | |
service | A service discovered by the PluginLoader which will be loaded into component. |
bool OCL::DeploymentComponent::loadService | ( | const std::string & | component, | |
const std::string & | service | |||
) |
Loads a service in the given component. If a service with the name of service is already loaded, does nothing and returns true.
component | A peer of this component. | |
service | A service discovered by the PluginLoader which will be loaded into component. |
Definition at line 1480 of file DeploymentComponent.cpp.
RTT::TaskContext* OCL::DeploymentComponent::myGetPeer | ( | std::string | name | ) | [inline] |
Definition at line 251 of file install/include/orocos/ocl/DeploymentComponent.hpp.
RTT::TaskContext* OCL::DeploymentComponent::myGetPeer | ( | std::string | name | ) | [inline] |
Definition at line 251 of file deployment/DeploymentComponent.hpp.
void OCL::DeploymentComponent::path | ( | const std::string & | path | ) |
Add an additional path to search for component packages.
a | colon or semi-colon separated list of directories to search for. Typically, paths have the form prefix1/lib/orocos:prefix2/lib/orocos etc. |
void OCL::DeploymentComponent::path | ( | const std::string & | path | ) |
Add an additional path to search for component packages.
a | colon or semi-colon separated list of directories to search for. Typically, paths have the form prefix1/lib/orocos:prefix2/lib/orocos etc. |
Definition at line 1467 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::runScript | ( | const std::string & | file_name | ) |
Scripting-alternative to kickStart: runs this script in the Orocos scripting service.
bool OCL::DeploymentComponent::runScript | ( | const std::string & | file_name | ) |
Scripting-alternative to kickStart: runs this script in the Orocos scripting service.
Definition at line 485 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::setActivity | ( | const std::string & | comp_name, | |
double | period, | |||
int | priority, | |||
int | scheduler | |||
) |
(Re-)set the activity of a component with an activity.
comp_name | The name of the component to change. | |
period | The period of the activity (or 0.0 if non periodic). | |
priority | The scheduler priority (OS dependent). | |
scheduler | The scheduler type ORO_SCHED_RT or ORO_SCHED_OTHER. |
bool OCL::DeploymentComponent::setActivity | ( | const std::string & | comp_name, | |
double | period, | |||
int | priority, | |||
int | scheduler | |||
) |
(Re-)set the activity of a component with an activity.
comp_name | The name of the component to change. | |
period | The period of the activity (or 0.0 if non periodic). | |
priority | The scheduler priority (OS dependent). | |
scheduler | The scheduler type ORO_SCHED_RT or ORO_SCHED_OTHER. |
Definition at line 1631 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::setMasterSlaveActivity | ( | const std::string & | comp_name, | |
const std::string & | master_name | |||
) |
(Re-)set the activity of a component with a slave activity with master.
comp_name | The name of the component to change. | |
master_name | The name of the master component. |
bool OCL::DeploymentComponent::setMasterSlaveActivity | ( | const std::string & | comp_name, | |
const std::string & | master_name | |||
) |
(Re-)set the activity of a component with a slave activity with master.
comp_name | The name of the component to change. | |
master_name | The name of the master component. |
Definition at line 1684 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::setNamedActivity | ( | const std::string & | comp_name, | |
const std::string & | act_type, | |||
double | period, | |||
int | priority, | |||
int | scheduler, | |||
const std::string & | master_name = "" | |||
) |
(Re-)set the activity of a component.
comp_name | The name of the component to change. | |
act_type | The RTT::Activity type: 'Activity', 'PeriodicActivity', 'SequentialActivity' or 'SlaveActivity'. | |
priority | The scheduler priority (OS dependent). | |
period | The period of the activity. | |
scheduler | The scheduler type ORO_SCHED_RT or ORO_SCHED_OTHER. | |
master_name | The name of the master component in case of a extras::SlaveActivity with a master. |
bool OCL::DeploymentComponent::setNamedActivity | ( | const std::string & | comp_name, | |
const std::string & | act_type, | |||
double | period, | |||
int | priority, | |||
int | scheduler, | |||
const std::string & | master_name = "" | |||
) |
(Re-)set the activity of a component.
comp_name | The name of the component to change. | |
act_type | The RTT::Activity type: 'Activity', 'PeriodicActivity', 'SequentialActivity' or 'SlaveActivity'. | |
priority | The scheduler priority (OS dependent). | |
period | The period of the activity. | |
scheduler | The scheduler type ORO_SCHED_RT or ORO_SCHED_OTHER. | |
master_name | The name of the master component in case of a extras::SlaveActivity with a master. |
Definition at line 1698 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::setPeriodicActivity | ( | const std::string & | comp_name, | |
double | period, | |||
int | priority, | |||
int | scheduler | |||
) |
(Re-)set the activity of a component with a periodic activity.
comp_name | The name of the component to change. | |
period | The period of the activity. | |
priority | The scheduler priority (OS dependent). | |
scheduler | The scheduler type ORO_SCHED_RT or ORO_SCHED_OTHER. |
bool OCL::DeploymentComponent::setPeriodicActivity | ( | const std::string & | comp_name, | |
double | period, | |||
int | priority, | |||
int | scheduler | |||
) |
(Re-)set the activity of a component with a periodic activity.
comp_name | The name of the component to change. | |
period | The period of the activity. | |
priority | The scheduler priority (OS dependent). | |
scheduler | The scheduler type ORO_SCHED_RT or ORO_SCHED_OTHER. |
Definition at line 1645 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::setSequentialActivity | ( | const std::string & | comp_name | ) |
(Re-)set the activity of a component with a (threadless, reactive) sequential activity.
comp_name | The name of the component to change. |
bool OCL::DeploymentComponent::setSequentialActivity | ( | const std::string & | comp_name | ) |
(Re-)set the activity of a component with a (threadless, reactive) sequential activity.
comp_name | The name of the component to change. |
Definition at line 1672 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::setSlaveActivity | ( | const std::string & | comp_name, | |
double | period | |||
) |
(Re-)set the activity of a component with a (stand alone) slave activity.
comp_name | The name of the component to change. | |
period | The period of the activity. |
bool OCL::DeploymentComponent::setSlaveActivity | ( | const std::string & | comp_name, | |
double | period | |||
) |
(Re-)set the activity of a component with a (stand alone) slave activity.
comp_name | The name of the component to change. | |
period | The period of the activity. |
Definition at line 1659 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::startComponents | ( | ) |
Start all components in the current configuration which have AutoStart set to true.
bool OCL::DeploymentComponent::startComponents | ( | ) |
Start all components in the current configuration which have AutoStart set to true.
Definition at line 1268 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::startComponentsGroup | ( | const int | group | ) |
Start all components in group group which have AutoStart set to true.
bool OCL::DeploymentComponent::startComponentsGroup | ( | const int | group | ) |
Start all components in group group which have AutoStart set to true.
Definition at line 1278 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::stopComponent | ( | const std::string & | comp_name | ) | [inline] |
Stop a single loaded and running components.
comp_name | name of the component. |
Definition at line 748 of file install/include/orocos/ocl/DeploymentComponent.hpp.
bool OCL::DeploymentComponent::stopComponent | ( | RTT::TaskContext * | instance | ) |
Stop a single loaded and running component.
instance | instance pointer of the component. |
bool OCL::DeploymentComponent::stopComponent | ( | const std::string & | comp_name | ) | [inline] |
Stop a single loaded and running components.
comp_name | name of the component. |
Definition at line 748 of file deployment/DeploymentComponent.hpp.
bool OCL::DeploymentComponent::stopComponent | ( | RTT::TaskContext * | instance | ) |
Stop a single loaded and running component.
instance | instance pointer of the component. |
Definition at line 1863 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::stopComponents | ( | ) |
Stop all loaded and running components.
bool OCL::DeploymentComponent::stopComponents | ( | ) |
Stop all loaded and running components.
Definition at line 1331 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::stopComponentsGroup | ( | const int | group | ) |
Stop all loaded and running components in group group.
group | The group number to stop |
bool OCL::DeploymentComponent::stopComponentsGroup | ( | const int | group | ) |
Stop all loaded and running components in group group.
group | The group number to stop |
Definition at line 1341 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::stream | ( | const std::string & | port, | |
ConnPolicy | policy | |||
) |
Creates a stream from a given port of a component.
port | The dot-separated path to an input or output port of component or service. | |
policy | The connection policy that instructs how to set up the stream. The policy.transport field is mandatory, the policy.name_id field is highly recommended. |
bool OCL::DeploymentComponent::stream | ( | const std::string & | port, | |
ConnPolicy | policy | |||
) |
Creates a stream from a given port of a component.
port | The dot-separated path to an input or output port of component or service. | |
policy | The connection policy that instructs how to set up the stream. The policy.transport field is mandatory, the policy.name_id field is highly recommended. |
Definition at line 439 of file DeploymentComponent.cpp.
base::PortInterface* OCL::DeploymentComponent::stringToPort | ( | string const & | names | ) | [protected] |
Converts a dot-separated path to a service to a Port object.
name | a dot-separated path name to a port. The first part of the name must be the component name. Example: "Controller.arm.input". |
base::PortInterface * OCL::DeploymentComponent::stringToPort | ( | string const & | names | ) | [protected] |
Converts a dot-separated path to a service to a Port object.
name | a dot-separated path name to a port. The first part of the name must be the component name. Example: "Controller.arm.input". |
Definition at line 306 of file DeploymentComponent.cpp.
Service::shared_ptr OCL::DeploymentComponent::stringToService | ( | string const & | names | ) | [protected] |
Converts a dot-separated path to a service to a Service object.
name | a dot-separated path name to a service. The first part of the name must be the component name. For example 'Controller.arm'. |
Service::shared_ptr OCL::DeploymentComponent::stringToService | ( | string const & | names | ) | [protected] |
Converts a dot-separated path to a service to a Service object.
name | a dot-separated path name to a service. The first part of the name must be the component name. For example 'Controller.arm'. |
Definition at line 277 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::unloadComponent | ( | const std::string & | name | ) |
Unload a loaded component from the current process. It may not be running.
name | The name of a component loaded with loadComponent(). |
bool OCL::DeploymentComponent::unloadComponent | ( | const std::string & | name | ) |
Unload a loaded component from the current process. It may not be running.
name | The name of a component loaded with loadComponent(). |
Definition at line 1591 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::unloadComponentImpl | ( | CompList::iterator | cit | ) | [protected] |
This method removes all references to the component hold in cit, on the condition that it is not running.
bool OCL::DeploymentComponent::unloadComponentImpl | ( | CompList::iterator | cit | ) | [protected] |
This method removes all references to the component hold in cit, on the condition that it is not running.
Definition at line 1537 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::unloadComponents | ( | ) |
Unload all loaded and not running components.
bool OCL::DeploymentComponent::unloadComponents | ( | ) |
Unload all loaded and not running components.
Definition at line 1418 of file DeploymentComponent.cpp.
bool OCL::DeploymentComponent::unloadComponentsGroup | ( | const int | group | ) |
Unload all loaded and not running components in group group
group | The group number to unload |
bool OCL::DeploymentComponent::unloadComponentsGroup | ( | const int | group | ) |
Unload all loaded and not running components in group group
group | The group number to unload |
Definition at line 1428 of file DeploymentComponent.cpp.
RTT::Property< bool > OCL::DeploymentComponent::autoUnload [protected] |
Definition at line 96 of file deployment/DeploymentComponent.hpp.
std::string OCL::DeploymentComponent::compPath [protected] |
Definition at line 95 of file deployment/DeploymentComponent.hpp.
CompList OCL::DeploymentComponent::comps [protected] |
Definition at line 170 of file deployment/DeploymentComponent.hpp.
ConMap OCL::DeploymentComponent::conmap [protected] |
Definition at line 164 of file deployment/DeploymentComponent.hpp.
RTT::Constant< int > OCL::DeploymentComponent::highest_Priority [protected] |
Definition at line 101 of file deployment/DeploymentComponent.hpp.
RTT::Constant< int > OCL::DeploymentComponent::lowest_Priority [protected] |
Definition at line 100 of file deployment/DeploymentComponent.hpp.
int OCL::DeploymentComponent::nextGroup [protected] |
Next group number.
Definition at line 104 of file deployment/DeploymentComponent.hpp.
RTT::PropertyBag OCL::DeploymentComponent::root [protected] |
This bag stores the current configuration. It is the cumulation of all loadConfiguration() calls.
Definition at line 94 of file deployment/DeploymentComponent.hpp.
RTT::Constant< int > OCL::DeploymentComponent::sched_OTHER [protected] |
Definition at line 99 of file deployment/DeploymentComponent.hpp.
RTT::Constant< int > OCL::DeploymentComponent::sched_RT [protected] |
Definition at line 98 of file deployment/DeploymentComponent.hpp.
RTT::Attribute< std::string > OCL::DeploymentComponent::target [protected] |
Definition at line 102 of file deployment/DeploymentComponent.hpp.
RTT::Attribute< bool > OCL::DeploymentComponent::validConfig [protected] |
Definition at line 97 of file deployment/DeploymentComponent.hpp.