RTT::ConnectionC Class Reference

A user friendly callback connection to an event of a TaskContext. More...

#include <rtt/ConnectionC.hpp>

List of all members.

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.
ConnectionCoperator= (const ConnectionC &other)
 A ConnectionC is assignable;.
bool ready () const
 Check if this connection is initialised and ready.
template<class Type , class Function >
ConnectionCcallback (Type t, Function foo)
 Add a Synchronous callback to an object's member function.
template<class Type , class Function >
ConnectionCcallback (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 >
ConnectionCcallback (Function foo)
 Add a Synchronous callback to a 'C' function.
template<class Function >
ConnectionCcallback (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.

Detailed Description

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.

See also:
EventService

Definition at line 65 of file ConnectionC.hpp.


Constructor & Destructor Documentation

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.

See also:
EventService

Member Function Documentation

template<class Function >
ConnectionC& RTT::ConnectionC::callback ( Function  foo,
EventProcessor ep,
EventProcessor::AsynStorageType  s_type = EventProcessor::OnlyFirst 
) [inline]

Add an Asynchronous callback to a 'C' function.

Parameters:
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.

template<class Function >
ConnectionC& RTT::ConnectionC::callback ( Function  foo  )  [inline]

Add a Synchronous callback to a 'C' function.

Parameters:
foo A 'C' function to call back when the event is emitted.

Definition at line 139 of file ConnectionC.hpp.

template<class Type , class Function >
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.

Parameters:
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.

template<class Type , class Function >
ConnectionC& RTT::ConnectionC::callback ( Type  t,
Function  foo 
) [inline]

Add a Synchronous callback to an object's member function.

Parameters:
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 (  ) 

Get a Handle to the created connections.

After handle() is called, new callbacks may be added, upon which a new handle will be returned.

Returns:
An empty handle if no callback was added.

The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:40 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3