RTI Connext .Net APIs  Version 5.3.0

<<extension>> DDS::FlowController and associated elements More...

Classes

struct  DDS::FlowControllerTokenBucketProperty_t
 DDS::FlowController uses the popular token bucket approach for open loop network flow control. The flow control characteristics are determined by the token bucket properties. More...
 
class  DDS::FlowControllerProperty_t
 Determines the flow control characteristics of the DDS::FlowController. More...
 
class  DDS::FlowController
 <<interface>> A flow controller is the object responsible for shaping the network traffic by determining when attached asynchronous DDS::DataWriter instances are allowed to write data. More...
 

Enumerations

enum  DDS::FlowControllerSchedulingPolicy : UINT32 {
  DDS::FlowControllerSchedulingPolicy::DDS_RR_FLOW_CONTROLLER_SCHED_POLICY,
  DDS::FlowControllerSchedulingPolicy::DDS_EDF_FLOW_CONTROLLER_SCHED_POLICY,
  DDS::FlowControllerSchedulingPolicy::DDS_HPF_FLOW_CONTROLLER_SCHED_POLICY
}
 Kinds of flow controller scheduling policy. More...
 

Properties

static System::String^ DDS::FlowController::DEFAULT_FLOW_CONTROLLER_NAME [get]
 [default] Special value of DDS::PublishModeQosPolicy::flow_controller_name that refers to the built-in default flow controller. More...
 
static System::String^ DDS::FlowController::FIXED_RATE_FLOW_CONTROLLER_NAME [get]
 Special value of DDS::PublishModeQosPolicy::flow_controller_name that refers to the built-in fixed-rate flow controller. More...
 
static System::String^ DDS::FlowController::ON_DEMAND_FLOW_CONTROLLER_NAME [get]
 Special value of DDS::PublishModeQosPolicy::flow_controller_name that refers to the built-in on-demand flow controller. More...
 

Detailed Description

<<extension>> DDS::FlowController and associated elements

DDS::FlowController provides the network traffic shaping capability to asynchronous DDS::DataWriter instances. For use cases and advantages of publishing asnychronously, please refer to DDS::PublishModeQosPolicy of DDS::DataWriterQos.

See also
DDS::PublishModeQosPolicy
DDS::DataWriterQos::publish_mode
DDS::AsynchronousPublisherQosPolicy

Enumeration Type Documentation

◆ FlowControllerSchedulingPolicy

Kinds of flow controller scheduling policy.

Samples written by an asynchronous DDS::DataWriter are not sent in the context of the DDS::TypedDataWriter::write call. Instead, the middleware puts the samples in a queue for future processing. The DDS::FlowController associated with each asynchronous DataWriter instance determines when the samples are actually sent.

Each DDS::FlowController maintains a separate FIFO queue for each unique destination (remote application). Samples written by asynchronous DDS::DataWriter instances associated with the flow controller, are placed in the queues that correspond to the intended destinations of the sample.

When tokens become available, a flow controller must decide which queue(s) to grant tokens first. This is determined by the flow controller's scheduling policy. Once a queue has been granted tokens, it is serviced by the asynchronous publishing thread. The queued up samples will be coalesced and sent to the corresponding destination. The number of samples sent depends on the data size and the number of tokens granted.

QoS:
DDS::FlowControllerProperty_t
Enumerator
DDS_RR_FLOW_CONTROLLER_SCHED_POLICY 

Indicates to flow control in a round-robin fashion.

Whenever tokens become available, the flow controller distributes the tokens uniformly across all of its (non-empty) destination queues. No destinations are prioritized. Instead, all destinations are treated equally and are serviced in a round-robin fashion.

DDS_EDF_FLOW_CONTROLLER_SCHED_POLICY 

Indicates to flow control in an earliest-deadline-first fashion.

A sample's deadline is determined by the time it was written plus the latency budget of the DataWriter at the time of the write call (as specified in the DDS::LatencyBudgetQosPolicy). The relative priority of a flow controller's destination queue is determined by the earliest deadline across all samples it contains.

