Callbacks (EMI Category)
- Updated2023-03-14
- 2 minute(s) read
Requires: Control Design and Simulation Module
Export members of the Callbacks category to request information about an external model from the External Model function. You must define and export the EMI_CB_ModelInterface function for all models you create. Define and export the other functions in this category as appropriate for the structure of the model.
| Function | Description |
|---|---|
| EMI_CB_CalculateDerivatives | Calculates the derivatives of the continuous states of an external model. |
| EMI_CB_CalculateDirectOutputs | Calculates the outputs of an external model that have direct feedthrough. |
| EMI_CB_CalculateDiscreteStates | Calculates the next discrete states of an external model. |
| EMI_CB_CalculateIndirectOutputs | Calculates the outputs of an external model that have indirect feedthrough. |
| EMI_CB_CalculateProjectedStates | Calculates the projected continuous states of an external model. |
| EMI_CB_CalculateResetStates | Calculates the values to which to reset the states of an external model. |
| EMI_CB_CalculateTimestep | Proposes the step size for the next time step. |
| EMI_CB_CalculateZeroCrossingSignals | Calculates the signals you want the ordinary differential equation (ODE) solver to monitor for zero crossings. |
| EMI_CB_CheckStepAcceptance | Checks whether the current step is acceptable for the simulation. |
| EMI_CB_EnableConfigurationParams | Returns whether users must enter model configuration parameters in the Select an External Model Library dialog box to define an external model. |
| EMI_CB_FinalizeModel | Frees any memory used to store custom data for an external model. |
| EMI_CB_GetCustomIcon | Specifies a custom icon for the External Model function that represents an external model. |
| EMI_CB_HandleCustomMenuItem | Handles custom shortcut menu items for the External Model function that represents an external model. |
| EMI_CB_InitializeModel | Initializes parts, such as the states, limits, and zero-crossings, of an external model. |
| EMI_CB_ModelInterface | Defines and allocates the parts of an external model, such as the model name, inputs, outputs, and parameters. |
| EMI_CB_SizeInformation | Specifies the number of continuous states for an external model, the number of discrete states, or the number of signals of the external model to monitor for zero crossings. |