isolar高手秘籍| Application Software Configuration一分钟速成!

     

目录

文章使用对象

学习目标

演示场景

前提条件

概览--isolar中Application Software Configuration的配置工作流

工具操作详细步骤

Step 1. Create a new RTA-CAR Project

Step 2. Create an Application Data Type

Step 3. Create new Data Type Mapping Set (and add Mapping)

Add a new Data Type Mapping

Step 4. Create a new Sender Receiver Port Interface

Step 5. Create new SWC Prototypes

Step 6. Create new Ports

Step 7. Create new Internal Behavior Containers

Step 8. Create new Runnables

Step 9. Create new Data Access Points

Step 10. Create new Timing Events

Step 11. Open Composition

Step 12. Manually create new Connections


     本文章主要为大家指导:如何在isolar中从零开始创建、配置一个新的RTA-CAR项目以及创建、配置两个SWC原型,一个用于发送,另一个用于接收。

文章使用对象

应用层软件开发工程师/autosar配置初学者

   学习目标

  1. 掌握application software 配置需要做哪些事情;

  2. 掌握如何创建RTA-CAR项目

  3. 掌握如何创建及配置data type、data mapping set、SWC、port interface、internal behavior、event、composition

演示场景

假设系统由两个ECU组成,这两个ECU都将使用发送和接受的SWC原型(本次示例场景)。以下是完成示例配置后的一个概览:

图片

前提条件

  1. 必须熟悉 AUTOSAR Application Software 的规范以及相关术语和方法论;可参考《AUTOSAR_TPS_SoftwareComponentTemplate.pdf》文档

  2. 必须安装 RTA-CAR v12.1.0 工具链

图片

概览--isolar中Application Software Configuration的配置工作流

Step1. 创建一个新的RTA-CAR项目 (My_FirstApplicationConfigurationPrj)

Step2. 创建一个新的Application Data Type(MyApplicationDataType)

Step3. 创建一个新的Data Type MappingSet(MyDataTypeMappingSet),然后使用它将Application Data Type(MyApplicationDataType)映射到一个uint8 Implementation Data Type.。

