DEENESPTFRRUARHIKOZHNL

Diagnostic over IP (DoIP)

ModulDoIP (Diagnostic over IP)
BSW-Modul-ID173
Standard-Header#include "DoIP.h"
SWS-SpezifikationAUTOSAR_CP_SWS_DiagnosticOverIP.pdf, AUTOSAR_SWS_DiagnosticOverIP.pdf
Umfang268 Records · 14 Snippets
ClusterEthernet-Stack

Diagnostic over IP (DoIP)

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

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

फ़ंक्शन DoIP_TpCancelTransmit [SWS_DoIP_00023] 📄 PDF

Std_ReturnType DoIP_TpCancelTransmit(PduIdType TxPduId);

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.

फ़ंक्शन DoIP_TpCancelReceive [SWS_DoIP_00024] 📄 PDF

Std_ReturnType DoIP_TpCancelReceive(PduIdType RxPduId);

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.

फ़ंक्शन DoIP_Init [SWS_DoIP_00026] 📄 PDF

void DoIP_Init(const DoIP_ConfigType* DoIPConfigPtr);

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

फ़ंक्शन DoIP_SoAdTpCopyTxData [SWS_DoIP_00031] 📄 PDF

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

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.

फ़ंक्शन DoIP_SoAdTpTxConfirmation [SWS_DoIP_00032] 📄 PDF

void DoIP_SoAdTpTxConfirmation(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.

फ़ंक्शन DoIP_SoAdTpCopyRxData [SWS_DoIP_00033] 📄 PDF

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

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.

फ़ंक्शन DoIP_SoAdTpStartOfReception [SWS_DoIP_00037] 📄 PDF

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

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.

फ़ंक्शन DoIP_SoAdTpRxIndication [SWS_DoIP_00038] 📄 PDF

void DoIP_SoAdTpRxIndication(PduIdType id, Std_ReturnType result);

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

फ़ंक्शन DoIP_SoConModeChg [SWS_DoIP_00039] 📄 PDF

void DoIP_SoConModeChg(SoAd_SoConIdType SoConId, SoAd_SoConModeType Mode);

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

फ़ंक्शन DoIP_LocalIpAddrAssignmentChg [SWS_DoIP_00040] 📄 PDF

void DoIP_LocalIpAddrAssignmentChg(SoAd_SoConIdType SoConId, TcpIp_IpAddrStateType State);

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).

फ़ंक्शन DoIP_MainFunction [SWS_DoIP_00041] 📄 PDF

void DoIP_MainFunction(void);

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

फ़ंक्शन <User>_DoIPGetPowerModeCallback [SWS_DoIP_00047] 📄 PDF

Std_ReturnType <User>_DoIPGetPowerModeCallback(DoIP_PowerStateType* PowerStateReady);

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

फ़ंक्शन <User>_DoIPRoutingActivationConfirmation [SWS_DoIP_00048] 📄 PDF

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

Callback function to get the confirmation for the Routing Activation.

फ़ंक्शन <User>_DoIPRoutingActivationAuthentication [SWS_DoIP_00049] 📄 PDF

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

Callback function to get the confirmation for the Routing Activation.

फ़ंक्शन <User>_DoIPTriggerGidSyncCallback [SWS_DoIP_00050] 📄 PDF

Std_ReturnType <User>_DoIPTriggerGidSyncCallback(void);

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.

फ़ंक्शन <User>_DoIPGetGidCallback [SWS_DoIP_00051] 📄 PDF

Std_ReturnType <User>_DoIPGetGidCallback(uint8* GroupId);

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.

फ़ंक्शन DoIP_SoAdIfRxIndication [SWS_DoIP_00244] 📄 PDF

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

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

फ़ंक्शन DoIP_SoAdIfTxConfirmation [SWS_DoIP_00245] 📄 PDF

void DoIP_SoAdIfTxConfirmation(PduIdType TxPduId, Std_ReturnType result);

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

फ़ंक्शन <User>_DoIPGetFurtherActionByteCallback [SWS_DoIP_00288] 📄 PDF

Std_ReturnType <User>_DoIPGetFurtherActionByteCallback(DoIP_FurtherActionByteType* FurtherActionByte);

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

फ़ंक्शन DoIP_ActivationLineSwitch [SWS_DoIP_91000] 📄 PDF

void DoIP_ActivationLineSwitch(uint8 InterfaceId, boolean* Active);

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.

फ़ंक्शन DoIP_TriggerVehicleAnnouncement [SWS_DoIP_91002] 📄 PDF

void DoIP_TriggerVehicleAnnouncement(uint8 InterfaceId);

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.

फ़ंक्शन DoIP_AllowNonTlsDoIPConnection [SWS_DoIP_91003] 📄 PDF

void DoIP_AllowNonTlsDoIPConnection(boolean NonTlsAllowed);

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.

टाइप DoIP_PowerStateType [SWS_DoIP_00266] 📄 PDF

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

टाइप AuthenticationReqDataType [SWS_DoIP_00267] 📄 PDF

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

टाइप AuthenticationResDataType [SWS_DoIP_00268] 📄 PDF

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

टाइप ConfirmationReqDataType [SWS_DoIP_00269] 📄 PDF

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

टाइप ConfirmationResDataType [SWS_DoIP_00270] 📄 PDF

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

टाइप DoIP_FurtherActionByteType [SWS_DoIP_00287] 📄 PDF

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

requirement SWS_DoIP_00001 [SWS_DoIP_00001] 📄 PDF

The DoIP module shall maintain the following information of the configured DoIPUdpConnection (for UDP communication): (a) State of the SocketConnection

requirement SWS_DoIP_00002 [SWS_DoIP_00002] 📄 PDF

The DoIP module shall be able to maintain DoIPMaxTesterCon- nections configured connections with the following information: (a) DoIPSoAdTcpRxPduId, describes the connection to the SocketConnection (b) Source Address (SA) as soon as the information is available for the DoIP module (c) All Routing activation status of this socket connection (d) Status of the SocketConnection (f) Time since last TCP communication (Rx or Tx) (g) Information if the connection is active or not

requirement SWS_DoIP_00004 [SWS_DoIP_00004] 📄 PDF

The first 8 Bytes of a DoIP message shall contain the DoIP Header followed by the actual payload data.

requirement SWS_DoIP_00005 [SWS_DoIP_00005] 📄 PDF

Byte 0 of the DoIP header has to contain the protocol version e.g. 0x02.

requirement SWS_DoIP_00006 [SWS_DoIP_00006] 📄 PDF

The Byte 1 of the DoIP header shall contain the inverse protocol version e.g. 0xFD value shall be added if the protocol version is 0x02.

requirement SWS_DoIP_00008 [SWS_DoIP_00008] 📄 PDF

The following PayloadTypes shall be supported for reception of DoIP messages:

requirement SWS_DoIP_00009 [SWS_DoIP_00009] 📄 PDF

The following PayloadTypes shall be supported for sending of DoIP messages:

requirement SWS_DoIP_00010 [SWS_DoIP_00010] 📄 PDF

Bytes 4 to 7 shall contain the payload length in Bytes not includ- ing the length of the DoIP header information (i.e. if a DoIP message is received with Payload length set to 2 it means that 10 Bytes in total were received).

requirement SWS_DoIP_00012 [SWS_DoIP_00012] 📄 PDF

If an invalid DoIP header was received, a DoIP message with payload type 0x0000 shall be transmitted with the payload described in [SWS_DoIP_00013] on the TxPdu which is related to the RxPdu the message was received on, if the according SocketConnection status has not changed since the re- ception of the DoIP message

requirement SWS_DoIP_00013 [SWS_DoIP_00013] 📄 PDF

The payload of the generic DoIP header shall contain the corresponding NACK code (1 Byte) as specified from [SWS_DoIP_00014] to [SWS_DoIP_00019].

requirement SWS_DoIP_00014 [SWS_DoIP_00014] 📄 PDF

If the Protocol information is incorrect, (see [SWS_DoIP_00005], [SWS_DoIP_00006] and [SWS_DoIP_00015] for valid information) the NACK code 0x00 shall be sent and the according socket shall be closed (see [SWS_DoIP_00058]).

requirement SWS_DoIP_00015 [SWS_DoIP_00015] 📄 PDF

On a vehicle identification request the Protocol Type 0xFF and the inverse Protocol Type 0x00 shall be supported as default values, additionally to the ProtocolType described in [SWS_DoIP_00005] and [SWS_DoIP_00006].

requirement SWS_DoIP_00016 [SWS_DoIP_00016] 📄 PDF

If a payload type is not supported (see [SWS_DoIP_00008] for valid payload types) the DoIP module shall send the NACK code 0x01 to indicate that a unkown payload type was requested. The message shall be discarded for further processing.

requirement SWS_DoIP_00017 [SWS_DoIP_00017] 📄 PDF

If the payload length exceeds the value configured by DoIPMax RequestBytes, the DoIP module shall send the NACK code 0x02 to indicate that the message is too large. The message shall be discarded for further processing.

requirement SWS_DoIP_00018 [SWS_DoIP_00018] 📄 PDF

If the DoIP module is called with DoIP_SoAdTpStartOfRecep- tion() and the indicated payload length exceeds the currently available buffer size, the function must return with BUFREQ_E_OVFL value (No buffer of the required length can be provided) and trigger a Negative Response (NACK) with value 0x03. The currently available buffer size calculation shall be based on Payload Type. If the DoIP message is processed internally (see [SWS_DoIP_00008]) the locally avalailable buffer, other case the upper layer (PduR_DoIPTpStartOfReception) provided buffer size shall be the base for the response.

requirement SWS_DoIP_00019 [SWS_DoIP_00019] 📄 PDF

If the DoIP module is called with a payload length that is not valid for the specifc payload type, the NACK code 0x04 shall be sent and the according socket shall be closed (see [SWS_DoIP_00058]).

requirement SWS_DoIP_00020 [SWS_DoIP_00020] 📄 PDF

Module Header File Imported Type ComStack_Types.h BufReq_ReturnType ComStack_Types.h PduIdType ComStack_Types.h PduInfoType ComStack_Types.h PduLengthType ComStack_Types.h RetryInfoType ComStack_Types ComStack_Types.h TpDataStateType SoAd.h SoAd_SoConIdType SoAd SoAd.h SoAd_SoConModeType Std_Types.h Std_ReturnType Std Std_Types.h Std_VersionInfoType TcpIp.h TcpIp_DomainType TcpIp.h TcpIp_IpAddrAssignmentType TcpIp.h TcpIp_IpAddrStateType TcpIp TcpIp.h TcpIp_SockAddrType

requirement SWS_DoIP_00030 [SWS_DoIP_00030] 📄 PDF

If source code for caller and callee of DoIP_GetVersionInfo is available, the DoIP module should realize DoIP_GetVersionInfo as a macro, defined in the module's header file.

requirement SWS_DoIP_00036 [SWS_DoIP_00036] 📄 PDF

If development error detection is enabled: The function shall check if the id matches a configured DoIPSoAdTcpRxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

requirement SWS_DoIP_00042 [SWS_DoIP_00042] 📄 PDF

The main function for scheduling the DoIP module (Entry point for scheduling) shall be called by the Schedule Manager according to the configured call period.

requirement SWS_DoIP_00043 [SWS_DoIP_00043] 📄 PDF

The call period of the DoIP_MainFunction() is determined by the configuration parameter DoIPMainFunctionPeriod.

requirement SWS_DoIP_00044 [SWS_DoIP_00044] 📄 PDF

Dcm_GetVin Dcm.h Function to get the VIN (as defined in SAE J1979-DA) PduR_DoIPTpCopyRxData PduR_DoIPTp.h 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. PduR_DoIPTpCopyTxData PduR_DoIPTp.h 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. PduR_DoIPTpRxIndication PduR_DoIPTp.h Called after an I-PDU has been received via the TP API, the result indicates whether the transmission was successful or not. API Function Header File Description PduR_DoIPTpStartOfReception PduR_DoIPTp.h 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. PduR_DoIPTpTxConfirmation PduR_DoIPTp.h This function is called after the I-PDU has been transmitted on its network, the result indicates whether the transmission was successful or not. SoAd_CloseSoCon SoAd.h This service closes the socket connection specified by SoConId. SoAd_GetPhysAddr SoAd.h Retrieves the physical source address of the EthIf controller used by the SoAd socket connection specified by SoConId. SoAd_GetSoConId SoAd.h Returns socket connection index related to the specified TxPduId. SoAd_IfTransmit SoAd.h Requests transmission of a PDU. SoAd_OpenSoCon SoAd.h This service opens the socket connection specified by SoConId. SoAd_ReadDhcpHostNameOption SoAd.h 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. SoAd_ReleaseIpAddrAssignment SoAd.h By this API service the local IP address assignment used for the socket connection specified by SoConId is released. SoAd_RequestIpAddrAssignment SoAd.h By this API service the local IP address assignment which shall be used for the socket connection specified by SoConId is initiated. SoAd_TpTransmit SoAd.h Requests transmission of a PDU. SoAd_WriteDhcpHostNameOption SoAd.h 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.

requirement SWS_DoIP_00045 [SWS_DoIP_00045] 📄 PDF

Det_ReportError Det.h Service to report development errors. PduR_DoIPIfTxConfirmation PduR_DoIPIf.h The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

requirement SWS_DoIP_00052 [SWS_DoIP_00052] 📄 PDF

A DoIP Service Component with the ShortName DoIP shall be provided based on the configuration of the DoIP module.

requirement SWS_DoIP_00054 [SWS_DoIP_00054] 📄 PDF

Name CallbackGetPowerMode Comment – IsService true Variation {ecuc(DoIP/DoIPGeneral/DoIPPowerModeCallback/DoIPPowerModeDirect)} == NULL 0 E_OK Operation successful Possible Errors 1 E_NOT_OK Operation failed Operation GetPowerMode Comment – Mapped to API <User>_DoIPGetPowerModeCallback Variation – Parameters PowerStateReady Type DoIP_PowerStateType Direction OUT Comment – Variation – Possible Errors E_OK E_NOT_OK

requirement SWS_DoIP_00055 [SWS_DoIP_00055] 📄 PDF

Name {Name}_RoutingActivation Comment – IsService true Variation (({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRoutingActivation AuthenticationCallback)} != null) && ({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation/DoIPRoutingActivationAuthenticationCallback/DoIPRoutingActivationAuthentication Func)} == "")) || (({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/Do IPRoutingActivationConfirmationCallback)} != null) && ({ecuc(DoIP/DoIPConfigSet/Do IPInterface/DoIPRoutingActivation/DoIPRoutingActivationConfirmationCallback/DoIPRouting ActivationConfirmationFunc)} == "")) Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation.SHORT-NAME)} 0 E_OK Operation successful 1 E_NOT_OK Operation failed Possible Errors 16 DOIP_E_PENDING RoutingActivation still pending. Operation RoutingActivationAuthentication Comment – Mapped to API <User>_DoIPRoutingActivationAuthentication Variation (({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRoutingActivation AuthenticationCallback)} != NULL) && ({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation/DoIPRoutingActivationAuthenticationCallback/DoIPRoutingActivationAuthentication Func)} ==NULL)) Authentified Parameters Type boolean Direction OUT Comment – Variation – AuthenticationReqData Type AuthenticationReqDataType_{Name} Direction IN Comment – Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRouting ActivationAuthenticationCallback.DoIPRoutingActivationAuthenticationReq Length)} > 0 Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation.SHORT-NAME)} AuthenticationResData Type AuthenticationResDataType_{Name} Direction OUT Comment – Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRouting ActivationAuthenticationCallback.DoIPRoutingActivationAuthenticationRes Length)} > 0 Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation.SHORT-NAME)} Possible Errors E_OK E_NOT_OK DOIP_E_PENDING Operation RoutingActivationConfirmation Comment – Mapped to API <User>_DoIPRoutingActivationConfirmation Variation (({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRoutingActivation ConfirmationCallback)} != NULL) && ({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation/DoIPRoutingActivationConfirmationCallback/DoIPRoutingActivationConfirmation Func)} ==NULL)) Confirmed Type boolean Direction OUT Comment – Variation – ConfirmedReqData Type ConfirmationReqDataType_{Name} Direction IN Comment – Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRouting ActivationConfirmationCallback.DoIPRoutingActivationConfirmationReq Length)} > 0 Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation.SHORT-NAME)} ConfirmedResData Type ConfirmationResDataType_{Name} Direction OUT Parameters Comment – Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRouting ActivationConfirmationCallback.DoIPRoutingActivationConfirmationRes Length)} > 0 Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation.SHORT-NAME)} Possible Errors E_OK E_NOT_OK DOIP_E_PENDING

requirement SWS_DoIP_00056 [SWS_DoIP_00056] 📄 PDF

Name CallbackTriggerGIDSynchronization Comment – IsService true Variation ({ecuc(DoIP/DoIPGeneral/DoIPTriggerGidSyncCallback)} != NULL) && ({ecuc(DoIP/Do IPGeneral/DoIPTriggerGidSyncCallback/DoIPTriggerGidSyncDirect)} == NULL) && ({ecuc(Do IP/DoIPGeneral/DoIPVinGidMaster)} == TRUE) 0 E_OK Operation successful Possible Errors 1 E_NOT_OK Operation failed Operation TriggerGIDSynchronization Comment – Mapped to API <User>_DoIPTriggerGidSyncCallback Variation – Possible Errors E_OK E_NOT_OK

requirement SWS_DoIP_00057 [SWS_DoIP_00057] 📄 PDF

Name CallbackGetGID Comment – IsService true Variation ({ecuc(DoIP/DoIPGeneral/DoIPGetGidCallback)} != NULL) && ({ecuc(DoIP/DoIPGeneral/Do IPGetGidCallback/DoIPGetGidDirect)} == NULL) 0 E_OK Operation successful Possible Errors 1 E_NOT_OK Operation failed Operation GetGID Comment – Mapped to API <User>_DoIPGetGidCallback Variation – Data Type uint8 Direction OUT Comment – Parameters Variation – Possible Errors E_OK E_NOT_OK

requirement SWS_DoIP_00058 [SWS_DoIP_00058] 📄 PDF

If a connection needs to be closed based on DoIP specific be- havior, the DoIP module shall call the function SoAd_CloseSoCon with the parameter abort set to FALSE and the SoConId determined by a call to the function SoAd_Get SoConId for the corresponding DoIPSoAdTcpTxPdu. Additionally, the inactivity timer shall be stopped.

requirement SWS_DoIP_00059 [SWS_DoIP_00059] 📄 PDF

The expected payload length (see [SWS_DoIP_00019]) for vehi- cle identification request message with payload type 0x0001 shall be exactly 0.

requirement SWS_DoIP_00060 [SWS_DoIP_00060] 📄 PDF

If a DoIP message with payload Type 0x0001 is received on the configured DoIPUdpConnection, the DoIP module shall respond with a vehicle identifi- cation response/vehicle announcement message after the configured DoIPInitialVehi- cleAnnouncementTime with payload type 0x0004.

requirement SWS_DoIP_00061 [SWS_DoIP_00061] 📄 PDF

When the module receives a DoIP message with payload type 0x0001 on a connection different than a configured DoIPUdpConnection, the module shall discard the DoIP message.

requirement SWS_DoIP_00062 [SWS_DoIP_00062] 📄 PDF

When the module receives a DoIP message with payload Type 0x0002 on a connection different than a configured DoIPUdpConnection, the module shall discard the DoIP message.

requirement SWS_DoIP_00063 [SWS_DoIP_00063] 📄 PDF

The expected payload length (see [SWS_DoIP_00019]) for vehi- cle identification request message with payload type 0x0002 shall be exactly 6.

requirement SWS_DoIP_00064 [SWS_DoIP_00064] 📄 PDF

If a DoIP message with payload Type 0x0002 is received on the configured DoIPUdpConnection, the DoIP module shall further process the message.

