DEENESPTFRRUARHIKOZHNL

AUTOSAR Classic Ethernet Services

Das Ethernet-Cluster realisiert IP-basierte Fahrzeugvernetzung, BroadR-Reach/100BASE-T1 Kommunikation, TCP/UDP-Stacks, IPv4/IPv6-Adressierung und Service-orientierte Schnittstellen.

Carte des thèmes

EthIf

92
EthIf_CheckWakeupEthIf_ClearSwitchPortSignalQualityEthIf_ClearTrcvSignalQualityEthIf_CtrlModeIndicationEthIf_DeletePortMirrorConfigurationEthIf_EnableEgressTimeStampEthIf_GetAndResetMeasurementDataEthIf_GetArlTableEthIf_GetBufWRxParamsEthIf_GetBufWTxParamsEthIf_GetCableDiagnosticsResultEthIf_GetChanRxParamsEthIf_GetControllerModeEthIf_GetCtrlIdxListEthIf_GetCurrentTimeEthIf_GetEgressTimeStampEthIf_GetIngressTimeStampEthIf_GetPhyIdentifierEthIf_GetPhysAddrEthIf_GetPhyWakeupReasonEthIf_GetPortCableDiagnosticsResultEthIf_GetPortMacAddrEthIf_GetPortMirrorStateEthIf_GetRxMgmtObjectEthIf_GetSwitchIdentifierEthIf_GetSwitchPortIdentifierEthIf_GetSwitchPortModeEthIf_GetSwitchPortSignalQualityEthIf_GetSwitchPortWakeupReasonEthIf_GetTransceiverModeEthIf_GetTransceiverWakeupModeEthIf_GetTrcvSignalQualityEthIf_GetTxMgmtObjectEthIf_GetVersionInfoEthIf_GetVlanIdEthIf_InitEthIf_MainFunctionRxEthIf_MainFunctionStateEthIf_MainFunctionTxEthIf_ProvideTxBufferEthIf_ReadPortMirrorConfigurationEthIf_ResetConfigurationEthIf_RunCableDiagnosticEthIf_RunPortCableDiagnosticEthIf_RxIndicationEthIf_SetBufWTxParamsEthIf_SetChanRxParamsEthIf_SetChanTxParamsEthIf_SetControllerModeEthIf_SetForwardingModeEthIf_SetPhyLoopbackModeEthIf_SetPhysAddrEthIf_SetPhyTestModeEthIf_SetPhyTxModeEthIf_SetPortLoopbackModeEthIf_SetPortMirrorStateEthIf_SetPortTestModeEthIf_SetPortTxModeEthIf_SetRadioParamsEthIf_SetSwitchMgmtInfoEthIf_SetTransceiverWakeupModeEthIf_SleepIndicationEthIf_StartAllPortsEthIf_StoreConfigurationEthIf_SwitchEnableTimeStampingEthIf_SwitchGetCfgDataInfoEthIf_SwitchGetCfgDataRawEthIf_SwitchPortGetBaudRateEthIf_SwitchPortGetCounterValuesEthIf_SwitchPortGetDuplexModeEthIf_SwitchPortGetLinkStateEthIf_SwitchPortGetMacLearningModeEthIf_SwitchPortGetMaxFIFOBufferFillLevelEthIf_SwitchPortGetRxStatsEthIf_SwitchPortGetTxErrorCounterValuesEthIf_SwitchPortGetTxStatsEthIf_SwitchPortGroupRequestModeEthIf_SwitchPortModeIndicationEthIf_TransceiverGetBaudRateEthIf_TransceiverGetDuplexModeEthIf_TransceiverGetLinkStateEthIf_TransceiverGetMacMethodEthIf_TransmitEthIf_TrcvModeIndicationEthIf_TxConfirmationEthIf_UpdatePhysAddrFilterEthIf_VerifyConfigEthIf_WritePortMirrorConfigurationEthIf_ConfigTypeEthIf_MeasurementIdxTypeEthIf_SignalQualityResultTypeEthIf_SwitchPortGroupIdxType

EthSwt

92
<EthSwtLinkDownCallout><EthSwtLinkUpCallout><EthSwtPersistentConfigurationResultCallback><GetCfgDataRawDone>EthSwt_BackgroundTaskEthSwt_CheckWakeupEthSwt_DeletePortMirrorConfigurationEthSwt_EnableVlanEthSwt_EthRxFinishedIndicationEthSwt_EthRxProcessFrameEthSwt_EthTxAdaptBufferLengthEthSwt_EthTxFinishedIndicationEthSwt_EthTxPrepareFrameEthSwt_EthTxProcessFrameEthSwt_ExtractStreamHandleIdxEthSwt_GetArlTableEthSwt_GetBaudRateEthSwt_GetCfgDataInfoEthSwt_GetCfgDataRawEthSwt_GetCounterValuesEthSwt_GetDuplexModeEthSwt_GetLinkStateEthSwt_GetMacLearningModeEthSwt_GetMaxFIFOBufferFillLevelEthSwt_GetPortCableDiagnosticsResultEthSwt_GetPortIdentifierEthSwt_GetPortMacAddrEthSwt_GetPortMacAddrVlanEthSwt_GetPortMirrorStateEthSwt_GetPortSignalQualityEthSwt_GetRxMgmtObjectEthSwt_GetRxStatsEthSwt_GetStreamHandleIdxStatisticsEthSwt_GetSwitchIdentifierEthSwt_GetSwitchPortModeEthSwt_GetSwitchPortWakeupReasonEthSwt_GetSwitchRegEthSwt_GetTxErrorCounterValuesEthSwt_GetTxMgmtObjectEthSwt_GetTxStatsEthSwt_GetVersionInfoEthSwt_InitEthSwt_MacSecAddRxSaEthSwt_MacSecAddRxSaNotificationEthSwt_MacSecAddTxSaEthSwt_MacSecAddTxSaNotificationEthSwt_MacSecDeleteRxSaEthSwt_MacSecDeleteTxSaEthSwt_MacSecGetMacSecStatsEthSwt_MacSecGetMacSecStatsNotificationEthSwt_MacSecGetTxSaNextPnEthSwt_MacSecInitRxScEthSwt_MacSecResetRxScEthSwt_MacSecSetControlledPortEnabledEthSwt_MacSecUpdateRxSaEthSwt_MacSecUpdateSecYEthSwt_MacSecUpdateSecYNotificationEthSwt_MacSecUpdateTxSaEthSwt_MainFunctionEthSwt_NvmSingleBlockCallbackEthSwt_PortEnableTimeStampEthSwt_PortLinkStateRequestEthSwt_ReadMmdEthSwt_ReadPortMirrorConfigurationEthSwt_ReadTrcvRegisterEthSwt_ResetConfigurationEthSwt_RunPortCableDiagnosticEthSwt_SetForwardingModeEthSwt_SetMacLearningModeEthSwt_SetMgmtInfoEthSwt_SetPortLoopbackModeEthSwt_SetPortMirrorStateEthSwt_SetPortTestModeEthSwt_SetPortTxModeEthSwt_SetStreamStateEthSwt_SetSwitchPortModeEthSwt_SetSwitchRegEthSwt_StartSwitchPortAutoNegotiationEthSwt_StoreConfigurationEthSwt_VerifyConfigEthSwt_WriteMmdEthSwt_WritePortMirrorConfigurationEthSwt_WriteTrcvRegisterEthSwt_ConfigTypeEthSwt_MacLearningTypeEthSwt_MgmtInfoTypeEthSwt_MgmtObjectTypeEthSwt_MgmtObjectValidTypeEthSwt_MgmtOwnerEthSwt_PortMirrorCfgTypeEthSwt_PortMirrorStateTypeEthSwt_StateType

Vue détaillée

Sélectionnez une entrée dans le plan.

DoIP

This function is to be used by integrators to inform the DoIP implementation about the status of the activation line of a DoIP interface with given InterfaceId.

void DoIP_ActivationLineSwitch(uint8 InterfaceId, boolean* Active);

Call with argument NonTlsAllowed==TRUE to allow unsecured DoIP connection establishments. If called with NonTlsAllowed==FALSE, DoIP will close the unsecured connection with NRC 0x07 and require the tester to use TLS.

void DoIP_AllowNonTlsDoIPConnection(boolean NonTlsAllowed);

Returns the version information of this module.

void DoIP_GetVersionInfo(Std_VersionInfoType* versioninfo);

Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module.

Std_ReturnType DoIP_IfCancelTransmit(PduIdType TxPduId);

Requests transmission of a PDU.

Std_ReturnType DoIP_IfTransmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);
DoIP_Init fonction

This service initializes all global variables of the DoIP module. After return of this service the Do IP module is operational.

void DoIP_Init(const DoIP_ConfigType* DoIPConfigPtr);

This function gets called by the SoAd if an IP address assignment related to a socket connection changes (i.e. new address assigned or assigned address becomes invalid).

void DoIP_LocalIpAddrAssignmentChg(SoAd_SoConIdType SoConId, TcpIp_IpAddrStateType State);

Schedules the Diagnostic over IP module. (Entry point for scheduling)

void DoIP_MainFunction(void);

Indication of a received PDU from a lower layer communication interface module.

void DoIP_SoAdIfRxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

void DoIP_SoAdIfTxConfirmation(PduIdType TxPduId, Std_ReturnType result);

This function is called to provide the received data of an I-PDU segment (N-PDU) to the upper layer. Each call to this function provides the next part of the I-PDU data. The size of the remaining buffer is written to the position indicated by bufferSizePtr.

BufReq_ReturnType DoIP_SoAdTpCopyRxData(PduIdType id, const PduInfoType* info, PduLengthType* bufferSizePtr);

This function is called to acquire the transmit data of an I-PDU segment (N-PDU). Each call to this function provides the next part of the I-PDU data unless retry->TpDataState is TP_ DATARETRY. In this case the function restarts to copy the data beginning at the offset from the current position indicated by retry->TxTpDataCnt. The size of the remaining data is written to the position indicated by availableDataPtr.

BufReq_ReturnType DoIP_SoAdTpCopyTxData(PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);

Called after an I-PDU has been received via the TP API, the result indicates whether the transmission was successful or not.

void DoIP_SoAdTpRxIndication(PduIdType id, Std_ReturnType result);

This function is called at the start of receiving an N-SDU. The N-SDU might be fragmented into multiple N-PDUs (FF with one or more following CFs) or might consist of a single N-PDU (SF). The service shall provide the currently available maximum buffer size when invoked with TpSdu Length equal to 0.

BufReq_ReturnType DoIP_SoAdTpStartOfReception(PduIdType id, const PduInfoType* info, PduLengthType TpSduLength, PduLengthType* bufferSizePtr);

This function is called after the I-PDU has been transmitted on its network, the result indicates whether the transmission was successful or not.

void DoIP_SoAdTpTxConfirmation(PduIdType id, Std_ReturnType result);

Notification about a SoAd socket connection state change, e.g. socket connection gets online

void DoIP_SoConModeChg(SoAd_SoConIdType SoConId, SoAd_SoConModeType Mode);

Requests cancellation of an ongoing reception of a PDU in a lower layer transport protocol module. The call of this API to cancel an ongoing reception will close the used TCP connection.

Std_ReturnType DoIP_TpCancelReceive(PduIdType RxPduId);

Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module. The call of this API to cancel an ongoing transmission will close the used TCP connection.

Std_ReturnType DoIP_TpCancelTransmit(PduIdType TxPduId);

Requests transmission of a PDU.

Std_ReturnType DoIP_TpTransmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);

This function is used to notify the DoIP module to start vehicle announcement for DoIP interfaces with given InterfaceId. This function is just a trigger to start the DoIPInitialVehicle AnnouncementTime timeout.

void DoIP_TriggerVehicleAnnouncement(uint8 InterfaceId);

Callback function to get the OEM specific Further Action Byte for the DoIP vehicle identification response/vehicle announcement.

Std_ReturnType <User>_DoIPGetFurtherActionByteCallback(DoIP_FurtherActionByteType* FurtherActionByte);

Function is used in the case that DoIPVinGIDMaster is set to false and DoIPGetGidCallback is configured to get on a vehicle identification the GID. If the return value is not E_OK the DoIP shall use the default GID.

Std_ReturnType <User>_DoIPGetGidCallback(uint8* GroupId);

Callback function to check if the PowerMode of the DoIP entity is ready or not.

Std_ReturnType <User>_DoIPGetPowerModeCallback(DoIP_PowerStateType* PowerStateReady);

Callback function to get the confirmation for the Routing Activation.

Std_ReturnType <User>_DoIPRoutingActivationAuthentication(boolean* Authentified, const uint8* AuthenticationReqData, uint8* AuthenticationResData);

Callback function to get the confirmation for the Routing Activation.

Std_ReturnType <User>_DoIPRoutingActivationConfirmation(boolean* Confirmed, const uint8* ConfirmationReqData, uint8* ConfirmationResData);

Function is used in the case that DoIPVinGIDMaster is set to true and a container DoIPTrigger GidSyncCallback is configured to trigger the synchronization process of the GroupIdentifier.

Std_ReturnType <User>_DoIPTriggerGidSyncCallback(void);

Variation Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation.SHORT-NAME)}

Variation Name = {ecuc(DoIP/DoIPConfigSet/DoIPRoutingActivation.SHORT-NAME)}

Variation Name = {ecuc(DoIP/DoIPConfigSet/DoIPRoutingActivation.SHORT-NAME)}

Variation Name = {ecuc(DoIP/DoIPConfigSet/DoIPRoutingActivation.SHORT-NAME)}

Configuration data structure of the DoIP module

Used to get the OEM specific Further Action Byte for the DoIP vehicle identification response/ vehicle announcement. Variation –

Used for handling of the PowerMode in DoIP entity status requests Variation –

Eth

Activat es 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 st amped" by network design.

void Eth_EnableEgressTimeStamp (uint8 CtrlIdx, Eth_BufIdxType BufIdx);

Obtains the state of the indexed controller Tags: atp.Status=obsolete

Std_ReturnType Eth_GetControllerMode (uint8 CtrlIdx, Eth_ModeType* CtrlModePtr);

Obtains the communication state of the indexed controller Tags: atp.Status=draft

Std_ReturnType Eth_GetControllerMode (uint8 CtrlIdx, Eth_ModeType* CtrlModePtr);

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

Std_ReturnType Eth_GetCounterValues (uint8 CtrlIdx, Eth_CounterType* CounterPtr);

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, than an the remainin g bits will be filled with 0. Important Note: Eth_ Get Current Time may be called within an exclusive area.

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

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

