DEENESPTFRRUARHIKOZHNL

Ethernet Interface (EthIf)

ModulEthIf (Ethernet Interface)
BSW-Modul-ID65
Standard-Header#include "EthIf.h"
SWS-SpezifikationAUTOSAR_SWS_EthernetInterface.pdf
ClusterEthernet Services

Module guideAI-GENERATED

Brokers frames, mode switches, and link states between Ethernet drivers, switches, and the communication stack.
AI-GENERATED unreviewed Model: claude-opus-5-5 · Effort: high · Temperature: not controllable · Prompt: c246974844fe Provenance Open questions (2)
Causal anchor: R20-11 Valid from R20-11 Synthesized for this specification release.
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Brokers frames, mode switches, and link states between Ethernet drivers, switches, and the communication stack.

The Ethernet Interface mediates between EthSM and upper layers on the one hand and the drivers for controllers, transceivers, and switches on the other. Via the asynchronous EthIf_SetControllerMode, it switches controllers including referenced hardware [SWS_EthIf_00034]. It transmits frames in two steps, distributes receive indications, and reports link states to EthSM or BswM. It disables port groups with a delay and forwards wake-up checks to transceivers and switches. Most important constraint: With error detection enabled, almost every service requires a preceding EthIf_Init, otherwise ETHIF_E_UNINIT is reported [SWS_EthIf_00155].

The Ethernet Interface connects the users of the Ethernet stack with the drivers for controllers, transceivers, and switches. It accesses switches via one or more Ethernet Switch Drivers [SWS_EthIf_00228]. Upwards, the EthSM controls the controller modes and receives mode and link notifications [SWS_EthIf_00252]. The BswM receives the link states of independent port groups [SWS_EthIf_00261].

kontext ul Upper Layer (z. B. EthTSyn, V2xGn) ethif EthIf ul->ethif EthIf_ProvideTxBuffer, EthIf_Transmit ethsm EthSM ethsm->ethif EthIf_SetControllerMode bswm BswM integ Integration Code (EcuM-Kontext) integ->ethif EthIf_CheckWakeup ethif->ul <User>_RxIndication, <UL>_TxConfirmation, <User>_TrcvLinkStateChg ethif->ethsm EthSM_CtrlModeIndication, EthSM_TrcvLinkStateChg ethif->bswm BswM_EthIf_PortGroupLinkStateChg eth Eth (Controller-Treiber) ethif->eth Modus, Puffer, Senden trcv EthTrcv ethif->trcv Modus, Link, Wake-up swt EthSwt ethif->swt EthIfSwitchIdx -> EthSwtIdx weth WEth / WEthTrcv ethif->weth only with EthIfEnableWEthApi det Det ethif->det Entwicklungsfehler idsm IdsM ethif->idsm Security-Events eth->ethif EthIf_RxIndication, EthIf_TxConfirmation, EthIf_CtrlModeIndication trcv->ethif EthIf_TrcvModeIndication

Context diagram: EthIf as mediator between upper layer, EthSM, BswM, and integration code on the one hand and the Ethernet drivers on the other. Sources: [SWS_EthIf_00228], [SWS_EthIf_00224], [SWS_EthIf_00252], [SWS_EthIf_00261], EthSwt-SWS p. 5

Communication start is triggered by the asynchronous EthIf_SetControllerMode [SWS_EthIf_00034]. In doing so, EthIf also switches referenced transceivers and port groups [SWS_EthIf_00266], [SWS_EthIf_00264]. It reports the attained controller mode via EthSM_CtrlModeIndication [SWS_EthIf_00252].

Transmission is performed in two steps with EthIf_ProvideTxBuffer and EthIf_Transmit [SWS_EthIf_00067], [SWS_EthIf_00075]. Confirmations reach the upper layer via <UL>_TxConfirmation; in polling mode, EthIf_MainFunctionTx triggers them [SWS_EthIf_00255], [SWS_EthIf_00113]. EthIf distributes received frames via <User>_RxIndication [SWS_EthIf_00104]. It discards and counts frames with invalid VLAN [SWS_EthIf_00317], [SWS_EthIf_00309].

transmission of a frame with confirmationUpper LayerEthIfEthEthIf_ProvideTxBuffer(CtrlIdx, FrameType, Priority, ...)Eth_ProvideTxBuffer(...)BUFREQ_OK, BufIdx, BufPtrBUFREQ_OK, BufIdx, BufPtrfill buffer with payloadEthIf_Transmit(CtrlIdx, BufIdx, FrameType,TxConfirmation, LenByte, PhysAddrPtr)with EthIfVlanID: FrameType 0x8100Eth_Transmit(...)E_OKE_OKaltPolling-ModusEthIf_MainFunctionTx()Eth_TxConfirmation(CtrlIdx)EthIf_TxConfirmation(CtrlIdx, BufIdx, Result)Interrupt-ModusEth_TxIrqHdlr_<CtrlIdx>EthIf_TxConfirmation(CtrlIdx, BufIdx, Result)<UL>_TxConfirmation(CtrlIdx, BufIdx, Result)

Sequence diagram: Buffer request, transmission, and confirmation in polling or interrupt mode. Sources: [SWS_EthIf_00067], [SWS_EthIf_00075], [SWS_EthIf_00091], [SWS_EthIf_00113], EthIf-SWS p. 87

EthIf cyclically determines link states in EthIf_MainFunctionState [SWS_EthIf_00407]. It accumulates them for port groups [SWS_EthIf_00259], and polls signal quality for active links [SWS_EthIf_00409]. EthIf shuts down switch ports of port groups with a delay via the timer EthIfSwitchOffPortTimedelay [SWS_EthIf_00270]. EthIf_CheckWakeup forwards wake-up checks to transceivers and switches [SWS_EthIf_00245], [SWS_EthIf_00500].

With DET enabled, the services report, among other things, invalid indices and missing initialization (ETHIF_E_UNINIT) [SWS_EthIf_00017], [SWS_EthIf_00155]. If the DET is disabled, many services return E_NOT_OK instead [SWS_EthIf_00325]. Optional services such as timestamping or wireless Ethernet can be disabled via configuration parameters [SWS_EthIf_00164], [SWS_EthIf_00342].

Role of EthIf between Ethernet drivers and communication stack

The Ethernet Interface is the hardware-independent mediation layer between the users of the Ethernet stack and the drivers for controllers (Eth), transceivers (EthTrcv), and switches (EthSwt). For switches, EthIf uses one or more Ethernet Switch Drivers, which encapsulate the characteristics of the respective hardware [SWS_EthIf_00228]. EthIf distributes accesses via EthIfSwitchIdx to the responsible EthSwt module with its EthSwtIdx [SWS_EthIf_00224]. With EthIfEnableWEthApi, wireless controller and transceiver drivers are added [SWS_EthIf_00340]. The layering is shown in diagrams EthSwt-SWS p. 5 and Eth-SWS p. 18.

In the upper direction, EthIf collaborates with several partners:

The imported types, including Eth_BufIdxType and EcuM_WakeupSourceType, are defined by [SWS_EthIf_00023]. The file structure is shown in EthIf-SWS p. 15.

kontext ul Upper Layer (z. B. EthTSyn, V2xGn) ethif EthIf ul->ethif EthIf_ProvideTxBuffer, EthIf_Transmit ethsm EthSM ethsm->ethif EthIf_SetControllerMode bswm BswM integ Integration Code (EcuM-Kontext) integ->ethif EthIf_CheckWakeup ethif->ul <User>_RxIndication, <UL>_TxConfirmation, <User>_TrcvLinkStateChg ethif->ethsm EthSM_CtrlModeIndication, EthSM_TrcvLinkStateChg ethif->bswm BswM_EthIf_PortGroupLinkStateChg eth Eth (Controller-Treiber) ethif->eth Modus, Puffer, Senden trcv EthTrcv ethif->trcv Modus, Link, Wake-up swt EthSwt ethif->swt EthIfSwitchIdx -> EthSwtIdx weth WEth / WEthTrcv ethif->weth only with EthIfEnableWEthApi det Det ethif->det Entwicklungsfehler idsm IdsM ethif->idsm Security-Events eth->ethif EthIf_RxIndication, EthIf_TxConfirmation, EthIf_CtrlModeIndication trcv->ethif EthIf_TrcvModeIndication

Context diagram: EthIf connects upper layers, EthSM, BswM, and integration code with the drivers for controllers, transceivers, switches, and wireless Ethernet. Sources: [SWS_EthIf_00228], [SWS_EthIf_00224], [SWS_EthIf_00252], [SWS_EthIf_00261], [SWS_EthIf_00244], [SWS_EthIf_00340], [SWS_EthIf_00502], EthSwt-SWS p. 5

From EthIf_Init to active EthIfController

EthIf_Init [SWS_EthIf_00024] takes an implementation-specific post-build structure of type EthIf_ConfigType [SWS_EthIf_00149]. Almost all services check whether initialization has been performed if error detection is enabled. Otherwise, they report ETHIF_E_UNINIT, such as according to [SWS_EthIf_00155] or [SWS_EthIf_00273].

EthIf_SetControllerMode triggers the communication start; the service operates asynchronously [SWS_EthIf_00034]. In doing so, EthIf also switches the referenced hardware:

  • If a referenced EthIfTransceiver is set to ETH_MODE_DOWN, EthTrcv_SetTransceiverMode and further calls follow in a fixed order [SWS_EthIf_00266].
  • For a port group of type "control", its ports are switched [SWS_EthIf_00264].
  • In case of a direct switch reference, all ports of the switch are switched (DRAFT) [SWS_EthIf_00478].

Controller and remaining hardware are controlled independently of each other EthIf-SWS p. 30. The feedback arrives asynchronously: The driver calls EthIf_CtrlModeIndication [SWS_EthIf_00231], and EthIf reports onward to EthSM_CtrlModeIndication [SWS_EthIf_00252]. Transceivers report via EthIf_TrcvModeIndication [SWS_EthIf_00232].

During shutdown with ETH_MODE_DOWN, EthIf shuts down only active transceivers or switch ports [SWS_EthIf_00484], [SWS_EthIf_00485], [SWS_EthIf_00265]. In contrast, EthIf forwards ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST on every call, regardless of the current mode [SWS_EthIf_00479], [SWS_EthIf_00480], [SWS_EthIf_00481]. Older rules regarding switch shutdown are OBSOLETE in R20-11 [SWS_EthIf_00256], [SWS_EthIf_00257].

mode switch of an EthIfController to ETH_MODE_ACTIVEEthSMEthIfEthEthTrcvEthIf_SetControllerMode(CtrlIdx, ETH_MODE_ACTIVE)Eth_SetControllerMode(CtrlIdx, ETH_MODE_ACTIVE)optEthIfTransceiver referenced and currently ETH_MODE_DOWNEthTrcv_SetTransceiverMode(TrcvIdx, ETH_MODE_ACTIVE)EthTrcv_TransceiverLinkStateRequest(TrcvIdx, ETHTRCV_LINK_STATE_ACTIVE)E_OKfeedback occurs asynchronouslyEthIf_CtrlModeIndication(CtrlIdx, ETH_MODE_ACTIVE)EthSM_CtrlModeIndication(CtrlIdx, ETH_MODE_ACTIVE)EthIf_TrcvModeIndication(TrcvIdx, ETH_MODE_ACTIVE)

Sequence diagram: Mode change according to ETH_MODE_ACTIVE with asynchronous feedback from controller and transceiver. Sources: [SWS_EthIf_00034], [SWS_EthIf_00266], [SWS_EthIf_00231], [SWS_EthIf_00252], [SWS_EthIf_00232], EthIf-SWS p. 85

Transmitting and receiving frames: buffers, VLAN, and confirmations

Transmission takes place in two steps:

  1. EthIf_ProvideTxBuffer [SWS_EthIf_00067] provides buffer index and buffer pointer. Without configured EthIfVlanID, FrameType and Priority remain unused [SWS_EthIf_00146].
  2. EthIf_Transmit [SWS_EthIf_00075] triggers the transmission of the filled buffer. For VLAN controllers, EthIf passes the value 0x8100 to Eth_Transmit instead of the FrameType [SWS_EthIf_00250].

The document citation from R23-11 adds a condition: Forwarding only occurs if the last accepted mode is ETH_MODE_ACTIVE or ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST EthIf-SWS p. 101. Silent communication via ETH_MODE_TX_OFFLINE is only described there EthIf-SWS p. 34. It does not belong to the R20-11 requirements in the payload.

EthIf_TxConfirmation [SWS_EthIf_00091] passes the result through to the upper layer via <UL>_TxConfirmation [SWS_EthIf_00255], [SWS_EthIf_00106]. In polling mode, EthIf_MainFunctionTx generates the confirmations and additionally checks state changes of the transceivers [SWS_EthIf_00113]. In interrupt mode, the driver's ISR calls back directly EthIf-SWS p. 88. The PDU-based signature of EthIf_Transmit from R24-11 onward EthIf-SWS p. 97 does not apply to R20-11.

transmission of a frame with confirmationUpper LayerEthIfEthEthIf_ProvideTxBuffer(CtrlIdx, FrameType, Priority, ...)Eth_ProvideTxBuffer(...)BUFREQ_OK, BufIdx, BufPtrBUFREQ_OK, BufIdx, BufPtrfill buffer with payloadEthIf_Transmit(CtrlIdx, BufIdx, FrameType,TxConfirmation, LenByte, PhysAddrPtr)with EthIfVlanID: FrameType 0x8100Eth_Transmit(...)E_OKE_OKaltPolling-ModusEthIf_MainFunctionTx()Eth_TxConfirmation(CtrlIdx)EthIf_TxConfirmation(CtrlIdx, BufIdx, Result)Interrupt-ModusEth_TxIrqHdlr_<CtrlIdx>EthIf_TxConfirmation(CtrlIdx, BufIdx, Result)<UL>_TxConfirmation(CtrlIdx, BufIdx, Result)

Sequence diagram: Two-step transmission and confirmation in polling or interrupt mode. Sources: [SWS_EthIf_00067], [SWS_EthIf_00075], [SWS_EthIf_00250], [SWS_EthIf_00113], [SWS_EthIf_00091], [SWS_EthIf_00255], EthIf-SWS p. 87, EthIf-SWS p. 88

The driver reports received frames via EthIf_RxIndication [SWS_EthIf_00085]. In polling mode, EthIf_MainFunctionRx checks cyclically for new frames [SWS_EthIf_00097]. In priority processing, this is done per receive queue via Eth_Receive with the appropriate FifoIdx [SWS_EthIf_91051]. It is passed onward via <User>_RxIndication [SWS_EthIf_00104], presumably to the user assigned via FrameType. Question Q-f3145bbfee9a08d0 (open)

If the VLAN is not active, EthIf discards the frame and increments the associated measurement value [SWS_EthIf_00317], namely ETHIF_MEAS_DROP_CRTLIDX [SWS_EthIf_00309]. With EthIfEnableSecurityEventReporting, EthIf additionally reports security events to the IdsM [SWS_EthIf_00502], [SWS_EthIf_00503], EthIf-SWS p. 225.

rx irq Interrupt-Modus: Eth meldet empfangenen Frame ind EthIf_RxIndication(CtrlIdx, FrameType, IsBroadcast, PhysAddrPtr, DataPtr, LenByte) irq->ind poll Polling-Modus: EthIf_MainFunctionRx ruft Eth_Receive poll->ind vlan VLAN / CtrlIdx valid? ind->vlan dropv discard frame, increment ETHIF_MEAS_DROP_CRTLIDX vlan->dropv no etype Ethertype bekannt? vlan->etype yes sevv security event ETHIF_SEV_DROP_INV_VLAN (if EthIfEnableSecurityEventReporting) dropv->sevv dropt Frame verwerfen etype->dropt no user <User>_RxIndication(CtrlIdx, FrameType, ...) an zugeordneten Nutzer (Zuordnung per FrameType: Interpretation) etype->user yes sevt security event ETHIF_SEV_DROP_UNKNOWN_ETHERTYPE (if EthIfEnableSecurityEventReporting) dropt->sevt

Activity diagram: Receive path with filtering of invalid VLAN frames and unknown Ethertypes; the assignment to the user via FrameType is an interpretation. Sources: [SWS_EthIf_00085], [SWS_EthIf_00097], [SWS_EthIf_00317], [SWS_EthIf_00309], [SWS_EthIf_00503], [SWS_EthIf_00104]

Link state, port groups, and signal quality

Controllers without transceiver reference behave as if the link were ETHTRCV_LINK_STATE_ACTIVE [SWS_EthIf_00229]. If the link changes, EthIf calls <User>_TrcvLinkStateChg for each affected EthIfController [SWS_EthIf_00230], [SWS_EthIf_00108]. Without a port group, EthIf reports the state of the host port to the EthSM [SWS_EthIf_00260].

For port groups, EthIf accumulates the state across the ports. For example, ETHTRCV_LINK_STATE_DOWN applies if a host or uplink port is down [SWS_EthIf_00259]. The result is sent to the EthSM if the group is assigned to a controller [SWS_EthIf_00262], otherwise to the BswM [SWS_EthIf_00261].

The polling occurs cyclically in EthIf_MainFunctionState [SWS_EthIf_91104] with the period EthIfMainFunctionStatePeriod [SWS_EthIf_00407]. If this parameter is missing, according to the diagram EthIf_MainFunctionRx handles the polling EthIf-SWS p. 89.

For active links, EthIf additionally polls the signal quality via EthSwt_GetPortSignalQuality [SWS_EthIf_00408] or EthTrcv_GetPhySignalQuality [SWS_EthIf_00409]. Current, highest, and lowest values reside in EthIf_SignalQualityResultType [SWS_EthIf_91057]. They are read via [SWS_EthIf_91056] and reset via [SWS_EthIf_00400] and [SWS_EthIf_00404]. The rule for updating is described in EthIf-SWS p. 176.

cyclic link query with port groupsEthSMBswMEthIfEthSwtEthTrcvaltEthIfMainFunctionStatePeriod definiertEthIf_MainFunctionState()EthIfMainFunctionStatePeriod not definedEthIf_MainFunctionRx()loopall ports of the port groupEthSwt_GetLinkState(SwitchIdx, SwitchPortIdx, ...)link state of the portEthTrcv_GetLinkState(TrcvIdx, ...)link state of the transceiveraccumulate link state of groupaltchange, port group with EthIfControllerEthSM_TrcvLinkStateChg(CtrlIdx, TransceiverLinkState)change, port group without EthIfControllerBswM_EthIf_PortGroupLinkStateChg(PortGroupIdx, PortGroupState)optLink ETHTRCV_LINK_STATE_ACTIVEEthSwt_GetPortSignalQuality(...)EthTrcv_GetPhySignalQuality(...)EthIf_SignalQualityResultType aktualisieren

