Flushing Batches of DDS Data Samples

The flush() operation makes a batch of DDS data samples available to be sent on the network.

DDS_ReturnCode_t flush ()

If the DataWriter’s PUBLISH_MODE QosPolicy (DDS Extension) kind is not ASYNCHRONOUS, the batch will be sent on the network immediately in the context of the calling thread.

If the DataWriter’s PublishModeQosPolicy kind is ASYNCHRONOUS, the batch will be sent in the context of the asynchronous publishing thread.

The flush() operation may block based on the conditions described in Blocking During a write().

If this operation does block, the max_blocking_time in the RELIABILITY QosPolicy configures the maximum time the write operation may block (waiting for space to become available). If max_blocking_time elapses before the DataWriter is able to store the modification without exceeding the limits, the operation will fail and return TIMEOUT.

For more information on batching, see the BATCH QosPolicy (DDS Extension).

© 2018 RTI