Main Content

coder.descriptor.DataImplementation Class

Namespace: coder.descriptor

Return information about implementation of data in generated code

Since R2025a

Description

An object of the coder.descriptor.DataImplementation class describes how the generated code implements a data element. This class has the subclass coder.descriptor.TypedRegion.

Examples

collapse all

Open the model.

openExample('CustomCodeComments')

Build the model.

slbuild('CustomCodeComments')

Create a coder.codedescriptor.CodeDescriptor object for the required model.

codeDescObj = coder.getCodeDescriptor('CustomCodeComments')

Return properties of the Inports data interface in the generated code.

dataInterfaces = getDataInterfaces(codeDescObj,'Inports')

dataInterfaces is an array of coder.descriptor.DataInterface objects. Get the details of the first Inport block of the model by accessing the first location in the array.

dataInterfaces(1)
              Type: [1×1 coder.descriptor.types.Double]
               SID: 'CustomCodeComments:1'
     GraphicalName: 'In1'
       VariantInfo: [0×0 coder.descriptor.VariantInfo]
    Implementation: [1×1 coder.descriptor.StructExpression]
            Timing: [1×1 coder.descriptor.TimingInterface]

Return properties of the code representation of the first Inport block.

dataInterfaces(1).Implementation
  StructExpression with properties:
                 Type: [1×1 coder.descriptor.types.Type]
           BaseRegion: [1×1 coder.descriptor.TypedRegion]
    ElementIdentifier: 'In1'
              Variant: ''

Version History

Introduced in R2025a