Check usable characters for signal names and bus names
Check ID:
mathworks.jmaab.jc_0222
Guideline: jc_0222: Usable characters for signal and bus names
Description
Checks if signal and bus names adhere to the following guideline standards.
Do not begin with a number.
Do not begin or end with an underscore.
Do not contain consecutive underscores.
Do not coincide with reserved MATLAB® words.
Contain only alphanumeric characters and underscores.
Note
Reserved MATLAB words include the following:
Built-in functions:
builtin
Functions in the MATLAB path: Functions List
Reserved Keywords (Embedded Coder)
nil
nan
inf
infinity
This check requires a Simulink® Check™ license.
Check Parameterization
This check contains sub-checks that correspond to sub IDs specified in the MAB and JMAAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.
For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:
NA-MAAB — a, b, c, d, e, f
JMAAB — a, b, c, d, e, f
Results and Recommended Actions
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0222_a: Characters allowed for subsystem names | Signal or bus names have invalid characters. | Use only alphanumeric characters and underscores in signal and bus names. |
jc_0222_b: Number at the beginning | Signal or bus names begin with a number. | Use alphabetic characters at the beginning of signal and bus names. |
jc_0222_c: Underscore at the beginning | Signal or bus names begin with an underscore. | Use alphabetic characters at the beginning of signal or bus names. |
jc_0222_d: Underscore at the end | Signal or bus names end with an underscore. | Do not end signal or bus names with underscores. |
jc_0222_e: Consecutive underscores | Signal or bus names have consecutive underscores. | Do not use consecutive underscores in signal or bus names. |
jc_0222_f: Single reserved MATLAB word | The signal or bus name is a reserved MATLAB word. | Do not use reserved MATLAB words as signal or bus names. |
Capabilities and Limitations
Runs on library models.
Allows exclusions of blocks and charts.
Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to
graphical
.Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to
on
.