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

ethernetPacket::IsAvailable

Valid for: CANoe DE • CANoe4SW DE

Method Syntax

byte ethernetPacket.IsAvailable(char protocol[], char field[]);

Description

Checks whether the protocol and the protocol field are present in the Ethernet packet.

Parameters

  • protocol: Name of the protocol.
  • field: Name of the field.

Return Values

  • 1: Protocol and protocol field are available in the Ethernet packet
  • 0: Protocol and protocol field are not available in the Ethernet packet

Example

on ethernetPacket *
{
  if(this.IsAvailable("icmpv4", "echo.identifier"))
  {
    Write("Protocol field icmpv4.echo.identifier is available");
  }
}
See Also