Initialize a provider
Synopsis:
#include <pips/pips.h>
int pips_init_provider(pips_provider_t *provider,
const char *opt_name,
const char *options)
Arguments:
- provider
- A handle to the provider implementation to initialize. This handle must be obtained from the framework before it can be used to initialize the provider.
- opt_name
- The client name to associate with the initialized provider. If this argument is NULL, the default name of PiPS will be associated with the provider.
- options
- A string with a comma-separated list of initialization options. Each option may be a single token or a token-value pair separated by an equal sign.
Library:
pips-client
Description:
This function initializes the named publish/subscribe provider to make it available for use by clients. This step is required because registered providers aren't necessarily ready to communicate with their publish/subscribe middleware. Calling this function also lets clients pass command-line arguments to the provider to configure its initial state.
Returns:
- EOK
- The provider was successfully initialized
- -1
- An error occurred (errno is set)
Errors:
- EBUSY: The provider has already been initialized.
- ENODEV: The provider is invalid.
- ENOSYS: The provider implementation does not define an initialization function.
Provider implementations may also set specialized error codes to indicate lower-level errors.