API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IPARAMETERS_SETPARAM()

Brew Release
Brew MP 1.0.2
See Also
IParametersRO_GetParam()
Description
This method sets a parameter value
Params
me
[]:
The interface pointer
nId
[]:
[in] the parameter to set
pParam
[]:
[in] points to data / buffer to set
uParamLen
[]:
[in] size of the data pointed to by pParam
Interface
Prototype
  •    IParameters_SetParam(IParameters *me,
                            int nId, const void *pParam,
                            unsigned uParamLen)
    
Return
  • AEE_SUCCESS: if the data is copied AEE_ENOSUCH: if the parameter ID is not known AEE_EREADONLY: can get parameter, but not set it AEE_ENOMEMORY: can't allocate heap memory to store param
    Other return values per implementation or parameter type
Side Effect
  • None
Comments
The standard behavior is to copy the data pointed to by pParam. The number of bytes given in uParamLen are copied. The caller can assume the data has been copied and doesn't have to manage the lifetime of the data any further. Exceptions to this rule are allowed if clearly documented. One standard exception is the passing of a ref counted object. pParam points to the object. uParamLen is the length of the pointer to the object. When values of this type are set their reference count is increased by calling AddRef on the object. Another exception is when only the pointer is copied and not the data. Here the caller must manage the lifetime of the pointer explicitly. In this case the length in uParamLen is the size of the data pointed to. This must be clearly documented.