requirement SWS_DoIP_00065 [SWS_DoIP_00065] 📄 PDF

If the Parameter DoIPUseMacAdressForIdentification is set to true the received "EID" 6 payload data bytes shall be compared to the MacAddress received via SoAd_GetPhysAddr . If they match the DoIP module shall respond with a vehicle identification response/vehicle announcement message with payload type 0x0004.

requirement SWS_DoIP_00066 [SWS_DoIP_00066] 📄 PDF

If the Parameter DoIPUseMacAdressForIdentification is set to false the received "EID" 6 payload data bytes shall be compared to the configured Do IPEID. If they match the DoIP module shall respond with a vehicle identification respon- se/vehicle announcement message with payload type 0x0004.

requirement SWS_DoIP_00067 [SWS_DoIP_00067] 📄 PDF

When the module receives a DoIP message with payload Type 0x0003 on a connection different than a configured DoIPUdpConnection, the module shall discard the DoIP message.

requirement SWS_DoIP_00068 [SWS_DoIP_00068] 📄 PDF

The expected payload length (see [SWS_DoIP_00019]) for ve- hicle identification request message with payload type 0x0003, shall be exactly 17.

requirement SWS_DoIP_00069 [SWS_DoIP_00069] 📄 PDF

If a DoIP message with payload Type 0x0003 is received on the configured DoIPUdpConnection the DoIP module shall further process the message.

requirement SWS_DoIP_00070 [SWS_DoIP_00070] 📄 PDF

The DoIP 17 payload data bytes shall be compared to the data retrieved by the function Dcm_GetVin. If the function returns E_OK, the VIN pointer is considered to contain valid information. If the function returns E_NOT_OK or the returned VIN do not match the requested VIN, the DoIP message with payload Type 0x0003 shall be ignored. If the requested VIN matches the derived VIN, the DoIP mod- ule shall respond with a vehicle identification response/vehicle announcement mes- sage with payload type 0x0004.

requirement SWS_DoIP_00071 [SWS_DoIP_00071] 📄 PDF

If the DoIP module needs to send a vehicle announcement mes- sage (see [SWS_DoIP_00205] and [SWS_DoIP_00298]), it shall send the vehicle an- nouncement message via the configured DoIPUdpVehicleAnnouncementConnection after DoIPInitialVehicleAnnouncementTime. This message shall be sent DoIPVehi- cleAnnouncementCount times with a delay of DoIPVehicleAnnouncementInterval be- tween each message. The last "VIN/GID Status" byte of the Vehicle identification re- sponse message is optional as defined in the ISO 13400-2 standard. It shall exist only if the "DoIPUseVehicleIdentificationSyncStatus" configuration parameter is set to True. (See [SWS_DoIP_00086]).

requirement SWS_DoIP_00072 [SWS_DoIP_00072] 📄 PDF

The "VIN" of a vehicle identification response/vehicle announce- ment message shall be derived by calling Dcm_GetVin. If Dcm_GetVin returns E_OK, the 17 Bytes in the pointer shall be used, if the callback returns E_NOT_OK the 17 Bytes shall be filled with the configured DoIPVinInvalidityPattern with "Further Action Required" field set to 0x00 and VIN/GID sync. Status field set to 0x10 if (DoIPUse VehicleIdentificationSyncStatus) is set to true.

requirement SWS_DoIP_00073 [SWS_DoIP_00073] 📄 PDF

The "LA" of a vehicle identification response/vehicle announce- ment message shall contain the configured DoIPLogicalAddress.

requirement SWS_DoIP_00074 [SWS_DoIP_00074] 📄 PDF

The "EID" of a vehicle identification response/vehicle announce- ment message shall contain the MAC address derived by Soad_GetPhysAddr if the configuration parameter DoIPUseMacAdressForIdentification is set to true.

requirement SWS_DoIP_00075 [SWS_DoIP_00075] 📄 PDF

The "EID" of a vehicle identification response/vehicle announce- ment message shall contain the configured DoIPEID if the configuration parameter Do IPUseMacAdressForIdentification is set to false.

requirement SWS_DoIP_00076 [SWS_DoIP_00076] 📄 PDF

If the parameter DoIPVinGIDMaster is set to true and the Con- tainer DoIPTriggerGIDSynchronization is configured, the DoIP module shall call the <User>_DoIPTriggerGIDSynchronization function (after successful IP Address assign- ment, see [SWS_DoIP_00306]) and repeat this call within the DoIP_MainFunction until its return value equals to E_OK or until the complete connection is closed for any other reason.

requirement SWS_DoIP_00077 [SWS_DoIP_00077] 📄 PDF

The "GID" of a vehicle identification response/vehicle announce- ment message shall contain the same value as for the EID, if both configuration parameter and DoIPUseEIDasGID are set to true (see [SWS_DoIP_00074] and [SWS_DoIP_00075]).

requirement SWS_DoIP_00078 [SWS_DoIP_00078] 📄 PDF

The "GID" of a vehicle identification response/vehicle announce- ment message shall contain the configured DoIPGID value, if the configuration param- eter DoIPVinGIDMaster is set to true, the configuration parameter DoIPUseEIDasGID is set to false and the parameter DoIPGID is configured.

requirement SWS_DoIP_00079 [SWS_DoIP_00079] 📄 PDF

The "GID" of a vehicle identification response/vehicle announce- ment message shall contain the value retrieved by the configured DoIPGetGidCallback function(for the signature see <User>_DoIPGetGidcallback, [SWS_DoIP_00051]), if the configuration parameter DoIPVinGIDMaster is set to true, the configuration param- eter DoIPUseEIDasGID is set to false and the parameter DoIPGID is not configured. If the function does not return E_OK the GID shall consist of 6 Bytes according to the configured DoIPGIDInvalidityPattern.

requirement SWS_DoIP_00080 [SWS_DoIP_00080] 📄 PDF

The "GID" of a vehicle identification response/vehicle announce- ment message shall contain the configured DoIPGID value, if the configuration pa- rameter DoIPVinGIDMaster is set to false and the parameter DoIPGID is configured.

requirement SWS_DoIP_00081 [SWS_DoIP_00081] 📄 PDF

The "GID" of a vehicle identification response/vehicle announce- ment message shall contain the value retrieved by the configured DoIPGetGID func- tion, if the configuration parameter DoIPVinGIDMaster is set to false and the parameter DoIPGID is not configured. If the function does not return E_OK, the GID shall consist of 6 Bytes according to the configured DoIPGIDInvalidityPattern.

requirement SWS_DoIP_00082 [SWS_DoIP_00082] 📄 PDF

The "Further action" byte of a vehicle identification response/ve- hicle announcement message shall contain the value 0x10 if any DoIPRoutingActiva- tion with DoIPRoutingActivationNumber equal to 0xE0 is configured and the according RoutingActivation was not yet successfully performed.

requirement SWS_DoIP_00083 [SWS_DoIP_00083] 📄 PDF

The "Further action" byte of a vehicle identification response/ve- hicle announcement message shall contain the value 0x00, if no DoIPRoutingActivation with DoIPRoutingActivationNumber equal to 0xE0 is configured.

requirement SWS_DoIP_00084 [SWS_DoIP_00084] 📄 PDF

The "Further action" byte of a vehicle identification response/ve- hicle announcement message shall contain the value 0x00, if any DoIPRoutingActiva- tion with DoIPRoutingActivationNumber equal to 0xE0 is configured and the according RoutingActivation was successfully performed.

requirement SWS_DoIP_00085 [SWS_DoIP_00085] 📄 PDF

If a change in the IP address assignment indicated by Do IP_LocalIpAddrAssignmentChg with another TCP_IpAddrStateType then TCPIP_ IPADDR_STATE_ASSIGNED, the function to start GID synchronisation as described in [SWS_DoIP_00076] shall not be called any longer independent from the before re- turn value.

requirement SWS_DoIP_00086 [SWS_DoIP_00086] 📄 PDF

If the configuration parameter DoIPUseVehicleIdentificationSync Status is set to true, the "VIN/GID status" byte shall be additionally added to the vehicle identification response/vehicle announcement message.

requirement SWS_DoIP_00087 [SWS_DoIP_00087] 📄 PDF

If a valid VIN could be requested in [SWS_DoIP_00072], the value of the "VIN/GID status" byte shall be 0x00.

requirement SWS_DoIP_00088 [SWS_DoIP_00088] 📄 PDF

If no valid VIN could be requested in [SWS_DoIP_00072] and the vehicle GID synchronization was not yet successful as described in [SWS_DoIP_00076], the value of the "VIN/GID status" byte shall be 0x10.

requirement SWS_DoIP_00089 [SWS_DoIP_00089] 📄 PDF

If no valid VIN could be requested in [SWS_DoIP_00072] and the vehicle GID synchronization was already successful as described in [SWS_DoIP_00076], the value of the "VIN/GID status" byte shall be 0x00.

requirement SWS_DoIP_00090 [SWS_DoIP_00090] 📄 PDF

When the module receives a DoIP message with payload Type 0x4003 on a connection different than a configured DoIPUdpConnection, the module shall discard the DoIP message.

requirement SWS_DoIP_00091 [SWS_DoIP_00091] 📄 PDF

The expected payload length (see [SWS_DoIP_00019]) for di- agnostic power mode information request message with payload type 0x4003 shall be exactly 0.

requirement SWS_DoIP_00092 [SWS_DoIP_00092] 📄 PDF

After a valid Diagnostic power mode request message, the DoIP module shall send a Diagnostic Power mode information response message ([SWS_DoIP_00093]) on the configured DoIPUdpConnection.

requirement SWS_DoIP_00093 [SWS_DoIP_00093] 📄 PDF

The "Diagnostic Power Mode" byte of diagnostic power mode in- formation response message contains the 1 Byte value retrieved by a call to the config- ured DoIPPowerModeCallback (for the signature see <User>DoIPGetPowerModeSta- tus, [SWS_DoIP_00047]). If the function returns E_OK, the "Diagnostic Power Mode" shall be set to the retrieved value of PowerStateReady, otherwise it shall be set to 0x00 to indicate that the power mode is not ready.

requirement SWS_DoIP_00094 [SWS_DoIP_00094] 📄 PDF

When the module receives a DoIP message with payload Type 0x4001 on a connection different than a configured DoIPUdpConnection, the module shall discard the DoIP message.

requirement SWS_DoIP_00095 [SWS_DoIP_00095] 📄 PDF

The expected payload length (see [SWS_DoIP_00019]) for di- agnostic entity status request message with payload type 0x4001 shall be exactly 0.

requirement SWS_DoIP_00096 [SWS_DoIP_00096] 📄 PDF

After a valid Diagnostic entity status request message, the DoIP module shall send a Diagnostic entity status response message (see Table 7.11) on the configured DoIPUdpConnection.

requirement SWS_DoIP_00097 [SWS_DoIP_00097] 📄 PDF

The "Node Type" byte of a diagnostic entity status response message shall contain the configured DoIPNodeType, whereas DOIP_GATEWAY shall be represented by 0x00 and DOIP_NODE shall be represented by 0x01.

requirement SWS_DoIP_00098 [SWS_DoIP_00098] 📄 PDF

The "Max open sockets" byte of a diagnostic entity status re- sponse message shall contain the configured DoIPMaxTesterConnections. This pa- rameter represents the maximum number of concurrent TCP_DATA sockets allowed with this DoIP entity, excluding the reserve socket required for socket handling as de- fined in the ISO 13400-2 standard.

requirement SWS_DoIP_00099 [SWS_DoIP_00099] 📄 PDF

The "Currently open sockets" byte of a diagnostic entity status response message shall contain the currently active connections, based on the infor- mation described in [SWS_DoIP_00002].

requirement SWS_DoIP_00100 [SWS_DoIP_00100] 📄 PDF

The "Max data size" bytes are only supported if the configuration parameter DoIPEntityStatusMaxByteFieldUse is set to TRUE. In this case, the diag- nostic entity status response message shall contain the configured DoIPMaxRequest Bytes in the "Max data size" field.

requirement SWS_DoIP_00101 [SWS_DoIP_00101] 📄 PDF

When the module receives a DoIP message with payload Type 0x0005 on a connection different than a configured DoIPTcpConnection, the module shall discard the DoIP message.

requirement SWS_DoIP_00102 [SWS_DoIP_00102] 📄 PDF

If a routing activation request message is received with a valid DoIP header, the DoIP module shall process further to [SWS_DoIP_00103], if the field "Source address" matches a configured DoIPTesterSA.

requirement SWS_DoIP_00103 [SWS_DoIP_00103] 📄 PDF

The DoIP module shall always continue with processing as de- fined in [SWS_DoIP_00105], either if the received "Source Address" is already regis- tered to a connection as described in [SWS_DoIP_00002] and it is the same socket connection this routing activation request was received on, or if the received "Source Address" is not registered to a connection yet.

requirement SWS_DoIP_00104 [SWS_DoIP_00104] 📄 PDF

If a routing activation request message is received with a "Source address" that does not match a configured DoIPTesterSA, the routing activa- tion response message shall be sent on the same connection as the received request with the routing activation response code 0x00. Additionally the socket connection shall be closed as defined in [SWS_DoIP_00058].

requirement SWS_DoIP_00105 [SWS_DoIP_00105] 📄 PDF

If the received "Source Address" is already registered to an- other connection, belonging to the same DoIPInterface, an alive check request to this connection shall be triggered as described in [SWS_DoIP_00139] and [SWS_DoIP_00140] and it shall be waiting for the alive check response message or until the time configured in parameter DoIPAliveCheckResponseTimeout expired. If the alive check response was received within the configured time, the DoIP mod- ule shall send a routing activation response message with the activation response code set to 0x03. Additionally the socket connection shall be closed as defined in [SWS_DoIP_00058]. If the "Source Address" is not already registered or the DoIPAlive CheckResponseTimeout expired without receiving an alive check response message the DoIP module shall continue with [SWS_DoIP_00107].

requirement SWS_DoIP_00106 [SWS_DoIP_00106] 📄 PDF

If a routing activation request message is received with a valid "Source address" but the connection this Routing activation was received on is already registered to another source address, the DoIP module shall send a routing activation response message on the same connection the request was received on, with the routing activation response code set to 0x02. Additionally the socket connection shall be closed as defined in [SWS_DoIP_00058].

requirement SWS_DoIP_00107 [SWS_DoIP_00107] 📄 PDF

If the amount of registered connections is smaller than the configured DoIPMaxTesterConnections, the DoIP module shall proceed with the message as described in [SWS_DoIP_00108] otherwise an alive check request shall be sent to all registered connections as described in [SWS_DoIP_00139] and [SWS_DoIP_00140]. If none of the alive checks times out (i.e. all tester respond with a valid alive check response within the configured DoIPAliveCheckResponseTimeout) the DoIP module shall send a routing activation response message with the activa- tion response code set to 0x01. Additionally the socket connection shall be closed as defined in [SWS_DoIP_00058]. If at least one of them times out the DoIp module shall close the socket connection and continue as described in [SWS_DoIP_00108].

requirement SWS_DoIP_00108 [SWS_DoIP_00108] 📄 PDF

If the "Activation type" bytes matches the DoIPRoutingActiva- tionNumber of one of the DoIPRoutingActivationRef of the "Source Address" (i.e. DoIPTester has a DoIPRoutingActivationRef configured which has the DoIPRouting ActivationNumber equal to "Activation type") the DoIP module shall proceed with [SWS_DoIP_00109].

requirement SWS_DoIP_00109 [SWS_DoIP_00109] 📄 PDF

If an DoIPRoutingActivationAuthenticationCallback is configured for the referenced DoIPRoutingActivation, the DoIP module shall call this callback (for the signature see <User>_DoIPRoutingActivationAuthentication, [SWS_DoIP_00049]). If the DoIPRoutingActivationAuthenticationReqLength is not configured to 0, the Do IP module shall handle additionally the first DoIPRoutingActivationAuthenticationReq Length bytes of the optional field "OEM specific".

requirement SWS_DoIP_00110 [SWS_DoIP_00110] 📄 PDF

If the DoIPRoutingActivationAuthenticationCallback returns DOIP_E_PENDING the DoIP module shall trigger the callback at next DoIP_MainFunc- tion call again until something else than DOIP_E_PENDING is returned. Additionally the socket connection shall be considered as registered to this DoIPTesterSA without activating the routing.

requirement SWS_DoIP_00111 [SWS_DoIP_00111] 📄 PDF

If the DoIPRoutingActivationAuthenticationCallback returns something else (e.g. E_NOT_OK) the DoIP module shall send a routing activation response message with the activation response code set to 0x04 and the socket con- nection shall be considered as registered to this DoIPTesterSA without activating the routing.

requirement SWS_DoIP_00112 [SWS_DoIP_00112] 📄 PDF

If a DoIPRoutingActivationConfirmationCallback is configured for the referenced DoIPRoutingActivation, the DoIp module shall call this callback (for the signature see <User>_DoIPRoutingActivationConfirmation, [SWS_DoIP_00048]). If the DoIPRoutingActivationConfirmationReqLength is not configured to 0, the Do IP module shall handle additionally the last DoIPRoutingActivationConfirmationReq Length bytes of the optional field "OEM specific". If the Callback returns with E_OK the routing activation confirmation shall be considered as successful and if the Do IPRoutingActivationConfirmationResLengthis not set to 0, the last DoIPRoutingActi- vationConfirmationResLength bytes shall be attached in routing activation response message in the field "OEM specific" as described in [SWS_DoIP_00120].

requirement SWS_DoIP_00113 [SWS_DoIP_00113] 📄 PDF

If no response was sent because of the before mentioned checks this DoIPRoutingActivation is confirmed, authorized and valid so the DoIP module shall send a routing activation response message with the activation response code set to 0x10 and the socket connection shall be considered as registered to this DoIPTester SA and enable the routing for this routing activation. From now on the routing to the configured DoIPTargetAdressRef are active and valid so the diagnostic request mes- sages related to the specified DoIPTargetAdress received via this socket connection are active.

requirement SWS_DoIP_00114 [SWS_DoIP_00114] 📄 PDF

If the DoIPRoutingActivationConfirmationCallback returns DOIP_E_PENDING, the DoIP module shall send a routing activation response mes- sage once with the activation response code set to 0x11.

requirement SWS_DoIP_00115 [SWS_DoIP_00115] 📄 PDF

If a TCP socket connection gets closed (after the DoIP_SoCon ModeChg was called with different mode value than SOAD_SOCON_ONLINE or any other reason described by [SWS_DoIP_00058] or [SWS_DoIP_00358]) the DoIP mod- ule shall - unregister and release the socket connection to the related Tester, - discard the ongoing diagnostic message processing and - reset the inactivity timer of the given socket connection.

requirement SWS_DoIP_00116 [SWS_DoIP_00116] 📄 PDF

The "Logical Address Tester" field shall be set to the Tester SA the according routing activation request message was received from.

requirement SWS_DoIP_00117 [SWS_DoIP_00117] 📄 PDF

The expected payload length (see [SWS_DoIP_00019]) for Routing Activation Request Message with payload type 0x0005 shall be either exactly 7 or 11.

requirement SWS_DoIP_00118 [SWS_DoIP_00118] 📄 PDF

The "Logical Address DoIP entity" shall be set to the configured parameter DoIPLogicalAddress.

requirement SWS_DoIP_00119 [SWS_DoIP_00119] 📄 PDF

The "Routing activation response code shall be set accord- ing to the response conditions specified in [SWS_DoIP_00106], [SWS_DoIP_00104], [SWS_DoIP_00105], [SWS_DoIP_00107], [SWS_DoIP_00160], [SWS_DoIP_00111], [SWS_DoIP_00114], [SWS_DoIP_00274] and [SWS_DoIP_00113].

