$search

RTT::internal::ConnFactory Class Reference

#include <ConnFactory.hpp>

Inheritance diagram for RTT::internal::ConnFactory:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual
base::ChannelElementBase::shared_ptr 
buildChannelInput (base::OutputPortInterface &port) const =0
virtual
base::ChannelElementBase::shared_ptr 
buildChannelOutput (base::InputPortInterface &port) const =0
virtual
base::ChannelElementBase::shared_ptr 
buildDataStorage (ConnPolicy const &policy) const =0
virtual base::InputPortInterfaceinputPort (std::string const &name) const =0
virtual base::OutputPortInterfaceoutputPort (std::string const &name) const =0
virtual ~ConnFactory ()

Static Public Member Functions

template<typename T >
static
base::ChannelElementBase::shared_ptr 
buildBufferedChannelInput (OutputPort< T > &port, ConnID *conn_id, ConnPolicy const &policy, base::ChannelElementBase::shared_ptr output_channel)
template<typename T >
static
base::ChannelElementBase::shared_ptr 
buildBufferedChannelOutput (InputPort< T > &port, ConnID *conn_id, ConnPolicy const &policy, T const &initial_value=T())
template<typename T >
static
base::ChannelElementBase::shared_ptr 
buildChannelInput (OutputPort< T > &port, ConnID *conn_id, base::ChannelElementBase::shared_ptr output_channel)
template<typename T >
static
base::ChannelElementBase::shared_ptr 
buildChannelOutput (InputPort< T > &port, ConnID *conn_id)
template<typename T >
static base::ChannelElementBasebuildDataStorage (ConnPolicy const &policy, const T &initial_value=T())
static bool createAndCheckStream (base::OutputPortInterface &output_port, ConnPolicy const &policy, base::ChannelElementBase::shared_ptr chan, StreamConnID *conn_id)
template<typename T >
static bool createConnection (OutputPort< T > &output_port, base::InputPortInterface &input_port, ConnPolicy const &policy)
template<class T >
static bool createStream (InputPort< T > &input_port, ConnPolicy const &policy)
template<class T >
static bool createStream (OutputPort< T > &output_port, ConnPolicy const &policy)

Static Protected Member Functions

static bool createAndCheckConnection (base::OutputPortInterface &output_port, base::InputPortInterface &input_port, base::ChannelElementBase::shared_ptr channel_input, ConnPolicy policy)
static
base::ChannelElementBase::shared_ptr 
createAndCheckOutOfBandConnection (base::OutputPortInterface &output_port, base::InputPortInterface &input_port, ConnPolicy const &policy, base::ChannelElementBase::shared_ptr output_half, StreamConnID *conn_id)
static bool createAndCheckStream (base::InputPortInterface &input_port, ConnPolicy const &policy, base::ChannelElementBase::shared_ptr outhalf, StreamConnID *conn_id)
template<class T >
static
base::ChannelElementBase::shared_ptr 
createOutOfBandConnection (OutputPort< T > &output_port, InputPort< T > &input_port, ConnPolicy const &policy)
static
base::ChannelElementBase::shared_ptr 
createRemoteConnection (base::OutputPortInterface &output_port, base::InputPortInterface &input_port, ConnPolicy const &policy)

Detailed Description

This class provides the basic tools to create channels that represent connections between two ports.

The ports and type transports use these functions to setup connections. The interface may change as the needs of these 'users' change.

Definition at line 88 of file ConnFactory.hpp.


Constructor & Destructor Documentation

virtual RTT::internal::ConnFactory::~ConnFactory (  )  [inline, virtual]

Definition at line 91 of file ConnFactory.hpp.


Member Function Documentation

template<typename T >
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildBufferedChannelInput ( OutputPort< T > &  port,
ConnID conn_id,
ConnPolicy const &  policy,
base::ChannelElementBase::shared_ptr  output_channel 
) [inline, static]

Extended version of buildChannelInput that also installs a buffer after the channel input endpoint, according to a policy.

Parameters:
port The output port to which the connection will be added by client code.
conn_id A unique connection id which identifies this connection
policy The policy dictating which kind of buffer must be installed. The transport and other parameters are ignored.
output_channel Optional. If present, the buffer will be connected to this element.

Definition at line 216 of file ConnFactory.hpp.

template<typename T >
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildBufferedChannelOutput ( InputPort< T > &  port,
ConnID conn_id,
ConnPolicy const &  policy,
T const &  initial_value = T() 
) [inline, static]

Extended version of buildChannelOutput that also installs a buffer before the channel output endpoint, according to a policy.

Parameters:
port The input port to which the connection is added.
conn_id A unique connection id which identifies this connection
policy The policy dictating which kind of buffer must be installed. The transport and other parameters are ignored.
initial_value The value to use to initialize the connection's storage buffer.

Definition at line 252 of file ConnFactory.hpp.

template<typename T >
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildChannelInput ( OutputPort< T > &  port,
ConnID conn_id,
base::ChannelElementBase::shared_ptr  output_channel 
) [inline, static]

During the process of building a connection between two ports, this method builds the input half (starting from the OutputPort).

The output_channel argument is the connection element that has been returned by buildChannelOutput.

See also:
buildChannelOutput

Definition at line 196 of file ConnFactory.hpp.

virtual base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildChannelInput ( base::OutputPortInterface port  )  const [pure virtual]

Creates the input endpoint (starting point) of a communication channel and adds it to an OutputPort.

Parameters:
port The output port to connect the channel's input end to.
Returns:
The created endpoint.

Implemented in RTT::types::TemplateConnFactory< T >, RTT::types::TemplateConnFactory< rt_string >, RTT::types::TemplateConnFactory< std::string >, RTT::types::TemplateConnFactory< std::vector< T > >, RTT::types::TemplateConnFactory< std::vector< double > >, and RTT::types::TemplateConnFactory< bool >.

