pips_provider_find_entity()

Updated: October 26, 2022

Find an entity from its fully qualified name

Synopsis:

#include <pips/pips.h>
pips_entity_t* pips_provider_find_entity(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 entity to retrieve
opt_separator
The string used to separate the elements of the fully qualified path. If no separator string is provided, the default separator will be used. The default separator can be set in the global PiPS configuration file.

Library:

pips-client

Description:

This function attempts to resolve the given path, starting from the root namespace of the current provider, to find the entity thereby designated. The path may designate either a topic or a namespace. If provided, the specified separator is used to delineate the namespace and topic elements of the path.

Returns:

On success, a pointer to the entity 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.
  • ENOENT: The provider's namespace does not contain an entity designated by the given path.