Skip to main content

ethGetPortAccessEntity

CAPL Functions » Ethernet » Function Overview » ethGetPortAccessEntity Valid for: CANoe DE

Function Syntax

EthernetPortAccessEntity ethGetPortAccessEntity(ethernetPort port);

Description

Returns the MACsec Port Access Entity associated with the given measurement port. The measurement port must have an existing MACsec configuration to get a valid port access entity.

Parameters

  • port: A measurement port with an existing MACsec configuration.

Return Values

  • EthernetPortAccessEntity: The MACsec port access entity. Check with its property isValid if the call succeeded.

Example

variables {
    EthernetPortAccessEntity pae1;
}
on prestart
{
    pae1 = ethGetPortAccessEntity(ethernetport::Ethernet1::Port1);
    if (pae1.isValid)
    {
        pae1.active = false;
    }
}

on key ‘s’
{
    if (pae1.isValid)
    {
        if (pae1.active)
            pae1.active = false;
        else
            pae1.active = true;
    }
}