API functions for plugin configuration. More...
Functions | |
| MVLibExport MVCode_t | MV_PluginUserParameterDescription_AddUserParameter (MVPluginUserParameterDescription_t description, const char *parameter, MVValue_t value) |
Adds a user parameter with the unique identifier param to description. More... | |
| MVLibExport MVCode_t | MV_PluginUserParameterDescription_SetPresentationProperty (MVPluginUserParameterDescription_t description, const char *parameter, MVPluginParameterPresentationProperty_t property, MVValue_t value) |
| Specifies how the user parameter is presented to the user in the configuration interface. More... | |
| MVLibExport MVCode_t | MV_PluginUserParameterDescription_ImposeConstraint (MVPluginUserParameterDescription_t description, const char *parameter, MVPluginParameterConstraint_t constraint, MVValue_t value) |
| Enforces the user parameter values to meet certain requirements. More... | |
| MVLibExport MVCode_t | MV_PluginConfig_GetParameter (MVPluginConfig_t config, uint32_t parameter, MVValue_t *pValue) |
| Gets a parameter value from a plug-in configuration. More... | |
| MVLibExport MVCode_t | MV_PluginConfig_GetUserParameter (MVPluginConfig_t config, const char *parameter, MVValue_t *pValue) |
| Retrieves the currently set value of a user parameter stored in the given configuration. More... | |
| MVLibExport MVCode_t | MV_PluginConfigValidation_SetMessage (MVPluginConfigValidation_t validation, MVPluginConfigValidationErrorState_t level, const char *message) |
| Sets a message for the configuration. More... | |
| MVLibExport MVCode_t | MV_PluginConfigValidation_DisableUserParameter (MVPluginConfigValidation_t validation, const char *parameter) |
| Marks a user parameter as disabled. More... | |
| MVLibExport MVCode_t | MV_PluginConfigValidation_SetUserParameterErrorState (MVPluginConfigValidation_t validation, const char *parameter, MVPluginConfigValidationErrorState_t level) |
| Sets the error state of a user parameter. More... | |
API functions for plugin configuration.
| MVLibExport MVCode_t MV_PluginConfig_GetParameter | ( | MVPluginConfig_t | config, |
| uint32_t | parameter, | ||
| MVValue_t * | pValue | ||
| ) |
Gets a parameter value from a plug-in configuration.
| [in] | config | is the MVPluginConfig_t that is queried. |
| [in] | parameter | identifies the parameter which is retrieved from the plug-in's configuration. Currently, only the plug-in access level can be retrieved through MV_PARAM_CONFIG_ACCESS_LEVEL. |
| [out] | pValue | points to a MVValue_t which is then initialized to a copy of the desired plug-in configuration parameter. |
pValue was successfully initialized to a copy of the specified parameter. It is the caller's obligation to destroy the value by MV_Value_Clear(). config is NULL. Make sure to pass the handle which has been retrieved from MV_Plugin_GetConfig().pValue is NULL. Make sure it points to an uninitialized variable of type MVValue_t. parameter key does not apply to plug-in configurations. | MVLibExport MVCode_t MV_PluginConfig_GetUserParameter | ( | MVPluginConfig_t | config, |
| const char * | parameter, | ||
| MVValue_t * | pValue | ||
| ) |
Retrieves the currently set value of a user parameter stored in the given configuration.
| [in] | config | is the MVPluginConfig_t that is queried. |
| [in] | parameter | identifies the user parameter whose value is retrieved. |
| [out] | pValue | points to the MVValue_t in which the parameter value is stored. |
pValue was successfully initialized to a copy of the specified user parameter. It is the caller's obligation to destroy the value by MV_Value_Clear(). config is NULL. Make sure to pass the handle which has been retrieved from MV_Plugin_GetConfig(). pValue is NULL. Make sure it points to an uninitialized variable of type MVValue_t. parameter has not been exposed to the user parameter description. | MVLibExport MVCode_t MV_PluginConfigValidation_DisableUserParameter | ( | MVPluginConfigValidation_t | validation, |
| const char * | parameter | ||
| ) |
Marks a user parameter as disabled.
Disabled parameters cannot be interacted with. They are commonly displayed grayed out. This could be used, for example, when the value of a different parameter invalidates this parameter or when the parameter in question only applies to certain models of a hardware device and does not apply to the connected device.
| [in] | validation | is the validation structure accumulating the validation results. |
| [in] | parameter | is the identifier of the parameter that is marked as disabled. |
validation is NULL. Make sure to pass the handle which MVValidate has been called with. parameter has not been exposed to the user parameter description. | MVLibExport MVCode_t MV_PluginConfigValidation_SetMessage | ( | MVPluginConfigValidation_t | validation, |
| MVPluginConfigValidationErrorState_t | level, | ||
| const char * | message | ||
| ) |
Sets a message for the configuration.
The message refers to the plug-in configuration in its entirety. A faulty plug-in configuration, involving one or multiple parameter values, is marked with with a warning or error symbol in the configuration interface.
| [in] | validation | is the validation structure accumulating the validation results. |
| [in] | level | is the error level. |
| [in] | message | is the UTF-8 encoded string representing the message. |
validation is NULL. Make sure to pass the handle which MVValidate has been called with. level is not valid. | MVLibExport MVCode_t MV_PluginConfigValidation_SetUserParameterErrorState | ( | MVPluginConfigValidation_t | validation, |
| const char * | parameter, | ||
| MVPluginConfigValidationErrorState_t | level | ||
| ) |
Sets the error state of a user parameter.
Erroneous parameters are marked with a warning or error symbol in the configuration interface.
It is recommended to subsequently call MV_PluginConfigValidation_SetMessage() with the same error level to give a detailed explanation about the issue.
| [in] | validation | is the validation structure accumulating the validation results. |
| [in] | parameter | is the identifier of the user parameter that is marked as erroneous. |
| [in] | level | is the error level. |
validation is NULL. Make sure to pass the handle which MVValidate has been called with. level is not valid. parameter has not been exposed to the user parameter description. | MVLibExport MVCode_t MV_PluginUserParameterDescription_AddUserParameter | ( | MVPluginUserParameterDescription_t | description, |
| const char * | parameter, | ||
| MVValue_t | value | ||
| ) |
Adds a user parameter with the unique identifier param to description.
The operation is performed instantly and the parameter description is changed accordingly.
| [in] | description | is the MVPluginUserParameterDescription_t to which the parameter is added. |
| [in] | parameter | is the unique identifier for the parameter. |
| [in] | value | is the default value for the parameter. Only scalar values of numeric types, boolean, or string are supported. |
description. description is NULL. Make sure to pass the handle which MVExpose has been called with. value is NULL. Make sure to properly initialize it using MV_Value_Scalar_Init() or MV_Value_Array_Init().parameter contains characters which are not allowed. Only alphanumeric characters, dashes (-) and underscores (_) are permissible. parameter has already been added to the description. value is not a scalar. Currently, only scalar user parameters are supported. value is not of a data type which is supported. In particular, user parameter must be of fixed data type; e.g. eMVDataType_Variant is not eligible. | MVLibExport MVCode_t MV_PluginUserParameterDescription_ImposeConstraint | ( | MVPluginUserParameterDescription_t | description, |
| const char * | parameter, | ||
| MVPluginParameterConstraint_t | constraint, | ||
| MVValue_t | value | ||
| ) |
Enforces the user parameter values to meet certain requirements.
| [in] | description | is the MVPluginUserParameterDescription_t containing the parameter |
| [in] | parameter | is the unique identifier for the parameter. |
| [in] | constraint | is the type of constraint that is enforced. |
| [in] | value | contains the value(s) for the constraint. The exact format depends on the constraint. See the documentation of MVPluginParameterConstraint_t for the required format. |
description is NULL. Make sure to pass the handle which MVExpose has been called with. value is NULL. Make sure to properly initialize it using MV_Value_Scalar_Init() or MV_Value_Array_Init(). constraint type is unknown. parameter has not yet been added to the description. value does not match the requirement for the selected type of constraint. value does not match the requirement for the selected type of constraint. value does not define a reasonable constraint. This may indicate that the constraint does not permit any valid values or that the initial default value of the parameter does not obey the constraint. | MVLibExport MVCode_t MV_PluginUserParameterDescription_SetPresentationProperty | ( | MVPluginUserParameterDescription_t | description, |
| const char * | parameter, | ||
| MVPluginParameterPresentationProperty_t | property, | ||
| MVValue_t | value | ||
| ) |
Specifies how the user parameter is presented to the user in the configuration interface.
Depending on the enum value of the property parameter, one of the following presentation properties can be manipulated:
value is a scalar String value.value is a scalar String value.value is a scalar String value.value is a scalar String value.value is a scalar UInt32 value corresponding to an enumerator in MVPluginParameterWidget_t.MVExpose will replace its previous value.| [in] | description | is the MVPluginUserParameterDescription_t containing the parameter. |
| [in] | parameter | is the unique identifier for the parameter. |
| [in] | property | is the presentation property that is changed |
| [in] | value | contains the value for the presentation property. The exact format depends on the property. See documentation of MVPluginParameterPresentationProperty_t for the required format. |
description is NULL. Make sure to pass the handle which MVExpose has been called with. value is NULL. Make sure to properly initialize it using MV_Value_Scalar_Init() or MV_Value_Array_Init(). property is unknown. parameter has not yet been added to the description. value is not a scalar. For now, only scalar values are allowed for presentation properties. value does not match the requirement for the selected presentation property.