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

ethernetPacket::HasProtocolError

Valid for: CANoe DE • CANoe4SW DE

Method Syntax

word ethernetPacket.HasProtocolError();

Description

Returns 1, if the IP protocols of the Ethernet packet contains protocol errors, like wrong checksum or wrong length field, etc.
Use ethernetPacket::GetProtocolErrorText to get a description of the error.

Parameters

Return Values

  • 0: No protocol error detected
  • 1: Protocol error detected

Example

on ethernetPacket *
{
  if (this.hasProtocolError())
  {
    char text[100];
    this.GetProtocolErrorText( text );
    write( "Protocol error on Eth %d: %s", this.msgChannel, text );
  }
}