SystemComposer.View.View
体系结构视图
描述
AView
对象用于管理系统Composer™模型的体系结构视图。
Properties
Name
—视图名称
character vector
视图名称, specified as a character vector.
例子:'NewView'
Data Types:char
根
—根元素组
element group object
定义视图的根元素组,指定为SystemComposer.View.ElementGroup
目的。
模型
—Architecture model
model object
视图所属的架构模型,指定为SystemComposer.arch.model
目的。
UUID
—Universal unique identifier
character vector
通用唯一标识符用于视图,指定为字符向量。
例子:'91d5de2c-b14c-4c76-a5d6-5dd0037c52df'
Data Types:char
Select
—Selection query
约束对象
选择查询与视图相关联,指定为systemcomposer.query.Constraint
目的。
通过...分组
—分组标准
属性的字符串数组
分组标准, specified as a string array of properties in the form'
。
例子:{"AutoProfile.MechanicalComponent.mass","AutoProfile.MechanicalComponent.cost"}
Color
—视图架构的颜色
character vector
视图体系结构的颜色,指定为字符向量。颜色可以是名字'蓝色的'
,'black'
, or'绿色'
, or it can be an RGB value encoded in a hexadecimal string:'#ff00ff'
或者'#dddddd'
。An invalid color results in an error.
例子:color = get(objViewArchitecture,'Color')
描述
—查看体系结构的描述
character vector
查看体系结构的描述, specified as a character vector.
例子:description = get(objView,'Description')
例子:set(objview,“描述”,描述)
Data Types:char
IncludeReferenceModels
—Whether to include referenced models
真的
或者1|false
或者0
是否包括指定为逻辑的引用模型。
例子:包括= get(objview,'includeFerenceModels')
Data Types:logical
Object Functions
modifyQuery |
修改架构查看查询和属性分组 |
弹奏 |
重新运行的体系结构查看模型查询 |
删除 |
Remove architecture view query |
破坏 |
Remove model element |
例子
Create Architecture Views in System Composer with Keyless Entry System
Use a keyless entry system to programmatically create architecture views.
1. Import the package with queries.
importsystemcomposer.query.*
2.为无钥匙进入系统打开万博1manbetxSimulink®项目文件。
scKeylessEntrySystem
3.将示例模型加载到System Composer™中。
model = systemcomposer.loadModel("KeylessEntryArchitecture");
示例1:硬件组件评论状态视图
Create a filtered view that selects all hardware components in the architecture model and groups them using the评论斯塔图斯
property.
1. Construct a query to select all hardware components.
hwCompQuery = HasStereotype(IsStereotypeDerivedFrom(“AutoProfile。HardwareComponent”);
2.使用查询创建视图。
model.Createview("Hardware Component Review Status",。。。Select=hwCompQuery,。。。通过...分组={'AutoProfile.basecomponent.reviewStatus'},,。。。includeferencemodels = true,。。。颜色=“紫色的”);
3.打开架构查看画廊Viewssection, clickArchitecture Views。
model.openViews
Example 2: FOB Locator System Supplier View
Create a freeform view that manually pulls the components from the FOB Locator System and groups them using existing and new view components for the suppliers. In this example, you will useelement groups, groupings of components in a view, to programmatically populate a view.
1.创建一个视图体系结构。
fobsupplierview = model.Createview(“ FOB定位器系统供应商故障”,。。。颜色=“浅蓝”);
2.添加一个称为的子组供应商d
。添加FOB定位器模块
to the view element subgroup.
supplierD = fobSupplierView.Root.createSubGroup("Supplier D");supplierD.addElement(“ KeylessEnserryRarchitecture/fob定位器系统/FOB定位器模块”);
3.创建一个新的子组供应商a
。
suppliera = fobsupplierview.root.createsubgroup("Supplier A");
4.添加每个FOB接收器以查看元素子组。
foblocatorsystem = model.lookup("Path","KeylessEntryArchitecture/FOB Locator System");
Find all the components which contain the name"Receiver"
。
接收comppaths = model.find(。。。contains(Property(“姓名”),"Receiver"),。。。foblocatorsystem.Architecture);suppriera.addelement(接收库PPPATHS)
5.保存模型。
模型
More About
定义s
Term | 定义 | 应用 | More Information |
---|---|---|---|
view | Aviewshows a customizable subset of elements in a model. Views can be filtered based on stereotypes or names of components, ports, and interfaces, along with the name, type, or units of an interface element. Create views by adding elements manually. Views create a simplified way to work with complex architectures by focusing on certain parts of the architectural design. |
You can use different types of views to represent the system:
一个观点代表了一个利益相关者的观点,该观点指定了视图的内容。 |
模型ing System Architecture of Keyless Entry System |
element group | Anelement groupis a grouping of components in a view. |
使用元素组编程填充视图。 |
|
query | Aquery是描述模型元素满足的某些约束或标准的规范。 |
使用查询搜索具有约束条件的元素并过滤视图。 |
使用查询在模型中找到元素 |
component diagram | Acomponent diagram根据模型的结构方式,代表具有组件,端口和连接器的视图。 |
Component diagrams allow you to programmatically or manually add and remove components from the view. |
Inspect Components in Custom Architecture Views |
层次图 | You can visualize a层次图作为具有组件,端口,参考类型,组件刻板印象和刻板印象属性的视图。 |
There are two types of hierarchy diagrams:
|
Display Component Hierarchy and Architecture Hierarchy Using Views |
Version History
Beispiel öffnen
Sie HabenEineGeänderte版本死亡。möchtensie dieses beispiel mit ihrenänderungenÖffnen?
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
führensie den befehl durch eingabe在das matlab-befehlsfenster aus中。webbrowserunterstützenkeine matlab-befehle。
选择一个网站
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:。
您还可以从以下列表中选择一个网站:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
美洲
- AméricaLatina(Español)
- 加拿大(英语)
- 美国(英语)