RTI Connext C API Version 7.4.0
DDS_LivelinessQosPolicy Struct Reference

Specifies and configures the mechanism that allows DDS_DataReader entities to detect when DDS_DataWriter entities become disconnected or "dead.". More...

Data Fields

DDS_LivelinessQosPolicyKind kind
 <<basic>> <<spec>> The kind of liveliness desired. More...
 
struct DDS_Duration_t lease_duration
 <<basic>> <<spec>> The duration within which a DDS_DataWriter must be asserted, or else it is assumed to be not alive. More...
 
DDS_Long assertions_per_lease_duration
 <<basic>> <<extension>> The number of assertions a DDS_DataWriter will send during a its DDS_LivelinessQosPolicy::lease_duration. More...
 

Detailed Description

Specifies and configures the mechanism that allows DDS_DataReader entities to detect when DDS_DataWriter entities become disconnected or "dead.".

The liveliness status of a DDS_DataWriter is used to maintain instance ownership in combination with the setting of the OWNERSHIP policy. The application is also informed via DDS_Listener when an DDS_DataWriter is no longer alive.

A DDS_DataWriter commits to signalling its liveliness at intervals not to exceed the DDS_LivelinessQosPolicy::lease_duration configured on the DDS_DataWriter. The rate at which the DDS_DataWriter will signal its liveliness is defined by DDS_LivelinessQosPolicy::assertions_per_lease_duration.

The DDS_DataReader lease_duration specifies the maximum period at which matching DataWriters must have their liveliness asserted.

In addition, in the subscribing application Connext DDS uses an internal thread that wakes up at the period set by the DataReader's lease_duration to see if a DataWriter lease_duration has been violated.

Important: The DataReader lease_duration only configures how often a DataReader will check the liveliness of the matching DataWriters. The DataWriter lease_duration configures the period at which a DataWriter must assert its liveliness and is the value that the DataReader uses to determine if a matching DataWriter is alive or not.

Listeners are used to notify a DDS_DataReader of loss of liveliness and DDS_DataWriter 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 DDS_DataWriter 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 runtime to detect when systems are performing outside of design specifications. Receiving applications can take appropriate actions in response to disconnected DataWriters.

Entity:
DDS_Topic, DDS_DataReader, DDS_DataWriter
Status:
DDS_LIVELINESS_LOST_STATUS, DDS_LivelinessLostStatus;
DDS_LIVELINESS_CHANGED_STATUS, DDS_LivelinessChangedStatus;
DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS, DDS_OFFERED_INCOMPATIBLE_QOS_STATUS
Properties:
RxO = YES
Changeable = UNTIL ENABLE

Usage

This policy controls the mechanism and parameters used by RTI Connext to ensure that particular DataWriters on the network are still alive. The liveliness can also affect the ownership of a particular instance, as determined by the OWNERSHIP policy.

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 DDS_DomainParticipant is running and the link connecting it to remote participants remains connected, the entities within the DDS_DomainParticipant 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 DDS_Entity is still alive. The action can be explicit by calling the DDS_DataWriter_assert_liveliness operation or implicit by writing some data.

The two possible manual settings control the granularity at which the application must assert liveliness.

Changes in LIVELINESS must be detected by the Service with a time-granularity greater or equal to the DDS_LivelinessQosPolicy::lease_duration. This ensures that the value of the DDS_LivelinessChangedStatus is updated at least once during each lease_duration and the related Listeners and DDS_WaitSet s are notified within a lease_duration from the time the LIVELINESS changed.

Compatibility

The value offered is considered compatible with the value requested if and only if the following conditions are met:

See also
Relationship between registration, liveliness and ownership

Field Documentation

◆ kind

DDS_LivelinessQosPolicyKind DDS_LivelinessQosPolicy::kind

<<basic>> <<spec>> The kind of liveliness desired.

[default] DDS_AUTOMATIC_LIVELINESS_QOS

Categories
Immutable, Discovery Metadata, Matching, Liveliness

◆ lease_duration

struct DDS_Duration_t DDS_LivelinessQosPolicy::lease_duration

<<basic>> <<spec>> The duration within which a DDS_DataWriter must be asserted, or else it is assumed to be not alive.

For a DataWriter, the lease_duration specifies a timeout by which liveliness must be asserted for the DataWriter, or the DataWriter will be considered inactive or not alive.

For a DataReader, the lease_duration specifies the maximum period at which the DataReader will check to see if the matching DataWriters are still alive according to the DataWriters lease_duration value.

Important: The DataWriter lease_duration is the value that the DataReader uses to determine if a matching DataWriter is alive or not.

[default] DDS_DURATION_INFINITE

[range] [0,1 year] or DDS_DURATION_INFINITE

Categories
Immutable, Discovery Metadata, Matching, Liveliness

◆ assertions_per_lease_duration

DDS_Long DDS_LivelinessQosPolicy::assertions_per_lease_duration

<<basic>> <<extension>> The number of assertions a DDS_DataWriter will send during a its DDS_LivelinessQosPolicy::lease_duration.

This field only applies to a DDS_DataWriter and is not considered during QoS compatibility checks.

The default value is 3. A higher value will make the liveliness mechanism more robust against packet losses, but it will also increase the network traffic.

[default] 3

[range] [2, 100 million]

Categories
Immutable, Liveliness