Sequence diagram: Cyclic link polling, accumulation, notification to EthSM or BswM, and signal quality polling. Sources: [SWS_EthIf_00407], [SWS_EthIf_00259], [SWS_EthIf_00262], [SWS_EthIf_00261], [SWS_EthIf_00408], [SWS_EthIf_00409], EthIf-SWS p. 91, EthIf-SWS p. 92

Port groups are controlled via EthIf_SwitchPortGroupIdxType [SWS_EthIf_91101] and the asynchronous service EthIf_SwitchPortGroupRequestMode [SWS_EthIf_91102]. When activating, EthIf first sets the port mode and then issues the link request [SWS_EthIf_00272].

Shutdown is delayed. Only when all referencing groups request ETH_MODE_DOWN does timer EthIfSwitchOffPortTimedelay start [SWS_EthIf_00270]. After its expiration, EthSwt_PortLinkStateRequest and EthSwt_SetSwitchPortMode follow, each with DOWN [SWS_EthIf_00271]. A new active request affects a running timer [SWS_EthIf_00483]; interpretation: the timer is likely canceled. Question Q-be6e407c499a793b (open)

EthIf_StartAllPorts [SWS_EthIf_91103] switches on all affected ports [SWS_EthIf_00275]. After expiration of EthIfPortStartupActiveTime, EthIf deactivates those ports that were not actively requested up to that point [SWS_EthIf_00276].

portgroup down ETH_MODE_DOWN active ETH_MODE_ACTIVE down->active EthIf_SwitchPortGroupRequestMode(ETH_MODE_ACTIVE): EthSwt_SetSwitchPortMode(ACTIVE), EthSwt_PortLinkStateRequest(ACTIVE) startup aktiv durch EthIf_StartAllPorts (Frist EthIfPortStartupActiveTime) down->startup EthIf_StartAllPorts delay switch-off delay (timer EthIfSwitchOffPortTimedelay) active->delay all referencing port groups request ETH_MODE_DOWN delay->down Timer abgelaufen: EthSwt_PortLinkStateRequest(DOWN), EthSwt_SetSwitchPortMode(DOWN) delay->active erneut ETH_MODE_ACTIVE angefordert (Timerabbruch: Interpretation) startup->down timeout expired, not requested: EthSwt_PortLinkStateRequest(DOWN), ... startup->active requested with ETH_MODE_ACTIVE within timeout

State diagram: Lifecycle of a switch port under port group requests, with shutdown delay and StartAllPorts; the timer cancellation is an interpretation. Sources: [SWS_EthIf_00272], [SWS_EthIf_00270], [SWS_EthIf_00271], [SWS_EthIf_00483], [SWS_EthIf_00275], [SWS_EthIf_00276], EthIf-SWS p. 77

Wake-up, sleep, and forwarded special services

EthIf_CheckWakeup [SWS_EthIf_00244] operates asynchronously. The integration code calls the service, including in interrupt context EthIf-SWS p. 56. EthIf forwards to EthTrcv_CheckWakeup of all affected transceivers [SWS_EthIf_00245] and to EthSwt_SwitchCheckWakeup of the switches [SWS_EthIf_00500]. The service can be disabled via EthIfWakeUpSupport [SWS_EthIf_00248].

For host ECUs, the EcuM specification recommends polling on demand. Whether EthIf is called in EcuM_CheckWakeupHook is implementation-specific EcuM-SWS p. 192, EcuM-SWS p. 189.

wakeup check of a host ECU with Ethernet switchETH-Hardware (PHY)EcuMIntegration CodeEthIfEthSwtEthTrcvWake-up-InterruptEcuM_CheckWakeupHook(WakeupSource)call of EthIf at this pointis implementation-specificEthIf_CheckWakeup(WakeupSource)loopall affected Ethernet switchesEthSwt_SwitchCheckWakeup(...)loopall affected transceivers (EthIfTransceiver / port groups)EthTrcv_CheckWakeup(...)E_OK: check job acceptedactual check asynchronousin EthTrcv_MainFunction

Sequence diagram: Wake-up check of a host ECU via EthIf to switch and transceiver drivers. Sources: [SWS_EthIf_00244], [SWS_EthIf_00245], [SWS_EthIf_00500], EcuM-SWS p. 192, EcuM-SWS p. 189

There are DRAFT requirements for the opposite direction: EthIf_SleepIndication [SWS_EthIf_91006] leads to EthSM_SleepIndication [SWS_EthIf_00497]. As soon as no timers are running, EthIf checks whether the hardware has reached the requested mode [SWS_EthIf_00498]. For transceivers operating as a passive slave, EthIf additionally checks for unexpected link loss [SWS_EthIf_00499]. Wake-up reasons are provided by EthIf_GetPhyWakeupReason via EthTrcv_GetBusWuReason [SWS_EthIf_91004], [SWS_EthIf_00486]. EthIf_SetTransceiverWakeupMode is OBSOLETE [SWS_EthIf_00233].

Many services merely forward:

Configuration and instance reference

Addressing is performed via indices in the context of EthIf: CtrlIdx for EthIfController, TrcvIdx for transceivers, and SwitchIdx for switches. An EthIfController can reference a transceiver, a switch, or a port group [SWS_EthIf_00266], [SWS_EthIf_00478], [SWS_EthIf_00264]. Via EthIfVlanID, it can also represent a VLAN [SWS_EthIf_00250]. EthIf_GetVlanId [SWS_EthIf_00301] and EthIf_GetCtrlIdxList [SWS_EthIf_00298] make these instances visible at runtime. Optional services are enabled or disabled before compilation:

ParametersSwitchesReference
EthIfGlobalTimeSupportTimestamp services[SWS_EthIf_00164], [SWS_EthIf_00170]
EthIfWakeUpSupportEthIf_CheckWakeup[SWS_EthIf_00248]
EthIfEnableWEthApiWireless services[SWS_EthIf_00342]
EthIfSwitchManagementSupportSwitch management[SWS_EthIf_00279]
EthIfGetPortMacAddrApi, EthIfGetArlTableSearch for MAC address and port, ARL table[SWS_EthIf_00192], [SWS_EthIf_00198]
EthIfStoreConfigurationApi, EthIfResetConfigurationApiStoring or resetting learned MAC/port tables[SWS_EthIf_00216], [SWS_EthIf_00221]
EthIfVerifyConfigApiChecking the switch configuration[SWS_EthIf_00305]
EthIfGetAndResetMeasurementDataApiMeasurement data[SWS_EthIf_00316]

According to the document citation from R24-11, the parameter EthIfEnableRxInterrupt EthIf-SWS p. 174 controls reception via interrupt or polling.

Behavior in the event of an error

EthIf reports development errors to the DET. [SWS_EthIf_00017] defines, among others, ETHIF_E_INV_CTRL_IDX (0x01) and ETHIF_E_INV_TRCV_IDX (0x02). The requirements of the individual services additionally use:

If the DET is disabled, many services return E_NOT_OK [SWS_EthIf_00325], [SWS_EthIf_00326] instead. Differing from this, [SWS_EthIf_00319] specifies the code ETHIF_E_NOTINIT.

Runtime errors are made visible via return values:

At network level, EthIf counts discarded frames and optionally reports them as a security event [SWS_EthIf_00309], [SWS_EthIf_00503]. EthIf propagates link loss to the users or to EthSM or BswM [SWS_EthIf_00230], [SWS_EthIf_00262], [SWS_EthIf_00261]. For transceivers operating as a passive slave, EthIf additionally detects an unexpected link-down [SWS_EthIf_00499].

Further detailed evidence

AI-generated module guide based on the references contained in the payload. The AUTOSAR specification Ethernet Interface R20-11 is solely normative. Document citations from other releases are marked as such.

Ethernet Interface (EthIf)

Abstracts Ethernet controller and transceiver hardware for upper protocol layers.

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

function EthIf_Init [SWS_EthIf_00024] 📄 PDF

void EthIf_Init (const EthIf_ConfigType* CfgPtr);

Initializes the Ethernet Interface

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 5453d77780ab Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The function EthIf_Init initializes the Ethernet interface module ([SWS_EthIf_00024]). It is executed synchronously, is non-reentrant (Non Reentrant), and is available via the header file EthIf.h with the service ID 0x01. As its only passed parameter, the function expects the pointer CfgPtr, which points to an implementation-specific configuration structure of type EthIf_ConfigType. There are neither inout nor out parameters, and the function has no return value ([SWS_EthIf_00024]).

Concurrency and Call Context

Since EthIf_Init is non-reentrant, no concurrent or nested calls may occur [SWS_EthIf_00024]. Since the specific call context is not described in more detail in the payload, the call would typically take place once during the initialization sequence of the ECU before utilizing other Ethernet services. Question Q-07e92f9f3c15ea5b (open)

Order Requirements and Interaction

Calling EthIf_Init is a mandatory prerequisite for using all other functions of the module. Provided that Development Error Detection is enabled, numerous Ethernet Interface services check prior to their execution whether EthIf_Init was called previously:

This usage note was created automatically and is based on the AUTOSAR Classic R20-11 specification.

Implementer's Guide to follow (complexity I2)

function EthIf_SetControllerMode [SWS_EthIf_00034] 📄 PDF

Std_ReturnType EthIf_SetControllerMode (uint8 CtrlIdx, Eth_ModeType CtrlMode);

Enables / disables the indexed controller thernet Interface AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_EthernetInterface

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ae12ff5b506f Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The function EthIf_SetControllerMode enables or disables the Ethernet controller specified via CtrlIdx in the context of the Ethernet interface [SWS_EthIf_00034]. The following states are requested via the parameter CtrlMode [SWS_EthIf_00034]:

  • ETH_MODE_DOWN: Deactivates the controller.
  • ETH_MODE_ACTIVE: Enables the controller.
  • ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST: Enables the controller and requests a wake-up on the network.

The function operates asynchronously [SWS_EthIf_00034]. It returns E_OK upon successful execution, or E_NOT_OK if the controller mode could not be changed [SWS_EthIf_00034].

Interaction and Forwarding

If EthIf_SetControllerMode is called with ETH_MODE_ACTIVE for a controller that references a EthIfSwitchPortGroup of type “control”, EthIf forwards the call to all ports of the group, provided that this mode is requested for the port for the first time and its state is ETH_MODE_DOWN. In doing so, EthSwt_SetSwitchPortMode with ETH_MODE_ACTIVE and EthSwt_PortLinkStateRequest with ETHTRCV_LINK_STATE_ACTIVE are executed sequentially [SWS_EthIf_00264].

When ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST is requested, EthIf forwards the calls regardless of the current mode as follows:

  • In case of a reference to a EthIfTransceiver: call of EthTrcv_SetTransceiverMode with ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST and subsequently EthTrcv_TransceiverLinkStateRequest with ETHTRCV_LINK_STATE_ACTIVE, if the current status is ETHTRCV_LINK_STATE_DOWN [SWS_EthIf_00479].
  • In case of a reference to a EthIfSwitch or a EthIfSwitchPortGroup of type “control”: call of EthSwt_SetSwitchPortMode with ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST and subsequently EthSwt_PortLinkStateRequest with ETHTRCV_LINK_STATE_ACTIVE, if the current state is ETHTRCV_LINK_STATE_DOWN [SWS_EthIf_00480], [SWS_EthIf_00481].

restrictions

The function is non-reentrant (Non Reentrant) and available via EthIf.h [SWS_EthIf_00034].

This usage note was generated automatically based on the specification AUTOSAR CP R20-11.

Implementer's Guide to follow (complexity I2)

function EthIf_SetTransceiverWakeupMode [SWS_EthIf_00233] 📄 PDF

Std_ReturnType EthIf_SetTransceiverWakeupMode (uint8 TrcvIdx, EthTrcv_WakeupModeType TrcvWakeupMode);

Enables / disables the wake up mode or clear the wake - up reason of the indexed transceiver Tags: atp.Status=obsolete

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d9ee9c3c6e19 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous and non-reentrant function EthIf_SetTransceiverWakeupMode (Service ID 0x2e) is used to set the wake-up mode of a transceiver addressed via TrcvIdx in the Ethernet Interface or to reset its wake-up reason [SWS_EthIf_00233]. The function is declared in header file EthIf.h and marked as obsolete (obsolete) in release AUTOSAR CP R20-11 [SWS_EthIf_00233].

Control is performed via the input parameter TrcvWakeupMode [SWS_EthIf_00233]:

  • ETHTRCV_WUM_ENABLE: Enables wake-up of the transceiver [SWS_EthIf_00233]. If the associated driver EthIfTransceiverIdx is currently in state ETHTRCV_WUM_DISABLE, the call is forwarded to EthTrcv_SetTransceiverWakeupMode [SWS_EthIf_00234].
  • ETHTRCV_WUM_DISABLE: Disables wake-up of the transceiver [SWS_EthIf_00233]. If the current state of the driver is ETHTRCV_WUM_ENABLE, the function forwards the call to EthTrcv_SetTransceiverWakeupMode [SWS_EthIf_00268].
  • ETHTRCV_WUM_CLEAR: Clears the wake-up reason of the indexed transceiver [SWS_EthIf_00233].

As return value, the call returns E_OK upon successful execution or E_NOT_OK if the wake-up mode could not be changed or the wake-up reason could not be cleared [SWS_EthIf_00233]. Since the interface is defined as non-reentrant, concurrent calls are not permissible [SWS_EthIf_00233].

This usage note was created automatically based on the AUTOSAR CP R20-11 specification.

Implementer's Guide to follow (complexity I1)

function EthIf_GetTransceiverWakeupModethernetInterface [SWS_EthIf_00238] 📄 PDF

Std_ReturnType EthIf_GetTransceiverWakeupMode (uint8 TrcvIdx, EthTrcv_WakeupModeType* TrcvWakeupModePtr);

Returns the wake up mode of the indexed tran sceiver Tags: atp.Status=obsolete

function EthIf_CheckWakeup [SWS_EthIf_00244] 📄 PDF

Std_ReturnType EthIf_CheckWakeup (EcuM_WakeupSourceType WakeupSource);

This API request the affected Ethernet hardware to c heck for a signaled wake - up. The used Ethernet hardware could be an Ethernet switch or Ethernet transceiver (PHY). This is used e.g. for Ethernet hardware which is compliant to the specification of Open Alliance TC10. This API is called by the integration code. The function could be called in context of the interrupt or on task level.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 99f093847096 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_CheckWakeup requests the affected Ethernet hardware to check a signaled wake-up [SWS_EthIf_00244]. This is used, for example, for Ethernet hardware that is compliant with the OPEN Alliance TC10 specification [SWS_EthIf_00244]. The call is performed asynchronously and reentrantly by the integration code, optionally in the context of an interrupt or at task level [SWS_EthIf_00244].

The input parameter is WakeupSource of type EcuM_WakeupSourceType, which designates the initiating source device (Ethernet transceiver or Ethernet switch) [SWS_EthIf_00244]. The return value is E_OK if the check request was accepted by the hardware, otherwise E_NOT_OK upon rejection of the request [SWS_EthIf_00244]. The module forwards the call internally to the underlying drivers:

  • For all affected Ethernet transceivers (referenced via EthIfTransceiver or EthIfSwitchPortGroups), EthTrcv_CheckWakeup of the respective transceiver driver is called [SWS_EthIf_00245].
  • For all affected Ethernet switches (referenced via EthIfSwitch), EthSwt_SwitchCheckWakeup of the corresponding switch driver is called [SWS_EthIf_00500].

The availability of EthIf_CheckWakeup can be enabled and disabled at pre-compile time via the configuration parameter EthIfWakeUpSupport [SWS_EthIf_00248]. The API is provided via the header EthIf.h [SWS_EthIf_00244].

This usage note was generated automatically based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_GetSwitchPortWakeupReason [SWS_EthIf_00488] 📄 PDF

Std_ReturnType EthIf_GetSwitchPortWakeupReason (uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_WakeupReasonType* WakeupReasonPtr);

This function obtains the wake up reasons of the indexed Ethernet switch port by

function EthIf_GetPhysAddr [SWS_EthIf_00061] 📄 PDF

void EthIf_GetPhysAddr (uint8 CtrlIdx, uint8* PhysAddrPtr);

Obtains the physical source address used by the indexed controller

function EthIf_SetPhysAddr [SWS_EthIf_00132] 📄 PDF

void EthIf_SetPhysAddr (uint8 CtrlIdx, const uint8* PhysAddrPtr);

Sets the physical source address used by the indexed controller.

function EthIf_UpdatePhysAddrFilter [SWS_EthIf_00139] 📄 PDF

Std_ReturnType EthIf_UpdatePhysAddrFilter (uint8 CtrlIdx, const uint8* PhysAddrPtr, Eth_FilterActionType Action);

Update the physical source address to/ from the indexed controller filter. If the Ethernet Controller is not capable to do the filtering, the software has to do this.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 0059e8b2ee6e Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_UpdatePhysAddrFilter ([SWS_EthIf_00139]) serves to update the address filter for the Ethernet controller specified via CtrlIdx. Via parameter Action (of type Eth_FilterActionType), a physical address is added to or removed from the filter.

For configuration, PhysAddrPtr expects a pointer to the physical MAC address in network byte order, which represents the multicast destination address of the Layer 2 Ethernet frame [SWS_EthIf_00139]. Although the textual function description refers to a source address, this is likely an editorial oversight, since the parameter specification bindingly defines the multicast destination address. Question Q-312e20e5eadda94a (open)

Regarding the sequence and constraints, the following specifications apply [SWS_EthIf_00139]:

  • Return values: The function returns E_OK if the filter configuration was changed successfully, or E_NOT_OK if the change failed. Specific DET or DEM error codes are not defined in the sources.
  • Hardware support: If the underlying Ethernet controller is not capable of performing the filtering on the hardware side, the software must take over this filtering task.
  • Concurrency: The call is non-reentrant for the same controller index (CtrlIdx), but may be executed concurrently for different controllers.

This usage note was generated by an AI based on the specification R20-11.

function EthIf_GetArlTable [SWS_EthIf_00196] 📄 PDF

Std_ReturnType EthIf_GetArlTable (uint8 switchIdx, uint16* numberOfElements, Eth_MacVlanType* arlTableListPointer);

Obtains the address resolution ta ble of a switch and copies the list into a user provided buffer. The function will copy all or number Of

function EthIf_GetAndResetMeasurementData [SWS_EthIf_91011] 📄 PDF

Std_ReturnType EthIf_GetAndResetMeasurementData (EthIf_MeasurementIdxType MeasurementIdx, boolean MeasurementResetNeeded, uint32* MeasurementDataPtr);

