Detect non-reused custom storage classes
Diagnostic action to take when code generation cannot reuse Reusable
storage class
Model Configuration Pane: Diagnostics / Data Validity
Description
The Detect non-reused custom storage class parameter specifies the
diagnostic action to take when a model contains a
Reusable storage class that the code generator
cannot reuse with other instances of the same Reusable
storage class.
The code generator might not implement the reuse specification for a
Reusable storage class if:
The code generator cannot change the block execution order to enable reuse.
The conditional execution of some blocks in the model is incompatible with reuse.
When the code generator does not implement the reuse specification, the generated code likely contains 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.

Dependencies
To enable this parameter, set System target file to
ert.tlc.
Settings
warning (default) | error | noneThe diagnostic action that corresponds to each setting varies based on whether the model
contains Reusable storage classes and model
references.
noneIf the model does not contain
Reusablestorage classes and referenced models, the software does not issue a message when the code generator cannot reuse aReusablestorage class.If the model contains
Reusablestorage classes and referenced models, the software issues a message that suggests changing this parameter value toerror.warningIf the model does not contain
Reusablestorage classes and referenced models, the software issues a warning when the code generator cannot reuse aReusablestorage class.If the model contains reusable storage classes and referenced models, the software issues a message that advises changing this parameter value to
error.errorThe software issues an error if the code generator cannot reuse a
Reusablestorage class.Use this setting if you want to prevent additional global variables in the generated code because of a
Reusablestorage class specification that the code generator cannot honor. Remove theReusablestorage class specification from the signal line in the error message.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Programmatic Use
Parameter: RCSCRenamedMsg |
| Type: string | character vector |
Values:
"none" | "warning" |
"error" |
Default:
"warning" |
Version History
Introduced in R2017b
See Also
Topics
- Data Validity Diagnostics
- Specify Buffer Reuse for Signals in a Path (Embedded Coder)
- Model Configuration Parameters: Code Generation Optimization (Embedded Coder)