requirement SWS_DoIP_00120 [SWS_DoIP_00120] 📄 PDF

The "OEM specific" field shall be filled with the optional values as defined in chapter 7.3.2.2.1. if the according DoIPRoutingActivationAuthentica- tionResLength and/or DoIPRoutingActivationConfirmationResLength is used.

requirement SWS_DoIP_00121 [SWS_DoIP_00121] 📄 PDF

When the module receives a DoIP message with payload Type 0x8001 on a connection different than a configured DoIPTcpConnection, the module shall discard the DoIP message.

requirement SWS_DoIP_00122 [SWS_DoIP_00122] 📄 PDF

The expected payload length (see [SWS_DoIP_00019]) for diag- nostic messages with payload type 0x8001 shall be at least 5 byte.

requirement SWS_DoIP_00123 [SWS_DoIP_00123] 📄 PDF

If the DoIP module receives a diagnostic message with a "Source Address" (equals DoIPTesterSA) which is not registered on an established socket connection, the DoIP modules shall send a diagnostic message negative acknowledge message with the diagnostic message negative acknowledge code set to 0x02. Additionally the socket connection shall be closed as described in [SWS_DoIP_00058].

requirement SWS_DoIP_00124 [SWS_DoIP_00124] 📄 PDF

If the DoIP module receives a diagnostic message with a "Target Addess" (equals DoIPTargetAdressValue) which is not connected via DoIPRoutingAc- tivationRef and DoIPTargetAdressRef to the received valid DoIPTesterSA, than the Do IP module shall send a diagnostic message negative acknowledge message with the diagnostic message negative acknowledge code set to 0x03. Additionally the message shall be discarded.

requirement SWS_DoIP_00125 [SWS_DoIP_00125] 📄 PDF

If the DoIP module receives a diagnostic message with the pay- load data length in the DoIP header is set to a value bigger than DoIPMaxRequest Bytes-4, than the DoIP module shall send a diagnostic message negative acknowl- edge message with the diagnostic message negative acknowledge code set to 0x04. Additionally the message shall be discarded.

requirement SWS_DoIP_00126 [SWS_DoIP_00126] 📄 PDF

If the DoIP module receives a diagnostic message and [SWS_DoIP_00125] does not apply but the current buffer size is not sufficient to re- ceive the message, than the DoIP module shall send a diagnostic message negative acknowledge message with the diagnostic message negative acknowledge code set to 0x05. Additionally the message shall be discarded.

requirement SWS_DoIP_00127 [SWS_DoIP_00127] 📄 PDF

If the DoIP module receives a diagnostic message and the according "TargetAddress" was not activated by routing activation as described in [SWS_DoIP_00113], the DoIP module shall send a diagnostic message negative ac- knowledge message with the diagnostic message negative acknowledge code set to 0x06. Additionally the message shall be discarded.

requirement SWS_DoIP_00128 [SWS_DoIP_00128] 📄 PDF

If no negative acknowledge was sent the DoIP module shall eval- uate the message and forward the content (i.e. all UDS Data, not the TargetAddress and SourceAddress) to the DoIPPduRRxPdu connected to the received TargetAd- dress/SourceAddress combination as configured in DoIPChannel

requirement SWS_DoIP_00129 [SWS_DoIP_00129] 📄 PDF

If the PduR accepted all Data, the DoIP module shall send a diagnostic acknowledge message as described in Table 7.13.

requirement SWS_DoIP_00130 [SWS_DoIP_00130] 📄 PDF

The DoIP module will get a diagnostic response message (i.e Do IP_TpTransmit or DoIP_IfTransmit is called with DoIPPduRTxPdu which matches to the DoIPPduRRxPdu that handled the data to the PduR) via the upper layer connection to the PduR, so it has to monitor whether the socket connection the request was received on is still established. If the socket connection has been closed, the response shall be discarded and the DoIP shall return with E_NOT_OK in the return value.

requirement SWS_DoIP_00131 [SWS_DoIP_00131] 📄 PDF

If the DoIP module is called with DoIPPduRTxPdu in the DoIP_ TpTransmit or DoIP_IfTransmit as described in [SWS_DoIP_00130] and the according socket connection has not been closed since the reception of the according diagnos- tic message, the DoIP module shall prepare a diagnostic message via the according socket connection with the "SourceAddress" set to the DoIPTargetAdressValue of the request and the "TargetAddress" set to the DoIPTesterSA.

requirement SWS_DoIP_00132 [SWS_DoIP_00132] 📄 PDF

If the DoIP module needs to send a diagnostic acknowledge message the "Source Address" shall be set to the according "TargetAddress" of the received message.

requirement SWS_DoIP_00133 [SWS_DoIP_00133] 📄 PDF

If the DoIP module needs to send a diagnostic acknowledge message the "Target Address" shall be set to the according "SourceAddress" of the received message.

requirement SWS_DoIP_00134 [SWS_DoIP_00134] 📄 PDF

If the DoIP module needs to send a diagnostic acknowledge message the field "previous diag message" shall be filled with the number of bytes of the original request message as configured in the parameter DoIPNumByteDiagAck Nack for the DoIPTester the request was received on.

requirement SWS_DoIP_00135 [SWS_DoIP_00135] 📄 PDF

If the DoIP module needs to send a diagnostic negative acknowl- edge message the "Source Address" shall be set to the according "TargetAddress" of the received message.

requirement SWS_DoIP_00136 [SWS_DoIP_00136] 📄 PDF

If the DoIP module needs to send a diagnostic negative acknowl- edge message the "Target Address" shall be set to the according "SourceAddress" of the received message.

requirement SWS_DoIP_00137 [SWS_DoIP_00137] 📄 PDF

If the DoIP module needs to send a diagnostic negative acknowl- edge message, the "Diagnostic message negative acknowledge code" shall be set to the value specified by the specification item that is triggering the diagnostic negative acknowledge message.

requirement SWS_DoIP_00138 [SWS_DoIP_00138] 📄 PDF

If the DoIP module needs to send a diagnostic negative acknowl- edge message the field "previous diag message" shall be filled with the configured number of the original request message as configured in the parameter DoIPNumByte DiagAckNack for the DoIPTester the request was received on.

requirement SWS_DoIP_00139 [SWS_DoIP_00139] 📄 PDF

If the DoIP module needs to send a alive check request, it shall have no payload data but only the generic DoIP header and the payload type set 0x0007.

requirement SWS_DoIP_00140 [SWS_DoIP_00140] 📄 PDF

After sending an alive check request the DoIP module shall wait the configured time DoIPAliveCheckResponseTimeout to receive a valid alive check response and [SWS_DoIP_00141]. If it does not receive an alive check response, the socket connection on which the alive check request was sent shall be reset as described in [SWS_DoIP_00358].

requirement SWS_DoIP_00141 [SWS_DoIP_00141] 📄 PDF

If the received Alive check response field "SourceAddress" matches the registered Source Address of the socket connection the response was received on, the DoIP module shall do nothing. Otherwise it shall reset the socket connection as described in [SWS_DoIP_00358].

requirement SWS_DoIP_00142 [SWS_DoIP_00142] 📄 PDF

The DoIP module shall maintain an inactivity timer for each reg- istered TCP connection.

requirement SWS_DoIP_00143 [SWS_DoIP_00143] 📄 PDF

After a successful TCP socket connection (i.e. DoIP_SoCon ModeChg) the DoIP module shall start the inactivity timer.

requirement SWS_DoIP_00144 [SWS_DoIP_00144] 📄 PDF

If no Routing Activation request was received on a new opened socket within the configured DoIPInitialInactivityTime, the DoIP module shall reset the socket connection as described in [SWS_DoIP_00358].

requirement SWS_DoIP_00145 [SWS_DoIP_00145] 📄 PDF

After a routing activation has been performed (see [SWS_DoIP_00159]), the DoIP module shall reset the inactivtity timer to 0 al- ways when data communication is performed on the socket (send or receive).

requirement SWS_DoIP_00146 [SWS_DoIP_00146] 📄 PDF

If the inactivity timer reaches the time configured in DoIPGen- eralInactivityTime, the corresponding socket connection shall be reset as described in [SWS_DoIP_00358].

requirement SWS_DoIP_00148 [SWS_DoIP_00148] 📄 PDF

Type of error Related error code Error value API service call without module initialization DOIP_E_UNINIT 0x01 NULL-Pointer on any API call DOIP_E_PARAM_POINTER 0x02 Wrong Lower Layer (SoAd) or Upper Layer (Pdu Router) Id received DOIP_E_INVALID_PDU_SDU_ID 0x03 API call with invalid Parameter DOIP_E_INVALID_PARAMETER 0x04 DoIP Init service call failure DOIP_E_INIT_FAILED 0x05

requirement SWS_DoIP_00154 [SWS_DoIP_00154] 📄 PDF

If the API DoIP_LocalIpAddrAssignmentChg is called with the State set to TCPIP_IPADDR_STATE_ASSIGNED, the DoIP module shall call the func- tion SoAd_ReadDhcpHostNameOption with the received SoConId to get the currently set host name option. The returned Byte buffer shall be considered as ASCII buffer and shall start with "DoIP-".

requirement SWS_DoIP_00155 [SWS_DoIP_00155] 📄 PDF

If the ASCII buffer returned in [SWS_DoIP_00154] does not start with "DoIP-" and the configuration parameter DoIPDhcpOptionVinUse is set to FALSE the DoIP module shall call the SoAd_WriteDhcpHostNameOption with a pointer to the string "DoIP-" in order to set the hostname.

requirement SWS_DoIP_00156 [SWS_DoIP_00156] 📄 PDF

If the ASCII buffer returned in [SWS_DoIP_00154] does not start with "DoIP-" and the configuration parameter DoIPDhcpOptionVinUse is set to TRUE the DoIP module shall call the SoAd_WriteDhcpHostNameOption with a pointer to to the ASCII buffer "DoIP-VIN<vinnumberinascii>" with <vinnumberinascii> representing the ASCII representation of the VIN that is retrieved via Dcm_GetVin. If no valid VIN could be retrieved the DoIP shall use the configured DoIPVinInvalidityPattern in ASCII representation.

requirement SWS_DoIP_00159 [SWS_DoIP_00159] 📄 PDF

If a Routing Activation request was received on a new opened socket before the inactivity timer elapsed (i.e. the configured DoIPInitialInactivityTime did not pass) the DoIP module shall reset the inactivity timer to 0.

requirement SWS_DoIP_00160 [SWS_DoIP_00160] 📄 PDF

If the "Activation type" bytes do not fulfill the [SWS_DoIP_00108] requirement, the DoIP module shall send a routing activation response message with the activation response code set to 0x06. In this case the socket connection shall be closed as defined in [SWS_DoIP_00058].

requirement SWS_DoIP_00161 [SWS_DoIP_00161] 📄 PDF

If the DoIPRoutingActivationAuthenticationCallback returns with E_OK the routing activation authentication shall be considered as successful. If the Do IPRoutingActivationAuthenticationResLength is not set to 0 the first DoIPRoutingAc- tivationAuthenticationResLength byte shall be attached in routing activation response message in the field "OEM specific" as described in [SWS_DoIP_00120].

requirement SWS_DoIP_00162 [SWS_DoIP_00162] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00163 [SWS_DoIP_00163] 📄 PDF

If development error detection is enabled: The function shall check if the TxPduId matches a configured DoIPPduRTxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

requirement SWS_DoIP_00164 [SWS_DoIP_00164] 📄 PDF

If development error detection is enabled: The function shall check if the PduInfoPtr is not a NULL_PTR. If the check fails the function shall raise the development error DOIP_E_PARAM_POINTER.

requirement SWS_DoIP_00166 [SWS_DoIP_00166] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00167 [SWS_DoIP_00167] 📄 PDF

If development error detection is enabled: The function shall check if the TxPduId matches a configured DoIPPduRTxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

requirement SWS_DoIP_00169 [SWS_DoIP_00169] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00170 [SWS_DoIP_00170] 📄 PDF

If development error detection is enabled: The function shall check if the RxPduId matches a configured DoIPPduRRxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

requirement SWS_DoIP_00172 [SWS_DoIP_00172] 📄 PDF

If development error detection is enabled: The function shall check if the versioninfo is not a NULL_PTR. If the check fails the function shall raise the development error DOIP_E_PARAM_POINTER.

requirement SWS_DoIP_00173 [SWS_DoIP_00173] 📄 PDF

The field "User data" of the [SWS_DoIP_00131] message con- tains the actual diagnostic payload data which shall not be modified by DoIP.

requirement SWS_DoIP_00174 [SWS_DoIP_00174] 📄 PDF

If the PduR is not accepting the data totally (for details refer to chapter 7.5.1), the DoIP module shall send a diagnostic message negative acknowl- edge message with the diagnostic message negative acknowledge code set to 0x08 as described in chapter 7.3.2.6.3. Additionally the message shall be discarded.

requirement SWS_DoIP_00175 [SWS_DoIP_00175] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00176 [SWS_DoIP_00176] 📄 PDF

If development error detection is enabled: The function shall check if the id matches a configured DoIPSoAdTcpTxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

requirement SWS_DoIP_00177 [SWS_DoIP_00177] 📄 PDF

If development error detection is enabled: The function shall check that neither the info nor the availableDataPtr are a NULL_PTR. If the check fails the function shall raise the development error DOIP_E_PARAM_POINTER.

requirement SWS_DoIP_00178 [SWS_DoIP_00178] 📄 PDF

If development error detection is enabled: The function shall check if the retry is a NULL_PTR. If the check fails the function shall raise the develop- ment error DOIP_E_INVALID_PARAMETER.

requirement SWS_DoIP_00180 [SWS_DoIP_00180] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00181 [SWS_DoIP_00181] 📄 PDF

If development error detection is enabled: The function shall check if the id matches a configured DoIPSoAdTcpTxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

requirement SWS_DoIP_00182 [SWS_DoIP_00182] 📄 PDF

If development error detection is enabled: The function shall check if the result is valid. If the check fails the function shall raise the development error DOIP_E_INVALID_PARAMETER.

requirement SWS_DoIP_00183 [SWS_DoIP_00183] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00184 [SWS_DoIP_00184] 📄 PDF

If development error detection is enabled: The function shall check that neither the info nor the bufferSizePtr are a NULL_PTR. If the check fails, the function shall raise the development error DOIP_E_PARAM_POINTER.

requirement SWS_DoIP_00186 [SWS_DoIP_00186] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00187 [SWS_DoIP_00187] 📄 PDF

If development error detection is enabled: The function shall check if the id matches a configured DoIPSoAdTcpRxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

requirement SWS_DoIP_00188 [SWS_DoIP_00188] 📄 PDF

If development error detection is enabled: The function shall check if the bufferSizePtr is not a NULL_PTR. If the check fails the function shall raise the development error DOIP_E_PARAM_POINTER.

requirement SWS_DoIP_00189 [SWS_DoIP_00189] 📄 PDF

If development error detection is enabled: The function shall check if the TpSduLength is not 0. If TpSduLength is not 0 the function shall raise the development error DOIP_E_INVALID_PARAMETER.

requirement SWS_DoIP_00190 [SWS_DoIP_00190] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00191 [SWS_DoIP_00191] 📄 PDF

If development error detection is enabled: The function shall check if the id matches a configured DoIPSoAdTcpRxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

requirement SWS_DoIP_00192 [SWS_DoIP_00192] 📄 PDF

If development error detection is enabled: The function shall check if the result is valid. If the check fails the function shall raise the development error DOIP_E_INVALID_PARAMETER.

requirement SWS_DoIP_00193 [SWS_DoIP_00193] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00194 [SWS_DoIP_00194] 📄 PDF

If development error detection is enabled: The function shall check if the SoConId and Mode are valid. If the check fails the function shall raise the development error DOIP_E_INVALID_PARAMETER.

requirement SWS_DoIP_00195 [SWS_DoIP_00195] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00196 [SWS_DoIP_00196] 📄 PDF

If development error detection is enabled: The function shall check if the SoConId and State are valid. If the check fails the function shall raise the development error DOIP_E_INVALID_PARAMETER.

requirement SWS_DoIP_00197 [SWS_DoIP_00197] 📄 PDF

If the SoAd calls the DoIP module via the Interface DoIP_SoAdIf RxIndication, the DoIP module shall copy the message into the internal UDP buffer for further processing.

requirement SWS_DoIP_00198 [SWS_DoIP_00198] 📄 PDF

If the DoIP module shall send a DoIP message via UDP it shall call the SoAd_IfTransmit with the TxPduId set to the SoAd internal TxPduId that is retrieved via the according configured DoIPSoAdUdpTxPduRef, the PduInfoPtr shall contain the length of the message and the pointer to the to be transmitted message buffer and additionally the buffer shall be locked.

requirement SWS_DoIP_00199 [SWS_DoIP_00199] 📄 PDF

If the SoAd calls the DoIP module via the Interface DoIP_So AdIfTxConfirmation, the DoIP module shall release the buffer which is related to the received TxPduId.

requirement SWS_DoIP_00200 [SWS_DoIP_00200] 📄 PDF

If the function DoIP_SoAdTpRxIndication is called the DoIp mod- ule shall release all data connected to the reception and forward the result to PduR_ DoIPTpRxIndication if a reception for diagnostic message is currently ongoing.

requirement SWS_DoIP_00201 [SWS_DoIP_00201] 📄 PDF

The DoIP module shall determine the DoIP Activation Line status by the calls to DoIP_ActivationLineSwitch (uint8 InterfaceId, boolean *Active) based on the value of the boolean parameter Active per DoIPInterface with a given InterfaceId. The Activation Line status is considered "active", if the boolean value in the call is set to TRUE. The Activation Line status is considered "inactive", if the boolean value in the call is set to FALSE.

requirement SWS_DoIP_00202 [SWS_DoIP_00202] 📄 PDF

If data is received from SoAd or PduR (i.e. communication re- lated interfaces are called) via PduIds related to a certain DoIPInterface configured with DoIPInterfaceActLineCtrl = TRUE, where the status of the Activation Line of this DoIPInterface is currently inactive, the DoIP module shall ignore all these requests and return a negative return value as return value.

requirement SWS_DoIP_00204 [SWS_DoIP_00204] 📄 PDF

For activation line controlled DoIP Interfaces with DoIPInterface ActLineCtrl = TRUE, DoIP shall establish the corresponding connections for these interfaces according to [SWS_DoIP_00306] if corresponding Activation Line Status switches to "active". (SRS_Eth_00081, SRS_Eth_00028, SRS_Eth_00026).

requirement SWS_DoIP_00205 [SWS_DoIP_00205] 📄 PDF

If the function DoIP_SoConModeChg is called with Mode set to SOAD_SOCON_ONLINE for a UDP vehicle announcement connection, the DoIP module shall send the vehicle announcement message via the corresponding Tx PDU configured in the DoIPUdpVehicleAnnouncementConnection and belonging to the re- ported socket connection.

requirement SWS_DoIP_00207 [SWS_DoIP_00207] 📄 PDF

If the function DoIP_SoAdTpStartOfReception is called with Tp SduLength set to 0, the DoIP module shall fill in the bufferSizePtr the available buffer size in the DoIP for the reception of the TCP message, lock the according buffer for other TCP connections and return BUFREQ_OK.

requirement SWS_DoIP_00208 [SWS_DoIP_00208] 📄 PDF

If the function DoIP_SoAdTpCopyRxData is called at the start of a new DoIP message (e.g. directly after DoIPSoAdTpStartOfReception succeeded or previous DoIP message processed completely) with info.SduLength set to 0 the DoIP module shall return in the parameter bufferSizePtr the length to the maximum necessary bytes to evaluate the DoIP relevant data for routing of diagnostic data.

requirement SWS_DoIP_00209 [SWS_DoIP_00209] 📄 PDF

