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.

Карта тем

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

Подробный вид

Выберите элемент в оглавлении.

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);
DoIP_GetVersionInfo функция

Returns the version information of this module.

void DoIP_GetVersionInfo(Std_VersionInfoType* versioninfo);
DoIP_IfCancelTransmit функция

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

Std_ReturnType DoIP_IfCancelTransmit(PduIdType TxPduId);
DoIP_IfTransmit функция

Requests transmission of a PDU.

Std_ReturnType DoIP_IfTransmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);
DoIP_Init функция

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);
DoIP_MainFunction функция

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);
DoIP_SoAdTpCopyRxData функция

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);
DoIP_SoAdTpCopyTxData функция

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);
DoIP_SoConModeChg функция

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

void DoIP_SoConModeChg(SoAd_SoConIdType SoConId, SoAd_SoConModeType Mode);
DoIP_TpCancelReceive функция

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);
DoIP_TpCancelTransmit функция

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);
DoIP_TpTransmit функция

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);
Eth_GetControllerMode функция

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);
Eth_GetCounterValues функция

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);
Eth_GetCurrentTime функция

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);
Eth_GetEgressTimeStamp функция

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);
Eth_GetPhysAddr функция

Obtains the physical source address used by the indexed controller

void Eth_GetPhysAddr (uint8 CtrlIdx, uint8* PhysAddrPtr);
Eth_GetRxStats функция

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);
Eth_GetTxStats функция

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);
Eth_GetVersionInfo функция

Returns the version information of this module

void Eth_GetVersionInfo (Std_VersionInfoType* VersionInfoPtr);
Eth_Init функция

Initializes the Ethernet Driver

void Eth_Init (const Eth_ConfigType* CfgPtr);
Eth_MainFunction функция

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);
Eth_ProvideTxBuffer функция

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 функция

Reads a transceiver register

Std_ReturnType Eth_ReadMii (uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16* RegValPtr);
Eth_Receive функция

Receive a frame from the related fifo.

void Eth_Receive (uint8 CtrlIdx, uint8 FifoIdx, Eth_RxStatusType* RxStatusPtr);
Eth_SetControllerMode функция

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);
Eth_SetPhysAddr функция

Sets the physical source address used by the indexed controller

void Eth_SetPhysAddr (uint8 CtrlIdx, const uint8* PhysAddrPtr);
Eth_Transmit функция

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);
Eth_TxConfirmation функция

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 функция

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

EthIf_CheckWakeup функция

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);
EthIf_GetArlTable функция

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);
EthIf_GetBufWRxParams функция

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);
EthIf_GetBufWTxParams функция

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);
EthIf_GetChanRxParams функция

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);
EthIf_GetCtrlIdxList функция

Returns the number and index of all active Ethernet controllers.

Std_ReturnType EthIf_GetCtrlIdxList (uint8* NumberOfCtrlIdx, uint8* CtrlIdxListPtr);
EthIf_GetCurrentTime функция

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);
EthIf_GetPhyIdentifier функция

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);
EthIf_GetPhysAddr функция

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);
EthIf_GetPortMacAddr функция

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);
EthIf_GetRxMgmtObject функция

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);
EthIf_GetTxMgmtObject функция

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

Std_ReturnType EthIf_GetTxMgmtObject (uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtObjectType* * MgmtObjectPtr);
EthIf_GetVersionInfo функция

Returns the version information of this module

void EthIf_GetVersionInfo (Std_VersionInfoType* VersionInfoPtr);
EthIf_GetVlanId функция

Returns the VLAN identifier of the requested Ethernet controller.

Std_ReturnType EthIf_GetVlanId (uint8 CtrlIdx, uint16* VlanIdPtr);
EthIf_Init функция

Initializes the Ethernet Interface

void EthIf_Init (const EthIf_ConfigType* CfgPtr);
EthIf_MainFunctionRx функция

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);
EthIf_MainFunctionTx функция

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

void EthIf_MainFunctionTx (void);
EthIf_ProvideTxBuffer функция

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);
EthIf_RxIndication функция

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);
EthIf_SetBufWTxParams функция

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);
EthIf_SetChanRxParams функция

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);
EthIf_SetChanTxParams функция

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);
EthIf_SetPhysAddr функция

Sets the physical source address used by the indexed controller.

void EthIf_SetPhysAddr (uint8 CtrlIdx, const uint8* PhysAddrPtr);
EthIf_SetPhyTestMode функция

Activates a given test mode.

Std_ReturnType EthIf_SetPhyTestMode (uint8 TrcvIdx, EthTrcv_PhyTestModeType Mode);
EthIf_SetPhyTxMode функция

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);
EthIf_SetPortTestMode функция

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

Std_ReturnType EthIf_SetPortTestMode (uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTestModeType Mode);
EthIf_SetPortTxMode функция

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

