A user friendly callback connection to an event of a TaskContext. More...
#include <rtt/ConnectionC.hpp>
Public Member Functions | |
| ConnectionC () | |
| The default constructor. | |
| ConnectionC (const EventService *gcf, const std::string &name) | |
| The constructor. | |
| ConnectionC (const ConnectionC &other) | |
| A ConnectionC is copyable by value. | |
| ConnectionC & | operator= (const ConnectionC &other) |
| A ConnectionC is assignable;. | |
| bool | ready () const |
| Check if this connection is initialised and ready. | |
| template<class Type , class Function > | |
| ConnectionC & | callback (Type t, Function foo) |
| Add a Synchronous callback to an object's member function. | |
| template<class Type , class Function > | |
| ConnectionC & | callback (Type t, Function foo, EventProcessor *ep, EventProcessor::AsynStorageType s_type=EventProcessor::OnlyFirst) |
| Add an Asynchronous callback to an object's member function. | |
| template<class Function > | |
| ConnectionC & | callback (Function foo) |
| Add a Synchronous callback to a 'C' function. | |
| template<class Function > | |
| ConnectionC & | callback (Function foo, EventProcessor *ep, EventProcessor::AsynStorageType s_type=EventProcessor::OnlyFirst) |
| Add an Asynchronous callback to a 'C' function. | |
| Handle | handle () |
| Get a Handle to the created connections. | |
A user friendly callback connection to an event of a TaskContext.
At most one synchronous and one asynchronous callback() can be added to a ConnectionC object. The returned handle() connects or disconnects the added callbacks.
Use the EventService to create ConnectionC objects.
Definition at line 65 of file ConnectionC.hpp.
| RTT::ConnectionC::ConnectionC | ( | ) |
The default constructor.
Assign it from a copy from another ConnectionC object in order to make it usable.
| RTT::ConnectionC::ConnectionC | ( | const EventService * | gcf, | |
| const std::string & | name | |||
| ) |
The constructor.
| ConnectionC& RTT::ConnectionC::callback | ( | Function | foo, | |
| EventProcessor * | ep, | |||
| EventProcessor::AsynStorageType | s_type = EventProcessor::OnlyFirst | |||
| ) | [inline] |
Add an Asynchronous callback to a 'C' function.
| foo | A 'C' function to call back when the event is emitted. | |
| ep | The EventProcessor which will execute the callback 'foo'. | |
| s_type | The method used when event overruns happen. By default, only the first event is propagated to the callbacks. |
Definition at line 152 of file ConnectionC.hpp.
| ConnectionC& RTT::ConnectionC::callback | ( | Function | foo | ) | [inline] |
Add a Synchronous callback to a 'C' function.
| foo | A 'C' function to call back when the event is emitted. |
Definition at line 139 of file ConnectionC.hpp.
| ConnectionC& RTT::ConnectionC::callback | ( | Type | t, | |
| Function | foo, | |||
| EventProcessor * | ep, | |||
| EventProcessor::AsynStorageType | s_type = EventProcessor::OnlyFirst | |||
| ) | [inline] |
Add an Asynchronous callback to an object's member function.
| t | A pointer to the object upon which the function must be invoked. | |
| foo | The object's member function which is called back, for example '&X::my_function' | |
| ep | The EventProcessor which will execute the callback 'foo'. | |
| s_type | The method used when event overruns happen. By default, only the first event is propagated to the callbacks. |
Definition at line 127 of file ConnectionC.hpp.
| ConnectionC& RTT::ConnectionC::callback | ( | Type | t, | |
| Function | foo | |||
| ) | [inline] |
Add a Synchronous callback to an object's member function.
| t | A pointer to the object upon which the function must be invoked. | |
| foo | The object's member function which is called back, for example '&X::my_function' |
Definition at line 113 of file ConnectionC.hpp.
| Handle RTT::ConnectionC::handle | ( | ) |
1.6.3