Std_ReturnType Eth_GetEgressTimeStamp (uint8 CtrlIdx, Eth_BufIdxType BufIdx, 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.

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

Obtains the physical source address used by the indexed controller

void Eth_GetPhysAddr (uint8 CtrlIdx, uint8* PhysAddrPtr);

Returns the following list according to IETF RFC281 9, where the maximal possible value shall denote an invalid value, e.g. if this counter is not available: 1. ether Stats Drop Events 2. ether Stats Octets 3. ether Stats Pkts 4. ether Stats Broadcast Pkts 5. ether Stats Multicast Pkts 6. ether Stats Crc Al ign Errors 7. ether Stats Undersize Pkts 8. ether Stats Oversize Pkts 9. ether Stats Fragments 10. ether Stats Jabbers 11. ether Stats Collisions 12. ether Stats Pkts64Octets 13. ether Stats Pkts65to127Octets 14. ether Stats Pkts128to255Octets 15. ether St ats Pkts256to511Octets 16. ether Stats Pkts512to1023Octets 17. ether

Std_ReturnType Eth_GetRxStats (uint8 CtrlIdx, Eth_RxStatsType* RxStats);

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

Std_ReturnType Eth_GetTxErrorCounterValues (uint8 CtrlIdx, Eth_TxErrorCounterValuesType* TxErrorCounterValues);

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

Std_ReturnType Eth_GetTxStats (uint8 CtrlIdx, Eth_TxStatsType* TxStats);

Returns the version information of this module

void Eth_GetVersionInfo (Std_VersionInfoType* VersionInfoPtr);
Eth_Init fonction

Initializes the Ethernet Driver

void Eth_Init (const Eth_ConfigType* CfgPtr);

The function checks for controller errors and lost frames. Used for polling state changes. Calls Eth If_ Ctrl Mode Indication when the controller mode changed.

void Eth_MainFunction (void);

Provides access to a transmit buffer of the FIFO related to the specified priority

BufReq_ReturnType Eth_ProvideTxBuffer (uint8 CtrlIdx, uint8 Priority, Eth_BufIdxType* BufIdxPtr, uint8* * BufPtr, uint16* LenBytePtr);
Eth_ReadMii fonction

Reads a transceiver register

Std_ReturnType Eth_ReadMii (uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16* RegValPtr);
Eth_Receive fonction

Receive a frame from the related fifo.

void Eth_Receive (uint8 CtrlIdx, uint8 FifoIdx, Eth_RxStatusType* RxStatusPtr);

Enables / disables the indexed controller Tags: atp.Status=obsolete

Std_ReturnType Eth_SetControllerMode (uint8 CtrlIdx, Eth_ModeType CtrlMode);

Enables / Disables Rx/ Tx communication of the indexed controller Tags: atp.Status=draft

Std_ReturnType Eth_SetControllerMode (uint8 CtrlIdx, Eth_ModeType CtrlMode);

Sets the physical source address used by the indexed controller

void Eth_SetPhysAddr (uint8 CtrlIdx, const uint8* PhysAddrPtr);
Eth_Transmit fonction

Triggers transmission of a previously filled transmit buffer

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

Triggers frame transmission confirmation

void Eth_TxConfirmation (uint8 CtrlIdx);

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

Std_ReturnType Eth_UpdatePhysAddrFilter (uint8 CtrlIdx, const uint8* PhysAddrPtr, Eth_FilterActionType Action);
Eth_WriteMii fonction

Configures a transceiver register or triggers a function offered by the receiver

Std_ReturnType Eth_WriteMii (uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 RegVal);

Ethernet buffer identifier type.

Implementation specific structure of the post build configuration

Type Eth_CounterType.

This type defines the Ethernet data type used for data transmission. Its definition depends on the used CPU.

The Enumeration Type Eth_ Filter Action Type describes the action to be taklen for the MAC address given in *Phys Addr Ptr.

This type defines the Ethernet frame type used in the Ethernet frame header

This type is used to read out addresses from the address resolution logic (A RL) table of the switch. typedef struct { uint8 Mac Addr[6U]; uint16 Vlan Id; uint32 Switch Port; } Eth_ Mac Vlan Type; In case of Macaddr contains a Multicast Address Mac Vlan Type.Switch Port shall be handled as Bitmask, each bit represents a Switch Port , Bit 0 represents Eth Swicht Port Idx = 0 , Bit 1 represents Eth Swicht Port Idx = 1 and so on. In case of Macaddr contains not a Multicast Address Mac Vlan Type.Switch Port shall be handled as a value representing the Eth Switch Port Idx.

This is an generic type and used in the layers of the Ethernet communication stack (e.g. EthIf, Eth, EthSwt, EthTrcv) to enable and disable, resp ectively, the Ethernet communcation channel and set the corresponding hardware (e.g. Ethernet controller, Ethernet Switch port, Ethernet transceiver) to an lowpower sleep and power on mode, respectively. Tags: atp.Status=obsolete

This is an generic type and used in the layers of the Ethernet commun ication stack (e.g. Eth If, Eth, Eth Swt, Eth Trcv) to enable and disable, respectively, the Ethernet communcation channel and set the corresponding hardware (e.g. Ethernet controller, Ethernet Switch port, Ethernet transceiver) to an lowpower sleep and po wer on mode, respectively. The type also support to transfer a wake - up request from the services layer (Com M) to the communication drivers (Eth Trcv). This could be used e.g. for Ethernet hardware that has the capability to wake - up and sleep on data line (see OA TC10) Tags: atp.Status=draft

Variables of this type are used to express frequency ratios.

Type Eth_RxStatsType.

Used as out parameter in Eth_ Receive() indicates whether a frame has been received and if so, whether more frames are available or frames go t lost.

Status supervision used for Development Error Detection. The state shall be available for debugging.

Variables of this type are used to express time differences.

Depending on the HW, quality information regarding the evaluated time stamp might be supported. If not supported, the value shall be always Valid. For Uncertain and Invalid values, the upper layer shall discard the time stamp.

Variables of this type are used for expressing time stamps including relative time and absolute calendar time. The absolute time starts at 1970 - - 01. 0 to 281474976710655s == 3257812230d [0x FFFF FFFF FFFF] 0 to 999999999ns [0x3B9A C9FF] invalid value in nanoseconds: [0x3B9A CA00] to [0x3FFF FFFF] Bit 30 and 31 reserved, default: 0

Type Eth_TxErrorCounterValuesType.

Statistic counter for diag nostics.

EthIf

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

Std_ReturnType EthIf_CheckWakeup (EcuM_WakeupSourceType WakeupSource);

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

Std_ReturnType EthIf_ClearSwitchPortSignalQuality (uint8 SwitchIdx, uint8 SwitchPortIdx);

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

Std_ReturnType EthIf_ClearTrcvSignalQuality (uint8 TrcvIdx);

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

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

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

Std_ReturnType EthIf_DeletePortMirrorConfiguration (uint8 MirroredSwitchIdx);

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

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

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

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

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

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

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

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

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

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

Retrieves the cable diagnostics result of a given transceiver.

Std_ReturnType EthIf_GetCableDiagnosticsResult (uint8 TrcvIdx, EthTrcv_CableDiagResultType* ResultPtr);

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

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

Obtains the state of the ind exed controller

Std_ReturnType EthIf_GetControllerMode (uint8 CtrlIdx, Eth_ModeType* CtrlModePtr);

Returns the number and index of all active Ethernet controllers.

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

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

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

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

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

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

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

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

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

Obtains the physical source address used by the indexed controller

void EthIf_GetPhysAddr (uint8 CtrlIdx, uint8* PhysAddrPtr);

Tags: atp.Status=draft

Std_ReturnType EthIf_GetPhyWakeupReason (uint8 TrcvIdx, EthTrcv_WakeupReasonType* WakeupReasonPtr);

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

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

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

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

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

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

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

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

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

Std_ReturnType EthIf_GetSwitchIdentifier (uint8 SwitchIdx, uint32* OrgUniqueIdPtr);

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

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

Obtains the mode of the indexed switch port

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

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

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

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

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

Obtains the state of the indexed transceiver

Std_ReturnType EthIf_GetTransceiverMode (uint8 TrcvIdx, Eth_ModeType* TrcvModePtr);

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

Std_ReturnType EthIf_GetTransceiverWakeupMode (uint8 TrcvIdx, EthTrcv_WakeupModeType* TrcvWakeupModePtr);

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

Std_ReturnType EthIf_GetTrcvSignalQuality (uint8 TrcvIdx, EthIf_SignalQualityResultType* ResultPtr);

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

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

Returns the version information of this module

void EthIf_GetVersionInfo (Std_VersionInfoType* VersionInfoPtr);

Returns the VLAN identifier of the requested Ethernet controller.

Std_ReturnType EthIf_GetVlanId (uint8 CtrlIdx, uint16* VlanIdPtr);
EthIf_Init fonction

Initializes the Ethernet Interface

void EthIf_Init (const EthIf_ConfigType* CfgPtr);

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

void EthIf_MainFunctionRx (void);

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

void EthIf_MainFunctionState (void);

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

void EthIf_MainFunctionTx (void);

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

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

Obtain the port mirror configuration of the given Ethernet switch.

Std_ReturnType EthIf_ReadPortMirrorConfiguration (uint8 MirroredSwitchIdx, EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);

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

Std_ReturnType EthIf_ResetConfiguration (uint8 SwitchIdx);

Trigger the cable diagnostics for the given Ethernet transceiver.

Std_ReturnType EthIf_RunCableDiagnostic (uint8 TrcvIdx);

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

Std_ReturnType EthIf_RunPortCableDiagnostic (uint8 SwitchIdx, uint8 PortIdx);

Handles a received frame received by the indexed controller

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

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

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

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

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

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

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

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

Std_ReturnType EthIf_SetControllerMode (uint8 CtrlIdx, Eth_ModeType CtrlMode);

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

Std_ReturnType EthIf_SetForwardingMode (uint8 SwitchIdx, boolean mode);

Activates a given loopback mode.

Std_ReturnType EthIf_SetPhyLoopbackMode (uint8 TrcvIdx, EthTrcv_PhyLoopbackModeType Mode);

Sets the physical source address used by the indexed controller.

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

Activates a given test mode.

Std_ReturnType EthIf_SetPhyTestMode (uint8 TrcvIdx, EthTrcv_PhyTestModeType Mode);

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

Std_ReturnType EthIf_SetPhyTxMode (uint8 TrcvIdx, EthTrcv_PhyTxModeType Mode);

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

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

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

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

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

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

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

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

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

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

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

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

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

Std_ReturnType EthIf_SetTransceiverWakeupMode (uint8 TrcvIdx, EthTrcv_WakeupModeType TrcvWakeupMode);

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

void EthIf_SleepIndication (uint8 TrcvIdx);

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

Std_ReturnType EthIf_StartAllPorts (void);

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

Std_ReturnType EthIf_StoreConfiguration (uint8 SwitchIdx);

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

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

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

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

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

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

Obtains the baud rate of the indexed switch port

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

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

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

Obtains the duplex mode of the indexed switch port

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

Obtains the link state of the indexed switch port

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

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

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

Service EthIf_SwitchPortGetMaxFIFOBufferFillLevel.

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

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

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

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

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

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

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

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

Std_ReturnType EthIf_SwitchPortGroupRequestMode (EthIf_SwitchPortGroupIdxType PortGroupIdx, Eth_ModeType PortMode);

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

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

Obtains the baud rate of the indexed transceiver

Std_ReturnType EthIf_TransceiverGetBaudRate (uint8 TrcvIdx, EthTrcv_BaudRateType* BaudRatePtr);

Obtains the duplex mode of the indexed tra nsceiver

Std_ReturnType EthIf_TransceiverGetDuplexMode (uint8 TrcvIdx, EthTrcv_DuplexModeType* DuplexModePtr);

Obta ins the link state of the indexed transceiver

Std_ReturnType EthIf_TransceiverGetLinkState (uint8 TrcvIdx, EthTrcv_LinkStateType* LinkStatePtr);

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

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

Triggers transmission of a previously filled transmit buffer

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

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

void EthIf_TrcvModeIndication (uint8 TrcvIdx, Eth_ModeType TrcvMode);

Confirms frame transmission by the indexed controller

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

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

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

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

Std_ReturnType EthIf_VerifyConfig (uint8 SwitchIdx, boolean* Result);

Service EthIf_WritePortMirrorConfiguration.

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

Implementation specific structure of the post build configuration

Index to select specific measurement data

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

EthSM

Called when mode has been read out. Either triggered by previous Eth If_ Get Controller Mode or by Eth If_ Set Controller Mode call. Can directly be called within the trigger functions.

void EthSM_CtrlModeIndication(uint8 CtrlIdx, Eth_ModeType CtrlMode);

This service shall put out the current communication mode of a Ethernet network.

Std_ReturnType EthSM_GetCurrentComMode(NetworkHandleType NetworkHandle, ComM_ModeType* ComM_ModePtr);

This service puts out the version information of this module.

void EthSM_GetVersionInfo(Std_VersionInfoType* versioninfo);
EthSM_Init fonction

This function initialize the Eth SM.

void EthSM_Init(void);

Cyclic Main Function which is called from the Scheduler.

void EthSM_MainFunction(void);

Handles the communication mode and sets the Ethernet network active or passive.

Std_ReturnType EthSM_RequestComMode(NetworkHandleType NetworkHandle, ComM_ModeType ComM_Mode);

This API is called by the Eth If and indicate that a sleep indication was detected on the network. This API is only called if the ECU is acting as a passive communication slave on the corresponding communication channel (the referenced Eth Trcv of the affe cted Eth If Transceiver has set Eth Trcv Act As Slave Passive Enabled to TRUE). This could be used e.g. for Ethernet hardware which is compliant to the OA TC10. In this case the Ethernet hardware detect an Sleep.Indication which was triggered by a Sleep.Re quest of the connected link partner. Tags: atp.Status=draft

void EthSM_SleepIndication(uint8 Ctrl_Idx);

This service is called by the Tcp Ip to report the actual Tcp Ip state (e.g. online, offline). Available vi a Eth SM_ Tcp Ip.h

void EthSM_TcpIpModeIndication(uint8 CtrlIdx, TcpIp_StateType TcpIpState);

This service is called by the Ethernet Interface to report a transceiver link state change.

void EthSM_TrcvLinkStateChg(uint8 CtrlIdx, EthTrcv_LinkStateType TransceiverLinkState);

This type shall define the states of the network mode state machine.

EthSwt

Is called, if a link which is configured goes down.

void <EthSwtLinkDownCallout>(uint8 SwitchIdx, uint8 PortIdx);

Is called, if a link which is configured goes up

void <EthSwtLinkUpCallout>(uint8 SwitchIdx, uint8 PortIdx);

Job end notification of EthSwt_StoreConfiguration or EthSwt_ResetConfiguration

void <EthSwtPersistentConfigurationResultCallback>(NvM_RequestResultType JobResult);

The call of the function EthSwt_GetCfgDataRaw() triggers a asynchrony read of a certain memory section of the Ethernet switch driver. If the read is done, the configured callout function <GetCfgDataRawDone> shall be called]

void <GetCfgDataRawDone>(uint8 SwitchIdx);

The background task should be scheduled as often as possible when no other task runs. It may be used for switch and port initialization in case the EthSwt_Init function needs too much time.

void EthSwt_BackgroundTask(void);

API is called by EthIf. The Ethernet switch driver request to check for a wake-up at all Ethernet switch ports which reference an EthTrcv. For those Ethernet switch ports the call is forwarded to the referenced EthTrcv. The function could be called in context of an interrupt service routine or on task level Note: Interrupt service routine consuming time has to be considered, since all EthSwtPorts of the maintained Ethernet switches has to be checked. Therefore the call is forwarded to the referred EthTrcv where the request to check for wake-up is stored. The check of the Ethernet hardware is done asynchronously in the context of the EthTrcv_MainFunction.

Std_ReturnType EthSwt_CheckWakeup(uint8 SwitchIdx);

Delete the stored port mirror configuration of the given MirroredSwitchIdx. If no port mirror configuration was found for the given MirroredSwitchIdx, the return value shall be E_OK.

Std_ReturnType EthSwt_DeletePortMirrorConfiguration(uint8 MirroredSwitchIdx);

Enables or disables a pre-configured VLAN at a certain port of a switch.

Std_ReturnType EthSwt_EnableVlan(uint8 SwitchIdx, uint8 SwitchPortIdx, uint16 VlanId, boolean Enable);

Indication for a finished receive process for a specific Ethernet frame, which results in providing the management information retrieved during EthSwt_EthRxProcessFrame().

Std_ReturnType EthSwt_EthRxFinishedIndication(uint8 CtrlIdx, Eth_BufIdxType BufIdx);

Function inspects the Ethernet frame passed by the data pointer for management information and stores it for later use in EthSwt_EthRxFinishedIndication().

Std_ReturnType EthSwt_EthRxProcessFrame(uint8 CtrlIdx, Eth_BufIdxType BufIdx, uint8* * DataPtr, uint16* LengthPtr, boolean* IsMgmtFrameOnlyPtr);

Modifies the buffer length to be able to insert management information.

void EthSwt_EthTxAdaptBufferLength(uint16* LengthPtr);

Indication for a finished transmit process for a specific Ethernet frame.

Std_ReturnType EthSwt_EthTxFinishedIndication(uint8 CtrlIdx, Eth_BufIdxType BufIdx);

Prepares the Ethernet frame for common Ethernet communication (frame shall be handled by switch according to the common address resolution behavior) and stores the information for processing of EthSwt_EthTxFinishedIndication().

Std_ReturnType EthSwt_EthTxPrepareFrame(uint8 CtrlIdx, Eth_BufIdxType BufIdx, uint8* * DataPtr, uint16* LengthPtr);

Function inserts management information into the Ethernet frame.

Std_ReturnType EthSwt_EthTxProcessFrame(uint8 CtrlIdx, Eth_BufIdxType BufIdx, uint8* * DataPtr, uint16* LengthPtr);

Extracts the StreamHandleIdx from the switch vendor specific part of the network packet header Tags: atp.Status=draft

Std_ReturnType EthSwt_ExtractStreamHandleIdx(const Eth_DataType* DataPtr, uint16 LenByte, uint16* StreamHandleIdxPtr);

Obtains the address resolution table of a switch and copies the list into a user provided buffer. The function will copy all or numberOfElements into the output list. If input value of numberOf Elements is 0 the function will not copy any data but only return the number of valid entries in the cache. arlTableListPointer may be NULL_PTR in this case.

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

Obtains the baud rate of the indexed switch port

Std_ReturnType EthSwt_GetBaudRate(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_BaudRateType* BaudRatePtr);

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

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

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

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

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

Std_ReturnType EthSwt_GetCounterValues(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_CounterType* CounterPtr);

Obtains the duplex mode of the indexed switch port

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

Obtains the link state of the indexed switch port

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

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

Std_ReturnType EthSwt_GetMacLearningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType* MacLearningMode);

