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

ethernetPacket::protocol::field::IsAvailable

Valid for: CANoe DE • CANoe4SW DE

Method Syntax

long ethernetPacket.<[protocol](../../../CANoeCANalyzer/Ethernet/Protocols/Protocol.md)>.<field>.IsAvailable();

Description

Returns if a protocol field is available in the Ethernet packet. This can be used, if the protocol contains optional fields or options.

Parameters

Return Values

  • 1: Protocol field is available
  • 0: Protocol field is not available

Example

on ethernetPacket *
{
  if (this.udp.checksum.IsAvailable())
  {
    Write( "Protocol field udp.checksum is available and has value 0x%X", this.udp.checksum );
  }
}