Open topic with navigation CAPL Functions » Ethernet » Function Overview » ethernetPacket::protocol::field::SetDataDocumentation Index
Fetch the complete documentation index at: https://notevil.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
ethernetPacket::protocol::field::SetData
Valid for: CANoe DE • CANoe4SW DEMethod Syntax
word ethernetPacket.<protocol>.<field>.SetData( word offset, char[]data, word length ); // from 1word ethernetPacket.<protocol>.<field>.SetData( word offset, byte[]data, word length ); // form 2word ethernetPacket.<protocol>.<field>.SetData( word offset, struct * data); // from 3word ethernetPacket.<protocol>.<field>.SetData( word offset, sysvarStruct data); // from 4
Description
Sets payload data of a protocol within an Ethernet packet. The length of the protocol field is not changed. If the source data is larger than the protocol field, the data is truncated. If<protocol> or <field> is not available in the packet, no data is set and 0 is returned.
Parameters
- data: buffer where the data is copied from.
- length: Number of bytes to copy to the protocol field data.
- offset: Byte offset in the protocol field data where it starts to copy data.