Display Component Hierarchy and Architecture Hierarchy Using Views
This example shows how to use hierarchy views in the Architecture Views Gallery to use hierarchy views to visualize hierarchical relationships.
You can visualize a hierarchy diagram as a view with components, ports, reference types, component stereotypes, and stereotype properties.
There are two types of hierarchy diagrams:
Component hierarchy diagrams display components in tree form with parents above children. In a component hierarchy view, each referenced model is represented as many times as it is used.
Architecture hierarchy diagrams display unique component architecture types and their relationships using composition connections. In an architecture hierarchy view, each referenced model is represented only once.
Any component diagram view can be optionally represented as a hierarchy diagram. The hierarchy view shows the same set of components visible in the component diagram view, and the components are selected and filtered in the same way as in a component diagram view.
This example uses an architecture model representing data flow within a robotic system. Open this model to follow the steps in the tutorial.
Robot Computer Systems Architecture
Use a robot computer system with controllers that simulate transmission of data to explore hierarchy diagrams in the Architecture Views Gallery.
Switch Between Component Diagram View and Hierarchy Views
To open the Architecture Views Gallery, navigate to Modeling > Architecture Views.
From the View Browser, select the
Observe the component diagram view that corresponds to the all the components in the architecture model.
The component diagram represents a view with components, ports, and connectors based on how the model is structured.
Click Diagram > Component Hierarchy.
Observe the component hierarchy view that corresponds to the same set of components.
The component hierarchy diagram shows a single root, which is the view specification itself. The root corresponds to the name of the view shown in the component diagram. The connections in the component hierarchy diagram originate from the child components and end with a diamond symbol at each parent component.
Click Diagram > Architecture Hierarchy.
Observe the architecture hierarchy view that corresponds to the same set of components.
The architecture hierarchy diagram starts with the root architecture. The root corresponds to the boundary of the system. A box in an architecture hierarchy diagram represents a referenced model and appears only once even if it is referenced multiple times in the same model. For example,
ControllerSimulink, a referenced model that appears on three components, has three connections to its parent architectures. The connectivity of the boxes represents the relationship between
ContollerSimulinkand its parents.