Skip to main content
Open topic with navigation CAPL Functions » Ethernet » Function Overview » ethernetPacket::GetData

ethernetPacket::GetData

Valid for: CANoe DE • CANoe4SW DE

Method Syntax

  • word ethernetPacket.GetData(word offset, char dest[], word length); // form 1
  • word ethernetPacket.GetData(word offset, byte dest[], word length); // form 2
  • word ethernetPacket.GetData(word offset, struct * dest); // form 3
  • word ethernetPacket.GetData(word offset, sysvarStruct dest); // form 4
  • word ethernetPacket.GetData(char protocol[], char field[], byte dest[]); // form 5

Description

Copies the data of an Ethernet packet to a byte array, char array, CAPL struct or system variable struct.

Parameters

  • offset: Byte offset of the data in the Ethernet packet. Offset 0 is the byte directly after the Ethertype.
  • dest: Destination where the data is copied to.
  • length: Number of bytes to copy.

Return Values

Number of bytes copied to the destination buffer.

Example