The function retrieves the maximum amount of allocated FIFO buffer of the indexed Ethernet switch egress port. If the Ethernet switch hardware does not support Ethernet switch port based maximal FIFO buffer level, the content of SwitchPortEgressFifoBufferLevelPtr shall be set to 0xFFFFFFFF. This API may be called by e.g. a CDD.

Std_ReturnType EthSwt_GetMaxFIFOBufferFillLevel(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 SwitchPortEgressFifoIdx, uint32* SwitchPortEgressFifoBufferLevelPtr);

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

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

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

Std_ReturnType EthSwt_GetPortIdentifier(uint8 SwitchIdx, uint8 PortIdx, uint32* OrgUniqueIdPtr, uint8* ModelNrPtr, uint8* RevisionNrPtr);

Obtains the port over which this MAC-address at the indexed switch can be reached. The result might be used for a DHCP-server which will need the port/MAC-resolution. If for the PortIdxPtr the maximal possible value (255) is returned the given MAC address cannot be reached via a port of this switch. If multiple ports were found the API returns E_NOT_OK.

Std_ReturnType EthSwt_GetPortMacAddr(uint8 SwitchIdx, const uint8* MacAddrPtr, uint8* PortIdxPtr);

Obtains an Ethernet switch port bit map, where the given MAC-address with respect to the given VLAN-ID is assigned to. The return argument PortBitMapPtr points to uint32 value which shall be handled as Ethernet switch port bit map. Each bit of the Ethernet switch port bit map represents an EthSwtPortIdx, where the least significant bit (bit 0) represents EthSwitchPortIdx 0 and most significant bit (bit 32) represents EthSwitchPortIdx 31 (e.g. 0x0001 == EthSwitch PortIdx 0 is set; 0x8005 == EthSwitchPortIdx 0, 2 and 31 are set).

Std_ReturnType EthSwt_GetPortMacAddrVlan(uint8 SwitchIdx, const uint8* MacAddrPtr, const uint16* VlanIdPtr, uint32* PortBitMapPtr);

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

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

The function retrieves the signal quality of the link of the indexed Ethernet switch port. If no transceiver is referenced the signal quality shall be set to 0xFFFFFFFF.

Std_ReturnType EthSwt_GetPortSignalQuality(uint8 SwitchIdx, uint8 PortIdx, uint32* SignalQualityPtr);

Obtains the MgmtObject of the (in this context) unique DataPtr.

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

Returns a list of statistic counters defined with Eth_RxTatsType. The majority of these Counters are derived from the IETF RFC2819.

Std_ReturnType EthSwt_GetRxStats(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_RxStatsType* RxStats);

Requests the bucket counter values from the switch Tags: atp.Status=draft

void EthSwt_GetStreamHandleIdxStatistics(uint8 SwitchIdx);

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 0xFFxxxxxx.

Std_ReturnType EthSwt_GetSwitchIdentifier(uint8 SwitchIdx, uint32* OrgUniqueIdPtr);

Obtains the mode of the indexed switch port

Std_ReturnType EthSwt_GetSwitchPortMode(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType* SwitchModePtr);

This function obtains the wake up reasons of the the indexed Ethernet switch port by calling Eth Trcv_GetBusWuReason(...) of the referenced EthTrcv

Std_ReturnType EthSwt_GetSwitchPortWakeupReason(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_WakeupReasonType Reason);

Generic API for reading the content of a switch register

Std_ReturnType EthSwt_GetSwitchReg(uint8 SwitchIdx, uint32 page, uint32 register, uint32* registerContent);

Returns the list of Transmission Error Counters out of IETF RFC1213 and RFC1643 defined with Eth_TxErrorCounterValuesType, where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

Std_ReturnType EthSwt_GetTxErrorCounterValues(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_TxErrorCounterValuesType* TxStats);

Obtains the MgmtObject of the (in this context) unique BufIdx.

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

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

Std_ReturnType EthSwt_GetTxStats(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_TxStatsType* TxStats);

Returns the version information of this module.

void EthSwt_GetVersionInfo(Std_VersionInfoType* VersionInfoPtr);
EthSwt_Init fonction

Initializes the Ethernet Switch Driver

void EthSwt_Init(const EthSwt_ConfigType* CfgPtr);

Request the Ethernet Switch Driver to create a Reception Secure Association in the Transceiver. The Short Secure Channel Identifier is included to support XPN configurations. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecAddRxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 LowestPn, uint32 Ssci, const Mka_SakKeyPtrType* KeysPtr, boolean Active);

Callback to notify that EthSwt_MacSecAddRxSa finished. Tags: atp.Status=DRAFT

void EthSwt_MacSecAddRxSaNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Requests the Ethernet Switch Driver to create a Transmission Secure Association in the Transceiver. The Short Secure Channel Identifier is included to support XPN configurations. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecAddTxSa(EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 NextPn, uint32 Ssci, const Mka_SakKeyPtrType* KeysPtr, boolean Active);

Callback to notify that EthSwt_MacSecAddTxSa finished. Tags: atp.Status=DRAFT

void EthSwt_MacSecAddTxSaNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Request the Ethernet Switch Driver to remove the Reception Secure Association identified by the provided Association Number. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecDeleteRxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An);

Request the Ethernet Switch Driver to remove the Transmission Secure Association identified by the provided Association Number. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecDeleteTxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An);

Request the Ethernet Switch Driver to provide MACsec statistics. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecGetMacSecStats(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Callback to notify that EthSwt_MacSecGetMacSecStats finished and provide the requested statistics. Tags: atp.Status=DRAFT

void EthSwt_MacSecGetMacSecStatsNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr, const Mka_Stats_SecYType* MacSecStats);

Request the Ethernet Switch Driver to return the Packet Number that is used for the next packet in the given Transmission Secure Association. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecGetTxSaNextPn(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64* NextPnPtr);

Requests the Ethernet Switch Driver to configure a Reception Secure Channel for the given Secure Channel Identifier. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecInitRxSc(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint64 Sci);

Requests the Ethernet Switch Driver to reset to default the MACsec values of the Reception Secure Channel for the given Secure Channel Identifier. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecResetRxSc(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint64 Sci);

Requests to set the Controlled Port enabled parameter of a PAE. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecSetControlledPortEnabled(const EthSwt_MgmtInfoType* MgmtInfoPtr, boolean ControlledPortEnabled);

Request the Ethernet Switch Driver to update the Reception Secure Association with the given Packet Number. The Active parameter is included to change the specified AN status. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecUpdateRxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 LowestPn, boolean Active);

Requests the Ethernet Switch to update the SecY/PAC of the PHY with the provided parameters. A Transmission Secure Channel with the provided SCI shall be configured during the first call. A pointer to a MACsec Basic Parameters Configuration file shall be provided to create the Secure Channel. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecUpdateSecY(const EthSwt_MgmtInfoType* MgmtInfoPtr, const Mka_MacSecConfigType* MACsecCfgPtr, uint64 TxSci);

Callback to notify that EthSwt_MacSecUpdateSecY finished. Tags: atp.Status=DRAFT

void EthSwt_MacSecUpdateSecYNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Requests the Ethernet Switch Driver to update the Transmission Secure Association with the given Packet Number. The Active parameter is included to change the specified AN status. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecUpdateTxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 NextPn, boolean Active);

Service to support asynchronous behavior of API calls

void EthSwt_MainFunction(void);

Function will be called by the NVRAMManager after the switch configuration has been stored or resetted.

Std_ReturnType EthSwt_NvmSingleBlockCallback(NvM_BlockRequestType BlockRequest, NvM_RequestResultType JobResult);

Activates egress time stamping on a dedicated message object on a dedicated port of a Switch if EthSwtPortTimeStampSupport is set to TRUE for this port. The selective activation of dedicated message objects for time stamping reduces the number of notification calls only to the required calls. Some HW does store once the egress time stamp marker and some HW needs it always before transmission. There will be no disabled functionality, due to the fact, that the message type is always "time stamped" by network design.

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

Request a link state by calling EthTrcv_TransceiverLinkStateRequest with the TrcvIdx of the Ethernet transceiver which is referenced by the Ethernet Switch port (PortIdx).

Std_ReturnType EthSwt_PortLinkStateRequest(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_LinkStateType PortLinkState);

Reads a transceiver register using Clause 45 access if supported by hardware or implements a Clause 45 access using Clause 22 operations.

Std_ReturnType EthSwt_ReadMmd(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 Mmd, uint16 RegIdx, uint16* RegValPtr);

Obtain the port mirror configuration of the given Ethernet switch.

Std_ReturnType EthSwt_ReadPortMirrorConfiguration(uint8 MirroredSwitchIdx, EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);

Generic API for reading the content of a transceiver register

Std_ReturnType EthSwt_ReadTrcvRegister(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 RegIdx, uint16* RegValPtr);

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

Std_ReturnType EthSwt_ResetConfiguration(uint8 SwitchIdx);

Trigger the cable diagnostics of the given Ethernet Switch port (PortIdx) by calling EthTrcv_Run CableDiagnostic of the referenced Ethernet transceiver.

Std_ReturnType EthSwt_RunPortCableDiagnostic(uint8 SwitchIdxIdx, uint8 PortIdx);

Configures switch to start or stop forwarding for all ports. This API call may be used during switch configuration verification.

Std_ReturnType EthSwt_SetForwardingMode(uint8 SwitchIdx, boolean mode);

Sets the MAC learning mode in one of the tree modes: 1.) HW learning enabled, 2.) Hardware learning disabled, 3.) Software learning enabled. Note: This feature is hardware dependent, i.e. the switch hardware needs to support the different learning modes.

Std_ReturnType EthSwt_SetMacLearningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType MacLearningMode);

Extends the Ethernet frame prepared previously by EthSwt_EthTxPrepareFrame() with the management information to achieve transmission only on specific ports.

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

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

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

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

Std_ReturnType EthSwt_SetPortMirrorState(uint8 MirroredSwitchIdx, EthSwt_PortMirrorStateType PortMirrorState);

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

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

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

Std_ReturnType EthSwt_SetPortTxMode(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTxModeType Mode);

This function is called by an upper layer application (e.g. diagnostic application) via the EthIf module to control the activity status of a configured stream (given with StreamHandleIdx) within an dedicated Ethernet switch (given with SwitchIdx). Tags: atp.Status=draft

void EthSwt_SetStreamState(uint8 SwitchIdx, uint8 StreamHandleIdx, boolean StreamActivityStatus);

Enables/disables the indexed switch port

Std_ReturnType EthSwt_SetSwitchPortMode(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType PortMode);

Generic API for writing the content of a switch register

Std_ReturnType EthSwt_SetSwitchReg(uint8 SwitchIdx, uint32 page, uint32 register, uint32 registerContent);

Starts the auto-negotiation of the indexed switch port

Std_ReturnType EthSwt_StartSwitchPortAutoNegotiation(uint8 SwitchIdx, uint8 SwitchPortIdx);

Trigger the storage/reset of the configuration of the learned MAC/Port tables of a switch in a persistent manner and will be used by e.g. CDD.

Std_ReturnType EthSwt_StoreConfiguration(uint8 SwitchIdx);

Verifies the Switch Configuration depending on the HW-Architecture, HW-capability and the intended accuracy of this verification.

Std_ReturnType EthSwt_VerifyConfig(uint8 SwitchIdx, boolean* Result);

Generic API for writing the content of a transceiver register

Std_ReturnType EthSwt_WriteMmd(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 Mmd, uint16 RegIdx, uint16 RegVal);

Store the given port mirror configuration in a shadow buffer in the Ethernet switch driver for the given MirroredSwitchIdx.

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

Generic API for writing the content of a transceiver register

Std_ReturnType EthSwt_WriteTrcvRegister(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 RegIdx, uint16 RegVal);

Implementation specific structure of the post build configuration.

The interpretation of this value

Type for holding the management information received/transmitted on Switches (ports).

Provides information about all struct member elements. The ownership gives information whether EthSwt has finished its activities in providing all struct member elements.

Will be set from EthSwt and marks EthSwt_MgmtObject as valid or not. So the upper layer will be able to detect inconsistencies.

Holds information if upper layer or EthSwt is owner of mgmt_obj.

The EthSwt_PortMirrorCfgType specify the port mirror configuration which is set up per Ethernet switch. The configuration is written to the Ethernet switch driver by calling EthSwt_WritePortMirror Configuration. One port mirror configuration is maintained per Ethernet Switch.

Type to request or obtain the port mirroring state (enable/disable) for a particular port mirror configuration per Ethernet switch.

Status supervision used for Development Error Detection. The state shall be available for debugging.

EthTrcv

Indicates an wake-up request for the specified Ethernet Transceiver. The given TrcvMode indicates if the request is based on a remote request from the network (ETH_MODE_ACTIVE) or if the request is based on active user request (ETH_MODE_ACTIVE_WITH_WAKEUP_ REQUEST). The callback function Ccan be used to trigger integrator code that initiates a remote wake-up .(e.g. trigger a wake-up line for an active user request).

void <EthTrcvWakeUpCallout>(uint8 TrcvIdx, Eth_ModeType TrcvMode);

Service is called by EthIf in case a wake-up interrupt is detected.

Std_ReturnType EthTrcv_CheckWakeup(uint8 TrcvIdx);

Requests the Ethernet Transceiver Driver to create a Transmission Secure Association in the Transceiver. The Short Secure Channel Identifier is included to support XPN configurations. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_EthSwitchMacSecAddTxSa(uint8 TrcvIdx, uint8 An, uint64 NextPn, uint32 Ssci, const Mka_SakKeyPtrType* KeysPtr, boolean Active);

Requests the Ethernet Transceiver to update the SecY/PAC of the PHY with the provided parameters. A Transmission Secure Channel with the provided SCI shall be configured during the first call. A pointer to a MACsec Basic Parameters Configuration file shall be provided to create the Secure Channel. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_EthSwitchMacSecUpdateSecY(uint8 TrcvIdx, const Mka_MacSecConfigType* MACsecCfgPtr, uint64 TxSci);

Obtains the baud rate of the indexed transceiver

Std_ReturnType EthTrcv_GetBaudRate(uint8 TrcvIdx, EthTrcv_BaudRateType* BaudRatePtr);

This function returns the least recent wakeup reasons.

Std_ReturnType EthTrcv_GetBusWuReason(uint8 TrcvIdx, EthTrcv_WakeupReasonType* WakeupReasonPtr);

Retrieves the cable diagnostics result of a given transceiver.

Std_ReturnType EthTrcv_GetCableDiagnosticsResult(uint8 TrcvIdx, EthTrcv_CableDiagResultType* ResultPtr);

Obtains the duplex mode of the indexed transceiver

Std_ReturnType EthTrcv_GetDuplexMode(uint8 TrcvIdx, EthTrcv_DuplexModeType* DuplexModePtr);

Obtains the link state of the indexed transceiver

Std_ReturnType EthTrcv_GetLinkState(uint8 TrcvIdx, EthTrcv_LinkStateType* LinkStatePtr);

Obtains the media access mode of the transceiver when EthTrcvDuplexMode is configured as ETHTRCV_DUPLEX_MODE_HALF

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

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

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

Obtains the current signal quality of the link of the indexed transceiver

Std_ReturnType EthTrcv_GetPhySignalQuality(uint8 TrcvIdx, uint32* SignalQualityPtr);

Obtains the state of the indexed transceiver

Std_ReturnType EthTrcv_GetTransceiverMode(uint8 TrcvIdx, Eth_ModeType* TrcvModePtr);

Returns the wake up mode of t he indexed transceiver Tags: atp.Status=obsolete

Std_ReturnType EthTrcv_GetTransceiverWakeupMode(uint8 TrcvIdx, EthTrcv_WakeupModeType* TrcvWakeupModePtr);

Returns the version information of this module

void EthTrcv_GetVersionInfo(Std_VersionInfoType* VersionInfoPtr);
EthTrcv_Init fonction

Initializes the Ethernet Transceiver Driver

void EthTrcv_Init(const EthTrcv_ConfigType* CfgPtr);

Request the Ethernet Transceiver Driver to create a Reception Secure Association in the Transceiver. The Short Secure Channel Identifier is included to support XPN configurations. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecAddRxSa(uint8 TrcvIdx, uint8 An, uint64 LowestPn, uint32 Ssci, const Mka_SakKeyPtrType* KeysPtr, boolean Active);

Requests the Ethernet Transceiver Driver to create a Transmission Secure Association in the Transceiver. The Short Secure Channel Identifier is included to support XPN configurations. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecAddTxSa(uint8 TrcvIdx, uint8 An, uint64 NextPn, uint32 Ssci, const Mka_SakKeyPtrType* KeysPtr, boolean Active);

