ethernetPacket::protocol::GetData
Valid for: CANoe DE • CANoe4SW DEMethod Syntax
word ethernetPacket.<protocol>.GetData( word offset, char[] dest, word length ); // from 1word ethernetPacket.<protocol>.GetData( word offset, byte[] dest, word length ); // from 2word ethernetPacket.<protocol>.GetData( word offset, struct * dest ); // from 3word ethernetPacket.<protocol>.GetData( word offset, sysvarStruct dest ); // from 4
Description
Gets payload data of a protocol within an Ethernet packet. The data is copied to a destination buffer of the specified type. If the buffer is too small, the data is truncated. If specified length is greater than available data, only the available data is copied to dest and the number of copied bytes is returned. If<protocol> is not available in the packet, 0 is returned.
Parameters
- dest: buffer where the data is copied to.
- length: Number of bytes to copy.
- offset: Byte offset in the payload where it starts to copy data.