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

ethernetPacket::HasVlan

Valid for: CANoe DE • CANoe4SW DE

Method Syntax

long ethernetPacket.HasVlan();

Description

Returns number of VLAN tags.

Parameters

Return Values

Number of VLAN tags

Example

on ethernetPacket *
{
  if (this.hasVlan())
  {
    word vlanId;

    vlanId = this.GetVlanId();

    write("Received Ethernet packet with VLAN ID %d", vlanId);
  }
}
See Also