If the function DoIP_SoAdTpCopyRxData is called at the start of a new DoIP message (e.g. directly after DoIPSoAdTpStartOfReception succeeded or previous DoIP message processed completely) with info.SduLength is not set to 0 and the DoIP TCP buffer is big enough to copy all the data, the DoIP module shall copy the received data to the internal TCP buffer, return the parameter bufferSizePtr set to the available buffer after copying and return BUFREQ_OK.

requirement SWS_DoIP_00210 [SWS_DoIP_00210] 📄 PDF

If the function DoIP_SoAdTpCopyRxData is called at the start of a new DoIP message (e.g. directly after DoIPSoAdTpStartOfReception succeeded or previous DoIP message processed completely) with info.SduLength is not set to 0 and the DoIP TCP buffer is not big enough to copy all the data, the DoIP module shall return BUFREQ_E_NOT_OK.

requirement SWS_DoIP_00212 [SWS_DoIP_00212] 📄 PDF

If the DoIP module has received sufficient data to evaluate the DoIP header, the payload type is diagnostic message and the Routing was already activated for the SourceAddress/TargetAddress combination on this DoIPInterface, the DoIP module shall call the PduR_DoIPTpStartOfReception with the according id set to the DoIPPduRRxPduId matching the SourceAddress/TargetAddress combination of the diagnostic message on this DoIPInterface, set the info.SduLength to the already received diagnostic data, set the info->SduDataPtr to the buffer containing the received diagnostic data and set the TpSduLength to the total size of the diagnostic message extracted from DoIP Header.

requirement SWS_DoIP_00214 [SWS_DoIP_00214] 📄 PDF

If the DoIP module has received sufficient data to evaluate the DoIP header and the payload type is not diagnostic message the DoIP shall copy all data of this DoIP message to the internal DoIP TCP buffer, lock the according buffer for other TCP connections and process the DoIP message as described in [SWS_DoIP_00219].

requirement SWS_DoIP_00216 [SWS_DoIP_00216] 📄 PDF

If PduR_DoIPTpStartOfReception returns BUFREQ_E_NOT_ OK, the DoIP module shall send a diagnostic negative acknowledge message with the diagnostic message negative acknowledge code set to 0x08 and discard all the TCP data until the next DoIP message.

requirement SWS_DoIP_00217 [SWS_DoIP_00217] 📄 PDF

If PduR_DoIPTpCopyRxData returns BUFREQ_E_NOT_OK, the DoIP module shall discard all the TCP data until the next DoIP message and call the PduR_DoIPTpRxIndication with the according PduId and the result set to E_NOT_ OK.

requirement SWS_DoIP_00218 [SWS_DoIP_00218] 📄 PDF

If PduR_DoIPTpStartOfReception returns BUFREQ_OK the re- ception was accepted and the DoIP shall forward all subsequent calls to DoIP_So AdTpCopyRxData directly to PduR_DoIPTpCopyRxData until all diagnostic data was handed to the PduR.

requirement SWS_DoIP_00219 [SWS_DoIP_00219] 📄 PDF

If the DoIP module has received with the DoIP_SoAdTpCopy RxData operations enough data to evaluate the DoIP header and the payload type is not diagnostic message (see [SWS_DoIP_00214]), the DoIP module shall receive via subsequent calls to DoIP_SoAdTpCopyRxData all data for the DoIP message and process it.

requirement SWS_DoIP_00220 [SWS_DoIP_00220] 📄 PDF

If the DoIP module needs to send a DoIP message that is not a diagnostic message on the TCP connection, the DoIP shall call the SoAd_TpTransmit with the TxPduId containing the Id of the according socket, the PduInfoPtr.SduLength set to the size of the data to be transmitted and lock the buffer to send.

requirement SWS_DoIP_00221 [SWS_DoIP_00221] 📄 PDF

If all diagnostic data was successfully forwarded to the PduR (see [SWS_DoIP_00216]) the DoIP module shall call the PduR_DoIPTpRxIndication with the according PduId and the result set to E_OK.

requirement SWS_DoIP_00223 [SWS_DoIP_00223] 📄 PDF

If the call to SoAd_TpTransmit returns E_NOT_OK the DoIP module shall discard the DoIP message.

requirement SWS_DoIP_00224 [SWS_DoIP_00224] 📄 PDF

If the function DoIP_SoAdCopyTxData is called after a sucess- full call to SoAd_TpTransmit, with a valid id and the info.SduLength is set to 0 the DoIP shall return BUFREQ_OK and set the parameter availableDataPtr to the total available data size of the current DoIP message to be transmitted.

requirement SWS_DoIP_00225 [SWS_DoIP_00225] 📄 PDF

If the function DoIP_SoAdCopyTxData is called after a sucess- full call to SoAd_TpTransmit, with a valid id and the info.SduLength is not set to 0, the DoIP module shall copy the bytes specified in the info.SduLength to the info->SduData Ptr, return BUFREQ_OK and set the parameter availableDataPtr to the total available data size of the current DoIP message after the copy process.

requirement SWS_DoIP_00226 [SWS_DoIP_00226] 📄 PDF

If the function DoIP_TpTransmit or DoIP_IfTransmit is called and the data package is not allowed according to the current DoIP protocol related infor- mation, the DoIP module shall return E_NOT_OK.

requirement SWS_DoIP_00228 [SWS_DoIP_00228] 📄 PDF

If the call to SoAd_TpTransmit returns for the use case "diag- nostic message" E_NOT_OK the DoIP module shall discard the DoIP message and, in case the DoIPPduType of the corresponding DoIPPduRTxPdu is DOIP_TPPDU, call the PduR_DoIPTpTxConfirmation with result set to E_NOT_OK.

requirement SWS_DoIP_00229 [SWS_DoIP_00229] 📄 PDF

If the function DoIP_SoAdTpTxConfirmation is called the DoIP module shall release the buffer related to the id.

requirement SWS_DoIP_00230 [SWS_DoIP_00230] 📄 PDF

If the function DoIP_TpTransmit or DoIP_IfTransmit is called and the data package is allowed to be sent according to the current DoIP protocol related information, the DoIP module shall return E_OK. 1.) If the connection to the SoAd is idle, the DoIP shall call the SoAd_TpTransmit function according to [SWS_DoIP_00284]. 2.) If the connection to the SoAd is not idle, the DoIP shall store the transmission request and call SoAd_TpTransmit according to [SWS_DoIP_00284] as soon as the connection is idle again.

requirement SWS_DoIP_00231 [SWS_DoIP_00231] 📄 PDF

If the function DoIP_SoAdCopyTxData is called after a sucess- full call to SoAd_TpTransmit for the use case "diagnostic message", with a valid id and the info.SduLength is set to 0 the DoIP shall return BUFREQ_OK and set the pa- rameter availableDataPtr to the total available data size of the current buffered DoIP message to be transmitted.

requirement SWS_DoIP_00232 [SWS_DoIP_00232] 📄 PDF

If the function DoIP_SoAdCopyTxData is called after a sucess- full call to SoAd_TpTransmit for the use case "diagnostic message" with a valid id and the info.SduLength is not set to 0, the DoIP module shall copy the bytes specified in the info.SduLength to the info->SduDataPtr. If the requested bytes are more than in the Do IP internal buffer, the DoIP shall call the PduR_DoIPTpCopyTxData with the info.Sdu Length set to the remaining requested data bytes and the info-> SduDataPtr set to the position where the PduR shall continue to copy the data.

requirement SWS_DoIP_00233 [SWS_DoIP_00233] 📄 PDF

If the DoIP module has copied via subsequent calls to DoIP_So AdTpCopyTxData for the use case "diagnostic message" all information stored in the DoIP internal buffer, the DoIP module shall forward all subsequent calls to DoIP_SoAd TpCopyTxData/DoIP_SoAdTpTxConfirmation for this transmission directly to the PduR using PduR_DoIPTpCopyTxData/PduR_DoIPTpTxConfirmation in case the DoIPPdu RTxPdu is DOIP_TPPDU and PduR_DoIPIfTxConfirmation otherwise, and release the internal buffer for this transmission.

requirement SWS_DoIP_00234 [SWS_DoIP_00234] 📄 PDF

If the Activation Line status of a DoIPInterface switches to "inac- tive", the DoIP module shall shall loop over all DoIPTcpConnection, DoIPUdpConnec- tion, and DoIPUdpVehicleAnnouncementConnections. For each of these DoIPCon- nections the DoIP module shall retrieve the corresponding SoConId via call to the So Ad_GetSoConId and close all the connection by a call to SoAd_CloseSoCon with the retrieved SoConId.

requirement SWS_DoIP_00235 [SWS_DoIP_00235] 📄 PDF

In addition to [SWS_DoIP_00234], the DoIP module shall re- lease the corresponding IP Address assignment via the call to SoAd_ReleaseIpAddr Assignment for those connections, which belong to the DoIPInterface for which the Ac- tivation Line status switched to "inactive", that have DoIPRequestAddressAssignment set to true.

requirement SWS_DoIP_00241 [SWS_DoIP_00241] 📄 PDF

If the DoIP module is called with DoIP_SoConModeChg and the Mode set to SOAD_SOCON_ONLINE the state of the socket connection shall be considered as online and the DoIP module shall behave as described in [SWS_DoIP_00143].

requirement SWS_DoIP_00242 [SWS_DoIP_00242] 📄 PDF

⌊ OBSOLETE g Name DoIPActivationLineStatus (obsolete) Comment – Tags: atp.Status=obsolete IsService true Variation – ModeGroup currentDoIPActivationLineStatus DoIP_ActivationLineType

requirement SWS_DoIP_00243 [SWS_DoIP_00243] 📄 PDF

If the DoIP module is called with DoIP_SoConModeChg and the Mode set to something else than SOAD_SOCON_ONLINE the state of the socket con- nection shall be considered as offline and the DoIP module shall behave as described in [SWS_DoIP_00115].

requirement SWS_DoIP_00246 [SWS_DoIP_00246] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00247 [SWS_DoIP_00247] 📄 PDF

If development error detection is enabled: The function shall check if the RxPduId matches a configured DoIPSoAdUdpRxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

requirement SWS_DoIP_00248 [SWS_DoIP_00248] 📄 PDF

If development error detection is enabled: The function shall check the validity of the PduInfoPtr and call the DET with DOIP_E_PARAM_POINTER error id if it is a NULL_PTR.

requirement SWS_DoIP_00249 [SWS_DoIP_00249] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00250 [SWS_DoIP_00250] 📄 PDF

If development error detection is enabled: The function shall check if the TxPduId matches a configured DoIPSoAdUdpTxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

requirement SWS_DoIP_00253 [SWS_DoIP_00253] 📄 PDF

If the buffer size reported by PduR_DoIPTpStartOfReception does not suffice for already received data, DoIP shall abort the reception and call Pdu R_DoIPTpRxIndication with E_NOT_OK.

requirement SWS_DoIP_00254 [SWS_DoIP_00254] 📄 PDF

If the call to PduR_DoIPTpCopyTxData returns BUFREQ_OK or all the requested data was part of the DoIP internal buffer, the DoIP module shall return BUFREQ_OK and set the parameter availableDataPtr to the remaining data size of the DoIP header and diagnostic SourceAddress/TargetAddress if they have not been copied completely or to the remaining data size returned from PduR_DoIPTpCopyTx Data.

requirement SWS_DoIP_00257 [SWS_DoIP_00257] 📄 PDF

If the DoIP module is called with DoIP_TpCancelTransmit or Do IP_IfCancelTransmit, the DoIP module shall call the SoAd_TpCancelTransmit function of the according SoAdTxPduId.

requirement SWS_DoIP_00258 [SWS_DoIP_00258] 📄 PDF

If the DoIP module is called with DoIP_TpCancelReceive, the DoIP module shall call the SoAd_TpCancelReceive function with the RxPduId that is retrieved via the according configured DoIPSoAdTcpRxPduRef.

requirement SWS_DoIP_00259 [SWS_DoIP_00259] 📄 PDF

At the end of the copy procedure via PduR_DoIPTpCopyRxData to PduR, the DoIP module has to modify the available buffer size pointer returned to SoAd in order to stop before the next DoIP header.

requirement SWS_DoIP_00260 [SWS_DoIP_00260] 📄 PDF

If PduR_DoIPTpStartOfReception returns BUFREQ_OK the re- ception was accepted and the DoIP module shall forward already received data of the diagnostic message to the upper layer by subsequent calls to PduR_DoIPTpCopyRx Data.

requirement SWS_DoIP_00261 [SWS_DoIP_00261] 📄 PDF

Variation {ecuc(DoIP/DoIPGeneral/DoIPPowerModeCallback/DoIPPowerModeDirect)} == NULL

requirement SWS_DoIP_00262 [SWS_DoIP_00262] 📄 PDF

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

requirement SWS_DoIP_00263 [SWS_DoIP_00263] 📄 PDF

Variation ({ecuc(DoIP/DoIPGeneral/DoIPTriggerGidSyncCallback)} != NULL) && ({ecuc(DoIP/DoIPGeneral/ DoIPTriggerGidSyncCallback/DoIPTriggerGidSyncDirect)} == NULL) && ({ecuc(DoIP/Do IPGeneral/DoIPVinGidMaster)} == TRUE)

requirement SWS_DoIP_00264 [SWS_DoIP_00264] 📄 PDF

Variation ({ecuc(DoIP/DoIPGeneral/DoIPGetGidCallback)} != NULL) && ({ecuc(DoIP/DoIPGeneral/DoIPGet GidCallback/DoIPGetGidDirect)} == NULL)

requirement SWS_DoIP_00274 [SWS_DoIP_00274] 📄 PDF

If the DoIPRoutingActivationConfirmationCallback returns E_ NOT_OK, the DoIP module shall send a routing activation response message with the activation response code set to 0x05 and the socket connection shall be closed as defined in [SWS_DoIP_00058].

requirement SWS_DoIP_00276 [SWS_DoIP_00276] 📄 PDF

If DoIP receives more UDP requests on a connection than the configured amount of DoIPMaxUDPRequestPerConnection, only DoIPMaxUDPRe- questPerConnection requests (including the request that has just been accepted) shall be processed and responded. DoIP shall silently discard the request messages that cannot be processed.

requirement SWS_DoIP_00279 [SWS_DoIP_00279] 📄 PDF

If the DoIPPduType of a DoIPPduRTxPdu is DOIP_IFPDU, the content of the PDU provided by DoIP_IfTransmit shall be stored completely in the Do IP internal buffer. If the buffer is too small, E_NOT_OK shall be returned immediately.

requirement SWS_DoIP_00282 [SWS_DoIP_00282] 📄 PDF

Runtime Error Types Type of Error Relevance Related Error Code Value [hex] Runtime Runtime Runtime Runtime Runtime

requirement SWS_DoIP_00283 [SWS_DoIP_00283] 📄 PDF

Transient Fault Types Type of Error Releva nce Related Error Code Value [hex] Transient Transient Transient Transient Transient

requirement SWS_DoIP_00284 [SWS_DoIP_00284] 📄 PDF

To transmit a DoIP diagnostic message the DoIP shall assemble the DoIP header considering the information of the handed PduInfoPtr.SduLength and call SoAd_TpTransmit with the TxPduId set to the according PduId of the socket con- nection and the PduInfoPtr.SduLength set to the sum of the following lengths: DoIP header (8 Byte), the DoIP diagnostic message specific data (4 Byte) and received length of the call to DoIP_TpTransmit or DoIP_IfTransmit (PduInfoPtr.SduLength).

requirement SWS_DoIP_00285 [SWS_DoIP_00285] 📄 PDF

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

requirement SWS_DoIP_00286 [SWS_DoIP_00286] 📄 PDF

DoIP module shall consider the announcement successful and process DoIPVehicleAnnouncementCount if the SoAd calls the DoIP module via the interface DoIP_SoAdIfTxConfirmation with Result set to E_OK for the announcement related SoAd_IfTransmit() call i.e. if E_NOT_OK is returned for the last announcement message, it will not be considered an announcement.

requirement SWS_DoIP_00289 [SWS_DoIP_00289] 📄 PDF

Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPFurtherActionByteCallback/DoIPFurtherActionByte Direct)} == NULL

requirement SWS_DoIP_00290 [SWS_DoIP_00290] 📄 PDF

Name CallbackGetFurtherActionByte Comment – IsService true Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPFurtherActionByteCallback/DoIPFurtherAction ByteDirect)} == NULL 0 E_OK Operation successful Possible Errors 1 E_NOT_OK Operation failed Operation GetFurtherActionByte Comment – Mapped to API <User>_DoIPGetFurtherActionByteCallback Variation – FurtherActionByte Type DoIP_FurtherActionByteType Direction OUT Comment – Parameters Variation – Possible Errors E_OK E_NOT_OK

requirement SWS_DoIP_00291 [SWS_DoIP_00291] 📄 PDF

The "Further action" byte of a vehicle identification response/ vehicle announcement message shall contain the 1 Byte value retrieved by a call to the configured DoIPFurtherActionByteCallback (if configured, for the signature see <User>_DoIPGetFurtherActionByteCallback, [SWS_DoIP_00288]). If the function re- turns E_OK, the "Further action" byte shall be set to the retrieved value of FurtherAction Byte. If the function returns E_NOT_OK, the "Further action" byte shall be set accord- ing to [SWS_DoIP_00082], [SWS_DoIP_00083] or [SWS_DoIP_00084].

requirement SWS_DoIP_00292 [SWS_DoIP_00292] 📄 PDF

If a DoIP message with payload Type 0x0000 is received on a configured DoIPUdpConnection or DoIPTcpConnection, the message shall be dis- carded.

requirement SWS_DoIP_00293 [SWS_DoIP_00293] 📄 PDF

If a DoIP message with payload Type 0x0004 is received on a configured DoIPUdpConnection, the message shall be discarded.

requirement SWS_DoIP_00294 [SWS_DoIP_00294] 📄 PDF

When receiving a routing activation request on a TCP connec- tion where DoIPTcpConnection/DoIPTcpConnectionSecurityRequired is not set or set to FALSE, the DoIP module shall search for a DoIPTester with an assigned container that matches DoIPTesterSA. If such a DoIPTester container was found and the match- ing DoIPRoutingActivation container (refer to [SWS_DoIP_00108]) has the attribute DoIPRoutingActivationSecurityRequired not set or set to FALSE, the connection will be established. If such a DoIPTester container was found and the matching DoIPRoutingActivation container (refer to [SWS_DoIP_00108]) has the attribute DoIPRoutingActivationSecu- rityRequired is set to TRUE, the connection shall be rejected with the response code "0x07".

requirement SWS_DoIP_00295 [SWS_DoIP_00295] 📄 PDF

When receiving a routing activation request on a TCP connec- tion where DoIPTcpConnection/DoIPTcpConnectionSecurityRequired set to TRUE, the DoIP module shall search for a DoIPTester with an assigned container that matches DoIPTesterSA. If such a DoIPTester container was found, the connection will be established.

requirement SWS_DoIP_00296 [SWS_DoIP_00296] 📄 PDF

For non activation line controlled DoIP Interfaces with DoIPIn- terfaceActLineCtrl = FALSE, DoIP shall establish the corresponding connections for these interfaces according to [SWS_DoIP_00306] in context of first call to DoIP_Main Function(). (SRS_Eth_00081, SRS_Eth_00028, SRS_Eth_00026).

requirement SWS_DoIP_00297 [SWS_DoIP_00297] 📄 PDF

For a DoIP Interface with DoIPInterfaceAnnouncementStart = DOIP_AUTOMATIC_ANNOUNCE, the DoIP module shall start Vehicle announcement according to [SWS_DoIP_00205].

requirement SWS_DoIP_00298 [SWS_DoIP_00298] 📄 PDF

For a DoIP Interface with DoIPInterfaceAnnouncementStart = DOIP_ONTRIGGER_ANNOUNCE, the sending of vehicle announcement only starts if DoIP_TriggerVehicleAnnouncement () has been called for that Interface.

