Create Profiles Stereotypes and Views for AUTOSAR Architecture Analysis
AUTOSAR architectures can be large and complex. Often development work is distributed, with different engineers working on different structural or functional parts of an architecture model. To help analyze structural or functional aspects of an architecture model, you can create filtered views of the model hierarchy.
A spotlight view displays the upstream and downstream dependencies of a selected architecture component or composition.
A custom view displays a subset of components from the architecture model, based on filtering conditions that you specify. You can filter model elements for operational, functional, or physical analysis.
Filtering an AUTOSAR architecture model for specific attributes and saving the filtered view with the model can help engineers focus and collaborate on their parts of the architecture.
Create Profiles and Stereotypes
You can use stereotypes to capture nonfunctional properties of elements in an AUTOSAR architecture model. To capture these properties, create a profile containing stereotype definitions and apply these stereotypes on the modeling elements. Define new profiles and stereotypes using the Profile Editor (System Composer) or Architectural Data Editor.
For example, in an AUTOSAR architecture model, you may want to define a custom stereotype for all sensor components in your model.
Once you have defined profiles and stereotypes for your architecture model, you can create custom views that display a subset of the stereotypes in the model and perform additional analysis by quantitatively evaluating the architecture for certain characteristics. For more information, see Define Stereotypes and Perform Analysis (System Composer) and Apply Stereotypes to Extend Model Elements (System Composer).
View Component or Composition Dependencies
In an AUTOSAR architecture model, to help analyze component or composition dependencies, you can create a spotlight view. A spotlight view is a simplified view of an architecture component or composition that captures its upstream and downstream dependencies.
To create a spotlight view, open an architecture model and select a component or composition. On the Modeling tab, select Architecture Views > Spotlight.
The spotlight view displays the model elements to which the component or
composition connects in a hierarchy. You cannot edit the spotlight diagram layout.
This figure shows a spotlight view of component
AUTOSAR example model
autosar_tpc_composition. (To open the
example model in a local working folder, use the command
While in the spotlight view, you can move the spotlight focus to another component or composition. Select another component or composition, place your cursor over the displayed ellipsis, and select model cue Create Spotlight from Component.
To keep a spotlight view visible during model development, you can create the view in a separate model window. To create a separate model window, select a component or composition, right-click the selected block to open its context menu, and select Open in New Window. In the new window, create a spotlight view.
Updating the architecture model diagram with changes refreshes open spotlight views.
To return from a spotlight view to the architecture model view, click the Spotlight close icon or select a component or composition and select model cue Show in Composition.
Simulink® does not save spotlight views with the architecture model.
Create Custom Views for Analysis
To help analyze structural and functional aspects of an AUTOSAR architecture model, you can create a custom view. Based on filtering conditions that you specify, a custom view shows a subset of components from the architecture model. You can filter model elements for operational, functional, or physical analysis. To create a custom view, open the Architecture Views Gallery. In an open architecture model, on the Modeling tab, select Architecture Views.
As an example, suppose you want to create a view for the architecture model
autosar_tpc_composition to show components that handle
throttle position sensor (TPS) signals. The following workflow shows how to create
this custom view:
Open the example model in a local working folder by using the command
Open the Architecture Views gallery. On the Modeling tab, select Architecture Views.
Create a view. In the gallery view, click New > View. To name the view, in the View Properties pane, enter the name
TPS Ports View.
Configure the view. Use the Filter tab to specify the constraints for the view.
Specify the components. For the custom view, specify the components in the architecture model you would like to include in the custom view. There are several ways to specify the components, the options include
Add Component Filter,
Select All Components,
Add Custom Component Filter, and
Clear All Component Filters.
For this example, select
Select All Componentsto bring all of the components from the example model into the view.
Specify the ports. For your custom view, specify the ports in the architecture model that you would like to include in the custom view. There are several ways to specify the ports, the options include
Add Port Filter,
Exclude All Ports,
Hide unconnected ports,
Add Custom Port Filter, and
Clear All Port Filters.
For this example, select
Add Port Filterto filter the ports in the architecture model. Configure the filter so that it selects ports where the name contains TPS. When the filter is applied the custom view will show the components that contain the throttle position sensor (TPS).
Apply the view. To display the updated
TPS Ports View, click Apply.
When you save the architecture model, the view is saved in the Architecture Views Gallery. Other users can then access and share the view. For more information, see Create Architecture Views Interactively (System Composer).