Main Content

getOutport

Get code configuration from code mappings for root-level outport

    Description

    example

    propertyValue = getOutport(myCodeMappingObj,outportBlock,property) returns the value of a code mapping property for the specified root-level Outport block. Use this function to return the storage class or the value of a storage class property configured for a root-level outport 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 outport Out1.

    cm = coder.mapping.api.get('myConfigModel');
    scOut1 = getOutport(cm,'Out1','StorageClass');
    

    From the model code mappings for model myConfigModel, get the code identifier configured for root-level outport Out1.

    cm = coder.mapping.api.get('myConfigModel');
    idOut1 = getOutport(cm,'Out1','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 outport for which to return the code mapping information.

    Example: 'Out1'

    Data Types: char | string

    Code mapping property for which to return a value. Specify one of these property names or a property name for a storage class defined in the Embedded Coder Dictionary associated with the model.

    Information to ReturnProperty Name
    Name of storage classStorageClass
    Name of variable for root-level outport in the generated codeIdentifier
    Name of source definition file that contains definitions for global data that is read by the root-level outport and external codeDefinitionFile
    Name of get function called by code generated for the root-level outportGetFunction
    Name of source header file that contains declarations for global data that is read by the root-level outport and external codeHeaderFile
    Name of model for which the code generator places the definition for root-level outport shared by multiple models in a model hierarchy Owner
    Boolean value indicating whether code generator preserves dimensions of a root-level outport that is represented as a multidimensional arrayPerserveDimensions
    Name of set function called by code generated for root-level outportSetFunction
    Name of structure in generated code for root-level outportStructName

    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 outport.

    Data Types: char

    Introduced in R2020b