Allows to read and reset detailed measurement data for diagnostic purposes. Get all Measurement Idx's at once is not supported. ETHIF_ MEAS_ ALL shall only be used to reset all Measurement Idx's at once. A NULL_ PTR shall be provided for Measurement Data Ptr in this case.

function EthIf_StoreConfiguration [SWS_EthIf_00214] 📄 PDF

Std_ReturnType EthIf_StoreConfiguration (uint8 SwitchIdx);

The function shall request to store the configuration of the learned MAC/ Port tables of a Ethernet switch in a persistent manner. This could be used by e.g. a CDD.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 31fa677de79c Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Call Context

The function EthIf_StoreConfiguration serves to request persistent storage of the learned MAC/port tables of an Ethernet switch [SWS_EthIf_00214]. For example, a Complex Device Driver (CDD) is mentioned as a typical caller [SWS_EthIf_00214]. The interface is accessible via the header file EthIf.h and has the service ID 0x2c [SWS_EthIf_00214].

Via the input parameter SwitchIdx, the index of the target switch is passed in the context of the Ethernet switch driver [SWS_EthIf_00214]. As return value, the function provides the status Std_ReturnType: The value E_OK indicates that the storage request was accepted, while E_NOT_OK signals non-acceptance [SWS_EthIf_00214]. Since the specification designates the execution as synchronous/asynchronous, the acceptance of the request is likely to occur synchronously, while the actual persisting is presumably handled asynchronously in downstream modules. Question Q-4f10e936c7d30258 (open)

Restrictions and Error Handling

Regarding concurrency, EthIf_StoreConfiguration is specified as non-reentrant (Non Reentrant) [SWS_EthIf_00214]. Parallel calls must therefore be avoided or synchronized on the caller side. Specific DET or DEM error reports are not defined for this interface; an error during request acceptance is reported exclusively via the return value E_NOT_OK [SWS_EthIf_00214].

This usage note was created automatically. Changes to the source documents lead to regeneration.

Implementer's Guide to follow (complexity I1)

function EthIf_ResetConfiguration [SWS_EthIf_00219] 📄 PDF

Std_ReturnType EthIf_ResetConfiguration (uint8 SwitchIdx);

The function shall request to reset the configuration of the learned MAC/ Port tables of a Eth ernet switch in a persistent manner. This could be used by e.g. a CDD. The statically configured entries shall still remain.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 46cb0df40dd4 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Call Context

The function EthIf_ResetConfiguration serves to request persistent resetting of the dynamically learned MAC and port tables of an Ethernet switch [SWS_EthIf_00219]. Statically configured entries remain unchanged in the configuration [SWS_EthIf_00219]. For example, a Complex Device Driver (CDD) can act as caller of this interface [SWS_EthIf_00219].

Via the passed parameter SwitchIdx, the index of the affected switch is specified in the context of the Ethernet switch driver [SWS_EthIf_00219]. Regarding execution semantics, the operation is indicated as synchronous/asynchronous [SWS_EthIf_00219]; this is likely to mean that the acceptance of the request is acknowledged synchronously, while resetting the hardware tables takes place asynchronously. Question Q-9e7f89ec9e809fd0 (open)

Return Values and Error Handling

As return value, the function provides a status of type Std_ReturnType [SWS_EthIf_00219]:

Specific DET or DEM error reports are not documented for this function in the present scope of the specification.

Concurrency and Limitations

The interface is specified as non-reentrant (Non Reentrant) [SWS_EthIf_00219]. Callers must therefore ensure that no concurrent or interrupting calls take place. The function is included via the header file EthIf.h [SWS_EthIf_00219].

This usage note was generated automatically based on the specification of AUTOSAR Release R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_GetCurrentTime [SWS_EthIf_00154] 📄 PDF

Std_ReturnType EthIf_GetCurrentTime (uint8 CtrlIdx, Eth_TimeStampQualType* timeQualPtr, Eth_TimeStampType* timeStampPtr);

Returns a time value out of the HW registers according to the capability of the HW. Is the HW resolution is lower than the Eth_ Time Stamp Type resolution resp. range, the remaining bits will be filled with 0. Important Note: Eth If_ Get Curren t Time may be called within an exclusive area.

function EthIf_EnableEgressTimeStamp [SWS_EthIf_00160] 📄 PDF

void EthIf_EnableEgressTimeStamp (uint8 CtrlIdx, Eth_BufIdxType BufIdx thernetInterface); ⚠️

Activates egress time stamping on a dedicated message object. Some HW does store once the egress time stamp marker and some HW needs it always before transmission. There will be no "disable" functionality, due to the fact, that the message type is always " time stamped" by network design.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 3c09f202ad0f Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_EnableEgressTimeStamp serves to activate the capture of egress timestamps (Egress Time Stamping) for a dedicated message object or transmit buffer [SWS_EthIf_00160]. The interface is provided via the header file EthIf.h [SWS_EthIf_00160].

Parameters and Call

When called, the function expects two input parameters to be passed [SWS_EthIf_00160]:

  • CtrlIdx: Index of the addressed Ethernet controller [SWS_EthIf_00160].
  • BufIdx: Index of the message buffer at which the application expects the capture of the egress timestamp [SWS_EthIf_00160].

The function has no return value (void) and no input or output parameters [SWS_EthIf_00160].

Hardware Behavior and Concurrency

The behavior of the hardware differs depending on the controller: Some hardware types store the flag for the egress timestamp persistently after a single configuration, whereas other controllers mandatorily require it before each individual transmission [SWS_EthIf_00160]. Interpretation: On controllers without persistent storage, the function is consequently likely to have to be called again by the application before each transmission process. Question Q-e87b424598f8a684 (open) According to the specification, no deactivation option exists because the corresponding message type is persistently timestamped according to the network design [SWS_EthIf_00160].

Regarding concurrency, the function is defined as non-reentrant (Non Reentrant) [SWS_EthIf_00160].

This usage note was generated automatically based on the specification AUTOSAR R20-11.

function EthIf_GetEgressTimeStamp [SWS_EthIf_00166] 📄 PDF

Std_ReturnType EthIf_GetEgressTimeStamp (uint8 CtrlIdx, Eth_BufIdxType BufIdx, Eth_TimeStampQualType* timeQualPtr, thernetInterface* timeStampPtr); ⚠️

Reads back the egress time stamp on a dedicated message object. It must be called within the Tx Confirmation() function.

function EthIf_GetIngressTimeStamp [SWS_EthIf_00172] 📄 PDF

Std_ReturnType EthIf_GetIngressTimeStamp (uint8 CtrlIdx, const Eth_DataType* DataPtr, Eth_TimeStampQualType* timeQualPtr, Eth_TimeStampType* timeStampPtr);

Reads back the ingress time stamp on a dedicated message object. It must be called within the Rx Indication() function.

function EthIf_SwitchPortGroupRequestMode [SWS_EthIf_91102] 📄 PDF

Std_ReturnType EthIf_SwitchPortGroupRequestMode (EthIf_SwitchPortGroupIdxType PortGroupIdx, Eth_ModeType PortMode);

Request a mode for the Eth If Swt Port Group. The call shall be forwarded to Eth Swt by calling Eth Swt_ Set Switch P ort Mode for all Eth Swt Ports referenced by the port group.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 93249af97580 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The asynchronous function EthIf_SwitchPortGroupRequestMode requests an operating mode for a switch port group ([SWS_EthIf_91102]). The call is specified as non-reentrant and passes the index of the port group (PortGroupIdx) as well as the desired target mode (PortMode). Available modes are ETH_MODE_DOWN for deactivation, ETH_MODE_ACTIVE for activation, and ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST for activation with network wake-up ([SWS_EthIf_91102]). Upon successful initiation, the function returns E_OK, otherwise E_NOT_OK ([SWS_EthIf_91102]).

Basically, EthIf forwards the request to the underlying switch by calling EthSwt_SetSwitchPortMode for all referenced ports ([SWS_EthIf_91102]). In doing so, specific behavioral rules apply to the various modes:

  • Deactivation (ETH_MODE_DOWN): If the ports are currently in the state ETH_MODE_ACTIVE and ETH_MODE_DOWN was requested for all groups referencing the ports, EthIf starts a timer with the delay time EthIfSwitchOffPortTimedelay ([SWS_EthIf_00270]).
  • Activation (ETH_MODE_ACTIVE or ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST): A running shutdown delay timer for the ports of the respective port group is aborted immediately ([SWS_EthIf_00483]).
  • Wake-up request (ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST): The call is forwarded mandatorily in a fixed sequence for all ports of the group, regardless of the current port mode: First, EthSwt_SetSwitchPortMode is called with ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST, followed by EthSwt_PortLinkStateRequest with ETHTRCV_LINK_STATE_ACTIVE if the current link state is ETHTRCV_LINK_STATE_DOWN ([SWS_EthIf_00482]).

Specific DET or DEM error messages are not listed for this service; the failure of a mode change is indicated directly via the return value E_NOT_OK ([SWS_EthIf_91102]).

This usage note was generated automatically based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I2)

function EthIf_StartAllPorts [SWS_EthIf_91103] 📄 PDF

Std_ReturnType EthIf_StartAllPorts (void);

Request to set all configured and affected Eth Swt Ports to ETH_ MODE_ ACTIVE

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 482f0b4972cd Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_StartAllPorts serves to request setting all configured and affected Ethernet switch ports to the state ETH_MODE_ACTIVE ([SWS_EthIf_91103]). The call is parameterless, has asynchronous semantics, and is specified as reentrant ([SWS_EthIf_91103]). As return value, E_OK indicates acceptance of the request, whereas E_NOT_OK indicates rejection ([SWS_EthIf_91103]).

After the call of EthIf_StartAllPorts, EthIf forwards the control commands to all affected ports of the Ethernet switches (EthSwtPorts) in a firmly defined order ([SWS_EthIf_00275]):

  • First, EthSwt_SetSwitchPortMode is called with ETH_MODE_ACTIVE, provided that the current mode is ETH_MODE_DOWN ([SWS_EthIf_00275]).
  • Thereafter, the call of EthSwt_PortLinkStateRequest with ETHTRCV_LINK_STATE_ACTIVE takes place if the current link state is ETHTRCV_LINK_STATE_DOWN, and a timer with the time span EthIfPortStartupActiveTime is started for all these ports ([SWS_EthIf_00275]).

If a port enabled in this manner is not requested regularly with ETH_MODE_ACTIVE within the time span EthIfPortStartupActiveTime, EthIf automatically disables this port again ([SWS_EthIf_00276]). The deactivation mandatorily takes place in reverse order:

  • First, EthSwt_PortLinkStateRequest is called with ETHTRCV_LINK_STATE_DOWN ([SWS_EthIf_00276]).
  • Subsequently, EthSwt_SetSwitchPortMode is called with ETH_MODE_DOWN ([SWS_EthIf_00276]).

This usage note is based on the specifications of the AUTOSAR Classic Platform R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_SetSwitchMgmtInfo [SWS_EthIf_91003] 📄 PDF

Std_ReturnType EthIf_SetSwitchMgmtInfo (uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtInfoType* MgmtInfoPtr);

Provides additional management information along to an Ethernet frame that requires special treatment within the Switch. It has to be called between Eth If_ Provide Tx Buffer() and Eth If_ Transmit() of the related frame.

function EthIf_GetTxMgmtObject [SWS_EthIf_91106] 📄 PDF

Std_ReturnType EthIf_GetTxMgmtObject (uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtObjectType* * MgmtObjectPtr);

Request the Mgmt Object of the (in this context) unique Buf Idx.

function EthIf_SwitchEnableTimeStamping [SWS_EthIf_91007] 📄 PDF

Std_ReturnType EthIf_SwitchEnableTimeStamping (uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtInfoType* MgmtInfo);

Activates egress time stamping on a dedicated message object, addressed by Ctrl Idx and Buf Idx.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 97b7a2a9a3c5 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_SwitchEnableTimeStamping ([SWS_EthIf_91007]) activates the recording of egress timestamps for a specific message object at switch level. The associated transmission object is addressed via the controller index CtrlIdx and the buffer index BufIdx.

Call and Parameters

The call is synchronous ([SWS_EthIf_91007]). As input parameters, the function expects the controller index CtrlIdx within the EthIf context as well as BufIdx for the message buffer at which the application expects time stamping. Via the output parameter MgmtInfo of type EthSwt_MgmtInfoType*, associated management information is provided ([SWS_EthIf_91007]).

Return values and behavior

The function signals the result via a return value of type Std_ReturnType ([SWS_EthIf_91007]):

Restrictions and Concurrency

The interface is specified as non-reentrant (Non Reentrant) ([SWS_EthIf_91007]). Callers must therefore ensure that concurrent calls are prevented. The declaration is provided via header EthIf.h ([SWS_EthIf_91007]).

This usage note was generated automatically based on AUTOSAR R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_VerifyConfig [SWS_EthIf_91012] 📄 PDF

Std_ReturnType EthIf_VerifyConfig (uint8 SwitchIdx, boolean* Result);

Forwarded t o Eth Swt_ Verify Config. Eth Swt_ Verify Config verifies the Switch thernet Interface AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_EthernetInterface Configuration depending on the HW - Architecture, HW - capability and the intended accuracy of this verification.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 775ea0d621ed Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous interface function EthIf_VerifyConfig serves to check the switch configuration and forwards the call directly to EthSwt_VerifyConfig [SWS_EthIf_91012]. The actual verification is performed by the Ethernet switch driver depending on the respective hardware architecture, hardware capabilities, and intended check accuracy [SWS_EthIf_91012].

Usage and Parameters

The function is available via the header EthIf.h with the service ID 0x40 and expects two parameters [SWS_EthIf_91012]:

  • SwitchIdx (in): Index of the switch within the context of the Ethernet switch driver.
  • Result (out): Pointer to a boolean value that receives the verification result. TRUE indicates a successfully verified configuration, whereas FALSE indicates detected corruption.

As return value, Std_ReturnType reports the status of the execution: E_OK signals that the verification completed successfully, whereas E_NOT_OK indicates that the configuration check failed [SWS_EthIf_91012].

Concurrency and Error Handling

The function is specified as non-reentrant (Non Reentrant) [SWS_EthIf_91012]. Callers must therefore ensure that no concurrent calls take place. Because the payload lists no specific error codes for DET or DEM, detailed parameter checks (such as validation of indices or pointers) are presumably handled on the driver side or implementation-specifically. Question Q-03b5f343e97bec7f (open)

This usage note was generated automatically and is based exclusively on the specification data from AUTOSAR R20-11.

function EthIf_SetForwardingMode [SWS_EthIf_91013] 📄 PDF

Std_ReturnType EthIf_SetForwardingMode (uint8 SwitchIdx, boolean mode);

Verifies the Switch Configuration. If Configuration is not valid, Switch is reconfigured.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 84d8304b8c11 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_SetForwardingMode is provided via header EthIf.h and serves to control frame forwarding on an Ethernet switch [SWS_EthIf_91013]. It verifies the current switch configuration and performs a reconfiguration of the switch if invalidity is detected [SWS_EthIf_91013].

Parameters and Return Values

Upon invocation (service ID 0x41), the following input parameters are passed [SWS_EthIf_91013]:

  • SwitchIdx: Index of the relevant switch within the context of the Ethernet switch driver [SWS_EthIf_91013].
  • mode: Boolean switch to enable (TRUE) or disable (FALSE) frame forwarding [SWS_EthIf_91013].

As a return value, the function provides Std_ReturnType [SWS_EthIf_91013]:

Concurrency and Limitations

The function is specified as non-reentrant (Non Reentrant) [SWS_EthIf_91013]. Callers must therefore ensure that calls for the same or parallel switch contexts are serialized and that no concurrent calls occur. Specific error codes for DET or DEM are not defined for this service in the standard.

This usage note was generated automatically and is based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I1)

function EthIf_GetTrcvSignalQuality [SWS_EthIf_91056] 📄 PDF

Std_ReturnType EthIf_GetTrcvSignalQuality (uint8 TrcvIdx, EthIf_SignalQualityResultType* ResultPtr);

Retrieves the signal quality of the link of the given Ethernet transceiver

function EthIf_GetSwitchPortSignalQuality [SWS_EthIf_91058] 📄 PDF

Std_ReturnType EthIf_GetSwitchPortSignalQuality (uint8 SwitchIdx, uint8 SwitchPortIdx, EthIf_SignalQualityResultType* ResultPtr);

Retrieves the signal quality of the link of the given Ethernet switch port

function EthIf_ClearTrcvSignalQuality [SWS_EthIf_91059] 📄 PDF

Std_ReturnType EthIf_ClearTrcvSignalQuality (uint8 TrcvIdx);

Clear the stored signal quality of the link of the given Ethernet transceiver

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: b5e0adba4624 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_ClearTrcvSignalQuality serves to synchronously clear the stored signal quality values of an Ethernet connection for a specific transceiver [SWS_EthIf_91059]. For this purpose, the caller passes the index of the transceiver within the context of the Ethernet Interface using parameter TrcvIdx, whereupon the corresponding measured values are cleared [SWS_EthIf_00400].

As return value, the interface provides type Std_ReturnType: If resetting the signal quality was successful, E_OK is reported; otherwise, the operation fails with E_NOT_OK [SWS_EthIf_91059]. Interpretation: The error value E_NOT_OK is presumably attributable to invalid index parameters or errors when forwarding to underlying drivers, since the payload does not mention any specific error codes or DET entries. Question Q-40d8f0c1fc7ba11e (open)

With regard to concurrency, the service is implemented as reentrant for different transceiver indices, but explicitly non-reentrant for the same one TrcvIdx [SWS_EthIf_91059]. Multiple calls for the identical transceiver must therefore not occur simultaneously from concurrent contexts and must be protected accordingly.

In module interaction, the call specifically clears the stored signal quality values of type EthIf_SignalQualityResultType for the EthIfTransceiver addressed via TrcvIdx [SWS_EthIf_00400]. The declaration of the synchronous interface with service ID 0x19 is provided via header EthIf.h [SWS_EthIf_91059].

This text was generated by an AI based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_ClearSwitchPortSignalQuality [SWS_EthIf_91060] 📄 PDF

Std_ReturnType EthIf_ClearSwitchPortSignalQuality (uint8 SwitchIdx, uint8 SwitchPortIdx);

Clear the stored signal quality of the link of the given Et hernet switch port

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 821340633a61 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The synchronous function EthIf_ClearSwitchPortSignalQuality serves to reset the stored signal quality values for the link of a specific Ethernet switch port [SWS_EthIf_91060]. The target port is addressed via the two input parameters SwitchIdx (index of the Ethernet switch) and SwitchPortIdx (index of the port within the interface context) [SWS_EthIf_91060]. The function is available via header file EthIf.h [SWS_EthIf_91060].

