![]() |
OpenSplice ISO C++ 2 DCPS
v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
The communication statuses whose changes can be communicated to the application depend on the Entity. The following table shows for each entity the statuses that are relevant.
Entity | Status Name | Meaning |
---|---|---|
Topic | INCONSISTENT_TOPIC | Another topic exists with the same name but different characteristics. |
Subscriber | DATA_ON_READERS | New information is available. |
DataReader | SAMPLE_REJECTED | A received sample has been rejected |
LIVELINESS_CHANGED | The liveliness of one or more DataWriter that were writing instances read through the DataReader has changed. Some DataWriter have become “active” or “inactive.” | |
REQUESTED_DEADLINE_MISSED | The deadline that the DataReader was expecting through its QoSPolicy DEADLINE was not respected for a specific instance. | |
REQUESTED_INCOMPATIBLE_QOS | A QosPolicy value was incompatible with what is offered. | |
DATA_AVAILABLE | New information is available. | |
SAMPLE_LOST | A sample has been lost (never received). | |
SUBSCRIPTION_MATCHED | The DataReader has found a DataWriter that matches the Topic and has compatible QoS, or has ceased to be matched with a DataWriter that was previously considered to be matched. | |
DataWriter | LIVELINESS_LOST | The liveliness that the DataWriter has committed through its QosPolicy LIVELINESS was not respected; thus DataReader entities will consider the DataWriter as no longer “active.” |
OFFERED_DEADLINE_MISSED | The deadline that the DataWriter has committed through its QosPolicy DEADLINE was not respected for a specific instance. | |
OFFERED_INCOMPATIBLE_QOS | A QosPolicy value was incompatible with what was requested. | |
PUBLICATION_MATCHED | The DataWriter has found DataReader that matches the Topic and has compatible QoS, or has ceased to be matched with a DataReader that was previously considered to be matched. |
Those statuses may be classified in:
Associated with each one of an 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.
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 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 NO-OP and the act of calling the 'nil' listener does not reset the communication status.
For example, the value of the StatusChangedFlag associated with the REQUESTED_DEADLINE_MISSED status will become TRUE each time new deadline occurs (which increases the total_count field within RequestedDeadlineMissedStatus). The value changes to FALSE when the application accesses the status via the corresponding get_requested_deadline_missed_status method on the proper Entity.
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 ViewState, SampleState, or InstanceState of any existing sample changes for any reason other than a call to DataReader::read, DataReader::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: