EMI_GetCustomDataPtr (EMI Function)
- Updated2023-03-14
- 1 minute(s) read
EMI_GetCustomDataPtr (EMI Function)
Owning Class: Custom Data
Requires: Control Design and Simulation Module
Prototype
void* EMI_GetCustomDataPtr(emiRef model);
Description
Returns a pointer to the custom data you associate with an external model.
Inputs
| Name | Description |
|---|---|
| model | Specifies a reference to the external model. Use this reference as an input to other EMI functions. Do not modify model directly. |
Return Value
Returns a pointer to the custom data you associate with the model.
Examples
void EMI_CB_InitializeModel(emiRef model) {
/* allocate custom data */
EMI_SetCustomDataPtr(model, malloc(sizeof(long)));
}
void EMI_CB_FinalizeModel(emiRef model) {
/* free custom data */
free(EMI_GetCustomDataPtr(model));
}
Related Topics
EMI_CB_FinalizeModel
EMI_CB_InitializeModel
EMI_SetCustomDataPtr