Interaction and data structures

According to [SWS_EthIf_00404], the call clears the internally held signal quality values of the addressed switch port, which correspond to type EthIf_SignalQualityResultType. This enables higher-level modules to deliberately discard historical measured values and initiate a reassessment of the link quality.

Error handling

The success of the operation is indicated via the return value of type Std_ReturnType: Upon successful clearing, the function returns E_OK; otherwise E_NOT_OK [SWS_EthIf_91060]. Specific DET or DEM error codes are not defined in the payload. Interpretation: Return value E_NOT_OK is likely to occur in particular if invalid indices are passed or if the underlying switch driver cannot perform the reset. Question Q-fc42f5b3e5414f6a (open)

Concurrency and Limitations

With regard to reentrancy, EthIf_ClearSwitchPortSignalQuality is reentrant for different switch and switch port indices [SWS_EthIf_91060]. For the same switch port (SwitchPortIdx), however, the function is specified as non-reentrant [SWS_EthIf_91060]. Callers must therefore ensure that simultaneous calls for the same port are avoided or protected by suitable synchronization mechanisms.

This text was generated by an AI and serves as orienting documentation.

Implementer's Guide to follow (complexity I1)

function EthIf_SetPhyTestMode [SWS_EthIf_91016] 📄 PDF

Std_ReturnType EthIf_SetPhyTestMode (uint8 TrcvIdx, EthTrcv_PhyTestModeType Mode);

Activates a given test mode.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 64928adfaeea Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous interface function EthIf_SetPhyTestMode serves to activate a predefined test mode on an Ethernet transceiver [SWS_EthIf_91016]. The service is declared in header file EthIf.h and identifiable via hexadecimal service ID 0x17 [SWS_EthIf_91016].

For the call, the function expects two input parameters to be passed [SWS_EthIf_91016]:

  • TrcvIdx: Determines the numeric index of the target transceiver within the context of the Ethernet Interface [SWS_EthIf_91016].
  • Mode: Defines the concrete test mode of type EthTrcv_PhyTestModeType to be activated [SWS_EthIf_91016].

Input/output parameters do not exist [SWS_EthIf_91016]. As return value, the service returns a status of type Std_ReturnType [SWS_EthIf_91016]. The return value E_OK confirms that the request to activate the test mode was accepted successfully [SWS_EthIf_91016]. The value E_NOT_OK, on the other hand, indicates that the request was rejected and the test mode could not be activated [SWS_EthIf_91016].

With regard to concurrency, EthIf_SetPhyTestMode is specified as reentrant for different transceiver indices (TrcvIdx) [SWS_EthIf_91016]. For the same transceiver index, execution is explicitly non-reentrant [SWS_EthIf_91016]. Callers must therefore ensure that concurrent calls for the same transceiver instance are avoided and coordinated sequentially instead.

This text was generated by an AI based on the specification.

Implementer's Guide to follow (complexity I1)

function EthIf_SetPhyLoopbackMode [SWS_EthIf_91018] 📄 PDF

Std_ReturnType EthIf_SetPhyLoopbackMode (uint8 TrcvIdx, EthTrcv_PhyLoopbackModeType Mode);

Activates a given loopback mode.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f13ccd8e218e Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The synchronous function EthIf_SetPhyLoopbackMode serves to activate a specified loopback mode on an Ethernet transceiver [SWS_EthIf_91018]. The declaration is available via the header file EthIf.h [SWS_EthIf_91018].

Upon invocation, the function expects two input parameters:

  • TrcvIdx: Index of the transceiver within the context of the Ethernet Interface [SWS_EthIf_91018].
  • Mode: The loopback mode of type EthTrcv_PhyLoopbackModeType to be activated [SWS_EthIf_91018].

As return value, the function returns a status of type Std_ReturnType: E_OK signals that the request was accepted, whereas E_NOT_OK indicates that the request could not be accepted [SWS_EthIf_91018]. Interpretation: The function presumably forwards the call synchronously to the Ethernet transceiver driver responsible for TrcvIdx. Question Q-c4736bbfd250cca0 (open)

Error handling

Specific error codes such as DET messages or DEM events are not defined in the specification excerpt. If acceptance of the request fails, this is communicated directly to the caller via the return value E_NOT_OK [SWS_EthIf_91018]. Callers must check this return value before proceeding with subsequent test or diagnostic sequences.

Concurrency and Limitations

The function is reentrant for different transceiver indices (TrcvIdx), but explicitly non-reentrant for the same transceiver index [SWS_EthIf_91018]. Callers must therefore ensure that simultaneous calls for the same transceiver instance are avoided or protected by suitable synchronization mechanisms [SWS_EthIf_91018].

This text was created by an AI and is based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I1)

function EthIf_SetPhyTxMode [SWS_EthIf_91005] 📄 PDF

Std_ReturnType EthIf_SetPhyTxMode (uint8 TrcvIdx, EthTrcv_PhyTxModeType Mode);

Activates a given transmission mode. Tags: atp.Status=draft

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 938ed4c4359d Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous interface function EthIf_SetPhyTxMode is used to activate a specified transmission mode for an Ethernet transceiver [SWS_EthIf_91005]. The function is declared in header file EthIf.h under Service ID 0x13 [SWS_EthIf_91005].

The function expects two input parameters for the call [SWS_EthIf_91005]:

  • TrcvIdx: Numerical index of the respective transceiver in the context of the Ethernet interface.
  • Mode: The concrete transmission mode of type EthTrcv_PhyTxModeType to be activated.

Execution is synchronous. As return value, the function provides a status of type Std_ReturnType [SWS_EthIf_91005]. The value E_OK confirms the successful acceptance of the request, whereas E_NOT_OK signals that the request could not be accepted [SWS_EthIf_91005]. Specific error codes or notifications to Development Error Tracer (DET) or Diagnostic Event Manager (DEM) are not specified in the specification data.

Regarding concurrency behavior, EthIf_SetPhyTxMode is reentrant for different transceiver indices (TrcvIdx) [SWS_EthIf_91005]. However, if calls are issued for the same transceiver index, the function is defined as non-reentrant and requires a synchronized or sequential invocation [SWS_EthIf_91005].

As a formal constraint, it must be noted that this interface element is marked with the status draft in the AUTOSAR CP R20-11 specification [SWS_EthIf_91005].

This usage note was generated by an AI based on the AUTOSAR CP R20-11 specification.

Implementer's Guide to follow (complexity I1)

function EthIf_GetCableDiagnosticsResult [SWS_EthIf_91014] 📄 PDF

Std_ReturnType EthIf_GetCableDiagnosticsResult (uint8 TrcvIdx, EthTrcv_CableDiagResultType* ResultPtr);

Retrieves the cable diagnostics result of a given transceiver.

function EthIf_GetBufWRxParams [SWS_EthIf_91002] 📄 PDF

Std_ReturnType EthIf_GetBufWRxParams (uint8 CtrlIdx, const WEth_BufWRxParamIdType* RxParamIds, uint32* ParamValues, uint8 NumParams);

Read out values related to the receive direction of the transceiver for a received packet. For example, this could be RSSI or Channel belonging to one single packet.

function EthIf_GetBufWTxParams [SWS_EthIf_91054] 📄 PDF

Std_ReturnType EthIf_GetBufWTxParams (uint8 CtrlIdx, const WEth_BufWTxParamIdType* TxParamIds, uint32* ParamValues, uint8 NumParams);

Read out values related to the transmit direction of the transceiver for a transmitted packet. For example, this could be transaction ID belonging to one single packet.

function EthIf_SetBufWTxParams [SWS_EthIf_91017] 📄 PDF

Std_ReturnType EthIf_SetBufWTxParams (uint8 CtrlIdx, Eth_BufIdxType BufIdx, const WEth_BufWTxParamIdType* TxParamIds, const uint32* ParamValues, uint8 NumParams);

Set values related to the transmit direction of the transceiver for a specific buffer (packet to be sent). For example, this can be the desired transmit power or the channel belonging to one single packet.

function EthIf_SetRadioParams [SWS_EthIf_91026] 📄 PDF

Std_ReturnType EthIf_SetRadioParams (uint8 TrcvId, const WEthTrcv_SetRadioParamIdType* ParamIds, const uint32* ParamValue, uint8 NumParams);

Set values related to a transceiver's wireless radio. For example, this could be the selection of the radio settings (channel, ...).

function EthIf_SetChanRxParams [SWS_EthIf_91034] 📄 PDF

Std_ReturnType EthIf_SetChanRxParams (uint8 TrcvId, uint8 RadioId, const WEthTrcv_SetChanRxParamIdType* ParamIds, const uint32* ParamValues, uint8 NumParams);

Set values related to the receive direction of a transceiver's wireless channel. For example, this could be a channel parameter like the frequency.

function EthIf_SetChanTxParams [SWS_EthIf_91042] 📄 PDF

Std_ReturnType EthIf_SetChanTxParams (uint8 TrcvId, uint8 RadioId, const WEthTrcv_SetChanTxParamIdType* TxParamIds, const uint32* ParamValues, uint8 NumParams);

Set values related to the transmit direction of a transceiver's wireless channel. For example, this could be the bitrate of a channel.

function EthIf_GetChanRxParams [SWS_EthIf_91050] 📄 PDF

Std_ReturnType EthIf_GetChanRxParams (uint8 TrcvId, uint8 RadioId, const WEthTrcv_GetChanRxParamIdType* ParamIds, thernetInterface uint32* ParamValues, uint8 NumParams); ⚠️

Read values related to the receive direction of the transceiver. For example, this could be a Channel Busy Ratio (CBR) or the average Channel Idle Time (CIT).

function EthIf_ProvideTxBuffer [SWS_EthIf_00067] 📄 PDF

BufReq_ReturnType EthIf_ProvideTxBuffer (uint8 CtrlIdx, Eth_FrameType FrameType, uint8 Priority, Eth_BufIdxType* BufIdxPtr, uint8* * BufPtr, uint16* LenBytePtr);

Provides access to a transmit buffer of the specified Ethernet controller.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 3376c496dada Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous and reentrant function EthIf_ProvideTxBuffer (service ID 0x09) grants access to a transmit buffer of the Ethernet controller specified via CtrlIdx and is available via the header EthIf.h [SWS_EthIf_00067].

To request a buffer, the caller passes the controller index (CtrlIdx), the Ethernet frame type (FrameType), and the priority (Priority) for the 3-bit PCP field of the VLAN tag [SWS_EthIf_00067]. Via the input and output parameter LenBytePtr, the caller specifies the desired buffer size in bytes and receives back the actually provided length [SWS_EthIf_00067]. Upon successful allocation, the function provides a pointer to the buffer via BufPtr and the index of the buffer resource for subsequent requests via BufIdxPtr [SWS_EthIf_00067].

The result of the buffer request is reported via the return type BufReq_ReturnType [SWS_EthIf_00067]:

This usage note was generated by an AI based on the specification AUTOSAR CP R20-11.

function EthIf_Transmit [SWS_EthIf_00075] 📄 PDF

Std_ReturnType EthIf_Transmit (uint8 CtrlIdx, Eth_BufIdxType BufIdx, Eth_FrameType FrameType, boolean TxConfirmation, uint16 LenByte, const uint8* PhysAddrPtr);

Triggers transmission of a previously filled transmit buffer

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c6420d48f21a Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_Transmit triggers the transmission of a previously provided and filled transmit buffer via the Ethernet interface [SWS_EthIf_00075].

Usage and Parameters

The call is made via the interface declared in EthIf.h with the following parameters [SWS_EthIf_00075]:

  • CtrlIdx: Index of the Ethernet controller in the context of the module EthIf.
  • BufIdx: Index of the buffer resource to be transmitted.
  • FrameType: Ethernet frame type.
  • TxConfirmation: Controls the activation of the transmit confirmation.
  • LenByte: Data length in bytes.
  • PhysAddrPtr: Physical destination address (MAC address) in network byte order.

Return Values and Concurrency

As return value, the function returns E_OK upon successful triggering of the transmission, or E_NOT_OK if the transmission failed [SWS_EthIf_00075]. The function is reentrant for calls with different buffer and controller indices (BufIdx and CtrlIdx) [SWS_EthIf_00075].

This usage note was generated automatically based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchPortGetLinkState [SWS_EthIf_91109] 📄 PDF

Std_ReturnType EthIf_SwitchPortGetLinkState (uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_LinkStateType* LinkStatePtr);

Obtains the link state of the indexed switch port

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 195c682ee5fe Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

According to [SWS_EthIf_91109], function EthIf_SwitchPortGetLinkState serves to query the current link state of a specific switch port. The switch index SwitchIdx within the context of the Ethernet switch driver and the port index SwitchPortIdx at the addressed switch are passed. The query result is provided via pointer LinkStatePtr, which takes either ETHTRCV_LINK_STATE_DOWN (port disconnected) or ETHTRCV_LINK_STATE_ACTIVE (port connected). The specification designates the execution behavior as synchronous or asynchronous; this presumably depends on the underlying switch driver or the hardware interface. Question Q-dde6f9e8f1b8ba52 (open)

As return value, the function provides Std_ReturnType ([SWS_EthIf_91109]). Upon a successful query, E_OK is returned. If determining the link state fails or if the function is called while the switch is in state ETHSWT_STATE_UNINIT or ETHSWT_STATE_INIT, E_NOT_OK is returned.

With regard to concurrency, the function is specified as non-reentrant (Non Reentrant) ([SWS_EthIf_91109]), which is why simultaneous calls in the same context must be ruled out. The declaration is available via header EthIf.h with service ID 0x4b.

This text was created by an AI; authoritative is the referenced AUTOSAR specification.

Implementer's Guide to follow (complexity I1)

function EthIf_TransceiverGetLinkState [SWS_EthIf_91110] 📄 PDF

Std_ReturnType EthIf_TransceiverGetLinkState (uint8 TrcvIdx, EthTrcv_LinkStateType* LinkStatePtr);

Obta ins the link state of the indexed transceiver

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 9458911dc392 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The synchronous function EthIf_TransceiverGetLinkState serves to query the current link state of an Ethernet transceiver addressed via TrcvIdx according to [SWS_EthIf_91110]. The declaration of the interface is made available via header EthIf.h [SWS_EthIf_91110].

Upon invocation, the following parameters are passed [SWS_EthIf_91110]:

  • TrcvIdx (Input): Index of the transceiver in the context of the Ethernet Transceiver Driver.
  • LinkStatePtr (Output): Pointer to the storage location for the determined state of type EthTrcv_LinkStateType. Possible result values are ETHTRCV_LINK_STATE_ACTIVE for a connected transceiver and ETHTRCV_LINK_STATE_DOWN for a disconnected transceiver.

As return value, the function returns the status code of type Std_ReturnType: E_OK signals successful execution, whereas E_NOT_OK indicates that the transceiver could not be initialized [SWS_EthIf_91110].

Error Handling and Boundary Conditions

If the query fails, the service with service ID 0x4c returns the return value E_NOT_OK [SWS_EthIf_91110]. Specific DET or DEM error messages are not listed in the functional specification.

Concurrency

The function is specified as non-reentrant (Non Reentrant) [SWS_EthIf_91110]. Interpretation: Due to the lack of reentrancy, a simultaneous call from multiple threads or task contexts is likely inadmissible and requires caller-side synchronization if necessary. Question Q-0459aa9b4c187439 (open)

This usage note was generated automatically based on specification SWS_EthIf_91110.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchPortGetBaudRate [SWS_EthIf_91111] 📄 PDF

Std_ReturnType EthIf_SwitchPortGetBaudRate (thernetInterface uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_BaudRateType* BaudRatePtr); ⚠️

Obtains the baud rate of the indexed switch port

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 420db0a0bb52 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_SwitchPortGetBaudRate serves to query the current transmission speed of a specific Ethernet switch port according to [SWS_EthIf_91111]. Upon invocation, the index of the switch (SwitchIdx) and the index of the port at the addressed switch (SwitchPortIdx) are passed. The query result is provided via pointer BaudRatePtr of type EthTrcv_BaudRateType*, which can represent speeds such as ETHTRCV_BAUD_RATE_10MBIT, ETHTRCV_BAUD_RATE_100MBIT, ETHTRCV_BAUD_RATE_1000MBIT, or ETHTRCV_BAUD_RATE_2500MBIT [SWS_EthIf_91111].

Regarding error behavior, the function returns E_OK upon successful determination of the baud rate. A return value of E_NOT_OK signals that the baud rate could not be read out for the specified switch port or that the switch driver is in state ETHSWT_STATE_UNINIT or ETHSWT_STATE_INIT [SWS_EthIf_91111].

The specification designates the function as non-reentrant (Non Reentrant) and as synchronous/asynchronous [SWS_EthIf_91111]. Presumably, the synchronous or asynchronous behavior depends on the connection and implementation of the underlying Ethernet switch driver. Question Q-1f4d760ff944df9d (open) Due to the lack of reentrancy, callers must ensure that parallel calls to the interface are avoided.

This usage note was generated automatically and is based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_TransceiverGetBaudRate [SWS_EthIf_91112] 📄 PDF

Std_ReturnType EthIf_TransceiverGetBaudRate (uint8 TrcvIdx, EthTrcv_BaudRateType* BaudRatePtr);

Obtains the baud rate of the indexed transceiver

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 792ee7d557d1 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_TransceiverGetBaudRate with service ID 0x4e serves to read out the current transmission rate of an indexed Ethernet transceiver [SWS_EthIf_91112]. It is part of module EthIf and is provided via header file EthIf.h [SWS_EthIf_91112].

The input parameter TrcvIdx of type uint8 identifies the transceiver within the context of the Ethernet transceiver driver [SWS_EthIf_91112]. Inout parameters do not exist [SWS_EthIf_91112]. The result of the query is returned via output parameter BaudRatePtr [SWS_EthIf_91112]. Valid values of type Eth_Trcv_BaudRateType are ETHTRCV_BAUD_RATE_10MBIT (10 Mbit/s), ETHTRCV_BAUD_RATE_100MBIT (100 Mbit/s), ETHTRCV_BAUD_RATE_1000MBIT (1000 Mbit/s), and ETHTRCV_BAUD_RATE_2500MBIT (2500 Mbit/s) [SWS_EthIf_91112].

The function returns a status of type Std_ReturnType: Upon successful invocation, E_OK is returned [SWS_EthIf_91112]. If the transceiver could not be initialized, the service fails and reports E_NOT_OK [SWS_EthIf_91112].

