RTI Connext .Net APIs  Version 5.2.0
 All Classes Namespaces Functions Variables Enumerations Properties Groups Pages
Status Kinds

Kinds of communication status. More...

Enumerations

enum  DDS::StatusMask : UINT32
 A bit-mask (list) of concrete status types, i.e. ::DDS::StatusKind[]. More...
 
enum  DDS::StatusKind : UINT32
 Type for status kinds. More...
 

Detailed Description

Kinds of communication status.

Entity:
DDS::Entity
QoS:
QoS Policies
Listener:
DDS::Listener

Each concrete DDS::Entity is associated with a set of Status objects whose value represents the communication status of that entity. Each status value can be accessed with a corresponding method on the DDS::Entity.

When these status values change, the corresponding DDS::StatusCondition objects are activated and the proper DDS::Listener objects are invoked to asynchronously inform the application.

An application is notified of communication status by means of the DDS::Listener or the DDS::WaitSet / DDS::Condition mechanism. The two mechanisms may be combined in the application (e.g., using DDS::WaitSet (s) / DDS::Condition (s) to access the data and DDS::Listener (s) to be warned asynchronously of erroneous communication statuses).

It is likely that the application will choose one or the other mechanism for each particular communication status (not both). However, if both mechanisms are enabled, then the DDS::Listener mechanism is used first and then the DDS::WaitSet objects are signalled.

The statuses may be classified into:

Read communication statuses are treated slightly differently than the others because they don't change independently. In other words, at least two changes will appear at the same time (::DDS::StatusKind::DATA_ON_READERS_STATUS and ::DDS::StatusKind::DATA_AVAILABLE_STATUS) and even several of the last kind may be part of the set. This 'grouping' has to be communicated to the application.

For each plain communication status, there is a corresponding structure to hold the status value. These values contain the information related to the change of status, as well as information related to the statuses themselves (e.g., contains cumulative counts).

DDSStatuses.png
Status Values

Changes in Status

Associated with each one of an DDS::Entity's communication status is a logical StatusChangedFlag. This flag indicates whether that particular communication status has changed since the last time the status was read by the application. The way the status changes is slightly different for the Plain Communication Status and the Read Communication status.

DDSStatusChangedFlag.png
StatusChangedFlag indicates if status has changed

Changes in plain communication status

For the plain communication status, the StatusChangedFlag flag is initially set to FALSE. It becomes TRUE whenever the plain communication status changes and it is reset to false each time the application accesses the plain communication status via the proper get_<plain communication status>() operation on the DDS::Entity.

The communication status is also reset to FALSE whenever the associated listener operation is called as the listener implicitly accesses the status which is passed as a parameter to the operation. The fact that the status is reset prior to calling the listener means that if the application calls the get_<plain communication status> from inside the listener it will see the status already reset.

An exception to this rule is when the associated listener is the 'nil' listener. The 'nil' listener is treated as a NOOP and the act of calling the 'nil' listener does not reset the communication status.

For example, the value of the StatusChangedFlag associated with the ::DDS::StatusKind::REQUESTED_DEADLINE_MISSED_STATUS will become TRUE each time new deadline occurs (which increases DDS::RequestedDeadlineMissedStatus::total_count). The value changes to FALSE when the application accesses the status via the corresponding DDS::DataReader::get_requested_deadline_missed_status method on the proper Entity

DDSPlainCommunicationStatus.png
Changes in StatusChangedFlag for plain communication status

Changes in read communication status

For the read communication status, the StatusChangedFlag flag is initially set to FALSE. The StatusChangedFlag becomes TRUE when either a data-sample arrives or else the DDS::ViewStateKind, DDS::SampleStateKind, or DDS::InstanceStateKind of any existing sample changes for any reason other than a call to DDS::TypedDataReader::read, DDS::TypedDataReader::take or their variants. Specifically any of the following events will cause the StatusChangedFlag to become TRUE:

Depending on the kind of StatusChangedFlag, the flag transitions to FALSE again as follows:

DDSDataAvailableStatus.png
DDSDataOnReadersStatus.png
Changes in StatusChangedFlag for read communication status
See Also
DDS::Listener
DDS::WaitSet, DDS::Condition

Enumeration Type Documentation

enum DDS::StatusMask : UINT32

A bit-mask (list) of concrete status types, i.e. ::DDS::StatusKind[].

The bit-mask is an efficient and compact representation of a fixed-length list of ::DDS::StatusKind values.

Bits in the mask correspond to different statuses. You can choose which changes in status will trigger a callback by setting the corresponding status bits in this bit-mask and installing callbacks for each of those statuses.

The bits that are true indicate that the listener will be called back for changes in the corresponding status.

If you want to listen for specific statuses (not DDS::StatusMask::STATUS_MASK_ALL or DDS::StatusMask::STATUS_MASK_NONE), you must cast StatusKind to a StatusMask. The following example shows how to do so:

DDS.StatusMask mask =
(DDS.StatusMask.STATUS_MASK_NONE |
(DDS.StatusMask)DDS.StatusKind.DATA_AVAILABLE_STATUS);
enum DDS::StatusKind : UINT32

Type for status kinds.

Each concrete DDS::Entity is associated with a set of *Status objects whose values represent the communication status of that DDS::Entity.

The communication statuses whose changes can be communicated to the application depend on the DDS::Entity.

Each status value can be accessed with a corresponding method on the DDS::Entity. The changes on these status values cause activation of the corresponding DDS::StatusCondition objects and trigger invocation of the proper DDS::Listener objects to asynchronously inform the application.

If you want to listen for specific statuses (not DDS::StatusMask::STATUS_MASK_ALL or DDS::StatusMask::STATUS_MASK_NONE), you must cast StatusKind to a StatusMask. The following example shows how to do so:

DDS.StatusMask mask =
(DDS.StatusMask.STATUS_MASK_NONE |
(DDS.StatusMask)DDS.StatusKind.DATA_AVAILABLE_STATUS);
See Also
DDS::Entity, DDS::StatusCondition, DDS::Listener

RTI Connext .Net APIs Version 5.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc