Detect non-reused custom storage classes
Description
Select the diagnostic action to take when your model contains a
Reusable
custom storage class that the code generator cannot
reuse with other uses of the same Reusable
custom storage class.
The default behavior of the parameter settings varies with the presence of
Reusable
custom storage classes and referenced models. If the
code generator cannot change the block execution order to enable reuse or the
conditional execution of some blocks is incompatible with reuse, the code generator
might not implement the reuse specification. The generated code will likely contain
additional global variables.
For example, in this model, the code generator cannot reuse the variable
Y
to hold the outputs of In2
,
Gain
, and Gain2
because
Gain
executes before Gain2
. The generated
code contains an extra variable to hold the Gain
output. The red
numbers to the top right of the blocks indicate the execution order.
Settings
Default:
warning
none
Simulink® software takes no action.
warning
Simulink software displays a warning.
error
Simulink software terminates the simulation and displays an error message.
When there are Reusable
custom storage classes and referenced
models present, the parameter settings are:
None
Simulink software generates a message for you to set the parameter to
Error
.Warning
Simulink software generates a message for you to set the parameter to
Error
Error
If
Reusable
custom storage classes can be combined Simulink software generates code. If not, it generates an error.
Tip
If you do not want the generated code to contain additional global variables
because of a Reusable
custom storage class specification that the
code generator cannot honor, set this parameter to error
.
Remove the Reusable
custom storage classes from the signal lines
in the error message.
Command-Line Information
Parameter:
RCSCRenamedMsg |
Value:
'none' | 'warning' |
'error' |
Default:
'none' |
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No impact |
Related Topics
- Data Validity Diagnostics
- Specify Buffer Reuse for Signals in a Path (Embedded Coder)
- Model Configuration Parameters: Code Generation Optimization (Embedded Coder)