纲要:
SWC属于AUTOSAR的Component文件夹下,而Composition属于Composition文件夹下。

目录
1. Create Software Composition
2. Add SWC into Composition
3. Create AssemblyConnector between SWCs
1. Create Software Composition
Right click on the project, then select "Create Composition", which will create "05_WiperControl_Composition.arxml" file and save this Composition information.

2. Add SWC into Composition
Right click on the "WiperControl_Composition" to open "Composition Editor", then select the SWC component type you want to add into the Composition.[1][2]

3. Create AssemblyConnector between SWCs
Select the port under "Source Component" and "Target Component", then click Connect button. [3][4]
注:
[1] "CPT" means Component Prototype
[2] 只能在之前已经创建的component库里面选。这就意味着,对一个AUTOSAR project,先去展开Component文件夹(或者去看看定义component的arxml文件)看看有哪些SWC类型,就可以大概了解这个project在做什么
[3]该Composition下所有的SWC ports都会在这里显示出来,但在这里只需要把属于ECU内部通讯的SWC的port之间用AssemblyConnector把它们相互连起来(intra-ECU communication)
[4]剩下没连起来的就是属于需要与该ECU外部通讯的port接口,会在之后的SystemExtract阶段通过SystemDataMapping和ComSignal连起来,最终实现和外部的CAN/LIN/Ethenet总线通讯(inter-ECU communication)