Step4. 创建一个新的 Sender/Receiver Port Interface ((My_SR_Interface)。向 Port Interface添加一个Variable Data Prototype,然后设置数据元素名称(DE_MyDataElement)和VDP类型(MyApplicationDataType)。

Step5. 为发送和接收SWC创建两个新的SWC (MyTransmittingSWC和MyReceivingSWC)。

Step6. 为发送SWC原型创建一个PPort(PPortPrototype),为接收SWC原型创建一个RPort(RPortPrototype)。

Step7. 创建两个新的 Internal Behavior容器[TxSwcInternalBehavior和RxSwcInternalBehavior],设置[MyDataTypeMappingSet]并使每个容器支持多实例化,以便两个SWC  Prototyper可以在多个实例中使用。

Step8. 为发送和接收创建两个新的Runnable Entities[RE_Tx和RE_Rx],并设置每个Runnable Entities将运行的函数名称[RE_Tx_func和RE_Rx_func]。

Step9. 创建两个新的Data Access Points,以便[RE_Tx]和[RE_Rx]Runnable Entities可以访问SWC端口。其中在Port [PPortPrototype_0]上是一个 DataSendPoint ,在RPort [RPortPrototype_0]上是一个DataReceivePoint。

Step10. 为发送和接收Runnable Entities[RE_Tx和RE_Rx]创建两个新的Timing Events[MyTransmittingSWC和MyReceivingSWC]。

Step11. 创建一个新的Composition(TopLevelComposition),其中将两个SWC Prototypes[MyTransmittingSWC和MyReceivingSWC]聚合到2个ECU上,然后相应地重新命名它们。

Step12. 手动创建发送和接收SWC之间的PPorts和RPorts之间的连接。

工具操作详细步骤

Step 1. Create a new RTA-CAR Project

打开一个新的workspace,准备创建RTA-CAR项目。如下图所示:选择 File --> New --> RTA-CAR Project

图片

  • 选择“RTA-RCAR generic project”

  • 点击“Next”

图片

  • 设置:Project Name

  • 选择RTA-OS port

  • 在高级选项中配置RTA Tools 版本

  • 点击“Next

图片

  • 点击“Finish”

图片

在 Filesystem Navigator 查看新创建的项目

图片

Step 2. Create an Application Data Type

如下图所示切换至 AR Explorer 视图, 右键Software ,选择Software --> Create Data Type --> Create Application Data Type --> Create Elements | Application Primitive Data Type.

图片

  • 设置shortName

  • 设置package path

  • 设置File Name

  • 点击“Finish

图片

Step 3. Create new Data Type Mapping Set (and add Mapping)

右键 r"Software" and select Software --> Create Data Type --> Create Element | Data Type Mapping Set.

图片

  • 设置shortName

  • 设置Package Path

  • 设置File Name

  • 点击“Finish

图片

Add a new Data Type Mapping

To add a new Data Type Mapping, open the Data Type Mapping Set that we've just created.

图片

图片

Step 4. Create a new Sender Receiver Port Interface

Create the Port Interface

如下图所示,右键 "Software" ,选择Software --> Create Interface --> Create Port Interface --> Elements | Sender Receiver Interface.

图片

  • 设置shortName

  • 设置Package Path

  • 设置File Name

  • 点击“Finish

图片

图片

Add a Variable Data Prototype

  • Double click on the newly-created Port Interface to open it with the "Data Dictionary Editor".

  • 双击新创建的Port Interface(My_SR_Interface),

  • 选择"Sender Receiver Interface" tab,

  • 选中 MY_SR_Interface

  • 点击 “ Add VariableData Prototype”

图片

Set the Data Element Name and VDP Type

  • 设置VDP Shortname 为 DE_MyDataElement

  • 选择 VDP Type Ref 为MyApplicationDataType

图片

Step 5. Create new SWC Prototypes

右键 "Software",选择 Software --> Create Component --> Elements | Application Sw Component Type

图片

  • 设置shortName

  • 设置Package Path

  • 设置File Name

  • 点击“Finish

图片

点击cancel.

图片

重复上述创建SWC步骤,创建receive SWC,如下图所示:

图片

图片

创建完成后,在AR Explorer视图  Software --> Components 文件夹下查看新创建的 Transmitting and Receiving SWC .

图片

Step 6. Create new Ports

如下图所示:右键 the transmitting SWC,点击“open with”,选择“ Component Editor ”

图片

如下图所示,在"Main" tab中,点击“Create PPorts

图片

  • 选择在step4中创建的 Port Interface(My_SR_Interface),

  • 点击 Finish.

图片

重复上述步骤,为Receiving SWC.创建  RPort

如下图所示,在"Main" tab中,点击“Create RPorts

图片

  • 选择在step4中创建的 Port Interface(My_SR_Interface),

  • 点击 Finish.

图片

Step 7. Create new Internal Behavior Containers

右键 SWC ,选择 New Child --> Internal Behaviors | Swc Internal Behavior.

图片

在 AR explorer查看新创建的 Swc Internal Behavior

图片

如下图所示,rename为"TxSwcInternalBehavior"

图片

右键 MyTransmittinSWC,open with Component Editor.

图片

  • 设置 SupportsMultipleInstantiation为 true

  • 添加 MyDataTypeMappingSet 至DataTypeMappings

图片

重复上述步骤,为MyReceivingSWC 设置SupportsMultipleInstantiation,并添加DataTypeMappings

图片

在 AR Explorer 视图查看新创建的port interface和internal behavior

图片

Step 8. Create new Runnables

右键 MyTransmittingSWC,open with the "Component Editor".

图片

如下图所示,选择 Functions tab,点击Runnables link...

图片

  • 设置  Runnable Entity name 为 "RE_Tx",

  • 设置 Function name 为 "RE_Tx_func".

图片

重复上述步骤,为MyReceivingSWC 添加runnable,如下图所示,其中

  • 设置 Runnable Entity name为 "RE_Rx"

  • 设置he Function name 为 "RE_Rx_func"

图片

Step 9. Create new Data Access Points

如下图所示,在 "Functions" tab选择 transmit Runnable(RE_TX), 选择右侧栏的"Data Access Points" subtab 并点击 Access Points... link.

图片

如下图所示:为 RE_TX选择 select DataSendPoints,点击 OK.

图片

如下图所示,重复以上步骤,为 receive Runnable创建 Data Access .

图片

为 receive Runnable选择 DataReadAccess,点击OK

图片

添加完成后,如下图所示 :

图片

Step 10. Create new Timing Events

双击Transmitting SWC, 选择"Events" tab, 点击绿色“+”link并选择 TimingEvent.

图片

  • 勾选 the transmit Runnable Entity (RE-Tx)

  • 点击OK

图片

  • 设置ttransmit Timing Event的Name 为"TE_TX"

  • 设置 Timing Period 为0.1

图片

如下图所示,重复以上步骤,创建  receive Timing Event.

图片

图片

  • 设置receive Timing Event的 Name 为"TE_RX"

  • 设置 Timing Period 为 0.1

图片

Step 11. Open Composition

右键 "Software" ,选择 Software --> Create Composition --> Elements | Composition Sw Component Type.

图片

  • 设置shortName

  • 设置Package Path

  • 设置File Name

  • 点击“Finish

图片

双击"TopLevelComposition"

图片

点击绿色“+”link,并选择 Component Prototype.

图片

在"Create Component Prototype" dialog勾选 在step5创建的 发送和接受的ASW SWCs,点击 OK.

图片

重复上面的步骤,再添加一组发送、接受SWC

在“AR Explorer”视图,右键发送/接受 SWC,选择Rename,修改swc的名称

图片

如下图所示,修改SWC的名称为 ("xxxx_ApplicationECU" andxxxx_ "TestECU").

图片

Step 12. Manually create new Connections

切换至 "Manual Connection Editor" tab.

图片

如下图所示,在左侧的“source component”下拉列表中,选择“ApplicationECU”的发送SWC,然后选择PPortPrototype。然后,在右侧的“target component”下拉列表中,选择“TestECU”的接收SWC,然后选择RPortPrototype。

接着,通过点击中间的连接器按钮,在两个端口之间建立连接

图片

重复上述过程,将TestECU上的PPort连接到ApplicationECU上的RPort。在左侧的“source component”下拉列表中,选择“TestECU”的发送SWC,然后选择PPortPrototype。接着,在右侧的“target component”下拉列表中,选择“ApplicationECU”的接收SWC,然后选择RPortPrototype。

最后,通过点击中间的连接器按钮,在两个端口之间建立连接。

图片

切换至“ Overview” tab, 会看到已连接好的SWC以及connector 的名称

图片

如下图所示:右键Composition ,选择 Open with --> Composition Overview.

图片

如下图所示,可查看appliaction 配置结果:

图片

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值