Typically, the structural hierarchy of a system differs from the hierarchy of the functional requirements. With architecture views, you can sketch the system based on different hierarchies. For example, you can author a system using the requirements. This allows you to better understand what components you need to satisfy your requirements while not necessarily focusing on the structure.
You can create an architecture view interactively. This example uses the architecture
model for an unmanned aerial vehicle (UAV), scExampleSmallUAV
, to create
filtered and free form views. The view created shows the components having an interface for
the light commands.
To create a filtered view:
In the MATLAB® command window, enter scExampleSmallUAV
. The
architecture model opens in the Simulink Editor.
In the Views section, click Architecture Views to open the Architecture Views Editor.
Click New View to open a Create View dialog box.
In the Name box, enter a name for this view. For example,
light_command_view
.
Select Create and observe that a new view is created.
In the View Filter pane, select Add Default to add a new form-based criteria to the filter.
From the Select drop-down list, select
Components with a port which have an interface
.
From the Where drop-down list, select
Name
, and in the text box, enter the name of an
interface in the architecture model. For example, enter
lightCmd
.
Click Apply Query. The dialog box closes and an
architecture view is created using the query from the
Filter box. The view is filtered to select all the
components for which the lightCmd
interface is
applied.
You can also create a freeform custom view without using a filter.
Click New View.
In the Name box, enter a name for this view. For example,
use light_command_view_freeform
. From the drop-down menu,
select Freeform View. Select
Create.
To add components to the view, drag and drop components from the Model Components. Drag and drop Airframe, Fuselage, and Payload components to your model. Alternatively, you can use the keyboard shortcut Ctrl+I to add component instantiations to your view.
You can use the keyboard shortcut Delete to delete components from the view.
Observe that the free form view is created.
To group components, select (press Shift and click) the Airframe and Payload components and then the Group.
To ungroup components, select the components and click Ungroup.
Switch between the light_command_view_freeform
and
light_command_view
by selecting the desired view from the
View Browser.