LabVIEW Control Design and Simulation Module

EMI_SetCustomDataPtr (EMI Function)

  • Updated2023-03-14
  • 1 minute(s) read

EMI_SetCustomDataPtr (EMI Function)

Owning Class: Custom Data

Requires: Control Design and Simulation Module

Prototype

void EMI_SetCustomDataPtr(emiRef model, void* ptr);

Description

Sets a pointer to the custom data you want to associate with an external model.

Examples

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.
ptr Specifies the pointer for 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_GetCustomDataPtr

Log in to get a better experience