Class LivelinessQosPolicy

Inheritance Relationships

Base Types

Class Documentation

class LivelinessQosPolicy : public eprosima::fastdds::dds::Parameter_t, public eprosima::fastdds::dds::QosPolicy

Determines the mechanism and parameters used by the application to determine whether an Entity is “active” (alive). The “liveliness” status of an Entity is used to maintain instance ownership in combination with the setting of the OwnershipQosPolicy. The application is also informed via listener when an Entity is no longer alive.

The DataReader requests that liveliness of the writers is maintained by the requested means and loss of liveliness is detected with delay not to exceed the lease_duration.

The DataWriter commits to signaling its liveliness using the stated means at intervals not to exceed the lease_duration. Listeners are used to notify the DataReaderof loss of liveliness and DataWriter of violations to the liveliness contract.

Public Functions

inline RTPS_DllAPI LivelinessQosPolicy()

Constructor.

virtual RTPS_DllAPI ~LivelinessQosPolicy() = default

Destructor.

inline bool operator==(const LivelinessQosPolicy &b) const
inline virtual void clear() override

Clears the QosPolicy object.

Public Members

LivelinessQosPolicyKind kind

Liveliness kind

By default, AUTOMATIC_LIVELINESS.

fastrtps::Duration_t lease_duration

Period within which liveliness should be asserted. On a DataWriter it represents the period it commits to signal its liveliness. On a DataReader it represents the period without assertion after which a DataWriter is considered inactive. By default, c_TimeInfinite.

fastrtps::Duration_t announcement_period

The period for automatic assertion of liveliness. Only used for DataWriters with AUTOMATIC liveliness. By default, c_TimeInfinite.

Warning

When not infinite, must be < lease_duration, and it is advisable to be less than 0.7*lease_duration.