Request the Ethernet Transceiver Driver to remove the Reception Secure Association identified by the provided Association Number. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecDeleteRxSa(uint8 TrcvIdx, uint8 An);

Request the Ethernet Transceiver Driver to remove the Transmission Secure Association identified by the provided Association Number. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecDeleteTxSa(uint8 TrcvIdx, uint8 An);

Request the Ethernet Transceiver Driver to provide MACsec statistics. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecGetMacSecStats(uint8 TrcvIdx);

Request the Ethernet Transceiver Driver to return the Packet Number that is used for the next packet in the given Transmission Secure Association. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecGetTxSaNextPn(uint8 TrcvIdx, uint8 An, uint64* NextPnPtr);

Requests the Ethernet Transceiver Driver to configure a Reception Secure Channel for the given Secure Channel Identifier. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecInitRxSc(uint8 TrcvIdx, uint64 Sci);

Requests the Ethernet Transceiver Driver to reset to default the MACsec values of the Reception Secure Channel for the given Secure Channel Identifier. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecResetRxSc(uint8 TrcvIdx, uint64 Sci);

Requests to set the Controlled Port enabled parameter of a PAE. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecSetControlledPortEnabled(uint8 TrcvIdx, boolean ControlledPortEnabled);

Request the Ethernet Transceiver Driver to update the Reception Secure Association with the given Packet Number. The Active parameter is included to change the specified AN status. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecUpdateRxSa(uint8 TrcvIdx, uint8 An, uint64 LowestPn, boolean Active);

Requests the Ethernet Transceiver to update the SecY/PAC of the PHY with the provided parameters. A Transmission Secure Channel with the provided SCI shall be configured during the first call. A pointer to a MACsec Basic Parameters Configuration file shall be provided to create the Secure Channel. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecUpdateSecY(uint8 TrcvIdx, const Mka_MacSecConfigType* MACsecCfgPtr, uint64 TxSci);

Requests the Ethernet Transceiver Driver to update the Transmission Secure Association with the given Packet Number. The Active parameter is included to change the specified AN status. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_MacSecUpdateTxSa(uint8 TrcvIdx, uint8 An, uint64 NextPn, boolean Active);

Used for polling state changes and wakeup reasons. Calls EthIf_TrcvModeIndication when the transceiver mode changed. Stores wakeup events if EthTrcvWakeUpSupport is set to ETHTRCV_WAKEUP_BY_POLLING.

void EthTrcv_MainFunction(void);

Called when information has been read out via MII interface. Triggered by previous Eth_Read Mii call. Can directly be called within Eth_ReadMii.

void EthTrcv_ReadMiiIndication(uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint8 RegVal);

Trigger the cable diagnostics for the given Ethernet transceiver.

Std_ReturnType EthTrcv_RunCableDiagnostic(uint8 TrcvIdx);

Activates a given loopback mode.

Std_ReturnType EthTrcv_SetPhyLoopbackMode(uint8 TrcvIdx, EthTrcv_PhyLoopbackModeType Mode);

Activates a given test mode.

Std_ReturnType EthTrcv_SetPhyTestMode(uint8 TrcvIdx, EthTrcv_PhyTestModeType Mode);

Activates a given transmission mode.

Std_ReturnType EthTrcv_SetPhyTxMode(uint8 TrcvIdx, EthTrcv_PhyTxModeType Mode);

Enables / disables the indexed transceiver

Std_ReturnType EthTrcv_SetTransceiverMode(uint8 TrcvIdx, Eth_ModeType TrcvMode);

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

Std_ReturnType EthTrcv_SetTransceiverWakeupMode(uint8 TrcvIdx, EthTrcv_WakeupModeType TrcvWakeupMode);

Restarts the negotiation of the transmission parameters used by the indexed transceiver

Std_ReturnType EthTrcv_StartAutoNegotiation(uint8 TrcvIdx);

Request the Ethernet Transceiver Driver to create a Reception Secure Association in the Transceiver. The Short Secure Channel Identifier is included to support XPN configurations. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_SwitchMacSecAddRxSa(uint8 TrcvIdx, uint8 An, uint64 LowestPn, uint32 Ssci, const Mka_SakKeyPtrType* KeysPtr, boolean Active);

Request the Ethernet Transceiver Driver to provide MACsec statistics. Tags: atp.Status=DRAFT

Std_ReturnType EthTrcv_SwitchMacSecGetMacSecStats(uint8 TrcvIdx, const Mka_Stats_SecYType* MacSecStats);

Request the given link state for the given transceiver

Std_ReturnType EthTrcv_TransceiverLinkStateRequest(uint8 TrcvIdx, EthTrcv_LinkStateType LinkState);

Called when information has been written via MII interface. Triggered by previous Eth_WriteMii call. Can directly be called within Eth_WriteMii.

void EthTrcv_WriteMiiIndication(uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx);

This type defines the Ethernet baud rate. The baud rate gets either negotiated between the connected transceivers or has to be configured.

Describes the results of the cable diagnostics.

Implementation specific structure of the post build configuration

This type defines the Ethernet duplex mode. The duplex mode gets either negotiated between the connected transceivers or has to be configured.

This type defines the Ethernet link state. The link state changes after an Ethernet cable gets plugged in and the transceivers on both ends negotiated the transmission parameters (i.e. baud rate and duplex mode)

This type defines the media access control type in half duplex. If ETHTRCV_MAC_TYPE_PLCA is configured, PLCA is supported and the parameters listed in ECUC_EthTrcv_00055 have to be configured. Tags: atp.Status=draft

Describes the possible PHY loopback modes

Describes the possible PHY test modes

Describes the possible PHY transmit modes

Status supervision used for Development Error Detection. The state shall be available for debugging.

This type controls the transceiver wake up modes and/ or clears the wake - up reason. Tags: atp.Status=obsolete

This type defines the transceiver wake up reasons.

Sd

This callout is invoked to determine whether the configuration options contained in a received SD message match the ones configured in the local SD configuration (i.e., SdServerCapability Record or SdClientCapabilityRecord).

boolean <SdCapabilityRecordMatchCallout>(PduIdType pduID, uint8 type, uint16 serviceID, uint16 instanceID, uint8 majorVersion, uint32 minorVersion, const Sd_ConfigOptionStringType* receivedConfigOptionPtrArray, const Sd_ConfigOptionStringType* configuredConfigOptionPtrArray);

Enabling or Disabling ACL policy check for all service instance

Std_ReturnType Sd_AclCheckEnable(boolean EnableAcl);
Sd_AclUpdate fonction

Update Service ACL SdClientServiceAllowedProviders or SdServerServiceAllowedConsumers depending on Client or Server service by adding or removing this IP address. Tags: atp.Status=draft

Std_ReturnType Sd_AclUpdate(uint16 SdServiceId, uint16 ServiceInstanceId, const TcpIp_SockAddrType* RemoteAddrPtr, Sd_AclUpdateType RequestType);
Sd_Init fonction

Initializes the Service Discovery.

void Sd_Init(const Sd_ConfigType* ConfigPtr);

Callback function, which will be provided to SoAd to be able to trigger the ACL policy check or explicitly grant access on the received Method call request Tags: atp.Status=draft

Std_ReturnType Sd_RequestRoutingGroupEnable(uint32 PduHeaderID, SoAd_SoConIdType SoConId, SoAd_RoutingGroupIdType RoutingGroupId);

Indication of a received PDU from a lower layer communication interface module.

void Sd_RxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);

Starts a preconfigured SdServiceGroup. For example, OfferService entries will be sent out after the call of Sd_ServiceGroupStart() for all ServerServives of a SdServiceGroup, which are not requested yet.

void Sd_ServiceGroupStart(Sd_ServiceGroupIdType ServiceGroupId);

Notification about a SoAd socket connection state change, e.g. socket connection gets online

void Sd_SoConModeChg(SoAd_SoConIdType SoConId, SoAd_SoConModeType Mode);

This type defines the modes to indicate the current mode request of a Client Service.

This type defines the Client states that are reported to the BswM using the expected API Sd_Client ServiceSetState.

Type for a zero-terminated string of configuration options.

Configuration data structure of Sd module.

This type defines the subscription policy by consumed EventGroup for the Client Service.

This type defines the subscription policy by consumed EventGroup for the Client Service.

This type defines the subscription policy by EventHandler for the Server Service.

This type defines the Server states that are reported to the SD using the expected API Sd_Server ServiceSetState.

The AUTOSAR ServiceDiscovery module's SdServiceGroup object identifier.

SoAd

This service closes the socket connection specified by SoConId.

Std_ReturnType SoAd_CloseSoCon(SoAd_SoConIdType SoConId, boolean abort);

This service requests to copy data for transmission to the buffer indicated. This call is triggered by TcpIp_Transmit(). Note: The call to <Up>_CopyTxData() may happen in the context of Tcp Ip_Transmit().

BufReq_ReturnType SoAd_CopyTxData(TcpIp_SocketIdType SocketId, uint8* BufPtr, uint16 BufLength);

Disables routing of a group of PDUs in the SoAd related to the RoutingGroup specified by parameter id. Routing of PDUs can be either forwarding of PDUs from the upper layer to a TCP or UDP socket of the TCP/IP stack specified by a PduRoute or the other way around specified by a SocketRoute.

Std_ReturnType SoAd_DisableRouting(SoAd_RoutingGroupIdType id);

Disables routing of a group of PDUs in the SoAd related to the RoutingGroup specified by parameter id only on the socket connection identified by SoConId.

Std_ReturnType SoAd_DisableSpecificRouting(SoAd_RoutingGroupIdType id, SoAd_SoConIdType SoConId);

Enables routing of a group of PDUs in the SoAd related to the RoutingGroup specified by parameter id. Routing of PDUs can be either forwarding of PDUs from the upper layer to a TCP or UDP socket of the TCP/IP stack specified by a PduRoute or the other way around specified by a SocketRoute.

Std_ReturnType SoAd_EnableRouting(SoAd_RoutingGroupIdType id);

Enables routing of a group of PDUs in the SoAd related to the RoutingGroup specified by parameter id only on the socket connection identified by SoConId.

Std_ReturnType SoAd_EnableSpecificRouting(SoAd_RoutingGroupIdType id, SoAd_SoConIdType SoConId);

Allows to read and reset detailed measurement data for diagnostic purposes. Get all MeasurementIdx's at once is not supported. SOAD_MEAS_ALL shall only be used to reset all MeasurementIdx's at once. A NULL_PTR shall be provided for MeasurementDataPtr in this case.

Std_ReturnType SoAd_GetAndResetMeasurementData(SoAd_MeasurementIdxType MeasurementIdx, boolean MeasurementResetNeeded, uint32* MeasurementDataPtr);

Retrieves the local address (IP address and port) actually used for the SoAd socket connection specified by SoConId, the netmask and default router

Std_ReturnType SoAd_GetLocalAddr(SoAd_SoConIdType SoConId, TcpIp_SockAddrType* LocalAddrPtr, uint8* NetmaskPtr, TcpIp_SockAddrType* DefaultRouterPtr);

Retrieves the physical source address of the EthIf controller used by the SoAd socket connection specified by SoConId.

Std_ReturnType SoAd_GetPhysAddr(SoAd_SoConIdType SoConId, uint8* PhysAddrPtr);

Retrieves the remote address (IP address and port) actually used for the SoAd socket connection specified by SoConId

Std_ReturnType SoAd_GetRemoteAddr(SoAd_SoConIdType SoConId, TcpIp_SockAddrType* IpAddrPtr);

Returns socket connection index related to the specified TxPduId.

Std_ReturnType SoAd_GetSoConId(PduIdType TxPduId, SoAd_SoConIdType* SoConIdPtr);

Returns current state of the socket connection specified by SoConId.

void SoAd_GetSoConMode(SoAd_SoConIdType SoConId, SoAd_SoConModeType* ModePtr);

Returns the version information.

void SoAd_GetVersionInfo(Std_VersionInfoType* versioninfo);

Triggers the transmission of all If-TxPDUs identified by the parameter id after requesting the data from the related upper layer.

Std_ReturnType SoAd_IfRoutingGroupTransmit(SoAd_RoutingGroupIdType id);

Triggers the transmission of all If-TxPDUs identified by the parameter id on the socket connection specified by SoConId after requesting the data from the related upper layer.

Std_ReturnType SoAd_IfSpecificRoutingGroupTransmit(SoAd_RoutingGroupIdType id, SoAd_SoConIdType SoConId);

Requests transmission of a PDU.

Std_ReturnType SoAd_IfTransmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);
SoAd_Init fonction

Initializes the Socket Adaptor.

void SoAd_Init(const SoAd_ConfigType* SoAdConfigPtr);

API allows to check if a communication over this socket connection is possible for a dedicated remote address. It includes that the socket connection is bound to a socket, a physical address is available for the requested remote address and if a security association is configured that a secured connection is already established.

TcpIp_ReturnType SoAd_IsConnectionReady(SoAd_SoConIdType SoConId, const TcpIp_SockAddrType* RemoteAddrPtr);

This service gets called by the TCP/IP stack if an IP address assignment changes (i.e. new address assigned or assigned address becomes invalid).

void SoAd_LocalIpAddrAssignmentChg(TcpIp_LocalAddrIdType IpAddrId, TcpIp_IpAddrStateType State);

Schedules the Socket Adaptor. (Entry point for scheduling)

void SoAd_MainFunction(void);

This service opens the socket connection specified by SoConId.

Std_ReturnType SoAd_OpenSoCon(SoAd_SoConIdType SoConId);

By this API service an upper layer of the SoAd can read the currently configured hostname, i.e. FQDN option in the DHCP submodule of the TCP/IP stack.

Std_ReturnType SoAd_ReadDhcpHostNameOption(SoAd_SoConIdType SoConId, uint8* length, uint8* data);

By this API service the local IP address assignment used for the socket connection specified by SoConId is released.

Std_ReturnType SoAd_ReleaseIpAddrAssignment(SoAd_SoConIdType SoConId);

By this API service the remote address (IP address and port) of the specified socket connection shall be released, i.e. set back to the configured remote address setting.

void SoAd_ReleaseRemoteAddr(SoAd_SoConIdType SoConId);

By this API service the local IP address assignment which shall be used for the socket connection specified by SoConId is initiated.

Std_ReturnType SoAd_RequestIpAddrAssignment(SoAd_SoConIdType SoConId, TcpIp_IpAddrAssignmentTypeType, const TcpIp_SockAddrType* LocalIpAddrPtr, uint8 Netmask, const TcpIp_SockAddrType* DefaultRouterPtr);

The TCP/IP stack calls this primitive after the reception of data on a socket. The socket identifier along with configuration information determines which module is to be called.

void SoAd_RxIndication(TcpIp_SocketIdType SocketId, const TcpIp_SockAddrType* RemoteAddrPtr, const uint8* BufPtr, uint16 Length);

By this API service the remote address (IP address and port) of the specified socket connection shall be set.

Std_ReturnType SoAd_SetRemoteAddr(SoAd_SoConIdType SoConId, const TcpIp_SockAddrType* RemoteAddrPtr);

This API service shall either return the socket connection index of the SoAdSocketConnection Group where the specified remote address (IP address and port) is set or assign the remote address to an unused socket connection from the same SoAdSocketConnectionGroup.

Std_ReturnType SoAd_SetUniqueRemoteAddr(SoAd_SoConIdType SoConId, const TcpIp_SockAddrType* RemoteAddrPtr, SoAd_SoConIdType* AssignedSoConIdPtr);

This service gets called if the stack put a socket into the listen mode before (as server) and a peer connected to it (as client). In detail: The TCP/IP stack calls this function after a socket was set into the listen state with TcpIp_TcpListen() and a TCP connection is requested by the peer.

Std_ReturnType SoAd_TcpAccepted(TcpIp_SocketIdType SocketId, TcpIp_SocketIdType SocketIdConnected, const TcpIp_SockAddrType* RemoteAddrPtr);

This service gets called if the stack initiated a TCP connection before (as client) and the peer (the server) acknowledged the connection set up. In detail: The TCP/IP stack calls this function after a socket was requested to connect with TcpIp_TcpConnect() and a TCP connection is confirmed by the peer. The parameter value of SocketId equals the SocketId value of the preceeding TcpIp_TcpConnect() call.

void SoAd_TcpConnected(TcpIp_SocketIdType SocketId);

of the event just encountered. Parameters (inout) None Parameters (out) None Return value None Description This service gets called if the stack encounters a condition described by the values in Event.

void SoAd_TcpIpEvent(TcpIp_SocketIdType SocketId, TcpIp_EventType Event);

Requests cancellation of an ongoing reception of a PDU in a lower layer transport protocol module.

Std_ReturnType SoAd_TpCancelReceive(PduIdType RxPduId);

Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module.

Std_ReturnType SoAd_TpCancelTransmit(PduIdType TxPduId);