With regard to call context and concurrency, EthIf_TransceiverGetBaudRate is defined as a synchronous and non-reentrant (Non Reentrant) interface [SWS_EthIf_91112]. Calling layers must ensure that concurrent calls for this service are avoided or serialized at caller level [SWS_EthIf_91112].

This text was generated by an AI based on the specification AUTOSAR CP R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchPortGetDuplexMode [SWS_EthIf_91113] 📄 PDF

Std_ReturnType EthIf_SwitchPortGetDuplexMode (uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_DuplexModeType* DuplexModePtr);

Obtains the duplex mode of the indexed switch port

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f64160e278b6 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_SwitchPortGetDuplexMode serves to query the current duplex mode of an indexed port on an Ethernet switch [SWS_EthIf_91113]. It forwards the call to function EthSwt_GetDuplexMode of the Ethernet switch driver assigned via SwitchIdx [SWS_EthIf_00428].

Parameters and Interface

  • SwitchIdx: Index of the Ethernet switch in the context of the driver [SWS_EthIf_91113].
  • SwitchPortIdx: Index of the relevant port on the addressed switch [SWS_EthIf_91113].
  • DuplexModePtr: Output pointer of type EthTrcv_DuplexModeType* for the determined mode, either ETHTRCV_DUPLEX_MODE_HALF (half-duplex) or ETHTRCV_DUPLEXMODE_FULL (full-duplex) [SWS_EthIf_91113].

Execution and error handling

The return value E_OK signals a successful query [SWS_EthIf_91113]. If the duplex mode of the port cannot be determined or if the driver is in states ETHSWT_STATE_UNINIT or ETHSWT_STATE_INIT, the function returns E_NOT_OK [SWS_EthIf_91113].

The interface is non-reentrant (Non Reentrant) and declared in the specification as synchronous/asynchronous [SWS_EthIf_91113]. Interpretation: The actual synchronous or asynchronous operation is likely to depend on the characteristics of the connected switch driver. Question Q-339413722431978f (open)

This usage note was generated automatically based on the specification.

Implementer's Guide to follow (complexity I1)

function EthIf_TransceiverGetDuplexMode [SWS_EthIf_91114] 📄 PDF

Std_ReturnType EthIf_TransceiverGetDuplexMode (uint8 TrcvIdx, EthTrcv_DuplexModeType* DuplexModePtr);

Obtains the duplex mode of the indexed tra nsceiver

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 003ecb88f2c1 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_TransceiverGetDuplexMode determines the current duplex mode of an indexed Ethernet transceiver according to [SWS_EthIf_91114].

Usage and Parameters

The call is synchronous and specified as non-reentrant (Non Reentrant) [SWS_EthIf_91114]:

  • TrcvIdx: Passes as input parameter the index of the transceiver within the context of the Ethernet transceiver driver [SWS_EthIf_91114].
  • DuplexModePtr: Serves as output pointer to type EthTrcv_DuplexModeType for receiving the result. Possible values are ETHTRCV_DUPLEX_MODE_HALF (half-duplex) or ETHTRCV_DUPLEX_MODE_FULL (full-duplex) [SWS_EthIf_91114].

Return Values and Error Handling

As return value, the function provides a Std_ReturnType [SWS_EthIf_91114]:

  • E_OK: The duplex mode was successfully queried and provided via DuplexModePtr [SWS_EthIf_91114].
  • E_NOT_OK: The determination failed, according to the specification for example if the transceiver could not be initialized [SWS_EthIf_91114].

Restrictions and Concurrency

Because the interface is non-reentrant, parallel calls for the same or different transceiver instances must not occur without external synchronization. The declaration is available via header EthIf.h [SWS_EthIf_91114].

This usage note was generated automatically based on AUTOSAR R20-11 specification data.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchPortGetCounterValues [SWS_EthIf_91115] 📄 PDF

Std_ReturnType EthIf_SwitchPortGetCounterValues (uint8 SwitchIdx, thernetInterface uint8 SwitchPortIdx, Eth_CounterType* CounterPtr); ⚠️

Reads a list with drop counter values of the corresponding port of the switch. The meaning of these values is described at Eth_ Counter Type.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 7e473c4bc2cc Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_SwitchPortGetCounterValues serves to read drop counter values of a specific Ethernet switch port according to [SWS_EthIf_91115]. Provided via header EthIf.h, the function accepts the switch index SwitchIdx as well as the port index SwitchPortIdx and writes the counter values back via pointer CounterPtr ([SWS_EthIf_91115]).

Functionality and Forwarding

According to [SWS_EthIf_00432], EthIf_SwitchPortGetCounterValues forwards the request directly to function EthSwt_GetCounterValues of the respective Ethernet switch driver. The returned counter values are based on the standards IETF RFC 1757, RFC 1643, and RFC 2233, with the exact semantic meaning assigned to structure Eth_CounterType ([SWS_EthIf_91115]).

Return Values and Error Handling

As a return value, the function provides Std_ReturnType ([SWS_EthIf_91115]):

Concurrency and Limitations

The function is specified as non-reentrant (Non Reentrant) ([SWS_EthIf_91115]). Concurrent calls must therefore be synchronized at the caller level. Interpretation: The caller is also likely responsible for providing a valid and sufficiently sized memory area for CounterPtr, since the specification does not mention any internal buffer allocation. Question Q-140661eaa9693cce (open)

This usage note was generated automatically based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchPortGetRxStats [SWS_EthIf_91116] 📄 PDF

Std_ReturnType EthIf_SwitchPortGetRxStats (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_RxStatsType* RxStatsPtr);

Returns a list of statistic counters defined with E th_ Rx Tats Type. The majority of these Counters are derived from the IETF RFC2819.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f181e127df41 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The function EthIf_SwitchPortGetRxStats ([SWS_EthIf_91116]) serves to query reception statistics counters for a port of an Ethernet switch. It is available via header EthIf.h and is listed under service ID 0x52 ([SWS_EthIf_91116]).

The call requires the following parameters ([SWS_EthIf_91116]):

  • SwitchIdx: Index of the Ethernet switch in the context of the Ethernet switch driver.
  • SwitchPortIdx: Index of the port on the addressed switch.
  • RxStatsPtr: Pointer to a structure of type Eth_RxStatsType into which the counter values are written. Most of these values are derived from IETF RFC 2819 (Remote Network Monitoring Management Information Base).

Return Values and Error Handling

The function returns a Std_ReturnType as a result ([SWS_EthIf_91116]):

  • E_OK: The statistics data was read out successfully.
  • E_NOT_OK: The counter values could not be determined ([SWS_EthIf_91116]). Specific DET or DEM error messages are not specified for this call.

Concurrency and Limitations

The function is classified as non-reentrant (Non Reentrant) ([SWS_EthIf_91116]). Since synchronicity is specified as "Synchronous /Asynchronous", the actual blocking behavior is likely to depend on the implementation of the underlying Ethernet switch driver ([SWS_EthIf_91116]). Question Q-d1e839075bf42e7f (open) Callers must avoid parallel accesses to the same interface.

This text was generated by an AI based on AUTOSAR R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchPortGetTxStats [SWS_EthIf_91117] 📄 PDF

Std_ReturnType EthIf_SwitchPortGetTxStats (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_TxStatsType* TxStatsPtr);

Returns the list of Transmission Statistics out of IETF RFC1213 defined with Eth_ Tx Stats Type, where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 55ba1781a74a Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_SwitchPortGetTxStats serves to read out transmission statistics according to IETF RFC1213 for a specific port of an Ethernet switch [SWS_EthIf_91117]. It is available via header file EthIf.h with service ID 0x53 [SWS_EthIf_91117].

Usage and Parameters

Upon invocation, the switch index (SwitchIdx) and the port index at the addressed switch (SwitchPortIdx) are passed as input parameters [SWS_EthIf_91117]. The determined counter values are provided via pointer TxStatsPtr of type Eth_TxStatsType* [SWS_EthIf_91117]. If a counter is not available or not supported, the maximum possible value of the counter signals an invalid value [SWS_EthIf_91117].

Return Values and Error Handling

The function returns a status of type Std_ReturnType [SWS_EthIf_91117]:

Specific error codes or messages to DET or DEM are not stated in the sources, so error cases must be caught primarily via the return value E_NOT_OK [SWS_EthIf_91117].

Concurrency and Limitations

According to the specification, EthIf_SwitchPortGetTxStats is defined as asynchronous (Asynchronous) and non-reentrant (Non Reentrant) [SWS_EthIf_91117]. Due to the lack of reentrancy, simultaneous calls must not occur without higher-level synchronization [SWS_EthIf_91117]. Since the service is declared as asynchronous, the passed buffer TxStatsPtr will presumably have to be kept valid until the complete completion of the operation (interpretation: buffer stability during asynchronous query) [SWS_EthIf_91117]. Question Q-8a14618d6990206b (open)

This usage note was generated automatically based on specification SWS_EthIf_91117.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchPortGetTxErrorCounterValues [SWS_EthIf_91118] 📄 PDF

Std_ReturnType EthIf_SwitchPortGetTxErrorCounterValues (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_TxErrorCounterValuesType* TxStatsPtr);

Returns the list of Transmission Error Counters out of IETF RFC1213 and RFC16 defined with Eth_ Tx Error Counter Values Type, where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6f5b693504bb Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_SwitchPortGetTxErrorCounterValues (Service ID 0x54) provided via EthIf.h reads a list of transmission error counters for a port of an Ethernet switch [SWS_EthIf_91118]. The counters conform to the definitions in IETF RFC1213 and RFC1643 and are provided via type Eth_TxErrorCounterValuesType in output parameter TxStatsPtr [SWS_EthIf_91118].

Upon invocation, SwitchIdx addresses the switch in the context of the driver and SwitchPortIdx addresses the concrete port on the switch [SWS_EthIf_91118]. The function returns E_OK upon successful retrieval of the values and E_NOTOK if the transmission statistics could not be obtained [SWS_EthIf_91118]. A counter value that assumes the maximum possible value explicitly designates an invalid or unavailable counter [SWS_EthIf_91118].

As an execution constraint, it is defined that the function is non-reentrant (Non Reentrant) [SWS_EthIf_91118]. In the architectural system, EthIf_SwitchPortGetTxErrorCounterValues forwards the call directly to function EthSwt_GetTxErrorCounterValues of the corresponding Ethernet switch driver [SWS_EthIf_00438].

This text was generated by an AI based on the specification requirements.

function EthIf_SwitchPortGetMacLearningMode [SWS_EthIf_91119] 📄 PDF

Std_ReturnType EthIf_SwitchPortGetMacLearningMode (thernetInterface uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType* MacLearningModePtr); ⚠️

Returns the MAC learning mode, i.e. 1.) HW learning enabled, 2.) Hardware l earning disabled, 3.) Software learning enabled. Note: This feature is hardware dependent, i.e. the switch hardware needs to support the different learning modes

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6e598d708685 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_SwitchPortGetMacLearningMode queries the current MAC learning mode for a specific switch port ([SWS_EthIf_91119]). The determinable modes include hardware learning enabled, hardware learning disabled, and software learning enabled ([SWS_EthIf_91119]). The availability of this function is hardware-dependent, as the respective switch hardware must support the different learning modes ([SWS_EthIf_91119]).

Call Context and Parameters

The interface is provided via the header EthIf.h and has the service ID 0x55 ([SWS_EthIf_91119]). The following parameters must be passed during the call:

  • SwitchIdx (in): Index of the switch within the context of the Ethernet switch driver ([SWS_EthIf_91119]).
  • SwitchPortIdx (in): Index of the port on the addressed switch ([SWS_EthIf_91119]).
  • MacLearningModePtr (out): Pointer to the storage location of type EthSwt_MacLearningType where the determined mode is stored ([SWS_EthIf_91119]).

Synchronization, Concurrency, and Return Values

Execution is specified as synchronous/asynchronous and is non-reentrant (Non Reentrant) ([SWS_EthIf_91119]). The return value is Std_ReturnType with the following statuses:

  • E_OK: Query executed successfully ([SWS_EthIf_91119]).
  • E_NOT_OK: Error during execution ([SWS_EthIf_91119]). Although the specification description for E_NOT_OK literally states “configuration could be persistently reset”, interpretation: this is likely an editorial copy-paste error in the specification and, in regular context, simply signals that the query failed. Question Q-7565d2fbd70e355d (open)

This text was generated by an AI based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_GetSwitchIdentifier [SWS_EthIf_91121] 📄 PDF

Std_ReturnType EthIf_GetSwitchIdentifier (uint8 SwitchIdx, uint32* OrgUniqueIdPtr);

Obtain the Organizationally Unique Identifier that is given by the IEEE of the indexed Ethernet switch. This function shall provide the OUI of Ethernet switch. The OUI has a size of 24 bit. If a ethernet switch can provide the OUI the 8 most significant bits of the OUI shall be set to 0x00xxxxxx. If a Ethernet switch can not provide the OUI the 8 most significant bits of the OUI shall be set to 0x FFxxxxxx. Availa ble via Eth If.h

function EthIf_WritePortMirrorConfiguration [SWS_EthIf_91122] 📄 PDF

Std_ReturnType EthIf_WritePortMirrorConfiguration (uint8 MirroredSwitchIdx, const EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);

Service EthIf_WritePortMirrorConfiguration.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: b40bb6db2341 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous interface EthIf_WritePortMirrorConfiguration serves to store a port mirroring configuration in a shadow buffer within the Ethernet switch driver [SWS_EthIf_91122].

The following input parameters are passed during the call [SWS_EthIf_91122]:

  • MirroredSwitchIdx: Index of the relevant switch within the context of the Ethernet switch driver on which the switch port to be mirrored is located [SWS_EthIf_91122].
  • PortMirrorConfigurationPtr: Pointer to the configuration data of structure EthSwt_PortMirrorCfgType [SWS_EthIf_91122].

The return value of type Std_ReturnType signals the execution status [SWS_EthIf_91122]:

  • E_OK: The port mirroring configuration was successfully written for the indexed port [SWS_EthIf_91122].
  • E_NOT_OK: The configuration could not be written, for example because the indexed switch is not available [SWS_EthIf_91122].
  • ETHSWT_PORT_MIRRORING_CONFIGURATION_NOT_SUPPORTED: Port mirroring is not supported by the switch hardware or the Ethernet switch driver [SWS_EthIf_91122].

The function is specified as non-reentrant (Non Reentrant) and is available via the header EthIf.h [SWS_EthIf_91122]. Interpretation: Callers likely need to coordinate concurrent accesses via higher-level mechanisms, as no internal synchronization protection is specified. Question Q-c731aedd871251a4 (open)

This text was generated by an AI and is based exclusively on the specification requirements for SWS_EthIf_91122.

Implementer's Guide to follow (complexity I1)

function EthIf_ReadPortMirrorConfiguration [SWS_EthIf_91123] 📄 PDF

Std_ReturnType EthIf_ReadPortMirrorConfiguration (uint8 MirroredSwitchIdx, EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);

Obtain the port mirror configuration of the given Ethernet switch.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ccaf63f78cda Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The function EthIf_ReadPortMirrorConfiguration serves to query the port mirroring configuration of a specific Ethernet switch [SWS_EthIf_91123]. It is declared in the header file EthIf.h and has the service ID 0x59. The execution behavior is specified as asynchronous (Asynchronous), with the immediate call returning a status value of type Std_ReturnType [SWS_EthIf_91123].

Parameters and Return Values

  • MirroredSwitchIdx (in): Index of the Ethernet switch within the context of the Ethernet switch driver on which the switch ports to be mirrored are located [SWS_EthIf_91123].
  • PortMirrorConfigurationPtr (out): Pointer to the memory area where the read-out configuration is to be stored [SWS_EthIf_91123].
  • Return value: E_OK signals that the configuration was read out successfully. In the event of an error, E_NOT_OK is returned, for example if the indexed Ethernet switch is not available [SWS_EthIf_91123].

Interaction and Concurrency

For execution, EthIf_ReadPortMirrorConfiguration directly forwards the call to the function EthSwt_ReadPortMirrorConfiguration of the corresponding Ethernet switch driver [SWS_EthIf_00448]. The function is defined as non-reentrant (Non Reentrant) [SWS_EthIf_91123]; parallel calls for the same interface must therefore be avoided by the caller.

This usage note is based on the specifications of the AUTOSAR Classic Platform R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_DeletePortMirrorConfiguration [SWS_EthIf_91124] 📄 PDF

Std_ReturnType EthIf_DeletePortMirrorConfiguration (uint8 MirroredSwitchIdx);

Delete the stored port mirror configuration of the given Mirrored Switch Idx. If no port mirror configuration was found for the given Mirrored Switch Idx, the return value shall be E_ OK.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 61d650b885a8 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_DeletePortMirrorConfiguration serves to clear a stored port mirror configuration for a specific switch ([SWS_EthIf_91124]). The caller passes the index of the switch within the context of the Ethernet Switch Driver via the parameter Mirrored Switch Idx ([SWS_EthIf_91124]). The interface has the service ID 0x5a and is provided via the header file EthIf.h ([SWS_EthIf_91124]).

The return value of type Std_ReturnType provides information about the result of the deletion ([SWS_EthIf_91124]):

  • E_OK: The port mirror configuration was successfully deleted ([SWS_EthIf_91124]). If no stored configuration was found for the specified switch index, the function by definition also returns E_OK ([SWS_EthIf_91124]).
  • E_NOT_OK: Deletion of the configuration failed ([SWS_EthIf_91124]). This is the case, for example, if port mirroring is still enabled at the time of the call ([SWS_EthIf_91124]).

Regarding concurrency, the function is reentrant for different switch indices (Mirrored Switch Idx), but non-reentrant for multiple calls for the same index ([SWS_EthIf_91124]). Because active mirroring is explicitly stated as the cause of error for E_NOT_OK, port mirroring likely needs to be disabled before clearing the configuration ([SWS_EthIf_91124]). Question Q-b9e5665de687dbba (open)

This usage note was generated automatically based on the specification of AUTOSAR R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_GetPortMirrorState [SWS_EthIf_91125] 📄 PDF

Std_ReturnType EthIf_GetPortMirrorState (uint8 SwitchIdx, uint8 PortIdx, EthSwt_PortMirrorStateType* PortMirrorStatePtr);

Obtain the current status of the port mirroring for the indexed Ethernet switch port

function EthIf_SetPortMirrorState [SWS_EthIf_91126] 📄 PDF

Std_ReturnType EthIf_SetPortMirrorState (uint8 MirroredSwitchIdx, uint8 PortIdx, EthSwt_PortMirrorStateType PortMirrorState);

Request to set the given port mirroring state of the port mirror configuration for the given Ethernet switch.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f443f14f320e Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_SetPortMirrorState serves to set the requested state of the port mirroring configuration for a specified Ethernet switch ([SWS_EthIf_91126]). It is available via the header file EthIf.h ([SWS_EthIf_91126]).

