getDataInterfaces
Class: coder.codedescriptor.CodeDescriptor
Namespace: coder.codedescriptor
Return information of the specified data interface
Syntax
dataInterface = getDataInterfaces(codeDescObj, dataInterfaceName)
Description
returns the type of data, SID, graphical name, timing, implementation, and variant
information on the data interface that dataInterface
= getDataInterfaces(codeDescObj
, dataInterfaceName
)dataInterfaceName
specifies.
Input Arguments
Output Arguments
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.
dataInterface = getDataInterfaces(codeDescObj, 'Inports')
dataInterface
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 firstdataInterface(1)
coder.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