Main Content

型号Autosar自适应软件组件

在Si万博1manbetxmulink中®, you can flexibly model the structure and behavior of software components for the AUTOSAR Adaptive Platform.

Autosar自适应平台为必须灵活适应外部事件和条件的汽车组件定义了面向服务的体系结构。与Autosar Classic平台相比,自适应平台需要:

  • 高性能计算,可能具有多个核心和异质处理器类型。

  • Fast communication, potentially with Ethernet or networks on chips.

  • 组件之间的强大基于服务的互动。

  • Ability to adapt running automotive applications to external events and information sources (potentially for highly automated driving), as well as external communication, monitoring, and live software updates.

Autosar自适应系统可能包含多个互连的自适应软件组件。您可以在自适应平台(自适应应用程序的AutoSar运行时(ARA))定义的运行时环境中部署自适应软件组件。

Autosar自适应软件组件提供和消费服务。自适应服务体系结构是灵活的,可扩展的和分布式的。可以动态发现服务,并且可以在本地或远程电子控制单元(ECU)上运行。每个软件组件都包含:

  • An automotive algorithm, which performs tasks in response to received events.

  • Required and provided ports, each associated with a service interface, through which events are received and sent.

  • 服务接口,为基于事件的通信提供框架及其相关事件和名称空间。

模型一个AUTOSAR自适应软件组件Simulink, you start with a model that contains an automotive algorithm. From that model, you generate an AUTOSAR Dictionary that defines service interfaces, and an AUTOSAR code perspective that maps Simulink model elements to AUTOSAR component elements. As you further develop and refine the adaptive component in Simulink, you can iteratively simulate and build the model.

完成组件实现后,可以将自适应软件组件模型与应用程序级仿真容器模型中的其他组件模型组合在一起。最终目标是在ARA环境中部署组件作为应用程序的一部分。

这是用于基于AutoSar自适应平台建模软件组件的高级工作流程。

  1. Open a Simulink model that either is empty or contains a functional algorithm.

  2. Using the Model Configuration Parameters dialog box, configure the model for adaptive AUTOSAR code generation. Set系统目标文件autosar_adaptive.tlc

  3. 开发模型算法内容,用于在AutoSar自适应软件组件中使用。如果模型为空,请在算法中构造或复制。算法的可能源包括其他Simulink模型中的算法元素。万博1manbetx示例包括子系统,参考模型,MATLAB功能块,C Callerblocks.

  4. 在模型的最高级别,设置基于事件的通信。

    • 每个根部内部的根部后,添加一个Event Receive块,将输入事件转换为信号,同时保留信号值和数据类型。

    • 在每个根外口之前,添加一个事件发送块,将输入信号转换为事件,同时保留信号值和数据类型。

  5. 将算法模型映射到Autosar自适应软件组件。例如,在Apps选项卡,单击AUTOSAR Component Designer。由于模型未启用,因此AutoSar组件快速启动打开。

    通过快速启动过程进行工作。点击Finish绘制模型。该模型从AutoSar代码的角度打开。

  6. 使用AutoSar代码透视图和AutoSar词典(或等效的AutoSar地图和属性功能),进一步完善了AutoSar自适应模型配置。

    • In the AUTOSAR code perspective, examine the mapping of Simulink inports and outports to AUTOSAR required and provided ports and events.

    • 在Autosar词典中,检查AutoSar属性是否有必要的港口,提供港口和服务接口。

      您可以扩展服务接口节点以检查其关联的AutoSar事件,并为接口C ++代码定义名称空间。

  7. Build the AUTOSAR adaptive software component model. Building the model generates:

    • 为AutoSar自适应平台实现模型算法并提供共享数据类型定义的C ++文件。

    • AutoSar XML的AutoSar自适应软件组件的描述和用于应用程序部署和服务配置的清单信息。

    • 实现主程序模块的C ++文件。

    • AUTOSAR Runtime Adaptive (ARA) environment header files.

    • cmakelists.txt支持CMAKE生成可万博1manbetx执行文件的文件。

有关更多信息,请参阅配置Autosar自适应软件组件

See Also

|

相关示例

更多关于