Skip to main content
Open topic with navigation CAPL Functions » Ethernet » Function Overview » lookupEthernetPort

lookupEthernetPort

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

ethernetPort lookupEthernetPort(char[] ethernetPortName);

Description

Gets the Ethernet port for a port qualification string.

Parameters

  • ethernetPortName: The port qualification string <NetworkName>::<PortName>.

Return Values

Ethernet port

Example

on ethernetPacket *
{
  if (this.hwPort == lookupEthernetPort("Ethernet1::ChatClient1"))
  {
    write("Received a packet on %s", "Ethernet1::ChatClient1");
  }
}