When tokens become available, the DDS::FlowController distributes tokens to the destination queues in order of their deadline priority. In other words, the queue containing the sample with the earliest deadline is serviced first. The number of tokens granted equals the number of tokens required to send the first sample in the queue. Note that the priority of a queue may change as samples are sent (i.e. removed from the queue). If a sample must be sent to multiple destinations or two samples have an equal deadline value, the corresponding destination queues are serviced in a round-robin fashion.

Hence, under the default DDS::LatencyBudgetQosPolicy::duration setting, an EDF_FLOW_CONTROLLER_SCHED_POLICY DDS::FlowController preserves the order in which the user calls DDS::TypedDataWriter::write across the DataWriters associated with the flow controller.

Since the DDS::LatencyBudgetQosPolicy is mutable, a sample written second may contain an earlier deadline than the sample written first if the DDS::LatencyBudgetQosPolicy::duration value is sufficiently decreased in between writing the two samples. In that case, if the first sample is not yet written (still in queue waiting for its turn), it inherits the priority corresponding to the (earlier) deadline from the second sample.

In other words, the priority of a destination queue is always determined by the earliest deadline among all samples contained in the queue. This priority inheritance approach is required in order to both honor the updated DDS::LatencyBudgetQosPolicy::duration and adhere to the DDS::DataWriter in-order data delivery guarantee.

[default] for DDS::DataWriter

DDS_HPF_FLOW_CONTROLLER_SCHED_POLICY 

Indicates to flow control in a highest-priority-first fashion.

Determines the next destination queue to service as determined by the publication priority of the DDS::DataWriter, channel of multi-channel DataWriter, or individual sample.

The relative priority of a flow controller's destination queue is determined by the highest publication priority of all samples it contains.

When tokens become available, the DDS::FlowController distributes tokens to the destination queues in order of their publication priority. In other words, the queue containing the sample with the highest publication priority is serviced first. The number of tokens granted equals the number of tokens required to send the first sample in the queue. Note that the priority of a queue may change as samples are sent (i.e. removed from the queue). If a sample must be sent to multiple destinations or two samples have an equal publication priority, the corresponding destination queues are serviced in a round-robin fashion.

This priority inheritance approach is required in order to both honor the designated publication priority and adhere to the DDS::DataWriter in-order data delivery guarantee.

Properties

◆ DEFAULT_FLOW_CONTROLLER_NAME

System:: String^ DDS::FlowController::DEFAULT_FLOW_CONTROLLER_NAME
staticget

[default] Special value of DDS::PublishModeQosPolicy::flow_controller_name that refers to the built-in default flow controller.

RTI Connext provides several built-in DDS::FlowController for use with an asynchronous DDS::DataWriter. The user can choose to use the built-in flow controllers and optionally modify their properties or can create a custom flow controller.

By default, flow control is disabled. That is, the built-in DDS::FlowController::DEFAULT_FLOW_CONTROLLER_NAME flow controller does not apply any flow control. Instead, it allows data to be sent asynchronously as soon as it is written by the DDS::DataWriter.

Essentially, this is equivalent to a user-created DDS::FlowController with the following DDS::FlowControllerProperty_t settings:

- DDS::FlowControllerProperty_t::scheduling_policy = DDS_EDF_FLOW_CONTROLLER_SCHED_POLICY

- DDS::FlowControllerProperty_t::token_bucket max_tokens = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

- DDS::FlowControllerProperty_t::token_bucket tokens_added_per_period = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

- DDS::FlowControllerProperty_t::token_bucket tokens_leaked_per_period = 0

- DDS::FlowControllerProperty_t::token_bucket period = 1 second

- DDS::FlowControllerProperty_t::token_bucket bytes_per_token = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

See also
DDS::Publisher::create_datawriter
DDS::DomainParticipant::lookup_flowcontroller
DDS::FlowController::set_property
DDS::PublishModeQosPolicy
DDS::AsynchronousPublisherQosPolicy

