getSourceElement
获取在源端口上选择的数据元素以进行连接
Description
在连接的源端口上获取所选的数据元素。selectedElems
= getSourceElement(连接or
)
Examples
在连接源端口上获取数据元素
Get the selected data element on the source port for a connection.
Create a model and get its root architecture.
modelName =“ ArchModel”;Arch = SystemComposer.CreateModel(modelName,true);rootArch = get(Arch,“建筑学”);
一个dd a component, create an input port on the component, create an input port on the architecture. and extract both component port objects.
newComponent = addComponent(rootArch,“ component1”);inportcomp = addport(newcomponent.architecture,..."testSig1",,,,“在”);inPortArch = addPort(rootArch,"testSig1",,,,“在”);compdestport = getport(newcomponent,"testSig1");ArchSrcport = getport(rootarch,"testSig1");
一个dd data interface, create data element, and set the data interface on the architecture port.
interface = arch.InterfaceDictionary.addInterface(“接口1”);interface.addElement(“X”);ArchSrcport.setInterface(接口);
连接端口并获取连接器的源元素。
conns = connect(ArchSrcport,compdestport,sourceElement =“X”);elem = getSourceElement(conns)
elem = 1×1单元格数组{'x'}
输入参数
连接or
-端口之间的连接
连接or object
端口之间的连接,指定为SystemComposer.arch.connector
object.
输出参数
selectedElems
- 选定的数据元素名称
角色向量
选定的数据元素名称,返回为字符向量。
数据类型:char
更多关于
定义
学期 | Definition | 一个pplication | 更多信息 |
---|---|---|---|
architecture | 系统作曲家™architecture代表组件系统以及它们如何在结构和行为上相互接口。您可以使用替代视图表示特定的体系结构。 |
不同类型的体系结构描述了系统的不同方面:
|
在视觉上撰写体系结构 |
model | 系统作曲家modelis the file that contains architectural information, including components, ports, connectors, interfaces, and behaviors. |
在模型上执行操作:
系统作曲家模型存储为SLX文件。 |
Create Architecture Model with Interfaces and Requirement Links |
零件 | 一个零件是在体系结构中实现明确功能的系统的一个非平凡,几乎独立且可更换的部分。组件定义了构建元素,例如功能,系统,硬件,软件或其他概念实体。组件也可以是子系统或子函数。 |
组件表示为块,是可以将可重复使用的伪像的体系结构模型的一部分。 |
成分 |
港口 | 一个港口is a node on a component or architecture that represents a point of interaction with its environment. A port permits the flow of information to and from other components or systems. |
There are different types of ports:
|
Ports |
连接or | Connectorsare lines that provide connections between ports. Connectors describe how information flows between components or architectures. |
连接器允许两个组件进行交互,而无需定义交互的性质。在端口上设置一个接口以定义组件如何交互。 |
连接 |
学期 | Definition | 一个pplication | 更多信息 |
---|---|---|---|
接口数据字典 | 一个接口数据字典是架构中所有接口和值类型的合并列表以及它们所在的位置。 |
系统作曲家模型上的本地接口可以使用该界面数据字典保存Interface Editor。可以在需要使用给定的一组接口,元素和值类型的模型之间重复接口字典。数据词典存储在单独的SLDD文件中。 |
|
数据接口 | 一个数据接口defines the kind of information that flows through a port. The same interface can be assigned to multiple ports. A data interface can be composite, meaning that it can include data elements that describe the properties of an interface signal. |
Data interfaces represent the information that is shared through a connector and enters or exits a component through a port. Use theInterface Editor创建和管理数据接口和数据元素,然后将它们存储在接口数据字典中,以在模型之间重复使用。 |
|
数据元素 | 一个数据元素describes a portion of an interface, such as a communication message, a calculated or measured parameter, or other decomposition of that interface. |
数据接口分解为数据元素:
|
|
值类型 | 一个值类型can be used as a port interface to define the atomic piece of data that flows through that port and has a top-level type, dimension, unit, complexity, minimum, maximum, and description. |
You can also assign the type of data elements in data interfaces to value types. Add value types to data dictionaries using theInterface Editor这样你可以重用价值类型接口s or data elements. |
Create Value Types as Interfaces |
owned interface | 一个owned interfaceis an interface that is local to a specific port and not shared in a data dictionary or the model dictionary. |
创建一个自有的接口来表示端口本地的值类型或数据接口。 |
定义端口本地自有的接口 |
适配器 | 一个适配器通过在两个接口之间映射,帮助将两个组件与不兼容的端口接口连接。适配器可以充当单位延迟或费率转换。您也可以将适配器用于公交车。使用一个dapterblock to implement an adapter. |
With an adapter, you can perform functions on the接口适配器dialog:
|
版本历史记录
matlab-befehl
Sie Haben Auf Einen Link Geklickt,der Diesem matlab-befehl ientspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
选择一个网站以获取可用的翻译内容,并查看本地事件和优惠。根据您的位置,我们建议您选择:。
You can also select a web site from the following list:
如何获得最佳网站性能
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。
一个mericas
- 一个mérica Latina(Español)
- Canada(English)
- United States(English)