Updated: April 19, 2023 |
Create a topic in the current namespace
#include <pips/publication.h>
pips_topic_t* pips_namespace_create_topic(pips_namespace_t *nmspace, const char *topic_name, const char *opt_type_name)
This function creates a topic in the current namespace using the publish/subscribe provider associated with the namespace. If a particular type is requested, the new topic will be an instance of that type; otherwise, it will be an instance of the provider's default type.
On success, a pointer to the pips_topic_t structure representing the new topic. The caller owns this topic and hence, is responsible for deleting its memory using pips_delete_topic(). On error, this function returns NULL and sets errno.
Additional error codes may be set by the provider implementation.