|The kind of liveliness desired. |
|The duration within which a DDSEntity must be asserted, or else it is assumed to be not alive. |
Liveliness must be asserted at least once every
lease_duration otherwise RTI Connext will assume the corresponding DDSEntity or is no longer alive.
The liveliness status of a DDSEntity is used to maintain instance ownership in combination with the setting of the OWNERSHIP policy. The application is also informed via DDSListener when an DDSEntity is no longer alive.
A DDSDataReader requests that liveliness of writers is maintained by the requested means and loss of liveliness is detected with delay not to exceed the
A DDSDataWriter commits to signalling its liveliness using the stated means at intervals not to exceed the
Listeners are used to notify a DDSDataReader of loss of liveliness and DDSDataWriter of violations to the liveliness contract. The on_liveliness_lost() callback is only called once, after the first time the
lease_duration is exceeded (when the DDSDataWriter first loses liveliness).
This QoS policy can be used during system integration to ensure that applications have been coded to meet design specifications. It can also be used during run time to detect when systems are performing outside of design specifications. Receiving applications can take appropriate actions in response to disconnected DataWriters.
This policy has several settings to support both data types that are updated periodically as well as those that are changed sporadically. It also allows customisation for different application requirements in terms of the kinds of failures that will be detected by the liveliness mechanism.
The DDS_AUTOMATIC_LIVELINESS_QOS liveliness setting is most appropriate for applications that only need to detect failures at the process-level, but not application-logic failures within a process. RTI Connext takes responsibility for renewing the leases at the required rates and thus, as long as the local process where a DDSDomainParticipant is running and the link connecting it to remote participants remains connected, the entities within the DDSDomainParticipant will be considered alive. This requires the lowest overhead.
The manual settings (DDS_MANUAL_BY_PARTICIPANT_LIVELINESS_QOS, DDS_MANUAL_BY_TOPIC_LIVELINESS_QOS) require the application on the publishing side to periodically assert the liveliness before the lease expires to indicate the corresponding DDSEntity is still alive. The action can be explicit by calling the DDSDataWriter::assert_liveliness operation or implicit by writing some data.
The two possible manual settings control the granularity at which the application must assert liveliness.
lease_duration. This ensures that the value of the DDS_LivelinessChangedStatus is updated at least once during each
lease_durationand the related Listeners and DDSWaitSet s are notified within a
lease_durationfrom the time the LIVELINESS changed.
lease_durationevaluates to DDS_BOOLEAN_TRUE.
The kind of liveliness desired.