主要内容

本页采用了机器翻译。点击此处可查看英文原文。

addPhysicalInterface

在数据字典中创建命名的物理接口

自 R2021b 起

说明

interface = addPhysicalInterface(dictionary,name) 将名称 name 指定的物理接口添加到数据字典 dictionary 中。

要删除接口,请使用 removeInterface 函数。

示例

示例

全部折叠

创建数据字典,然后添加物理接口 newInterface

dictionary = systemcomposer.createDictionary("new_dictionary.sldd");
interface = addPhysicalInterface(dictionary,"newInterface")

创建一个新模型,并将数据字典链接到该模型。然后,打开接口编辑器以查看新接口。

arch = systemcomposer.createModel("newModel");
systemcomposer.openModel("newModel");
linkDictionary(arch,"new_dictionary.sldd");

输入参数

全部折叠

数据字典,指定为 systemcomposer.interface.Dictionary 对象。有关如何创建数据字典的信息,请参阅 createDictionary

新物理接口的名称,指定为字符向量或字符串。该名称必须是有效的 MATLAB® 标识符。

示例: "newInterface"

数据类型: char | string

输出参量

全部折叠

新物理接口,以 systemcomposer.interface.PhysicalInterface 对象形式返回。

详细信息

全部折叠

版本历史记录

在 R2021b 中推出

另请参阅

函数

对象

模块

工具