Specify whether to include requirement descriptions assigned to Simulink® blocks in generated code as comments.
Category: Code Generation > Comments
Default: Off
Inserts the requirement descriptions that you assign to Simulink blocks into the generated code as comments. The code generator includes the requirement descriptions in the generated code in the following locations.
Model Element | Requirement Description Location |
---|---|
Model | In the main header file
|
Nonvirtual subsystems | At the call site for the subsystem |
Virtual subsystems | At the call site of the closest nonvirtual parent subsystem. If a
virtual subsystem does not have a nonvirtual parent, requirement
descriptions are located in the main header file for the model,
|
Nonsubsystem blocks | In the generated code for the block |
For information on code generator treatment of strings that are unrepresented in the character set encoding for the model, see Internationalization and Code Generation.
Suppresses the generation of comments for block requirement descriptions.
This parameter only appears for ERT-based targets.
This parameter requires Embedded Coder® and Simulink Requirements™ licenses when generating code.
If you use an external .slmx
file to store your requirement links, to
avoid stale comments in generated code, before code generation, you must save
any change in your requirement links.
Parameter:
ReqsInCode |
Type: character vector |
Value:
'on' | 'off' |
Default:
'off' |
Application | Setting |
---|---|
Debugging | On |
Traceability | On |
Efficiency | Noimpact |
Safety precaution | No recommendation |