Function rcl_subscription_get_topic_name
Defined in File subscription.h
Function Documentation
-
const char *rcl_subscription_get_topic_name(const rcl_subscription_t *subscription)
Get the topic name for the subscription.
This function returns the subscription’s internal topic name string. This function can fail, and therefore return
NULL
, if the:subscription is
NULL
subscription is invalid (never called init, called fini, or invalid)
The returned string is only valid as long as the subscription is valid. The value of the string may change if the topic name changes, and therefore copying the string is recommended if this is a concern.
Attribute
Adherence
Allocates Memory
No
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
- Parameters:
subscription – [in] the pointer to the subscription
- Returns:
name string if successful, otherwise
NULL