Std_ReturnType EthIf_SetPortTxMode (thernetInterface uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTxModeType Mode); ⚠️
EthIf_SetRadioParams функция

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);
EthIf_SleepIndication функция

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);
EthIf_StartAllPorts функция

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);
EthIf_Transmit функция

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);
EthIf_TxConfirmation функция

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);
EthIf_VerifyConfig функция

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);
EthSM_GetVersionInfo функция

This service puts out the version information of this module.

void EthSM_GetVersionInfo(Std_VersionInfoType* versioninfo);
EthSM_Init функция

This function initialize the Eth SM.

void EthSM_Init(void);
EthSM_MainFunction функция

Cyclic Main Function which is called from the Scheduler.

void EthSM_MainFunction(void);
EthSM_RequestComMode функция

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

Std_ReturnType EthSM_RequestComMode(NetworkHandleType NetworkHandle, ComM_ModeType ComM_Mode);
EthSM_SleepIndication функция

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);
EthSM_TrcvLinkStateChg функция

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);
<EthSwtLinkUpCallout> функция

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);
<GetCfgDataRawDone> функция

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);
EthSwt_BackgroundTask функция

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);
EthSwt_CheckWakeup функция

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);
EthSwt_EnableVlan функция

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);
EthSwt_GetArlTable функция

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);
EthSwt_GetBaudRate функция

Obtains the baud rate of the indexed switch port

Std_ReturnType EthSwt_GetBaudRate(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_BaudRateType* BaudRatePtr);
EthSwt_GetCfgDataInfo функция

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);
EthSwt_GetCfgDataRaw функция

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);
EthSwt_GetDuplexMode функция

Obtains the duplex mode of the indexed switch port

Std_ReturnType EthSwt_GetDuplexMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_DuplexModeType* DuplexModePtr);
EthSwt_GetLinkState функция

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);
EthSwt_GetPortMacAddr функция

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);
EthSwt_GetRxMgmtObject функция

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

Std_ReturnType EthSwt_GetRxMgmtObject(uint8 CtrlIdx, Eth_DataType* DataPtr, EthSwt_MgmtObjectType* * MgmtObjectPtr);
EthSwt_GetRxStats функция

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);
EthSwt_GetSwitchReg функция

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);
EthSwt_GetTxMgmtObject функция

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

Std_ReturnType EthSwt_GetTxMgmtObject(uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtObjectType* * MgmtObjectPtr);
EthSwt_GetTxStats функция

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);
EthSwt_GetVersionInfo функция

Returns the version information of this module.

void EthSwt_GetVersionInfo(Std_VersionInfoType* VersionInfoPtr);
EthSwt_Init функция

Initializes the Ethernet Switch Driver

void EthSwt_Init(const EthSwt_ConfigType* CfgPtr);
EthSwt_MacSecAddRxSa функция

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);
EthSwt_MacSecAddTxSa функция

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);
EthSwt_MacSecInitRxSc функция

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);
EthSwt_MacSecResetRxSc функция

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);
EthSwt_MainFunction функция

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);
EthSwt_ReadMmd функция

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);
EthSwt_SetMgmtInfo функция

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);
EthSwt_SetPortTestMode функция

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

Std_ReturnType EthSwt_SetPortTestMode(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTestModeType Mode);
EthSwt_SetPortTxMode функция

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

Std_ReturnType EthSwt_SetPortTxMode(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTxModeType Mode);
EthSwt_SetStreamState функция

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);
EthSwt_SetSwitchReg функция

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);
EthSwt_VerifyConfig функция

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);
EthSwt_WriteMmd функция

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

<EthTrcvWakeUpCallout> функция

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);
EthTrcv_CheckWakeup функция

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);
EthTrcv_GetBaudRate функция

Obtains the baud rate of the indexed transceiver

Std_ReturnType EthTrcv_GetBaudRate(uint8 TrcvIdx, EthTrcv_BaudRateType* BaudRatePtr);
EthTrcv_GetBusWuReason функция

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);
EthTrcv_GetDuplexMode функция

Obtains the duplex mode of the indexed transceiver

Std_ReturnType EthTrcv_GetDuplexMode(uint8 TrcvIdx, EthTrcv_DuplexModeType* DuplexModePtr);
EthTrcv_GetLinkState функция

Obtains the link state of the indexed transceiver

Std_ReturnType EthTrcv_GetLinkState(uint8 TrcvIdx, EthTrcv_LinkStateType* LinkStatePtr);
EthTrcv_GetMacMethod функция

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);
EthTrcv_GetVersionInfo функция

Returns the version information of this module

void EthTrcv_GetVersionInfo(Std_VersionInfoType* VersionInfoPtr);
EthTrcv_Init функция

Initializes the Ethernet Transceiver Driver

void EthTrcv_Init(const EthTrcv_ConfigType* CfgPtr);
EthTrcv_MacSecAddRxSa функция

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);
EthTrcv_MacSecAddTxSa функция

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);
EthTrcv_MacSecInitRxSc функция

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);
EthTrcv_MainFunction функция

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);
EthTrcv_SetPhyTestMode функция

Activates a given test mode.

