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