Include model types in model class

Description

Specify whether to generate model type definitions in a model class.

Category: Code Generation > Interface

Settings

Default: On

On

Includes model type definitions within the class namespace of the model. Model type definitions include:

  • Root-level inports and outports

  • Block inputs and outputs

  • DWork vectors

  • Block parameters and constant parameters

  • Continuous states

  • The real-time model data structure (rtM)

The generated code reduces the MISRA 7-3-1 violations.

A user-defined type such as Simulink.Bus object or a type defined in MATLAB Function blocks or Stateflow® charts is still generated in the global namespace.

Off

Generate model type definitions within the global namespace.

Dependencies

  • This parameter appears only for ERT-based targets.

  • This parameter requires Embedded Coder® when generating code.

Command-Line Information

Parameter: IncludeModelTypesInModelClass
Type: character vector
Value: 'on' | 'off'
Default: 'on'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOn
Safety precaution

No recommendation

Related Topics