API function definitions for controlling the plugin instance. More...
Functions | |
| MVLibExport void | MV_Log (MVPlugin_t handle, MVSeverityLevel_t severity, const char *message) |
| Logs a message of given severity. More... | |
| MVLibExport const char * | MV_GetMVCodeString (MVCode_t code) |
| Gets a constant string representation of the MVCode_t return code. More... | |
| MVLibExport const char * | MV_GetMVCodeMessage (MVCode_t code) |
| Gets the plain text documentation of the MVCode_t return code. More... | |
| MVLibExport uint32_t | MV_Plugin_GetId (MVPlugin_t handle) |
| Gets the ID of the calling plugin. More... | |
| MVLibExport MVCode_t | MV_Plugin_SetUserData (MVPlugin_t handle, void *pUserData) |
| Sets the plugin's user data. More... | |
| MVLibExport MVCode_t | MV_Plugin_GetUserData (MVPlugin_t handle, void **pUserData) |
| Gets the plugin's user data. More... | |
| MVLibExport MVCode_t | MV_Plugin_GetConfig (MVPlugin_t handle, MVPluginConfig_t *pConfig) |
| Gets the plugin's configuration. More... | |
| MVLibExport void | MV_PluginConfig_Clear (MVPluginConfig_t *pConfig) |
| Destroys the plugin's configuration. More... | |
API function definitions for controlling the plugin instance.
| MVLibExport const char * MV_GetMVCodeMessage | ( | MVCode_t | code | ) |
| MVLibExport const char * MV_GetMVCodeString | ( | MVCode_t | code | ) |
| MVLibExport void MV_Log | ( | MVPlugin_t | handle, |
| MVSeverityLevel_t | severity, | ||
| const char * | message | ||
| ) |
Logs a message of given severity.
| [in] | handle | is the Communicator handle for the plugin instance. |
| [in] | severity | is the log level; one of eMVSeverity_Debug, eMVSeverity_Info, eMVSeverity_Warning, eMVSeverity_Error, or eMVSeverity_Critical. |
| [in] | message | is the string that is logged. |
| MVLibExport MVCode_t MV_Plugin_GetConfig | ( | MVPlugin_t | handle, |
| MVPluginConfig_t * | pConfig | ||
| ) |
Gets the plugin's configuration.
| [in] | handle | is the Communicator handle for the plugin instance. |
| [out] | pConfig | points to the MVPluginConfig_t variable in which the configuration is stored. |
pConfig. handle or the pointer pConfig are not valid. | MVLibExport uint32_t MV_Plugin_GetId | ( | MVPlugin_t | handle | ) |
Gets the ID of the calling plugin.
Upon registration with the Communicator, plugins are assigned a unique identifier.
| [in] | handle | is the Communicator handle for the plugin instance. |
| MVLibExport MVCode_t MV_Plugin_GetUserData | ( | MVPlugin_t | handle, |
| void ** | pUserData | ||
| ) |
Gets the plugin's user data.
Recalls the void pointer to the user data previously associated with the plugin handle. The pointer must be cast to the appropriate type for the implementation-defined user data structure.
Usage:
| [in] | handle | is the Communicator handle for the plugin instance. |
| [out] | pUserData | points to the pointer which is set to the plugin's user data structure. |
handle. handle is not valid. pUserData is NULL. | MVLibExport MVCode_t MV_Plugin_SetUserData | ( | MVPlugin_t | handle, |
| void * | pUserData | ||
| ) |
Sets the plugin's user data.
Plugins may store their internal state in an implementation-defined struct which is typically allocated in MVOpen or MVStart. This function is then used to associate an opaque pointer to this user data with the plugin handle. Plugins are responsible for freeing that allocation again, typically in MVStop or MVClose.
| [in] | handle | is the Communicator handle for the plugin instance. |
| [in] | pUserData | points to the user data memory that is associated with the handle. |
handle. handle is not valid. | MVLibExport void MV_PluginConfig_Clear | ( | MVPluginConfig_t * | pConfig | ) |
Destroys the plugin's configuration.
pConfig to NULL. In particular, it does not free any memory since MV_Plugin_GetConfig() does not allocate a copy but merely provides a view into the original and calling this function is no longer required.| [in,out] | pConfig | points to the plugin's configuration that is no longer needed. |