Hauptinhalt

coder.setCDataTypesFixedWidth

R2026b

Identify update to data type replacement setting

Since R2026b

    Description

    coder.setCDataTypesFixedWidth(cs) sets the model configuration parameter Data type replacement to Use C data types with fixed-width integers for model cs.

    The model configuration parameter Data type replacement automatically selects Use C data types with fixed-width integers when you switch System target file to an ERT-based system target file such as ert.tlc.

    When Use C data types with fixed-width integers is selected, the software issues:

    • A warning if you set fixed-width integer limit identifiers to a setting that is incompatible with Use C data types with fixed-width integers. For instance, setting the configuration parameter 64-bit integer minimum identifier to MIN_int64_T triggers a warning, and the setting is not applied.

    • An error if your model uses Simulink.AliasType objects that alias a fixed-width integer type, and whose HeaderFile property is empty.

    To diagnose these issues and pause program execution before Data type replacement is updated, you can place a breakpoint inside coder.setDataTypesFixedWidth.

    example

    Examples

    collapse all

    If you modify the system target file (for instance in a configuration script), this procedure pauses execution before Data type replacement is automatically updated.

    Open example model CapiSigsParams.

    model = 'CapiSigsParams';
    open_system(model);

    Open coder.setCDataTypesFixedWidth.

    open coder.setCDataTypesFixedWidth

    Place a breakpoint on the line:

    set_param(cs,'DataTypeReplacement','CDataTypesFixedWidth');

    Update the system target file to ert.tlc.

    set_param(model,'SystemTargetFile','ert.tlc');

    MATLAB® pauses execution at the breakpoint.

    Input Arguments

    collapse all

    Name of the model for which you are applying the setting, specified as a character vector or string.

    Data Types: char | string

    Version History

    Introduced in R2026b