template<typename T >
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildChannelOutput ( InputPort< T > &  port,
ConnID conn_id 
) [inline, static]

During the process of building a connection between two ports, this method builds the output part of the channel, that is the half that is connected to the input port. The returned value is the connection element that should be connected to the end of the input-half.

See also:
buildChannelInput

Definition at line 235 of file ConnFactory.hpp.

virtual base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildChannelOutput ( base::InputPortInterface port  )  const [pure virtual]

Creates the output endpoint of a communication channel and adds it to an InputPort.

Parameters:
port The input port to connect the channel's output end to.
Returns:
The created endpoint.

Implemented in RTT::types::TemplateConnFactory< T >, RTT::types::TemplateConnFactory< rt_string >, RTT::types::TemplateConnFactory< std::string >, RTT::types::TemplateConnFactory< std::vector< T > >, RTT::types::TemplateConnFactory< std::vector< double > >, and RTT::types::TemplateConnFactory< bool >.

template<typename T >
static base::ChannelElementBase* RTT::internal::ConnFactory::buildDataStorage ( ConnPolicy const &  policy,
const T &  initial_value = T() 
) [inline, static]

This method creates the connection element that will store data inside the connection, based on the given policy

Todo:

: shouldn't this belong in the template type info ? This allows the type lib to choose which locked/lockfree algorithms are implemented and leaves out 4x code generation for each alternative in each compilation unit. Contra: needs T in typelib.

: since setDataSample, initial_value is no longer needed.

Definition at line 136 of file ConnFactory.hpp.

virtual base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildDataStorage ( ConnPolicy const &  policy  )  const [pure virtual]

Creates single data or buffered storage for this type.

Parameters:
policy Describes the kind of storage requested by the user
Returns:
a storage element.

Implemented in RTT::types::TemplateConnFactory< T >, RTT::types::TemplateConnFactory< rt_string >, RTT::types::TemplateConnFactory< std::string >, RTT::types::TemplateConnFactory< std::vector< T > >, RTT::types::TemplateConnFactory< std::vector< double > >, and RTT::types::TemplateConnFactory< bool >.

bool ConnFactory::createAndCheckConnection ( base::OutputPortInterface output_port,
base::InputPortInterface input_port,
base::ChannelElementBase::shared_ptr  channel_input,
ConnPolicy  policy 
) [static, protected]

Definition at line 100 of file ConnFactory.cpp.

base::ChannelElementBase::shared_ptr ConnFactory::createAndCheckOutOfBandConnection ( base::OutputPortInterface output_port,
base::InputPortInterface input_port,
ConnPolicy const &  policy,
base::ChannelElementBase::shared_ptr  output_half,
StreamConnID conn_id 
) [static, protected]

Definition at line 197 of file ConnFactory.cpp.

bool ConnFactory::createAndCheckStream ( base::InputPortInterface input_port,
ConnPolicy const &  policy,
base::ChannelElementBase::shared_ptr  outhalf,
StreamConnID conn_id 
) [static, protected]

Definition at line 157 of file ConnFactory.cpp.

bool ConnFactory::createAndCheckStream ( base::OutputPortInterface output_port,
ConnPolicy const &  policy,
base::ChannelElementBase::shared_ptr  chan,
StreamConnID conn_id 
) [static]
Warning:
This helper function will be moved to the protected: scope in the next major release

Definition at line 122 of file ConnFactory.cpp.

template<typename T >
static bool RTT::internal::ConnFactory::createConnection ( OutputPort< T > &  output_port,
base::InputPortInterface input_port,
ConnPolicy const &  policy 
) [inline, static]

Creates a connection from a local output_port to a local or remote input_port. This function contains all logic to decide on how connections must be created to local or remote input ports.

In order to set up out-of-band communication between input_port and output_port, use a different transport number in the policy parameter than the transport of the input port.

Definition at line 271 of file ConnFactory.hpp.

template<class T >
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::createOutOfBandConnection ( OutputPort< T > &  output_port,
InputPort< T > &  input_port,
ConnPolicy const &  policy 
) [inline, static, protected]

This code is for setting up an in-process out-of-band connection. This means that both input and output port are present in the same process. This function is used when the policy dictates a transport protocol, but both ports are local.

Returns:
a channel element chain with a channel output endpoint, but no channel input endpoint.

Definition at line 367 of file ConnFactory.hpp.

base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::createRemoteConnection ( base::OutputPortInterface output_port,
base::InputPortInterface input_port,
ConnPolicy const &  policy 
) [static, protected]

Definition at line 73 of file ConnFactory.cpp.

template<class T >
static bool RTT::internal::ConnFactory::createStream ( InputPort< T > &  input_port,
ConnPolicy const &  policy 
) [inline, static]

Creates, attaches and checks an inbound stream to an Input port.

Parameters:
input_port The port to connect the stream to.
policy The policy dictating which transport to use.
Returns:
true if the stream could be created and connected to input_port.

Definition at line 342 of file ConnFactory.hpp.

template<class T >
static bool RTT::internal::ConnFactory::createStream ( OutputPort< T > &  output_port,
ConnPolicy const &  policy 
) [inline, static]

Creates, attaches and checks an outbound stream to an Output port.

Parameters:
output_port The port to connect the stream to.
policy The policy dictating which transport to use.
Returns:
true if the stream could be created and connected to output_port.

Definition at line 324 of file ConnFactory.hpp.

virtual base::InputPortInterface* RTT::internal::ConnFactory::inputPort ( std::string const &  name  )  const [pure virtual]
virtual base::OutputPortInterface* RTT::internal::ConnFactory::outputPort ( std::string const &  name  )  const [pure virtual]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Mar 1 16:27:45 2013