Source files - Custom name for source files - MATLAB (original) (raw)
Main Content
Custom name for source files
Model Configuration Pane: Code Generation / Code Placement
Description
Specify customized name for generated source files.
Dependencies
This parameter:
- Appears only for ERT-based targets.
- Requires Embedded Coder® when generating code.
Settings
$R$E
(default) | macro text
Default: $R$E
Enter a macro that specifies whether, and in what order, certain text is to be included in the generated identifier. The macro can include a combination of custom user text and these format tokens:
Token | Description |
---|---|
E∣Insertthefiletype.E | Insert the file type. E∣Insertthefiletype.E represents these instances of file types: capicapi_hostdttestinterfaceprivatetypesRequired. In files of other types,$E does not generate text. |
$R | Insert root model name into identifier, replacing unsupported characters with the underscore (_) character.Required for model referencing. |
U∣InserttextthatyouspecifyfortheU | Insert text that you specify for the U∣InserttextthatyouspecifyfortheU token. To specify this text, use the Custom token text parameter. |
In the generated file name, adjacent tokens are separated by the underscore (_
) character, even if a token does not generate text.
Custom naming is supported only for .c
and .cpp
files. When you have model hierarchy, custom naming is applicable to only the root model.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | Use default |
Efficiency | No impact |
Safety precaution | No recommendation |
Programmatic Use
Parameter: ERTSourceFileRootName |
---|
Type: character vector |
Value: Valid combination of tokens and custom text |
Default: RRRE |
Version History
Introduced in R2018a