FlowController Use Cases
[Programming How-To's]

Working with flow controllers. More...

Creating a flow controller

Flow controlling a data writer

Using the built-in flow controllers

RTI Data Distribution Service provides several built-in flow controllers.

The DDS_DEFAULT_FLOW_CONTROLLER_NAME built-in flow controller provides the basic asynchronous writer behavior. When calling FooDataWriter::write, the call signals the DDSPublisher asynchronous publishing thread (DDS_PublisherQos::asynchronous_publisher) to send the actual data. As with any DDS_ASYNCHRONOUS_PUBLISH_MODE_QOS DDSDataWriter, the FooDataWriter::write call returns immediately afterwards. The data is sent immediately in the context of the DDSPublisher asynchronous publishing thread.

When using the DDS_FIXED_RATE_FLOW_CONTROLLER_NAME flow controller, data is also sent in the context of the DDSPublisher asynchronous publishing thread, but at a regular fixed interval. The thread accumulates samples from different DDSDataWriter instances and generates data on the wire only once per DDS_FlowControllerTokenBucketProperty_t::period.

In contrast, the DDS_ON_DEMAND_FLOW_CONTROLLER_NAME flow controller permits flow only when DDSFlowController::trigger_flow is called. The data is still sent in the context of the DDSPublisher asynchronous publishing thread. The thread accumulates samples from different DDSDataWriter instances (across any DDSPublisher) and sends all data since the previous trigger.

The properties of the built-in DDSFlowController instances can be adjusted.

Shaping the network traffic for a particular transport

Coalescing multiple samples in a single network packet


RTI Data Distribution Service C++ API Version 4.5e Copyright © 23 Oct 2011 Real-Time Innovations, Inc