The function expects three parameters when called ([SWS_EthIf_91126]):

  • MirroredSwitchIdx: Index of the Ethernet switch in the context of the Ethernet Switch Driver on which the port mirroring configuration to be activated or deactivated is located.
  • PortIdx: Index of the port on the addressed Ethernet switch.
  • PortMirrorState: The state of port mirroring to be requested, either PORT_MIRRORING_ENABLED or PORT_MIRRORING_DISABLED.

The return value of type Std_ReturnType signals the result of the request ([SWS_EthIf_91126]):

  • E_OK: The requested state for the specified switch port was set successfully.
  • E_NOT_OK: Setting failed, for example if the addressed switch is not available or no port mirroring configuration is present.

Execution is synchronous and specified as non-reentrant (Non Reentrant) ([SWS_EthIf_91126]). Within the layer architecture, the Ethernet Interface handles forwarding: according to [SWS_EthIf_00454], EthIf_SetPortMirrorState directly forwards the call to the function EthSwt_SetPortMirrorState of the responsible Ethernet Switch Driver.

This text was generated by an AI based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_SetPortTestMode [SWS_EthIf_91127] 📄 PDF

Std_ReturnType EthIf_SetPortTestMode (uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTestModeType Mode);

Activates a given test mode of the indexed Ethernet switch port.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 3e1f0657b21d Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_SetPortTestMode serves to activate a predefined test mode on an indexed port of an Ethernet switch [SWS_EthIf_91127]. The synchronous service is available via the header EthIf.h with the service ID 0x5d [SWS_EthIf_91127].

Parameters and Return Values

To configure the test mode, the interface expects three input parameters, while no input/output or pure output parameters exist [SWS_EthIf_91127]:

  • SwitchIdx (uint8): Index of the switch within the context of the respective Ethernet switch driver [SWS_EthIf_91127].
  • PortIdx (uint8): Index of the port on the addressed Ethernet switch [SWS_EthIf_91127].
  • Mode (EthTrcv_PhyTestModeType): The test mode to be activated on the switch port [SWS_EthIf_91127].

The return value of type Std_ReturnType signals the success of the operation [SWS_EthIf_91127]:

  • E_OK: The port test mode for the indexed Ethernet switch port was successfully set [SWS_EthIf_91127].
  • E_NOT_OK: Setting the port test mode was not successful, for example if the addressed Ethernet switch port is not available [SWS_EthIf_91127].

Concurrency and Interaction

The function is specified as non-reentrant (Non Reentrant) and operates synchronously [SWS_EthIf_91127]. When called, EthIf_SetPortTestMode directly forwards the request to the underlying function EthSwt_SetPortTestMode of the corresponding Ethernet switch driver [SWS_EthIf_00456].

This usage note was generated automatically based on the specification of AUTOSAR R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_SetPortLoopbackMode [SWS_EthIf_91128] 📄 PDF

Std_ReturnType EthIf_SetPortLoopbackMode (uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyLoopbackModeType Mode);

Activates a given test loop - back mode of the indexed Ethernet switch port.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 618d1a1fe688 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The function EthIf_SetPortLoopbackMode serves to activate a predefined test loopback mode for an indexed port of an Ethernet switch [SWS_EthIf_91128]. The declaration is provided via the header file EthIf.h [SWS_EthIf_91128]. The following input parameters are passed during the call:

  • SwitchIdx: Index of the Ethernet switch within the context of the Ethernet switch driver [SWS_EthIf_91128].
  • PortIdx: Index of the affected port on the previously addressed switch [SWS_EthIf_91128].
  • Mode: Loopback mode of type EthTrcv_PhyLoopbackModeType to be activated [SWS_EthIf_91128].

Interaction and Forwarding

The function does not perform the configuration autonomously at the hardware level. Instead, EthIf_SetPortLoopbackMode directly forwards the call to the function EthSwt_SetPortLoopbackMode of the associated Ethernet switch driver [SWS_EthIf_00458].

Error Handling and Return Values

The return value is of type Std_ReturnType [SWS_EthIf_91128]:

  • E_OK: The loopback mode was successfully activated for the indexed port of the Ethernet switch [SWS_EthIf_91128].
  • E_NOT_OK: Activation failed, for example if the indexed Ethernet switch port is not available [SWS_EthIf_91128].

Specific error codes for DET or DEM are not listed in the specification for this service.

Concurrency and Limitations

Execution is fully synchronous, and the function is specified as non-reentrant (Non Reentrant) [SWS_EthIf_91128]. Parallel calls must be prevented by the caller. Interpretation: Since this involves switching test modes, the call would typically occur within initialization, test, or diagnostic sequences at task level. Question Q-cb4575c4a1d9c48b (open)

This text was generated by an AI based on the specification.

Implementer's Guide to follow (complexity I1)

function EthIf_SetPortTxMode [SWS_EthIf_91129] 📄 PDF

Std_ReturnType EthIf_SetPortTxMode (thernetInterface uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTxModeType Mode); ⚠️

Activates a given transmission mode of the indexed Ethernet switch port.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: b8b46f4cfbae Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function EthIf_SetPortTxMode activates a predefined transmission mode for an indexed Ethernet switch port [SWS_EthIf_91129]. It is available via the header file EthIf.h and has the service ID 0x5f [SWS_EthIf_91129].

use

The call addresses the target port via two indices and passes the desired mode [SWS_EthIf_91129]:

  • SwitchIdx: Index of the switch within the context of the Ethernet switch driver.
  • PortIdx: Index of the port on the addressed switch.
  • Mode: Transmission mode to be activated of type EthTrcv_PhyTxModeType.

As a return value, the function provides Std_ReturnType [SWS_EthIf_91129]:

  • E_OK: The transmission mode for the indexed switch port was successfully activated.
  • E_NOT_OK: Activation failed, for example if the indexed switch port is not available.

Concurrency and Limitations

The interface is specified as non-reentrant (Non Reentrant) [SWS_EthIf_91129]. Calling instances must therefore ensure that no concurrent calls occur. Specific DET or DEM error messages are not listed in the function definition; according to the specification, the error behavior is limited to returning E_NOT_OK [SWS_EthIf_91129].

This usage note was generated by an AI based on the specification of AUTOSAR Classic Release R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_GetPortCableDiagnosticsResult [SWS_EthIf_91130] 📄 PDF

Std_ReturnType EthIf_GetPortCableDiagnosticsResult (uint8 SwitchIdx, uint8 PortIdx, EthTrcv_CableDiagResultType* ResultPtr);

Retrieves the cable diagnostics result of the indexed Ethernet switch port respectively the referenced Ethernet Transceiver Driver.

function EthIf_RunPortCableDiagnostic [SWS_EthIf_91131] 📄 PDF

Std_ReturnType EthIf_RunPortCableDiagnostic (uint8 SwitchIdx, uint8 PortIdx);

Trigger the cable diagnostics of the given Ethernet Switch port (Port Idx) by calling Eth Trcv_ Run Cable Diagnostic of the referenced Ethernet transceiver.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 71c8b4be21c9 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The asynchronous interface EthIf_RunPortCableDiagnostic initiates a cable diagnostic for a selected port of an Ethernet switch [SWS_EthIf_91131]. The parameters SwitchIdx (index of the switch within the context of the Ethernet switch driver) and PortIdx (index of the addressed port on the switch) are passed during the call. The function returns E_OK as soon as the trigger for the cable diagnostic has been accepted; if the initiation is rejected, E_NOT_OK is returned [SWS_EthIf_91131].

Interaction and Preconditions

When executing EthIf_RunPortCableDiagnostic, EthIf is required to ensure that the corresponding EthIfController is in the operational state ETH_MODE_ACTIVE [SWS_EthIf_00464]. Under this condition, the Ethernet Interface forwards the call to the function EthSwt_RunPortCableDiagnostic of the assigned switch driver [SWS_EthIf_00464].

Concurrency and Limitations

The function is reentrant for differing values of SwitchIdx and PortIdx [SWS_EthIf_91131]. For identical pairs of switch and port index, however, the call is specified as non-reentrant, which is why parallel executions on the same port must be avoided.

This usage note was generated automatically based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_RunCableDiagnostic [SWS_EthIf_91132] 📄 PDF

Std_ReturnType EthIf_RunCableDiagnostic (uint8 TrcvIdx);

Trigger the cable diagnostics for the given Ethernet transceiver.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 30a5efdd1b22 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The function EthIf_RunCableDiagnostic initiates cable diagnostics for a specified Ethernet transceiver [SWS_EthIf_91132]. It is provided via the header EthIf.h and maintained under the service ID 0x62 [SWS_EthIf_91132]. The passed parameter is TrcvIdx, which represents the index of the target transceiver within the context of the Ethernet transceiver driver [SWS_EthIf_91132].

Execution is asynchronous [SWS_EthIf_91132]. The return value of type Std_ReturnType signals acceptance of the trigger:

Error handling

If the cable diagnostic is rejected, the function immediately returns E_NOT_OK [SWS_EthIf_91132]. Specific development or production errors (DET/DEM) are not defined for this function in the present specification.

Concurrency and Limitations

Regarding concurrency, EthIf_RunCableDiagnostic is reentrant for calls with different indices (TrcvIdx), but non-reentrant for the same transceiver index [SWS_EthIf_91132]. Simultaneous diagnostic requests on the same transceiver must be prevented by the caller. Interpretation: Since the function operates purely asynchronously and does not return any result data, the provision of the diagnostic result is presumably handled via a separate mechanism. Question Q-c65c009cd2e00dea (open)

This text was generated by an AI based on the specification SWS_EthIf_91132.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchGetCfgDataRaw [SWS_EthIf_91133] 📄 PDF

Std_ReturnType EthIf_SwitchGetCfgDataRaw (uint8 SwitchIdx, uint32 Offset, uint16 Length, uint8* BufferPtr);

Retrieves the data in memory of the indexed Ethernet switch in variable length

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: be1ed9572145 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The interface function EthIf_SwitchGetCfgDataRaw serves to read out configuration or memory data of variable length from an indexed Ethernet switch [SWS_EthIf_91133]. Within the layering model, the module does not process the call autonomously, but forwards it directly to the function EthSwt_GetCfgDataRaw of the responsible Ethernet switch driver [SWS_EthIf_00468]. The function is declared in the header EthIf.h and has the service ID 0x63 [SWS_EthIf_91133].

Call and Parameters

The call is asynchronous and only initiates the read operation [SWS_EthIf_91133]. In terms of parameters, the function expects:

  • SwitchIdx: Index of the Ethernet switch within the context of the Ethernet switch driver [SWS_EthIf_91133],
  • Offset: Start offset in the memory of the Ethernet switch from which the read operation begins [SWS_EthIf_91133],
  • Length: Number of data bytes to read and copy [SWS_EthIf_91133],
  • BufferPtr: Pointer to the destination storage location to which the data is to be copied [SWS_EthIf_91133].

As return value, the function returns E_OK if the read operation was initiated successfully [SWS_EthIf_91133]. If the operation cannot be initiated—for example if the addressed switch is not available—E_NOT_OK is reported [SWS_EthIf_91133].

Concurrency

The function is defined as non-reentrant (Non Reentrant) [SWS_EthIf_91133]. Callers must therefore ensure that calls occur sequentially. Interpretation: Due to the asynchronous nature, the buffer content is likely not yet finally populated upon return of E_OK, but rather provided with a time delay by the driver. Question Q-0abda93fb8830dd4 (open)

This usage note was generated automatically based on the specification AUTOSAR CP R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchGetCfgDataInfo [SWS_EthIf_91134] 📄 PDF

Std_ReturnType EthIf_SwitchGetCfgDataInfo (uint8 SwitchIdx, uint32* DataSizePtr, uint32* DataAdressPtr);

Retrieves the total size of data and the memory start address of the indexed Ethernet Switch.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: b29ad2e3bc3d Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_SwitchGetCfgDataInfo determines the total size of the configuration data and the start address of the configuration registers for an indexed Ethernet switch [SWS_EthIf_91134]. The interface is declared in the header EthIf.h and is maintained under the service ID 0x64 [SWS_EthIf_91134].

The function accepts the following parameters [SWS_EthIf_91134]:

  • SwitchIdx (in): Index of the Ethernet switch within the context of the Ethernet switch driver.
  • DataSizePtr (out): Pointer to the storage location to which the total size of the configuration data is to be copied.
  • DataAdressPtr (out): Pointer to the storage location to which the start address of the configuration registers is to be copied.

As return value, the function returns E_OK if the data was obtained successfully, or E_NOT_OK if the operation fails, for example because the indexed switch is not available [SWS_EthIf_91134]. Specific error codes for DET or DEM are not defined for this service within the scope of the present specification.

For the call context, the function is specified as reentrant as well as formally asynchronous [SWS_EthIf_91134]. Since no callback mechanisms are specified, the provision of the data is likely available immediately upon return of E_OK (interpretation: the asynchronous classification presumably points to internal driver accesses). Question Q-bf49882a16548ea4 (open)

This text was generated by an AI and is based on the requirements of the AUTOSAR standard.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchPortGetMaxFIFOBufferFillLevel [SWS_EthIf_91135] 📄 PDF

Std_ReturnType EthIf_SwitchPortGetMaxFIFOBufferFillLevel (uint8 SwitchPortIdx, uint8 PortIdx, uint8 SwitchPortEgressFifoIdx, uint32* SwitchPortEgressFifoBufferLevelPtr);

Service EthIf_SwitchPortGetMaxFIFOBufferFillLevel.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c2027ddc769c Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Invocation

The function EthIf_SwitchPortGetMaxFIFOBufferFillLevel determines the maximum allocated FIFO buffer memory (in bytes) since the last read access for a specific egress port of an Ethernet switch [SWS_EthIf_91135]. The call can be made, for example, by a Complex Device Driver (CDD) [SWS_EthIf_91135]. For addressing, the switch index (SwitchPortIdx), the port index (PortIdx), and the FIFO index (SwitchPortEgressFifoIdx) are passed. The determined fill level is written to the memory area to which SwitchPortEgressFifoBufferLevelPtr points [SWS_EthIf_91135].

Concurrency and Execution

The function has asynchronous execution semantics [SWS_EthIf_91135]. It is reentrant for different switch and port indices, but must not be called concurrently for the same combination of SwitchPortIdx and PortIdx [SWS_EthIf_91135]. Because of the asynchronous semantics with simultaneous pointer passing, the referenced memory area for the result likely needs to remain valid until the operation is completed. Question Q-c941ffec278a86cd (open)

Error Handling and Driver Interaction

Upon successful retrieval, the function returns E_OK, otherwise E_NOT_OK [SWS_EthIf_91135]. If the switch hardware does not support port-based determination of the maximum FIFO buffer fill level, the value at the target address SwitchPortEgressFifoBufferLevelPtr is set to 0xFFFFFFFF [SWS_EthIf_91135]. The module forwards the call for further execution to the driver function EthSwt_GetMaxFIFOBufferFillLevel of the assigned Ethernet switch driver [SWS_EthIf_00472].

This text was generated by an AI based on the specification.

function EthIf_TransceiverGetMacMethod [SWS_EthIf_91021] 📄 PDF

Std_ReturnType EthIf_TransceiverGetMacMethod (uint8* TrcvIdx, EthTrcv_MacMethodType* MacModePtr);

Obtains the media access mode of the transceiver. Tags: atp.Status=draft thernet Interface AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_EthernetInterface

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 4607d60f7e1b Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The function EthIf_TransceiverGetMacMethod (service ID 0x66) serves to synchronously query the configured media access method of an Ethernet transceiver [SWS_EthIf_91021]. It is available via header file EthIf.h and uses the following interface parameters:

  • TrcvIdx (in): Index of the transceiver within the context of the Ethernet transceiver driver [SWS_EthIf_91021].
  • MacModePtr (out): Pointer to the storage location for the determined access method of type EthTrcv_MacMethodType [SWS_EthIf_91021]. Valid result values are ETHTRCV_MAC_TYPE_CSMA_CD (Carrier-Sense Multiple Access with Collision Detection) and ETHTRCV_MAC_TYPE_PLCA (Physical Layer Collision Avoidance).

Return Values and Error Handling

As return value, the interface returns a status of type Std_ReturnType [SWS_EthIf_91021]:

  • E_OK: The media access method was successfully read out and provided via MacModePtr.
  • E_NOT_OK: The request to the transceiver was not accepted [SWS_EthIf_91021]. Specific DET or DEM error codes are not listed in the specification for this service.

Concurrency and Constraints

Execution is synchronous, but the function is specified as non-reentrant (Non Reentrant) [SWS_EthIf_91021]. Simultaneous or interrupting calls within the same driver context must therefore be excluded by the caller. Furthermore, it should be noted that the service is designated with the status atp.Status=draft in release R20-11 [SWS_EthIf_91021].

This usage note was generated automatically based on the AUTOSAR specification for EthIf_TransceiverGetMacMethod.

Implementer's Guide to follow (complexity I1)

function EthIf_RxIndication [SWS_EthIf_00085] 📄 PDF

void EthIf_RxIndication (uint8 CtrlIdx, Eth_FrameType FrameType, boolean IsBroadcast, const uint8* PhysAddrPtr, const Eth_DataType* DataPtr, uint16 LenByte);

Handles a received frame received by the indexed controller

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f4f8ac8a7932 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The synchronous function EthIf_RxIndication processes an Ethernet frame received via an indexed physical Ethernet controller [SWS_EthIf_00085]. The service has no return value and handles the forwarding of the received data within the Ethernet Interface [SWS_EthIf_00085]. Interpretation: The call is likely typically made by the underlying Ethernet driver (Eth) as soon as new receive data is completely available. Question Q-c3d25d0b89e6cd7f (open)

Parameters

For further processing, the function accepts the following parameters [SWS_EthIf_00085]:

  • CtrlIdx: Index of the physical Ethernet controller in the context of the Ethernet Interface [SWS_EthIf_00085].
  • FrameType: Frame type of the received Ethernet frame [SWS_EthIf_00085].
  • IsBroadcast: Flag indicating whether it is a broadcast frame [SWS_EthIf_00085].
  • PhysAddrPtr: Pointer to the physical source address (MAC address in network byte order) of the received frame [SWS_EthIf_00085].
  • DataPtr: Pointer to the payload of the received frame [SWS_EthIf_00085].
  • LenByte: Length of the payload in the received frame in bytes [SWS_EthIf_00085].

Concurrency and Limitations

The interface is declared as non-reentrant (Non Reentrant) and is available under the Service ID 0x10 via the header file EthIf.h [SWS_EthIf_00085]. Callers must ensure that no concurrent calls take place. Specific error codes, return values, or DET/DEM messages are not listed in the specification scope for this function.

