Updated: October 26, 2022

Create a topic from a fully qualified name


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


A handle to the current provider
The topic's fully qualified name, as a path relative to the provider's root namespace
The name of the registered type of which the topic will be an instance
An optional pointer to a string used to separate entities (i.e., namespaces and the topic) in the path. For example, if opt_separator contains -|-, the function expects the topic to be specified as rootnamespace-|-subnamespace-|-topicname. This argument can be NULL if the path contains only a topic name.




This function creates the named topic for the current provider. The topic's name is fully qualified, meaning it's given as a path relative to the root namespace and can enumerate sub-namespaces in which the topic can be created.

These namespaces are delineated from each other and the topic name using the specified separator string. If no such string is given, the entire path string is used as the topic name.

Any non-existent namespaces will be created by this function and owned by the provider.


On success, a handle to the newly created topic. The topic is then owned by the caller, who is responsible for freeing its memory. On error, NULL (errno is set).


The following errors can be generated by the framework:
  • EINVAL: The topic name is invalid.
  • ENODEV: The namespace is invalid or doesn't contain the given provider.
  • ENOENT: The specified type name isn't registered with the namespace's provider.
  • EEXIST: An entity already exists for the given path.

Additional error codes may be set by the provider implementation.