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. |
Generic properties of all transport plugins.
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 NDDS_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
.
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.
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.