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
函数 EthIf_Init [SWS_EthIf_00024] 📄 PDF
void EthIf_Init (const EthIf_ConfigType* CfgPtr);
Initializes the Ethernet Interface
用法与语义
函数 EthIf_Init 初始化以太网接口模块([SWS_EthIf_00024])。它同步执行,不可重入(Non Reentrant),并可通过头文件 EthIf.h 获得,其服务 ID 为 0x01。作为唯一的传入参数,该函数需要指针 CfgPtr,该指针指向类型为 EthIf_ConfigType 的具体实现特定配置结构体。既不存在 inout 参数也不存在 out 参数,且函数没有返回值([SWS_EthIf_00024])。
并发与调用上下文
由于 EthIf_Init 不可重入,因此不得进行并发或嵌套调用 [SWS_EthIf_00024]。由于有效载荷中未详细描述具体的调用上下文,因此该调用通常应在 ECU 初始化序列期间、使用其他以太网服务之前执行一次。 问题 Q-07e92f9f3c15ea5b (未决)
顺序条件与交互
调用 EthIf_Init 是使用该模块所有其他函数的强制先决条件。若启用了开发错误检测(Development Error Detection),以太网接口的众多服务在执行前都会检查此前是否已调用 EthIf_Init:
- 若未执行初始化,相关依赖函数将报告开发错误
ETHIF_E_UNINIT(例如 [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] 和 [SWS_EthIf_00304])。 - 若未进行初始化,多个接口将中止执行并额外返回错误值
E_NOT_OK(例如 [SWS_EthIf_00246]、[SWS_EthIf_00273] 以及 [SWS_EthIf_00277])。
本使用说明为自动生成,基于 AUTOSAR Classic R20-11 规范。
实现者指南即将推出(复杂度 I2)
函数 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
使用
函数 EthIf_SetControllerMode 在以太网接口上下文中激活或停用由 CtrlIdx 指定的以太网控制器 [SWS_EthIf_00034]。通过参数 CtrlMode 请求以下状态 [SWS_EthIf_00034]:
ETH_MODE_DOWN:禁用控制器。ETH_MODE_ACTIVE:激活控制器。ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST:激活控制器并请求网络唤醒。
该函数以异步方式工作 [SWS_EthIf_00034]。它在成功执行时返回 E_OK,或在无法更改控制器模式时返回 E_NOT_OK [SWS_EthIf_00034]。
交互与转发
若针对引用了“control”类型 EthIfSwitchPortGroup 的控制器以 ETH_MODE_ACTIVE 调用 EthIf_SetControllerMode,且该模式是首次为该端口请求且其状态为 ETH_MODE_DOWN,则 EthIf 会将调用转发给该组的所有端口。此时将依次执行带有 ETH_MODE_ACTIVE 的 EthSwt_SetSwitchPortMode 以及带有 ETHTRCV_LINK_STATE_ACTIVE 的 EthSwt_PortLinkStateRequest [SWS_EthIf_00264]。
当请求 ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST 时,无论当前模式如何,EthIf 均按如下方式转发调用:
- 当引用
EthIfTransceiver时:调用带有ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST的EthTrcv_SetTransceiverMode,随后在当前状态为ETHTRCV_LINK_STATE_DOWN时调用带有ETHTRCV_LINK_STATE_ACTIVE的EthTrcv_TransceiverLinkStateRequest[SWS_EthIf_00479]。 - 当引用
EthIfSwitch或“control”类型的EthIfSwitchPortGroup时:调用带有ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST的EthSwt_SetSwitchPortMode,随后在当前状态为ETHTRCV_LINK_STATE_DOWN时调用带有ETHTRCV_LINK_STATE_ACTIVE的EthSwt_PortLinkStateRequest[SWS_EthIf_00480],[SWS_EthIf_00481]。
限制
该函数不可重入(Non Reentrant),可通过 EthIf.h 获取 [SWS_EthIf_00034]。
此使用说明基于 AUTOSAR CP R20-11 规范自动生成。
实现者指南即将推出(复杂度 I2)
函数 EthIf_GetControllerMode [SWS_EthIf_00039] 📄 PDF
Std_ReturnType EthIf_GetControllerMode (uint8 CtrlIdx, Eth_ModeType* CtrlModePtr);
Obtains the state of the ind exed controller
函数 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
同步且不可重入的函数 EthIf_SetTransceiverWakeupMode(服务 ID 0x2e)用于设置 Ethernet Interface 中通过 TrcvIdx 寻址的收发器的唤醒模式,或重置其唤醒原因 [SWS_EthIf_00233]。该函数在头文件 EthIf.h 中声明,并在发布版本 AUTOSAR CP R20-11 中标记为已过时(obsolete)[SWS_EthIf_00233]。
控制通过传递参数 TrcvWakeupMode 进行 [SWS_EthIf_00233]:
ETHTRCV_WUM_ENABLE:激活收发器的唤醒 [SWS_EthIf_00233]。如果分配的驱动程序EthIfTransceiverIdx当前处于状态ETHTRCV_WUM_DISABLE,则该调用将被转发给EthTrcv_SetTransceiverWakeupMode[SWS_EthIf_00234]。ETHTRCV_WUM_DISABLE:停用收发器的唤醒 [SWS_EthIf_00233]。只要驱动程序的当前状态为ETHTRCV_WUM_ENABLE,该函数就会将调用转发给EthTrcv_SetTransceiverWakeupMode[SWS_EthIf_00268]。ETHTRCV_WUM_CLEAR:清除索引收发器的唤醒原因 [SWS_EthIf_00233]。
作为返回值,该调用在成功执行时返回 E_OK,如果无法更改唤醒模式或无法清除唤醒原因,则返回 E_NOT_OK [SWS_EthIf_00233]。由于接口定义为不可重入,因此不允许并发调用 [SWS_EthIf_00233]。
此使用说明基于 AUTOSAR CP R20-11 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 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
函数 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.
函数 EthIf_CheckWakeup 请求受影响的以太网硬件检查所指示的唤醒 [SWS_EthIf_00244]。例如,这用于符合 OPEN Alliance TC10 规范的以太网硬件 [SWS_EthIf_00244]。调用由集成代码异步且可重入地发起,可选择在中断上下文中或在任务级发起 [SWS_EthIf_00244]。
作为输入参数,使用类型为 EcuM_WakeupSourceType 的 WakeupSource,它指定了触发源设备(以太网收发器或以太网交换机)[SWS_EthIf_00244]。如果硬件接受了检查请求,则返回值是 E_OK,否则在请求被拒绝时返回 E_NOT_OK [SWS_EthIf_00244]。模块在内部将调用转发给下层驱动程序:
- 对于所有受影响的以太网收发器(通过
EthIfTransceiver或EthIfSwitchPortGroups引用),调用各收发器驱动程序的EthTrcv_CheckWakeup[SWS_EthIf_00245]。 - 对于所有受影响的以太网交换机(通过
EthIfSwitch引用),调用相应交换机驱动程序的EthSwt_SwitchCheckWakeup[SWS_EthIf_00500]。
EthIf_CheckWakeup 的可用性可在预编译期通过配置参数 EthIfWakeUpSupport 进行激活和停用 [SWS_EthIf_00248]。该 API 通过头文件 EthIf.h 提供 [SWS_EthIf_00244]。
此使用说明基于 AUTOSAR 规范 R20-11 自动生成。
实现者指南即将推出(复杂度 I1)
函数 EthIf_GetPhyWakeupReason [SWS_EthIf_91004] 📄 PDF
Std_ReturnType EthIf_GetPhyWakeupReason (uint8 TrcvIdx, EthTrcv_WakeupReasonType* WakeupReasonPtr);
Tags: atp.Status=draft
函数 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
函数 EthIf_GetPhysAddr [SWS_EthIf_00061] 📄 PDF
void EthIf_GetPhysAddr (uint8 CtrlIdx, uint8* PhysAddrPtr);
Obtains the physical source address used by the indexed controller
函数 EthIf_SetPhysAddr [SWS_EthIf_00132] 📄 PDF
void EthIf_SetPhysAddr (uint8 CtrlIdx, const uint8* PhysAddrPtr);
Sets the physical source address used by the indexed controller.
函数 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.
同步函数 EthIf_UpdatePhysAddrFilter([SWS_EthIf_00139])用于更新通过 CtrlIdx 指定的 Ethernet 控制器的地址过滤器。通过参数 Action(类型为 Eth_FilterActionType)向过滤器添加或从中移除物理地址。
为了进行配置,PhysAddrPtr 期望一个指向网络字节序物理 MAC 地址的指针,该地址表示 Layer-2 Ethernet 数据包的组播目标地址 [SWS_EthIf_00139]。尽管文本函数描述中提到了源地址,但这可能属于编辑疏忽,因为参数规范具有约束力地规定了组播目标地址。 问题 Q-312e20e5eadda94a (未决)
关于执行流程和限制,适用以下规定 [SWS_EthIf_00139]:
- 返回值:如果过滤器配置更改成功,该函数返回
E_OK;如果更改失败,则返回E_NOT_OK。源文档中未定义特定的 DET 或 DEM 错误代码。 - 硬件支持:如果底层 Ethernet 控制器在硬件方面无法执行过滤,则软件必须承担此过滤任务。
- 并发性:对于相同的控制器索引(
CtrlIdx),该调用不可重入,但对于不同的控制器,允许并发执行。
此使用说明由 AI 基于规范 R20-11 生成。
函数 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
函数 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
函数 EthIf_GetCtrlIdxList [SWS_EthIf_91053] 📄 PDF
Std_ReturnType EthIf_GetCtrlIdxList (uint8* NumberOfCtrlIdx, uint8* CtrlIdxListPtr);
Returns the number and index of all active Ethernet controllers.
函数 EthIf_GetVlan [SWS_EthIf_91052] 📄 PDF
Std_ReturnType EthIf_GetVlanId (uint8 CtrlIdx, uint16* VlanIdPtr);
Returns the VLAN identifier of the requested Ethernet controller.
函数 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.
函数 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.
用法与调用上下文
函数 EthIf_StoreConfiguration 用于请求对 Ethernet 交换机已学习的 MAC/端口表进行持久化存储 [SWS_EthIf_00214]。例如,Complex Device Driver(CDD)被列为典型的调用方 [SWS_EthIf_00214]。该接口可通过头文件 EthIf.h 访问,并具有 Service-ID 0x2c [SWS_EthIf_00214]。
通过输入参数 SwitchIdx 传递 Ethernet 交换机驱动程序上下文中目标交换机的索引 [SWS_EthIf_00214]。该函数返回状态 Std_ReturnType 作为返回值:值 E_OK 表示存储请求已被接受,而 E_NOT_OK 则指示未被接受 [SWS_EthIf_00214]。由于规范将执行标为同步/异步,因此接收请求大概率是同步进行的,而实际的持久化推测在下游模块中异步处理。 问题 Q-4f10e936c7d30258 (未决)
限制与错误处理
关于并发性,EthIf_StoreConfiguration 被指定为不可重入(Non Reentrant)[SWS_EthIf_00214]。因此,调用方必须避免并行调用或对其进行同步。未为此接口定义特定的 DET 或 DEM 错误报告;任务接收失败仅通过返回值 E_NOT_OK 报告 [SWS_EthIf_00214]。
此使用说明为自动创建。源文档的更改将导致重新生成。
实现者指南即将推出(复杂度 I1)
函数 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.
用法与调用上下文
函数 EthIf_ResetConfiguration 用于请求对 Ethernet 交换机动态学习的 MAC 和端口表进行持久化重置 [SWS_EthIf_00219]。静态配置的条目在配置中保持不变 [SWS_EthIf_00219]。例如,Complex Device Driver(CDD)可充当该接口的调用方 [SWS_EthIf_00219]。
通过传入参数 SwitchIdx 指定 Ethernet 交换机驱动程序上下文中相关交换机的索引 [SWS_EthIf_00219]。关于执行语义,该操作被标为同步/异步 [SWS_EthIf_00219];这可能意味着接收请求得到同步确认,而硬件表的重置则异步进行。 问题 Q-9e7f89ec9e809fd0 (未决)
返回值与错误处理
作为返回值,该函数提供类型为 Std_ReturnType 的状态[SWS_EthIf_00219]:
E_OK:持久化重置 MAC/端口表的请求已成功被接受 [SWS_EthIf_00219]。E_NOT_OK:请求被拒绝 [SWS_EthIf_00219]。
在本规范范围内,未记录该函数的具体 DET 或 DEM 错误报告。
并发性与限制
该接口被指定为不可重入(Non Reentrant)[SWS_EthIf_00219]。因此,调用方必须确保不发生并发或中断调用。该函数通过头文件 EthIf.h 包含 [SWS_EthIf_00219]。
此使用说明基于 AUTOSAR Release R20-11 的规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 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.
函数 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.
同步函数 EthIf_EnableEgressTimeStamp 用于为专用消息对象或发送缓冲区激活发送时间戳采集(Egress Time Stamping)[SWS_EthIf_00160]。该接口通过头文件 EthIf.h 提供 [SWS_EthIf_00160]。
参数与调用
调用时,该函数期望传递两个输入参数 [SWS_EthIf_00160]:
CtrlIdx:寻址的以太网控制器索引 [SWS_EthIf_00160]。BufIdx:应用程序期望采集发送时间戳的消息缓冲区的索引 [SWS_EthIf_00160]。
该函数没有返回值(void),也没有输入或输出参数 [SWS_EthIf_00160]。
硬件行为与并发性
硬件行为因控制器而异:某些硬件类型在一次性配置后永久保存发送时间戳标记,而其他控制器则必须在每次单独传输之前都需要该标记 [SWS_EthIf_00160]。解释:在没有永久存储的控制器上,该函数随后可能必须在每次发送过程之前由应用程序重新调用。 问题 Q-e87b424598f8a684 (未决)根据规范,不存在停用选项,因为根据网络设计,相应的消息类型会被永久标记时间戳 [SWS_EthIf_00160]。
在并发性方面,该函数被定义为不可重入(Non Reentrant)[SWS_EthIf_00160]。
本使用说明是基于规范 AUTOSAR R20-11 自动生成的。
函数 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.
函数 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.
函数 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.
异步函数 EthIf_SwitchPortGroupRequestMode 请求交换机端口组的运行模式([SWS_EthIf_91102])。该调用被指定为不可重入,并传入端口组的索引(PortGroupIdx)以及所需的目标模式(PortMode)。可用模式包括用于停用的 ETH_MODE_DOWN、用于激活的 ETH_MODE_ACTIVE 以及用于带网络唤醒激活的 ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST([SWS_EthIf_91102])。成功启动时,函数返回 E_OK,否则返回 E_NOT_OK([SWS_EthIf_91102])。
原则上,EthIf 通过对所有引用的端口调用 EthSwt_SetSwitchPortMode 将请求转发给下层交换机([SWS_EthIf_91102])。在此过程中,不同模式适用特定的行为规则:
- 停用(
ETH_MODE_DOWN):若端口当前处于状态ETH_MODE_ACTIVE,且已为引用这些端口的所有组请求了ETH_MODE_DOWN,则EthIf启动一个延迟时间为EthIfSwitchOffPortTimedelay的定时器([SWS_EthIf_00270])。 - 激活(
ETH_MODE_ACTIVE或ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST):针对相应端口组的端口正在运行的关闭延迟定时器将被立即中止([SWS_EthIf_00483])。 - 唤醒请求(
ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST):无论当前端口模式如何,该调用都必须严格按照固定顺序转发给该组的所有端口:首先调用带有ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST的EthSwt_SetSwitchPortMode,若当前链路状态为ETHTRCV_LINK_STATE_DOWN,紧接着调用带有ETHTRCV_LINK_STATE_ACTIVE的EthSwt_PortLinkStateRequest([SWS_EthIf_00482])。
该服务未列出特定的 DET 或 DEM 错误消息;模式更改失败将直接通过返回值 E_NOT_OK 指示([SWS_EthIf_91102])。
此使用说明基于 AUTOSAR 规范 R20-11 自动生成。
实现者指南即将推出(复杂度 I2)
函数 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
函数 EthIf_StartAllPorts 用于请求将所有已配置且受影响的以太网交换机端口置于状态 ETH_MODE_ACTIVE([SWS_EthIf_91103])。调用无参数,具有异步语义,并被指定为可重入([SWS_EthIf_91103])。作为返回值,E_OK 指示接受请求,而 E_NOT_OK 指示拒绝([SWS_EthIf_91103])。
在调用 EthIf_StartAllPorts 之后,EthIf 按照严格定义的顺序将控制命令转发给以太网交换机的所有受影响端口(EthSwtPorts)([SWS_EthIf_00275]):
- 若当前模式为
ETH_MODE_DOWN,首先调用带有ETH_MODE_ACTIVE的EthSwt_SetSwitchPortMode([SWS_EthIf_00275])。 - 随后,若当前链路状态为
ETHTRCV_LINK_STATE_DOWN,则调用带有ETHTRCV_LINK_STATE_ACTIVE的EthSwt_PortLinkStateRequest,并为所有这些端口启动一个时间跨度为EthIfPortStartupActiveTime的定时器([SWS_EthIf_00275])。
如果通过这种方式激活的端口未在时间跨度 EthIfPortStartupActiveTime 内被以 ETH_MODE_ACTIVE 正常请求,EthIf 将自动再次停用该端口([SWS_EthIf_00276])。停用强制以相反顺序进行:
- 首先调用带有
ETHTRCV_LINK_STATE_DOWN的EthSwt_PortLinkStateRequest([SWS_EthIf_00276])。 - 随后调用带有
ETH_MODE_DOWN的EthSwt_SetSwitchPortMode([SWS_EthIf_00276])。
本使用说明基于 AUTOSAR Classic Platform R20-11 规范。
实现者指南即将推出(复杂度 I1)
函数 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.
函数 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.
函数 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.
函数 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.
函数 EthIf_SwitchEnableTimeStamping([SWS_EthIf_91007])激活交换机级别特定消息对象的出口时间戳(Egress-Time-Stamping)采集。关联的传输对象通过控制器索引 CtrlIdx 以及缓冲区索引 BufIdx 进行寻址。
调用与参数
调用同步进行([SWS_EthIf_91007])。作为输入参数,该函数期望 EthIf 上下文内的控制器索引 CtrlIdx,以及应用程序期望时间戳记录的消息缓冲区的 BufIdx。通过类型为 EthSwt_MgmtInfoType* 的输出参数 MgmtInfo 提供关联的管理信息([SWS_EthIf_91007])。
返回值与行为
该函数通过类型为 Std_ReturnType 的返回值提示结果([SWS_EthIf_91007]):
E_OK:已成功激活出口时间戳([SWS_EthIf_91007])。E_NOT_OK:时间戳激活失败([SWS_EthIf_91007])。
限制与并发性
该接口被指定为不可重入(Non Reentrant)([SWS_EthIf_91007])。因此,调用者必须确保阻止并行调用。声明通过头文件 EthIf.h 提供([SWS_EthIf_91007])。
此使用说明基于 AUTOSAR R20-11 自动生成。
实现者指南即将推出(复杂度 I1)
函数 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.
同步接口函数 EthIf_VerifyConfig 用于检查交换机配置,并将调用直接转发给 EthSwt_VerifyConfig [SWS_EthIf_91012]。实际的验证由 Ethernet 交换机驱动程序根据各硬件架构、硬件功能和预期的检查精度执行 [SWS_EthIf_91012]。
用法与参数
该函数可通过头文件 EthIf.h 使用,其 Service-ID 为 0x40,并需要两个参数 [SWS_EthIf_91012]:
SwitchIdx(in):Ethernet 交换机驱动程序上下文中交换机的索引。Result(out):指向用于接收验证结果的布尔值的指针。TRUE表示成功检查的配置,而FALSE则指示检测到损坏。
作为返回值,Std_ReturnType 报告执行状态:E_OK 表示验证已成功完成,而 E_NOT_OK 指示配置检查失败 [SWS_EthIf_91012]。
并发与错误处理
该函数被指定为不可重入(Non Reentrant)[SWS_EthIf_91012]。因此,调用方必须确保不发生竞争调用。由于 Payload 未列出 DET 或 DEM 的具体错误代码,因此详细的参数检查(例如索引或指针的有效性验证)推测由驱动程序端或特定实现进行处理。 问题 Q-03b5f343e97bec7f (未决)
本使用说明自动生成,且完全基于来自 AUTOSAR R20-11 的规范数据。
函数 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.
同步函数 EthIf_SetForwardingMode 通过头文件 EthIf.h 提供,用于控制 Ethernet 交换机上的帧转发 [SWS_EthIf_91013]。它会验证当前交换机配置,并在检测到无效时执行交换机的重新配置 [SWS_EthIf_91013]。
参数与返回值
在调用时(Service-ID 0x41),传递以下输入参数 [SWS_EthIf_91013]:
SwitchIdx:Ethernet 交换机驱动程序上下文中相关交换机的索引 [SWS_EthIf_91013]。mode:用于激活(TRUE)或停用(FALSE)帧转发的布尔开关 [SWS_EthIf_91013]。
该函数提供以下返回值Std_ReturnType [SWS_EthIf_91013]:
E_OK:根据规范指示成功停止转发;Interpretation:这应该更通用地确认已成功采用所请求的转发模式 [SWS_EthIf_91013]。 问题 Q-f245de852fe854c0 (未决)E_NOT_OK:帧转发的切换或停止失败 [SWS_EthIf_91013]。
并发性与限制
该函数被指定为不可重入(Non Reentrant)[SWS_EthIf_91013]。因此,调用方必须确保对相同或并行的交换机上下文的调用按序进行,且不发生竞争调用。标准中未为此服务定义 DET 或 DEM 的特定错误代码。
此使用说明由系统自动生成,基于 AUTOSAR 规范。
实现者指南即将推出(复杂度 I1)
函数 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
函数 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
函数 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
函数 EthIf_ClearTrcvSignalQuality 用于同步清除特定收发器的 Ethernet 连接已保存的信号质量值 [SWS_EthIf_91059]。为此,调用方通过参数 TrcvIdx 传入 Ethernet Interface 上下文中的收发器索引,随后相应的测量值将被清除 [SWS_EthIf_00400]。
作为返回值,接口提供类型 Std_ReturnType:如果重置信号质量成功,则报告 E_OK;否则操作失败并返回 E_NOT_OK [SWS_EthIf_91059]。Interpretation:错误值 E_NOT_OK 可能归因于无效的索引参数或转发给下层驱动程序时的错误,因为有效载荷中未提及具体的错误代码或 DET 条目。 问题 Q-40d8f0c1fc7ba11e (未决)
在并发性方面,该服务对于不同的收发器索引实现为可重入,但对于相同的 TrcvIdx 明确为不可重入 [SWS_EthIf_91059]。因此,不得从并发上下文中同时针对相同收发器进行多次调用,且必须相应地加以保护。
在模块交互中,该调用专门清除通过 TrcvIdx 寻址的 EthIfTransceiver 的类型为 EthIf_SignalQualityResultType 的已存储信号质量值 [SWS_EthIf_00400]。该服务 ID 为 0x19 的同步接口声明通过头文件 EthIf.h 提供 [SWS_EthIf_91059]。
本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 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
使用
同步函数 EthIf_ClearSwitchPortSignalQuality 用于重置特定 Ethernet 交换机端口连接的已保存信号质量值 [SWS_EthIf_91060]。目标端口通过两个输入参数寻址:SwitchIdx(Ethernet 交换机索引)和 SwitchPortIdx(接口上下文内的端口索引)[SWS_EthIf_91060]。该函数可通过头文件 EthIf.h 获取 [SWS_EthIf_91060]。
交互与数据结构
根据 [SWS_EthIf_00404],该调用清除所寻址交换机端口内部保留的信号质量值,这些值符合类型 EthIf_SignalQualityResultType。这使得上层模块能够有针对性地丢弃历史测量值,并启动对连接质量的重新评估。
错误处理
操作的成功与否通过类型为 Std_ReturnType 的返回值指示:清除成功时,函数返回 E_OK;否则返回 E_NOT_OK [SWS_EthIf_91060]。有效载荷中未定义具体的 DET 或 DEM 错误代码。Interpretation:返回值 E_NOT_OK 可能会在传入无效索引或底层交换机驱动程序无法执行重置时出现。 问题 Q-fc42f5b3e5414f6a (未决)
并发性与限制
在重入性方面,EthIf_ClearSwitchPortSignalQuality 针对不同的交换机和交换机端口索引是可重入的 [SWS_EthIf_91060]。然而,针对相同的交换机端口(SwitchPortIdx),该函数被指定为不可重入 [SWS_EthIf_91060]。因此,调用方必须确保避免针对同一端口发生并发调用,或通过适当的同步机制进行保护。
本文字由 AI 生成,用作参考文档。
实现者指南即将推出(复杂度 I1)
函数 EthIf_SetPhyTestMode [SWS_EthIf_91016] 📄 PDF
Std_ReturnType EthIf_SetPhyTestMode (uint8 TrcvIdx, EthTrcv_PhyTestModeType Mode);
Activates a given test mode.
同步接口函数 EthIf_SetPhyTestMode 用于在 Ethernet 收发器上激活预设的测试模式 [SWS_EthIf_91016]。该服务在头文件 EthIf.h 中声明,并可通过十六进制 Service-ID 0x17 进行标识 [SWS_EthIf_91016]。
调用时,该函数需要传入两个输入参数 [SWS_EthIf_91016]:
TrcvIdx:确定 Ethernet Interface 上下文中目标收发器的数值索引 [SWS_EthIf_91016]。Mode:定义要激活的具体测试模式,类型为EthTrcv_PhyTestModeType[SWS_EthIf_91016]。
不存在输入和输出参数 [SWS_EthIf_91016]。作为返回值,该服务返回 Std_ReturnType 类型的状态 [SWS_EthIf_91016]。返回值 E_OK 确认测试模式激活请求已被成功接受 [SWS_EthIf_91016]。相反,值 E_NOT_OK 表示请求被拒绝且无法激活测试模式 [SWS_EthIf_91016]。
关于并发性,EthIf_SetPhyTestMode 被指定为针对不同收发器索引(TrcvIdx)可重入 [SWS_EthIf_91016]。对于相同的收发器索引,执行明确为不可重入 [SWS_EthIf_91016]。因此,调用方必须确保避免针对同一收发器实例发生竞争调用,而是按序协调进行。
本文本由 AI 基于规范生成。
实现者指南即将推出(复杂度 I1)
函数 EthIf_SetPhyLoopbackMode [SWS_EthIf_91018] 📄 PDF
Std_ReturnType EthIf_SetPhyLoopbackMode (uint8 TrcvIdx, EthTrcv_PhyLoopbackModeType Mode);
Activates a given loopback mode.
使用
同步函数 EthIf_SetPhyLoopbackMode 用于激活 Ethernet 收发器上的指定环回模式 [SWS_EthIf_91018]。声明可通过头文件 EthIf.h 获取 [SWS_EthIf_91018]。
在调用时,该函数需要两个输入参数:
TrcvIdx:Ethernet Interface 上下文中的收发器索引 [SWS_EthIf_91018]。Mode:要激活的环回模式,类型为EthTrcv_PhyLoopbackModeType[SWS_EthIf_91018]。
作为返回值,该函数提供一个类型为 Std_ReturnType 的状态:E_OK 表示请求已被接受,而 E_NOT_OK 则表明请求无法被接受 [SWS_EthIf_91018]。Interpretation:该函数可能会将调用同步转发给负责 TrcvIdx 的 Ethernet 收发器驱动程序。 问题 Q-c4736bbfd250cca0 (未决)
错误处理
规范摘录中未定义具体的错误代码(如 DET 消息或 DEM 事件)。如果接受请求失败,将通过返回值 E_NOT_OK 立即告知调用方 [SWS_EthIf_91018]。调用方在继续后续测试或诊断流程之前,必须检查该返回值。
并发性与限制
该函数针对不同的收发器索引是可重入的(TrcvIdx),但针对相同的收发器索引明确为不可重入 [SWS_EthIf_91018]。因此,调用方必须确保避免针对同一收发器实例发生并发调用,或通过适当的同步机制进行保护 [SWS_EthIf_91018]。
此文本由 AI 创建,并基于 AUTOSAR 规范。
实现者指南即将推出(复杂度 I1)
函数 EthIf_SetPhyTxMode [SWS_EthIf_91005] 📄 PDF
Std_ReturnType EthIf_SetPhyTxMode (uint8 TrcvIdx, EthTrcv_PhyTxModeType Mode);
Activates a given transmission mode. Tags: atp.Status=draft
同步接口函数 EthIf_SetPhyTxMode 用于为 Ethernet 收发器激活指定的传输模式 [SWS_EthIf_91005]。该函数在头文件 EthIf.h 中声明,服务 ID 为 0x13 [SWS_EthIf_91005]。
对于调用,该函数期望两个输入参数 [SWS_EthIf_91005]:
TrcvIdx:Ethernet 接口上下文中相应收发器的数字索引。Mode:类型为EthTrcv_PhyTxModeType的待具体激活的发送模式。
执行同步进行。作为返回值,该函数提供类型为 Std_ReturnType 的状态 [SWS_EthIf_91005]。值 E_OK 确认已成功接受请求,而 E_NOT_OK 发出无法接受请求的信号 [SWS_EthIf_91005]。规范数据中未列出特定错误码或向开发错误管理(DET)或诊断事件管理(DEM)发送的通知。
关于并发行为,EthIf_SetPhyTxMode 针对不同的收发器索引是可重入的(TrcvIdx)[SWS_EthIf_91005]。但是,如果针对相同的收发器索引发出调用,则该函数被定义为不可重入,并需要同步或顺序调用 [SWS_EthIf_91005]。
作为形式上的限制,需要注意的是,该接口元素在规范 AUTOSAR CP R20-11 中被标记为状态 draft [SWS_EthIf_91005]。
本使用提示由 AI 基于 AUTOSAR CP R20-11 规范创建。
实现者指南即将推出(复杂度 I1)
函数 EthIf_GetCableDiagnosticsResult [SWS_EthIf_91014] 📄 PDF
Std_ReturnType EthIf_GetCableDiagnosticsResult (uint8 TrcvIdx, EthTrcv_CableDiagResultType* ResultPtr);
Retrieves the cable diagnostics result of a given transceiver.
函数 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.
函数 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.
函数 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.
函数 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.
函数 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, ...).
函数 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.
函数 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.
函数 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).
函数 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.
同步且可重入的函数 EthIf_ProvideTxBuffer(服务 ID 0x09)授予对通过 CtrlIdx 指定的 Ethernet 控制器的发送缓冲区的访问权,并通过头文件 EthIf.h 可用 [SWS_EthIf_00067]。
为了请求缓冲区,调用者传递控制器索引(CtrlIdx)、Ethernet 帧类型(FrameType)以及用于 VLAN 标签的 3 位 PCP 字段的优先级(Priority)[SWS_EthIf_00067]。通过输入和输出参数 LenBytePtr,调用者以字节为单位指定所需的缓冲区大小,并取回实际提供的长度 [SWS_EthIf_00067]。成功分配后,该函数通过 BufPtr 提供指向缓冲区的指针,并通过 BufIdxPtr 提供用于后续请求的缓冲区资源索引 [SWS_EthIf_00067]。
缓冲区请求的结果通过返回类型 BufReq_ReturnType 报告 [SWS_EthIf_00067]:
BUFREQ_OK:已成功提供缓冲区 [SWS_EthIf_00067]。BUFREQ_E_BUSY:所有缓冲区资源当前均被占用 [SWS_EthIf_00067]。BUFREQ_E_OVFL:请求的缓冲区长度超过了可用大小 [SWS_EthIf_00067]。BUFREQ_E_NOT_OK:检测到开发错误 [SWS_EthIf_00067]。
本使用说明由 AI 基于 AUTOSAR CP R20-11 规范生成。
函数 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
同步函数 EthIf_Transmit 触发先前已提供并填充的发送缓冲区通过以太网接口进行传输 [SWS_EthIf_00075]。
用法与参数
通过 EthIf.h 中声明的接口进行调用,并带有以下传入参数 [SWS_EthIf_00075]:
CtrlIdx:模块上下文中以太网控制器的索引EthIf。BufIdx:待传输缓冲区资源的索引。FrameType:Ethernet 帧类型。TxConfirmation:控制发送确认的激活。LenByte:以字节为单位的数据长度。PhysAddrPtr:网络字节序的目标物理地址(MAC 地址)。
返回值和并发性
作为返回值,函数在成功触发传输时返回 E_OK,若传输失败则返回 E_NOT_OK [SWS_EthIf_00075]。对于使用不同缓冲区和控制器索引(BufIdx 和 CtrlIdx)的调用,该函数是可重入的 [SWS_EthIf_00075]。
本使用说明基于 AUTOSAR 规范 R20-11 自动生成。
实现者指南即将推出(复杂度 I1)
函数 EthIf_GetVersionInfo [SWS_EthIf_00082] 📄 PDF
void EthIf_GetVersionInfo (Std_VersionInfoType* VersionInfoPtr);
Returns the version information of this module
函数 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
函数 EthIf_GetTransceiverMode [SWS_EthIf_91108] 📄 PDF
Std_ReturnType EthIf_GetTransceiverMode (uint8 TrcvIdx, Eth_ModeType* TrcvModePtr);
Obtains the state of the indexed transceiver
函数 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
根据 [SWS_EthIf_91109],函数 EthIf_SwitchPortGetLinkState 用于查询特定交换机端口的当前链路状态。传入 Ethernet Switch Driver 上下文中的交换机索引 SwitchIdx 以及所寻址交换机上的端口索引 SwitchPortIdx。查询结果通过指针 LinkStatePtr 提供,其取值为 ETHTRCV_LINK_STATE_DOWN(端口断开)或 ETHTRCV_LINK_STATE_ACTIVE(端口连接)。规范将执行行为标示为同步或异步;这可能取决于底层的交换机驱动程序或硬件连接方式。 问题 Q-dde6f9e8f1b8ba52 (未决)
作为返回值,函数提供 Std_ReturnType([SWS_EthIf_91109])。查询成功时返回 E_OK。如果确定链路状态失败,或者在交换机处于状态 ETHSWT_STATE_UNINIT 或 ETHSWT_STATE_INIT 时调用该函数,则返回 E_NOT_OK。
在并发性方面,该函数被指定为不可重入(Non Reentrant)([SWS_EthIf_91109]),因此必须排除在同一上下文中的并发调用。声明可通过带有服务 ID 0x4b 的头文件 EthIf.h 获取。
本文由 AI 生成;以所引用的 AUTOSAR 规范为准。
实现者指南即将推出(复杂度 I1)
函数 EthIf_TransceiverGetLinkState [SWS_EthIf_91110] 📄 PDF
Std_ReturnType EthIf_TransceiverGetLinkState (uint8 TrcvIdx, EthTrcv_LinkStateType* LinkStatePtr);
Obta ins the link state of the indexed transceiver
使用
根据 [SWS_EthIf_91110],同步函数 EthIf_TransceiverGetLinkState 用于查询通过 TrcvIdx 寻址的 Ethernet 收发器的当前链路状态(Link State)。接口声明通过头文件 EthIf.h 提供 [SWS_EthIf_91110]。
调用时会传递以下参数[SWS_EthIf_91110]:
TrcvIdx(输入):Ethernet Transceiver Driver 上下文中的收发器索引。LinkStatePtr(输出):指向用于存储所获取状态(类型为EthTrcv_LinkStateType)的存储位置的指针。可能的结果值为用于连接状态收发器的ETHTRCV_LINK_STATE_ACTIVE以及用于断开状态收发器的ETHTRCV_LINK_STATE_DOWN。
作为返回值,函数提供类型为 Std_ReturnType 的状态代码:E_OK 表示执行成功,而 E_NOT_OK 则表明收发器无法初始化 [SWS_EthIf_91110]。
错误处理与边界条件
如果查询失败,具有服务 ID 0x4c 的服务将提供返回值 E_NOT_OK [SWS_EthIf_91110]。函数规范中未列出具体的 DET 或 DEM 错误消息。
并发性
该函数被指定为不可重入(Non Reentrant)[SWS_EthIf_91110]。Interpretation:由于缺乏重入性,从多个线程或任务上下文并发调用应当是不允许的,必要时需要由调用方进行同步。 问题 Q-0459aa9b4c187439 (未决)
本使用说明基于规范 SWS_EthIf_91110 自动生成。
实现者指南即将推出(复杂度 I1)
函数 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
根据 [SWS_EthIf_91111],函数 EthIf_SwitchPortGetBaudRate 用于查询特定 Ethernet 交换机端口的当前传输速率。调用时会传入交换机索引(SwitchIdx)以及所寻址交换机上的端口索引(SwitchPortIdx)。查询结果通过类型为 EthTrcv_BaudRateType* 的指针 BaudRatePtr 提供,该指针可表示如 ETHTRCV_BAUD_RATE_10MBIT、ETHTRCV_BAUD_RATE_100MBIT、ETHTRCV_BAUD_RATE_1000MBIT 或 ETHTRCV_BAUD_RATE_2500MBIT 的速率 [SWS_EthIf_91111]。
在错误行为方面,成功获取波特率时函数返回 E_OK。返回值 E_NOT_OK 表示无法读取指定交换机端口的波特率,或者交换机驱动程序处于状态 ETHSWT_STATE_UNINIT 或 ETHSWT_STATE_INIT [SWS_EthIf_91111]。
规范将该函数标示为不可重入(Non Reentrant)以及同步/异步 [SWS_EthIf_91111]。同步或异步行为可能取决于底层 Ethernet 交换机驱动程序的连接和实现。 问题 Q-1f4d760ff944df9d (未决)由于缺乏重入性,调用方必须确保避免并行调用该接口。
本使用说明自动生成,基于 AUTOSAR 规范 R20-11。
实现者指南即将推出(复杂度 I1)
函数 EthIf_TransceiverGetBaudRate [SWS_EthIf_91112] 📄 PDF
Std_ReturnType EthIf_TransceiverGetBaudRate (uint8 TrcvIdx, EthTrcv_BaudRateType* BaudRatePtr);
Obtains the baud rate of the indexed transceiver
具有服务 ID 0x4e 的同步函数 EthIf_TransceiverGetBaudRate 用于读取带索引的 Ethernet 收发器的当前传输速率 [SWS_EthIf_91112]。它是模块 EthIf 的组成部分,并通过头文件 EthIf.h 提供 [SWS_EthIf_91112]。
类型为 uint8 的输入参数 TrcvIdx 用于在 Ethernet 收发器驱动程序的上下文中标识收发器 [SWS_EthIf_91112]。不存在输入输出参数 [SWS_EthIf_91112]。查询结果通过输出参数 BaudRatePtr 返回 [SWS_EthIf_91112]。类型 Eth_Trcv_BaudRateType 的有效值为 ETHTRCV_BAUD_RATE_10MBIT(10 MBit/s)、ETHTRCV_BAUD_RATE_100MBIT(100 MBit/s)、ETHTRCV_BAUD_RATE_1000MBIT(1000 MBit/s)以及 ETHTRCV_BAUD_RATE_2500MBIT(2500 MBit/s)[SWS_EthIf_91112]。
该函数返回一个类型为 Std_ReturnType 的状态:调用成功时传递 E_OK [SWS_EthIf_91112]。如果收发器无法初始化,则服务失败并报告 E_NOT_OK [SWS_EthIf_91112]。
在调用上下文和并发性方面,EthIf_TransceiverGetBaudRate 被定义为同步且不可重入(Non Reentrant)的接口 [SWS_EthIf_91112]。调用层必须确保避免针对此服务的竞争性调用,或在调用方级别进行串行化 [SWS_EthIf_91112]。
此文本由 AI 基于 AUTOSAR CP R20-11 规范生成。
实现者指南即将推出(复杂度 I1)
函数 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
函数 EthIf_SwitchPortGetDuplexMode 用于查询 Ethernet 交换机上带索引端口的当前双工模式 [SWS_EthIf_91113]。它将调用转发给通过 SwitchIdx 分配的 Ethernet 交换机驱动程序的函数 EthSwt_GetDuplexMode [SWS_EthIf_00428]。
参数与接口
SwitchIdx:驱动程序上下文中的 Ethernet 交换机索引 [SWS_EthIf_91113]。SwitchPortIdx:所寻址交换机上相关端口的索引 [SWS_EthIf_91113]。DuplexModePtr:类型为EthTrcv_DuplexModeType*的输出指针,用于接收所确定的模式,即ETHTRCV_DUPLEX_MODE_HALF(半双工)或ETHTRCV_DUPLEXMODE_FULL(全双工)[SWS_EthIf_91113]。
执行与错误处理
返回值 E_OK 表示查询成功 [SWS_EthIf_91113]。如果无法确定端口的双工模式,或者驱动程序处于状态 ETHSWT_STATE_UNINIT 或 ETHSWT_STATE_INIT,则函数返回 E_NOT_OK [SWS_EthIf_91113]。
该接口不可重入(Non Reentrant),并在规范中被声明为同步/异步 [SWS_EthIf_91113]。Interpretation:实际的同步或异步工作方式可能取决于所连接交换机驱动程序的特性。 问题 Q-339413722431978f (未决)
本使用说明基于规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 EthIf_TransceiverGetDuplexMode [SWS_EthIf_91114] 📄 PDF
Std_ReturnType EthIf_TransceiverGetDuplexMode (uint8 TrcvIdx, EthTrcv_DuplexModeType* DuplexModePtr);
Obtains the duplex mode of the indexed tra nsceiver
根据 [SWS_EthIf_91114],同步函数 EthIf_TransceiverGetDuplexMode 确定带索引的 Ethernet 收发器的当前双工模式。
用法与参数
调用以同步方式进行,并被指定为不可重入(Non Reentrant)[SWS_EthIf_91114]:
TrcvIdx:作为输入参数传入 Ethernet 收发器驱动程序上下文中的收发器索引 [SWS_EthIf_91114]。DuplexModePtr:用作指向类型EthTrcv_DuplexModeType的输出指针,以接收结果。可能的值为ETHTRCV_DUPLEX_MODE_HALF(半双工)或ETHTRCV_DUPLEX_MODE_FULL(全双工)[SWS_EthIf_91114]。
返回值与错误处理
作为返回值,函数提供一个 Std_ReturnType [SWS_EthIf_91114]:
E_OK:双工模式已成功查询,并通过DuplexModePtr提供 [SWS_EthIf_91114]。E_NOT_OK:确定失败,根据规范,例如当收发器无法初始化时 [SWS_EthIf_91114]。
限制与并发性
由于接口不可重入,在没有外部同步的情况下,不得针对相同或不同的收发器实例进行并行调用。声明可通过头文件 EthIf.h 获取 [SWS_EthIf_91114]。
本使用说明基于 AUTOSAR R20-11 规范数据自动创建。
实现者指南即将推出(复杂度 I1)
函数 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.
同步函数 EthIf_SwitchPortGetCounterValues 用于根据 [SWS_EthIf_91115] 读取特定 Ethernet 交换机端口的计数器值(Drop Counter)。通过头文件 EthIf.h 提供,该函数接收交换机索引 SwitchIdx 以及端口索引 SwitchPortIdx,并通过指针 CounterPtr 写回计数器值([SWS_EthIf_91115])。
工作原理和转发
根据 [SWS_EthIf_00432],EthIf_SwitchPortGetCounterValues 将请求直接转发给各 Ethernet 交换机驱动程序的函数 EthSwt_GetCounterValues。返回的计数器值参考 IETF RFC 1757、RFC 1643 和 RFC 2233 标准,其中精确的语义分配给结构 Eth_CounterType([SWS_EthIf_91115])。
返回值与错误处理
作为返回值,函数返回 Std_ReturnType([SWS_EthIf_91115]):
E_OK:读取计数器值成功([SWS_EthIf_91115])。E_NOT_OK:读取计数器值时发生错误([SWS_EthIf_91115])。
并发性与限制
该函数被指定为不可重入(Non Reentrant)([SWS_EthIf_91115])。因此,必须在调用者层面对并发调用进行同步。解释:调用者可能还负责为 CounterPtr 提供有效且足够大的存储区域,因为规范中未提及内部缓冲区分配。 问题 Q-140661eaa9693cce (未决)
本使用说明是基于 AUTOSAR 规范 R20-11 自动生成的。
实现者指南即将推出(复杂度 I1)
函数 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.
用法与语义
函数 EthIf_SwitchPortGetRxStats([SWS_EthIf_91116])用于查询 Ethernet 交换机端口的接收统计计数器。它可通过头文件 EthIf.h 获取,并由服务 ID 0x52 标识([SWS_EthIf_91116])。
调用需要以下参数([SWS_EthIf_91116]):
SwitchIdx:Ethernet交换机驱动程序上下文中的Ethernet交换机索引。SwitchPortIdx:所寻址交换机上的端口索引。RxStatsPtr:指向类型为Eth_RxStatsType的结构的指针,计数器值将写入该结构中。这些值大部分派生自 IETF RFC 2819(远程网络监控管理信息库,Remote Network Monitoring Management Information Base)。
返回值与错误处理
该函数提供一个 Std_ReturnType([SWS_EthIf_91116])作为结果:
E_OK:统计数据已成功读取。E_NOT_OK:无法获取计数器值([SWS_EthIf_91116])。针对此调用未指定具体的 DET 或 DEM 错误消息。
并发性与限制
该函数被归类为不可重入(Non Reentrant)([SWS_EthIf_91116])。由于同步性被标示为“Synchronous /Asynchronous”,实际的阻塞行为可能取决于底层 Ethernet 交换机驱动程序的实现([SWS_EthIf_91116])。 问题 Q-d1e839075bf42e7f (未决)调用方必须避免对同一接口进行并行访问。
本文由 AI 基于 AUTOSAR R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 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.
函数 EthIf_SwitchPortGetTxStats 用于根据 IETF RFC1213 读取 Ethernet 交换机特定端口的传输统计信息 [SWS_EthIf_91117]。它可通过具有服务 ID 0x53 的头文件 EthIf.h 获取 [SWS_EthIf_91117]。
用法与参数
调用时,交换机索引(SwitchIdx)和所寻址交换机上的端口索引(SwitchPortIdx)作为输入参数传入 [SWS_EthIf_91117]。所获取的计数器读数通过类型为 Eth_TxStatsType* 的指针 TxStatsPtr 提供 [SWS_EthIf_91117]。如果计数器不可用或不受支持,则该计数器的最大可能值表示无效值 [SWS_EthIf_91117]。
返回值与错误处理
该函数返回类型为 Std_ReturnType 的状态 [SWS_EthIf_91117]:
E_OK:已成功获取传输统计信息 [SWS_EthIf_91117]。E_NOT_OK:无法获取传输统计信息 [SWS_EthIf_91117]。
源文献中未指明具体的错误代码或发往 DET 或 DEM 的消息,因此错误情况必须主要通过返回值 E_NOT_OK 进行捕获 [SWS_EthIf_91117]。
并发性与限制
根据规范,EthIf_SwitchPortGetTxStats 被定义为异步(Asynchronous)且不可重入(Non Reentrant)[SWS_EthIf_91117]。由于缺乏重入性,在没有上层同步的情况下不得进行并发调用 [SWS_EthIf_91117]。由于该服务被声明为异步,所传入的缓冲区 TxStatsPtr 可能必须保持有效直至操作完全完成(Interpretation:异步查询时的缓冲区稳定性)[SWS_EthIf_91117]。 问题 Q-8a14618d6990206b (未决)
此使用说明基于规范 SWS_EthIf_91117 自动生成。
实现者指南即将推出(复杂度 I1)
函数 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.
通过 EthIf.h 提供的同步函数 EthIf_SwitchPortGetTxErrorCounterValues(服务 ID 0x54)读取 Ethernet 交换机某一端口的传输错误计数器列表 [SWS_EthIf_91118]。这些计数器符合 IETF RFC1213 以及 RFC1643 的定义,并通过输出参数 TxStatsPtr 中的类型 Eth_TxErrorCounterValuesType 提供 [SWS_EthIf_91118]。
调用时,SwitchIdx 寻址驱动程序上下文中的交换机,SwitchPortIdx 寻址交换机上的具体端口 [SWS_EthIf_91118]。该函数在成功确定值时返回 E_OK,如果无法获取传输统计信息,则返回 E_NOTOK [SWS_EthIf_91118]。达到最大可能值的计数器值明确表示无效或不可用的计数器 [SWS_EthIf_91118]。
作为执行限制规定,该函数不可重入(Non Reentrant)[SWS_EthIf_91118]。在体系结构联合中,EthIf_SwitchPortGetTxErrorCounterValues 将调用直接转发给相应 Ethernet 交换机驱动程序的函数 EthSwt_GetTxErrorCounterValues [SWS_EthIf_00438]。
此文本由 AI 基于规范要求生成。
函数 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
函数 EthIf_SwitchPortGetMacLearningMode 查询特定交换机端口当前的 MAC 学习模式([SWS_EthIf_91119])。可获取的模式包括启用硬件学习、禁用硬件学习以及启用软件学习([SWS_EthIf_91119])。此函数的可用性取决于硬件,因为相应的交换机硬件必须支持不同的学习模式([SWS_EthIf_91119])。
调用上下文与参数
该接口通过头文件 EthIf.h 提供,且服务 ID 为 0x55([SWS_EthIf_91119])。调用时须传递以下参数:
SwitchIdx(in):以太网交换机驱动上下文中交换机的索引([SWS_EthIf_91119])。SwitchPortIdx(in):寻址交换机上的端口索引([SWS_EthIf_91119])。MacLearningModePtr(out):指向类型为EthSwt_MacLearningType的存储位置的指针,所获取的模式将存放在该位置([SWS_EthIf_91119])。
同步、并发与返回值
执行被指定为同步/异步,且为不可重入(Non Reentrant)([SWS_EthIf_91119])。返回值使用 Std_ReturnType,具有以下状态:
E_OK:查询成功执行([SWS_EthIf_91119])。E_NOT_OK:执行时出错([SWS_EthIf_91119])。虽然针对E_NOT_OK的规范描述字面上称“configuration could be persistently reset”,解释:这可能是规范中的文字复制错误,在常规上下文中仅表示查询失败。 问题 Q-7565d2fbd70e355d (未决)
本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 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.
函数 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
函数 EthIf_WritePortMirrorConfiguration [SWS_EthIf_91122] 📄 PDF
Std_ReturnType EthIf_WritePortMirrorConfiguration (uint8 MirroredSwitchIdx, const EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);
Service EthIf_WritePortMirrorConfiguration.
同步接口 EthIf_WritePortMirrorConfiguration 用于将端口镜像配置保存至以太网交换机驱动 [SWS_EthIf_91122] 内部的影子缓冲区中。
调用时传递以下输入参数 [SWS_EthIf_91122]:
MirroredSwitchIdx:以太网交换机驱动上下文中相关交换机的索引,待镜像的交换机端口位于该交换机上 [SWS_EthIf_91122]。PortMirrorConfigurationPtr:指向结构体EthSwt_PortMirrorCfgType配置数据的指针 [SWS_EthIf_91122]。
类型为 Std_ReturnType 的返回值指示执行状态 [SWS_EthIf_91122]:
E_OK:已成功为索引端口写入端口镜像配置 [SWS_EthIf_91122]。E_NOT_OK:无法写入配置,例如由于索引交换机不可用 [SWS_EthIf_91122]。ETHSWT_PORT_MIRRORING_CONFIGURATION_NOT_SUPPORTED:交换机硬件或以太网交换机驱动不支持端口镜像 [SWS_EthIf_91122]。
该函数被指定为不可重入(Non Reentrant),并通过头文件 EthIf.h 提供 [SWS_EthIf_91122]。解释:调用方可能必须通过上层机制协调并发访问,因为未指定内部同步保护机制。 问题 Q-c731aedd871251a4 (未决)
此文本由 AI 生成,且完全基于 SWS_EthIf_91122 的规范要求。
实现者指南即将推出(复杂度 I1)
函数 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.
用法与语义
函数 EthIf_ReadPortMirrorConfiguration 用于查询特定以太网交换机的端口镜像配置 [SWS_EthIf_91123]。它在头文件 EthIf.h 中声明,且服务 ID 为 0x59。执行行为被指定为异步(Asynchronous),其中直接调用返回类型为 Std_ReturnType 的状态值 [SWS_EthIf_91123]。
参数与返回值
MirroredSwitchIdx(in):以太网交换机驱动上下文中以太网交换机的索引,待镜像的交换机端口位于该交换机上 [SWS_EthIf_91123]。PortMirrorConfigurationPtr(out):指向用于存放所读取配置的存储区域的指针 [SWS_EthIf_91123]。- 返回值:
E_OK指示配置读取成功。出错时返回E_NOT_OK,例如当索引以太网交换机不可用时 [SWS_EthIf_91123]。
协同交互与并发性
为了执行,EthIf_ReadPortMirrorConfiguration 将调用直接转发至相应以太网交换机驱动的函数 EthSwt_ReadPortMirrorConfiguration [SWS_EthIf_00448]。该函数被定义为不可重入(Non Reentrant)[SWS_EthIf_91123];因此调用方必须避免对同一接口进行并行调用。
本使用说明基于 AUTOSAR Classic Platform R20-11 规范。
实现者指南即将推出(复杂度 I1)
函数 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.
同步函数 EthIf_DeletePortMirrorConfiguration 用于删除特定交换机([SWS_EthIf_91124])已保存的端口镜像配置。调用方通过参数 Mirrored Switch Idx 传递该交换机在 Ethernet Switch Driver([SWS_EthIf_91124])上下文中的索引。该接口具有服务 ID 0x5a,并通过头文件 EthIf.h 提供([SWS_EthIf_91124])。
类型为 Std_ReturnType 的返回值告知清除结果([SWS_EthIf_91124]):
E_OK:端口镜像配置已成功清除([SWS_EthIf_91124])。如果未找到指定交换机索引的已保存配置,根据定义该函数同样返回E_OK([SWS_EthIf_91124])。E_NOT_OK:清除配置失败([SWS_EthIf_91124])。例如,在调用时端口镜像仍处于激活状态时即为该情况([SWS_EthIf_91124])。
关于并发性,该函数对于不同的交换机索引是可重入的(Mirrored Switch Idx),但在针对同一索引进行多次调用时是不可重入的([SWS_EthIf_91124])。由于活动的镜像被明确列为 E_NOT_OK 的错误原因,因此在清除配置之前可能需要停用端口镜像([SWS_EthIf_91124])。 问题 Q-b9e5665de687dbba (未决)
本使用说明是基于 AUTOSAR R20-11 的规范自动生成的。
实现者指南即将推出(复杂度 I1)
函数 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
函数 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.
同步函数 EthIf_SetPortMirrorState 用于为指定的以太网交换机设置所需的端口镜像配置状态([SWS_EthIf_91126])。它可通过头文件 EthIf.h 使用([SWS_EthIf_91126])。
调用时该函数需要三个参数([SWS_EthIf_91126]):
MirroredSwitchIdx:Ethernet Switch Driver上下文中的Ethernet交换机索引,要激活或停用的端口镜像配置位于该交换机上。PortIdx:所寻址Ethernet交换机上的端口索引。PortMirrorState:要请求的端口镜像状态,为PORT_MIRRORING_ENABLED或PORT_MIRRORING_DISABLED。
类型为 Std_ReturnType 的返回值指示请求的结果([SWS_EthIf_91126]):
E_OK:已成功为指定交换机端口设置所请求的状态。E_NOT_OK:设置失败,例如当寻址的交换机不可用或不存在端口镜像配置时。
执行是同步进行的,并被指定为不可重入(Non Reentrant)([SWS_EthIf_91126])。在分层结构中,Ethernet Interface 负责转发:根据 [SWS_EthIf_00454],EthIf_SetPortMirrorState 将调用直接转发给负责的 Ethernet Switch Driver 的函数 EthSwt_SetPortMirrorState。
本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 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.
函数 EthIf_SetPortTestMode 用于激活以太网交换机索引端口上的预定测试模式 [SWS_EthIf_91127]。该同步服务通过头文件 EthIf.h 提供,服务 ID 为 0x5d [SWS_EthIf_91127]。
参数与返回值
为了配置测试模式,该接口需要三个输入参数,同时不存在输入/输出参数或纯输出参数 [SWS_EthIf_91127]:
SwitchIdx(uint8):相应以太网交换机驱动上下文中交换机的索引 [SWS_EthIf_91127]。PortIdx(uint8):寻址以太网交换机上的端口索引 [SWS_EthIf_91127]。Mode(EthTrcv_PhyTestModeType):要在该交换机端口上激活的测试模式 [SWS_EthIf_91127]。
类型为 Std_ReturnType 的返回值指示操作成功与否 [SWS_EthIf_91127]:
E_OK:已成功为索引以太网交换机端口设置端口测试模式 [SWS_EthIf_91127]。E_NOT_OK:设置端口测试模式不成功,例如当寻址的以太网交换机端口不可用时 [SWS_EthIf_91127]。
并发性与交互
该函数被指定为不可重入(Non Reentrant)并以同步方式工作 [SWS_EthIf_91127]。调用时,EthIf_SetPortTestMode 将请求直接转发给相应以太网交换机驱动的下层函数 EthSwt_SetPortTestMode [SWS_EthIf_00456]。
本使用说明是基于 AUTOSAR R20-11 的规范自动生成的。
实现者指南即将推出(复杂度 I1)
函数 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.
使用
函数 EthIf_SetPortLoopbackMode 用于为以太网交换机的索引端口激活预定的测试环回模式 [SWS_EthIf_91128]。声明通过头文件 EthIf.h 提供 [SWS_EthIf_91128]。调用时须传递以下输入参数:
SwitchIdx:Ethernet交换机驱动程序上下文内的Ethernet交换机索引[SWS_EthIf_91128]。PortIdx:此前寻址的交换机上相关端口的索引 [SWS_EthIf_91128]。Mode:要激活的类型为EthTrcv_PhyLoopbackModeType的环回模式 [SWS_EthIf_91128]。
交互与转发
该函数不会在硬件层面上独立执行配置。相反,EthIf_SetPortLoopbackMode 将调用直接转发给关联以太网交换机驱动的函数 EthSwt_SetPortLoopbackMode [SWS_EthIf_00458]。
错误处理与返回值
返回值类型为 Std_ReturnType [SWS_EthIf_91128]:
E_OK:已成功为以太网交换机的索引端口激活环回模式 [SWS_EthIf_91128]。E_NOT_OK:激活失败,例如当索引以太网交换机端口不可用时 [SWS_EthIf_91128]。
规范中未针对此服务列出具体的 DET 或 DEM 错误代码。
并发性与限制
执行完全同步进行,且该函数被指定为不可重入(Non Reentrant)[SWS_EthIf_91128]。调用方必须防止并行调用。解释:由于涉及测试模式的切换,因此调用通常在任务层面的初始化、测试或诊断序列中进行。 问题 Q-cb4575c4a1d9c48b (未决)
本文本由 AI 基于规范生成。
实现者指南即将推出(复杂度 I1)
函数 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.
同步函数 EthIf_SetPortTxMode 为索引以太网交换机端口激活预定的传输模式 [SWS_EthIf_91129]。它可通过头文件 EthIf.h 使用,且服务 ID 为 0x5f [SWS_EthIf_91129]。
使用
调用通过两个索引寻址目标端口并传递所需模式 [SWS_EthIf_91129]:
SwitchIdx:以太网交换机驱动上下文中交换机的索引。PortIdx:所寻址交换机上的端口索引。Mode:类型为EthTrcv_PhyTxModeType的待激活传输模式。
该函数提供以下返回值Std_ReturnType [SWS_EthIf_91129]:
E_OK:已成功为索引交换机端口激活传输模式。E_NOT_OK:激活失败,例如当索引交换机端口不可用时。
并发性与限制
该接口被指定为不可重入(Non Reentrant)[SWS_EthIf_91129]。因此,调用实体必须确保不会发生并发调用。函数定义中未列出特定的 DET 或 DEM 错误消息;根据规范,错误行为仅限于返回 E_NOT_OK [SWS_EthIf_91129]。
此使用说明由 AI 基于 AUTOSAR Classic Release R20-11 的规范生成。
实现者指南即将推出(复杂度 I1)
函数 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.
函数 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.
使用
异步接口 EthIf_RunPortCableDiagnostic 触发以太网交换机选定端口的电缆诊断 [SWS_EthIf_91131]。调用时传递参数 SwitchIdx(以太网交换机驱动上下文中交换机的索引)和 PortIdx(交换机上寻址端口的索引)。一旦电缆诊断触发被接受,函数即返回 E_OK;若触发被拒绝,则返回 E_NOT_OK [SWS_EthIf_91131]。
交互与前置条件
在执行 EthIf_RunPortCableDiagnostic 时,EthIf 有义务确保相应的 EthIfController 处于运行状态 ETH_MODE_ACTIVE [SWS_EthIf_00464]。在此条件下,Ethernet Interface 将调用转发给关联交换机驱动程序的函数 EthSwt_RunPortCableDiagnostic [SWS_EthIf_00464]。
并发性与限制
对于 SwitchIdx 和 PortIdx 相互不同的值,该函数是可重入的 [SWS_EthIf_91131]。然而,对于相同的交换机和端口索引对,调用被指定为不可重入,因此必须避免在同一端口上并行执行。
本使用说明基于 AUTOSAR 规范 R20-11 自动生成。
实现者指南即将推出(复杂度 I1)
函数 EthIf_RunCableDiagnostic [SWS_EthIf_91132] 📄 PDF
Std_ReturnType EthIf_RunCableDiagnostic (uint8 TrcvIdx);
Trigger the cable diagnostics for the given Ethernet transceiver.
使用
函数 EthIf_RunCableDiagnostic 触发指定以太网收发器的电缆诊断 [SWS_EthIf_91132]。它通过头文件 EthIf.h 提供,并在服务 ID 0x62 下管理 [SWS_EthIf_91132]。传递参数为 TrcvIdx,其映射了以太网收发器驱动上下文中目标收发器的索引 [SWS_EthIf_91132]。
执行以异步方式进行 [SWS_EthIf_91132]。类型为 Std_ReturnType 的返回值指示触发是否被接受:
E_OK:用于电缆诊断的触发已成功接受 [SWS_EthIf_91132]。E_NOT_OK:触发未被接受 [SWS_EthIf_91132]。
错误处理
如果电缆诊断被拒绝,函数将立即返回 E_NOT_OK [SWS_EthIf_91132]。本规范中未为此函数定义具体的开发或生产错误(DET/DEM)。
并发性与限制
在并发性方面,EthIf_RunCableDiagnostic 对于具有不同索引的调用是可重入的(TrcvIdx),但对于同一收发器索引则是不可重入的 [SWS_EthIf_91132]。调用方必须防止在同一收发器上同时发生诊断请求。解释:由于该函数完全以异步方式工作且不返回结果数据,因此诊断结果的提供可能通过单独的机制进行。 问题 Q-c65c009cd2e00dea (未决)
此文本由 AI 基于规范 SWS_EthIf_91132 生成。
实现者指南即将推出(复杂度 I1)
函数 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
接口函数 EthIf_SwitchGetCfgDataRaw 用于读取索引以太网交换机变长的配置或内存数据 [SWS_EthIf_91133]。在分层模型中,该模块不独立处理调用,而是将其直接转发给主管以太网交换机驱动的函数 EthSwt_GetCfgDataRaw [SWS_EthIf_00468]。该函数在头文件 EthIf.h 中声明,且服务 ID 为 0x63 [SWS_EthIf_91133]。
调用与参数
调用以异步方式进行,且仅启动读取操作 [SWS_EthIf_91133]。该函数所需的参数包括:
SwitchIdx:以太网交换机驱动上下文中以太网交换机的索引 [SWS_EthIf_91133],Offset:以太网交换机内存中读取过程开始的起始偏移量 [SWS_EthIf_91133],Length:要读取和复制的数据字节数 [SWS_EthIf_91133],BufferPtr:指向目标存储位置的指针,数据将被复制到该位置 [SWS_EthIf_91133]。
当成功触发读取过程时,该函数返回 E_OK 作为返回值 [SWS_EthIf_91133]。如果无法触发该过程——例如当寻址的交换机不可用时——将报告 E_NOT_OK [SWS_EthIf_91133]。
并发性
该函数被定义为不可重入(Non Reentrant)[SWS_EthIf_91133]。因此,调用方必须确保按顺序进行调用。解释:由于异步特性,在从 E_OK 返回时,缓冲区内容可能尚未最终填满,而是由驱动延迟提供。 问题 Q-0abda93fb8830dd4 (未决)
此使用说明基于 AUTOSAR CP R20-11 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 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.
函数 EthIf_SwitchGetCfgDataInfo 获取索引以太网交换机配置数据的总大小以及配置寄存器的起始地址 [SWS_EthIf_91134]。该接口在头文件 EthIf.h 中声明,并在服务 ID 0x64 下管理 [SWS_EthIf_91134]。
该函数接收以下参数 [SWS_EthIf_91134]:
SwitchIdx(in):以太网交换机驱动上下文中以太网交换机的索引。DataSizePtr(out):指向用于复制配置数据总大小的存储位置的指针。DataAdressPtr(out):指向用于复制配置寄存器起始地址的存储位置的指针。
作为返回值,如果成功获取数据,该函数返回 E_OK;如果操作失败(例如由于索引的交换机不可用),则返回 E_NOT_OK [SWS_EthIf_91134]。在当前规范范围内,未针对该服务定义特定的 DET 或 DEM 错误代码。
关于调用上下文,该函数被规范为可重入的,且形式上为异步的 [SWS_EthIf_91134]。由于未规范回调机制,返回 E_OK 时数据的提供应当是立即可用的(Interpretation:异步分类推测表明存在内部驱动访问)。 问题 Q-bf49882a16548ea4 (未决)
本段文本由人工智能生成,并基于 AUTOSAR 标准的规范。
实现者指南即将推出(复杂度 I1)
函数 EthIf_SwitchPortGetMaxFIFOBufferFillLevel [SWS_EthIf_91135] 📄 PDF
Std_ReturnType EthIf_SwitchPortGetMaxFIFOBufferFillLevel (uint8 SwitchPortIdx, uint8 PortIdx, uint8 SwitchPortEgressFifoIdx, uint32* SwitchPortEgressFifoBufferLevelPtr);
Service EthIf_SwitchPortGetMaxFIFOBufferFillLevel.
使用与调用
函数 EthIf_SwitchPortGetMaxFIFOBufferFillLevel 用于确定以太网交换机特定出口端口自上次读访问以来分配的最大 FIFO 缓冲区内存(以字节为单位)[SWS_EthIf_91135]。例如,调用可由复杂设备驱动程序(CDD)发起 [SWS_EthIf_91135]。为了进行寻址,会传递交换机索引(SwitchPortIdx)、端口索引(PortIdx)和 FIFO 索引(SwitchPortEgressFifoIdx)。确定的填充级别将写入 SwitchPortEgressFifoBufferLevelPtr 所指向的存储区 [SWS_EthIf_91135]。
并发性与执行
该函数具有异步执行语义 [SWS_EthIf_91135]。它针对不同的交换机和端口索引是可重入的,但对于相同的 SwitchPortIdx 和 PortIdx 组合不得并发调用 [SWS_EthIf_91135]。由于具有异步语义且同时传递指针,被引用的结果存储区在操作完成之前应当必须保持有效。 问题 Q-c941ffec278a86cd (未决)
错误处理与驱动交互
成功获取时,函数返回 E_OK,否则返回 E_NOT_OK [SWS_EthIf_91135]。如果交换机硬件不支持基于端口确定最大 FIFO 缓冲区填充级别,则目标地址 SwitchPortEgressFifoBufferLevelPtr 处的值将被设置为 0xFFFFFFFF [SWS_EthIf_91135]。该模块将调用转发至关联以太网交换机驱动的驱动函数 EthSwt_GetMaxFIFOBufferFillLevel 以便进一步执行 [SWS_EthIf_00472]。
本文本由 AI 基于规范生成。
函数 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
用法与语义
函数 EthIf_TransceiverGetMacMethod(服务 ID 0x66)用于同步查询 Ethernet 收发器所配置的介质访问控制方法 [SWS_EthIf_91021]。它可通过头文件 EthIf.h 获取,并使用以下接口参数:
TrcvIdx(in):Ethernet 收发器驱动程序上下文内的收发器索引 [SWS_EthIf_91021]。MacModePtr(out):指向用于存储所获取访问方法的存储位置的指针,类型为EthTrcv_MacMethodType[SWS_EthIf_91021]。有效的结果值为ETHTRCV_MAC_TYPE_CSMA_CD(带冲突检测的载波侦听多路访问,Carrier-Sense Multiple Access mit Collision Detection)和ETHTRCV_MAC_TYPE_PLCA(物理层冲突避免,Physical Layer Collision Avoidance)。
返回值与错误处理
作为返回值,该接口返回类型为 Std_ReturnType 的状态 [SWS_EthIf_91021]:
E_OK:已成功读取介质访问控制方法,并通过MacModePtr提供。E_NOT_OK:对收发器的请求未被接受 [SWS_EthIf_91021]。规范中未针对此服务列出具体的 DET 或 DEM 错误代码。
并发性与边界条件
执行以同步方式进行,但该函数被指定为不可重入(Non Reentrant)[SWS_EthIf_91021]。因此,调用方必须排除在同一驱动程序上下文内发生并发或中断性调用。此外需要注意的是,该服务在 Release R20-11 中的状态标示为 atp.Status=draft [SWS_EthIf_91021]。
本使用说明基于 EthIf_TransceiverGetMacMethod 的 AUTOSAR 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 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
用法与语义
同步函数 EthIf_RxIndication 处理通过索引指定的物理以太网控制器接收到的以太网帧 [SWS_EthIf_00085]。该服务没有返回值,并在以太网接口内部处理接收数据的转发 [SWS_EthIf_00085]。解释:一旦新的接收数据完整就绪,调用通常应由下层以太网驱动程序(Eth)发起。 问题 Q-c3d25d0b89e6cd7f (未决)
范围
为了进行进一步处理,该函数接收以下参数 [SWS_EthIf_00085]:
CtrlIdx:以太网接口上下文中物理以太网控制器的索引 [SWS_EthIf_00085]。FrameType:接收到的以太网帧的帧类型 [SWS_EthIf_00085]。IsBroadcast:指示是否为广播帧的标识 [SWS_EthIf_00085]。PhysAddrPtr:指向接收帧的源物理地址(网络字节序的 MAC 地址)的指针 [SWS_EthIf_00085]。DataPtr:指向接收帧有效负载(Payload)的指针 [SWS_EthIf_00085]。LenByte:接收帧中有效载荷的字节长度 [SWS_EthIf_00085]。
并发性与限制
该接口被声明为不可重入(Non Reentrant),并通过头文件 EthIf.h 在服务 ID 0x10 下提供 [SWS_EthIf_00085]。调用者必须确保不发生并发调用。对于该函数,规范范围内未指明特定的错误码、返回值或 DET/DEM 消息。
本段文本由系统自动生成。所有信息均完全基于当前 AUTOSAR 版本的规范数据。
函数 EthIf_TxConfirmation [SWS_EthIf_00091] 📄 PDF
void EthIf_TxConfirmation (uint8 CtrlIdx, Eth_BufIdxType BufIdx, Std_ReturnType Result);
Confirms frame transmission by the indexed controller
用法与调用上下文
同步函数 EthIf_TxConfirmation(服务 ID 0x11)确认由 CtrlIdx 引用的物理以太网控制器所进行的以太网帧传输 [SWS_EthIf_00091]。该函数没有返回值,可通过头文件 EthIf.h 获取 [SWS_EthIf_00091]。
输入参数定义如下 [SWS_EthIf_00091]:
CtrlIdx(uint8):以太网接口上下文中物理以太网控制器的索引。BufIdx(Eth_BufIdxType):已传输缓冲区的索引。Result(Std_ReturnType):传输结果;E_OK表示发送过程成功,E_NOT_OK表示传输错误。
与上层模块的交互
根据 [SWS_EthIf_00255],EthIf_TxConfirmation 通过其回调 <UL>_TxConfirmation 将接收到的传输结果 Result 转发给已配置的上层。
并发性与限制
该函数被指定为不可重入(Non Reentrant)[SWS_EthIf_00091]。因此必须避免并行调用。规范摘录中未规定特定的 DET 或 DEM 错误消息;错误仅通过值为 E_NOT_OK 的参数 Result 进行传递 [SWS_EthIf_00091]。
本段文本由 AI 自动生成。
实现者指南即将推出(复杂度 I1)
函数 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.
根据 [SWS_EthIf_00231],一旦以太网控制器的运行模式被成功读取,通知函数 EthIf_CtrlModeIndication 就会被调用。触发是在先前调用 Eth_SetControllerMode 之后异步发生的,其中调用可以直接在各触发函数内部进行。函数本身具有同步执行语义,且不返回任何值([SWS_EthIf_00231])。
通过参数传入以太网接口上下文中物理以太网控制器的索引(CtrlIdx)以及报告的控制器模式(CtrlMode)([SWS_EthIf_00231])。在并发性方面,[SWS_EthIf_00231] 规定该函数对于同一控制器索引是不可重入的,但对于不同索引可以可重入地执行。
关于与其他模块的交互,相关要求提到了后续操作,但在当前版本中这些操作已被归类为已废弃(obsolete):
- 根据 [SWS_EthIf_00267](OBSOLETE),在此函数的上下文中,若存在相应的控制引用,则原计划为交换机端口组的所有端口调用
EthSwt_SetSwitchPortMode,并在ETH_MODE_DOWN时解决与活动组的冲突。 - 根据 [SWS_EthIf_00413](OBSOLETE),在此函数的上下文中,若存在收发器引用,则原计划根据先前请求的是
ETH_MODE_ACTIVE还是ETH_MODE_DOWN,调用带有ETHTRCV_LINK_STATE_ACTIVE或ETHTRCV_LINK_STATE_DOWN的EthTrcv_TransceiverLinkStateRequest。
此文本由 AI 基于 AUTOSAR CP R20-11 规范生成。
实现者指南即将推出(复杂度 I1)
函数 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
用法与语义
函数 EthIf_TrcvModeIndication 用作 Ethernet 接口的通知接口,一旦读取到收发器的模式切换,就会调用该接口 [SWS_EthIf_00232]。它通过头文件 EthIf.h 可用,并具有服务 ID 0x0f [SWS_EthIf_00232]。
函数本身的执行被指定为同步,而当确定模式切换时,调用是异步进行的 [SWS_EthIf_00232]。如果该函数是由先前对 EthTrcv_SetTransceiverMode 的调用触发的,则允许直接在该触发函数内调用它 [SWS_EthIf_00232]。
参数与返回值
TrcvIdx:Ethernet 接口上下文中 Ethernet 收发器的索引(输入参数)[SWS_EthIf_00232]。TrcvMode:类型为Eth_ModeType的 Ethernet 收发器的已发信号运行模式(输入参数)[SWS_EthIf_00232]。- 返回值:无(
void)[SWS_EthIf_00232]。
并发性与可重入性
该函数针对同一索引被指定为不可重入,而针对不同索引则为可重入 [SWS_EthIf_00232]。在此,规范表提到了 Ctrl Idx,在此时收发器接口的上下文中,大概可以解释为指代收发器或控制器索引 [SWS_EthIf_00232]。 问题 Q-c0123f1ef0e4ec71 (未决)
此使用说明基于 AUTOSAR CP R20-11 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 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()
函数 EthIf_SwitchPortModeIndication 用作 Ethernet Interface(EthIf)的异步通知接口,以接收由 Ethernet Switch Driver 报告的 Ethernet 交换机端口模式更改 [SWS_EthIf_91055]。
使用与交互
EthIf 根据相应交换机端口的配置确定预期的通知:如果交换机端口引用了收发器(EthTrcv),则 EthIf 改为预期通过 EthIf_TrcvModeIndication() 接收通知;否则,预期通过 EthIf_SwitchPortModeIndication() 接收来自 Ethernet Switch Driver 的通知 [SWS_EthIf_91055]。
SwitchIdx:Ethernet Switch Driver 上下文中的 Ethernet 交换机索引 [SWS_EthIf_91055]。SwitchPortIdx:所寻址 Ethernet 交换机上的端口索引 [SWS_EthIf_91055]。PortMode:新报告的交换机端口模式,类型为Eth_ModeType[SWS_EthIf_91055]。
执行属性与限制
该函数没有返回值(void),服务 ID 为 0x46 [SWS_EthIf_91055]。它被指定为异步(Asynchronous)且不可重入(Non Reentrant)[SWS_EthIf_91055]。因此,调用方必须确保避免针对此服务的竞争性调用。有效载荷中未针对此函数定义具体的 DET 或 DEM 错误消息。
本使用说明基于规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 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
用法与调用上下文
函数 EthIf_SleepIndication 用作 Ethernet 接口的通知接口。一旦相应的 Ethernet 收发器驱动程序(EthTrcv)在网络上注册了睡眠指示,就会调用该函数 [SWS_EthIf_91006]。作为唯一的输入参数传递 TrcvIdx,该参数在模块 EthIf 上下文中唯一标识发送信号的 Ethernet 收发器的索引 [SWS_EthIf_91006]。该函数既没有输入/输出值也没有返回值,并且同步执行通知 [SWS_EthIf_91006]。
硬件交互
一个主要用例是与符合 OPEN Alliance TC10 规范设计的 Ethernet 硬件配合使用 [SWS_EthIf_91006]。在此场景中,收发器(PHY)在硬件级别检测到 Sleep.Indication,这是由直接连接的链路对端的睡眠请求(Sleep.Request)触发的 [SWS_EthIf_91006]。
并发性与限制
该接口被定义为同步且可重入,并通过头文件 EthIf.h 提供(服务 ID 0x68)[SWS_EthIf_91006]。在系统集成时应考虑到,该元素带有标签 atp.Status=draft,被标记为草案 [SWS_EthIf_91006]。规范范围中未定义具体的错误处理例程或 DET 错误码;正式的错误检查大概仅在未来的规范版本中进行。 问题 Q-680af6c43439167f (未决)
本使用说明是基于规范 AUTOSAR R20-11 自动生成的。
实现者指南即将推出(复杂度 I1)
函数 EthIf_MainFunctionRx [SWS_EthIf_00097] 📄 PDF
void EthIf_MainFunctionRx (void);
The function checks for new received frames and issues reception indications in polling mode.
用法与调用上下文
函数 EthIf_MainFunctionRx 在 Ethernet 接口(EthIf)中承担核心任务,在轮询模式下检查新到达的数据帧,并向上层触发相应的接收指示(Reception Indications)[SWS_EthIf_00097]。它以签名 void EthIf_MainFunctionRx (void) 定义,因此不接收任何调用参数且不提供返回值 [SWS_EthIf_00097]。十六进制值 0x20 被确定为服务 ID [SWS_EthIf_00097]。
该函数通过头文件 SchM_EthIf.h 提供 [SWS_EthIf_00097]。这表明可以理解为:其调用由调度管理器(SchM)或操作系统在基础软件的周期性任务上下文中周期性执行。
并发与错误处理
由于接收帧的检查和转发被指定在轮询模式下 [SWS_EthIf_00097],因此顺畅的接收操作需要对调用进行充分的时间节拍控制。延迟执行可能会导致将传入消息转发至上层软件组件时出现延迟。 问题 Q-554ef0cf302c3aa3 (未决)规范中未针对该函数列出特定错误码、开发错误(DET)或向 DEM 发送的错误报告。
本使用提示由 AI 生成,并总结了 AUTOSAR CP R20-11 规范版本的要求。
实现者指南即将推出(复杂度 I1)
函数 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.
主函数 EthIf_MainFunctionTx 用于在 Ethernet 接口模块 [SWS_EthIf_00113] 内周期性处理发送操作和状态查询。它具有十六进制服务 ID 0x21,并根据其签名 void EthIf_MainFunctionTx (void) 在没有传递参数且没有返回值的情况下执行,因此整个处理均基于状态进行 [SWS_EthIf_00113]。
在运行过程中,该服务在 Ethernet 通信中承担两项核心任务:
- 发送确认:在轮询模式下,该函数向上层发出成功完成传输的确认(Transmission Confirmations)[SWS_EthIf_00113]。
- 收发器状态:它监控并检查系统中所连接 Ethernet 收发器发生的状态变化 [SWS_EthIf_00113]。
在系统集成方面,该接口通过头文件 SchM_EthIf.h 可用 [SWS_EthIf_00113]。解释:从通过 SchM_EthIf.h 提供可能得出,该调用由 BSW 调度器(SchM)在周期性任务的上下文中周期性执行。 问题 Q-b9dde07f9cc74a95 (未决)这确保了在轮询操作中挂起的发送确认和收发器状态变更能够定期处理,且不依赖中断。
本规范范围中未针对此服务定义特定错误码、通过 DET 或 DEM 的单独错误处理例程以及重入性要求,因此未予列出。
本使用说明基于 AUTOSAR Classic Release R20-11 规范的规定。
实现者指南即将推出(复杂度 I1)
函数 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.
用法与语义
函数 EthIf_MainFunctionState 用于轮询(Polling)所连接的 Ethernet 通信硬件(例如 Ethernet 收发器和 Ethernet 交换机端口)的状态和诊断信息 [SWS_EthIf_91104]。其中包括例如连接状态(Link State)以及信号质量 [SWS_EthIf_91104]。该函数既没有输入参数也没有输出参数,并且不返回值(void EthIf_MainFunctionState(void),服务 ID 0x05)[SWS_EthIf_91104]。执行行为被指定为异步 [SWS_EthIf_91104]。
并发性与调用条件
该函数被定义为不可重入(Non Reentrant)[SWS_EthIf_91104]。因此,在任何时候都不得并行执行或自中断执行。由于该接口通过头文件 EthIf_SchM.h 提供 [SWS_EthIf_91104],因此周期性调用通常可能在 BSW 调度器(SchM)的任务上下文中进行。 问题 Q-10d02355b276be90 (未决)
交互与配置
根据 [SWS_EthIf_00407],EthIf_MainFunctionState 必须严格按照配置的周期性 EthIfMainFunctionStatePeriod 查询硬件信息。这确保了 Ethernet 接口中物理接口参数的定期更新。
本提示由 AI 基于 AUTOSAR 规范生成,不能替代正式的集成检查。
实现者指南即将推出(复杂度 I1)
类型 EthIf_ConfigType [SWS_EthIf_00149] 📄 PDF
Implementation specific structure of the post build configuration
类型 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.
类型 EthIf_MeasurementIdxType [SWS_EthIf_91010] 📄 PDF
Index to select specific measurement data
类型 EthIf_SignalQualityResultType [SWS_EthIf_91057] 📄 PDF
-
数据结构 EthIf_SignalQualityResultType([SWS_EthIf_91057])用于以太网层面的连接质量采集和诊断,并通过头文件 EthIf.h 提供。
该结构聚合了基本类型为 uint32 的三个测量物理量:
ActualSignalQuality:表示以太网连接当前存在的信号质量。HighestSignalQuality:记录自上次复位以来测得的该连接的最高信号质量。LowestSignalQuality:记录自上次复位以来测得的该连接的最低信号质量。
在与模块 EthIf 协同工作时,极值反映了连接稳定性的变化过程。内部保存的历史值的复位通过专用接口进行控制:
- 对于通过
TrcvIdx指定的收发器,函数EthIf_ClearTrcvSignalQuality复位已保存的信号质量值([SWS_EthIf_00400])。 - 对于通过
SwitchIdx和SwitchPortIdx标识的交换机端口,EthIf_ClearSwitchPortSignalQuality清除已保存的信号质量值([SWS_EthIf_00404])。
解释:由于有效载荷未提及具体的读取函数,该结构推测可能用作收发器和交换机端口相应状态查询的输出参数,以便将当前信号质量与极值进行比对。 问题 Q-8e5f2914bade574c (未决)
本段文本由 AI 生成,完全基于 R20-11 的规范要求。
实现者指南即将推出(复杂度 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#fd2cde72- Content hash
fd2cde72- 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 · 德文原文