纲要:
通过
- Composition里面的Assembly Connection (Intra-ECU Communication)
- System Extract 里面的SystemDataMapping (Inter-ECU Communication)
已经把SWC的所有Data Element都连接上了,接下来就是把SWC的Runnable给Mapping到对应的OS Task上,让它运行起来。
目录
2. Link ECU Extract to EcucValueCollection file
1. Create ECU Extract
Right-click on the "WiperControl " ECU and select the “Create ECUExtract” option. Which will create [0]
- "WiperControl_FlatView_SWCD.arxml" under "Composition" folder [0.1][0.2]
- "WiperControl_System_EcuExtr.arxml" under "System Info" folder (ECU Extract file) [1]
2. Link ECU Extract to EcucValueCollection file
"08_COMSTACK_CFG.arxml" file contains the "EcucModuleConfigurationValues" (EcuC value) [2]
Single click on the "08_COMSTACK_CFG.arxml", assign the "Ecu Extract" to it. [3][3.1]
Right click on the "08_COMSTACK_CFG.arxml", open with "RTE Editor" for this WiperControl_CFG EcucValueCollection. Runnables show on the right side. [4]
3. Map Runnable to OS Task
Right click on the left to create OS Task, drag and drop the UnMapped Runnables to assign it to the OS Task on the left. [5]
Done.
注:
[0] ECU Extract是针对ECU生成的,而不是针对System Extract生成的
[0.1] 基于ECU通过ECU Extract生成的位于Composition文件夹下的“WiperControl_FlatView” 这个Composition文件才是最终真正包含整个ECU上所有的Connector的信息,包括Assembly Connector和Delegation Connector
- Assembly Connector (Intra-ECU):Composition内部的SWC与SWC之间的port连接
- Delegation Connector(Inter-ECU):SWC port与Composition port之间的连接,最终连向Com Signal
因为TopLevelComposition只会包含用户自己新建的SWC,而FlatView则会有额外的BSW模块(比如BswM, EcuM 等模块也会包含Assembly Connector与Composition内部的其他SWC通讯),这也就是为什么FlatView需要通过ECU Extract生成
[0.2]
- Compositon arxml 文件里面不包含任何的System Signal信息
- System Extract arxml 文件里面只有System Signal,没有ISignal的信息
- System Signal和ISignal的连接关系存储在导入dbc后生成的system Description arxml文件内
[0.3] 所有的Composition内部的连接(包括SWC与Composition port的连接)都在FlatView这个Composition arxml文件里面存着,由ECU Extract生成的FlatView又是该ECU最高一级的Composition。因此FlatView Composition port和外面的SystemSignal的连接存在SystemExtract的SystemDataMapping里面(EcuExtract arxml文件里面也存着所有的SystemDataMapping信息)
[1] 双击ECU Extract,可以在System Editor里面看到,Frame的数量小于Pdu的数量,说明一个CAN Frame被同时发送到了好几个CAN网络的Pdu上去了
[2] 现在只有COM,OS,RTE,以后BswM,EcuM等等各模块都会link到这个arxml文件
[3] 所以说这个EcucValueCollection arxml 文件既有从ECU Extract 过来的 RTE layer以上的Components,Assembly Connection, SystemSignalMapping信息,也有RTE layer 以下的 BswM,EcuM等等各模配置信息。即所有的配置信息(从APPL到BSW)都通过这个arxml文件link起来了
[3.1] RTE Editor在EcucValueCollection这个arxml文件这儿。即
- Composition内部的port connection (SWC to SWC data mapping) 在Composition的Assembly Connector里面完成(Intra-ECU communication)
- Composition与外部的port connection (ComSignal) 在System Extract的SystemDataMapping Editor里面完成(Inter-ECU Communicaition)
- Composition的runnable 与 OS task mapping在EcucValueCollection arxml的 RTE Editor里面完成
经过这三步,至此在RTE layer以上的所有配置都完成了
[4] Because "EXTR_WiperControl" ECU Extract is assigned to this "08_COMSTACK_CFG.arxml" EcucValueCollection, so the two Runnables will show in the "UnMapped Entities".
[5] OS Task 的周期之后在BSW的OS模块里面去设置
问:
1. 什么时候需要去重新生成ECU Extract?
System Extract只是操作界面,直观的把composition和dbc的ecu,system signal用可视化的界面呈现出来供用户做mapping操作。这就是为什么ECU Extract arxml文件没有操作界面,直接右键ECU生成ECU Extract就好了
因为System Extract的SwcToEcuMapping 和SystemDataMapping都会涉及到ecu,所以只要是在system extract的界面下操作过,都需要去生成ecu extract