Function rcl_service_get_service_name

Function Documentation

const char *rcl_service_get_service_name(const rcl_service_t *service)

Get the topic name for the service.

This function returns the service’s internal topic name string. This function can fail, and therefore return NULL, if the:

  • service is NULL

  • service is invalid (never called init, called fini, or invalid)

The returned string is only valid as long as the service 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:

service[in] the pointer to the service

Returns:

name string if successful, otherwise NULL