メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

getModelVariantControl

Get code configuration from code mappings for Simulink.VariantControl object

R2025a 以降

    説明

    propertyValue = getModelVariantControl(codeMappingObj,variantControl,property) returns the value of a code mapping property or calibration property for the specified Simulink.VariantControl object. Use this function to return the storage class or the calibration access of a calibration property configured for the variant control. Specifying code generation attributes for a Simulink.VariantControl object using code mappings is supported when the object is defined in the model workspace and its Value property is set to a Simulink.Parameter object.

    すべて折りたたむ

    From the model code mappings for the model slexVariantParameterCodeMappings, get the name of the storage class of variant control Wiper.

    openExample("simulinkcoder/ConfigureCodeGenForVariantParametersInModelWorkspaceExample");
    cm = coder.mapping.api.get("slexVariantParameterCodeMappings");
    getModelVariantControl(cm,"Wiper","StorageClass");

    入力引数

    すべて折りたたむ

    Code mapping object (model code mappings) returned by a call to function coder.mapping.api.get.

    Name of Simulink.VariantControl object specified as a character vector or string scalar.

    例: "varCtrl"

    データ型: char | string

    Code mapping property name. The getModelVariantControl function returns the value of this property. For a storage class defined in the Embedded Coder Dictionary associated with the model, specify a property name or one of these property names.

    Information to ReturnProperty Name
    Name of storage classStorageClass
    Name of variable for the variant control in the generated codeIdentifier
    Boolean value indicating whether to export the selected variant control to an A2L calibration fileExport
    Mask value in hexadecimal format to extract single bits from the variant control in a calibration toolBitMask
    Enumeration value indicating the access of calibration:
    • Calibration for a variant control indicates that the variant control can be calibrated and is the default value for the property.

    • NoCalibration indicates that the variant control can be read-only and cannot be calibrated.

    CalibrationAccess
    Name of the conversion method used during the calibrationCompuMethod
    Optional display name of the variant control for calibrationDisplayIdentifier
    Display format of the variant control being calibrated in a calibration toolFormat

    例: "StorageClass"

    Output Arguments

    すべて折りたたむ

    Name of the storage class or value of the specified storage class property configured for the variant control, returned as a character vector.

    バージョン履歴

    R2025a で導入