Request to change a specific transport protocol parameter (e.g. block size).

Std_ReturnType SoAd_TpChangeParameter(PduIdType id, TPParameterType parameter, uint16 value);

Requests transmission of a PDU.

Std_ReturnType SoAd_TpTransmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);

The TCP/IP stack calls this function after the data has been acknowledged by the peer for TCP. Caveats: The upper layer might not be able to determine exactly which data bytes have been confirmed.

void SoAd_TxConfirmation(TcpIp_SocketIdType SocketId, uint16 Length);

By this API service an upper layer of the SoAd can set the hostname, i.e. FQDN option in the DHCP submodule of the TCP/IP stack.

Std_ReturnType SoAd_WriteDhcpHostNameOption(SoAd_SoConIdType SoConId, uint8 length, const uint8* data);

Indication of a received PDU from a lower layer communication interface module.

void <Up>_ [ SoAd ][ If ] RxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);

Within this API, the upper layer module (called module) shall check whether the available data fits into the buffer size reported by PduInfoPtr->SduLength. If it fits, it shall copy its data into the buffer provided by PduInfoPtr->SduDataPtr and update the length of the actual copied data in PduInfoPtr->SduLength. If not, it returns E_NOT_OK without changing PduInfoPtr.

Std_ReturnType <Up>_ [ SoAd ][ If ] TriggerTransmit(PduIdType TxPduId, PduInfoType* PduInfoPtr);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

void <Up>_ [ SoAd ][ If ] TxConfirmation(PduIdType TxPduId, Std_ReturnType result);

This function is called to provide the received data of an I-PDU segment (N-PDU) to the upper layer. Each call to this function provides the next part of the I-PDU data. The size of the remaining buffer is written to the position indicated by bufferSizePtr.

BufReq_ReturnType <Up>_ [ SoAd ][ Tp ] CopyRxData(PduIdType id, const PduInfoType* info, PduLengthType* bufferSizePtr);

This function is called to acquire the transmit data of an I-PDU segment (N-PDU). Each call to this function provides the next part of the I-PDU data unless retry->TpDataState is TP_ DATARETRY. In this case the function restarts to copy the data beginning at the offset from the current position indicated by retry->TxTpDataCnt. The size of the remaining data is written to the position indicated by availableDataPtr.

BufReq_ReturnType <Up>_ [ SoAd ][ Tp ] CopyTxData(PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);

This function is called at the start of receiving an N-SDU. The N-SDU might be fragmented into multiple N-PDUs (FF with one or more following CFs) or might consist of a single N-PDU (SF). The service shall provide the currently available maximum buffer size when invoked with TpSdu Length equal to 0.

BufReq_ReturnType <Up>_ [ SoAd ][ Tp ] StartOfReception(PduIdType id, const PduInfoType* info, PduLengthType TpSduLength, PduLengthType* bufferSizePtr);

Called after an I-PDU has been received via the TP API, the result indicates whether the transmission was successful or not.

void <Up>_ [ SoAd ][ Tp ] TpRxIndication(PduIdType id, Std_ReturnType result);

This function is called after the I-PDU has been transmitted on its network, the result indicates whether the transmission was successful or not.

void <Up>_ [ SoAd ][ Tp ] TpTxConfirmation(PduIdType id, Std_ReturnType result);

This function gets called by the SoAd if an IP address assignment related to a socket connection changes (i.e. new address assigned or assigned address becomes invalid).

void <Up>_LocalIpAddrAssignmentChg(SoAd_SoConIdType SoConId, TcpIp_IpAddrStateType State);

Notification about a SoAd socket connection state change, e.g. socket connection gets online

void <Up>_SoConModeChg(SoAd_SoConIdType SoConId, SoAd_SoConModeType Mode);

Configuration data structure of the SoAd module.

Index to select specific measurement data

RoutingGroup identifier type for unique identification of a SoAd routing group. The size of this type depends on the maximum number of routing groups which is specified by configuration parameter SoAdRoutingGroupMax.

SoCon identifier type for unique identification of a SoAd socket connection. The size of this type depends on the maximum number of socket connections which is specified by configuration parameter SoAdSoConMax.

type to specify the state of a SoAd socket connection.

SomeIpTp

Returns the version information of this module.

void SomeIpTp_GetVersionInfo(Std_VersionInfoType* VersionInfo);
SomeIpTp_Init fonction

Initializes the SOME/IP TP module.

void SomeIpTp_Init(const SomeIpTp_ConfigType* config);

This function performs the processing of the AUTOSAR SOME/IP TP module's reception activities.

void SomeIpTp_MainFunctionRx(void);

This function performs the processing of the AUTOSAR SOME/IP TP module's transmission activities.

void SomeIpTp_MainFunctionTx(void);

Indication of a received PDU from a lower layer communication interface module.

void SomeIpTp_RxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);

Requests transmission of a PDU.

Std_ReturnType SomeIpTp_Transmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);

Within this API, the upper layer module (called module) shall check whether the available data fits into the buffer size reported by PduInfoPtr->SduLength. If it fits, it shall copy its data into the buffer provided by PduInfoPtr->SduDataPtr and update the length of the actual copied data in PduInfoPtr->SduLength. If not, it returns E_NOT_OK without changing PduInfoPtr.

Std_ReturnType SomeIpTp_TriggerTransmit(PduIdType TxPduId, PduInfoType* PduInfoPtr);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

void SomeIpTp_TxConfirmation(PduIdType TxPduId, Std_ReturnType result);

This type shall contain at least all parameters that are post-build able according to chapter 10.

TcpIp

This service requests to copy data for transmission to the buffer indicated. This call is triggered by Tcp Ip_ Transmit(). Note: The call to _ Copy Tx Data() may happen in the context of Tcp Ip_ Transmit().

BufReq_ReturnType <Up_CopyTxData> (TcpIp_SocketIdType SocketId, uint8* BufPtr, uint16 BufLength);

This API is called by Tcp Ip in case the Duplicate Address Detection (DAD) is enabled and detecting a duplicate IP Address.

void <Up_DADAddressConflict> (TcpIp_LocalAddrIdType IpAddrId, const TcpIp_SockAddrType* IpAddrPtr, const uint8* LocalPhysAddrPtr, const uint8* RemotePhysAddrPtr);

By this API service the configured ICMP message handler function is called by the TCP/ IP stack on reception of a ICMP message which is not handled by the TCP/ IP stack.

void <Up_IcmpMsgHandler> (TcpIp_LocalAddrIdType LocalAddrId, const TcpIp_SockAddrType* RemoteAddrPtr, uint8 Ttl, uint8Type, uint8 Code, uint16 DataLength, uint8* DataPtr); ⚠️

This service gets called by the TCP/ IP stack if an IP address assignment changes (i.e. new address assigned or assigned address becomes invalid).

void <Up_LocalIpAddrAssignmentChg> (TcpIp_LocalAddrIdType IpAddrId, TcpIp_IpAddrStateType State);

This API is called by Tcp Ip in case of a change in the ARP/ NDP table related to the controller specified by Ctrl Idx.

void <Up_PhysAddrTableChg> (uint8 CtrlIdx, const TcpIp_SockAddrType* IpAddrPtr, const uint8* PhysAddrPtr, boolean valid);

The TCP/ IP stack calls this primitive after the reception of data on a socket. The socket identifier along with configuration information determines which module is to be called.

void <Up_RxIndication> (TcpIp_SocketIdType SocketId, const TcpIp_SockAddrType* RemoteAddrPtr, const uint8* BufPtr, uint16 Length);

This service gets called if the stack put a socket into the listen mode before (as server) and a peer connected to it (as client). In detail: T he TCP/ IP stack calls this function after a socket was set into the listen state with Tcp Ip_ Tcp Listen() and a TCP connection is requested by the peer.

Std_ReturnType <Up_TcpAccepted> (TcpIp_SocketIdType SocketId, TcpIp_SocketIdType SocketIdConnected, const TcpIp_SockAddrType* RemoteAddrPtr);

This service gets called if the stack initiated a TCP connection before (as client) and the peer (the server) acknowledged the connection set up. In detail: The TCP/ IP stack calls this function after a socket was requested to connect with Tcp Ip_ Tcp Conn ect() and a TCP connection is confirmed by the peer. The parameter value of Socket Id equals the Socket Id value of the preceeding Tcp Ip_ Tcp Connect() call.

void <Up_TcpConnected> (TcpIp_SocketIdType SocketId);

Service .

Std_ReturnType <Up_TlsClientGetPskIdentity> (TcpIp_SocketIdType SocketId, TcpIp_TlsConnectionIdType TlsConnectionId, uint16 PskIdentityHintLength, const uint8* PskIdentityHintPtr, uint16* PskKeyIdentityLengthPtr, uint8* PskKeyIdentityPtr, uint32* CsmKeyId);

This function queries the current time. This information will be requested when assembling the client hello message.

Std_ReturnType <Up_TlsGetCurrentTime> (uint32* CurrentTimeUtc);

This callback is used for the TLS server to provide the CSM key name according to the key identification that was selected by the TLS client. The TLS server must provide a CSM Key reference to a key that matches this key identification name.

Std_ReturnType <Up_TlsServerGetPskIdentity> (TcpIp_SocketIdType SocketId, TcpIp_TlsConnectionIdType TlsConnectionId, uint16 PskKeyIdentityLength, const uint8* PskKeyIdentityPtr, uint32* CsmKeyId);

Queries the Identity hint for a pr e - shared key ciphersuite. This information is transmitted by the TLS Server to provide its identification to the TLS client.

Std_ReturnType <Up_TlsServerGetPskIdentityHint> (TcpIp_SocketIdType SocketId, TcpIp_TlsConnectionIdType TlsConnectionId, uint16* IdentityHintLengthPtr, uint8* IdentityHintPtr);

The TCP/ IP stack calls this function after the data has been acknowledged by the peer for TCP. Caveats: The upper layer might not be able to determine exactly which data bytes have been confirmed.

void <Up_TxConfirmation> (TcpIp_SocketIdType SocketId, uint16 Length);
TcpIp_Bind fonction

Service TcpIp_Bind.

Std_ReturnType TcpIp_Bind (TcpIp_SocketIdType SocketId, TcpIp_LocalAddrIdType LocalAddrId, uint16* PortPtr);

By this API service the TCP/ IP stack is requested to change a parameter of a socket. E.g. the Nagle algorithm may be controlled by this API.

Std_ReturnType TcpIp_ChangeParameter (TcpIp_SocketIdType SocketId, TcpIp_ParamIdType ParameterId, const uint8* ParameterValue);
TcpIp_Close fonction

By this API service the TCP/ IP stack is requested to close the socket and release all related resources.

Std_ReturnType TcpIp_Close (TcpIp_SocketIdType SocketId, boolean Abort);

By this API service the TCP/ IP stack retrieves DHCP option data identified by parameter option for already received DHCP options.

Std_ReturnType TcpIp_DhcpReadOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint8 Option, uint8* DataLength, uint8* DataPtr);

By this API service the TCP/ IP stack retrieve s DHCPv6 option data identified by parameter option for already received DHCPv6 options.

Std_ReturnType TcpIp_DhcpV6ReadOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint16 Option, uint16* DataLength, uint8* DataPtr);

By this API service the TCP/ IP stack writes the DHCPv6 option data identified by parameter option.

Std_ReturnType TcpIp_DhcpV6WriteOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint16 Option, uint16 DataLength, const uint8* DataPtr);

By this API service the TCP/ IP stack writes the DHCP option data identified by parameter option.

Std_ReturnType TcpIp_DhcpWriteOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint8 Option, uint8 DataLength, const uint8* DataPtr);

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

Std_ReturnType TcpIp_GetAndResetMeasurementData (TcpIp_MeasurementIdxType MeasurementIdx, boolean MeasurementResetNeeded, uint32* MeasurementDataPtr);

Copies entries from the physic al address cache of the IPv4 instance that is active on the Eth If controller specified by ctrl Idx into a user provided buffer. The function will copy all or number Of

Std_ReturnType TcpIp_GetArpCacheEntries (AUTO SAR CP R20 - of uint8 ctrlIdx, uint32* numberOfElements, TcpIp_ArpCacheEntryType* entryListPtr); ⚠️

Tcp Ip_ Get Ctrl Idx returns the index of the controller related to Local Addr Id.

Std_ReturnType TcpIp_GetCtrlIdx (TcpIp_LocalAddrIdType LocalAddrId, uint8* CtrlIdxPtr);

Service TcpIp_GetIpAddr.

Std_ReturnType TcpIp_GetIpAddr (TcpIp_LocalAddrIdType LocalAddrId, TcpIp_SockAddrType* IpAddrPtr, uint8* NetmaskPtr, TcpIp_SockAddrType* DefaultRouterPtr);

Copies entries from the physic al address cache of the IPv6 instance that is active on the Eth If controller specified by ctrl Idx into a user provided buffer. The function will copy all or number Of

Std_ReturnType TcpIp_GetNdpCacheEntries (uint8 ctrlIdx, uint32* numberOfElements, TcpIp_NdpCacheEntryType* entryListPtr);

Obtains the physical source address used by the Eth If controller implicitly specif ied via Local Addr Id.

Std_ReturnType TcpIp_GetPhysAddr (TcpIp_LocalAddrIdType LocalAddrId, uint8* PhysAddrPtr);

Tcp Ip_ Get Remote Phys Addr queries the IP/ physical address translation table specified by Ctrl Idx and returns the physical address related to the IP addres s specified by Ip Addr Ptr. In case no physical address can be retrieved and parameter init Res is TRUE, address resolution for the specified IP address is initiated on the local network.

TcpIp_ReturnType TcpIp_GetRemotePhysAddr (uint8 CtrlIdx, const TcpIp_SockAddrType* IpAddrPtr, uint8* PhysAddrPtr, boolean InitRes);

Returns the version information.

void TcpIp_GetVersionInfo (Std_VersionInfoType* versioninfo);

Service TcpIp_IcmpTransmit.

Std_ReturnType TcpIp_IcmpTransmit (TcpIp_LocalAddrIdType LocalIpAddrId, AUTO SAR CP R20 - of const TcpIp_SockAddrType* RemoteAddrPtr, uint8 Ttl, uint8Type, uint8 Code, uint16 DataLength, const uint8* DataPtr); ⚠️

By this API service the TCP/ IP stack sends an ICMPv6 message according to the specified parameters.

Std_ReturnType TcpIp_IcmpV6Transmit (TcpIp_LocalAddrIdType LocalIpAddrId, const TcpIp_SockAddrType* RemoteAddrPtr, uint8 HopLimit, uint8Type, uint8 Code, uint16 DataLength, const uint8* DataPtr); ⚠️
TcpIp_Init fonction

This service initializes the TCP/ IP Stack. Tcp Ip_ Init may not block the start - up process for an indefinite amount of time. Caveats: The call of this service is mandatory before using the Tcp Ip instance for further processing.

void TcpIp_Init (const TcpIp_ConfigType* ConfigPtr);

Schedules the TCP/ IP stack. (Entry point for scheduling) AUTO SAR CP R20 - of Document ID : AUTOSAR_SWS_TcpIp

void TcpIp_MainFunction (void);

By this API service the local IP address assignment for the IP address specified by Local Addr Id shall be released.

Std_ReturnType TcpIp_ReleaseIpAddrAssignment (TcpIp_LocalAddrIdType LocalAddrId);

By this API service the TCP/ IP stack is requested to change the Tcp Ip state of the communication network identified by Eth If controller index.

Std_ReturnType TcpIp_RequestComMode (uint8 CtrlIdx, TcpIp_StateType State);

Service TcpIp_RequestIpAddrAssignment.

Std_ReturnType TcpIp_RequestIpAddrAssignment (TcpIp_LocalAddrIdType LocalAddrId, TcpIp_IpAddrAssignmentTypeType, const TcpIp_SockAddrType* LocalIpAddrPtr, uint8 Netmask, const TcpIp_SockAddrType* DefaultRouterPtr);

Resets all learned IP - addresses to invalid values.

Std_ReturnType TcpIp_ResetIpAssignment (void);

By this API service the TCP/ IP stack gets an indication and the data of a received frame.

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

B y this API service the TCP/ IP stack is requested to establish a TCP connection to the configured peer.

Std_ReturnType TcpIp_TcpConnect (TcpIp_SocketIdType SocketId, const TcpIp_SockAddrType* RemoteAddrPtr);

By this API service the TCP/ IP stack is requested to listen on the TCP socket specified by the socket identifier. Available v ia Tcp Ip.h

Std_ReturnType TcpIp_TcpListen (TcpIp_SocketIdType SocketId, uint16 MaxChannels);

By this API service the reception of socket data is confirmed to the TCP/ IP stack.