Std_ReturnType EthTrcv_SetPhyTestMode(uint8 TrcvIdx, EthTrcv_PhyTestModeType Mode);
EthTrcv_SetPhyTxMode функция

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);
Sd_AclCheckEnable функция

Enabling or Disabling ACL policy check for all service instance

Std_ReturnType Sd_AclCheckEnable(boolean EnableAcl);
Sd_AclUpdate функция

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 функция

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);
Sd_RxIndication функция

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

void Sd_RxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);
Sd_ServiceGroupStart функция

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);
Sd_SoConModeChg функция

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

SoAd_CloseSoCon функция

This service closes the socket connection specified by SoConId.

Std_ReturnType SoAd_CloseSoCon(SoAd_SoConIdType SoConId, boolean abort);
SoAd_CopyTxData функция

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);
SoAd_DisableRouting функция

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);
SoAd_EnableRouting функция

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);
SoAd_GetLocalAddr функция

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);
SoAd_GetPhysAddr функция

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);
SoAd_GetRemoteAddr функция

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);
SoAd_GetSoConId функция

Returns socket connection index related to the specified TxPduId.

Std_ReturnType SoAd_GetSoConId(PduIdType TxPduId, SoAd_SoConIdType* SoConIdPtr);
SoAd_GetSoConMode функция

Returns current state of the socket connection specified by SoConId.

void SoAd_GetSoConMode(SoAd_SoConIdType SoConId, SoAd_SoConModeType* ModePtr);
SoAd_GetVersionInfo функция

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);
SoAd_IfTransmit функция

Requests transmission of a PDU.

Std_ReturnType SoAd_IfTransmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);
SoAd_Init функция

Initializes the Socket Adaptor.

void SoAd_Init(const SoAd_ConfigType* SoAdConfigPtr);
SoAd_IsConnectionReady функция

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);
SoAd_MainFunction функция

Schedules the Socket Adaptor. (Entry point for scheduling)

void SoAd_MainFunction(void);
SoAd_OpenSoCon функция

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);
SoAd_ReleaseRemoteAddr функция

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);
SoAd_RxIndication функция

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);
SoAd_SetRemoteAddr функция

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);
SoAd_TcpAccepted функция

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);
SoAd_TcpConnected функция

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);
SoAd_TcpIpEvent функция

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);
SoAd_TpCancelReceive функция

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

Std_ReturnType SoAd_TpCancelReceive(PduIdType RxPduId);
SoAd_TpCancelTransmit функция

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

Std_ReturnType SoAd_TpCancelTransmit(PduIdType TxPduId);
SoAd_TpChangeParameter функция

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

Std_ReturnType SoAd_TpChangeParameter(PduIdType id, TPParameterType parameter, uint16 value);
SoAd_TpTransmit функция

Requests transmission of a PDU.

Std_ReturnType SoAd_TpTransmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);
SoAd_TxConfirmation функция

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);
Up_SoConModeChg функция

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 функция

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);
SomeIpTp_RxIndication функция

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

void SomeIpTp_RxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);
SomeIpTp_Transmit функция

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

<Up_CopyTxData> функция

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);
<Up_IcmpMsgHandler> функция

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);
<Up_PhysAddrTableChg> функция

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);
<Up_RxIndication> функция

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);
<Up_TcpAccepted> функция

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);
<Up_TcpConnected> функция

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);
<Up_TlsGetCurrentTime> функция

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);
<Up_TxConfirmation> функция

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 функция

Service TcpIp_Bind.

Std_ReturnType TcpIp_Bind (TcpIp_SocketIdType SocketId, TcpIp_LocalAddrIdType LocalAddrId, uint16* PortPtr);
TcpIp_ChangeParameter функция

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 функция

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);
TcpIp_DhcpReadOption функция

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);
TcpIp_DhcpV6ReadOption функция

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);
TcpIp_DhcpWriteOption функция

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); ⚠️
TcpIp_GetCtrlIdx функция

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);
TcpIp_GetIpAddr функция

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);
TcpIp_GetPhysAddr функция

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);
TcpIp_GetVersionInfo функция

Returns the version information.

void TcpIp_GetVersionInfo (Std_VersionInfoType* versioninfo);
TcpIp_IcmpTransmit функция

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); ⚠️
TcpIp_IcmpV6Transmit функция

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 функция

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);
TcpIp_MainFunction функция

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);
TcpIp_RequestComMode функция

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);
TcpIp_RxIndication функция

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);
TcpIp_TcpConnect функция

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);
TcpIp_TcpListen функция

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);
TcpIp_TcpReceived функция

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);
TcpIp_TcpTransmit функция

Service TcpIp_TcpTransmit.

Std_ReturnType TcpIp_TcpTransmit (TcpIp_SocketIdType SocketId, const uint8* DataPtr, uint32 AvailableLength, boolean ForceRetrieve);
TcpIp_UdpTransmit функция

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);
UdpNm_GetPduData функция

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);
UdpNm_GetState функция

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);
UdpNm_GetUserData функция

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);
UdpNm_GetVersionInfo функция

