Function rcl_publisher_get_subscription_count
Defined in File publisher.h
Function Documentation
-
rcl_ret_t rcl_publisher_get_subscription_count(const rcl_publisher_t *publisher, size_t *subscription_count)
Get the number of subscriptions matched to a publisher.
Used to get the internal count of subscriptions matched to a publisher.
Attribute
Adherence
Allocates Memory
No
Thread-Safe
Yes
Uses Atomics
Maybe [1]
Lock-Free
Maybe [1]
- Parameters:
publisher – [in] pointer to the rcl publisher
subscription_count – [out] number of matched subscriptions
- Returns:
RCL_RET_OK if the count was retrieved, or
- Returns:
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
- Returns:
RCL_RET_PUBLISHER_INVALID if the publisher is invalid, or
- Returns:
RCL_RET_ERROR if an unspecified error occurs.