主要内容

添加并连接Autosar组成和组件

After you create an AUTOSAR architecture model, develop the top-level AUTOSAR software design. The composition editor provides a view of AUTOSAR software architecture based on the AUTOSAR Virtual Function Bus (VFB).

从体系结构模型的顶层开始,使用组成编辑器和Simulink万博1manbetx®将来发布造型选项卡以添加和连接Autosar软件组成和组件。

另外,您可以从ARXML文件导入软件组成。看Import AUTOSAR Composition from ARXML

添加并连接组件块

在体系结构模型中添加和连接Autosar软件组件:

  • 对于设计要求的每个组件,造型tab or the palette, add a软件组件堵塞。您可以使用属性检查器设置组件种类-应用,,,,复杂的devicedriver,,,,ecuabstraction,,,,SensorAccuator, 或者ServiceProxy

  • 添加组件要求并提供端口。要添加每个组件端口,请单击一个的边缘软件组件堵塞。出现端口控件时,选择输入对于需要端口或输出对于提供端口。

  • 连接软件组件blocks to other blocks, connect the block ports with signal lines.

  • 连接软件组件块到体系结构或组成模型根端口,从组件端口拖动到包含模型边界。

    发布连接时,将在边界创建根端口。

  • 使用属性检查器配置其他Autosar属性。

For example, to author a simple design:

  1. 使用Simulink万博1manbetx启动页面,创建一个AutoSar体系结构模型。(有关更多信息,请参阅创建Autosar体系结构模型。)模型画布最初是空的。

  2. 来自造型标签或调色板,添加两个软件组件块。将它们彼此相邻,左右。

    1. 对于每个块,使用属性检查器设置组件种类-感觉运动器for the left block and应用对于正确的块。

    2. 将提供(输出)端口添加到左组件块,并在右组件块中添加一个要求(输入)端口。连接两个端口。

    3. 在左组件块中添加需求(输入)端口,并在右组件块中添加一个提供(输出)端口。

  3. 将新需求连接并提供端口到架构模型根端口。从每个端口拖动到模型边界。

The simple 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通过创建或链接模型来定义Autosar组件行为。有关更详细的设计示例,请参见架构模型中的作者汽车组成和组件

If you have需求Toolbox™软件,您可以将AutoSar体系结构模型中的组件链接到模拟需求。万博1manbetx看Link AUTOSAR Components to Simulink Requirements

Add and Connect Composition Blocks

添加和连接嵌套在体系结构模型中的Autosar软件组成:

  • 来自造型tab or the palette, add a软件组成堵塞。

  • 添加构图要求并提供端口。要添加每个组合端口,请单击软件组成堵塞。出现端口控件时,选择输入对于需要端口或输出对于提供端口。

    或者,打开软件组成堵塞。To add each composition port, click the boundary of the composition diagram. When port controls appear, select输入对于需要端口或输出对于提供端口。

  • 连接软件组成块到其他块,用信号线连接块端口。

  • 连接软件组成块到体系结构或组成模型根端口,从组成端口拖动到包含的模型边界。

    发布连接时,将在边界创建根端口。

  • 使用属性检查器配置其他Autosar属性。

For example, to author a simple nested composition:

  1. 使用Simulink万博1manbetx启动页面,创建一个AutoSar体系结构模型。(有关更多信息,请参阅创建Autosar体系结构模型。)模型画布最初是空的。

  2. 来自造型tab or the palette, add a软件组成block and a软件组件堵塞。将它们彼此相邻,左右。

    1. Add a provide (output) port to the left composition block and a require (input) port to the right component block. Connect the two ports.

    2. 将需求(输入)端口添加到左组成块中,并在右组件块中添加一个提供(输出)端口。

  3. Connect the unconnected require and provide ports to architecture model root ports. Drag from each port to the model boundary.

通常,AutoSar构图包含一组具有共同用途的汽车组件和构图。要填充构图,请打开软件组成阻止并开始添加更多软件组件and软件组成块。有关更详细的设计示例,请参见架构模型中的作者汽车组成和组件

也可以看看

|

Related Topics