This service returns the version information of this module.

void UdpNm_GetVersionInfo(Std_VersionInfoType* versioninfo);
UdpNm_Init функция

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);
UdpNm_NetworkRelease функция

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);
UdpNm_NetworkRequest функция

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);
UdpNm_PassiveStartUp функция

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);
UdpNm_SetSleepReadyBit функция

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

Std_ReturnType UdpNm_SetSleepReadyBit(NetworkHandleType nmChannelHandle, boolean nmSleepReadyBit);
UdpNm_SetUserData функция

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);
UdpNm_Transmit функция

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);
WEth_GetBufWRxParams функция

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);
WEth_GetBufWTxParams функция

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);
WEth_GetControllerMode функция

Obtains the state of the indexed controller

Std_ReturnType WEth_GetControllerMode(uint8 CtrlId, Eth_ModeType* CtrlModePtr);
WEth_GetPhysAddr функция

Obtains the physical source address used by the indexed controller

void WEth_GetPhysAddr(uint8 CtrlId, uint8* PhysAddrPtr);
WEth_GetVersionInfo функция

Returns the version information of this module

void WEth_GetVersionInfo(Std_VersionInfoType* VersionInfoPtr);
WEth_GetWEtherStats32 функция

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);
WEth_GetWEtherStats64 функция

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);
WEth_ImmediateTransmit функция

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 функция

Initializes the Wireless Ethernet Driver

void WEth_Init(const WEth_ConfigType* CfgPtr);
WEth_MainFunction функция

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);
WEth_ReadTrcvRegs функция

Reads a transceiver register

Std_ReturnType WEth_ReadTrcvRegs(uint8 CtrlId, uint8 TrcvId, uint8 RadioId, const uint32* RegIds, uint32* RegValsPtr, uint8 NumRegs);
WEth_Receive функция

Triggers frame reception.

void WEth_Receive(uint8 CtrlId, Eth_RxStatusType* RxStatusPtr);
WEth_SetBufWTxParams функция

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);
WEth_SetControllerMode функция

Enables / disables the indexed controller

Std_ReturnType WEth_SetControllerMode(uint8 CtrlId, Eth_ModeType CtrlMode);
WEth_SetPhysAddr функция

Sets the physical source address used by the indexed controller

void WEth_SetPhysAddr(uint8 CtrlId, const uint8* PhysAddrPtr);
WEth_Transmit функция

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);
WEth_TxConfirmation функция

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);
WEth_WriteTrcvRegs функция

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);
WEthTrcv_GetLinkState функция

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 функция

Initializes the Wireless Ethernet Transceiver Driver

void WEthTrcv_Init(const WEthTrcv_ConfigType* CfgPtr);
WEthTrcv_MainFunction функция

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

Руководство по кластеруСОЗДАНО ИИ

Предоставляет аппаратно-независимые сетевые IP-службы, абстракцию фреймов и управление драйверами для коммуникации по Ethernet.
СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 0af738a94164 Происхождение Открытые вопросы (2)
Причинный якорь: R20-11 Действует с R20-11 Заново синтезировано для этой версии спецификации.
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Предоставляет аппаратно-независимые сетевые IP-службы, абстракцию фреймов и управление драйверами для коммуникации по Ethernet.

Кластер модулей Ethernet Services с помощью Eth, EthIf и TcpIp предоставляет стандартизированную коммуникационную инфраструктуру для сетей Ethernet в AUTOSAR Classic ([SWS_Eth_00077], [SWS_TCPIP_00056]). Он выполняет передачу данных по двухэтапной процедуре буферизации и подтверждения и прозрачно маршрутизирует входящие фреймы через фильтры VLAN и IP на верхние уровни сокетов ([SWS_EthIf_00075], [SWS_TCPIP_00169]). Надежные режимы работы, подпрограммы пробуждения TC10 и обширные счетчики диагностики RFC обеспечивают детерминированную работу транспортного средства ([SWS_EthIf_00034], [SWS_Eth_00226]).

