zl程序教程

您现在的位置是:首页 >  前端

当前栏目

set up a CAPL gateway between two CAN bus systems

setgateway can Up two between Systems Bus
2023-09-11 14:14:25 时间

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
• ShortHeaderID: ID of the PDU to be transmitted. 0 means not configured
• LongHeaderID: ID of the PDU to be transmitted. 0 means not configured
• Flags: reserved,