Main Content

hisl_0063: Length of user-defined object names to improve MISRA C:2012 compliance

ID: Titlehisl_0063: Length of user-defined object names to improve MISRA C:2012 compliance
Description

To improve MISRA C:2012 compliance of generated code, use configuration parameter Maximum identifier length (MaxIdLength) to limit the length of user defined names.

Note

The default of Maximum identifier length is 31.

AFor Subsystem blocks with parameter Function name options set to User specified, limit the length of function names to be equal to or less than the value specified in Maximum identifier length.
B

Limit the length of data object names to be equal to or less than the value specified in Maximum identifier length:

  • Simulink.AliasType

  • Simulink.NumericType

  • Simulink.Variant

  • Simulink.Bus

  • Simulink.BusElement

  • Simulink.IntEnumType

C

When using these storage classes, limit the length of signal and parameter names to be equal to or less than the value specified in Maximum identifier length:

  • Exported Global

  • Imported Extern

  • Imported Extern Pointer

  • Custom storage class

Note

If specified, this includes the length of the Identifier name.

RationaleLength in the generated code can result in a MISRAC:2012 violation.
Model Advisor ChecksCheck for length of user-defined object names (Simulink Check)
References
  • MISRA C:2012, Rule 5.1

  • MISRA C:2012, Rule 5.2

  • MISRA C:2012, Rule 5.3

  • MISRA C:2012, Rule 5.4

  • MISRA C:2012, Rule 5.5

Prerequisiteshisl_0060: Configuration parameters that improve MISRA C:2012 compliance
Last ChangedR2018b