Main Content

getInport

Get code configuration from code mappings for root-level inport

    Description

    example

    propertyValue = getInport(myCodeMappingObj,inportBlock,property) returns the value of a code mapping property for the specified root-level Inport block. Use this function to return the storage class or the value of a storage class property configured for a root-level inport in a model.

    Examples

    collapse all

    From the model code mappings for model myConfigModel, get the name of the storage class that is configured for root-level inport In1.

    cm = coder.mapping.api.get('myConfigModel');
    scIn1 = getInport(cm,'In1','StorageClass');
    

    From the model code mappings for model myConfigModel, get the code identifier configured for root-level inport In1.

    cm = coder.mapping.api.get('myConfigModel');
    idIn1 = getInport(cm,'In1','Identifier');
    

    Input Arguments

    collapse all

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

    Example: myCM

    Name, path, or handle of the root-level inport for which to return the code mapping information.

    Example: 'In1'

    Data Types: char | string | block_handle

    Code mapping property for which to return a value. Specify one of these property names.

    Information to ReturnProperty Name
    Name of storage classStorageClass
    Name of variable for inport in the generated codeIdentifier

    Example: 'StorageClass'

    Output Arguments

    collapse all

    Name of the storage class or value of the specified storage class property configured for the specified root-level inport.

    Data Types: char

    Introduced in R2020b