Main Content


Class: coder.codedescriptor.CodeDescriptor
Namespace: coder.codedescriptor

Return information of the specified function interface


functionInterface = getFunctionInterfaces(codeDescObj, functionInterfaceName)


functionInterface = getFunctionInterfaces(codeDescObj, functionInterfaceName) returns the function prototype, input arguments, return arguments, variant conditions, and timing information of the function interface that functionInterfaceName specifies.

Input Arguments

expand all

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 by getFunctionInterfaceTypes().

Data Types: string

Output Arguments

expand all

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.


  1. Open the model.

  2. Build the model.


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

    codeDescObj = coder.getCodeDescriptor('CustomCodeComments')

  4. 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 model CustomCodeComments:
        {'Output'    }

  5. Return properties of a specified function interface in the generated code.

    functionInterface = getFunctionInterfaces(codeDescObj, 'Output')
    functionInterface is a coder.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