Кластер модулей «Ethernet Services» в AUTOSAR Classic Platform (R20-11) предоставляет полную цепочку протоколов и абстракций для пакетных автомобильных сетей. Он включает в себя модули Eth (драйвер MCAL-контроллера), EthIf (аппаратно-независимая абстракция интерфейсов и управление VLAN), а также TcpIp (сетевой и транспортный уровень с IPv4/IPv6, TCP, UDP и ARP) ([SWS_Eth_00077], [SWS_EthIf_00075], [SWS_TCPIP_00056]). Через стандартизированные интерфейсы кластер подключает верхние уровни, такие как Socket Adaptor (SoAd), для сервис-ориентированной коммуникации и DoIP (SWS_TcpIp с. 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

Контекстная диаграмма: многоуровневая архитектура и системный контекст кластера Ethernet Services со взаимодействиями модулей. Источники: SWS_TcpIp с. 123, AUTOSAR_SWS_EthernetInterface с. 87, [SWS_EthIf_00075]

Тракт передачи данных при отправке опирается на скоординированную концепцию буферизации: верхние уровни синхронно запрашивают аппаратные ресурсы через EthIf_ProvideTxBuffer(), после чего Eth блокирует буфер ([SWS_Eth_00077]). После заполнения EthIf_Transmit() инициирует отправку, добавляет теги VLAN и передает данные контроллеру MAC через Eth_Transmit() ([SWS_Eth_00087], [SWS_EthIf_00075]). Квитирование происходит асинхронно либо по прерыванию, либо циклически через EthIf_MainFunctionTx() ([SWS_EthIf_00091], [SWS_EthIf_00115]). Входящие фреймы принимаются через EthIf_RxIndication() и после валидации контроллера и адреса передаются соответствующему сокету через <Up_RxIndication>() ([SWS_EthIf_00085], [SWS_TCPIP_00169], [SWS_TCPIP_00223]).

Процесс отправки в режимах опроса и прерыванийUpperLayerEthIfEthUse 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. Передача данныхNutzdaten in Puffer kopierenEthIf_Transmit(CtrlIdx, BufIdx, FrameType, ...)SendeaufrufПроверить VLAN-тегирование (0x8100)Eth_Transmit(CtrlIdx, BufIdx, FrameType, PhysAddrPtr)Frame aufbauen & triggernE_OKПередача запущенаE_OKSendeauftrag akzeptiertUse Case: 3. Асинхронное подтверждение отправкиaltInterrupt-ModusEthIf_TxConfirmation(CtrlIdx, BufIdx, Result)из Eth_TxIrqHdlr_Polling-ModusEth_TxConfirmation(CtrlIdx)из EthIf_MainFunctionTx()EthIf_TxConfirmation(CtrlIdx, BufIdx, Result)Обратная связь по состоянию буфера<UL>_TxConfirmation(CtrlIdx, BufIdx)Подтверждение отправки и освобождение буфера

Диаграмма последовательности: выделение буфера, передача данных и асинхронное подтверждение отправки в кластере Ethernet. Источники: [SWS_Eth_00077], [SWS_Eth_00087], [SWS_EthIf_00075], [SWS_EthIf_00091]

Жизненный цикл и сетевая работа управляются через состояния контроллера (EthIf_SetControllerMode()), а также режимы коммуникации (TcpIp_RequestComMode()) ([SWS_EthIf_00034], [SWS_TCPIP_00070]). Кластер поддерживает проверки пробуждения по стандарту OPEN Alliance TC10 через EthIf_CheckWakeup() ([SWS_EthIf_00244], SWS_ECUStateManager с. 192). Для диагностики и обнаружения ошибок Eth и EthIf предоставляют стандартизированные счетчики ошибок RFC, измерения качества сигнала, а также проверки DET во время выполнения ([SWS_Eth_00226], [SWS_EthIf_91056], [SWS_Eth_00228]).

Системная архитектура и роль кластера модулей

Кластер модулей «Ethernet Services» в AUTOSAR Classic Platform (релиз R20-11) образует функциональную основу для проводной пакетной коммуникации по сетям Ethernet. Он охватывает сквозную цепочку абстракций от низкоуровневых слоев драйверов уровня абстракции микроконтроллера (MCAL) через уровень абстракции электронных блоков управления (ECU) до стандартизированных транспортных и сетевых протоколов интернета на уровне коммуникационных служб (Communication Services). Кластер отвечает возросшим требованиям современных архитектур E/E к полосе пропускания и плавно интегрирует стандартные автомобильные протоколы, такие как службы диагностики по IP (DoIP согласно ISO 13400) и сервис-ориентированную коммуникацию (SOME/IP), в базовое программное обеспечение AUTOSAR, обслуживая верхние уровни, такие как Socket Adaptor (SoAd) SWS_TcpIp с. 123.

Три основных модуля кластера берут на себя четко разграниченные архитектурные обязанности:

  • Ethernet Driver (Eth): являясь модулем MCAL, Eth напрямую управляет MAC-контроллером Ethernet. Он управляет низкоуровневыми дескрипторами буферов передачи и приема, управляет интерфейсами регистров MII/MDIO для конфигурации приемопередатчиков ([SWS_Eth_00058]), коммутирует правила физической фильтрации ([SWS_Eth_00152]) и предоставляет высокоточные аппаратные временные метки для механизмов глобальной синхронизации времени ([SWS_Eth_00186], [SWS_Eth_00190]).
  • Ethernet Interface (EthIf): образует центральный уровень абстракции и развязывает верхние уровни с физической топологией оборудования. EthIf абстрагирует несколько контроллеров Ethernet, коммутаторов и приемопередатчиков (PHY). Он берет на себя обработку виртуальных LAN (тегирование VLAN по IEEE 802.1Q), мультиплексирование типов фреймов, сопоставление буферов, а также агрегацию групп портов коммутатора и состояний линка ([SWS_EthIf_00075], [SWS_EthIf_91102], AUTOSAR_CP_SWS_EthernetInterface с. 213).
  • TCP/IP Stack (TcpIp): реализует стек интернет-протоколов в качестве коммуникационной службы. Модуль включает в себя IPv4 и IPv6, динамическое назначение адресов через Auto-IP (RFC 3927) и DHCPv6 (RFC 3315) ([SWS_TCPIP_00057], [SWS_TCPIP_00166]), разрешение адресов через ARP (RFC 826) ([SWS_TCPIP_00056]), транспорт без установления соединения с помощью UDP, а также надежный транспорт байтовых потоков с установлением соединения с помощью TCP ([SWS_TCPIP_00050]). Кроме того, он делает возможным шифрование транспорта через 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

Контекстная диаграмма: многоуровневая архитектура и системный контекст кластера Ethernet Services со взаимодействиями модулей. Источники: SWS_TcpIp с. 123, AUTOSAR_SWS_EthernetInterface с. 87, [SWS_EthIf_00075]

Слаженность и пути взаимодействия между модулями

Передача данных (Transmission Path) базируется на двухэтапном процессе запроса буфера и отправки, поддерживающем концепцию нулевого копирования (Zero-Copy) для буферов сетевой карты. Вышестоящий участник протокола или модуль TcpIp через EthIf_ProvideTxBuffer() запрашивает непрерывный буфер памяти с указанием приоритета и требуемой длины фрейма ([SWS_Eth_00077], AUTOSAR_SWS_EthernetInterface с. 87). EthIf делегирует этот запрос соответствующему драйверу с помощью Eth_ProvideTxBuffer(), в результате чего драйвер блокирует аппаратный буфер и возвращает индекс дескриптора (Eth_BufIdxType), а также указатель на буфер ([SWS_Eth_00077]). После заполнения полезных данных вызывающий уровень инициирует отправку через EthIf_Transmit() ([SWS_EthIf_00075]). EthIf при соответствующей конфигурации вставляет тег VLAN (EtherType 0x8100) и вызывает Eth_Transmit(), после чего драйвер формирует заголовок Ethernet, устанавливает целевой MAC-адрес и передает задание на отправку контроллеру MAC ([SWS_Eth_00087], [SWS_EthIf_00250]).

Процесс отправки в режимах опроса и прерыванийUpperLayerEthIfEthUse 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. Передача данныхNutzdaten in Puffer kopierenEthIf_Transmit(CtrlIdx, BufIdx, FrameType, ...)SendeaufrufПроверить VLAN-тегирование (0x8100)Eth_Transmit(CtrlIdx, BufIdx, FrameType, PhysAddrPtr)Frame aufbauen & triggernE_OKПередача запущенаE_OKSendeauftrag akzeptiertUse Case: 3. Асинхронное подтверждение отправкиaltInterrupt-ModusEthIf_TxConfirmation(CtrlIdx, BufIdx, Result)из Eth_TxIrqHdlr_Polling-ModusEth_TxConfirmation(CtrlIdx)из EthIf_MainFunctionTx()EthIf_TxConfirmation(CtrlIdx, BufIdx, Result)Обратная связь по состоянию буфера<UL>_TxConfirmation(CtrlIdx, BufIdx)Подтверждение отправки и освобождение буфера

Диаграмма последовательности: выделение буфера, передача данных и асинхронное подтверждение отправки в кластере Ethernet. Источники: [SWS_Eth_00077], [SWS_Eth_00087], [SWS_EthIf_00075], [SWS_EthIf_00091]

Тракт приема (Reception Path) обрабатывает входящие фреймы Ethernet либо по событиям из прерывания, либо на основе опроса. После считывания буфера из аппаратной очереди с помощью Eth_Receive() ([SWS_Eth_00095], [SWS_Eth_00162]) драйвер сигнализирует о пакете интерфейсу через EthIf_RxIndication() ([SWS_EthIf_00085]). EthIf проверяет валидность контроллера и возможные теги VLAN, фильтрует недопустимые датаграммы ([SWS_EthIf_00309]) и перенаправляет фрейм назначенному верхнему уровню на основе EtherType. Принятые IP-пакеты принимает TcpIp, который анализирует фрейм на основе указанного PDU приема (TcpIpCtrlRxPdu) и метаданных ([SWS_TcpIp_00411], [SWS_TcpIp_00412]). Если интерфейс и целевой IP-адрес удовлетворяют условиям сопоставления в локальной таблице адресов ([SWS_TCPIP_00169]), пакет распаковывается и синхронно передается владельцу сокета (например, SoAd) через интерфейс <Up_RxIndication>() ([SWS_TCPIP_00220], [SWS_TCPIP_00223]).

Тракт приема и распределение пакетовEthEthIfTcpIpSocketOwnerUse Case: 1. Прием фрейма из аппаратного обеспеченияПрием фрейма через ISR или Eth_Receive()EthIf_RxIndication(CtrlIdx, FrameType, DataPtr, LenByte)Передать фрейм в интерфейсUse Case: 2. Interface-Filterung & DispatchingVLAN & Controller-Index validierenTcpIpCtrlRxPdu AuswertungПередать IP-пакет в стекUse Case: 3. TCP/IP Verarbeitung & Socket-ZustellungПроверка целевого IP и сопоставления LocalAddrId<Up_RxIndication>(SocketId, RemoteAddrPtr, BufPtr, Length)Synchroner Aufruf an oberen Besitzer

Диаграмма последовательности: тракт приема фреймов и диспетчеризация пакетов до уровня сокетов. Источники: [SWS_Eth_00095], [SWS_EthIf_00085], [SWS_TCPIP_00169], [SWS_TCPIP_00223]

В области разрешения адресов и фильтрации пакетов TcpIp и Eth тесно взаимодействуют через EthIf. Если TcpIp обнаруживает новые соответствия адресов на основе входящих пакетов или ответов ARP, он обновляет ARP-кэш ([SWS_TCPIP_00056], [SWS_TcpIp_00092]) и сообщает об изменениях через Up_PhysAddrTableChg() ([SWS_TCPIP_00142]). При отсутствии MAC-адреса TcpIp_GetRemotePhysAddr() инициирует процедуру разрешения адреса ([SWS_TCPIP_00137]). Для ограничения сетевых широковещательных рассылок и multicast-трафика EthIf через Eth_UpdatePhysAddrFilter() настраивает аппаратные хэш-фильтры или таблицы в MAC-контроллере для выборочного пропуска или отбрасывания multicast-фреймов на уровне 2 ([SWS_Eth_00152], [SWS_Eth_00245]).

Синхронизация, реентерабельность и контексты задач

Модульный кластер поддерживает два режима работы для временной развязки: режим опроса (polling) и режим прерываний (interrupt). В режиме опроса циклическая функция EthIf_MainFunctionTx() на уровне задач выполняет опрос завершенных операций передачи путем вызова Eth_TxConfirmation() для всех сконфигурированных драйверов ([SWS_EthIf_00115], AUTOSAR_SWS_EthernetInterface с. 87). Аналогично очереди приема очищаются с помощью периодических вызовов Eth_Receive() в контексте задач ([SWS_Eth_00095]). В режиме прерываний ISR передачи и приема (Eth_TxIrqHdlr_<CtrlIdx>(), Eth_RxIrqHdlr_<CtrlIdx>()) передают события напрямую из контекста прерываний в EthIf_TxConfirmation() и EthIf_RxIndication() ([SWS_EthIf_00091], AUTOSAR_SWS_EthernetInterface с. 88, SWS_EthernetInterface с. 173). Циклический мониторинг состояния соединений трансиверов и коммутаторов выполняется раздельно в EthIf_MainFunctionState() (AUTOSAR_CP_SWS_EthernetInterface с. 213).

Требования к реентерабельности точно согласованы с многоядерными и многозадачными системами. Функция Eth_ProvideTxBuffer() спроектирована полностью реентерабельной ([SWS_Eth_00077]). API передачи Eth_Transmit() и EthIf_Transmit() реентерабельны для различных индексов контроллеров и буферов ([SWS_Eth_00087], [SWS_EthIf_00075]). Напротив, функции управления, такие как Eth_SetPhysAddr() или Eth_UpdatePhysAddrFilter(), нереентерабельны для одного и того же контроллера, однако могут выполняться параллельно для различных контроллеров ([SWS_Eth_00151], [SWS_Eth_00152]). Опрос статуса и аппаратных меток времени (например, Eth_GetCurrentTime() или EthIf_GetCurrentTime()) явно специфицирован для вызова внутри исключительных областей (Exclusive Areas), чтобы гарантировать согласованность меток времени без джиттера для таких протоколов, как gPTP (IEEE 802.1AS) (SWS_EthernetDriver с. 82, SWS_EthernetInterface с. 140).

Типичные жизненные циклы и режимы работы

Жизненный цикл кластера требует строгого порядка инициализации, который обычно управляется диспетчером состояний ECU (EcuM): сначала с помощью Eth_Init() инициализируется низкоуровневый драйвер, затем EthIf_Init() и, наконец, стек протоколов TcpIp_Init(). Все интерфейсы в штатном режиме проверяют, была ли инициализация успешно завершена, и в противном случае отклоняют выполнение с сигнализацией ошибок разработки ([SWS_Eth_00027], [SWS_Eth_00051], [SWS_EthIf_00024]).

Управление режимами уровня 2 осуществляется через EthIf_SetControllerMode(), благодаря чему режим адресуемого контроллера переключается между ETH_MODE_DOWN, ETH_MODE_ACTIVE и ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST ([SWS_EthIf_00034], [SWS_Eth_91008]). Драйвер выполняет смену режима и подтверждает ее асинхронно через функцию обратного вызова EthIf_CtrlModeIndication(), которая передает изменение состояния в Ethernet State Manager (EthSM) ([SWS_EthIf_00231], [SWS_EthIf_00252]). Для объединенных в сеть коммутаторов EthIf дополнительно управляет группами портов коммутатора с помощью EthIf_SwitchPortGroupRequestMode() или запускает все порты через EthIf_StartAllPorts() ([SWS_EthIf_91102], [SWS_EthIf_91103]). В стеке TcpIp состояние сетевой коммуникации управляется раздельно через TcpIp_RequestComMode(): TCPIP_STATE_ONLINE активирует назначение IP-адресов, TCPIP_STATE_ONHOLD приостанавливает передачу данных, а TCPIP_STATE_OFFLINE закрывает все активные сокеты ([SWS_TCPIP_00070], [SWS_TCPIP_00071], [SWS_TCPIP_00072], [SWS_TCPIP_00074]).

В области Shutdown, Sleep и Wakeup кластер поддерживает стандартизированные последовательности пробуждения согласно OPEN Alliance TC10 (SWS_ECUStateManager с. 192). Если аппаратное обеспечение Ethernet (PHY или порт коммутатора) в состоянии покоя обнаруживает сигнал пробуждения, прерывание сигнализирует об этом событии. После этого код интеграции или EcuM запускает EthIf_CheckWakeup(), который предписывает соответствующим драйверам трансиверов выполнить асинхронную верификацию ([SWS_EthIf_00244], [SWS_EthIf_00245]). Подробные причины пробуждения можно считать через EthIf_GetSwitchPortWakeupReason() ([SWS_EthIf_91005]). При завершении работы TcpIp_ResetIpAssignment() позволяет выполнять целенаправленный сброс сохраненных в NvM назначений IP-адресов ([SWS_TCPIP_00215], [SWS_TCPIP_00216]).

Обработка ошибок, трассировка DET и деградация

Модули кластера реализуют многоуровневую концепцию контроля ошибок и диагностики. Во время разработки и системной интеграции Default Error Tracer (DET) перехватывает ошибки программирования и конфигурации. К ним относятся вызовы до выполнения инициализации модуля (ETH_E_UNINIT, ETHIF_E_UNINIT) ([SWS_Eth_00228], [SWS_EthIf_00036]), недействительные индексы контроллеров или трансиверов (ETH_E_INV_CTRL_IDX, ETHIF_E_INV_TRCV_IDX) ([SWS_Eth_00229], [SWS_EthIf_00326]), а также недопустимые параметры-указатели ([SWS_Eth_00230], [SWS_Eth_00250]). При аппаратных сбоях коммуникации на шине MII Eth_WriteMii() сообщает об ошибке времени выполнения ETH_E_COMMUNICATION ([SWS_Eth_00058], [SWS_Eth_00286]).

Для эксплуатационной диагностики и управления памятью ошибок (DEM) Eth и EthIf предоставляют стандартизированные структуры счетчиков в соответствии со стандартами IETF-RFC. Через Eth_GetCounterValues() и Eth_GetRxStats() регистрируются события сброса из-за переполнения буфера (Buffer Overrun), ошибки CRC, пакеты с превышением или занижением размера (Jabbers, Undersize), а также ошибки выравнивания (Alignment) согласно RFC 1757, RFC 1643 и RFC 2819 ([SWS_Eth_00226], [SWS_Eth_00233], [SWS_Eth_91007], [SWS_Eth_91002]). Счетчики передачи и статистика ошибок предоставляются с помощью Eth_GetTxStats() и Eth_GetTxErrorCounterValues() ([SWS_Eth_91005], [SWS_Eth_91006], [SWS_Eth_91003]). EthIf прозрачно транслирует эти запросы счетчиков для внешнего аппаратного обеспечения коммутатора через EthIf_SwitchPortGetCounterValues() и EthIf_SwitchPortGetTxErrorCounterValues() ([SWS_EthIf_91115], [SWS_EthIf_91118]).

Механизмы деградации и мониторинг качества соединения (Link Quality) обеспечивают функциональную надежность: EthIf_GetTrcvSignalQuality() возвращает текущее, минимальное и максимальное качество соединения физических трансиверов ([SWS_EthIf_91056], [SWS_EthIf_91057]), благодаря чему деградировавшие каналы передачи могут быть диагностированы до обрыва соединения. EthIf_GetAndResetMeasurementData() позволяет считывать и сбрасывать подробные данные измерений по отброшенным датаграммам, например при ошибках конфигурации, связанных с VLAN ID или назначением контроллеров ([SWS_EthIf_91011], [SWS_EthIf_00309]). При обрывах соединения EthIf_Transmit() останавливает пересылку в драйвер ([SWS_EthIf_00076]), в то время как TcpIp при переходе в состояние Offline закрывает сокеты и ликвидирует очереди передачи ([SWS_TCPIP_00072]).

Настоящее руководство основано исключительно на спецификациях AUTOSAR Classic Platform Release 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"