Std_ReturnType TcpIp_TcpReceived (TcpIp_SocketIdType SocketId, uint32 Length);

Service TcpIp_TcpTransmit.

Std_ReturnType TcpIp_TcpTransmit (TcpIp_SocketIdType SocketId, const uint8* DataPtr, uint32 AvailableLength, boolean ForceRetrieve);

This service transmits data via UDP to a remote node. The transmission of the data is immediately performed with this function call by forwarding it to Eth If.

Std_ReturnType TcpIp_UdpTransmit (TcpIp_SocketIdType SocketId, const uint8* DataPtr, const TcpIp_SockAddrType* RemoteAddrPtr, uint16 TotalLength);

Tcp Ip_ Arp Cache Entries elements type

Configuration data structure of the Tcp Ip module.

Tcp Ip address families.

Events reported by Tcp Ip.

IPv6 address assignment policy.

Specifies the state of local IP a ddress assignment

Address identification type for unique identification of a local IP address and Eth If Controller configured in the Tcp Ip module.

Index to select specific measurement data

Tcp Ip_ Ndp Cache Entries elements type

Type TcpIp_ParamIdType.

Protocol type used by a socket.

Tcp Ip specific return type.

This structure defines a IPv6 address type which can be derived from the generic address structure via cast. AUTO SAR CP R20 - of Document ID : AUTOSAR_SWS_TcpIp

This structure defines an IPv4 address type which can be derived from the generic address structure via cast.

Generic structure used by APIs to specify an IP address. (A specific address type can be derived from this structure via a cast to the specific struct type.)

Socket identifier type for unique identification of a Tcp Ip stack socket. TCPIP_ SOCKETID_ INVALID shall specify an invalid socket handle.

Specifies the Tcp Ip state for a specific Eth If controller.

TLS connection identifier type for unique identification of a TLS connection. TCPIP_ TLSCONNECTIONID_ INVALID shall specify an invalid TLS connection handle.

IP6 address wildcard.

IP address wildcard.

Local Addr Id wildcard.

Port wildcard.

UdpNm

NM indicate to activate the transmission of PN shutdown messages on the given NM-Channel. This results in transmission of a NM-PDU with PNSR bit set to 1 (PN shutdown message). ▽ △

Std_ReturnType UdpNm_ActivateTxPnShutdownMsg(NetworkHandleType nmChannelHandle);

Check if remote sleep indication takes place or not. Cave ats: Udp Nm is initialized correctly. Configuration: Optional (only available if Udp Nm Remote Sleep Ind Enabled == true)

Std_ReturnType UdpNm_CheckRemoteSleepIndication(NetworkHandleType nmChannelHandle, boolean* NmRemoteSleepIndPtr);

NM indicate to deactive the transmission of PN shutdown messages on the given NM-Channel. This result in transmission of a usual NM-PDUs with PNSR bit set to 0.

Std_ReturnType UdpNm_DeactivateTxPnShutdownMsg(NetworkHandleType nmChannelHandle);

Disable the NM PDU transmission ability due to a ISO14229 Communication Control (0x28) service Caveats: Udp Nm is initialized correctly. Configuration: Optional (Only available if Udp Nm Com Control Enabled == true)

Std_ReturnType UdpNm_DisableCommunication(NetworkHandleType nmChannelHandle);

Enable the NM PDU transmission ability due to a ISO14229 Communication Control (0x28) service Caveats: Udp Nm is initialized correctly. Configuration: Optional (Only available if U dp Nm Com Control Enabled == true).

Std_ReturnType UdpNm_EnableCommunication(NetworkHandleType nmChannelHandle);

Service Name Udp Nm_ Get Local Node Identifier Syntax Std_ Return Type Udp Nm_ Get Local Node Identifier ( Network Handle Type nm Channel Handle, uint8* nm Node Id Ptr ) Service ID [hex] 0x07 Sync/ Async Synchronous Reentrancy Reentrant Parameters (in) nm Channel Handle Identification of the NM - channel Parameters (inout) None Parameters (out) nm Node Id Ptr Pointer where node identifier of the local node shall be copied to. Return value Std _ Return - Type E_ OK: No error E_ NOT_ OK: Getting of the node identifier of the local node has failed or is not configured for this network handle. Descri ption Get node identifier configured for the local node. Caveats: Udp Nm is initialized correctly. Available via Udp Nm.h

Std_ReturnType UdpNm_GetLocalNodeIdentifier(NetworkHandleType nmChannelHandle, uint8* nmNodeIdPtr);

Get node identifier from the most recently received NM PDU. Caveats: Udp Nm is initialized correctly.

Std_ReturnType UdpNm_GetNodeIdentifier(NetworkHandleType nmChannelHandle, uint8* nmNodeIdPtr);

Get the whole PDU data out of the most recently received NM message. Caveats: Udp Nm is initialized correctly.

Std_ReturnType UdpNm_GetPduData(NetworkHandleType nmChannelHandle, uint8* nmPduDataPtr);

Returns the state and the mode of the network management. Caveats: Udp Nm is initia lized correctly. Configuration: Mandatory

Std_ReturnType UdpNm_GetState(NetworkHandleType nmChannelHandle, Nm_StateType* nmStatePtr, Nm_ModeType* nmModePtr);

Get user data from the most recently received NM message. Cave ats: Udp Nm is initialized correctly. Configuration: Optional (Only available if Udp Nm User Data Enabled == true).

Std_ReturnType UdpNm_GetUserData(NetworkHandleType nmChannelHandle, uint8* nmUserDataPtr);

This service returns the version information of this module.

void UdpNm_GetVersionInfo(Std_VersionInfoType* versioninfo);
UdpNm_Init fonction

Initialize the complete Udp Nm module, i.e. all channels which are activated at configuration time are initialized. A UDP socket shall be set up with the TCP/ IP stack. Caveats: This function has to be called after initialization of the TCP/ IP stack. Configuration: Mandatory

void UdpNm_Init(const UdpNm_ConfigType* UdpNmConfigPtr);

Main function of the Udp Nm which processes the algorithm describes in that document. E.g.: Udp Nm_ Main Function_0() represents the Udp Nm instance for the UDP chann el 0 Udp Nm_ Main Function_1() represents the Udp Nm instance for the UDP channel 1

void UdpNm_MainFunction<Instance_Id>(void);

Release the network, since ECU doesn't have to communicate on the bus. Network state shall be changed to 'released'. Caveats: Udp Nm is initialized correctly. Configuration: Optional (Only available if Udp Nm Passive Mode Enabled == false)

Std_ReturnType UdpNm_NetworkRelease(NetworkHandleType nmChannelHandle);

Request the network, since ECU needs to communicate on the bus. Network state shall be changed to 'requested' Caveats: Udp Nm is initialized correctly. Configuration: Optional (Only available if Udp Nm Passive Mode Enabled == false)

Std_ReturnType UdpNm_NetworkRequest(NetworkHandleType nmChannelHandle);

Passive startup of the AUTOSAR Udp Nm. It triggers the transition from Bus - Sleep Mode or Prepare Bus Sleep Mode to the Network Mode in Repeat Message State. Caveats: Udp Nm is initialized correctly.

Std_ReturnType UdpNm_PassiveStartUp(NetworkHandleType nmChannelHandle);

Set Repeat Message Request Bit and Partial Network Learning Bit for NM messages tran smitted next on the bus. This will force all nodes on the bus to enter the PNC Learning Phase. This is needed for the optional Dynamic PNC - to - channel - mapping feature. Tags: atp.Status=draft

Std_ReturnType UdpNm_PnLearningRequest(NetworkHandleType nmChannelHandle);

Service to indicate that an NM message with set Repeat Message Re- quest Bit has been received. This is needed for node detection and PNC dynamic learning.

void UdpNm_RepeatMessageIndication(NetworkHandleType nmNetworkHandle);

Set Repeat Message Request Bit for all NM messages transmitted on the bus after this function has returned without error. Available vi a Udp Nm.h

Std_ReturnType UdpNm_RepeatMessageRequest(NetworkHandleType nmChannelHandle);

Request bus synchronization. Caveats: Udp Nm is initialized correctly. Configuration: Optional (only available if Udp Nm Bus Synchronization Enabled==true and Udp Nm Passive Mode Enabled ==false).

Std_ReturnType UdpNm_RequestBusSynchronization(NetworkHandleType nmChannelHandle);

Requests transmission of a NM - PDU with PNSR bit set to 1 (PN shutdown message) Tags: atp.Status=draft

Std_ReturnType UdpNm_RequestSynchronizedPncShutdown(NetworkHandleType nmChannelHandle, PNCHandleType pncId);

Set the NM Coordinator Sleep Ready bit in the Control Bit Vector

Std_ReturnType UdpNm_SetSleepReadyBit(NetworkHandleType nmChannelHandle, boolean nmSleepReadyBit);

Set user data for all NM messages transmitted on the bus after this function has returned without error. Caveats: Udp Nm is initialized correctly. Configuration: Optional (Only available if Udp Nm User Data Enabled==true and Udp Nm Passive Mode Enabled==false).

Std_ReturnType UdpNm_SetUserData(NetworkHandleType nmChannelHandle, const uint8* nmUserDataPtr);

Indication of a received PDU from a lower layer communication interface module.

void UdpNm_SoAdIfRxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);

Within this API, the upper layer module (called module) shall check whether the available data fits into the b uffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without ch anging Pdu Info Ptr.

Std_ReturnType UdpNm_SoAdIfTriggerTransmit(PduIdType TxPduId, PduInfoType* PduInfoPtr);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

void UdpNm_SoAdIfTxConfirmation(PduIdType TxPduId, Std_ReturnType result);

Requests transmission of a PDU.

Std_ReturnType UdpNm_Transmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);

Used to define the position of the control bit vector within the NM PACKET.

WEth

Provides access to a transmit buffer of the specified controller

BufReq_ReturnType WEth_ProvideTxBuffer(uint8 CtrlId, uint8 Priority, Eth_BufIdxType* BufIdPtr, uint8* * BufPtr, uint16* LenBytePtr);

Read out values related to the receive direction for a received packet. For example, this could be RSSI or Channel belonging to one single packet.This API is valid only within the context of WEth_ Receive

Std_ReturnType WEth_GetBufWRxParams(uint8 CtrlId, const WEth_BufWRxParamIdType* RxParamIds, uint32* ParamValues, uint8 NumParams);

Read out values related to the transmit direction for a transmitte d packet. For example, this could be transaction ID belonging to one single packet.This API is valid only within the context of WEth_ Tx Confirmation.

Std_ReturnType WEth_GetBufWTxParams(uint8 CtrlId, const WEth_BufWTxParamIdType* TxParamIds, uint32* ParamValues, uint8 NumParams);

Obtains the state of the indexed controller

Std_ReturnType WEth_GetControllerMode(uint8 CtrlId, Eth_ModeType* CtrlModePtr);

Obtains the physical source address used by the indexed controller

void WEth_GetPhysAddr(uint8 CtrlId, uint8* PhysAddrPtr);

Returns the version information of this module

void WEth_GetVersionInfo(Std_VersionInfoType* VersionInfoPtr);

Returns the following list according to IEEE 802.11 - 2012, where the maximal possible value shall denote an invalid value, e.g. if this counter is not available: 1. dot11STAStatistics Transmitted F ragment Count 2. dot11STAStatistics Group Transmitted Frame Count 3. dot11STAStatistics Failed Count 4. dot11STAStatistics Retry Count 5. dot11STAStatistics Multiple Retry Count 6. dot11STAStatistics Frame Duplicate Count 7. dot11STAStatistics RTSSuccess C ount 8. dot11STAStatistics RTSFailure Count 9. dot11STAStatistics ACKFailure Count 10. dot11STAStatistics Qos Transmitted Fragment Count 11. dot11STAStatistics Qos Failed Count 12. dot11STAStatistics Qos Retry Count 13. dot11STAStatistics Qos Multiple Retr y Count 14. dot11STAStatistics Qos Frame Duplicate Count 15. dot11STAStatistics Qos RTSSuccess Count 16. dot11STAStatistics Qos RTSFailure Count 17. dot11STAStatistics Qos ACKFailure Count 18. dot11STAStatistics Qos Received Fragment Count 19. dot11STAStat istics Qos Transmitted Frame Count 20. dot11STAStatistics Qos Discarded Frame Count 21. dot11STAStatistics Qos MPDUs Received Count 22. dot11STAStatistics Qos Retries Received Count 23. dot11STAStatistics Received Fragment Count 24. dot11STAStatistics Grou p Received Frame Count 25. dot11STAStatistics FCSError Count 26. dot11STAStatistics Transmitted Frame Count 27. dot11STAStatistics RSNAStats CMACICVErrors 28. dot11STAStatistics RSNAStats CMACReplays 29. dot11STAStatistics RSNAStats Robust Mgmt CCMPReplays 30. dot11STAStatistics RSNAStats TKIPICVErrors 31. dot11STAStatistics RSNAStats TKIPReplays 32. dot11STAStatistics RSNAStats CCMPDecrypt Errors 33. dot11STAStatistics RSNAStats CCMPReplays 34. dot11STAStatistics Transmitted AMSDUCount 35. dot11STAStatisti cs Failed AMSDUCount 36. dot11STAStatistics Retry AMSDUCount 37. dot11STAStatistics Multiple Retry AMSDUCount 38. dot11STAStatistics AMSDUAck Failure Count 39. dot11STAStatistics Received AMSDUCount 40. dot11STAStatistics Transmitted AMPDUCount 41. dot11ST AStatistics Transmitted MPDUs In AMPDUCount 42. dot11STAStatistics AMPDUReceived Count 43. dot11STAStatistics MPDUIn Received AMPDUCount 44. dot11STAStatistics AMPDUDelimiter CRCError Count 45. dot11STAStatistics Implicit BARFailure Count 46. dot11STAStati stics Explicit BARFailure Count 47. dot11STAStatistics Channel Width Switch Count 48. dot11STAStatistics Twenty MHz Frame Transmitted Count 49. dot11STAStatistics Forty MHz Frame Transmitted Count 50. dot11STAStatistics Twenty MHz Frame Received Count 51. dot11STAStatistics Forty MHz Frame Received Count 52. dot11STAStatistics PSMPUTTGrant Duration 53. dot11STAStatistics PSMPUTTUsed Duration 54. dot11STAStatistics Granted RDGUsed Count 55. dot11STAStatistics Granted RDGUnused Count 56. dot11STAStatistics Tr ansmitted Frames In Granted RDGCount 57. dot11STAStatistics Dual CTSSuccess Count 58. dot11STAStatistics Dual CTSFailure Count 59. dot11STAStatistics RTSLSIGSuccess Count 60. dot11STAStatistics RTSLSIGFailure Count 61. dot11STAStatistics Beamforming Frame Count 62. dot11STAStatistics STBCCTSSuccess Count 63. dot11STAStatistics STBCCTSFailure Count 64. dot11STAStatisticsnon STBCCTSSuccess Count 65. dot11STAStatisticsnon STBCCTSFailure Count

Std_ReturnType WEth_GetWEtherStats32(uint8 CtrlId, uint32* WEtherStats);

Returns the following list according to IEEE 802.11 - 2012, where the maximal possible value shall denote an invalid value, e.g. if this counter is not available: 1. dot11STAStatistics Transmitted Octets In AMSDUCount 2. dot11STAStatistics Receiv ed Octets In AMSDUCount 3. dot11STAStatistics Transmitted Octets In AMPDUCount 4. dot11STAStatistics Received Octets In AMPDUCount 5. dot11STAStatistics Transmitted Octets In Granted RDGCount

Std_ReturnType WEth_GetWEtherStats64(uint8 CtrlId, uint64* WEtherStats);

Request transmission of an Ethernet frame, where each upper layer a header part as element of a single linked list. All headers together with the payload form an entire Ethernet frame Tags: atp.Status=draft

Std_ReturnType WEth_ImmediateTransmit(uint8 CtrlIdx, Eth_BufIdxType TxHandleId, uint8 Priority, ListElemStructType* HeaderListPtr, uint8* PayloadPtr, uint16 PayloadLength);
WEth_Init fonction

Initializes the Wireless Ethernet Driver

void WEth_Init(const WEth_ConfigType* CfgPtr);

Support for indirect transmissions (extended frame timing constraints) and mechanisms for channel selection when using multiple channels. Used for polling state changes. Calls Eth If _ Ctrl Mode Indication when the controller mode changed.

void WEth_MainFunction(void);

Reads a transceiver register

Std_ReturnType WEth_ReadTrcvRegs(uint8 CtrlId, uint8 TrcvId, uint8 RadioId, const uint32* RegIds, uint32* RegValsPtr, uint8 NumRegs);
WEth_Receive fonction

Triggers frame reception.

void WEth_Receive(uint8 CtrlId, Eth_RxStatusType* RxStatusPtr);

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

