API function definitions for controlling the plug-in 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 plug-in. More... | |
| MVLibExport MVCode_t | MV_Plugin_SetUserData (MVPlugin_t handle, void *pUserData) |
| Sets the plug-in's user data. More... | |
| MVLibExport MVCode_t | MV_Plugin_GetUserData (MVPlugin_t handle, void **pUserData) |
| Gets the plug-in's user data. More... | |
| MVLibExport MVCode_t | MV_Plugin_GetConfig (MVPlugin_t handle, MVPluginConfig_t *pConfig) |
| Gets the plug-in's configuration. More... | |
| MVLibExport void | MV_PluginConfig_Clear (MVPluginConfig_t *pConfig) |
| Destroys the plug-in's configuration. More... | |
API function definitions for controlling the plug-in 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 plug-in 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 plug-in's configuration.
| [in] | handle | is the Communicator handle for the plug-in 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 plug-in.
Upon registration with the Communicator, plug-ins are assigned a unique identifier.
| [in] | handle | is the Communicator handle for the plug-in instance. |
| MVLibExport MVCode_t MV_Plugin_GetUserData | ( | MVPlugin_t | handle, |
| void ** | pUserData | ||
| ) |
Gets the plug-in's user data.
Recalls the void pointer to the user data previously associated with the plug-in 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 plug-in instance. |
| [out] | pUserData | points to the pointer which is set to the plug-in'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 plug-in's user data.
Plug-ins 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 plug-in handle. Plug-ins are responsible for freeing that allocation again, typically in MVStop or MVClose.
| [in] | handle | is the Communicator handle for the plug-in 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 plug-in'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 plug-in's configuration that is no longer needed. |