pips_namespace_find_topic()

Updated: April 19, 2023

Find a topic in the current namespace

Synopsis:

#include <pips/publication.h>
pips_topic_t* pips_namespace_find_topic(pips_namespace_t *const nmspace,
                                        const char *name)

Arguments:

nmspace
A pointer to the namespace to search
name
The name of the topic to find

Library:

pips-client

Description:

This function searches the list of entities managed by the current namespace instance to find the specified topic. This is a convenience function that finds an entity and attempts to cast it to a topic.

Returns:

On success, a pointer to the named topic whose parent is the current namespace. If no such topic is found, or an error occurs while searching, this function returns NULL and sets errno.

Errors:

  • EINVAL: The namespace or topic name is invalid.
  • ENOENT: The named entity was not found in the current namespace.
  • ENOTTY: The named entity is not a topic.