Std_ReturnType WEth_SetBufWTxParams(uint8 CtrlId, Eth_BufIdxType BufId, const WEth_BufWTxParamIdType* TxParamIds, const uint32* ParamValues, uint8 NumParams);

Enables / disables the indexed controller

Std_ReturnType WEth_SetControllerMode(uint8 CtrlId, Eth_ModeType CtrlMode);

Sets the physical source address used by the indexed controller

void WEth_SetPhysAddr(uint8 CtrlId, const uint8* PhysAddrPtr);
WEth_Transmit fonction

Triggers transmission of a previously filled transmit buffer

Std_ReturnType WEth_Transmit(uint8 CtrlId, Eth_BufIdxType BufId, Eth_FrameType FrameType, boolean TxConfirmation, uint16 LenByte, const uint8* PhysAddrPtr);

Triggers transmission of a previously filled transmit buffer that is waiting in a software priority queue.

Std_ReturnType WEth_TriggerPriorityQueueTransmit(uint8 CtrlId, uint8 PriorityQueue, uint8 MaxTxPower);

Triggers frame transmission confirmation

void WEth_TxConfirmation(uint8 CtrlId);

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

Std_ReturnType WEth_UpdatePhysAddrFilter(uint8 CtrlId, const uint8* PhysAddrPtr, const uint8* PhysMaskPtr, Eth_FilterActionType Action);

Configures a transceivers registers or triggers a function offered by the receiver

Std_ReturnType WEth_WriteTrcvRegs(uint8 CtrlId, uint8 TrcvId, uint8 RadioId, const uint32* RegIds, const uint32* RegVals, uint8 NumRegs);

Wir eless radio parameters for a packet that has been received.

Wireless radio parameters for a packet that has to be transmitted.

Implementation specific structure of the post build configuration

WEthTrcv

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

Std_ReturnType WEthTrcv_GetChanRxParams(uint8* TrcvId, uint8 RadioId, const WEthTrcv_GetChanRxParamIdType* ParamIds, uint32* ParamValues, uint8 NumParams);

Obtains the link state of the indexed transceiver

Std_ReturnType WEthTrcv_GetLinkState(uint8 TrcvId, EthTrcv_LinkStateType* LinkStatePtr);

Ob tains the state of the indexed transceiver

Std_ReturnType WEthTrcv_GetTransceiverMode(uint8 TrcvId, Eth_ModeType* TrcvModePtr);

Returns the version information of this module

void WEthTrcv_GetVersionInfo(Std_VersionInfoType* VersionInfoPtr);
WEthTrcv_Init fonction

Initializes the Wireless Ethernet Transceiver Driver

void WEthTrcv_Init(const WEthTrcv_ConfigType* CfgPtr);

Used for polling state changes. Calls Eth If_ Trcv Mode Indication when the transceiver mode changed.

void WEthTrcv_MainFunction(void);

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

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

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

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

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

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

Enables / disables the indexed transceiver

Std_ReturnType WEthTrcv_SetTransceiverMode(uint8 TrcvId, Eth_ModeType TrcvMode);

Bandwidth of a radio channel

Implementation specific structure of the post build configuration

Wireless channel properties of the receive side

Radio operation mode with multiple radio channel configurations

Power of frame, in 0.5 d Bm units, raw value 0 equals - 100 d Bm

Wireless channel settings for the receive side

Wireless radio settings for the transceiver

Power of frame, in 0.5 d Bm units, raw value 0 equals - 100 d Bm

Guide du clusterGÉNÉRÉ PAR IA

Fournit des services réseau IP indépendants du matériel, l'abstraction de trames et le contrôle des pilotes pour la communication Ethernet.
GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 0af738a94164 Provenance Questions ouvertes (2)
Ancre causale : R20-11 Valable à partir de R20-11 Synthétisé pour cette version de spécification.
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Fournit des services réseau IP indépendants du matériel, l'abstraction de trames et le contrôle des pilotes pour la communication Ethernet.

Le cluster de modules Ethernet Services fournit avec Eth, EthIf et TcpIp l'infrastructure de communication standardisée pour les réseaux Ethernet dans AUTOSAR Classic ([SWS_Eth_00077], [SWS_TCPIP_00056]). Il gère les transmissions de données via un procédé de mise en mémoire tampon et de confirmation à deux niveaux, et achemine de manière transparente les trames entrantes vers les couches supérieures de sockets via des filtres VLAN et IP ([SWS_EthIf_00075], [SWS_TCPIP_00169]). Des modes de fonctionnement robustes, des routines de réveil TC10 et de nombreux compteurs de diagnostic RFC garantissent un fonctionnement déterministe du véhicule ([SWS_EthIf_00034], [SWS_Eth_00226]).