This text was automatically generated. All information is based exclusively on the specification data from the current AUTOSAR release.

function EthIf_TxConfirmation [SWS_EthIf_00091] 📄 PDF

void EthIf_TxConfirmation (uint8 CtrlIdx, Eth_BufIdxType BufIdx, Std_ReturnType Result);

Confirms frame transmission by the indexed controller

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: da5fb02ebb8b Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Call Context

The synchronous function EthIf_TxConfirmation (Service ID 0x11) confirms the transmission of an Ethernet frame by the physical Ethernet controller referenced via CtrlIdx [SWS_EthIf_00091]. The function has no return value and is available via the header file EthIf.h [SWS_EthIf_00091].

The input parameters are defined as follows [SWS_EthIf_00091]:

  • CtrlIdx (uint8): Index of the physical Ethernet controller in the context of the Ethernet Interface.
  • BufIdx (Eth_BufIdxType): Index of the transmitted buffer.
  • Result (Std_ReturnType): Result of the transmission; E_OK indicates a successful transmission, E_NOT_OK a transmission error.

Interaction with Upper Layers

According to [SWS_EthIf_00255], EthIf_TxConfirmation forwards the received transmission result Result to the configured upper layer via its callback <UL>_TxConfirmation.

Concurrency and Limitations

The function is specified as non-reentrant (Non Reentrant) [SWS_EthIf_00091]. Parallel calls must therefore be avoided. Specific DET or DEM error messages are not provided in the specification excerpt; errors are transmitted exclusively via the parameter Result with the value E_NOT_OK [SWS_EthIf_00091].

This text was automatically created by an AI.

Implementer's Guide to follow (complexity I1)

function EthIf_CtrlModeIndication [SWS_EthIf_00231] 📄 PDF

void EthIf_CtrlModeIndication (uint8 CtrlIdx, thernetInterface Eth_ModeType CtrlMode); ⚠️

Called asynchronously when mode has been read out. Triggered by previous Eth_ Set Controller Mode call. Can directly be called within the trigger functions.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 01a40e36c664 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The notification function EthIf_CtrlModeIndication is called according to [SWS_EthIf_00231] as soon as the operating mode of an Ethernet controller has been read out successfully. The triggering occurs asynchronously as a result of a preceding call of Eth_SetControllerMode, whereby the call can take place directly within the respective trigger functions. The function itself has a synchronous execution semantics and returns no return value ([SWS_EthIf_00231]).

The index of the physical Ethernet controller in the context of the Ethernet Interface (CtrlIdx) as well as the reported controller mode (CtrlMode) are passed via the parameters ([SWS_EthIf_00231]). Regarding concurrency, [SWS_EthIf_00231] specifies that the function is non-reentrant for the same controller index, but may be executed reentrantly for different indices.

Regarding the interaction with further modules, related requirements refer to downstream actions, which are, however, classified as obsolete in the present release:

  • According to [SWS_EthIf_00267] (OBSOLETE), it was intended in the context of this function to call EthSwt_SetSwitchPortMode for all ports of a switch port group, provided a corresponding control reference exists, and to resolve conflicts with active groups upon ETH_MODE_DOWN.
  • According to [SWS_EthIf_00413] (OBSOLETE), it was intended in the context of this function, if a transceiver reference exists, to call EthTrcv_TransceiverLinkStateRequest with ETHTRCV_LINK_STATE_ACTIVE or ETHTRCV_LINK_STATE_DOWN, depending on whether ETH_MODE_ACTIVE or ETH_MODE_DOWN had been requested previously.

This text was generated by an AI based on the specification AUTOSAR CP R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_TrcvModeIndication [SWS_EthIf_00232] 📄 PDF

void EthIf_TrcvModeIndication (uint8 TrcvIdx, Eth_ModeType TrcvMode);

Called asynchronously when a mode change has been read out. If the function is triggered by previous call of Eth Trcv_ Set Transceiver Mode it can directly be called within the trigger function. Ava ilable via Eth If.h

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 3c15a8bf107b Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The function EthIf_TrcvModeIndication serves as a notification interface of the Ethernet Interface that is called as soon as a mode change of the transceiver has been read [SWS_EthIf_00232]. It is available via the header file EthIf.h and has the service ID 0x0f [SWS_EthIf_00232].

The execution of the function itself is specified as synchronous, while the call takes place asynchronously when the mode change has been determined [SWS_EthIf_00232]. If the function is triggered by a preceding call to EthTrcv_SetTransceiverMode, it may be called immediately within this triggering function [SWS_EthIf_00232].

Parameters and Return Values

  • TrcvIdx: Index of the Ethernet transceiver in the context of the Ethernet Interface (input parameter) [SWS_EthIf_00232].
  • TrcvMode: Signaled operating mode of the Ethernet transceiver of type Eth_ModeType (input parameter) [SWS_EthIf_00232].
  • Return value: None (void) [SWS_EthIf_00232].

Concurrency and Reentrancy

The function is specified as non-reentrant for the same index, but reentrant for different indices [SWS_EthIf_00232]. The specification table mentions Ctrl Idx here, which in the context of this transceiver interface is presumably to be interpreted as referring to the transceiver or controller index [SWS_EthIf_00232]. Question Q-c0123f1ef0e4ec71 (open)

This usage note was generated automatically based on the specification AUTOSAR CP R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_SwitchPortModeIndication [SWS_EthIf_91055] 📄 PDF

void EthIf_SwitchPortModeIndication (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType PortMode);

The Eth If shall determine the expected notifications based on the Eth Swt Port configuration. In case the Eth Swt Port references an Eth Trcv the Eth If expects a notification from the Eth Trcv via API Eth If_ Trcv Mode Indication(). Otherwise the Eth If expects a notification from the Eth Swt via API Eth If_ Switch Port Mode Indication()

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 57f47c2f8434 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function EthIf_SwitchPortModeIndication serves the Ethernet Interface (EthIf) as an asynchronous notification interface for a mode change of an Ethernet switch port reported by the Ethernet Switch Driver [SWS_EthIf_91055].

Usage and Interaction

EthIf determines the expected notifications based on the configuration of the respective switch port: If the switch port references a transceiver (EthTrcv), EthIf expects a notification via EthIf_TrcvModeIndication() instead; otherwise, the notification from the Ethernet Switch Driver is expected via EthIf_SwitchPortModeIndication() [SWS_EthIf_91055].

  • SwitchIdx: Index of the Ethernet switch in the context of the Ethernet Switch Driver [SWS_EthIf_91055].
  • SwitchPortIdx: Index of the port on the addressed Ethernet switch [SWS_EthIf_91055].
  • PortMode: The newly reported mode of the switch port of type Eth_ModeType [SWS_EthIf_91055].

Execution characteristics and limitations

The function has no return value (void) and has service ID 0x46 [SWS_EthIf_91055]. It is specified as asynchronous (Asynchronous) and non-reentrant (Non Reentrant) [SWS_EthIf_91055]. Callers must therefore ensure that concurrent calls for this service are avoided. Specific DET or DEM error messages are not defined for this function in the payload.

This usage note was generated automatically based on the specification.

Implementer's Guide to follow (complexity I1)

function EthIf_SleepIndication [SWS_EthIf_91006] 📄 PDF

void EthIf_SleepIndication (uint8 TrcvIdx);

This API is called by the corresponding Eth Trcv, if a sleep indication was detected on the network. This could be used e.g. for Ethernet hardware which is compliant to the OA TC10. In this ca se the Ethernet hardware (PHY) detect an Sleep.Indication which was triggered by a Sleep.Request of the connected link partner. Tags: atp.Status=draft

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d3c958a96e74 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Call Context

The function EthIf_SleepIndication serves as a notification interface of the Ethernet Interface. It is called by the respective Ethernet transceiver driver (EthTrcv) as soon as it has registered a sleep indication on the network [SWS_EthIf_91006]. As the only input parameter, TrcvIdx is passed, which uniquely identifies the index of the signaling Ethernet transceiver in the context of module EthIf [SWS_EthIf_91006]. The function has neither input/output nor return values and executes the notification synchronously [SWS_EthIf_91006].

Hardware Interaction

A major use case is the application with Ethernet hardware designed conformantly to the OPEN Alliance TC10 specification [SWS_EthIf_91006]. In this scenario, the transceiver (PHY) detects a Sleep.Indication at hardware level, which was triggered by a sleep request (Sleep.Request) from the directly connected link partner [SWS_EthIf_91006].

Concurrency and Limitations

The interface is defined as synchronous as well as reentrant and is provided via header file EthIf.h (Service ID 0x68) [SWS_EthIf_91006]. During system integration, it must be considered that the element is marked as draft with tag atp.Status=draft [SWS_EthIf_91006]. Concrete error handling routines or DET error codes are not defined within the scope of the specification; formal error checking will presumably only take place in future specification revisions. Question Q-680af6c43439167f (open)

This usage note was generated automatically based on the specification AUTOSAR R20-11.

Implementer's Guide to follow (complexity I1)

function EthIf_MainFunctionRx [SWS_EthIf_00097] 📄 PDF

void EthIf_MainFunctionRx (void);

The function checks for new received frames and issues reception indications in polling mode.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 26bf586c58f7 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Call Context

In the Ethernet Interface (EthIf), the function EthIf_MainFunctionRx assumes the central task of checking for newly arrived data frames in polling mode and triggering corresponding reception indications to upper layers [SWS_EthIf_00097]. It is defined with the signature void EthIf_MainFunctionRx (void), accordingly accepts no call parameters, and returns no return value [SWS_EthIf_00097]. The hexadecimal value 0x20 is defined as the service ID [SWS_EthIf_00097].

The function is provided via the header file SchM_EthIf.h [SWS_EthIf_00097]. This suggests the interpretation that its call is performed periodically by the Schedule Manager (SchM) or the operating system within a cyclic task context of the basic software.

Concurrency and Error Handling

Since checking and forwarding received frames is specified in polling mode [SWS_EthIf_00097], smooth reception operation requires appropriate timing of the call. Delayed execution is likely to lead to delays in forwarding incoming messages to upper software layers. Question Q-554ef0cf302c3aa3 (open) Specific error codes, development errors (DET), or error messages to DEM are not listed for this function in the specification.

This usage note was generated by an AI and summarizes the requirements of the AUTOSAR CP R20-11 specification status.

Implementer's Guide to follow (complexity I1)

function EthIf_MainFunctionTx [SWS_EthIf_00113] 📄 PDF

void EthIf_MainFunctionTx (void);

The function issues transmission confirmations in polling mode. It checks also for transceiver state changes.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c427e9416514 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The main function EthIf_MainFunctionTx serves for the cyclic processing of transmission operations and status queries within the Ethernet Interface module [SWS_EthIf_00113]. It has the hexadecimal service ID 0x21 and is executed according to its signature void EthIf_MainFunctionTx (void) without transfer parameters and without a return value, so that all processing takes place state-based [SWS_EthIf_00113].

During operation, the service assumes two central tasks in Ethernet communication:

  • Transmission confirmations: In polling mode, the function issues confirmations for successfully completed transmissions (Transmission Confirmations) to upper layers [SWS_EthIf_00113].
  • Transceiver states: It monitors and checks the system for state changes that have occurred in the connected Ethernet transceivers [SWS_EthIf_00113].

Regarding system integration, the interface is available via the header file SchM_EthIf.h [SWS_EthIf_00113]. Interpretation: From the provision via SchM_EthIf.h, it is likely to follow that the call is performed periodically by the BSW scheduler (SchM) in the context of a cyclic task. Question Q-b9dde07f9cc74a95 (open) This ensures that pending transmission confirmations in polling mode and transceiver state changes are processed regularly and without interrupt dependency.

Specific error codes, separate error handling routines via DET or DEM, and requirements for reentrancy are not defined for this service in the present specification scope and are therefore not shown.

This usage note is based on the requirements of the AUTOSAR Classic Release R20-11 specification.

Implementer's Guide to follow (complexity I1)

function EthIf_MainFunctionState [SWS_EthIf_91104] 📄 PDF

void EthIf_MainFunctionState (void);

The function is polling different communication hardware (Ethernet transceiver, Ethernet switch ports) related information, e.g. link state, signal quality.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ad2bcae76976 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The function EthIf_MainFunctionState serves for the cyclic polling of state and diagnostic information of the connected Ethernet communication hardware, such as Ethernet transceivers and Ethernet switch ports [SWS_EthIf_91104]. This includes, for example, the link state as well as the signal quality [SWS_EthIf_91104]. The function has neither input nor output parameters and returns no value (void EthIf_MainFunctionState(void), Service ID 0x05) [SWS_EthIf_91104]. The execution behavior is specified as asynchronous [SWS_EthIf_91104].

Concurrency and call conditions

The function is defined as non-reentrant (Non Reentrant) [SWS_EthIf_91104]. It must therefore not be executed concurrently or interrupt itself at any time. Since the interface is provided via header file EthIf_SchM.h [SWS_EthIf_91104], the periodic call is likely to occur typically in the task context of the BSW scheduler (SchM). Question Q-10d02355b276be90 (open)

Interaction and Configuration

According to [SWS_EthIf_00407], EthIf_MainFunctionState must poll the hardware information strictly with the configured periodicity EthIfMainFunctionStatePeriod. This ensures regular updating of the physical interface parameters in the Ethernet Interface.

This note was generated by an AI based on the AUTOSAR specification and does not replace a formal integration verification.

Implementer's Guide to follow (complexity I1)

type EthIf_SwitchPortGroupIdxType [SWS_EthIf_91101] 📄 PDF

Data Type that represents the Ethernet interface switch port group index. The index is zero based and unique for every configured switch port group.

type EthIf_SignalQualityResultType [SWS_EthIf_91057] 📄 PDF

-

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c6d5744fb7a0 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The data structure EthIf_SignalQualityResultType ([SWS_EthIf_91057]) serves to acquire and diagnose the link quality at Ethernet level and is provided via the header file EthIf.h.

The structure bundles three measured variables of base type uint32:

  • ActualSignalQuality: represents the currently applied signal quality of the Ethernet link.
  • HighestSignalQuality: captures the highest measured signal quality of the link since the last reset.
  • LowestSignalQuality: documents the lowest measured signal quality of the link since the last reset.

In interaction with the module EthIf, the extreme values reflect the progression of the link stability. Resetting the internally stored history values is controlled via dedicated interfaces:

  • For a transceiver specified via TrcvIdx, the function EthIf_ClearTrcvSignalQuality resets the stored signal quality values ([SWS_EthIf_00400]).
  • For a switch port identified via SwitchIdx and SwitchPortIdx, EthIf_ClearSwitchPortSignalQuality clears the stored signal quality values ([SWS_EthIf_00404]).

Interpretation: Since the payload does not mention a specific read function, the structure is likely to serve as an output parameter of corresponding status queries for transceivers and switch ports in order to match the current signal quality with the extreme values. Question Q-8e5f2914bade574c (open)

This text was generated by an AI and is based exclusively on the specification requirements from R20-11.

Implementer's Guide to follow (complexity I1)

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_EthIf
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_EthIf@rel:R20-11#911ca5a4
Content hash
911ca5a4
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_EthernetInterface.pdf#nameddest=SWS_EthIf_00024

Topic map

Initialization and status

2

Detail view

Select an entry in the outline.

Initialization and status

Returns the version information of this module

void EthIf_GetVersionInfo (Std_VersionInfoType* VersionInfoPtr);
EthIf_Init function

Initializes the Ethernet Interface

void EthIf_Init (const EthIf_ConfigType* CfgPtr);

Services · Get…

Allows to read and reset detailed measurement data for diagnostic purposes. Get all Measurement Idx's at once is not supported. ETHIF_ MEAS_ ALL shall only be used to reset all Measurement Idx's at once. A NULL_ PTR shall be provided for Measurement Data Ptr in this case.

Std_ReturnType EthIf_GetAndResetMeasurementData (EthIf_MeasurementIdxType MeasurementIdx, boolean MeasurementResetNeeded, uint32* MeasurementDataPtr);

Obtains the address resolution ta ble of a switch and copies the list into a user provided buffer. The function will copy all or number Of

Std_ReturnType EthIf_GetArlTable (uint8 switchIdx, uint16* numberOfElements, Eth_MacVlanType* arlTableListPointer);

Read out values related to the receive direction of the transceiver for a received packet. For example, this could be RSSI or Channel belonging to one single packet.

Std_ReturnType EthIf_GetBufWRxParams (uint8 CtrlIdx, const WEth_BufWRxParamIdType* RxParamIds, uint32* ParamValues, uint8 NumParams);

Read out values related to the transmit direction of the transceiver for a transmitted packet. For example, this could be transaction ID belonging to one single packet.

Std_ReturnType EthIf_GetBufWTxParams (uint8 CtrlIdx, const WEth_BufWTxParamIdType* TxParamIds, uint32* ParamValues, uint8 NumParams);

Retrieves the cable diagnostics result of a given transceiver.

Std_ReturnType EthIf_GetCableDiagnosticsResult (uint8 TrcvIdx, EthTrcv_CableDiagResultType* ResultPtr);

Read values related to the receive direction of the transceiver. For example, this could be a Channel Busy Ratio (CBR) or the average Channel Idle Time (CIT).

Std_ReturnType EthIf_GetChanRxParams (uint8 TrcvId, uint8 RadioId, const WEthTrcv_GetChanRxParamIdType* ParamIds, thernetInterface uint32* ParamValues, uint8 NumParams); ⚠️

Obtains the state of the ind exed controller

Std_ReturnType EthIf_GetControllerMode (uint8 CtrlIdx, Eth_ModeType* CtrlModePtr);

Returns the number and index of all active Ethernet controllers.

Std_ReturnType EthIf_GetCtrlIdxList (uint8* NumberOfCtrlIdx, uint8* CtrlIdxListPtr);

Returns a time value out of the HW registers according to the capability of the HW. Is the HW resolution is lower than the Eth_ Time Stamp Type resolution resp. range, the remaining bits will be filled with 0. Important Note: Eth If_ Get Curren t Time may be called within an exclusive area.

Std_ReturnType EthIf_GetCurrentTime (uint8 CtrlIdx, Eth_TimeStampQualType* timeQualPtr, Eth_TimeStampType* timeStampPtr);

Reads back the egress time stamp on a dedicated message object. It must be called within the Tx Confirmation() function.

Std_ReturnType EthIf_GetEgressTimeStamp (uint8 CtrlIdx, Eth_BufIdxType BufIdx, Eth_TimeStampQualType* timeQualPtr, thernetInterface* timeStampPtr); ⚠️

