RTI Connext Java API  Version 5.2.0
 All Classes Namespaces Functions Variables Groups Pages
FlowControllerSchedulingPolicy Class Reference

Kinds of flow controller scheduling policy. More...

Inheritance diagram for FlowControllerSchedulingPolicy:
Enum Copyable

Static Public Attributes

static final
FlowControllerSchedulingPolicy 
RR_FLOW_CONTROLLER_SCHED_POLICY
 Indicates to flow control in a round-robin fashion.
 
static final
FlowControllerSchedulingPolicy 
EDF_FLOW_CONTROLLER_SCHED_POLICY
 Indicates to flow control in an earliest-deadline-first fashion.
 
static final
FlowControllerSchedulingPolicy 
HPF_FLOW_CONTROLLER_SCHED_POLICY
 Indicates to flow control in a highest-priority-first fashion.
 

Additional Inherited Members

- Public Member Functions inherited from Enum
final int ordinal ()
 The integral value of this enumerated constant.
 
Object copy_from (Object src)
 
final String name ()
 The name of this enum constant, as declared in the enum declaration.
 
final String toString ()
 The string value of this enum constant.
 
- Protected Member Functions inherited from Enum
 Enum (String name, int ordinal)
 The constructor.
 

Detailed Description

Kinds of flow controller scheduling policy.

Samples written by an asynchronous com.rti.dds.publication.DataWriter are not sent in the context of the com.rti.ndds.example.FooDataWriter.write call. Instead, the middleware puts the samples in a queue for future processing. The com.rti.dds.publication.FlowController associated with each asynchronous DataWriter instance determines when the samples are actually sent.

Each com.rti.dds.publication.FlowController maintains a separate FIFO queue for each unique destination (remote application). Samples written by asynchronous com.rti.dds.publication.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:
com.rti.dds.publication.FlowControllerProperty_t

Member Data Documentation

final FlowControllerSchedulingPolicy RR_FLOW_CONTROLLER_SCHED_POLICY
static

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.

final FlowControllerSchedulingPolicy EDF_FLOW_CONTROLLER_SCHED_POLICY
static

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 com.rti.dds.infrastructure.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 com.rti.dds.publication.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 com.rti.dds.infrastructure.LatencyBudgetQosPolicy.duration setting, an EDF_FLOW_CONTROLLER_SCHED_POLICY com.rti.dds.publication.FlowController preserves the order in which the user calls com.rti.ndds.example.FooDataWriter.write across the DataWriters associated with the flow controller.

Since the com.rti.dds.infrastructure.LatencyBudgetQosPolicy is mutable, a sample written second may contain an earlier deadline than the sample written first if the com.rti.dds.infrastructure.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 com.rti.dds.infrastructure.LatencyBudgetQosPolicy.duration and adhere to the com.rti.dds.publication.DataWriter in-order data delivery guarantee.

[default] for com.rti.dds.publication.DataWriter

final FlowControllerSchedulingPolicy HPF_FLOW_CONTROLLER_SCHED_POLICY
static

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 com.rti.dds.publication.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 com.rti.dds.publication.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 com.rti.dds.publication.DataWriter in-order data delivery guarantee.


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