Main Content

Detect downcast

Diagnostic action to take when parameter downcast occurs during code generation

Model Configuration Pane: Diagnostics / Data Validity

Description

The Detect downcast parameter specifies the diagnostic action to take when a parameter downcast occurs during code generation. A parameter downcast occurs if the computation of the block output requires converting the parameter data type to a data type that has a smaller range of values. For example, converting the data type of a parameter from uint32 to uint8 is a parameter downcast.

This diagnostic applies only to named tunable parameters that have a non-Auto storage class.

Settings

error (default) | warning | none
error

The software issues an error and terminates code generation if a parameter downcast occurs.

warning

The software issues a warning if a parameter downcast occurs during code generation.

none

The software does not issue a diagnostic if a parameter downcast occurs during code generation.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionerror

Programmatic Use

Parameter: ParameterDowncastMsg
Type: string | character vector
Value: "none" | "warning" | "error"
Default: "error"

Version History

Introduced before R2006a