requirement SWS_DoIP_00299 [SWS_DoIP_00299] 📄 PDF

If DoIP_TriggerVehicleAnnouncement() is called, but the corre- sponding socket is not yet ONLINE then the request shall be remembered and vehicle announcement shall be sent as soon as the socket goes ONLINE.

requirement SWS_DoIP_00302 [SWS_DoIP_00302] 📄 PDF

If development error detection is enabled DoIP_ ActivationLine Switch (InterfaceId,*Active) shall check if interface identified by InterfaceId actually ex- ists and DoIPInterfaceActLineCtrl is set to TRUE. If the check fails, the function shall raise the development error DOIP_E_INVALID_PARAMETER.

requirement SWS_DoIP_00303 [SWS_DoIP_00303] 📄 PDF

If development error detection is enabled call to DoIP_ Activa- tionLineSwitch shall check if the interface identified by InterfaceId actually exists. If the check fails, the function shall raise the development error DOIP_E_INVALID_PARAM- ETER.

requirement SWS_DoIP_00304 [SWS_DoIP_00304] 📄 PDF

If development error detection is enabled DoIP_ TriggerVehicle Announcement shall check if the interface identified by InterfaceId is configured with DoIPInterfaceActLineCtrl set to FALSE. If the check fails the function shall raise the development error DOIP_E_INVALID_PARAMETER.

requirement SWS_DoIP_00305 [SWS_DoIP_00305] 📄 PDF

If development error detection is enabled call to DoIP_ Trigger VehicleAnnouncement shall check if the interface identified by InterfaceId actually ex- ists. If the check fails, the function shall raise the development error DOIP_E_INVALID_ PARAMETER.

requirement SWS_DoIP_00306 [SWS_DoIP_00306] 📄 PDF

To open the socket connections (triggered by SWS_DoIP_00204 or SWS_DoIP_00296) of an DoIP interface the DoIP module shall loop over all its associated DoIPTcpConnection, DoIPUdpConnection and DoIPUdpVehicleAnnounce- mentConnections. For each DoIP connections belonging to respective DoIP Interfaces which has a DoIPRequestAddressAssignment set to true the DoIP module shall re- trieve the corresponding SoConId via call to the SoAd_GetSoConId() and trigger the IP Address assignment via subsequent calls to SoAd_RequestIpAddrAssignment() with the retrieved SoConId, LocalIpAddrPtr and DefaultRouterPtr set to NULL_PTR, Net- mask set to 0, and Type set to TCPIP_IPADDR_ASSIGNMENT_ALL. For each of these DoIP connections (irrespective of the value of DoIPRequestAddressAssignment) the DoIP module shall open the respective connection by an according call to SoAd_Open SoCon(). (SRS_Eth_00081, SRS_Eth_00028, SRS_Eth_00026).

requirement SWS_DoIP_00310 [SWS_DoIP_00310] 📄 PDF

If a UDP message contains more than one DoIP requests, Do IP shall process and respond to the first DoIP request and discard the remaining re- quests.

requirement SWS_DoIP_00311 [SWS_DoIP_00311] 📄 PDF

If PduR_DoIPTpStartOfReception returns BUFREQ_E_OVFL, the DoIP module shall send a diagnostic negative acknowledge message with the di- agnostic message negative acknowledge code set to 0x05 and discard all the TCP data until the next DoIP message.

requirement SWS_DoIP_00358 [SWS_DoIP_00358] 📄 PDF

If a connection needs to be reset based on DoIP specific be- havior, the DoIP module shall call the function SoAd_CloseSoCon with the parameter abort set to TRUE and the SoConId determined by a call to the function SoAd_Get SoConId for the corresponding DoIPSoAdTcpTxPdu. Additionally, the inactivity timer shall be stopped.

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

Record
AUTOSAR/AP/record/CP_MOD_DoIP
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_DoIP@rel:R20-11#02d443bd
Content hash
02d443bd
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_DiagnosticOverIP.pdf#nameddest=SWS_DoIP_00022

विषय मानचित्र

आरंभीकरण और स्थिति

2

चक्रीय

1

आवश्यकताएँ

235
SWS_DoIP_00001SWS_DoIP_00002SWS_DoIP_00004SWS_DoIP_00005SWS_DoIP_00006SWS_DoIP_00007SWS_DoIP_00008SWS_DoIP_00009SWS_DoIP_00010SWS_DoIP_00012SWS_DoIP_00013SWS_DoIP_00014SWS_DoIP_00015SWS_DoIP_00016SWS_DoIP_00017SWS_DoIP_00018SWS_DoIP_00019SWS_DoIP_00020SWS_DoIP_00030SWS_DoIP_00036SWS_DoIP_00042SWS_DoIP_00043SWS_DoIP_00044SWS_DoIP_00045SWS_DoIP_00052SWS_DoIP_00054SWS_DoIP_00055SWS_DoIP_00056SWS_DoIP_00057SWS_DoIP_00058SWS_DoIP_00059SWS_DoIP_00060SWS_DoIP_00061SWS_DoIP_00062SWS_DoIP_00063SWS_DoIP_00064SWS_DoIP_00065SWS_DoIP_00066SWS_DoIP_00067SWS_DoIP_00068SWS_DoIP_00069SWS_DoIP_00070SWS_DoIP_00071SWS_DoIP_00072SWS_DoIP_00073SWS_DoIP_00074SWS_DoIP_00075SWS_DoIP_00076SWS_DoIP_00077SWS_DoIP_00078SWS_DoIP_00079SWS_DoIP_00080SWS_DoIP_00081SWS_DoIP_00082SWS_DoIP_00083SWS_DoIP_00084SWS_DoIP_00085SWS_DoIP_00086SWS_DoIP_00087SWS_DoIP_00088SWS_DoIP_00089SWS_DoIP_00090SWS_DoIP_00091SWS_DoIP_00092SWS_DoIP_00093SWS_DoIP_00094SWS_DoIP_00095SWS_DoIP_00096SWS_DoIP_00097SWS_DoIP_00098SWS_DoIP_00099SWS_DoIP_00100SWS_DoIP_00101SWS_DoIP_00102SWS_DoIP_00103SWS_DoIP_00104SWS_DoIP_00105SWS_DoIP_00106SWS_DoIP_00107SWS_DoIP_00108SWS_DoIP_00109SWS_DoIP_00110SWS_DoIP_00111SWS_DoIP_00112SWS_DoIP_00113SWS_DoIP_00114SWS_DoIP_00115SWS_DoIP_00116SWS_DoIP_00117SWS_DoIP_00118SWS_DoIP_00119SWS_DoIP_00120SWS_DoIP_00121SWS_DoIP_00122SWS_DoIP_00123SWS_DoIP_00124SWS_DoIP_00125SWS_DoIP_00126SWS_DoIP_00127SWS_DoIP_00128SWS_DoIP_00129SWS_DoIP_00130SWS_DoIP_00131SWS_DoIP_00132SWS_DoIP_00133SWS_DoIP_00134SWS_DoIP_00135SWS_DoIP_00136SWS_DoIP_00137SWS_DoIP_00138SWS_DoIP_00139SWS_DoIP_00140SWS_DoIP_00141SWS_DoIP_00142SWS_DoIP_00143SWS_DoIP_00144SWS_DoIP_00145SWS_DoIP_00146SWS_DoIP_00148SWS_DoIP_00154SWS_DoIP_00155SWS_DoIP_00156SWS_DoIP_00159SWS_DoIP_00160SWS_DoIP_00161SWS_DoIP_00162SWS_DoIP_00163SWS_DoIP_00164SWS_DoIP_00166SWS_DoIP_00167SWS_DoIP_00169SWS_DoIP_00170SWS_DoIP_00172SWS_DoIP_00173SWS_DoIP_00174SWS_DoIP_00175SWS_DoIP_00176SWS_DoIP_00177SWS_DoIP_00178SWS_DoIP_00180SWS_DoIP_00181SWS_DoIP_00182SWS_DoIP_00183SWS_DoIP_00184SWS_DoIP_00186SWS_DoIP_00187SWS_DoIP_00188SWS_DoIP_00189SWS_DoIP_00190SWS_DoIP_00191SWS_DoIP_00192SWS_DoIP_00193SWS_DoIP_00194SWS_DoIP_00195SWS_DoIP_00196SWS_DoIP_00197SWS_DoIP_00198SWS_DoIP_00199SWS_DoIP_00200SWS_DoIP_00201SWS_DoIP_00202SWS_DoIP_00204SWS_DoIP_00205SWS_DoIP_00207SWS_DoIP_00208SWS_DoIP_00209SWS_DoIP_00210SWS_DoIP_00212SWS_DoIP_00214SWS_DoIP_00216SWS_DoIP_00217SWS_DoIP_00218SWS_DoIP_00219SWS_DoIP_00220SWS_DoIP_00221SWS_DoIP_00223SWS_DoIP_00224SWS_DoIP_00225SWS_DoIP_00226SWS_DoIP_00228SWS_DoIP_00229SWS_DoIP_00230SWS_DoIP_00231SWS_DoIP_00232SWS_DoIP_00233SWS_DoIP_00234SWS_DoIP_00235SWS_DoIP_00241SWS_DoIP_00242SWS_DoIP_00243SWS_DoIP_00246SWS_DoIP_00247SWS_DoIP_00248SWS_DoIP_00249SWS_DoIP_00250SWS_DoIP_00253SWS_DoIP_00254SWS_DoIP_00257SWS_DoIP_00258SWS_DoIP_00259SWS_DoIP_00260SWS_DoIP_00261SWS_DoIP_00262SWS_DoIP_00263SWS_DoIP_00264SWS_DoIP_00265SWS_DoIP_00271SWS_DoIP_00272SWS_DoIP_00274SWS_DoIP_00276SWS_DoIP_00279SWS_DoIP_00282SWS_DoIP_00283SWS_DoIP_00284SWS_DoIP_00285SWS_DoIP_00286SWS_DoIP_00289SWS_DoIP_00290SWS_DoIP_00291SWS_DoIP_00292SWS_DoIP_00293SWS_DoIP_00294SWS_DoIP_00295SWS_DoIP_00296SWS_DoIP_00297SWS_DoIP_00298SWS_DoIP_00299SWS_DoIP_00302SWS_DoIP_00303SWS_DoIP_00304SWS_DoIP_00305SWS_DoIP_00306SWS_DoIP_00310SWS_DoIP_00311SWS_DoIP_00358

विवरण दृश्य

रूपरेखा में कोई प्रविष्टि चुनें।

आरंभीकरण और स्थिति

DoIP_GetVersionInfo फ़ंक्शन

Returns the version information of this module.

void DoIP_GetVersionInfo(Std_VersionInfoType* versioninfo);
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);

सेवाएँ

DoIP_ActivationLineSwitch फ़ंक्शन

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);
DoIP_AllowNonTlsDoIPConnection फ़ंक्शन

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_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_LocalIpAddrAssignmentChg फ़ंक्शन

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_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);
DoIP_SoAdTpStartOfReception फ़ंक्शन

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);
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);
DoIP_TriggerVehicleAnnouncement फ़ंक्शन

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);
User_DoIPGetGidCallback फ़ंक्शन

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);
User_DoIPGetPowerModeCallback फ़ंक्शन

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);
User_DoIPTriggerGidSyncCallback फ़ंक्शन

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);

कॉलबैक

DoIP_SoAdIfRxIndication फ़ंक्शन

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

void DoIP_SoAdIfRxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);
DoIP_SoAdIfTxConfirmation फ़ंक्शन

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_SoAdTpRxIndication फ़ंक्शन

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);
DoIP_SoAdTpTxConfirmation फ़ंक्शन

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_MainFunction फ़ंक्शन

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

void DoIP_MainFunction(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)}

DoIP_ConfigType टाइप

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 –

DoIP_PowerStateType टाइप

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

आवश्यकताएँ

SWS_DoIP_00001 requirement

The DoIP module shall maintain the following information of the configured DoIPUdpConnection (for UDP communication): (a) State of the SocketConnection

SWS_DoIP_00002 requirement

The DoIP module shall be able to maintain DoIPMaxTesterCon- nections configured connections with the following information: (a) DoIPSoAdTcpRxPduId, describes the connection to the SocketConnection (b) Source Address (SA) as soon as the information is available for the DoIP module (c) All Routing activation status of this socket connection (d) Status of the SocketConnection (f) Time since last TCP communication (Rx or Tx) (g) Information if the connection is active or not

SWS_DoIP_00004 requirement

The first 8 Bytes of a DoIP message shall contain the DoIP Header followed by the actual payload data.

SWS_DoIP_00005 requirement

Byte 0 of the DoIP header has to contain the protocol version e.g. 0x02.

SWS_DoIP_00006 requirement

The Byte 1 of the DoIP header shall contain the inverse protocol version e.g. 0xFD value shall be added if the protocol version is 0x02.

SWS_DoIP_00007 requirement

Byte 2 and Byte 3 shall contain the PayloadType.

SWS_DoIP_00008 requirement

The following PayloadTypes shall be supported for reception of DoIP messages:

SWS_DoIP_00009 requirement

The following PayloadTypes shall be supported for sending of DoIP messages:

SWS_DoIP_00010 requirement

Bytes 4 to 7 shall contain the payload length in Bytes not includ- ing the length of the DoIP header information (i.e. if a DoIP message is received with Payload length set to 2 it means that 10 Bytes in total were received).

SWS_DoIP_00012 requirement

If an invalid DoIP header was received, a DoIP message with payload type 0x0000 shall be transmitted with the payload described in [SWS_DoIP_00013] on the TxPdu which is related to the RxPdu the message was received on, if the according SocketConnection status has not changed since the re- ception of the DoIP message

SWS_DoIP_00013 requirement

The payload of the generic DoIP header shall contain the corresponding NACK code (1 Byte) as specified from [SWS_DoIP_00014] to [SWS_DoIP_00019].

SWS_DoIP_00014 requirement

If the Protocol information is incorrect, (see [SWS_DoIP_00005], [SWS_DoIP_00006] and [SWS_DoIP_00015] for valid information) the NACK code 0x00 shall be sent and the according socket shall be closed (see [SWS_DoIP_00058]).

SWS_DoIP_00015 requirement

On a vehicle identification request the Protocol Type 0xFF and the inverse Protocol Type 0x00 shall be supported as default values, additionally to the ProtocolType described in [SWS_DoIP_00005] and [SWS_DoIP_00006].

SWS_DoIP_00016 requirement

If a payload type is not supported (see [SWS_DoIP_00008] for valid payload types) the DoIP module shall send the NACK code 0x01 to indicate that a unkown payload type was requested. The message shall be discarded for further processing.

SWS_DoIP_00017 requirement

If the payload length exceeds the value configured by DoIPMax RequestBytes, the DoIP module shall send the NACK code 0x02 to indicate that the message is too large. The message shall be discarded for further processing.

SWS_DoIP_00018 requirement

If the DoIP module is called with DoIP_SoAdTpStartOfRecep- tion() and the indicated payload length exceeds the currently available buffer size, the function must return with BUFREQ_E_OVFL value (No buffer of the required length can be provided) and trigger a Negative Response (NACK) with value 0x03. The currently available buffer size calculation shall be based on Payload Type. If the DoIP message is processed internally (see [SWS_DoIP_00008]) the locally avalailable buffer, other case the upper layer (PduR_DoIPTpStartOfReception) provided buffer size shall be the base for the response.

SWS_DoIP_00019 requirement

If the DoIP module is called with a payload length that is not valid for the specifc payload type, the NACK code 0x04 shall be sent and the according socket shall be closed (see [SWS_DoIP_00058]).

SWS_DoIP_00020 requirement

Module Header File Imported Type ComStack_Types.h BufReq_ReturnType ComStack_Types.h PduIdType ComStack_Types.h PduInfoType ComStack_Types.h PduLengthType ComStack_Types.h RetryInfoType ComStack_Types ComStack_Types.h TpDataStateType SoAd.h SoAd_SoConIdType SoAd SoAd.h SoAd_SoConModeType Std_Types.h Std_ReturnType Std Std_Types.h Std_VersionInfoType TcpIp.h TcpIp_DomainType TcpIp.h TcpIp_IpAddrAssignmentType TcpIp.h TcpIp_IpAddrStateType TcpIp TcpIp.h TcpIp_SockAddrType

SWS_DoIP_00030 requirement

If source code for caller and callee of DoIP_GetVersionInfo is available, the DoIP module should realize DoIP_GetVersionInfo as a macro, defined in the module's header file.

SWS_DoIP_00036 requirement

If development error detection is enabled: The function shall check if the id matches a configured DoIPSoAdTcpRxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

SWS_DoIP_00042 requirement

The main function for scheduling the DoIP module (Entry point for scheduling) shall be called by the Schedule Manager according to the configured call period.

SWS_DoIP_00043 requirement

The call period of the DoIP_MainFunction() is determined by the configuration parameter DoIPMainFunctionPeriod.

SWS_DoIP_00044 requirement

Dcm_GetVin Dcm.h Function to get the VIN (as defined in SAE J1979-DA) PduR_DoIPTpCopyRxData PduR_DoIPTp.h 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. PduR_DoIPTpCopyTxData PduR_DoIPTp.h 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. PduR_DoIPTpRxIndication PduR_DoIPTp.h Called after an I-PDU has been received via the TP API, the result indicates whether the transmission was successful or not. API Function Header File Description PduR_DoIPTpStartOfReception PduR_DoIPTp.h 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. PduR_DoIPTpTxConfirmation PduR_DoIPTp.h This function is called after the I-PDU has been transmitted on its network, the result indicates whether the transmission was successful or not. SoAd_CloseSoCon SoAd.h This service closes the socket connection specified by SoConId. SoAd_GetPhysAddr SoAd.h Retrieves the physical source address of the EthIf controller used by the SoAd socket connection specified by SoConId. SoAd_GetSoConId SoAd.h Returns socket connection index related to the specified TxPduId. SoAd_IfTransmit SoAd.h Requests transmission of a PDU. SoAd_OpenSoCon SoAd.h This service opens the socket connection specified by SoConId. SoAd_ReadDhcpHostNameOption SoAd.h 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. SoAd_ReleaseIpAddrAssignment SoAd.h By this API service the local IP address assignment used for the socket connection specified by SoConId is released. SoAd_RequestIpAddrAssignment SoAd.h By this API service the local IP address assignment which shall be used for the socket connection specified by SoConId is initiated. SoAd_TpTransmit SoAd.h Requests transmission of a PDU. SoAd_WriteDhcpHostNameOption SoAd.h 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.

SWS_DoIP_00045 requirement

Det_ReportError Det.h Service to report development errors. PduR_DoIPIfTxConfirmation PduR_DoIPIf.h The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

SWS_DoIP_00052 requirement

A DoIP Service Component with the ShortName DoIP shall be provided based on the configuration of the DoIP module.

SWS_DoIP_00054 requirement

Name CallbackGetPowerMode Comment – IsService true Variation {ecuc(DoIP/DoIPGeneral/DoIPPowerModeCallback/DoIPPowerModeDirect)} == NULL 0 E_OK Operation successful Possible Errors 1 E_NOT_OK Operation failed Operation GetPowerMode Comment – Mapped to API <User>_DoIPGetPowerModeCallback Variation – Parameters PowerStateReady Type DoIP_PowerStateType Direction OUT Comment – Variation – Possible Errors E_OK E_NOT_OK

SWS_DoIP_00055 requirement