Le cluster de modules « Ethernet Services » fournit dans l'AUTOSAR Classic Platform (R20-11) la chaîne complète de protocoles et d'abstraction pour les réseaux de véhicules basés sur des paquets. Il comprend les modules Eth (pilote de contrôleur MCAL), EthIf (abstraction d'interface indépendante du matériel et gestion des VLAN) ainsi que TcpIp (couche réseau et transport avec IPv4/IPv6, TCP, UDP et ARP) ([SWS_Eth_00077], [SWS_EthIf_00075], [SWS_TCPIP_00056]). Par le biais d'interfaces standardisées, le cluster intègre des couches supérieures telles que le Socket Adaptor (SoAd) pour la communication orientée services et DoIP (SWS_TcpIp p. 123).

G UpperLayers Obere Schichten (SoAd, EthSM, EthTSyn, CDD) TcpIp TcpIp (Communication Services) UpperLayers->TcpIp Socket API / ComMode EthIf EthIf (ECU Abstraction Layer) UpperLayers->EthIf PDU / Mode / TimeSync TcpIp->EthIf Frames / PDU Transmission Eth Eth (MCAL Driver) EthIf->Eth Tx / Rx / CtrlMode EthSwt EthSwt (Switch Driver) EthIf->EthSwt PortMode / Counters EthTrcv EthTrcv (Transceiver Driver) EthIf->EthTrcv LinkState / SignalQuality Hardware Hardware (MAC, Switch-Hardware, PHY) Eth->Hardware DMA / MAC Register EthSwt->Hardware SPI / Switch Fabric EthTrcv->Hardware MII / MDIO Register

Diagramme de contexte : architecture en couches et contexte système du cluster Ethernet Services avec interactions des modules. Sources : SWS_TcpIp p. 123, AUTOSAR_SWS_EthernetInterface p. 87, [SWS_EthIf_00075]

Lors de l'émission, le chemin de données repose sur un concept coordonné de tampons : les couches supérieures demandent de manière synchrone des ressources matérielles via EthIf_ProvideTxBuffer(), à la suite de quoi Eth verrouille le tampon ([SWS_Eth_00077]). Après remplissage, EthIf_Transmit() déclenche l'émission, ajoute des balises VLAN et transmet les données au contrôleur MAC via Eth_Transmit() ([SWS_Eth_00087], [SWS_EthIf_00075]). L'acquittement s'effectue de manière asynchrone, soit par interruption, soit de manière cyclique via EthIf_MainFunctionTx() ([SWS_EthIf_00091], [SWS_EthIf_00115]). Les trames entrantes sont réceptionnées via EthIf_RxIndication() et, après validation du contrôleur et de l'adresse, transmises au socket compétent via <Up_RxIndication>() ([SWS_EthIf_00085], [SWS_TCPIP_00169], [SWS_TCPIP_00223]).

Déroulement de l'émission en mode scrutation et interruptionUpperLayerEthIfEthUse Case: 1. PufferallokationEthIf_ProvideTxBuffer(CtrlIdx, Priority, LenByte, ...)PufferanforderungEth_ProvideTxBuffer(CtrlIdx, Priority, ...)Hardware-Puffer anfordernBUFREQ_OK (BufIdx, BufPtr, LenByte)Puffer gesperrtBUFREQ_OK (BufIdx, BufPtr, LenByte)Puffer bereitgestelltUse Case: 2. Transmission des donnéesNutzdaten in Puffer kopierenEthIf_Transmit(CtrlIdx, BufIdx, FrameType, ...)SendeaufrufVérifier le balisage VLAN (0x8100)Eth_Transmit(CtrlIdx, BufIdx, FrameType, PhysAddrPtr)Frame aufbauen & triggernE_OKTransmission démarréeE_OKSendeauftrag akzeptiertUse Case: 3. Confirmation d'émission asynchronealtInterrupt-ModusEthIf_TxConfirmation(CtrlIdx, BufIdx, Result)depuis Eth_TxIrqHdlr_Polling-ModusEth_TxConfirmation(CtrlIdx)depuis EthIf_MainFunctionTx()EthIf_TxConfirmation(CtrlIdx, BufIdx, Result)Retour sur l'état du tampon<UL>_TxConfirmation(CtrlIdx, BufIdx)Confirmation d'émission & libération du tampon

Diagramme de séquence : allocation de tampons, transmission de données et confirmation d'émission asynchrone dans le cluster Ethernet. Sources : [SWS_Eth_00077], [SWS_Eth_00087], [SWS_EthIf_00075], [SWS_EthIf_00091]

Le cycle de vie et le fonctionnement du réseau sont gérés via les états du contrôleur (EthIf_SetControllerMode()) ainsi que les modes de communication (TcpIp_RequestComMode()) ([SWS_EthIf_00034], [SWS_TCPIP_00070]). Le cluster prend en charge les vérifications de réveil selon l'OPEN Alliance TC10 via EthIf_CheckWakeup() ([SWS_EthIf_00244], SWS_ECUStateManager p. 192). Pour le diagnostic et la détection d'erreurs, Eth et EthIf fournissent des compteurs d'erreurs RFC standardisés, des mesures de qualité de signal ainsi que des vérifications de durée d'exécution DET ([SWS_Eth_00226], [SWS_EthIf_91056], [SWS_Eth_00228]).

Architecture système et rôle du cluster de modules

Le cluster de modules « Ethernet Services » constitue, dans l'AUTOSAR Classic Platform (version R20-11), la colonne vertébrale fonctionnelle de la communication filaire basée sur les paquets via des réseaux Ethernet. Il couvre une chaîne d'abstraction continue allant des couches de pilotes proches du matériel de la couche d'abstraction des microcontrôleurs (MCAL) jusqu'aux protocoles normalisés de transport et d'acheminement Internet dans la couche des services de communication (Communication Services), en passant par la couche d'abstraction de calculateur. Le cluster répond aux exigences croissantes en matière de bande passante des architectures E/E modernes et intègre de manière transparente les protocoles de véhicule standard tels que les services de diagnostic sur IP (DoIP selon ISO 13400) ainsi que la communication orientée services (SOME/IP) dans le logiciel de base AUTOSAR en desservant les couches supérieures telles que le Socket Adaptor (SoAd) SWS_TcpIp p. 123.

Les trois modules centraux du cluster assument chacun des responsabilités architecturales clairement délimitées :

  • Ethernet Driver (Eth) : en tant que module MCAL, Eth pilote directement le contrôleur MAC Ethernet. Il gère les descripteurs de tampons d'émission et de réception proches du matériel, commande les interfaces de registres MII/MDIO pour la configuration des émetteurs-récepteurs ([SWS_Eth_00058]), active les règles de filtrage physique ([SWS_Eth_00152]) et fournit des horodatages matériels de haute précision pour les mécanismes de synchronisation temporelle globale ([SWS_Eth_00186], [SWS_Eth_00190]).
  • Ethernet Interface (EthIf) : constitue la couche d'abstraction centrale et découple les couches supérieures de la topologie matérielle physique. EthIf abstrait plusieurs contrôleurs Ethernet, commutateurs et émetteurs-récepteurs (PHY). Il prend en charge la gestion du LAN virtuel (marquage VLAN selon IEEE 802.1Q), le multiplexage par type de trame, l'affectation des tampons ainsi que l'agrégation des groupes de ports de commutateurs et des états de liaison ([SWS_EthIf_00075], [SWS_EthIf_91102], AUTOSAR_CP_SWS_EthernetInterface p. 213).
  • TCP/IP Stack (TcpIp) : implémente la suite de protocoles d'Internet en tant que service de communication. Le module comprend IPv4 et IPv6, l'attribution dynamique d'adresses via Auto-IP (RFC 3927) et DHCPv6 (RFC 3315) ([SWS_TCPIP_00057], [SWS_TCPIP_00166]), la résolution d'adresses via ARP (RFC 826) ([SWS_TCPIP_00056]), le transport sans connexion au moyen d'UDP ainsi que le transport de flux d'octets fiable et orienté connexion au moyen de TCP ([SWS_TCPIP_00050]). Il permet en outre le chiffrement du transport via TLS ([SWS_TCPIP_00300]).
G UpperLayers Obere Schichten (SoAd, EthSM, EthTSyn, CDD) TcpIp TcpIp (Communication Services) UpperLayers->TcpIp Socket API / ComMode EthIf EthIf (ECU Abstraction Layer) UpperLayers->EthIf PDU / Mode / TimeSync TcpIp->EthIf Frames / PDU Transmission Eth Eth (MCAL Driver) EthIf->Eth Tx / Rx / CtrlMode EthSwt EthSwt (Switch Driver) EthIf->EthSwt PortMode / Counters EthTrcv EthTrcv (Transceiver Driver) EthIf->EthTrcv LinkState / SignalQuality Hardware Hardware (MAC, Switch-Hardware, PHY) Eth->Hardware DMA / MAC Register EthSwt->Hardware SPI / Switch Fabric EthTrcv->Hardware MII / MDIO Register

Diagramme de contexte : architecture en couches et contexte système du cluster Ethernet Services avec interactions des modules. Sources : SWS_TcpIp p. 123, AUTOSAR_SWS_EthernetInterface p. 87, [SWS_EthIf_00075]

Synergie et chemins d'interaction entre les modules

La transmission de données (Transmission Path) repose sur un processus de demande de tampon et d'émission en deux étapes qui prend en charge une conception sans copie (zero-copy) des tampons de carte réseau. Une entité de protocole supérieure ou le module TcpIp demande un tampon mémoire contigu via EthIf_ProvideTxBuffer() en spécifiant la priorité et la longueur de trame souhaitée ([SWS_Eth_00077], AUTOSAR_SWS_EthernetInterface p. 87). EthIf délègue cette demande au pilote correspondant au moyen de Eth_ProvideTxBuffer(), ce par quoi le pilote verrouille le tampon matériel et renvoie un index de descripteur (Eth_BufIdxType) ainsi que le pointeur de tampon ([SWS_Eth_00077]). Après remplissage des données utiles, la couche appelante déclenche l'émission via EthIf_Transmit() ([SWS_EthIf_00075]). EthIf insère, en cas de configuration correspondante, la balise VLAN (EtherType 0x8100) et appelle Eth_Transmit(), après quoi le pilote construit l'en-tête Ethernet, définit l'adresse MAC de destination et transmet l'ordre d'émission au contrôleur MAC ([SWS_Eth_00087], [SWS_EthIf_00250]).

Déroulement de l'émission en mode scrutation et interruptionUpperLayerEthIfEthUse Case: 1. PufferallokationEthIf_ProvideTxBuffer(CtrlIdx, Priority, LenByte, ...)PufferanforderungEth_ProvideTxBuffer(CtrlIdx, Priority, ...)Hardware-Puffer anfordernBUFREQ_OK (BufIdx, BufPtr, LenByte)Puffer gesperrtBUFREQ_OK (BufIdx, BufPtr, LenByte)Puffer bereitgestelltUse Case: 2. Transmission des donnéesNutzdaten in Puffer kopierenEthIf_Transmit(CtrlIdx, BufIdx, FrameType, ...)SendeaufrufVérifier le balisage VLAN (0x8100)Eth_Transmit(CtrlIdx, BufIdx, FrameType, PhysAddrPtr)Frame aufbauen & triggernE_OKTransmission démarréeE_OKSendeauftrag akzeptiertUse Case: 3. Confirmation d'émission asynchronealtInterrupt-ModusEthIf_TxConfirmation(CtrlIdx, BufIdx, Result)depuis Eth_TxIrqHdlr_Polling-ModusEth_TxConfirmation(CtrlIdx)depuis EthIf_MainFunctionTx()EthIf_TxConfirmation(CtrlIdx, BufIdx, Result)Retour sur l'état du tampon<UL>_TxConfirmation(CtrlIdx, BufIdx)Confirmation d'émission & libération du tampon

Diagramme de séquence : allocation de tampons, transmission de données et confirmation d'émission asynchrone dans le cluster Ethernet. Sources : [SWS_Eth_00077], [SWS_Eth_00087], [SWS_EthIf_00075], [SWS_EthIf_00091]

Le chemin de réception (Reception Path) traite les trames Ethernet entrantes soit par gestion d'événements à partir d'une interruption, soit par scrutation (polling). Après lecture du tampon depuis la file d'attente matérielle au moyen de Eth_Receive() ([SWS_Eth_00095], [SWS_Eth_00162]), le pilote signale le paquet à l'interface via EthIf_RxIndication() ([SWS_EthIf_00085]). EthIf vérifie la validité du contrôleur et les éventuelles balises VLAN, filtre les datagrammes invalides ([SWS_EthIf_00309]) et achemine la trame vers la couche supérieure assignée en fonction de l'EtherType. TcpIp prend en charge les paquets IP reçus et évalue la trame en fonction du PDU de réception référencé (TcpIpCtrlRxPdu) et des métadonnées ([SWS_TcpIp_00411], [SWS_TcpIp_00412]). Si l'interface et l'IP de destination satisfont aux conditions de mappage avec la table d'adresses locale ([SWS_TCPIP_00169]), le paquet est désencapsulé et transmis de manière synchrone au propriétaire de socket compétent (par ex. SoAd) via l'interface <Up_RxIndication>() ([SWS_TCPIP_00220], [SWS_TCPIP_00223]).

Chemin de réception et distribution des paquetsEthEthIfTcpIpSocketOwnerUse Case: 1. Réception de la trame depuis le matérielRéception de la trame via ISR ou Eth_Receive()EthIf_RxIndication(CtrlIdx, FrameType, DataPtr, LenByte)Transmettre la trame à l'interfaceUse Case: 2. Interface-Filterung & DispatchingVLAN & Controller-Index validierenTcpIpCtrlRxPdu AuswertungTransmettre le paquet IP à la pileUse Case: 3. TCP/IP Verarbeitung & Socket-ZustellungVérification de l'IP de destination & mappage LocalAddrId<Up_RxIndication>(SocketId, RemoteAddrPtr, BufPtr, Length)Synchroner Aufruf an oberen Besitzer

Diagramme de séquence : chemin de réception des trames et répartition des paquets jusqu'au niveau socket. Sources : [SWS_Eth_00095], [SWS_EthIf_00085], [SWS_TCPIP_00169], [SWS_TCPIP_00223]

Dans le domaine de la résolution d'adresses et du filtrage de paquets, TcpIp et Eth interagissent étroitement via EthIf. Si TcpIp détecte de nouvelles correspondances d'adresses via des paquets entrants ou des réponses ARP, il met à jour le cache ARP ([SWS_TCPIP_00056], [SWS_TcpIp_00092]) et notifie les modifications via Up_PhysAddrTableChg() ([SWS_TCPIP_00142]). En cas d'adresse MAC manquante, TcpIp_GetRemotePhysAddr() initie une résolution d'adresse ([SWS_TCPIP_00137]). Pour limiter les diffusions générales (broadcasts) et le trafic multidiffusion (multicast) sur le réseau, EthIf configure via Eth_UpdatePhysAddrFilter() des filtres de hachage à assistance matérielle ou des tables dans le contrôleur MAC afin de laisser passer ou d'éliminer de manière ciblée les trames d'adresse de multidiffusion sur la couche 2 ([SWS_Eth_00152], [SWS_Eth_00245]).

Synchronisation, réentrance et contextes de tâches

Le cluster de modules prend en charge deux modes de fonctionnement pour le découplage temporel : le mode scrutation (polling) et le mode interruption. En mode scrutation, la fonction cyclique EthIf_MainFunctionTx() prend en charge au niveau de la tâche l'interrogation des opérations d'émission terminées en appelant Eth_TxConfirmation() pour tous les pilotes configurés ([SWS_EthIf_00115], AUTOSAR_SWS_EthernetInterface p. 87). De manière analogue, les files d'attente de réception sont vidées par des appels périodiques de Eth_Receive() dans le contexte de tâche ([SWS_Eth_00095]). En mode interruption, les ISR d'émission et de réception (Eth_TxIrqHdlr_<CtrlIdx>(), Eth_RxIrqHdlr_<CtrlIdx>()) signalent les événements directement depuis le contexte d'interruption à EthIf_TxConfirmation() et EthIf_RxIndication() ([SWS_EthIf_00091], AUTOSAR_SWS_EthernetInterface p. 88, SWS_EthernetInterface p. 173). La surveillance cyclique de l'état des connexions d'émetteurs-récepteurs et de commutateurs s'effectue de manière découplée dans EthIf_MainFunctionState() (AUTOSAR_CP_SWS_EthernetInterface p. 213).

Les exigences de réentrance sont précisément adaptées aux systèmes multicœurs et multitâches. Eth_ProvideTxBuffer() est conçu pour être entièrement réentrant ([SWS_Eth_00077]). Les API d'émission Eth_Transmit() et EthIf_Transmit() sont réentrantes pour différents indices de contrôleur et de tampon ([SWS_Eth_00087], [SWS_EthIf_00075]). En revanche, les fonctions de contrôle telles que Eth_SetPhysAddr() ou Eth_UpdatePhysAddrFilter() ne sont pas réentrantes pour un même contrôleur, mais peuvent être exécutées de manière concurrente pour des contrôleurs différents ([SWS_Eth_00151], [SWS_Eth_00152]). L'acquisition d'états et les interrogations d'horodatages matériels (par ex. Eth_GetCurrentTime() ou EthIf_GetCurrentTime()) sont explicitement spécifiées pour être appelées au sein de zones exclusives (Exclusive Areas), afin de garantir une cohérence des horodatages exempte de gigue pour des protocoles tels que gPTP (IEEE 802.1AS) (SWS_EthernetDriver p. 82, SWS_EthernetInterface p. 140).

Cycles de vie et modes de fonctionnement typiques

Le cycle de vie du cluster exige un ordre d'initialisation strict, généralement contrôlé par l'ECU State Manager (EcuM) : le pilote proche du matériel est d'abord initialisé au moyen de Eth_Init(), suivi de EthIf_Init() et enfin de la pile de protocoles TcpIp_Init(). En fonctionnement régulier, toutes les interfaces vérifient si l'initialisation s'est achevée avec succès et refusent dans le cas contraire l'exécution en signalant des erreurs de développement ([SWS_Eth_00027], [SWS_Eth_00051], [SWS_EthIf_00024]).

La gestion des modes de la couche 2 est contrôlée via EthIf_SetControllerMode(), ce qui permet de faire basculer le mode du contrôleur adressé entre ETH_MODE_DOWN, ETH_MODE_ACTIVE et ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST ([SWS_EthIf_00034], [SWS_Eth_91008]). Le pilote effectue le changement de mode et l'acquitte de manière asynchrone via la fonction de rappel EthIf_CtrlModeIndication(), qui transmet le changement d'état à l'Ethernet State Manager (EthSM) ([SWS_EthIf_00231], [SWS_EthIf_00252]). Dans le cas de commutateurs mis en réseau, EthIf contrôle en outre les groupes de ports de commutateurs au moyen de EthIf_SwitchPortGroupRequestMode() ou démarre tous les ports via EthIf_StartAllPorts() ([SWS_EthIf_91102], [SWS_EthIf_91103]). Dans la pile TcpIp, l'état de communication du réseau est contrôlé séparément via TcpIp_RequestComMode() : TCPIP_STATE_ONLINE active l'attribution des adresses IP, TCPIP_STATE_ONHOLD suspend les activités d'émission et TCPIP_STATE_OFFLINE ferme l'ensemble des sockets actifs ([SWS_TCPIP_00070], [SWS_TCPIP_00071], [SWS_TCPIP_00072], [SWS_TCPIP_00074]).

Dans le domaine de l'arrêt, de la mise en veille et du réveil, le cluster prend en charge des séquences de réveil normalisées selon l'OPEN Alliance TC10 (SWS_ECUStateManager p. 192). Si le matériel Ethernet (PHY ou port de commutateur) détecte un signal de réveil à l'état de veille, une interruption signale l'événement. Le code d'intégration ou l'EcuM déclenche alors EthIf_CheckWakeup(), qui demande aux pilotes d'émetteurs-récepteurs concernés de procéder à une vérification asynchrone ([SWS_EthIf_00244], [SWS_EthIf_00245]). Les causes de réveil détaillées peuvent être lues via EthIf_GetSwitchPortWakeupReason() ([SWS_EthIf_91005]). Lors de l'arrêt, TcpIp_ResetIpAssignment() permet la réinitialisation ciblée des affectations IP persistées dans la NvM ([SWS_TCPIP_00215], [SWS_TCPIP_00216]).

Gestion des erreurs, traçage DET et dégradation

Les modules du cluster mettent en œuvre un concept de diagnostic et de surveillance d'erreurs à plusieurs niveaux. Pendant le développement et l'intégration du système, le Default Error Tracer (DET) intercepte les erreurs de programmation et de configuration. Celles-ci comprennent les appels préalables à l'initialisation du module (ETH_E_UNINIT, ETHIF_E_UNINIT) ([SWS_Eth_00228], [SWS_EthIf_00036]), les indices de contrôleur ou d'émetteur-récepteur non valides (ETH_E_INV_CTRL_IDX, ETHIF_E_INV_TRCV_IDX) ([SWS_Eth_00229], [SWS_EthIf_00326]) ainsi que les paramètres de pointeur non valides ([SWS_Eth_00230], [SWS_Eth_00250]). En cas de perturbations de communication matérielles sur le bus MII, Eth_WriteMii() signale l'erreur d'exécution ETH_E_COMMUNICATION ([SWS_Eth_00058], [SWS_Eth_00286]).

Pour le diagnostic opérationnel et la gestion de la mémoire des défauts (DEM), Eth et EthIf fournissent des structures de compteurs normalisées conformément aux normes RFC de l'IETF. Via Eth_GetCounterValues() et Eth_GetRxStats(), les événements de rejet dus à des dépassements de capacité de tampon (Buffer Overrun), des erreurs CRC, des paquets surdimensionnés et sous-dimensionnés (Jabbers, Undersize) ainsi que des erreurs d'alignement sont consignés conformément aux RFC 1757, RFC 1643 et RFC 2819 ([SWS_Eth_00226], [SWS_Eth_00233], [SWS_Eth_91007], [SWS_Eth_91002]). Les compteurs d'émission et les statistiques d'erreur sont mis à disposition au moyen de Eth_GetTxStats() et Eth_GetTxErrorCounterValues() ([SWS_Eth_91005], [SWS_Eth_91006], [SWS_Eth_91003]). EthIf relaie ces interrogations de compteurs pour le matériel de commutateur externe de manière transparente via EthIf_SwitchPortGetCounterValues() et EthIf_SwitchPortGetTxErrorCounterValues() ([SWS_EthIf_91115], [SWS_EthIf_91118]).

Des mécanismes de dégradation et des surveillances de la qualité de liaison assurent la robustesse fonctionnelle : EthIf_GetTrcvSignalQuality() fournit les qualités de liaison actuelles, minimales et maximales des émetteurs-récepteurs physiques ([SWS_EthIf_91056], [SWS_EthIf_91057]), ce qui permet de diagnostiquer des liaisons de transmission dégradées avant une rupture de liaison. EthIf_GetAndResetMeasurementData() permet la lecture et la réinitialisation de données de mesure détaillées relatives aux datagrammes rejetés, par exemple lors de défauts de configuration concernant les identifiants VLAN ou les affectations de contrôleurs ([SWS_EthIf_91011], [SWS_EthIf_00309]). En cas de ruptures de liaison, EthIf_Transmit() interrompt le relayage vers le pilote ([SWS_EthIf_00076]), tandis que TcpIp met fin aux sockets et vide les files d'attente d'émission en cas d'états hors ligne ([SWS_TCPIP_00072]).

Ce guide se base exclusivement sur les spécifications de l'AUTOSAR Classic Platform version R20-11.

Module im Cluster

Diagnostic over IP (DoIP)

AUTOSAR Classic Communication Services-Modul Diagnostic over IP (DoIP, Spezifikation: AUTOSAR_CP_SWS_DiagnosticOverIP.pdf, AUTOSAR_SWS_DiagnosticOverIP.pdf).

BSW ID 173 29 APIs (26 Funktionen, 3 Typen) #include "DoIP.h"

Ethernet Driver (Eth)

Provides uniform hardware access to Ethernet controller interfaces.

BSW ID 88 42 APIs (24 Funktionen, 18 Typen) #include "Eth.h"

Ethernet Interface (EthIf)

Abstracts Ethernet controller and transceiver hardware for upper protocol layers.

BSW ID 65 92 APIs (88 Funktionen, 4 Typen) #include "EthIf.h"

Ethernet State Manager (EthSM)

AUTOSAR Classic Communication Services-Modul Ethernet State Manager (EthSM, Spezifikation: AUTOSAR_CP_SWS_EthernetStateManager.pdf, AUTOSAR_SWS_EthernetStateManager.pdf).

BSW ID 143 9 APIs (9 Funktionen, 0 Typen) #include "EthSM.h"

Ethernet Switch Driver (EthSwt)

AUTOSAR Classic Communication HW Abstraction-Modul Ethernet Switch Driver (EthSwt, Spezifikation: AUTOSAR_CP_SWS_EthernetSwitchDriver.pdf, AUTOSAR_SWS_EthernetSwitchDriver.pdf).

BSW ID 89 92 APIs (83 Funktionen, 9 Typen) #include "EthSwt.h"

Ethernet Transceiver Driver (EthTrcv)

AUTOSAR Classic Communication HW Abstraction-Modul Ethernet Transceiver Driver (EthTrcv, Spezifikation: AUTOSAR_CP_SWS_EthernetTransceiverDriver.pdf, AUTOSAR_SWS_EthernetTransceiverDriver.pdf).

BSW ID 73 51 APIs (41 Funktionen, 10 Typen) #include "EthTrcv.h"

IEEE 1722 Transport Layer (IEEE1722Tp)

AUTOSAR Classic Communication Services-Modul IEEE 1722 Transport Layer (IEEE1722Tp, Spezifikation: AUTOSAR_CP_SWS_IEEE1722TransportLayer.pdf).

BSW ID 131 Keine C-API · 0 Records #include "IEEE1722Tp.h"

Service Discovery (Sd)

AUTOSAR Classic Communication Services-Modul Service Discovery (Sd, Spezifikation: AUTOSAR_CP_SWS_ServiceDiscovery.pdf, AUTOSAR_SWS_ServiceDiscovery.pdf).

BSW ID 171 16 APIs (8 Funktionen, 8 Typen) #include "Sd.h"

Socket Adaptor (SoAd)

AUTOSAR Classic Communication Services-Modul Socket Adaptor (SoAd, Spezifikation: AUTOSAR_CP_SWS_SocketAdaptor.pdf, AUTOSAR_SWS_SocketAdaptor.pdf).

BSW ID 56 52 APIs (47 Funktionen, 5 Typen) #include "SoAd.h"

SOME/IP Transport Protocol (SomeIpTp)

AUTOSAR Classic Communication Services-Modul SOME/IP Transport Protocol (SomeIpTp, Spezifikation: AUTOSAR_CP_SWS_SOMEIPTransportProtocol.pdf, AUTOSAR_SWS_SOMEIPTransportProtocol.pdf).

BSW ID 177 9 APIs (8 Funktionen, 1 Typen) #include "SomeIpTp.h"

TCP/IP Stack (TcpIp)

Provides IPv4/IPv6 networking, TCP/UDP sockets, ARP, ICMP, and DHCP services.

BSW ID 170 64 APIs (42 Funktionen, 22 Typen) #include "TcpIp.h"

UDP Network Management (UdpNm)

AUTOSAR Classic Communication Services-Modul UDP Network Management (UdpNm, Spezifikation: AUTOSAR_CP_SWS_UDPNetworkManagement.pdf, AUTOSAR_SWS_UDPNetworkManagement.pdf).

BSW ID 33 27 APIs (27 Funktionen, 0 Typen) #include "UdpNm.h"

Wireless Ethernet Driver (WEth)

AUTOSAR Classic Wireless Comm. Drivers-Modul Wireless Ethernet Driver (WEth, Spezifikation: AUTOSAR_CP_SWS_WirelessEthernetDriver.pdf, AUTOSAR_SWS_WirelessEthernetDriver.pdf).

BSW ID 87 21 APIs (21 Funktionen, 0 Typen) #include "WEth.h"

Wireless Ethernet Transceiver Driver (WEthTrcv)

AUTOSAR Classic Wireless Comm. HW Abstraction-Modul Wireless Ethernet Transceiver Driver (WEthTrcv, Spezifikation: AUTOSAR_CP_SWS_WirelessEthernetTransceiverDriver.pdf, AUTOSAR_SWS_WirelessEthernetTransceiverDriver.pdf).

BSW ID 74 10 APIs (10 Funktionen, 0 Typen) #include "WEthTrcv.h"