ConnectionFactory Class Template Reference

#include <rtt/ConnectionFactory.hpp>

List of all members.


Detailed Description

template<class T>
class RTT::ConnectionFactory< T >

Builds Connections (buffers or data objects) between the ports of tasks.

Parameters:
T The contents type of the buffers or data objects.

Definition at line 58 of file ConnectionFactory.hpp.


Public Member Functions

BufferConnectionInterface
< T > * 
createBuffer (PortInterface *writer, PortInterface *reader, int size, const T &initial_value=T(), ConnectionTypes::ConnectionType type=ConnectionTypes::lockfree)
 Create a new Buffered data connection.
BufferConnectionInterface
< T > * 
createBuffer (int size, const T &initial_value=T(), ConnectionTypes::ConnectionType type=ConnectionTypes::lockfree)
 Create an empty Buffered data connection.
DataConnectionInterface
< T > * 
createDataObject (PortInterface *writer, PortInterface *reader, const T &initial_value=T(), ConnectionTypes::ConnectionType type=ConnectionTypes::lockfree)
 Create a new unbuffered data connection.
DataConnectionInterface
< T > * 
createDataObject (const T &initial_value=T(), ConnectionTypes::ConnectionType type=ConnectionTypes::lockfree)
 Create an empty unbuffered data connection.

Member Function Documentation

BufferConnectionInterface< T > * createBuffer ( PortInterface writer,
PortInterface reader,
int  size,
const T &  initial_value = T(),
ConnectionTypes::ConnectionType  type = ConnectionTypes::lockfree 
) [inline]

Create a new Buffered data connection.

Parameters:
writer A port which will write to the connection
reader A port which will read from the connection
size The maximum capacity of the connnection's buffer
initial_value The initial value of all elements within the buffer. Use this parameter if the data uses dynamic memory or requires an initial state.
type The connection type: lock based or lock-free. The latter is highly advised.
Returns:
a new connection object
See also:
BufferInterface for a look at the internal buffer structure

ReadBufferPort, WriteBufferPort, BufferPort for ports to which this connection can be attached.

Definition at line 147 of file ConnectionFactory.hpp.

References ConnectionInterface::addReader(), ConnectionInterface::addWriter(), TypeTransporter::bufferProxy(), WriteBufferPort::connection(), Logger::Debug, Logger::endl(), RTT::Error, PortInterface::getName(), TypeInfo::getProtocol(), PortInterface::getTypeInfo(), Logger::log(), PortInterface::serverProtocol(), and Logger::Warning.

Referenced by WriteBufferPort::createConnection().

BufferConnectionInterface< T > * createBuffer ( int  size,
const T &  initial_value = T(),
ConnectionTypes::ConnectionType  type = ConnectionTypes::lockfree 
) [inline]

Create an empty Buffered data connection.

Parameters:
size The maximum capacity of the connnection's buffer
initial_value The initial value of all elements within the buffer. Use this parameter if the data uses dynamic memory or requires an initial state.
type The connection type: lock based or lock-free. The latter is highly advised.
Returns:
a new connection object
See also:
BufferInterface for a look at the internal buffer structure

ReadBufferPort, WriteBufferPort, BufferPort for ports to which this connection can be attached.

Definition at line 205 of file ConnectionFactory.hpp.

References ConnectionTypes::locked, and ConnectionTypes::lockfree.

DataConnectionInterface< T > * createDataObject ( PortInterface writer,
PortInterface reader,
const T &  initial_value = T(),
ConnectionTypes::ConnectionType  type = ConnectionTypes::lockfree 
) [inline]

Create a new unbuffered data connection.

Parameters:
writer A port which will write to the connection
reader A port which will read from the connection
initial_value The initial value of all elements within the buffer. Use this parameter if the data uses dynamic memory or requires an initial state.
type The connection type: lock based or lock-free. The latter is highly advised.
Returns:
a new connection object
See also:
DataObjectInterface for a look at the internal data sharing structure

ReadDataPort, WriteDataPort for ports to which this connection can be attached.

Definition at line 216 of file ConnectionFactory.hpp.

References ConnectionInterface::addReader(), ConnectionInterface::addWriter(), WriteDataPort::connection(), TypeTransporter::dataProxy(), Logger::Debug, Logger::endl(), RTT::Error, PortInterface::getName(), TypeInfo::getProtocol(), PortInterface::getTypeInfo(), Logger::log(), Logger::nl(), PortInterface::serverProtocol(), and Logger::Warning.

Referenced by WriteDataPort::createConnection().

DataConnectionInterface< T > * createDataObject ( const T &  initial_value = T(),
ConnectionTypes::ConnectionType  type = ConnectionTypes::lockfree 
) [inline]

Create an empty unbuffered data connection.

Parameters:
initial_value The initial value of all elements within the buffer. Use this parameter if the data uses dynamic memory or requires an initial state.
type The connection type: lock based or lock-free. The latter is highly advised.
Returns:
a new connection object
See also:
DataObjectInterface for a look at the internal data sharing structure

ReadDataPort, WriteDataPort for ports to which this connection can be attached.

Definition at line 275 of file ConnectionFactory.hpp.

References ConnectionTypes::locked, and ConnectionTypes::lockfree.


The documentation for this class was generated from the following file:
Generated on Tue Mar 25 17:41:54 2008 for OrocosReal-TimeToolkit by  doxygen 1.5.3