Name {Name}_RoutingActivation Comment – IsService true Variation (({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRoutingActivation AuthenticationCallback)} != null) && ({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation/DoIPRoutingActivationAuthenticationCallback/DoIPRoutingActivationAuthentication Func)} == "")) || (({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/Do IPRoutingActivationConfirmationCallback)} != null) && ({ecuc(DoIP/DoIPConfigSet/Do IPInterface/DoIPRoutingActivation/DoIPRoutingActivationConfirmationCallback/DoIPRouting ActivationConfirmationFunc)} == "")) Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation.SHORT-NAME)} 0 E_OK Operation successful 1 E_NOT_OK Operation failed Possible Errors 16 DOIP_E_PENDING RoutingActivation still pending. Operation RoutingActivationAuthentication Comment – Mapped to API <User>_DoIPRoutingActivationAuthentication Variation (({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRoutingActivation AuthenticationCallback)} != NULL) && ({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation/DoIPRoutingActivationAuthenticationCallback/DoIPRoutingActivationAuthentication Func)} ==NULL)) Authentified Parameters Type boolean Direction OUT Comment – Variation – AuthenticationReqData Type AuthenticationReqDataType_{Name} Direction IN Comment – Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRouting ActivationAuthenticationCallback.DoIPRoutingActivationAuthenticationReq Length)} > 0 Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation.SHORT-NAME)} AuthenticationResData Type AuthenticationResDataType_{Name} Direction OUT Comment – Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRouting ActivationAuthenticationCallback.DoIPRoutingActivationAuthenticationRes Length)} > 0 Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation.SHORT-NAME)} Possible Errors E_OK E_NOT_OK DOIP_E_PENDING Operation RoutingActivationConfirmation Comment – Mapped to API <User>_DoIPRoutingActivationConfirmation Variation (({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRoutingActivation ConfirmationCallback)} != NULL) && ({ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation/DoIPRoutingActivationConfirmationCallback/DoIPRoutingActivationConfirmation Func)} ==NULL)) Confirmed Type boolean Direction OUT Comment – Variation – ConfirmedReqData Type ConfirmationReqDataType_{Name} Direction IN Comment – Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRouting ActivationConfirmationCallback.DoIPRoutingActivationConfirmationReq Length)} > 0 Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation.SHORT-NAME)} ConfirmedResData Type ConfirmationResDataType_{Name} Direction OUT Parameters Comment – Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRoutingActivation/DoIPRouting ActivationConfirmationCallback.DoIPRoutingActivationConfirmationRes Length)} > 0 Name = {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPRouting Activation.SHORT-NAME)} Possible Errors E_OK E_NOT_OK DOIP_E_PENDING

SWS_DoIP_00056 requirement

Name CallbackTriggerGIDSynchronization Comment – IsService true Variation ({ecuc(DoIP/DoIPGeneral/DoIPTriggerGidSyncCallback)} != NULL) && ({ecuc(DoIP/Do IPGeneral/DoIPTriggerGidSyncCallback/DoIPTriggerGidSyncDirect)} == NULL) && ({ecuc(Do IP/DoIPGeneral/DoIPVinGidMaster)} == TRUE) 0 E_OK Operation successful Possible Errors 1 E_NOT_OK Operation failed Operation TriggerGIDSynchronization Comment – Mapped to API <User>_DoIPTriggerGidSyncCallback Variation – Possible Errors E_OK E_NOT_OK

SWS_DoIP_00057 requirement

Name CallbackGetGID Comment – IsService true Variation ({ecuc(DoIP/DoIPGeneral/DoIPGetGidCallback)} != NULL) && ({ecuc(DoIP/DoIPGeneral/Do IPGetGidCallback/DoIPGetGidDirect)} == NULL) 0 E_OK Operation successful Possible Errors 1 E_NOT_OK Operation failed Operation GetGID Comment – Mapped to API <User>_DoIPGetGidCallback Variation – Data Type uint8 Direction OUT Comment – Parameters Variation – Possible Errors E_OK E_NOT_OK

SWS_DoIP_00058 requirement

If a connection needs to be closed based on DoIP specific be- havior, the DoIP module shall call the function SoAd_CloseSoCon with the parameter abort set to FALSE and the SoConId determined by a call to the function SoAd_Get SoConId for the corresponding DoIPSoAdTcpTxPdu. Additionally, the inactivity timer shall be stopped.

SWS_DoIP_00059 requirement

The expected payload length (see [SWS_DoIP_00019]) for vehi- cle identification request message with payload type 0x0001 shall be exactly 0.

SWS_DoIP_00060 requirement

If a DoIP message with payload Type 0x0001 is received on the configured DoIPUdpConnection, the DoIP module shall respond with a vehicle identifi- cation response/vehicle announcement message after the configured DoIPInitialVehi- cleAnnouncementTime with payload type 0x0004.

SWS_DoIP_00061 requirement

When the module receives a DoIP message with payload type 0x0001 on a connection different than a configured DoIPUdpConnection, the module shall discard the DoIP message.

SWS_DoIP_00062 requirement

When the module receives a DoIP message with payload Type 0x0002 on a connection different than a configured DoIPUdpConnection, the module shall discard the DoIP message.

SWS_DoIP_00063 requirement

The expected payload length (see [SWS_DoIP_00019]) for vehi- cle identification request message with payload type 0x0002 shall be exactly 6.

SWS_DoIP_00064 requirement

If a DoIP message with payload Type 0x0002 is received on the configured DoIPUdpConnection, the DoIP module shall further process the message.

SWS_DoIP_00065 requirement

If the Parameter DoIPUseMacAdressForIdentification is set to true the received "EID" 6 payload data bytes shall be compared to the MacAddress received via SoAd_GetPhysAddr . If they match the DoIP module shall respond with a vehicle identification response/vehicle announcement message with payload type 0x0004.

SWS_DoIP_00066 requirement

If the Parameter DoIPUseMacAdressForIdentification is set to false the received "EID" 6 payload data bytes shall be compared to the configured Do IPEID. If they match the DoIP module shall respond with a vehicle identification respon- se/vehicle announcement message with payload type 0x0004.

SWS_DoIP_00067 requirement

When the module receives a DoIP message with payload Type 0x0003 on a connection different than a configured DoIPUdpConnection, the module shall discard the DoIP message.

SWS_DoIP_00068 requirement

The expected payload length (see [SWS_DoIP_00019]) for ve- hicle identification request message with payload type 0x0003, shall be exactly 17.

SWS_DoIP_00069 requirement

If a DoIP message with payload Type 0x0003 is received on the configured DoIPUdpConnection the DoIP module shall further process the message.

SWS_DoIP_00070 requirement

The DoIP 17 payload data bytes shall be compared to the data retrieved by the function Dcm_GetVin. If the function returns E_OK, the VIN pointer is considered to contain valid information. If the function returns E_NOT_OK or the returned VIN do not match the requested VIN, the DoIP message with payload Type 0x0003 shall be ignored. If the requested VIN matches the derived VIN, the DoIP mod- ule shall respond with a vehicle identification response/vehicle announcement mes- sage with payload type 0x0004.

SWS_DoIP_00071 requirement

If the DoIP module needs to send a vehicle announcement mes- sage (see [SWS_DoIP_00205] and [SWS_DoIP_00298]), it shall send the vehicle an- nouncement message via the configured DoIPUdpVehicleAnnouncementConnection after DoIPInitialVehicleAnnouncementTime. This message shall be sent DoIPVehi- cleAnnouncementCount times with a delay of DoIPVehicleAnnouncementInterval be- tween each message. The last "VIN/GID Status" byte of the Vehicle identification re- sponse message is optional as defined in the ISO 13400-2 standard. It shall exist only if the "DoIPUseVehicleIdentificationSyncStatus" configuration parameter is set to True. (See [SWS_DoIP_00086]).

SWS_DoIP_00072 requirement

The "VIN" of a vehicle identification response/vehicle announce- ment message shall be derived by calling Dcm_GetVin. If Dcm_GetVin returns E_OK, the 17 Bytes in the pointer shall be used, if the callback returns E_NOT_OK the 17 Bytes shall be filled with the configured DoIPVinInvalidityPattern with "Further Action Required" field set to 0x00 and VIN/GID sync. Status field set to 0x10 if (DoIPUse VehicleIdentificationSyncStatus) is set to true.

SWS_DoIP_00073 requirement

The "LA" of a vehicle identification response/vehicle announce- ment message shall contain the configured DoIPLogicalAddress.

SWS_DoIP_00074 requirement

The "EID" of a vehicle identification response/vehicle announce- ment message shall contain the MAC address derived by Soad_GetPhysAddr if the configuration parameter DoIPUseMacAdressForIdentification is set to true.

SWS_DoIP_00075 requirement

The "EID" of a vehicle identification response/vehicle announce- ment message shall contain the configured DoIPEID if the configuration parameter Do IPUseMacAdressForIdentification is set to false.

SWS_DoIP_00076 requirement

If the parameter DoIPVinGIDMaster is set to true and the Con- tainer DoIPTriggerGIDSynchronization is configured, the DoIP module shall call the <User>_DoIPTriggerGIDSynchronization function (after successful IP Address assign- ment, see [SWS_DoIP_00306]) and repeat this call within the DoIP_MainFunction until its return value equals to E_OK or until the complete connection is closed for any other reason.

SWS_DoIP_00077 requirement

The "GID" of a vehicle identification response/vehicle announce- ment message shall contain the same value as for the EID, if both configuration parameter and DoIPUseEIDasGID are set to true (see [SWS_DoIP_00074] and [SWS_DoIP_00075]).

SWS_DoIP_00078 requirement

The "GID" of a vehicle identification response/vehicle announce- ment message shall contain the configured DoIPGID value, if the configuration param- eter DoIPVinGIDMaster is set to true, the configuration parameter DoIPUseEIDasGID is set to false and the parameter DoIPGID is configured.

SWS_DoIP_00079 requirement

The "GID" of a vehicle identification response/vehicle announce- ment message shall contain the value retrieved by the configured DoIPGetGidCallback function(for the signature see <User>_DoIPGetGidcallback, [SWS_DoIP_00051]), if the configuration parameter DoIPVinGIDMaster is set to true, the configuration param- eter DoIPUseEIDasGID is set to false and the parameter DoIPGID is not configured. If the function does not return E_OK the GID shall consist of 6 Bytes according to the configured DoIPGIDInvalidityPattern.

SWS_DoIP_00080 requirement

The "GID" of a vehicle identification response/vehicle announce- ment message shall contain the configured DoIPGID value, if the configuration pa- rameter DoIPVinGIDMaster is set to false and the parameter DoIPGID is configured.

SWS_DoIP_00081 requirement

The "GID" of a vehicle identification response/vehicle announce- ment message shall contain the value retrieved by the configured DoIPGetGID func- tion, if the configuration parameter DoIPVinGIDMaster is set to false and the parameter DoIPGID is not configured. If the function does not return E_OK, the GID shall consist of 6 Bytes according to the configured DoIPGIDInvalidityPattern.

SWS_DoIP_00082 requirement

The "Further action" byte of a vehicle identification response/ve- hicle announcement message shall contain the value 0x10 if any DoIPRoutingActiva- tion with DoIPRoutingActivationNumber equal to 0xE0 is configured and the according RoutingActivation was not yet successfully performed.

SWS_DoIP_00083 requirement

The "Further action" byte of a vehicle identification response/ve- hicle announcement message shall contain the value 0x00, if no DoIPRoutingActivation with DoIPRoutingActivationNumber equal to 0xE0 is configured.

SWS_DoIP_00084 requirement

The "Further action" byte of a vehicle identification response/ve- hicle announcement message shall contain the value 0x00, if any DoIPRoutingActiva- tion with DoIPRoutingActivationNumber equal to 0xE0 is configured and the according RoutingActivation was successfully performed.

SWS_DoIP_00085 requirement

If a change in the IP address assignment indicated by Do IP_LocalIpAddrAssignmentChg with another TCP_IpAddrStateType then TCPIP_ IPADDR_STATE_ASSIGNED, the function to start GID synchronisation as described in [SWS_DoIP_00076] shall not be called any longer independent from the before re- turn value.

SWS_DoIP_00086 requirement

If the configuration parameter DoIPUseVehicleIdentificationSync Status is set to true, the "VIN/GID status" byte shall be additionally added to the vehicle identification response/vehicle announcement message.

SWS_DoIP_00087 requirement

If a valid VIN could be requested in [SWS_DoIP_00072], the value of the "VIN/GID status" byte shall be 0x00.

SWS_DoIP_00088 requirement

If no valid VIN could be requested in [SWS_DoIP_00072] and the vehicle GID synchronization was not yet successful as described in [SWS_DoIP_00076], the value of the "VIN/GID status" byte shall be 0x10.

SWS_DoIP_00089 requirement

If no valid VIN could be requested in [SWS_DoIP_00072] and the vehicle GID synchronization was already successful as described in [SWS_DoIP_00076], the value of the "VIN/GID status" byte shall be 0x00.

SWS_DoIP_00090 requirement

When the module receives a DoIP message with payload Type 0x4003 on a connection different than a configured DoIPUdpConnection, the module shall discard the DoIP message.

SWS_DoIP_00091 requirement

The expected payload length (see [SWS_DoIP_00019]) for di- agnostic power mode information request message with payload type 0x4003 shall be exactly 0.

SWS_DoIP_00092 requirement

After a valid Diagnostic power mode request message, the DoIP module shall send a Diagnostic Power mode information response message ([SWS_DoIP_00093]) on the configured DoIPUdpConnection.

SWS_DoIP_00093 requirement

The "Diagnostic Power Mode" byte of diagnostic power mode in- formation response message contains the 1 Byte value retrieved by a call to the config- ured DoIPPowerModeCallback (for the signature see <User>DoIPGetPowerModeSta- tus, [SWS_DoIP_00047]). If the function returns E_OK, the "Diagnostic Power Mode" shall be set to the retrieved value of PowerStateReady, otherwise it shall be set to 0x00 to indicate that the power mode is not ready.

SWS_DoIP_00094 requirement

When the module receives a DoIP message with payload Type 0x4001 on a connection different than a configured DoIPUdpConnection, the module shall discard the DoIP message.

SWS_DoIP_00095 requirement

The expected payload length (see [SWS_DoIP_00019]) for di- agnostic entity status request message with payload type 0x4001 shall be exactly 0.

SWS_DoIP_00096 requirement

After a valid Diagnostic entity status request message, the DoIP module shall send a Diagnostic entity status response message (see Table 7.11) on the configured DoIPUdpConnection.

SWS_DoIP_00097 requirement

The "Node Type" byte of a diagnostic entity status response message shall contain the configured DoIPNodeType, whereas DOIP_GATEWAY shall be represented by 0x00 and DOIP_NODE shall be represented by 0x01.

SWS_DoIP_00098 requirement

The "Max open sockets" byte of a diagnostic entity status re- sponse message shall contain the configured DoIPMaxTesterConnections. This pa- rameter represents the maximum number of concurrent TCP_DATA sockets allowed with this DoIP entity, excluding the reserve socket required for socket handling as de- fined in the ISO 13400-2 standard.

SWS_DoIP_00099 requirement

The "Currently open sockets" byte of a diagnostic entity status response message shall contain the currently active connections, based on the infor- mation described in [SWS_DoIP_00002].

SWS_DoIP_00100 requirement

The "Max data size" bytes are only supported if the configuration parameter DoIPEntityStatusMaxByteFieldUse is set to TRUE. In this case, the diag- nostic entity status response message shall contain the configured DoIPMaxRequest Bytes in the "Max data size" field.

SWS_DoIP_00101 requirement

When the module receives a DoIP message with payload Type 0x0005 on a connection different than a configured DoIPTcpConnection, the module shall discard the DoIP message.

SWS_DoIP_00102 requirement

If a routing activation request message is received with a valid DoIP header, the DoIP module shall process further to [SWS_DoIP_00103], if the field "Source address" matches a configured DoIPTesterSA.

SWS_DoIP_00103 requirement

The DoIP module shall always continue with processing as de- fined in [SWS_DoIP_00105], either if the received "Source Address" is already regis- tered to a connection as described in [SWS_DoIP_00002] and it is the same socket connection this routing activation request was received on, or if the received "Source Address" is not registered to a connection yet.

SWS_DoIP_00104 requirement

If a routing activation request message is received with a "Source address" that does not match a configured DoIPTesterSA, the routing activa- tion response message shall be sent on the same connection as the received request with the routing activation response code 0x00. Additionally the socket connection shall be closed as defined in [SWS_DoIP_00058].

SWS_DoIP_00105 requirement

If the received "Source Address" is already registered to an- other connection, belonging to the same DoIPInterface, an alive check request to this connection shall be triggered as described in [SWS_DoIP_00139] and [SWS_DoIP_00140] and it shall be waiting for the alive check response message or until the time configured in parameter DoIPAliveCheckResponseTimeout expired. If the alive check response was received within the configured time, the DoIP mod- ule shall send a routing activation response message with the activation response code set to 0x03. Additionally the socket connection shall be closed as defined in [SWS_DoIP_00058]. If the "Source Address" is not already registered or the DoIPAlive CheckResponseTimeout expired without receiving an alive check response message the DoIP module shall continue with [SWS_DoIP_00107].

SWS_DoIP_00106 requirement

If a routing activation request message is received with a valid "Source address" but the connection this Routing activation was received on is already registered to another source address, the DoIP module shall send a routing activation response message on the same connection the request was received on, with the routing activation response code set to 0x02. Additionally the socket connection shall be closed as defined in [SWS_DoIP_00058].

SWS_DoIP_00107 requirement

If the amount of registered connections is smaller than the configured DoIPMaxTesterConnections, the DoIP module shall proceed with the message as described in [SWS_DoIP_00108] otherwise an alive check request shall be sent to all registered connections as described in [SWS_DoIP_00139] and [SWS_DoIP_00140]. If none of the alive checks times out (i.e. all tester respond with a valid alive check response within the configured DoIPAliveCheckResponseTimeout) the DoIP module shall send a routing activation response message with the activa- tion response code set to 0x01. Additionally the socket connection shall be closed as defined in [SWS_DoIP_00058]. If at least one of them times out the DoIp module shall close the socket connection and continue as described in [SWS_DoIP_00108].

SWS_DoIP_00108 requirement

If the "Activation type" bytes matches the DoIPRoutingActiva- tionNumber of one of the DoIPRoutingActivationRef of the "Source Address" (i.e. DoIPTester has a DoIPRoutingActivationRef configured which has the DoIPRouting ActivationNumber equal to "Activation type") the DoIP module shall proceed with [SWS_DoIP_00109].

SWS_DoIP_00109 requirement

If an DoIPRoutingActivationAuthenticationCallback is configured for the referenced DoIPRoutingActivation, the DoIP module shall call this callback (for the signature see <User>_DoIPRoutingActivationAuthentication, [SWS_DoIP_00049]). If the DoIPRoutingActivationAuthenticationReqLength is not configured to 0, the Do IP module shall handle additionally the first DoIPRoutingActivationAuthenticationReq Length bytes of the optional field "OEM specific".

SWS_DoIP_00110 requirement

If the DoIPRoutingActivationAuthenticationCallback returns DOIP_E_PENDING the DoIP module shall trigger the callback at next DoIP_MainFunc- tion call again until something else than DOIP_E_PENDING is returned. Additionally the socket connection shall be considered as registered to this DoIPTesterSA without activating the routing.

SWS_DoIP_00111 requirement

If the DoIPRoutingActivationAuthenticationCallback returns something else (e.g. E_NOT_OK) the DoIP module shall send a routing activation response message with the activation response code set to 0x04 and the socket con- nection shall be considered as registered to this DoIPTesterSA without activating the routing.

SWS_DoIP_00112 requirement

