Main Content


Class: coder.codedescriptor.CodeDescriptor
Package: 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. Build the model.


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

    codeDescObj = coder.getCodeDescriptor('rtwdemo_comments')

  3. 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 rtwdemo_comments:
        {'Output'    }

  4. 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]

Introduced in R2018a