RTI Connext Modern C++ API  Version 5.3.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rti::core::policy::ReceiverPool Class Reference

<<extension>> Configures threads that RTI Connext uses to receive and process data from the transport modules (such as UDP) More...

#include <rti/core/policy/CorePolicy.hpp>

Public Member Functions

 ReceiverPool ()
 Creates the default policy.
 
 ReceiverPool (const rti::core::ThreadSettings &the_thread, int32_t the_buffer_size, int32_t the_buffer_alignment)
 Creates an instance with the thread settings, buffer size and buffer alignment configuration.
 
ReceiverPoolthread (const rti::core::ThreadSettings &the_thread)
 Configures the receiver pool thread(s)
 
const rti::core::ThreadSettingsthread () const
 Getter (see setter with the same name)
 
rti::core::ThreadSettingsthread ()
 Getter (see setter with the same name)
 
ReceiverPoolbuffer_size (int32_t the_buffer_size)
 Sets the length of the buffer used to store the incoming raw data.
 
int32_t buffer_size () const
 Getter (see setter with the same name)
 
ReceiverPoolbuffer_alignment (int32_t the_buffer_alignment)
 Sets the receive buffer alignment.
 
int32_t buffer_alignment () const
 Getter (see setter with the same name)
 

Static Public Attributes

static
OMG_DDS_API_CLASS_VARIABLE
const int32_t 
LENGTH_AUTO
 Indicates that the length will be automatically resolved.
 

Detailed Description

<<extension>> Configures threads that RTI Connext uses to receive and process data from the transport modules (such as UDP)

This QoS policy is an extension to the DDS standard.

Entity:
dds::domain::DomainParticipant
Properties:
RxO = N/A
Changeable = NO
See Also
Controlling CPU Core Affinity for RTI Threads

Usage

This QoS policy sets the thread properties such as priority level and stack size for the threads used by the middleware to receive and process data from transports.

RTI uses a separate receive thread per port per transport plug-in. To force RTI Connext to use a separate thread to process the data for a dds::sub::DataReader, set a unique port for the rti::core::policy::TransportUnicast or rti::core::policy::TransportMulticast for the dds::sub::DataReader.

This QoS policy also sets the size of the buffer used to store packets received from a transport. This buffer size will limit the largest single packet of data that a dds::domain::DomainParticipant will accept from a transport. Users will often set this size to the largest packet that any of the transports used by their application will deliver. For many applications, the value 65,536 (64 K) is a good choice; this value is the largest packet that can be sent/received via UDP.

Constructor & Destructor Documentation

rti::core::policy::ReceiverPool::ReceiverPool ( )
inline

Creates the default policy.

rti::core::policy::ReceiverPool::ReceiverPool ( const rti::core::ThreadSettings the_thread,
int32_t  the_buffer_size,
int32_t  the_buffer_alignment 
)

Creates an instance with the thread settings, buffer size and buffer alignment configuration.

See individual setters.

Member Function Documentation

ReceiverPool& rti::core::policy::ReceiverPool::thread ( const rti::core::ThreadSettings the_thread)

Configures the receiver pool thread(s)

There is at least one receive thread, possibly more.

[default] priority above normal.
The actual value depends on your architecture:

For Windows: 2
For Linux: OS default priority
For a complete list of platform specific values, please refer to Platform Notes.

[default] The actual value depends on your architecture:

For Windows: OS default stack size
For Linux: OS default stack size
For a complete list of platform specific values, please refer to Platform Notes.

[default] mask rti::core::ThreadSettingsKindMask::floating_point() | rti::core::ThreadSettingsKindMask::stdio()

const rti::core::ThreadSettings& rti::core::policy::ReceiverPool::thread ( ) const

Getter (see setter with the same name)

rti::core::ThreadSettings& rti::core::policy::ReceiverPool::thread ( )

Getter (see setter with the same name)

ReceiverPool& rti::core::policy::ReceiverPool::buffer_size ( int32_t  the_buffer_size)

Sets the length of the buffer used to store the incoming raw data.

The receive buffer is used by the receive thread to store the raw data that arrives over the transport.

In many applications, users will change the configuration of the built-in transport Transport_Property_t::message_size_max to increase the size of the largest data packet that can be sent or received through the transport. Typically, users will change the UDPv4 transport plugin's Transport_Property_t::message_size_max to 65536 (64 K), which is the largest packet that can be sent/received via UDP.

If you change buffer_size from its default value of LENGTH_AUTO, it should be set to be the same value as the maximum Transport_Property_t::message_size_max across all of the transports being used that are not doing zero-copy (described below).

If your application only uses transports that support zero-copy, buffer_size does not need to be greater than Transport_Property_t::message_size_max.

Transports that support zero-copy do not copy their data into the buffer provided by the receive thread. Instead, they provide the receive thread data in a buffer allocated by the transport itself. The built-in transports that support zero-copy are the SHMEM transport, and the UDPv4 transport on VxWorks platforms.

buffer_size may be deprecated in the future.

[default] LENGTH_AUTO

[range] [1, 1 GB] or LENGTH_AUTO

int32_t rti::core::policy::ReceiverPool::buffer_size ( ) const

Getter (see setter with the same name)

ReceiverPool& rti::core::policy::ReceiverPool::buffer_alignment ( int32_t  the_buffer_alignment)

Sets the receive buffer alignment.

The receive buffer is used by the receive thread to store the raw data that arrives over the transport.

In many applications, users will change the configuration of the built-in transport Transport_Property_t::message_size_max to increase the size of the largest data packet that can be sent or received through the transport. Typically, users will change the UDPv4 transport plugin's Transport_Property_t::message_size_max to 65536 (64 K), which is the largest packet that can be sent/received via UDP.

If you change buffer_size from its default value of LENGTH_AUTO, it should be set to be the same value as the maximum Transport_Property_t::message_size_max across all of the transports being used that are not doing zero-copy (described below).

If your application only uses transports that support zero-copy, buffer_size does not need to be greater than Transport_Property_t::message_size_max.

Transports that support zero-copy do not copy their data into the buffer provided by the receive thread. Instead, they provide the receive thread data in a buffer allocated by the transport itself. The built-in transports that support zero-copy are the SHMEM transport, and the UDPv4 transport on VxWorks platforms.

buffer_size may be deprecated in the future.

[default] LENGTH_AUTO

[range] [1, 1 GB] or LENGTH_AUTO

int32_t rti::core::policy::ReceiverPool::buffer_alignment ( ) const

Getter (see setter with the same name)

Member Data Documentation

OMG_DDS_API_CLASS_VARIABLE const int32_t rti::core::policy::ReceiverPool::LENGTH_AUTO
static

Indicates that the length will be automatically resolved.


RTI Connext Modern C++ API Version 5.3.0 Copyright © Sun Jun 25 2017 Real-Time Innovations, Inc