If a DoIPRoutingActivationConfirmationCallback is configured for the referenced DoIPRoutingActivation, the DoIp module shall call this callback (for the signature see <User>_DoIPRoutingActivationConfirmation, [SWS_DoIP_00048]). If the DoIPRoutingActivationConfirmationReqLength is not configured to 0, the Do IP module shall handle additionally the last DoIPRoutingActivationConfirmationReq Length bytes of the optional field "OEM specific". If the Callback returns with E_OK the routing activation confirmation shall be considered as successful and if the Do IPRoutingActivationConfirmationResLengthis not set to 0, the last DoIPRoutingActi- vationConfirmationResLength bytes shall be attached in routing activation response message in the field "OEM specific" as described in [SWS_DoIP_00120].

SWS_DoIP_00113 requirement

If no response was sent because of the before mentioned checks this DoIPRoutingActivation is confirmed, authorized and valid so the DoIP module shall send a routing activation response message with the activation response code set to 0x10 and the socket connection shall be considered as registered to this DoIPTester SA and enable the routing for this routing activation. From now on the routing to the configured DoIPTargetAdressRef are active and valid so the diagnostic request mes- sages related to the specified DoIPTargetAdress received via this socket connection are active.

SWS_DoIP_00114 requirement

If the DoIPRoutingActivationConfirmationCallback returns DOIP_E_PENDING, the DoIP module shall send a routing activation response mes- sage once with the activation response code set to 0x11.

SWS_DoIP_00115 requirement

If a TCP socket connection gets closed (after the DoIP_SoCon ModeChg was called with different mode value than SOAD_SOCON_ONLINE or any other reason described by [SWS_DoIP_00058] or [SWS_DoIP_00358]) the DoIP mod- ule shall - unregister and release the socket connection to the related Tester, - discard the ongoing diagnostic message processing and - reset the inactivity timer of the given socket connection.

SWS_DoIP_00116 requirement

The "Logical Address Tester" field shall be set to the Tester SA the according routing activation request message was received from.

SWS_DoIP_00117 requirement

The expected payload length (see [SWS_DoIP_00019]) for Routing Activation Request Message with payload type 0x0005 shall be either exactly 7 or 11.

SWS_DoIP_00118 requirement

The "Logical Address DoIP entity" shall be set to the configured parameter DoIPLogicalAddress.

SWS_DoIP_00119 requirement

The "Routing activation response code shall be set accord- ing to the response conditions specified in [SWS_DoIP_00106], [SWS_DoIP_00104], [SWS_DoIP_00105], [SWS_DoIP_00107], [SWS_DoIP_00160], [SWS_DoIP_00111], [SWS_DoIP_00114], [SWS_DoIP_00274] and [SWS_DoIP_00113].

SWS_DoIP_00120 requirement

The "OEM specific" field shall be filled with the optional values as defined in chapter 7.3.2.2.1. if the according DoIPRoutingActivationAuthentica- tionResLength and/or DoIPRoutingActivationConfirmationResLength is used.

SWS_DoIP_00121 requirement

When the module receives a DoIP message with payload Type 0x8001 on a connection different than a configured DoIPTcpConnection, the module shall discard the DoIP message.

SWS_DoIP_00122 requirement

The expected payload length (see [SWS_DoIP_00019]) for diag- nostic messages with payload type 0x8001 shall be at least 5 byte.

SWS_DoIP_00123 requirement

If the DoIP module receives a diagnostic message with a "Source Address" (equals DoIPTesterSA) which is not registered on an established socket connection, the DoIP modules shall send a diagnostic message negative acknowledge message with the diagnostic message negative acknowledge code set to 0x02. Additionally the socket connection shall be closed as described in [SWS_DoIP_00058].

SWS_DoIP_00124 requirement

If the DoIP module receives a diagnostic message with a "Target Addess" (equals DoIPTargetAdressValue) which is not connected via DoIPRoutingAc- tivationRef and DoIPTargetAdressRef to the received valid DoIPTesterSA, than the Do IP module shall send a diagnostic message negative acknowledge message with the diagnostic message negative acknowledge code set to 0x03. Additionally the message shall be discarded.

SWS_DoIP_00125 requirement

If the DoIP module receives a diagnostic message with the pay- load data length in the DoIP header is set to a value bigger than DoIPMaxRequest Bytes-4, than the DoIP module shall send a diagnostic message negative acknowl- edge message with the diagnostic message negative acknowledge code set to 0x04. Additionally the message shall be discarded.

SWS_DoIP_00126 requirement

If the DoIP module receives a diagnostic message and [SWS_DoIP_00125] does not apply but the current buffer size is not sufficient to re- ceive the message, than the DoIP module shall send a diagnostic message negative acknowledge message with the diagnostic message negative acknowledge code set to 0x05. Additionally the message shall be discarded.

SWS_DoIP_00127 requirement

If the DoIP module receives a diagnostic message and the according "TargetAddress" was not activated by routing activation as described in [SWS_DoIP_00113], the DoIP module shall send a diagnostic message negative ac- knowledge message with the diagnostic message negative acknowledge code set to 0x06. Additionally the message shall be discarded.

SWS_DoIP_00128 requirement

If no negative acknowledge was sent the DoIP module shall eval- uate the message and forward the content (i.e. all UDS Data, not the TargetAddress and SourceAddress) to the DoIPPduRRxPdu connected to the received TargetAd- dress/SourceAddress combination as configured in DoIPChannel

SWS_DoIP_00129 requirement

If the PduR accepted all Data, the DoIP module shall send a diagnostic acknowledge message as described in Table 7.13.

SWS_DoIP_00130 requirement

The DoIP module will get a diagnostic response message (i.e Do IP_TpTransmit or DoIP_IfTransmit is called with DoIPPduRTxPdu which matches to the DoIPPduRRxPdu that handled the data to the PduR) via the upper layer connection to the PduR, so it has to monitor whether the socket connection the request was received on is still established. If the socket connection has been closed, the response shall be discarded and the DoIP shall return with E_NOT_OK in the return value.

SWS_DoIP_00131 requirement

If the DoIP module is called with DoIPPduRTxPdu in the DoIP_ TpTransmit or DoIP_IfTransmit as described in [SWS_DoIP_00130] and the according socket connection has not been closed since the reception of the according diagnos- tic message, the DoIP module shall prepare a diagnostic message via the according socket connection with the "SourceAddress" set to the DoIPTargetAdressValue of the request and the "TargetAddress" set to the DoIPTesterSA.

SWS_DoIP_00132 requirement

If the DoIP module needs to send a diagnostic acknowledge message the "Source Address" shall be set to the according "TargetAddress" of the received message.

SWS_DoIP_00133 requirement

If the DoIP module needs to send a diagnostic acknowledge message the "Target Address" shall be set to the according "SourceAddress" of the received message.

SWS_DoIP_00134 requirement

If the DoIP module needs to send a diagnostic acknowledge message the field "previous diag message" shall be filled with the number of bytes of the original request message as configured in the parameter DoIPNumByteDiagAck Nack for the DoIPTester the request was received on.

SWS_DoIP_00135 requirement

If the DoIP module needs to send a diagnostic negative acknowl- edge message the "Source Address" shall be set to the according "TargetAddress" of the received message.

SWS_DoIP_00136 requirement

If the DoIP module needs to send a diagnostic negative acknowl- edge message the "Target Address" shall be set to the according "SourceAddress" of the received message.

SWS_DoIP_00137 requirement

If the DoIP module needs to send a diagnostic negative acknowl- edge message, the "Diagnostic message negative acknowledge code" shall be set to the value specified by the specification item that is triggering the diagnostic negative acknowledge message.

SWS_DoIP_00138 requirement

If the DoIP module needs to send a diagnostic negative acknowl- edge message the field "previous diag message" shall be filled with the configured number of the original request message as configured in the parameter DoIPNumByte DiagAckNack for the DoIPTester the request was received on.

SWS_DoIP_00139 requirement

If the DoIP module needs to send a alive check request, it shall have no payload data but only the generic DoIP header and the payload type set 0x0007.

SWS_DoIP_00140 requirement

After sending an alive check request the DoIP module shall wait the configured time DoIPAliveCheckResponseTimeout to receive a valid alive check response and [SWS_DoIP_00141]. If it does not receive an alive check response, the socket connection on which the alive check request was sent shall be reset as described in [SWS_DoIP_00358].

SWS_DoIP_00141 requirement

If the received Alive check response field "SourceAddress" matches the registered Source Address of the socket connection the response was received on, the DoIP module shall do nothing. Otherwise it shall reset the socket connection as described in [SWS_DoIP_00358].

SWS_DoIP_00142 requirement

The DoIP module shall maintain an inactivity timer for each reg- istered TCP connection.

SWS_DoIP_00143 requirement

After a successful TCP socket connection (i.e. DoIP_SoCon ModeChg) the DoIP module shall start the inactivity timer.

SWS_DoIP_00144 requirement

If no Routing Activation request was received on a new opened socket within the configured DoIPInitialInactivityTime, the DoIP module shall reset the socket connection as described in [SWS_DoIP_00358].

SWS_DoIP_00145 requirement

After a routing activation has been performed (see [SWS_DoIP_00159]), the DoIP module shall reset the inactivtity timer to 0 al- ways when data communication is performed on the socket (send or receive).

SWS_DoIP_00146 requirement

If the inactivity timer reaches the time configured in DoIPGen- eralInactivityTime, the corresponding socket connection shall be reset as described in [SWS_DoIP_00358].

SWS_DoIP_00148 requirement

Type of error Related error code Error value API service call without module initialization DOIP_E_UNINIT 0x01 NULL-Pointer on any API call DOIP_E_PARAM_POINTER 0x02 Wrong Lower Layer (SoAd) or Upper Layer (Pdu Router) Id received DOIP_E_INVALID_PDU_SDU_ID 0x03 API call with invalid Parameter DOIP_E_INVALID_PARAMETER 0x04 DoIP Init service call failure DOIP_E_INIT_FAILED 0x05

SWS_DoIP_00154 requirement

If the API DoIP_LocalIpAddrAssignmentChg is called with the State set to TCPIP_IPADDR_STATE_ASSIGNED, the DoIP module shall call the func- tion SoAd_ReadDhcpHostNameOption with the received SoConId to get the currently set host name option. The returned Byte buffer shall be considered as ASCII buffer and shall start with "DoIP-".

SWS_DoIP_00155 requirement

If the ASCII buffer returned in [SWS_DoIP_00154] does not start with "DoIP-" and the configuration parameter DoIPDhcpOptionVinUse is set to FALSE the DoIP module shall call the SoAd_WriteDhcpHostNameOption with a pointer to the string "DoIP-" in order to set the hostname.

SWS_DoIP_00156 requirement

If the ASCII buffer returned in [SWS_DoIP_00154] does not start with "DoIP-" and the configuration parameter DoIPDhcpOptionVinUse is set to TRUE the DoIP module shall call the SoAd_WriteDhcpHostNameOption with a pointer to to the ASCII buffer "DoIP-VIN<vinnumberinascii>" with <vinnumberinascii> representing the ASCII representation of the VIN that is retrieved via Dcm_GetVin. If no valid VIN could be retrieved the DoIP shall use the configured DoIPVinInvalidityPattern in ASCII representation.

SWS_DoIP_00159 requirement

If a Routing Activation request was received on a new opened socket before the inactivity timer elapsed (i.e. the configured DoIPInitialInactivityTime did not pass) the DoIP module shall reset the inactivity timer to 0.

SWS_DoIP_00160 requirement

If the "Activation type" bytes do not fulfill the [SWS_DoIP_00108] requirement, the DoIP module shall send a routing activation response message with the activation response code set to 0x06. In this case the socket connection shall be closed as defined in [SWS_DoIP_00058].

SWS_DoIP_00161 requirement

If the DoIPRoutingActivationAuthenticationCallback returns with E_OK the routing activation authentication shall be considered as successful. If the Do IPRoutingActivationAuthenticationResLength is not set to 0 the first DoIPRoutingAc- tivationAuthenticationResLength byte shall be attached in routing activation response message in the field "OEM specific" as described in [SWS_DoIP_00120].

SWS_DoIP_00162 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00163 requirement

If development error detection is enabled: The function shall check if the TxPduId matches a configured DoIPPduRTxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

SWS_DoIP_00164 requirement

If development error detection is enabled: The function shall check if the PduInfoPtr is not a NULL_PTR. If the check fails the function shall raise the development error DOIP_E_PARAM_POINTER.

SWS_DoIP_00166 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00167 requirement

If development error detection is enabled: The function shall check if the TxPduId matches a configured DoIPPduRTxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

SWS_DoIP_00169 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00170 requirement

If development error detection is enabled: The function shall check if the RxPduId matches a configured DoIPPduRRxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

SWS_DoIP_00172 requirement

If development error detection is enabled: The function shall check if the versioninfo is not a NULL_PTR. If the check fails the function shall raise the development error DOIP_E_PARAM_POINTER.

SWS_DoIP_00173 requirement

The field "User data" of the [SWS_DoIP_00131] message con- tains the actual diagnostic payload data which shall not be modified by DoIP.

SWS_DoIP_00174 requirement

If the PduR is not accepting the data totally (for details refer to chapter 7.5.1), the DoIP module shall send a diagnostic message negative acknowl- edge message with the diagnostic message negative acknowledge code set to 0x08 as described in chapter 7.3.2.6.3. Additionally the message shall be discarded.

SWS_DoIP_00175 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00176 requirement

If development error detection is enabled: The function shall check if the id matches a configured DoIPSoAdTcpTxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

SWS_DoIP_00177 requirement

If development error detection is enabled: The function shall check that neither the info nor the availableDataPtr are a NULL_PTR. If the check fails the function shall raise the development error DOIP_E_PARAM_POINTER.

SWS_DoIP_00178 requirement

If development error detection is enabled: The function shall check if the retry is a NULL_PTR. If the check fails the function shall raise the develop- ment error DOIP_E_INVALID_PARAMETER.

SWS_DoIP_00180 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00181 requirement

If development error detection is enabled: The function shall check if the id matches a configured DoIPSoAdTcpTxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

SWS_DoIP_00182 requirement

If development error detection is enabled: The function shall check if the result is valid. If the check fails the function shall raise the development error DOIP_E_INVALID_PARAMETER.

SWS_DoIP_00183 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00184 requirement

If development error detection is enabled: The function shall check that neither the info nor the bufferSizePtr are a NULL_PTR. If the check fails, the function shall raise the development error DOIP_E_PARAM_POINTER.

SWS_DoIP_00186 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00187 requirement

If development error detection is enabled: The function shall check if the id matches a configured DoIPSoAdTcpRxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

SWS_DoIP_00188 requirement

If development error detection is enabled: The function shall check if the bufferSizePtr is not a NULL_PTR. If the check fails the function shall raise the development error DOIP_E_PARAM_POINTER.

SWS_DoIP_00189 requirement

If development error detection is enabled: The function shall check if the TpSduLength is not 0. If TpSduLength is not 0 the function shall raise the development error DOIP_E_INVALID_PARAMETER.

SWS_DoIP_00190 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00191 requirement

If development error detection is enabled: The function shall check if the id matches a configured DoIPSoAdTcpRxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

SWS_DoIP_00192 requirement

If development error detection is enabled: The function shall check if the result is valid. If the check fails the function shall raise the development error DOIP_E_INVALID_PARAMETER.

SWS_DoIP_00193 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00194 requirement

If development error detection is enabled: The function shall check if the SoConId and Mode are valid. If the check fails the function shall raise the development error DOIP_E_INVALID_PARAMETER.

SWS_DoIP_00195 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00196 requirement

If development error detection is enabled: The function shall check if the SoConId and State are valid. If the check fails the function shall raise the development error DOIP_E_INVALID_PARAMETER.

SWS_DoIP_00197 requirement

If the SoAd calls the DoIP module via the Interface DoIP_SoAdIf RxIndication, the DoIP module shall copy the message into the internal UDP buffer for further processing.

SWS_DoIP_00198 requirement

If the DoIP module shall send a DoIP message via UDP it shall call the SoAd_IfTransmit with the TxPduId set to the SoAd internal TxPduId that is retrieved via the according configured DoIPSoAdUdpTxPduRef, the PduInfoPtr shall contain the length of the message and the pointer to the to be transmitted message buffer and additionally the buffer shall be locked.

SWS_DoIP_00199 requirement

If the SoAd calls the DoIP module via the Interface DoIP_So AdIfTxConfirmation, the DoIP module shall release the buffer which is related to the received TxPduId.

SWS_DoIP_00200 requirement

If the function DoIP_SoAdTpRxIndication is called the DoIp mod- ule shall release all data connected to the reception and forward the result to PduR_ DoIPTpRxIndication if a reception for diagnostic message is currently ongoing.

SWS_DoIP_00201 requirement

The DoIP module shall determine the DoIP Activation Line status by the calls to DoIP_ActivationLineSwitch (uint8 InterfaceId, boolean *Active) based on the value of the boolean parameter Active per DoIPInterface with a given InterfaceId. The Activation Line status is considered "active", if the boolean value in the call is set to TRUE. The Activation Line status is considered "inactive", if the boolean value in the call is set to FALSE.

SWS_DoIP_00202 requirement

If data is received from SoAd or PduR (i.e. communication re- lated interfaces are called) via PduIds related to a certain DoIPInterface configured with DoIPInterfaceActLineCtrl = TRUE, where the status of the Activation Line of this DoIPInterface is currently inactive, the DoIP module shall ignore all these requests and return a negative return value as return value.

SWS_DoIP_00204 requirement

For activation line controlled DoIP Interfaces with DoIPInterface ActLineCtrl = TRUE, DoIP shall establish the corresponding connections for these interfaces according to [SWS_DoIP_00306] if corresponding Activation Line Status switches to "active". (SRS_Eth_00081, SRS_Eth_00028, SRS_Eth_00026).

SWS_DoIP_00205 requirement

If the function DoIP_SoConModeChg is called with Mode set to SOAD_SOCON_ONLINE for a UDP vehicle announcement connection, the DoIP module shall send the vehicle announcement message via the corresponding Tx PDU configured in the DoIPUdpVehicleAnnouncementConnection and belonging to the re- ported socket connection.

SWS_DoIP_00207 requirement

If the function DoIP_SoAdTpStartOfReception is called with Tp SduLength set to 0, the DoIP module shall fill in the bufferSizePtr the available buffer size in the DoIP for the reception of the TCP message, lock the according buffer for other TCP connections and return BUFREQ_OK.

SWS_DoIP_00208 requirement

If the function DoIP_SoAdTpCopyRxData is called at the start of a new DoIP message (e.g. directly after DoIPSoAdTpStartOfReception succeeded or previous DoIP message processed completely) with info.SduLength set to 0 the DoIP module shall return in the parameter bufferSizePtr the length to the maximum necessary bytes to evaluate the DoIP relevant data for routing of diagnostic data.

SWS_DoIP_00209 requirement

If the function DoIP_SoAdTpCopyRxData is called at the start of a new DoIP message (e.g. directly after DoIPSoAdTpStartOfReception succeeded or previous DoIP message processed completely) with info.SduLength is not set to 0 and the DoIP TCP buffer is big enough to copy all the data, the DoIP module shall copy the received data to the internal TCP buffer, return the parameter bufferSizePtr set to the available buffer after copying and return BUFREQ_OK.

SWS_DoIP_00210 requirement

If the function DoIP_SoAdTpCopyRxData is called at the start of a new DoIP message (e.g. directly after DoIPSoAdTpStartOfReception succeeded or previous DoIP message processed completely) with info.SduLength is not set to 0 and the DoIP TCP buffer is not big enough to copy all the data, the DoIP module shall return BUFREQ_E_NOT_OK.

SWS_DoIP_00212 requirement

If the DoIP module has received sufficient data to evaluate the DoIP header, the payload type is diagnostic message and the Routing was already activated for the SourceAddress/TargetAddress combination on this DoIPInterface, the DoIP module shall call the PduR_DoIPTpStartOfReception with the according id set to the DoIPPduRRxPduId matching the SourceAddress/TargetAddress combination of the diagnostic message on this DoIPInterface, set the info.SduLength to the already received diagnostic data, set the info->SduDataPtr to the buffer containing the received diagnostic data and set the TpSduLength to the total size of the diagnostic message extracted from DoIP Header.

