RTI Connext Modern C++ API  Version 5.2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
NDDS_Transport_Shmem_Property_t Struct Reference

Subclass of Transport_Property_t allowing specification of parameters that are specific to the shared-memory transport. More...

Public Attributes

struct NDDS_Transport_Property_t parent
 Generic properties of all transport plugins.
 
RTI_INT32 received_message_count_max
 Number of messages that can be buffered in the receive queue.
 
RTI_INT32 receive_buffer_size
 The total number of bytes that can be buffered in the receive queue.
 

Detailed Description

Subclass of Transport_Property_t allowing specification of parameters that are specific to the shared-memory transport.

See Also
Transport_Support::set_builtin_transport_property()

Member Data Documentation

struct NDDS_Transport_Property_t NDDS_Transport_Shmem_Property_t::parent

Generic properties of all transport plugins.

RTI_INT32 NDDS_Transport_Shmem_Property_t::received_message_count_max

Number of messages that can be buffered in the receive queue.

This does not guarantee that the Transport-Plugin will actually be able to buffer received_message_count_max messages of the maximum size set in Transport_Property_t::message_size_max. The total number of bytes that can be buffered for a transport plug-in is actually controlled by receive_buffer_size.

See Also
NDDS_Transport_Property_t, NDDS_TRANSPORT_SHMEM_RECEIVED_MESSAGE_COUNT_MAX_DEFAULT
RTI_INT32 NDDS_Transport_Shmem_Property_t::receive_buffer_size

The total number of bytes that can be buffered in the receive queue.

This number controls how much memory is allocated by the plugin for the receive queue. The actual number of bytes allocated is:

size = receive_buffer_size + message_size_max +
received_message_count_max * fixedOverhead

where fixedOverhead is some small number of bytes used by the queue data structure. The following rules are noted:

  • receive_buffer_size < message_size_max * received_message_count_max, then the transport plugin will not be able to store received_message_count_max messages of size message_size_max.
  • receive_buffer_size > message_size_max * received_message_count_max, then there will be memory allocated that cannot be used by the plugin and thus wasted.

To optimize memory usage, the user is allowed to specify a size for the receive queue to be less than that required to hold the maximum number of messages which are all of the maximum size.

In most situations, the average message size may be far less than the maximum message size. So for example, if the maximum message size is 64 K bytes, and the user configures the plugin to buffer at least 10 messages, then 640 K bytes of memory would be needed if all messages were 64 K bytes. Should this be desired, then receive_buffer_size should be set to 640 K bytes.

However, if the average message size is only 10 K bytes, then the user could set the receive_buffer_size to 100 K bytes. This allows the user to optimize the memory usage of the plugin for the average case and yet allow the plugin to handle the extreme case.

NOTE, the queue will always be able to hold 1 message of message_size_max bytes, no matter what the value of receive_buffer_size is.

See Also
NDDS_TRANSPORT_SHMEM_RECEIVE_BUFFER_SIZE_DEFAULT

RTI Connext Modern C++ API Version 5.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc