Function rcl_publisher_assert_liveliness

Function Documentation

rcl_ret_t rcl_publisher_assert_liveliness(const rcl_publisher_t *publisher)

Manually assert that this Publisher is alive (for RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC)

If the rmw Liveliness policy is set to RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC, the creator of this publisher may manually call assert_liveliness at some point in time to signal to the rest of the system that this Node is still alive. This function must be called at least as often as the qos_profile’s liveliness_lease_duration

Attribute

Adherence

Allocates Memory

No

Thread-Safe

Yes

Uses Atomics

No

Lock-Free

Yes

Parameters:

publisher[in] handle to the publisher that needs liveliness to be asserted

Returns:

RCL_RET_OK if the liveliness assertion was completed successfully, or

Returns:

RCL_RET_PUBLISHER_INVALID if the publisher is invalid, or

Returns:

RCL_RET_ERROR if an unspecified error occurs.