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

ethernetPacket::protocol::ResizeData

Valid for: CANoe DE • CANoe4SW DE

Method Syntax

Description

Resizes the payload of a protocol within an Ethernet packet.
  • If the newLength is greater than the length of the Ethernet packet, the Ethernet packet is enlarged.
  • If <protocol> is not available in the packet, an error is returned.

Parameters

  • newLength: New length in bytes

Return Values

  • 0: Success
  • -1: Error
  • -2: Field or protocol not in packet
  • -3: Protocol has no payload to resize

Example