pips_provider_find_topic()

Updated: October 26, 2022

Find a topic from its fully qualified name

Synopsis:

#include <pips/pips.h>
pips_topic_t* pips_provider_find_topic(const pips_provider_t *provider,
                                       const char *path,
                                       const char *opt_separator)

Arguments:

provider
A pointer to the current provider
path
The path, relative to the provider's root namespace, designating the topic to retrieve
opt_separator
An optional string used to separate the elements of the fully qualified path

Library:

pips-client

Description:

This convenience function searches the current provider's root namespace for the named entity, and returns that entity if it's a topic instance. This function is the equivalent to the following:
   pips_topic_narrow( pips_provider_find_entity( ... ) )

Returns:

On success, a pointer to the topic in the provider's root namespace designated by the fully qualified path. On error, NULL (errno is set).

Errors:

  • ENODEV: The provider is invalid.
  • EINVAL: The path specification or the separator is invalid.
  • ENOTDIR: The path designates an entity nested within a topic (i.e., one of the sub-elements is a topic entity).
  • ENOENT: The provider's namespace does not contain a topic designated by the given path.