coder.codedescriptor.CodeDescriptor.getDataInterfaces - Return information of the specified data interface - MATLAB (original) (raw)
Main Content
Class: coder.codedescriptor.CodeDescriptor
Namespace: coder.codedescriptor
Return information of the specified data interface
Syntax
dataInterface = getDataInterfaces(codeDescObj, dataInterfaceName)
Description
[dataInterface](#d126e13609) = getDataInterfaces([codeDescObj](#mw%5F60806511-f98d-4074-a5e0-be9307e4dfc7), [dataInterfaceName](#d126e13556))
returns the type of data, SID, graphical name, timing, implementation, and variant information on the data interface that dataInterfaceName
specifies.
Input Arguments
coder.codedescriptor.CodeDescriptor
object for which you want to retrieve the information about generated code.
dataInterfaceName
specifies the name of a data interface. To get a list of all the data interfaces in the generated code, callgetDataInterfaceTypes()
.
Data Types: string
Output Arguments
The coder.descriptor.DataInterface object describes information about the specified data interface such as type of data, SID, graphical name, timing, implementation, and variant information.
Examples
- Open the
CustomCodeComments
model.
openExample('CustomCodeComments') - Build the model.
slbuild('CustomCodeComments') - Create a
coder.codedescriptor.CodeDescriptor
object for the required model.
codeDescObj = coder.getCodeDescriptor('CustomCodeComments') - Return a list of all data interface types in the generated code.
dataInterfaceTypes = getDataInterfaceTypes(codeDescObj)dataInterfaceTypes
has these values:
{'Inports' }
{'Outports' }
{'Parameters' }
{'ExternalParameterObjects'}
{'InternalData' } - Return properties of Inport blocks in the generated code.
dataInterfaces = getDataInterfaces(codeDescObj, 'Inports')dataInterfaces
is an array ofcoder.descriptor.DataInterface
objects. Obtain the details of the first Inport block of the model by accessing the first location in the array.The firstcoder.descriptor.DataInterface
object with properties is returned.
Type: [1×1 coder.descriptor.types.Type]
SID: 'CustomCodeComments:99'
GraphicalName: 'In1'
VariantInfo: [1×0 coder.descriptor.VariantInfo]
Implementation: [1×1 coder.descriptor.DataImplementation]
Timing: [1×1 coder.descriptor.TimingInterface]
Unit: ''
Range: [1×0 coder.descriptor.Range]
Version History
Introduced in R2018a