◆ FIXED_RATE_FLOW_CONTROLLER_NAME

System:: String^ DDS::FlowController::FIXED_RATE_FLOW_CONTROLLER_NAME
staticget

Special value of DDS::PublishModeQosPolicy::flow_controller_name that refers to the built-in fixed-rate flow controller.

RTI Connext provides several builtin DDS::FlowController for use with an asynchronous DDS::DataWriter. The user can choose to use the built-in flow controllers and optionally modify their properties or can create a custom flow controller.

The built-in DDS::FlowController::FIXED_RATE_FLOW_CONTROLLER_NAME flow controller shapes the network traffic by allowing data to be sent only once every second. Any accumulated samples destined for the same destination are coalesced into as few network packets as possible.

Essentially, this is equivalent to a user-created DDS::FlowController with the following DDS::FlowControllerProperty_t settings:

- DDS::FlowControllerProperty_t::scheduling_policy = DDS_EDF_FLOW_CONTROLLER_SCHED_POLICY

- DDS::FlowControllerProperty_t::token_bucket max_tokens = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

- DDS::FlowControllerProperty_t::token_bucket tokens_added_per_period = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

- DDS::FlowControllerProperty_t::token_bucket tokens_leaked_per_period = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

- DDS::FlowControllerProperty_t::token_bucket period = 1 second

- DDS::FlowControllerProperty_t::token_bucket bytes_per_token = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

See also
DDS::Publisher::create_datawriter
DDS::DomainParticipant::lookup_flowcontroller
DDS::FlowController::set_property
DDS::PublishModeQosPolicy
DDS::AsynchronousPublisherQosPolicy

◆ ON_DEMAND_FLOW_CONTROLLER_NAME

System:: String^ DDS::FlowController::ON_DEMAND_FLOW_CONTROLLER_NAME
staticget

Special value of DDS::PublishModeQosPolicy::flow_controller_name that refers to the built-in on-demand flow controller.

RTI Connext provides several builtin DDS::FlowController for use with an asynchronous DDS::DataWriter. The user can choose to use the built-in flow controllers and optionally modify their properties or can create a custom flow controller.

The built-in DDS::FlowController::ON_DEMAND_FLOW_CONTROLLER_NAME allows data to be sent only when the user calls DDS::FlowController::trigger_flow. With each trigger, all accumulated data since the previous trigger is sent (across all DDS::Publisher or DDS::DataWriter instances). In other words, the network traffic shape is fully controlled by the user. Any accumulated samples destined for the same destination are coalesced into as few network packets as possible.

This external trigger source is ideal for users who want to implement some form of closed-loop flow control or who want to only put data on the wire every so many samples (e.g. with the number of samples based on "<TRANSPORT_PREFIX>.parent.gather_send_buffer_count_max").

Essentially, this is equivalent to a user-created DDS::FlowController with the following DDS::FlowControllerProperty_t settings:

- DDS::FlowControllerProperty_t::scheduling_policy = DDS_EDF_FLOW_CONTROLLER_SCHED_POLICY

- DDS::FlowControllerProperty_t::token_bucket max_tokens = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

- DDS::FlowControllerProperty_t::token_bucket tokens_added_per_period = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

- DDS::FlowControllerProperty_t::token_bucket tokens_leaked_per_period = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

- DDS::FlowControllerProperty_t::token_bucket period = DDS::Duration_t::DURATION_INFINITE

- DDS::FlowControllerProperty_t::token_bucket bytes_per_token = DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED

See also
DDS::Publisher::create_datawriter
DDS::DomainParticipant::lookup_flowcontroller
DDS::FlowController::trigger_flow
DDS::FlowController::set_property
DDS::PublishModeQosPolicy
DDS::AsynchronousPublisherQosPolicy

RTI Connext .Net APIs Version 5.3.0 Copyright © Sun Jun 25 2017 Real-Time Innovations, Inc