coder.codedescriptor.CodeDescriptor.getFunctionInterfaces - Return information of the specified function interface - MATLAB (original) (raw)
Main Content
Class: coder.codedescriptor.CodeDescriptor
Namespace: coder.codedescriptor
Return information of the specified function interface
Syntax
functionInterface = getFunctionInterfaces(codeDescObj, functionInterfaceName)
Description
[functionInterface](#d126e13910) = getFunctionInterfaces([codeDescObj](#mw%5Fc725ffc5-b320-4c44-9286-9df143ca3d86), [functionInterfaceName](#d126e13867))
returns the function prototype, input arguments, return arguments, variant conditions, and timing information of the function interface thatfunctionInterfaceName
specifies.
Input Arguments
coder.codedescriptor.CodeDescriptor
object for which you want to retrieve the information about generated code.
functionInterfaceName
specifies the name of a function interface. A list of all the function interfaces in the generated code is returned bygetFunctionInterfaceTypes()
.
Data Types: string
Output Arguments
The coder.descriptor.FunctionInterface
object describes information about the specified function interface such as function prototype, input arguments, return arguments, variant conditions, and timing information.
Examples
- 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 a list of all function interface types in the generated code.
functionInterfaceTypes = getFunctionInterfaceTypes(codeDescObj)
These are the function interface types in the generated code of modelCustomCodeComments
:
{'Initialize'}
{'Output' } - Return properties of a specified function interface in the generated code.
functionInterface = getFunctionInterfaces(codeDescObj, 'Output')functionInterface
is acoder.descriptor.FunctionInterface
object.
Prototype: [1×1 coder.descriptor.types.Prototype]
ActualReturn: [0×0 coder.descriptor.DataInterface]
VariantInfo: [0×0 coder.descriptor.VariantInfo]
Timing: [1×1 coder.descriptor.TimingInterface]
ActualArgs: [1x0 coder.descriptor.DataInterface List]
Version History
Introduced in R2018a