Main Content

HastInterfaceElement.

创建查询以根据指定的子约束选择具有接口接口元素的体系结构元素

    描述

    例子

    询问= hasterInterfaceElement(子约束的)创建一个查询询问that thefindfunction and thecreateview.函数用于选择具有满足给定子约束的接口元素的体系结构元素子约束

    例子

    全部收缩

    选择具有匹配标准的架构模型中的所有端口接口元素。

    导入包含所有系统Composer™查询的包。

    进口systemcomposer.query。*

    打开Simulin金宝appk.®project file.

    scexamplesmalluav.

    打开模型。

    m = systemcomposer.openModel('scexamplesmalluavmodel');

    为所有接口元素创建一个查询'C'in the'姓名'并运行查询。

    constraint = hasport(haseinterface(hasinterfaceElement(包含(属性)('姓名'),'C')))));元素=查找(m,约束,'Recurse',真的,'IncludeReferenceModels',真的)
    元素= 4×1个单元阵列{'scexamplesmalluavmodel / flightcompluavmodel / flightcomputer / main板'} {'scexamplesmalluavmodel / payload'} {'scexamplesmalluavmodel / payload / payload'}

    输入参数

    全部收缩

    条件限制查询, specified as asystemcomposer.query.Constraint.object.

    Example:包含(属性(''name'),'c')

    输出参数

    全部收缩

    Query, returned as asystemcomposer.query.Constraint.object.

    更多关于

    全部收缩

    定义

    学期 定义 应用 更多信息
    看法 视图显示了模型中的可自定义元素子集。可以基于刻板印象或组件,端口和接口的名称来过滤视图,以及接口元素的名称,类型或单位。手动添加元素创建视图。视图通过专注于架构设计的某些部分来创建一种简化的方法来使用复杂的体系结构。

    您可以使用不同类型的视图来表示系统:

    • 运行观点演示如何使用系统,并应与需求分析集成。

    • 功能意见专注于系统必须操作的操作。

    • Physical views展示如何构建和配置系统。

    ViewPoint表示利益相关者透视图,指定视图的内容。

    无钥匙进入系统建模系统架构
    元素组 An element group is a grouping of components in a view. Use element groups to programmatically populate a view.
    询问 A query is a specification that describes certain constraints or criteria to be satisfied by model elements. 使用查询来搜索元素和约束中国国际广播电台teria and to filter views. Find Elements in Model Using Queries
    组件图 A component diagram represents a view with components, ports, and connectors based on how the model is structured. 组件图允许您以编程方式或手动添加和从视图中删除组件。 检查自定义体系结构视图中的组件
    hierarchy diagram You can visualize a hierarchy diagram as a view with components, ports, reference types, component stereotypes, and stereotype properties.

    有两种类型的层次结构图:

    • Component hierarchy diagrams在儿童上方的父母中显示树形的组件。在组件层次结构中,每个引用的模型都表示在使用时多次。

    • 架构层次结构图使用构图连接显示唯一的组件体系结构类型及其关系。在架构层次结构视图中,每个引用的模型仅表示一次。

    使用视图显示组件层次结构和架构层次结构

    介绍在R2019B.