Ethernet Interface (EthIf)
Abstracts Ethernet controller and transceiver hardware for upper protocol layers.
Funktionen — Übersicht
void EthIf_Init (const EthIf_ConfigType* CfgPtr);Initializes the Ethernet InterfaceStd_ReturnType EthIf_SetControllerMode (uint8 CtrlIdx, Eth_ModeType CtrlMode);Enables / disables the indexed controller thernet InterfaceStd_ReturnType EthIf_GetControllerMode (uint8 CtrlIdx, Eth_ModeType* CtrlModePtr);Obtains the state of the ind exed controllerStd_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.Std_ReturnType EthIf_GetTransceiver EthIf_GetTransceiverWakeupModethernetInterface (uint8 TrcvIdx, EthTrcv_WakeupModeType* TrcvWakeupModePtr); ⚠️Returns the wake up mode of the indexed tran sceiver Tags: atp.Std_ReturnType EthIf_CheckWakeup (EcuM_WakeupSourceType WakeupSource);This API request the affected Ethernet hardware to c heck for a signaled wake - up.Std_ReturnType EthIf_GetPhyWakeupReason (uint8 TrcvIdx, EthTrcv_WakeupReasonType* WakeupReasonPtr);Tags: atp.Status=draftStd_ReturnType EthIf_GetSwitchPortWakeupReason (uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_WakeupReasonType* WakeupReasonPtr);This function obtains the wake up reasons of the indexed Ethernet switch port byvoid EthIf_GetPhysAddr (uint8 CtrlIdx, uint8* PhysAddrPtr);Obtains the physical source address used by the indexed controllervoid EthIf_SetPhysAddr (uint8 CtrlIdx, const uint8* PhysAddrPtr);Sets the physical source address used by the indexed controller.Std_ReturnType EthIf_UpdatePhysAddrFilter (uint8 CtrlIdx, const uint8* PhysAddrPtr, Eth_FilterActionType Action);Update the physical source address to/ from the indexed controller filter.Std_ReturnType EthIf_GetPortMacAddr (const uint8* MacAddrPtr, uint8* SwitchIdxPtr, uint8* PortIdxPtr);Obtains the port over which this MAC - address can be reachedStd_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.Std_ReturnType EthIf_GetCtrlIdxList (uint8* NumberOfCtrlIdx, uint8* CtrlIdxListPtr);Returns the number and index of all active Ethernet controllers.Std_ReturnType EthIf_GetVlan (uint8 CtrlIdx, uint16* VlanIdPtr);Returns the VLAN identifier of the requested Ethernet controller.Std_ReturnType EthIf_GetAndResetMeasurementData (EthIf_MeasurementIdxType MeasurementIdx, boolean MeasurementResetNeeded, uint32* MeasurementDataPtr);Allows to read and reset detailed measurement data for diagnostic purposes.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.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...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.void EthIf_EnableEgressTimeStamp (uint8 CtrlIdx, Eth_BufIdxType BufIdx thernetInterface); ⚠️Activates egress time stamping on a dedicated message object.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.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.Std_ReturnType EthIf_SwitchPortGroupRequestMode (EthIf_SwitchPortGroupIdxType PortGroupIdx, Eth_ModeType PortMode);Request a mode for the Eth If Swt Port Group.Std_ReturnType EthIf_StartAllPorts (void);Request to set all configured and affected Eth Swt Ports to ETH_ MODE_ ACTIVEStd_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.Std_ReturnType EthIf_GetRxMgmtObject (uint8 CtrlIdx, Eth_DataType* DataPtr, EthSwt_MgmtObjectType* * MgmtObjectPtr);Request the Mgmt Object of the (in this context) unique Data Ptr.Std_ReturnType EthIf_GetTxMgmtObject (uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtObjectType* * MgmtObjectPtr);Request the Mgmt Object of the (in this context) unique Buf Idx.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.Std_ReturnType EthIf_VerifyConfig (uint8 SwitchIdx, boolean* Result);Forwarded t o Eth Swt_ Verify Config.Std_ReturnType EthIf_SetForwardingMode (uint8 SwitchIdx, boolean mode);Verifies the Switch Configuration.Std_ReturnType EthIf_GetTrcvSignalQuality (uint8 TrcvIdx, EthIf_SignalQualityResultType* ResultPtr);Retrieves the signal quality of the link of the given Ethernet transceiverStd_ReturnType EthIf_GetSwitchPortSignalQuality (uint8 SwitchIdx, uint8 SwitchPortIdx, EthIf_SignalQualityResultType* ResultPtr);Retrieves the signal quality of the link of the given Ethernet switch portStd_ReturnType EthIf_ClearTrcvSignalQuality (uint8 TrcvIdx);Clear the stored signal quality of the link of the given Ethernet transceiverStd_ReturnType EthIf_ClearSwitchPortSignalQuality (uint8 SwitchIdx, uint8 SwitchPortIdx);Clear the stored signal quality of the link of the given Et hernet switch portStd_ReturnType EthIf_SetPhyTestMode (uint8 TrcvIdx, EthTrcv_PhyTestModeType Mode);Activates a given test mode.Std_ReturnType EthIf_SetPhyLoopbackMode (uint8 TrcvIdx, EthTrcv_PhyLoopbackModeType Mode);Activates a given loopback mode.Std_ReturnType EthIf_SetPhyTxMode (uint8 TrcvIdx, EthTrcv_PhyTxModeType Mode);Activates a given transmission mode.Std_ReturnType EthIf_GetCableDiagnosticsResult (uint8 TrcvIdx, EthTrcv_CableDiagResultType* ResultPtr);Retrieves the cable diagnostics result of a given transceiver.Std_ReturnType EthIf_GetPhyIdentifier (uint8 TrcvIdx, uint32* OrgUniqueIdPtr, uint8* ModelNrPtr, uint8* RevisionNrPtr);Obtains the PHY identifier of the Ethernet Interface according to IEEE 802.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.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.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).Std_ReturnType EthIf_SetRadioParams (uint8 TrcvId, const WEthTrcv_SetRadioParamIdType* ParamIds, const uint32* ParamValue, uint8 NumParams);Set values related to a transceiver's wireless radio.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.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.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.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.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 buffervoid EthIf_GetVersionInfo (Std_VersionInfoType* VersionInfoPtr);Returns the version information of this moduleStd_ReturnType EthIf_GetSwitchPortMode (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType* PortModePtr);Obtains the mode of the indexed switch portStd_ReturnType EthIf_GetTransceiverMode (uint8 TrcvIdx, Eth_ModeType* TrcvModePtr);Obtains the state of the indexed transceiverStd_ReturnType EthIf_SwitchPortGetLinkState (uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_LinkStateType* LinkStatePtr);Obtains the link state of the indexed switch portStd_ReturnType EthIf_TransceiverGetLinkState (uint8 TrcvIdx, EthTrcv_LinkStateType* LinkStatePtr);Obta ins the link state of the indexed transceiverStd_ReturnType EthIf_SwitchPortGetBaudRate (thernetInterface uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_BaudRateType* BaudRatePtr); ⚠️Obtains the baud rate of the indexed switch portStd_ReturnType EthIf_TransceiverGetBaudRate (uint8 TrcvIdx, EthTrcv_BaudRateType* BaudRatePtr);Obtains the baud rate of the indexed transceiverStd_ReturnType EthIf_SwitchPortGetDuplexMode (uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_DuplexModeType* DuplexModePtr);Obtains the duplex mode of the indexed switch portStd_ReturnType EthIf_TransceiverGetDuplexMode (uint8 TrcvIdx, EthTrcv_DuplexModeType* DuplexModePtr);Obtains the duplex mode of the indexed tra nsceiverStd_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.Std_ReturnType EthIf_SwitchPortGetRxStats (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_RxStatsType* RxStatsPtr);Returns a list of statistic counters defined with E th_ Rx Tats Type.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...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,...Std_ReturnType EthIf_SwitchPortGetMacLearningMode (thernetInterface uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType* MacLearningModePtr); ⚠️Returns the MAC learning mode, i.Std_ReturnType EthIf_GetSwitchPortIdentifier (uint8 SwitchIdx, uint8 SwitchPortIdx, uint32* OrgUniqueIdPtr, uint8* ModelNrPtr, uint8* RevisionNrPtr);This function retrieves the OUI (24 bit) of the indexed Ethernet switch port.Std_ReturnType EthIf_GetSwitchIdentifier (uint8 SwitchIdx, uint32* OrgUniqueIdPtr);Obtain the Organizationally Unique Identifier that is given by the IEEE of the indexed Ethernet switch.Std_ReturnType EthIf_WritePortMirrorConfiguration (uint8 MirroredSwitchIdx, const EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);Service EthIf_WritePortMirrorConfiguration.Std_ReturnType EthIf_ReadPortMirrorConfiguration (uint8 MirroredSwitchIdx, EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);Obtain the port mirror configuration of the given Ethernet switch.Std_ReturnType EthIf_DeletePortMirrorConfiguration (uint8 MirroredSwitchIdx);Delete the stored port mirror configuration of the given Mirrored Switch Idx.Std_ReturnType EthIf_GetPortMirrorState (uint8 SwitchIdx, uint8 PortIdx, EthSwt_PortMirrorStateType* PortMirrorStatePtr);Obtain the current status of the port mirroring for the indexed Ethernet switch portStd_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.Std_ReturnType EthIf_SetPortTestMode (uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTestModeType Mode);Activates a given test mode of the indexed Ethernet switch port.Std_ReturnType EthIf_SetPortLoopbackMode (uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyLoopbackModeType Mode);Activates a given test loop - back mode of the indexed Ethernet switch port.Std_ReturnType EthIf_SetPortTxMode (thernetInterface uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTxModeType Mode); ⚠️Activates a given transmission mode of the indexed Ethernet switch port.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...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...Std_ReturnType EthIf_RunCableDiagnostic (uint8 TrcvIdx);Trigger the cable diagnostics for the given Ethernet transceiver.Std_ReturnType EthIf_SwitchGetCfgDataRaw (uint8 SwitchIdx, uint32 Offset, uint16 Length, uint8* BufferPtr);Retrieves the data in memory of the indexed Ethernet switch in variable lengthStd_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.Std_ReturnType EthIf_SwitchPortGetMaxFIFOBufferFill EthIf_SwitchPortGetMaxFIFOBufferFillLevel (uint8 SwitchPortIdx, uint8 PortIdx, uint8 SwitchPortEgressFifoIdx, uint32* SwitchPortEgressFifoBufferLevelPtr); ⚠️Service EthIf_SwitchPortGetMaxFIFOBufferFillLevel.Std_ReturnType EthIf_TransceiverGetMacMethod (uint8* TrcvIdx, EthTrcv_MacMethodType* MacModePtr);Obtains the media access mode of the transceiver.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 controllervoid EthIf_TxConfirmation (uint8 CtrlIdx, Eth_BufIdxType BufIdx, Std_ReturnType Result);Confirms frame transmission by the indexed controllervoid EthIf_CtrlModeIndication (uint8 CtrlIdx, thernetInterface Eth_ModeType CtrlMode); ⚠️Called asynchronously when mode has been read out.void EthIf_TrcvModeIndication (uint8 TrcvIdx, Eth_ModeType TrcvMode);Called asynchronously when a mode change has been read out.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.void EthIf_SleepIndication (uint8 TrcvIdx);This API is called by the corresponding Eth Trcv, if a sleep indication was detected on the network.void EthIf_MainFunctionRx (void);The function checks for new received frames and issues reception indications in polling mode.void EthIf_MainFunctionTx (void);The function issues transmission confirmations in polling mode.void EthIf_MainFunctionState (void);The function is polling different communication hardware (Ethernet transceiver, Ethernet switch ports) related information, e.
Typen — Übersicht
struct EthIf_ConfigTypeImplementation specific structure of the post build configurationEthIf_SwitchPortGroupIdxTypeData Type that represents the Ethernet interface switch port group index.EthIf_MeasurementIdxTypeIndex to select specific measurement dataenum EthIf_SignalQualityResultType-
Funktionen & Typen — Detailansicht
function EthIf_Init [SWS_EthIf_00024] 📄 PDF
void EthIf_Init (const EthIf_ConfigType* CfgPtr);
Initializes the Ethernet Interface
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:
- If the initialization was not performed, the dependent functions report the development error
ETHIF_E_UNINIT(for example [SWS_EthIf_00155], [SWS_EthIf_00161], [SWS_EthIf_00167], [SWS_EthIf_00173], [SWS_EthIf_00193], [SWS_EthIf_00199], [SWS_EthIf_00217], [SWS_EthIf_00222], [SWS_EthIf_00299], [SWS_EthIf_00302], and [SWS_EthIf_00304]). - Several interfaces abort execution if initialization was omitted and additionally return the error value
E_NOT_OK(such as [SWS_EthIf_00246], [SWS_EthIf_00273], as well as [SWS_EthIf_00277]).
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
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 ofEthTrcv_SetTransceiverModewithETH_MODE_ACTIVE_WITH_WAKEUP_REQUESTand subsequentlyEthTrcv_TransceiverLinkStateRequestwithETHTRCV_LINK_STATE_ACTIVE, if the current status isETHTRCV_LINK_STATE_DOWN[SWS_EthIf_00479]. - In case of a reference to a
EthIfSwitchor aEthIfSwitchPortGroupof type “control”: call ofEthSwt_SetSwitchPortModewithETH_MODE_ACTIVE_WITH_WAKEUP_REQUESTand subsequentlyEthSwt_PortLinkStateRequestwithETHTRCV_LINK_STATE_ACTIVE, if the current state isETHTRCV_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_GetControllerMode [SWS_EthIf_00039] 📄 PDF
Std_ReturnType EthIf_GetControllerMode (uint8 CtrlIdx, Eth_ModeType* CtrlModePtr);
Obtains the state of the ind exed controller
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
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 driverEthIfTransceiverIdxis currently in stateETHTRCV_WUM_DISABLE, the call is forwarded toEthTrcv_SetTransceiverWakeupMode[SWS_EthIf_00234].ETHTRCV_WUM_DISABLE: Disables wake-up of the transceiver [SWS_EthIf_00233]. If the current state of the driver isETHTRCV_WUM_ENABLE, the function forwards the call toEthTrcv_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.
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
EthIfTransceiverorEthIfSwitchPortGroups),EthTrcv_CheckWakeupof the respective transceiver driver is called [SWS_EthIf_00245]. - For all affected Ethernet switches (referenced via
EthIfSwitch),EthSwt_SwitchCheckWakeupof 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_GetPhyWakeupReason [SWS_EthIf_91004] 📄 PDF
Std_ReturnType EthIf_GetPhyWakeupReason (uint8 TrcvIdx, EthTrcv_WakeupReasonType* WakeupReasonPtr);
Tags: atp.Status=draft
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.
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_OKif the filter configuration was changed successfully, orE_NOT_OKif 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_GetPortMacAddr [SWS_EthIf_00190] 📄 PDF
Std_ReturnType EthIf_GetPortMacAddr (const uint8* MacAddrPtr, uint8* SwitchIdxPtr, uint8* PortIdxPtr);
Obtains the port over which this MAC - address can be reached
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_GetCtrlIdxList [SWS_EthIf_91053] 📄 PDF
Std_ReturnType EthIf_GetCtrlIdxList (uint8* NumberOfCtrlIdx, uint8* CtrlIdxListPtr);
Returns the number and index of all active Ethernet controllers.
function EthIf_GetVlan [SWS_EthIf_91052] 📄 PDF
Std_ReturnType EthIf_GetVlanId (uint8 CtrlIdx, uint16* VlanIdPtr);
Returns the VLAN identifier of the requested Ethernet controller.
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.
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.
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]:
E_OK: The request for persistent resetting of the MAC/port table was successfully accepted [SWS_EthIf_00219].E_NOT_OK: The request was rejected [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.
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.
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 stateETH_MODE_ACTIVEandETH_MODE_DOWNwas requested for all groups referencing the ports,EthIfstarts a timer with the delay timeEthIfSwitchOffPortTimedelay([SWS_EthIf_00270]). - Activation (
ETH_MODE_ACTIVEorETH_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_SetSwitchPortModeis called withETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST, followed byEthSwt_PortLinkStateRequestwithETHTRCV_LINK_STATE_ACTIVEif the current link state isETHTRCV_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
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_SetSwitchPortModeis called withETH_MODE_ACTIVE, provided that the current mode isETH_MODE_DOWN([SWS_EthIf_00275]). - Thereafter, the call of
EthSwt_PortLinkStateRequestwithETHTRCV_LINK_STATE_ACTIVEtakes place if the current link state isETHTRCV_LINK_STATE_DOWN, and a timer with the time spanEthIfPortStartupActiveTimeis 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_PortLinkStateRequestis called withETHTRCV_LINK_STATE_DOWN([SWS_EthIf_00276]). - Subsequently,
EthSwt_SetSwitchPortModeis called withETH_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_GetRxMgmtObject [SWS_EthIf_91105] 📄 PDF
Std_ReturnType EthIf_GetRxMgmtObject (uint8 CtrlIdx, Eth_DataType* DataPtr, EthSwt_MgmtObjectType* * MgmtObjectPtr);
Request the Mgmt Object of the (in this context) unique Data Ptr.
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.
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]):
E_OK: Egress time stamping was successfully activated ([SWS_EthIf_91007]).E_NOT_OK: Activation of time stamping has failed ([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.
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.TRUEindicates a successfully verified configuration, whereasFALSEindicates 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.
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]:
E_OK: According to the specification, signaled the successful stopping of forwarding; interpretation: this presumably confirms more generally the successful adoption of the requested forwarding mode [SWS_EthIf_91013]. Question Q-f245de852fe854c0 (open)E_NOT_OK: Switching or stopping frame forwarding failed [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
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
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.
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 typeEthTrcv_PhyTestModeTypeto 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.
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 typeEthTrcv_PhyLoopbackModeTypeto 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
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 typeEthTrcv_PhyTxModeTypeto 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_GetPhyIdentifier [SWS_EthIf_91020] 📄 PDF
Std_ReturnType EthIf_GetPhyIdentifier (uint8 TrcvIdx, uint32* OrgUniqueIdPtr, uint8* ModelNrPtr, uint8* RevisionNrPtr);
Obtains the PHY identifier of the Ethernet Interface according to IEEE 802.3 - chapter 22.2.4.3.1 PHY Identifer.
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.
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]:
BUFREQ_OK: The buffer was provided successfully [SWS_EthIf_00067].BUFREQ_E_BUSY: All buffer resources are currently occupied [SWS_EthIf_00067].BUFREQ_E_OVFL: The requested buffer length exceeds the available size [SWS_EthIf_00067].BUFREQ_E_NOT_OK: A development error was detected [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
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 moduleEthIf.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_GetVersionInfo [SWS_EthIf_00082] 📄 PDF
void EthIf_GetVersionInfo (Std_VersionInfoType* VersionInfoPtr);
Returns the version information of this module
function EthIf_GetSwitchPortMode [SWS_EthIf_91107] 📄 PDF
Std_ReturnType EthIf_GetSwitchPortMode (uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType* PortModePtr);
Obtains the mode of the indexed switch port
function EthIf_GetTransceiverMode [SWS_EthIf_91108] 📄 PDF
Std_ReturnType EthIf_GetTransceiverMode (uint8 TrcvIdx, Eth_ModeType* TrcvModePtr);
Obtains the state of the indexed transceiver
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
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
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 typeEthTrcv_LinkStateType. Possible result values areETHTRCV_LINK_STATE_ACTIVEfor a connected transceiver andETHTRCV_LINK_STATE_DOWNfor 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
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
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
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 typeEthTrcv_DuplexModeType*for the determined mode, eitherETHTRCV_DUPLEX_MODE_HALF(half-duplex) orETHTRCV_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
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 typeEthTrcv_DuplexModeTypefor receiving the result. Possible values areETHTRCV_DUPLEX_MODE_HALF(half-duplex) orETHTRCV_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 viaDuplexModePtr[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.
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]):
E_OK: Reading the counter values was successful ([SWS_EthIf_91115]).E_NOT_OK: An error occurred while reading the counter values ([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.
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 typeEth_RxStatsTypeinto 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.
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]:
E_OK: The transmission statistics were successfully determined [SWS_EthIf_91117].E_NOT_OK: The transmission statistics could not be obtained [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.
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
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 typeEthSwt_MacLearningTypewhere 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 forE_NOT_OKliterally 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_GetSwitchPortIdentifier [SWS_EthIf_91120] 📄 PDF
Std_ReturnType EthIf_GetSwitchPortIdentifier (uint8 SwitchIdx, uint8 SwitchPortIdx, uint32* OrgUniqueIdPtr, uint8* ModelNrPtr, uint8* RevisionNrPtr);
This function retrieves the OUI (24 bit) of the indexed Ethernet switch port.
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.
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 structureEthSwt_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.
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_OKsignals that the configuration was read out successfully. In the event of an error,E_NOT_OKis 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.
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 returnsE_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.
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, eitherPORT_MIRRORING_ENABLEDorPORT_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.
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.
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 typeEthTrcv_PhyLoopbackModeTypeto 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.
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 typeEthTrcv_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.
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.
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:
E_OK: The trigger for cable diagnostics was successfully accepted [SWS_EthIf_91132].E_NOT_OK: The trigger was not accepted [SWS_EthIf_91132].
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
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.
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.
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
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 typeEthTrcv_MacMethodType[SWS_EthIf_91021]. Valid result values areETHTRCV_MAC_TYPE_CSMA_CD(Carrier-Sense Multiple Access with Collision Detection) andETHTRCV_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 viaMacModePtr.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
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
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_OKindicates a successful transmission,E_NOT_OKa 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.
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_SetSwitchPortModefor all ports of a switch port group, provided a corresponding control reference exists, and to resolve conflicts with active groups uponETH_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_TransceiverLinkStateRequestwithETHTRCV_LINK_STATE_ACTIVEorETHTRCV_LINK_STATE_DOWN, depending on whetherETH_MODE_ACTIVEorETH_MODE_DOWNhad 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
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 typeEth_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()
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 typeEth_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
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.
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.
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.
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_ConfigType [SWS_EthIf_00149] 📄 PDF
Implementation specific structure of the post build configuration
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_MeasurementIdxType [SWS_EthIf_91010] 📄 PDF
Index to select specific measurement data
type EthIf_SignalQualityResultType [SWS_EthIf_91057] 📄 PDF
-
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 functionEthIf_ClearTrcvSignalQualityresets the stored signal quality values ([SWS_EthIf_00400]). - For a switch port identified via
SwitchIdxandSwitchPortIdx,EthIf_ClearSwitchPortSignalQualityclears 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
gemini-3.8-flash-low· 2026-10-13 · German original