Control Format and Placement of Rate Transition Block Code and Data (Embedded Coder)
If you have an Embedded Coder® license and your model is configured to use a data code interface, you can control the format and placement of code generated for Rate Transition blocks by changing the setting of model configuration parameter Rate Transition block code (Embedded Coder).
By default, the code generator inlines Rate Transition block code with other model code and declares the block data in the global block state structure. Alternatively, for Rate Transition blocks, you can configure the code generator to place the block state data in a dedicated structure and produce these functions that model entry-point functions call.
get
andset
functions that
entry-point functions callmodel
_stepstart
andinitialize
functions that the
entry-point function callsmodel
_initialize
To change the format and placement of the code:
Make sure that Rate Transition blocks do not take a variable-size signal as input and are not inside a For Each Subsystem block.
Select the Rate Transition block parameter Ensure data integrity during data transfer.
Set model diagnostic parameter Multitask data transfer to
error
.Set the model configuration parameter Rate Transition block code to
Function
.
See Also
Topics
- Rate Transitions (Embedded Coder)
- Control Data Transfer Behavior in Generated Code (Embedded Coder)
- Detect Data Transfer Issues in a Model (Embedded Coder)