OnMostEthPkt
Valid for: CANoe DEFunction Syntax
Description
When an Ethernet packet is received over the Packet Data Channel theOnMostEthPkt event procedure is called.
The following functions are available for evaluating the event:
-
long mostEventChannel()Returns the channel of the packet event. -
long mostEventTime()Returns the time stamp of the event (Units: 10 µs). -
float mostEventTimeNs()Returns the time stamp of the event (Units: 1 ns). -
long mostEventOrigTime()Returns the hardware generated time stamp of the event (Units: 10 µs). -
int64 mostEthPktSrcMacAdr(), int64 mostEthPktDestMacAdr()Returns the 48 bit source or destination Ethernet address. -
long mostEthPktDir()Returns the direction of transmission (Rx=0, Tx=1, TxRe-quest=2). -
long mostEthPktDlc()Number of transported data bytes. -
long mostEthPktGetData(byte[] buffer, long cnt)Tries to copy cnt data bytes to a provided buffer. Returns the actual number of copied bytes. -
long mostEthPktGetSelData(byte[] buffer, long begin, long cnt)Tries to copy cnt data bytes starting at byte position ‘begin’ to a provided buffer. Returns the actual number of copied bytes. -
long mostEthPktIsSpy()Returns 1 if the packet was received over the Spy of the Packet Data Channel, otherwise 0. -
long mostEthPktAck()Returns the acknowledge code. -
long mostEthPktPAck()Returns the preemptive acknowledge code (for mostEthPktIsSpy()=1 only). (0x00: No Response; 0x01: Buffer full; 0x04: OK) -
dword mostEthPktCRC()Returns the CRC value (for mostEthPktIsSpy()=1 only). -
long mostEthPktCAck()Returns the CRC acknowledge code (for mostEthPktIsSpy()=1 only). (0x00: No Response; 0x01: CRC error; 0x04: OK)
Parameters
- pktDataLen: Number of data bytes of the packet.