ethernetPacket::protocol::field::GetData
Valid for: CANoe DE • CANoe4SW DEMethod Syntax
word ethernetPacket.<protocol>.<field>.GetData( word offset, char[] dest, word length ); // from 1word ethernetPacket.<protocol>.<field>.GetData( word offset, byte[] dest, word length ); // form 2word ethernetPacket.<protocol>.<field>.GetData( word offset, struct * dest ); // form 3word ethernetPacket.<protocol>.<field>.GetData( word offset, sysvarStruct dest ); // from4
Description
Gets data of a protocol field 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>.<field> is not available in the packet, 0 is returned.
The method is only available for protocol fields, which are not of type integer.
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.