cgsl_0404: Model startup and shutdown events by using Initialize Function and Terminate Function blocks for component deployment
ID: Title | cgsl_0404: Model startup and shutdown events by using Initialize Function and Terminate Function blocks for component deployment | |
---|---|---|
Description | To model startup and shutdown behavior, use Initialize Function and Terminate Function blocks. | |
Notes | By following this guideline, the code generator produces one initialize function and one terminate function. When a Terminate Function block is not needed in
the model, clear model configuration parameter Terminate function
required ( | |
Rationale | Decouples the execution order of component initialize and terminate functions from the execution order across components. Separates component startup and shutdown functionality from periodic and aperiodic algorithm function code. | |
Model Advisor Check | Verify this guideline by using Model Advisor check Check Startup and Shutdown Event (Embedded Coder). | |
Examples |
void CD_initialize(void) { . . . } void CD_terminate(void) { . . . } |
See Also
Startup, Reset, and Shutdown Function Interfaces (Embedded Coder)
Periodic and Aperiodic Function Interfaces (Embedded Coder)
Code Interfaces and Code Interface Specification (Embedded Coder)
Using Initialize, Reinitialize, Reset, and Terminate Functions