Get an entity's fully qualified name
Synopsis:
#include <pips/publication.h>
int pips_entity_path(pips_entity_t *const entity,
const char *separator,
char *opt_buffer,
size_t buffer_size)
Arguments:
- entity
- A pointer to the entity whose fully qualified name is requested. The entity can be either a namespace or topic.
- separator
- A pointer to the separator used to delineate the components in the entity's name
- opt_buffer
- A pointer to memory for storing the name. This argument can be NULL, to request that the function calculate the name size but not write any data.
- buffer_size
- If opt_buffer is non-NULL, this argument indicates the maximum amount of data that can be written to the buffer
Library:
pips-client
Description:
This function writes the fully qualified name of the current entity into the given buffer. The fully qualified name contains the names of all parent namespaces, starting from the provider's root namespace, appended with the entity's name.
Returns:
On success, the length of the C-string storing the entity's fully qualified name (or needed to store it). On error, -1 (errno is set).
Errors:
- EINVAL: The separator argument is invalid.
- ENOBUFS: The output buffer is too small to hold the name.