SWS_DoIP_00214 requirement

If the DoIP module has received sufficient data to evaluate the DoIP header and the payload type is not diagnostic message the DoIP shall copy all data of this DoIP message to the internal DoIP TCP buffer, lock the according buffer for other TCP connections and process the DoIP message as described in [SWS_DoIP_00219].

SWS_DoIP_00216 requirement

If PduR_DoIPTpStartOfReception returns BUFREQ_E_NOT_ OK, the DoIP module shall send a diagnostic negative acknowledge message with the diagnostic message negative acknowledge code set to 0x08 and discard all the TCP data until the next DoIP message.

SWS_DoIP_00217 requirement

If PduR_DoIPTpCopyRxData returns BUFREQ_E_NOT_OK, the DoIP module shall discard all the TCP data until the next DoIP message and call the PduR_DoIPTpRxIndication with the according PduId and the result set to E_NOT_ OK.

SWS_DoIP_00218 requirement

If PduR_DoIPTpStartOfReception returns BUFREQ_OK the re- ception was accepted and the DoIP shall forward all subsequent calls to DoIP_So AdTpCopyRxData directly to PduR_DoIPTpCopyRxData until all diagnostic data was handed to the PduR.

SWS_DoIP_00219 requirement

If the DoIP module has received with the DoIP_SoAdTpCopy RxData operations enough data to evaluate the DoIP header and the payload type is not diagnostic message (see [SWS_DoIP_00214]), the DoIP module shall receive via subsequent calls to DoIP_SoAdTpCopyRxData all data for the DoIP message and process it.

SWS_DoIP_00220 requirement

If the DoIP module needs to send a DoIP message that is not a diagnostic message on the TCP connection, the DoIP shall call the SoAd_TpTransmit with the TxPduId containing the Id of the according socket, the PduInfoPtr.SduLength set to the size of the data to be transmitted and lock the buffer to send.

SWS_DoIP_00221 requirement

If all diagnostic data was successfully forwarded to the PduR (see [SWS_DoIP_00216]) the DoIP module shall call the PduR_DoIPTpRxIndication with the according PduId and the result set to E_OK.

SWS_DoIP_00223 requirement

If the call to SoAd_TpTransmit returns E_NOT_OK the DoIP module shall discard the DoIP message.

SWS_DoIP_00224 requirement

If the function DoIP_SoAdCopyTxData is called after a sucess- full call to SoAd_TpTransmit, with a valid id and the info.SduLength is set to 0 the DoIP shall return BUFREQ_OK and set the parameter availableDataPtr to the total available data size of the current DoIP message to be transmitted.

SWS_DoIP_00225 requirement

If the function DoIP_SoAdCopyTxData is called after a sucess- full call to SoAd_TpTransmit, with a valid id and the info.SduLength is not set to 0, the DoIP module shall copy the bytes specified in the info.SduLength to the info->SduData Ptr, return BUFREQ_OK and set the parameter availableDataPtr to the total available data size of the current DoIP message after the copy process.

SWS_DoIP_00226 requirement

If the function DoIP_TpTransmit or DoIP_IfTransmit is called and the data package is not allowed according to the current DoIP protocol related infor- mation, the DoIP module shall return E_NOT_OK.

SWS_DoIP_00228 requirement

If the call to SoAd_TpTransmit returns for the use case "diag- nostic message" E_NOT_OK the DoIP module shall discard the DoIP message and, in case the DoIPPduType of the corresponding DoIPPduRTxPdu is DOIP_TPPDU, call the PduR_DoIPTpTxConfirmation with result set to E_NOT_OK.

SWS_DoIP_00229 requirement

If the function DoIP_SoAdTpTxConfirmation is called the DoIP module shall release the buffer related to the id.

SWS_DoIP_00230 requirement

If the function DoIP_TpTransmit or DoIP_IfTransmit is called and the data package is allowed to be sent according to the current DoIP protocol related information, the DoIP module shall return E_OK. 1.) If the connection to the SoAd is idle, the DoIP shall call the SoAd_TpTransmit function according to [SWS_DoIP_00284]. 2.) If the connection to the SoAd is not idle, the DoIP shall store the transmission request and call SoAd_TpTransmit according to [SWS_DoIP_00284] as soon as the connection is idle again.

SWS_DoIP_00231 requirement

If the function DoIP_SoAdCopyTxData is called after a sucess- full call to SoAd_TpTransmit for the use case "diagnostic message", with a valid id and the info.SduLength is set to 0 the DoIP shall return BUFREQ_OK and set the pa- rameter availableDataPtr to the total available data size of the current buffered DoIP message to be transmitted.

SWS_DoIP_00232 requirement

If the function DoIP_SoAdCopyTxData is called after a sucess- full call to SoAd_TpTransmit for the use case "diagnostic message" with a valid id and the info.SduLength is not set to 0, the DoIP module shall copy the bytes specified in the info.SduLength to the info->SduDataPtr. If the requested bytes are more than in the Do IP internal buffer, the DoIP shall call the PduR_DoIPTpCopyTxData with the info.Sdu Length set to the remaining requested data bytes and the info-> SduDataPtr set to the position where the PduR shall continue to copy the data.

SWS_DoIP_00233 requirement

If the DoIP module has copied via subsequent calls to DoIP_So AdTpCopyTxData for the use case "diagnostic message" all information stored in the DoIP internal buffer, the DoIP module shall forward all subsequent calls to DoIP_SoAd TpCopyTxData/DoIP_SoAdTpTxConfirmation for this transmission directly to the PduR using PduR_DoIPTpCopyTxData/PduR_DoIPTpTxConfirmation in case the DoIPPdu RTxPdu is DOIP_TPPDU and PduR_DoIPIfTxConfirmation otherwise, and release the internal buffer for this transmission.

SWS_DoIP_00234 requirement

If the Activation Line status of a DoIPInterface switches to "inac- tive", the DoIP module shall shall loop over all DoIPTcpConnection, DoIPUdpConnec- tion, and DoIPUdpVehicleAnnouncementConnections. For each of these DoIPCon- nections the DoIP module shall retrieve the corresponding SoConId via call to the So Ad_GetSoConId and close all the connection by a call to SoAd_CloseSoCon with the retrieved SoConId.

SWS_DoIP_00235 requirement

In addition to [SWS_DoIP_00234], the DoIP module shall re- lease the corresponding IP Address assignment via the call to SoAd_ReleaseIpAddr Assignment for those connections, which belong to the DoIPInterface for which the Ac- tivation Line status switched to "inactive", that have DoIPRequestAddressAssignment set to true.

SWS_DoIP_00241 requirement

If the DoIP module is called with DoIP_SoConModeChg and the Mode set to SOAD_SOCON_ONLINE the state of the socket connection shall be considered as online and the DoIP module shall behave as described in [SWS_DoIP_00143].

SWS_DoIP_00242 requirement

⌊ OBSOLETE g Name DoIPActivationLineStatus (obsolete) Comment – Tags: atp.Status=obsolete IsService true Variation – ModeGroup currentDoIPActivationLineStatus DoIP_ActivationLineType

SWS_DoIP_00243 requirement

If the DoIP module is called with DoIP_SoConModeChg and the Mode set to something else than SOAD_SOCON_ONLINE the state of the socket con- nection shall be considered as offline and the DoIP module shall behave as described in [SWS_DoIP_00115].

SWS_DoIP_00246 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00247 requirement

If development error detection is enabled: The function shall check if the RxPduId matches a configured DoIPSoAdUdpRxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

SWS_DoIP_00248 requirement

If development error detection is enabled: The function shall check the validity of the PduInfoPtr and call the DET with DOIP_E_PARAM_POINTER error id if it is a NULL_PTR.

SWS_DoIP_00249 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00250 requirement

If development error detection is enabled: The function shall check if the TxPduId matches a configured DoIPSoAdUdpTxPduId. If the check fails the function shall raise the development error DOIP_E_INVALID_PDU_SDU_ID.

SWS_DoIP_00253 requirement

If the buffer size reported by PduR_DoIPTpStartOfReception does not suffice for already received data, DoIP shall abort the reception and call Pdu R_DoIPTpRxIndication with E_NOT_OK.

SWS_DoIP_00254 requirement

If the call to PduR_DoIPTpCopyTxData returns BUFREQ_OK or all the requested data was part of the DoIP internal buffer, the DoIP module shall return BUFREQ_OK and set the parameter availableDataPtr to the remaining data size of the DoIP header and diagnostic SourceAddress/TargetAddress if they have not been copied completely or to the remaining data size returned from PduR_DoIPTpCopyTx Data.

SWS_DoIP_00257 requirement

If the DoIP module is called with DoIP_TpCancelTransmit or Do IP_IfCancelTransmit, the DoIP module shall call the SoAd_TpCancelTransmit function of the according SoAdTxPduId.

SWS_DoIP_00258 requirement

If the DoIP module is called with DoIP_TpCancelReceive, the DoIP module shall call the SoAd_TpCancelReceive function with the RxPduId that is retrieved via the according configured DoIPSoAdTcpRxPduRef.

SWS_DoIP_00259 requirement

At the end of the copy procedure via PduR_DoIPTpCopyRxData to PduR, the DoIP module has to modify the available buffer size pointer returned to SoAd in order to stop before the next DoIP header.

SWS_DoIP_00260 requirement

If PduR_DoIPTpStartOfReception returns BUFREQ_OK the re- ception was accepted and the DoIP module shall forward already received data of the diagnostic message to the upper layer by subsequent calls to PduR_DoIPTpCopyRx Data.

SWS_DoIP_00261 requirement

Variation {ecuc(DoIP/DoIPGeneral/DoIPPowerModeCallback/DoIPPowerModeDirect)} == NULL

SWS_DoIP_00262 requirement

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

SWS_DoIP_00263 requirement

Variation ({ecuc(DoIP/DoIPGeneral/DoIPTriggerGidSyncCallback)} != NULL) && ({ecuc(DoIP/DoIPGeneral/ DoIPTriggerGidSyncCallback/DoIPTriggerGidSyncDirect)} == NULL) && ({ecuc(DoIP/Do IPGeneral/DoIPVinGidMaster)} == TRUE)

SWS_DoIP_00264 requirement

Variation ({ecuc(DoIP/DoIPGeneral/DoIPGetGidCallback)} != NULL) && ({ecuc(DoIP/DoIPGeneral/DoIPGet GidCallback/DoIPGetGidDirect)} == NULL)

SWS_DoIP_00265 requirement

Tags: atp.Status=obsolete Variation –

SWS_DoIP_00271 requirement

Tags: atp.Status=obsolete

SWS_DoIP_00272 requirement

The value of DOIP_E_PENDING shall be 0x10.

SWS_DoIP_00274 requirement

If the DoIPRoutingActivationConfirmationCallback returns E_ NOT_OK, the DoIP module shall send a routing activation response message with the activation response code set to 0x05 and the socket connection shall be closed as defined in [SWS_DoIP_00058].

SWS_DoIP_00276 requirement

If DoIP receives more UDP requests on a connection than the configured amount of DoIPMaxUDPRequestPerConnection, only DoIPMaxUDPRe- questPerConnection requests (including the request that has just been accepted) shall be processed and responded. DoIP shall silently discard the request messages that cannot be processed.

SWS_DoIP_00279 requirement

If the DoIPPduType of a DoIPPduRTxPdu is DOIP_IFPDU, the content of the PDU provided by DoIP_IfTransmit shall be stored completely in the Do IP internal buffer. If the buffer is too small, E_NOT_OK shall be returned immediately.

SWS_DoIP_00282 requirement

Runtime Error Types Type of Error Relevance Related Error Code Value [hex] Runtime Runtime Runtime Runtime Runtime

SWS_DoIP_00283 requirement

Transient Fault Types Type of Error Releva nce Related Error Code Value [hex] Transient Transient Transient Transient Transient

SWS_DoIP_00284 requirement

To transmit a DoIP diagnostic message the DoIP shall assemble the DoIP header considering the information of the handed PduInfoPtr.SduLength and call SoAd_TpTransmit with the TxPduId set to the according PduId of the socket con- nection and the PduInfoPtr.SduLength set to the sum of the following lengths: DoIP header (8 Byte), the DoIP diagnostic message specific data (4 Byte) and received length of the call to DoIP_TpTransmit or DoIP_IfTransmit (PduInfoPtr.SduLength).

SWS_DoIP_00285 requirement

If development error detection is enabled: The function shall check that the service DoIP_Init was previously called. If the check fails, the function shall raise the development error DOIP_E_UNINIT.

SWS_DoIP_00286 requirement

DoIP module shall consider the announcement successful and process DoIPVehicleAnnouncementCount if the SoAd calls the DoIP module via the interface DoIP_SoAdIfTxConfirmation with Result set to E_OK for the announcement related SoAd_IfTransmit() call i.e. if E_NOT_OK is returned for the last announcement message, it will not be considered an announcement.

SWS_DoIP_00289 requirement

Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPFurtherActionByteCallback/DoIPFurtherActionByte Direct)} == NULL

SWS_DoIP_00290 requirement

Name CallbackGetFurtherActionByte Comment – IsService true Variation {ecuc(DoIP/DoIPConfigSet/DoIPInterface/DoIPFurtherActionByteCallback/DoIPFurtherAction ByteDirect)} == NULL 0 E_OK Operation successful Possible Errors 1 E_NOT_OK Operation failed Operation GetFurtherActionByte Comment – Mapped to API <User>_DoIPGetFurtherActionByteCallback Variation – FurtherActionByte Type DoIP_FurtherActionByteType Direction OUT Comment – Parameters Variation – Possible Errors E_OK E_NOT_OK

SWS_DoIP_00291 requirement

The "Further action" byte of a vehicle identification response/ vehicle announcement message shall contain the 1 Byte value retrieved by a call to the configured DoIPFurtherActionByteCallback (if configured, for the signature see <User>_DoIPGetFurtherActionByteCallback, [SWS_DoIP_00288]). If the function re- turns E_OK, the "Further action" byte shall be set to the retrieved value of FurtherAction Byte. If the function returns E_NOT_OK, the "Further action" byte shall be set accord- ing to [SWS_DoIP_00082], [SWS_DoIP_00083] or [SWS_DoIP_00084].

SWS_DoIP_00292 requirement

If a DoIP message with payload Type 0x0000 is received on a configured DoIPUdpConnection or DoIPTcpConnection, the message shall be dis- carded.

SWS_DoIP_00293 requirement

If a DoIP message with payload Type 0x0004 is received on a configured DoIPUdpConnection, the message shall be discarded.

SWS_DoIP_00294 requirement

When receiving a routing activation request on a TCP connec- tion where DoIPTcpConnection/DoIPTcpConnectionSecurityRequired is not set or set to FALSE, the DoIP module shall search for a DoIPTester with an assigned container that matches DoIPTesterSA. If such a DoIPTester container was found and the match- ing DoIPRoutingActivation container (refer to [SWS_DoIP_00108]) has the attribute DoIPRoutingActivationSecurityRequired not set or set to FALSE, the connection will be established. If such a DoIPTester container was found and the matching DoIPRoutingActivation container (refer to [SWS_DoIP_00108]) has the attribute DoIPRoutingActivationSecu- rityRequired is set to TRUE, the connection shall be rejected with the response code "0x07".

SWS_DoIP_00295 requirement

When receiving a routing activation request on a TCP connec- tion where DoIPTcpConnection/DoIPTcpConnectionSecurityRequired set to TRUE, the DoIP module shall search for a DoIPTester with an assigned container that matches DoIPTesterSA. If such a DoIPTester container was found, the connection will be established.

SWS_DoIP_00296 requirement

For non activation line controlled DoIP Interfaces with DoIPIn- terfaceActLineCtrl = FALSE, DoIP shall establish the corresponding connections for these interfaces according to [SWS_DoIP_00306] in context of first call to DoIP_Main Function(). (SRS_Eth_00081, SRS_Eth_00028, SRS_Eth_00026).

SWS_DoIP_00297 requirement

For a DoIP Interface with DoIPInterfaceAnnouncementStart = DOIP_AUTOMATIC_ANNOUNCE, the DoIP module shall start Vehicle announcement according to [SWS_DoIP_00205].

SWS_DoIP_00298 requirement

For a DoIP Interface with DoIPInterfaceAnnouncementStart = DOIP_ONTRIGGER_ANNOUNCE, the sending of vehicle announcement only starts if DoIP_TriggerVehicleAnnouncement () has been called for that Interface.

SWS_DoIP_00299 requirement

If DoIP_TriggerVehicleAnnouncement() is called, but the corre- sponding socket is not yet ONLINE then the request shall be remembered and vehicle announcement shall be sent as soon as the socket goes ONLINE.

SWS_DoIP_00302 requirement

If development error detection is enabled DoIP_ ActivationLine Switch (InterfaceId,*Active) shall check if interface identified by InterfaceId actually ex- ists and DoIPInterfaceActLineCtrl is set to TRUE. If the check fails, the function shall raise the development error DOIP_E_INVALID_PARAMETER.

SWS_DoIP_00303 requirement

If development error detection is enabled call to DoIP_ Activa- tionLineSwitch shall check if the interface identified by InterfaceId actually exists. If the check fails, the function shall raise the development error DOIP_E_INVALID_PARAM- ETER.

SWS_DoIP_00304 requirement

If development error detection is enabled DoIP_ TriggerVehicle Announcement shall check if the interface identified by InterfaceId is configured with DoIPInterfaceActLineCtrl set to FALSE. If the check fails the function shall raise the development error DOIP_E_INVALID_PARAMETER.

SWS_DoIP_00305 requirement

If development error detection is enabled call to DoIP_ Trigger VehicleAnnouncement shall check if the interface identified by InterfaceId actually ex- ists. If the check fails, the function shall raise the development error DOIP_E_INVALID_ PARAMETER.

SWS_DoIP_00306 requirement

To open the socket connections (triggered by SWS_DoIP_00204 or SWS_DoIP_00296) of an DoIP interface the DoIP module shall loop over all its associated DoIPTcpConnection, DoIPUdpConnection and DoIPUdpVehicleAnnounce- mentConnections. For each DoIP connections belonging to respective DoIP Interfaces which has a DoIPRequestAddressAssignment set to true the DoIP module shall re- trieve the corresponding SoConId via call to the SoAd_GetSoConId() and trigger the IP Address assignment via subsequent calls to SoAd_RequestIpAddrAssignment() with the retrieved SoConId, LocalIpAddrPtr and DefaultRouterPtr set to NULL_PTR, Net- mask set to 0, and Type set to TCPIP_IPADDR_ASSIGNMENT_ALL. For each of these DoIP connections (irrespective of the value of DoIPRequestAddressAssignment) the DoIP module shall open the respective connection by an according call to SoAd_Open SoCon(). (SRS_Eth_00081, SRS_Eth_00028, SRS_Eth_00026).

SWS_DoIP_00310 requirement

If a UDP message contains more than one DoIP requests, Do IP shall process and respond to the first DoIP request and discard the remaining re- quests.

SWS_DoIP_00311 requirement

If PduR_DoIPTpStartOfReception returns BUFREQ_E_OVFL, the DoIP module shall send a diagnostic negative acknowledge message with the di- agnostic message negative acknowledge code set to 0x05 and discard all the TCP data until the next DoIP message.

SWS_DoIP_00358 requirement

If a connection needs to be reset based on DoIP specific be- havior, the DoIP module shall call the function SoAd_CloseSoCon with the parameter abort set to TRUE and the SoConId determined by a call to the function SoAd_Get SoConId for the corresponding DoIPSoAdTcpTxPdu. Additionally, the inactivity timer shall be stopped.