Add and Connect AUTOSAR Adaptive Components and Compositions
After you create an AUTOSAR architecture model, develop the top-level AUTOSAR classic or adaptive software design. The composition editor provides a view of AUTOSAR software architecture based on the AUTOSAR Virtual Function Bus (VFB).
To begin, on the Simulink® Toolstrip Modeling tab, click
Platform and select Adaptive
Platform
to configure adaptive architecture modeling. After that, you
can use the composition editor and the Modeling tab to add and
connect AUTOSAR software compositions and adaptive components.
Alternatively, you can import a software composition from ARXML files. See Import AUTOSAR Composition from ARXML.
Add and Connect Adaptive Component Blocks
To add and connect AUTOSAR adaptive software components in an architecture model:
Add components.
From the Modeling tab or the palette to the left of the canvas, add an Adaptive Component block. By using the Property Inspector, you can inspect the block. The component Kind for adaptive architecture modeling is
AdaptiveApplication
.Add component require ports and provide ports.
To add each component port, click an edge of an Adaptive Component block. Port controls appear for modeling communication over the service interfaces.
For event communication, select Input for a require port or Output for a provide port.
For method communication, select Client for a require port or Server for a provide port.
Connect block ports.
To connect the Adaptive Component blocks to other blocks, connect the block ports with signal lines. Connecting adaptive component blocks together represents the service oriented communication between the two communication endpoints.
Connect root ports.
To connect the Adaptive Component blocks to architecture or composition model root ports, drag lines from the component ports to the containing model boundary.
Releasing the connection creates a root port at the boundary.
Configure additional AUTOSAR properties by using the Property Inspector.
As an example, add and connect components for a client-server architecture model. The model consists of a sensor client component receiving raw data over a require port, filtering that data by using a method call to a filter service component, and sending the filtered data over a provider port.
Using the Simulink Start Page, create an AUTOSAR architecture model. (For more information, see Create AUTOSAR Architecture Models.) The model canvas initially is empty.
From the Modeling tab, click Platform and select
Adaptive Platform
.From the Modeling tab or the palette, add two Adaptive Component blocks. Label the first block
Sensor
and the second blockFilter
. Place theFilter
component below theSensor
component.Add ports to the
Sensor
andFilter
components.Add a Client port to the
Sensor
component and label itFilter_RPort
.Add a Server port to the
Filter
component and label itFilter_PPort
.Connect the two ports.
Add an Input port to the
Sensor
component and label itData_RPort
.Add an Output port to the
Sensor
component and label itFilteredData_PPort
. Resize theSensor
component as needed to fit the labels.
Connect the
Data_RPort
andFilteredData_PPort
ports to architecture model root ports. Drag a line from each port to the model boundary.
The design is complete, but behavior is not yet defined for the AUTOSAR components.
The next step is to add Simulink behavior to the AUTOSAR components by creating, importing, or linking models. See Define AUTOSAR Component Behavior by Creating or Linking Models.
If you have Requirements Toolbox™ software, you can link components in an AUTOSAR architecture model to requirements. See Link AUTOSAR Components to Requirements.
Add and Connect Composition Blocks to an Adaptive Model
To add and connect an AUTOSAR software composition nested in an architecture model:
From the Modeling tab or the palette to the left of the canvas, add a Software Composition block.
Add composition require ports and provide ports. To add each composition port, click an edge of the Software Composition block. Port controls appear for modeling communication over the service interfaces.
For event communication, select Input for a require port or Output for a provide port.
For method communication, select Client for a require port or Server for a provide port.
Alternatively, open the Software Composition block. To add each composition port, click the boundary of the composition diagram. When port controls appear, select Input or Client for require ports, or Output or Server for provide ports as required for your interface.
To connect the Software Composition block to other blocks, connect the block ports with signal lines.
To connect the Software Composition block to architecture or composition model root ports, drag lines from the composition ports to the containing model boundary.
Releasing the connection creates a root port at the boundary.
Configure additional AUTOSAR properties by using the Property Inspector.
An AUTOSAR composition contains a set of AUTOSAR components and compositions with a shared purpose. To populate a composition, open the Software Composition block and begin adding more Adaptive Component and Software Composition blocks.
See Also
Adaptive Component | Software Composition
Related Topics
- Import AUTOSAR Composition from ARXML
- Add and Connect AUTOSAR Classic Components and Compositions
- Define AUTOSAR Component Behavior by Creating or Linking Models
- Create Profiles Stereotypes and Views for AUTOSAR Architecture Analysis
- Link AUTOSAR Components to Requirements
- Author AUTOSAR Compositions and Components in Architecture Model
- Configure AUTOSAR Architecture Model Programmatically