Question:
How can I set up a CAPL gateway between two CAN bus systems using AUTOSAR databases ≥ 4.2.1?
Answer:
The gateway can be realized by routing the PDUs and works similarly to a frame-based approach. Key to the gateway is the CAPL function TriggerPDU2(), which uses the following syntax:
long triggerPDU2(pdu PDUObject, dword DestBusContext, char[] DBName, char[] TXNode, char[] PDUName, dword ShortHeaderID, dword LongHeaderID, dword Flags, dword PayloadLen)
Parameters:
• PDUObject: PDU object to be transmitted.
• DestBusContext: bus context of destination bus in simulation setup
• DBName: Name of the cluster in the database
• TXNode: Name of the transmitter node, can be used with empty string also
• PDUName: Name of the PDU to be transmitted
set up a CAPL gateway between two CAN bus systems
最新推荐文章于 2024-05-28 20:22:51 发布
本文介绍了如何使用AUTOSAR 4.2.1及以上版本的数据库在两个CAN总线系统间设置CAPL网关。通过TriggerPDU2()函数实现PDU路由,从CAN_Powertrain到CAN_Second的网关节点进行数据传输。CAPL代码示例中,除EngineData和Ignition_Info外,所有接收到的CAN_Powertrain网络的PDUs都将被路由到CAN_Second。
订阅专栏 解锁全文
994

被折叠的 条评论
为什么被折叠?



