Orocos Real-Time Toolkit  2.8.3
Namespaces | Functions
Plugin.hpp File Reference

This file defines the Orocos plugin API. More...

#include <string>
#include "../rtt-config.h"

Go to the source code of this file.

Namespaces

 RTT
 Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
 

Functions

RTT_EXPORT bool loadRTTPlugin (RTT::TaskContext *t)
 Instructs this plugin to load itself into the process or a component. More...
 
RTT_EXPORT std::string getRTTPluginName ()
 Return the unique name of this plugin. More...
 
RTT_EXPORT std::string getRTTTargetName ()
 Returns the target name for which this plugin was built. More...
 

Detailed Description

This file defines the Orocos plugin API.

A plugin is a dynamic library which has a unique name and can be loaded in a running process. In case the loading is done in an Orocos TaskContext, the plugin is notified of the TaskContext. A plugin can reject to load in a process, in which case the library will be unloaded from the process again. Once loaded, a plugin remains in the current process until the process exits.

Definition in file Plugin.hpp.

Function Documentation

RTT_EXPORT std::string getRTTPluginName ( )

Return the unique name of this plugin.

No two plugins with the same name will be allowed to live in a single process.

RTT_EXPORT std::string getRTTTargetName ( )

Returns the target name for which this plugin was built.

Returns
The name as set by OROCOS_TARGET. When the empty string is returned, it is assumed that the loadRTTPlugin function will check if this plugin may be loaded or not.
RTT_EXPORT bool loadRTTPlugin ( RTT::TaskContext t)

Instructs this plugin to load itself into the process or a component.

This function will first be called with t being equal to zero, giving the plugin the opportunity to load something in the whole process. Implement in this function any startup code your plugin requires. This function should not throw.

Parameters
tThe optional TaskContext which is loading this plugin. Is zero when the plugin is loaded into the process, non-zero when loaded in a TaskContext. A plugin may choose to load only in the process and not in a TaskContext (typekits for example). If a plugin only wants to load in a TaskContext, it must return true when t is zero, such that the plugin remains loaded in the process.
Returns
true if the loading succeeded, false otherwise.