Reads back the ingress time stamp on a dedicated message object. It must be called within the Rx Indication() function.

Std_ReturnType EthIf_GetIngressTimeStamp (uint8 CtrlIdx, const Eth_DataType* DataPtr, Eth_TimeStampQualType* timeQualPtr, Eth_TimeStampType* timeStampPtr);

Obtains the PHY identifier of the Ethernet Interface according to IEEE 802.3 - chapter 22.2.4.3.1 PHY Identifer.

Std_ReturnType EthIf_GetPhyIdentifier (uint8 TrcvIdx, uint32* OrgUniqueIdPtr, uint8* ModelNrPtr, uint8* RevisionNrPtr);

Obtains the physical source address used by the indexed controller

void EthIf_GetPhysAddr (uint8 CtrlIdx, uint8* PhysAddrPtr);

Tags: atp.Status=draft

Std_ReturnType EthIf_GetPhyWakeupReason (uint8 TrcvIdx, EthTrcv_WakeupReasonType* WakeupReasonPtr);

Retrieves the cable diagnostics result of the indexed Ethernet switch port respectively the referenced Ethernet Transceiver Driver.

Std_ReturnType EthIf_GetPortCableDiagnosticsResult (uint8 SwitchIdx, uint8 PortIdx, EthTrcv_CableDiagResultType* ResultPtr);

Obtains the port over which this MAC - address can be reached

Std_ReturnType EthIf_GetPortMacAddr (const uint8* MacAddrPtr, uint8* SwitchIdxPtr, uint8* PortIdxPtr);

Obtain the current status of the port mirroring for the indexed Ethernet switch port

Std_ReturnType EthIf_GetPortMirrorState (uint8 SwitchIdx, uint8 PortIdx, EthSwt_PortMirrorStateType* PortMirrorStatePtr);

Request the Mgmt Object of the (in this context) unique Data Ptr.

Std_ReturnType EthIf_GetRxMgmtObject (uint8 CtrlIdx, Eth_DataType* DataPtr, EthSwt_MgmtObjectType* * MgmtObjectPtr);

Obtain the Organizationally Unique Identifier that is given by the IEEE of the indexed Ethernet switch. This function shall provide the OUI of Ethernet switch. The OUI has a size of 24 bit. If a ethernet switch can provide the OUI the 8 most significant bits of the OUI shall be set to 0x00xxxxxx. If a Ethernet switch can not provide the OUI the 8 most significant bits of the OUI shall be set to 0x FFxxxxxx. Availa ble via Eth If.h

Std_ReturnType EthIf_GetSwitchIdentifier (uint8 SwitchIdx, uint32* OrgUniqueIdPtr);

This function retrieves the OUI (24 bit) of the indexed Ethernet switch port.

Std_ReturnType EthIf_GetSwitchPortIdentifier (uint8 SwitchIdx, uint8 SwitchPortIdx, uint32* OrgUniqueIdPtr, uint8* ModelNrPtr, uint8* RevisionNrPtr);

Obtains the mode of the indexed switch port

Std_ReturnType EthIf_GetSwitchPortMode (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType* PortModePtr);

Retrieves the signal quality of the link of the given Ethernet switch port

Std_ReturnType EthIf_GetSwitchPortSignalQuality (uint8 SwitchIdx, uint8 SwitchPortIdx, EthIf_SignalQualityResultType* ResultPtr);

This function obtains the wake up reasons of the indexed Ethernet switch port by

Std_ReturnType EthIf_GetSwitchPortWakeupReason (uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_WakeupReasonType* WakeupReasonPtr);

Obtains the state of the indexed transceiver

Std_ReturnType EthIf_GetTransceiverMode (uint8 TrcvIdx, Eth_ModeType* TrcvModePtr);

Returns the wake up mode of the indexed tran sceiver Tags: atp.Status=obsolete

Std_ReturnType EthIf_GetTransceiverWakeupMode (uint8 TrcvIdx, EthTrcv_WakeupModeType* TrcvWakeupModePtr);

Retrieves the signal quality of the link of the given Ethernet transceiver

Std_ReturnType EthIf_GetTrcvSignalQuality (uint8 TrcvIdx, EthIf_SignalQualityResultType* ResultPtr);

Request the Mgmt Object of the (in this context) unique Buf Idx.

Std_ReturnType EthIf_GetTxMgmtObject (uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtObjectType* * MgmtObjectPtr);

Returns the VLAN identifier of the requested Ethernet controller.

Std_ReturnType EthIf_GetVlanId (uint8 CtrlIdx, uint16* VlanIdPtr);

Services · Set…

Set values related to the transmit direction of the transceiver for a specific buffer (packet to be sent). For example, this can be the desired transmit power or the channel belonging to one single packet.

Std_ReturnType EthIf_SetBufWTxParams (uint8 CtrlIdx, Eth_BufIdxType BufIdx, const WEth_BufWTxParamIdType* TxParamIds, const uint32* ParamValues, uint8 NumParams);

Set values related to the receive direction of a transceiver's wireless channel. For example, this could be a channel parameter like the frequency.

Std_ReturnType EthIf_SetChanRxParams (uint8 TrcvId, uint8 RadioId, const WEthTrcv_SetChanRxParamIdType* ParamIds, const uint32* ParamValues, uint8 NumParams);

Set values related to the transmit direction of a transceiver's wireless channel. For example, this could be the bitrate of a channel.

Std_ReturnType EthIf_SetChanTxParams (uint8 TrcvId, uint8 RadioId, const WEthTrcv_SetChanTxParamIdType* TxParamIds, const uint32* ParamValues, uint8 NumParams);

Enables / disables the indexed controller thernet Interface AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_EthernetInterface

Std_ReturnType EthIf_SetControllerMode (uint8 CtrlIdx, Eth_ModeType CtrlMode);

Verifies the Switch Configuration. If Configuration is not valid, Switch is reconfigured.

Std_ReturnType EthIf_SetForwardingMode (uint8 SwitchIdx, boolean mode);

Activates a given loopback mode.

Std_ReturnType EthIf_SetPhyLoopbackMode (uint8 TrcvIdx, EthTrcv_PhyLoopbackModeType Mode);

Sets the physical source address used by the indexed controller.

void EthIf_SetPhysAddr (uint8 CtrlIdx, const uint8* PhysAddrPtr);

Activates a given test mode.

Std_ReturnType EthIf_SetPhyTestMode (uint8 TrcvIdx, EthTrcv_PhyTestModeType Mode);

Activates a given transmission mode. Tags: atp.Status=draft

Std_ReturnType EthIf_SetPhyTxMode (uint8 TrcvIdx, EthTrcv_PhyTxModeType Mode);

Activates a given test loop - back mode of the indexed Ethernet switch port.

Std_ReturnType EthIf_SetPortLoopbackMode (uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyLoopbackModeType Mode);

Request to set the given port mirroring state of the port mirror configuration for the given Ethernet switch.

Std_ReturnType EthIf_SetPortMirrorState (uint8 MirroredSwitchIdx, uint8 PortIdx, EthSwt_PortMirrorStateType PortMirrorState);

Activates a given test mode of the indexed Ethernet switch port.

Std_ReturnType EthIf_SetPortTestMode (uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTestModeType Mode);

Activates a given transmission mode of the indexed Ethernet switch port.

Std_ReturnType EthIf_SetPortTxMode (thernetInterface uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTxModeType Mode); ⚠️

Set values related to a transceiver's wireless radio. For example, this could be the selection of the radio settings (channel, ...).

Std_ReturnType EthIf_SetRadioParams (uint8 TrcvId, const WEthTrcv_SetRadioParamIdType* ParamIds, const uint32* ParamValue, uint8 NumParams);

Provides additional management information along to an Ethernet frame that requires special treatment within the Switch. It has to be called between Eth If_ Provide Tx Buffer() and Eth If_ Transmit() of the related frame.

Std_ReturnType EthIf_SetSwitchMgmtInfo (uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtInfoType* MgmtInfoPtr);

Enables / disables the wake up mode or clear the wake - up reason of the indexed transceiver Tags: atp.Status=obsolete

Std_ReturnType EthIf_SetTransceiverWakeupMode (uint8 TrcvIdx, EthTrcv_WakeupModeType TrcvWakeupMode);

Services · Switch…

Activates egress time stamping on a dedicated message object, addressed by Ctrl Idx and Buf Idx.

Std_ReturnType EthIf_SwitchEnableTimeStamping (uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtInfoType* MgmtInfo);

Retrieves the total size of data and the memory start address of the indexed Ethernet Switch.

Std_ReturnType EthIf_SwitchGetCfgDataInfo (uint8 SwitchIdx, uint32* DataSizePtr, uint32* DataAdressPtr);

Retrieves the data in memory of the indexed Ethernet switch in variable length

Std_ReturnType EthIf_SwitchGetCfgDataRaw (uint8 SwitchIdx, uint32 Offset, uint16 Length, uint8* BufferPtr);

Obtains the baud rate of the indexed switch port

Std_ReturnType EthIf_SwitchPortGetBaudRate (thernetInterface uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_BaudRateType* BaudRatePtr); ⚠️

Reads a list with drop counter values of the corresponding port of the switch. The meaning of these values is described at Eth_ Counter Type.

Std_ReturnType EthIf_SwitchPortGetCounterValues (uint8 SwitchIdx, thernetInterface uint8 SwitchPortIdx, Eth_CounterType* CounterPtr); ⚠️

Obtains the duplex mode of the indexed switch port

Std_ReturnType EthIf_SwitchPortGetDuplexMode (uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_DuplexModeType* DuplexModePtr);

Obtains the link state of the indexed switch port

Std_ReturnType EthIf_SwitchPortGetLinkState (uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_LinkStateType* LinkStatePtr);

Returns the MAC learning mode, i.e. 1.) HW learning enabled, 2.) Hardware l earning disabled, 3.) Software learning enabled. Note: This feature is hardware dependent, i.e. the switch hardware needs to support the different learning modes

Std_ReturnType EthIf_SwitchPortGetMacLearningMode (thernetInterface uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType* MacLearningModePtr); ⚠️

Service EthIf_SwitchPortGetMaxFIFOBufferFillLevel.

Std_ReturnType EthIf_SwitchPortGetMaxFIFOBufferFillLevel (uint8 SwitchPortIdx, uint8 PortIdx, uint8 SwitchPortEgressFifoIdx, uint32* SwitchPortEgressFifoBufferLevelPtr);

Returns a list of statistic counters defined with E th_ Rx Tats Type. The majority of these Counters are derived from the IETF RFC2819.

Std_ReturnType EthIf_SwitchPortGetRxStats (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_RxStatsType* RxStatsPtr);

Returns the list of Transmission Error Counters out of IETF RFC1213 and RFC16 defined with Eth_ Tx Error Counter Values Type, where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

Std_ReturnType EthIf_SwitchPortGetTxErrorCounterValues (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_TxErrorCounterValuesType* TxStatsPtr);

Returns the list of Transmission Statistics out of IETF RFC1213 defined with Eth_ Tx Stats Type, where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

Std_ReturnType EthIf_SwitchPortGetTxStats (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_TxStatsType* TxStatsPtr);

Request a mode for the Eth If Swt Port Group. The call shall be forwarded to Eth Swt by calling Eth Swt_ Set Switch P ort Mode for all Eth Swt Ports referenced by the port group.

Std_ReturnType EthIf_SwitchPortGroupRequestMode (EthIf_SwitchPortGroupIdxType PortGroupIdx, Eth_ModeType PortMode);

The Eth If shall determine the expected notifications based on the Eth Swt Port configuration. In case the Eth Swt Port references an Eth Trcv the Eth If expects a notification from the Eth Trcv via API Eth If_ Trcv Mode Indication(). Otherwise the Eth If expects a notification from the Eth Swt via API Eth If_ Switch Port Mode Indication()

void EthIf_SwitchPortModeIndication (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType PortMode);

Services · Transceiver…

Obtains the baud rate of the indexed transceiver

Std_ReturnType EthIf_TransceiverGetBaudRate (uint8 TrcvIdx, EthTrcv_BaudRateType* BaudRatePtr);

Obtains the duplex mode of the indexed tra nsceiver

Std_ReturnType EthIf_TransceiverGetDuplexMode (uint8 TrcvIdx, EthTrcv_DuplexModeType* DuplexModePtr);

Obta ins the link state of the indexed transceiver

Std_ReturnType EthIf_TransceiverGetLinkState (uint8 TrcvIdx, EthTrcv_LinkStateType* LinkStatePtr);

Obtains the media access mode of the transceiver. Tags: atp.Status=draft thernet Interface AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_EthernetInterface

Std_ReturnType EthIf_TransceiverGetMacMethod (uint8* TrcvIdx, EthTrcv_MacMethodType* MacModePtr);

Services · More

This API request the affected Ethernet hardware to c heck for a signaled wake - up. The used Ethernet hardware could be an Ethernet switch or Ethernet transceiver (PHY). This is used e.g. for Ethernet hardware which is compliant to the specification of Open Alliance TC10. This API is called by the integration code. The function could be called in context of the interrupt or on task level.

Std_ReturnType EthIf_CheckWakeup (EcuM_WakeupSourceType WakeupSource);

Clear the stored signal quality of the link of the given Et hernet switch port

Std_ReturnType EthIf_ClearSwitchPortSignalQuality (uint8 SwitchIdx, uint8 SwitchPortIdx);

Clear the stored signal quality of the link of the given Ethernet transceiver

Std_ReturnType EthIf_ClearTrcvSignalQuality (uint8 TrcvIdx);

Called asynchronously when mode has been read out. Triggered by previous Eth_ Set Controller Mode call. Can directly be called within the trigger functions.

void EthIf_CtrlModeIndication (uint8 CtrlIdx, thernetInterface Eth_ModeType CtrlMode); ⚠️

Delete the stored port mirror configuration of the given Mirrored Switch Idx. If no port mirror configuration was found for the given Mirrored Switch Idx, the return value shall be E_ OK.

Std_ReturnType EthIf_DeletePortMirrorConfiguration (uint8 MirroredSwitchIdx);

Activates egress time stamping on a dedicated message object. Some HW does store once the egress time stamp marker and some HW needs it always before transmission. There will be no "disable" functionality, due to the fact, that the message type is always " time stamped" by network design.

void EthIf_EnableEgressTimeStamp (uint8 CtrlIdx, Eth_BufIdxType BufIdx thernetInterface); ⚠️

Provides access to a transmit buffer of the specified Ethernet controller.

BufReq_ReturnType EthIf_ProvideTxBuffer (uint8 CtrlIdx, Eth_FrameType FrameType, uint8 Priority, Eth_BufIdxType* BufIdxPtr, uint8* * BufPtr, uint16* LenBytePtr);

Obtain the port mirror configuration of the given Ethernet switch.

Std_ReturnType EthIf_ReadPortMirrorConfiguration (uint8 MirroredSwitchIdx, EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);

The function shall request to reset the configuration of the learned MAC/ Port tables of a Eth ernet switch in a persistent manner. This could be used by e.g. a CDD. The statically configured entries shall still remain.

Std_ReturnType EthIf_ResetConfiguration (uint8 SwitchIdx);

Trigger the cable diagnostics for the given Ethernet transceiver.

Std_ReturnType EthIf_RunCableDiagnostic (uint8 TrcvIdx);

Trigger the cable diagnostics of the given Ethernet Switch port (Port Idx) by calling Eth Trcv_ Run Cable Diagnostic of the referenced Ethernet transceiver.

Std_ReturnType EthIf_RunPortCableDiagnostic (uint8 SwitchIdx, uint8 PortIdx);

This API is called by the corresponding Eth Trcv, if a sleep indication was detected on the network. This could be used e.g. for Ethernet hardware which is compliant to the OA TC10. In this ca se the Ethernet hardware (PHY) detect an Sleep.Indication which was triggered by a Sleep.Request of the connected link partner. Tags: atp.Status=draft

void EthIf_SleepIndication (uint8 TrcvIdx);

Request to set all configured and affected Eth Swt Ports to ETH_ MODE_ ACTIVE

Std_ReturnType EthIf_StartAllPorts (void);

The function shall request to store the configuration of the learned MAC/ Port tables of a Ethernet switch in a persistent manner. This could be used by e.g. a CDD.

Std_ReturnType EthIf_StoreConfiguration (uint8 SwitchIdx);

Triggers transmission of a previously filled transmit buffer

Std_ReturnType EthIf_Transmit (uint8 CtrlIdx, Eth_BufIdxType BufIdx, Eth_FrameType FrameType, boolean TxConfirmation, uint16 LenByte, const uint8* PhysAddrPtr);

Called asynchronously when a mode change has been read out. If the function is triggered by previous call of Eth Trcv_ Set Transceiver Mode it can directly be called within the trigger function. Ava ilable via Eth If.h

void EthIf_TrcvModeIndication (uint8 TrcvIdx, Eth_ModeType TrcvMode);

Update the physical source address to/ from the indexed controller filter. If the Ethernet Controller is not capable to do the filtering, the software has to do this.

Std_ReturnType EthIf_UpdatePhysAddrFilter (uint8 CtrlIdx, const uint8* PhysAddrPtr, Eth_FilterActionType Action);

Forwarded t o Eth Swt_ Verify Config. Eth Swt_ Verify Config verifies the Switch thernet Interface AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_EthernetInterface Configuration depending on the HW - Architecture, HW - capability and the intended accuracy of this verification.

Std_ReturnType EthIf_VerifyConfig (uint8 SwitchIdx, boolean* Result);

Service EthIf_WritePortMirrorConfiguration.

Std_ReturnType EthIf_WritePortMirrorConfiguration (uint8 MirroredSwitchIdx, const EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);

Callbacks

Handles a received frame received by the indexed controller

void EthIf_RxIndication (uint8 CtrlIdx, Eth_FrameType FrameType, boolean IsBroadcast, const uint8* PhysAddrPtr, const Eth_DataType* DataPtr, uint16 LenByte);

Confirms frame transmission by the indexed controller

void EthIf_TxConfirmation (uint8 CtrlIdx, Eth_BufIdxType BufIdx, Std_ReturnType Result);

Cyclic

The function checks for new received frames and issues reception indications in polling mode.

void EthIf_MainFunctionRx (void);

The function is polling different communication hardware (Ethernet transceiver, Ethernet switch ports) related information, e.g. link state, signal quality.

void EthIf_MainFunctionState (void);

The function issues transmission confirmations in polling mode. It checks also for transceiver state changes.

void EthIf_MainFunctionTx (void);

Types

Implementation specific structure of the post build configuration

Index to select specific measurement data

Data Type that represents the Ethernet interface switch port group index. The index is zero based and unique for every configured switch port group.