on ethernetPacketForwarded
Valid for: CANoe DE • CANoe4SW DE NoteThe
ethernetPacketForwarded event is no longer generated by interfaces when network-based access has been activated. When the Ethernet network interface internal switch forwards Ethernet packets to other ports, the Ethernet packet triggers the on ethernetPacket event procedure on those ports. All events leaving the internal switch have the hwPort value set to the port in question and have the direction Tx. This replaces the functionality provided by the ethernetPacketForwarded event.
Function Syntax
on ethernetPacketForwarded ;on ethernetPacketForwarded msgChannel<X>.;
Description
The event procedure is called when the Ethernet network interface has sent a received Ethernet packet on one or more other hardware channels, i.e., with VN5640 which is configured as Ethernet switch. It can only be used with network interfaces which support forwarding of Ethernet packets. To access the control information you would use selectors. The key word this is available within an on ethernetPacketForwarded procedure, to access the data of the packet that has just been received. CAPL programs are by default not transparent to bus events. This means that a CAPL node in the evaluation branch of the measurement configuration will block the data flow to its right side. You must explicitly program the passing of messages in CAPL nodes in the evaluation branch. To make the CAPL node transparent to messages you would write:Parameters
- msgChannel
<X>: Ethernet channel number, range 1..32.
Selectors
-
time_ns: Point in time, units: nanoseconds
Type: int64
Access Limitation: Read only -
dir: Direction of transmission, event classification; possible values: Rx, Tx
Type: byte
Access Limitation: Read only -
msgChannel: Application channel, i.e., Eth 1
Type: word
Access Limitation: Read only -
hwChannel: Hardware channel. If not supported by network interface, value is 1.
Type: word
Access Limitation: Read only -
Length: Length of Ethernet payload data (starting after the Ethertype).
Type: word
Access Limitation: Read only -
FCS: Ethernet packet checksum. For some Ethernet hardware this value is not available (value 0).
Type: dword
Access Limitation: Read only -
FrameLen: Frame duration in ns. For some Ethernet hardware this value is not available (value 0).
Type: int64
Access Limitation: Read only -
SOF: Start-of-Frame time stamp in ns. For some Ethernet hardware this value is not available (value 0).
Type: int64
Access Limitation: Read only -
Type: Ethertype
Type: word
Access Limitation: Read only -
Source: Source Ethernet MAC address. Only 6 bytes of the QWord are used and network byte order is used.
Type: qword
Access Limitation: Read only -
Destination: Destination Ethernet MAC address. Only 6 bytes of the QWord are used and network byte order is used.
Type: qword
Access Limitation: Read only -
byte(x): Message data byte (unsigned 8 bit); Offset 0 is the byte directly after the Ethertype.
Type: byte
Access Limitation: Read only -
char(x): Message data byte (signed 8 bit); Offset 0 is the byte directly after the Ethertype.
Type: char
Access Limitation: Read only -
word(x): Message data word (unsigned 16 bit); Offset 0 is the word directly after the Ethertype.
Type: word
Access Limitation: Read only -
int(x): Message data word (signed 16 bit); Offset 0 is the int directly after the Ethertype.
Type: int
Access Limitation: Read only -
dword(x): Message data word (unsigned 32 bit); Offset 0 is the dword directly after the Ethertype.
Type: dword
Access Limitation: Read only -
long(x): Message data word (signed 32 bit); Offset 0 is the long directly after the Ethertype.
Type: long
Access Limitation: Read only -
qword(x): Message data word (unsigned 64 bit); Offset 0 is the qword directly after the Ethertype.
Type: qword
Access Limitation: Read only -
int64(x): Message data word (signed 64 bit); Offset 0 is the int64 directly after the Ethertype.
Type: int64
Access Limitation: Read only