RTT::ConnPolicy Class Reference
[Data Flow Ports]

#include <ConnPolicy.hpp>

List of all members.

Public Member Functions

 ConnPolicy (int type=DATA, int lock_policy=LOCK_FREE)
 ConnPolicy (int type=DATA, int lock_policy=LOCK_FREE)

Static Public Member Functions

static ConnPolicy buffer (int size, int lock_policy=LOCK_FREE, bool init_connection=false, bool pull=false)
static ConnPolicy buffer (int size, int lock_policy=LOCK_FREE, bool init_connection=false, bool pull=false)
static ConnPolicy data (int lock_policy=LOCK_FREE, bool init_connection=true, bool pull=false)
static ConnPolicy data (int lock_policy=LOCK_FREE, bool init_connection=true, bool pull=false)

Public Attributes

int data_size
bool init
int lock_policy
std::string name_id
bool pull
int size
int transport
int type

Static Public Attributes

static const int BUFFER = 1
static const int DATA = 0
static const int LOCK_FREE = 2
static const int LOCKED = 1
static const int UNSYNC = 0

Detailed Description

A connection policy object describes how a given connection should behave. Various parameters are available:

Definition at line 90 of file install/include/rtt/ConnPolicy.hpp.


Constructor & Destructor Documentation

RTT::ConnPolicy::ConnPolicy ( int  type = DATA,
int  lock_policy = LOCK_FREE 
) [explicit]

The default policy is data driven, lock-free and local. It is unsafe to rely on these defaults. It is prefered to use the above buffer() and data() functions.

Parameters:
type 
lock_policy 
Returns:

Definition at line 71 of file ConnPolicy.cpp.

RTT::ConnPolicy::ConnPolicy ( int  type = DATA,
int  lock_policy = LOCK_FREE 
) [explicit]

The default policy is data driven, lock-free and local. It is unsafe to rely on these defaults. It is prefered to use the above buffer() and data() functions.

Parameters:
type 
lock_policy 
Returns:

Member Function Documentation

static ConnPolicy RTT::ConnPolicy::buffer ( int  size,
int  lock_policy = LOCK_FREE,
bool  init_connection = false,
bool  pull = false 
) [static]

Create a policy for a (lock-free) buffer connection of a given size.

Parameters:
size The size of the buffer in this connection
lock_policy The locking policy
init_connection If an initial sample should be pushed into the buffer upon creation.
pull In inter-process cases, should the consumer pull itself ?
Returns:
the specified policy.
ConnPolicy RTT::ConnPolicy::buffer ( int  size,
int  lock_policy = LOCK_FREE,
bool  init_connection = false,
bool  pull = false 
) [static]

Create a policy for a (lock-free) buffer connection of a given size.

Parameters:
size The size of the buffer in this connection
lock_policy The locking policy
init_connection If an initial sample should be pushed into the buffer upon creation.
pull In inter-process cases, should the consumer pull itself ?
Returns:
the specified policy.

Definition at line 54 of file ConnPolicy.cpp.

static ConnPolicy RTT::ConnPolicy::data ( int  lock_policy = LOCK_FREE,
bool  init_connection = true,
bool  pull = false 
) [static]

Create a policy for a (lock-free) shared data connection of a given size.

Parameters:
lock_policy The locking policy
init_connection If the data object should be initialised with the last value of the OutputPort upon creation.
pull In inter-process cases, should the consumer pull data itself ?
Returns:
the specified policy.
ConnPolicy RTT::ConnPolicy::data ( int  lock_policy = LOCK_FREE,
bool  init_connection = true,
bool  pull = false 
) [static]

Create a policy for a (lock-free) shared data connection of a given size.

Parameters:
lock_policy The locking policy
init_connection If the data object should be initialised with the last value of the OutputPort upon creation.
pull In inter-process cases, should the consumer pull data itself ?
Returns:
the specified policy.

Definition at line 63 of file ConnPolicy.cpp.


Member Data Documentation

static const int RTT::ConnPolicy::BUFFER = 1 [static]

Definition at line 94 of file install/include/rtt/ConnPolicy.hpp.

static const int RTT::ConnPolicy::DATA = 0 [static]

Definition at line 93 of file install/include/rtt/ConnPolicy.hpp.

Suggest the payload size of the data sent over this channel. Connections can use this value to optimize transmission or prepare the communication channel for real-time communication. This value might be overruled by the transport protocol if it can make a better guess. The interpretation of data_size is transport specific. It may be bytes, it may be something else. Leave this value set to zero, unless the transport documents otherwise.

Definition at line 160 of file install/include/rtt/ConnPolicy.hpp.

If true, one should initialize the connection's value with the last value written on the writer port. This is only possible if the writer port has the keepsLastWrittenValue() flag set (i.e. if it remembers what was the last written value).

Definition at line 136 of file install/include/rtt/ConnPolicy.hpp.

static const int RTT::ConnPolicy::LOCK_FREE = 2 [static]

Definition at line 98 of file install/include/rtt/ConnPolicy.hpp.

This is the locking policy on the connection

Definition at line 138 of file install/include/rtt/ConnPolicy.hpp.

static const int RTT::ConnPolicy::LOCKED = 1 [static]

Definition at line 97 of file install/include/rtt/ConnPolicy.hpp.

std::string RTT::ConnPolicy::name_id [mutable]

The name of this connection. May be used by transports to define a 'topic' or lookup name to connect two data streams. If you leave this empty (recommended), the protocol will choose an appropriate name itself. Only specify a name to work around name clashes or if the transport protocol documents to do so.

Definition at line 168 of file install/include/rtt/ConnPolicy.hpp.

If true, then the sink will have to pull data. Otherwise, it is pushed from the source. In both cases, the reader side is notified that new data is available by base::ChannelElementBase::signal()

Definition at line 143 of file install/include/rtt/ConnPolicy.hpp.

If the connection is a buffered connection, the size of the buffer

Definition at line 145 of file install/include/rtt/ConnPolicy.hpp.

The prefered transport used. 0 is local (in process), a higher number is used for inter-process or networked communication transports.

Definition at line 150 of file install/include/rtt/ConnPolicy.hpp.

This is the type for the data holding element in the connection

Definition at line 130 of file install/include/rtt/ConnPolicy.hpp.

static const int RTT::ConnPolicy::UNSYNC = 0 [static]

Definition at line 96 of file install/include/rtt/ConnPolicy.hpp.


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 Jan 11 09:49:46 2013