主要内容

getAllFunctionInterfaceTypes

类: coder.codedescriptor.CodeDescriptor
命名空间: coder.codedescriptor

返回函数接口类型

语法

allFunctionInterfaceTypes = getAllFunctionInterfaceTypes(codeDescObj)

说明

allFunctionInterfaceTypes = getAllFunctionInterfaceTypes(codeDescObj) 返回函数接口类型的列表。返回的列表并不特定于任何模型。

输入参数

全部展开

要为其检索有关所生成代码信息的 coder.codedescriptor.CodeDescriptor 对象。

输出参量

全部展开

可用的函数接口类型的列表。

示例

全部展开

为已编译的必需模型创建一个 coder.codedescriptor.CodeDescriptor 对象,然后列出可用的函数接口类型。

  1. 打开 CustomCodeComments 模型。

    openExample('CustomCodeComments')
  2. 编译模型。

    slbuild('CustomCodeComments')

  3. 为所需模型创建 coder.codedescriptor.CodeDescriptor 对象。

    codeDescObj = coder.getCodeDescriptor('CustomCodeComments')
    

  4. 返回一个包含可用函数接口类型的列表。

    allFunctionInterfaceTypes = getAllFunctionInterfaceTypes(codeDescObj)
    allFunctionInterfaceTypes 具有以下值:
        {'Allocation'}
        {'Initialize'}
        {'Output'    }
        {'Update'    }
        {'Terminate' }

版本历史记录

在 R2018a 中推出