#include <ConnFactory.hpp>
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 install/include/rtt/internal/ConnFactory.hpp.
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.
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 181 of file rtt/internal/ConnFactory.hpp.
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.
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 190 of file install/include/rtt/internal/ConnFactory.hpp.
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.
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 217 of file rtt/internal/ConnFactory.hpp.
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.
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 226 of file install/include/rtt/internal/ConnFactory.hpp.
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.
Definition at line 161 of file rtt/internal/ConnFactory.hpp.
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.
Definition at line 170 of file install/include/rtt/internal/ConnFactory.hpp.
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.
Definition at line 200 of file rtt/internal/ConnFactory.hpp.
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.
Definition at line 209 of file install/include/rtt/internal/ConnFactory.hpp.
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
: 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 101 of file rtt/internal/ConnFactory.hpp.
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
: 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 110 of file install/include/rtt/internal/ConnFactory.hpp.
virtual base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildRemoteChannelOutput | ( | base::OutputPortInterface & | output_port, | |
types::TypeInfo const * | type_info, | |||
base::InputPortInterface & | input, | |||
const ConnPolicy & | policy | |||
) | [pure virtual] |
This method is analoguous to the static ConnFactory::buildChannelOutput. It is provided for remote connection building: for these connections, no template can be used and therefore the connection setup should be done based on the types::TypeInfo object
Implemented in RTT::corba::RemoteInputPort, and RTT::corba::RemoteInputPort.
virtual base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::buildRemoteChannelOutput | ( | base::OutputPortInterface & | output_port, | |
types::TypeInfo const * | type_info, | |||
base::InputPortInterface & | input, | |||
const ConnPolicy & | policy | |||
) | [pure virtual] |
This method is analoguous to the static ConnFactory::buildChannelOutput. It is provided for remote connection building: for these connections, no template can be used and therefore the connection setup should be done based on the types::TypeInfo object
Implemented in RTT::corba::RemoteInputPort, and RTT::corba::RemoteInputPort.
static bool RTT::internal::ConnFactory::createAndCheckConnection | ( | base::OutputPortInterface & | output_port, | |
base::InputPortInterface & | input_port, | |||
base::ChannelElementBase::shared_ptr | channel_input, | |||
ConnPolicy | policy | |||
) | [static, protected] |
bool ConnFactory::createAndCheckConnection | ( | base::OutputPortInterface & | output_port, | |
base::InputPortInterface & | input_port, | |||
base::ChannelElementBase::shared_ptr | channel_input, | |||
ConnPolicy | policy | |||
) | [static, protected] |
Definition at line 101 of file ConnFactory.cpp.
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::createAndCheckOutOfBandConnection | ( | base::OutputPortInterface & | output_port, | |
base::InputPortInterface & | input_port, | |||
ConnPolicy const & | policy, | |||
base::ChannelElementBase::shared_ptr | output_half, | |||
StreamConnID * | conn_id | |||
) | [static, protected] |
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 198 of file ConnFactory.cpp.
static bool RTT::internal::ConnFactory::createAndCheckStream | ( | base::InputPortInterface & | input_port, | |
ConnPolicy const & | policy, | |||
base::ChannelElementBase::shared_ptr | outhalf, | |||
StreamConnID * | conn_id | |||
) | [static, protected] |
static bool RTT::internal::ConnFactory::createAndCheckStream | ( | base::OutputPortInterface & | output_port, | |
ConnPolicy const & | policy, | |||
base::ChannelElementBase::shared_ptr | chan, | |||
StreamConnID * | conn_id | |||
) | [static] |
bool ConnFactory::createAndCheckStream | ( | base::InputPortInterface & | input_port, | |
ConnPolicy const & | policy, | |||
base::ChannelElementBase::shared_ptr | outhalf, | |||
StreamConnID * | conn_id | |||
) | [static, protected] |
Definition at line 158 of file ConnFactory.cpp.
bool ConnFactory::createAndCheckStream | ( | base::OutputPortInterface & | output_port, | |
ConnPolicy const & | policy, | |||
base::ChannelElementBase::shared_ptr | chan, | |||
StreamConnID * | conn_id | |||
) | [static] |
Definition at line 123 of file ConnFactory.cpp.
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 236 of file rtt/internal/ConnFactory.hpp.
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 245 of file install/include/rtt/internal/ConnFactory.hpp.
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.
Definition at line 332 of file rtt/internal/ConnFactory.hpp.
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.
Definition at line 341 of file install/include/rtt/internal/ConnFactory.hpp.
static base::ChannelElementBase::shared_ptr RTT::internal::ConnFactory::createRemoteConnection | ( | base::OutputPortInterface & | output_port, | |
base::InputPortInterface & | input_port, | |||
ConnPolicy const & | policy | |||
) | [static, protected] |
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.
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.
input_port | The port to connect the stream to. | |
policy | The policy dictating which transport to use. |
Definition at line 307 of file rtt/internal/ConnFactory.hpp.
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.
output_port | The port to connect the stream to. | |
policy | The policy dictating which transport to use. |
Definition at line 289 of file rtt/internal/ConnFactory.hpp.
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.
input_port | The port to connect the stream to. | |
policy | The policy dictating which transport to use. |
Definition at line 316 of file install/include/rtt/internal/ConnFactory.hpp.
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.
output_port | The port to connect the stream to. | |
policy | The policy dictating which transport to use. |
Definition at line 298 of file install/include/rtt/internal/ConnFactory.hpp.