DEENESPTFRRUARHIKOZHNL

SAE J1939 Diagnostic Communication Manager (J1939Dcm)

ModulJ1939Dcm (SAE J1939 Diagnostic Communication Manager)
BSW-Modul-ID58
Standard-Header#include "J1939Dcm.h"
SWS-SpezifikationAUTOSAR_CP_SWS_SAEJ1939DiagnosticCommunicationManager.pdf, AUTOSAR_SWS_SAEJ1939DiagnosticCommunicationManager.pdf
Umfang186 Records · 31 Snippets
ClusterSAE J1939

SAE J1939 Diagnostic Communication Manager (J1939Dcm)

AUTOSAR Classic Communication Services-Modul SAE J1939 Diagnostic Communication Manager (J1939Dcm, Spezifikation: AUTOSAR_CP_SWS_SAEJ1939DiagnosticCommunicationManager.pdf, AUTOSAR_SWS_SAEJ1939DiagnosticCommunicationManager.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

دالة J1939Dcm_Init [SWS_J1939Dcm_00098] 📄 PDF

void J1939Dcm_Init(const J1939Dcm_ConfigType* configPtr);

This function initializes the J1939 Diagnostic Communication Manager.

دالة J1939Dcm_DeInit [SWS_J1939Dcm_00099] 📄 PDF

void J1939Dcm_DeInit(void);

This function resets the J1939 Diagnostic Communication Manager to the uninitialized state.

دالة J1939Dcm_RequestIndication [SWS_J1939Dcm_00101] 📄 PDF

void J1939Dcm_RequestIndication(uint8 node, NetworkHandleType channel, uint32 requestedPgn, const J1939Rm_ExtIdInfoType* extIdInfo, uint8 sourceAddress, uint8 destAddress, uint8 priority);

Indicates reception of a Request or Request2 PG.

دالة J1939Dcm_StartOfReception [SWS_J1939Dcm_00102] 📄 PDF

BufReq_ReturnType J1939Dcm_StartOfReception(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 Tp Sdu Leng th equal to 0.

دالة J1939Dcm_CopyRxData [SWS_J1939Dcm_00103] 📄 PDF

BufReq_ReturnType J1939Dcm_CopyRxData(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 b uffer Size Ptr.

دالة J1939Dcm_TpRxIndication [SWS_J1939Dcm_00104] 📄 PDF

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

دالة J1939Dcm_CopyTxData [SWS_J1939Dcm_00105] 📄 PDF

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

This function is called t o 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 - >Tp Data State is TP_ DATARETRY. In this case the function restarts to copy the data beginning at the offset from the current position indicated by retry - >Tx Tp Data Cnt. The size of the remaining data is written to the position indicated by available Data Ptr.

دالة J1939Dcm_TpTxConfirmation [SWS_J1939Dcm_00106] 📄 PDF

void J1939Dcm_TpTxConfirmation(PduIdType id, Std_ReturnType result);

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

دالة J1939Dcm_MainFunction [SWS_J1939Dcm_00107] 📄 PDF

void J1939Dcm_MainFunction(void);

Main function of the J1939 Diagnostic Communication Manager. Used for scheduling purposes and timeout supervision.

دالة J1939Dcm_DemTriggerOnDTCStatus [SWS_J1939Dcm_00122] 📄 PDF

void J1939Dcm_DemTriggerOnDTCStatus(uint32 DTC, uint8 ClientId);

Trigger for DM01 message that a UDS status chang e has happened.

دالة <Generic DMx Request Indication> [SWS_J1939Dcm_91001] 📄 PDF

void <Generic DMx Request Indication>(uint8 dmId, NetworkHandleType channel, uint8 sourceAddress, uint8 destAddress, uint8 priority);

Indicates reception of a Request or Request2 PG for an unsupported diagnostic message.

دالة <Generic DMx Copy Rx Data> [SWS_J1939Dcm_91002] 📄 PDF

BufReq_ReturnType <Generic DMx Copy Rx Data>(uint8 dmId, NetworkHandleType channel, const PduInfoType* info, PduLengthType* bufferSizePtr);

Service Name <Generic DMx Copy Rx Data> Syntax Buf Req_ Return Type <Generic DMx Copy Rx Data> ( uint8 dm Id, Network Handle Type channel, const Pdu Info Type* info, Pdu Length Type* buffer Size Ptr ) Sync/ Async Synchronous Reentrancy Non Reentrant Parameters (in) dm Id Number of the J1939 diagnostic message. channel Channel on which the message is received. info Provides the source buffer (Sdu Data Ptr) and the number of bytes to be copied (Sdu Length). An Sdu Length of 0 can be used to query the current amount of available buffer in the upper layer module. In this case, the Sdu Data Ptr may be a NULL_ PTR. Param eters (inout) None Parameters (out) buffer Size Ptr Available receive buffer after data has been copied. Return value Buf Req _ - Return - Type BUFREQ_ OK: Data copied successfully BUFREQ_ E_ NOT_ OK: Data was not copied because an error occurred. Descript ion This function is called to provide the received data of a diagnostic message segment to the upper layer. Each call to this function provides the next part of the diagnostic message data. The size of the remaining buffer is written to the position indic ated by buffer Size Ptr. Available via J1939Dcm.h

دالة <Generic DMx TxConfirmation> [SWS_J1939Dcm_91003] 📄 PDF

void <Generic DMx TxConfirmation>(uint8 dmId, NetworkHandleType channel, Std_ReturnType result);

Called after a diagnostic message has been transmitted, the result indicates whether the transmission was successful or not.

دالة <Generic DMx Start Of Reception> [SWS_J1939Dcm_91004] 📄 PDF

BufReq_ReturnType <Generic DMx Start Of Reception>(uint8 mId, NetworkHandleType channel, PduLengthType length, PduLengthType bufferSizePtr, uint8 sourceAddress, uint8 priority);

This function is called at the start of receiving an diagnostic message.

دالة <Generic DMx Copy Tx Data> [SWS_J1939Dcm_91005] 📄 PDF

BufReq_ReturnType <Generic DMx Copy Tx Data>(uint8 dmId, NetworkHandleType channel, const PduInfoType info, const RetryInfoType* retry, PduLengthType* availableDataPtr);

This function is called to acquire the transmit data of a diagnostic message segment. Each call to this function provides the next part of the diagnostic message data unles s retry - >Tp Data State is TP_ DATARETRY. In this case the function restarts to copy the data beginning at the offset from the current position indicated by retry - >Tx Tp Data Cnt. The size of the remaining data is written to the position indicated by availa ble Data Ptr.

دالة <Generic DMx RxIndication> [SWS_J1939Dcm_91006] 📄 PDF

void <Generic DMx RxIndication>(uint8* dmId, NetworkHandleType channel, Std_ReturnType result);

Called after a diagnostic message has been received, the result indicates whether the reception was successful or not.

نوع J1939Dcm_ConfigType [SWS_J1939Dcm_00111] 📄 PDF

This is the base type for the configuration of the J1939 Diagnostic Communication Manager. A pointer to an instance of this structure will be used in the initialization of the J1939 Diagnostic Communication Manager. The content of this structure is defined in chapter 10 Configuration specification.

نوع J1939Dcm_StateType [SWS_J1939Dcm_00123] 📄 PDF

This type represents the communication state of the J1939 Diagnostic Communication Manager. Available J1939Dcm.h via

requirement SWS_J1939DCM_00168 [SWS_J1939DCM_00168] 📄 PDF

The J1939DcmModeRule shall evaluate all referenced J1939DcmModeConditions and/or nested J1939DcmModeRules either by a logical AND in case J1939DcmLogicalOperator is set to J1939DCM_AND or b y a logical OR in case the J1939DcmLogicalOperator is set to J1939DCM_OR. In case only a single J1939DcmModeCondition or J1939DcmModeRule is referenced the J1939DcmLogicalOperator shall not be present and therefore not be used.

requirement SWS_J1939DCM_00169 [SWS_J1939DCM_00169] 📄 PDF

The J1939DcmSwcModeRef and J1939DcmBswModeRef of J1939 DcmMode Conditions shall evaluate if the referenced Mode - Declaration is set in case of J1939 DcmConditionType is set to J1939DCM_ EQUALS or is not set in case of J1939 DcmConditionType is set to J1939DCM_EQUALS_NOT.

requirement SWS_J1939DCM_00170 [SWS_J1939DCM_00170] 📄 PDF

The J1939DcmSwcSRDataEl ementRef of J1939DcmModeCondition shall be evaluated if the referenced data element (by J1939DcmExternalSRDataElementClass): • is equal to the value represented by the J1939DcmSwcSRDataElementValue in case of J1939 DcmConditionType is set to J1939DCM_ EQUALS • is unequal to the value represented by the J1939DcmSwcSRDataElementValue in case of J1939 DcmConditionType is set to J1939DCM_ EQUALS_NOT • is greater than the value represented by the J1939DcmSwcSRDataElementValue in case of J1939 DcmConditionType is set to J1939DCM_ GREATER_THAN • is greater than or equal to the value represented by the J1939DcmSwcSRDataElementValue in case of J1939 DcmConditionType is set to J1939DCM_ GREATER_OR_EQUAL • is less than the value represented by the J1939 DcmSwcSRDataElementValue in case of J1939 DcmConditionType is set to J1939DCM_ LESS_THAN • is less than or equal to the value represented by the J1939DcmSwcSRDataElementValue in case of J1939DcmConditionType is set to J1939DCM_ LESS_OR_EQUAL .

requirement SWS_J1939DCM_00171 [SWS_J1939DCM_00171] 📄 PDF

In case multiple J1939Dc mModeConditions are referenced within a J1939DcmModeRule they shall be evaluated in order of the index attributes of the EcucReferenceValues for J1939DcmArgumentRef .

requirement SWS_J1939DCM_00172 [SWS_J1939DCM_00172] 📄 PDF

The J1939Dcm shall create for commonly used ModeDeclarationGroupPrototype of each J1939DcmSwcModeRef of J1939DcmModeConditions a required mode switch port referencing this ModeDeclarationGroupPrototype. The name pattern of this port prototype shall be J1939DcmModeUser_<ModeDeclarationGroupPrototype>" in case the ModeDeclarationGroupPrototype short name is unique. Otherwise, the name pattern is implementation specific, except the required prefix "J1939 DcmModeUser_".

requirement SWS_J1939DCM_00173 [SWS_J1939DCM_00173] 📄 PDF

If the newly received D iagnostic Message is not allowed in the current mode condition (according to the con fi guration parameter J1939DcmDiagnosticMessageModeRul eRef ), the J19393Dcm shall ignore the current request.

requirement SWS_J1939Dcm_00002 [SWS_J1939Dcm_00002] 📄 PDF

A call to J1939Dcm_Init initializes all internal variables and sets the J1939 D iagnostic Communication Manager to the initialized state .

requirement SWS_J1939Dcm_00003 [SWS_J1939Dcm_00003] 📄 PDF

A call to J1939Dcm_DeInit sets the J1939 Diagnostic Communication Manager back to the uninitialized state.

requirement SWS_J1939Dcm_00006 [SWS_J1939Dcm_00006] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_RequestIndication shall check if the requestedPgn parameter address a configured DMx message ( J1939DcmDiagnosticMessageSupport and the corresponding PGN could be found in Table 1 column “ PGN (Hexadecimal)”). In case of an error, the function J1939Dcm_RequestIndication shall return without any effect and shall report the error to the Default Error Tracer with the er ror code J1939DCM_E_INVALID_PGN .

requirement SWS_J1939Dcm_00007 [SWS_J1939Dcm_00007] 📄 PDF

When J1939Dcm_Req uestIndication is called and the requested diagnostic message is supported (configured via DMx specific configuration switch in container J1939DcmDiagnosticMessageSupport ); the J1939 Diagnostic Communication Manager shall, except for DM 0 1 and DM35 message s (see 7.7.1 for DM01 and 7.7.20 for DM35 handling), lock the common buffer (of [SWS_J1939Dcm_00115] ) and start to process it with next execution of J1939Dcm_MainFunction.

requirement SWS_J1939Dcm_00008 [SWS_J1939Dcm_00008] 📄 PDF

When J1939Dcm_RequestIndication is called and any other diagnostic message (apart from DM01 and DM35 ) is currently processed, the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parame ters ‘ackCode’ set to J1939RM_ACK_CANNOT_RESPOND to send a negative acknowledgement (considering [SWS_J1939Dcm_00113] ).

requirement SWS_J1939Dcm_00009 [SWS_J1939Dcm_00009] 📄 PDF

For messages sent via TP (Size in Table is variable), the transmission is terminated when J1939Dcm_TpTxConfirmation is called after transmission of a requested message which has been accepted and processed according to [SWS_J1939Dcm_00007] , the J1939 Diagnostic Communication Manager shall then release the buffer of [SWS_J1939Dcm_00115] .

requirement SWS_J1939Dcm_00010 [SWS_J1939Dcm_00010] 📄 PDF

On start of DTC status sequence, the J1939 Diagnostic Communication Manager shall call the Dem_J1939DcmSetDTCFilter with the parameters ‘ DTCStatusFilter’ and ‘DTCKind’ defined by the DMx message that triggered the sequence, as well as the assigned ‘DemClient’ of the requested node .

requirement SWS_J1939Dcm_00011 [SWS_J1939Dcm_00011] 📄 PDF

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_OK , the values in parameter ‘LampStatus’ shall be encoded into the response message layout according to SAE J1939 - 73. The high byte is the Byte 1 in the response message. The low byte is the Byte 2 of the response message.

requirement SWS_J1939Dcm_00012 [SWS_J1939Dcm_00012] 📄 PDF

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreeze FrameFilter returns E_NOT_OK , the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

requirement SWS_J1939Dcm_00014 [SWS_J1939Dcm_00014] 📄 PDF

If the return ed value is DEM_FILTERED_OK, the parameter ‘J1939DTC’ and ‘OccurenceCounter’ shall be copied to the response message defined by the DMx message tha t triggered the sequence.

requirement SWS_J1939Dcm_00015 [SWS_J1939Dcm_00015] 📄 PDF

The J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939DcmGetNextFilteredDTC, except the maximum sequence counter threshold per MainFunction is reached (see J1939DcmMaxDTCsPerMainFunction ) or the return ed value is ‘ DEM_PENDING ’. In this case, the execution is postponed to the next J1939Dcm_MainFunctio n call.

requirement SWS_J1939Dcm_00016 [SWS_J1939Dcm_00016] 📄 PDF

If the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’ the J1939 Diagnostic Communication Manager shall call PduR_J1939DcmTransmit with the PduId of the requested message and set the destination address (via MetaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF, or to 0xFF (broadcast) for spontaneous DM1 messages.

requirement SWS_J1939Dcm_00017 [SWS_J1939Dcm_00017] 📄 PDF

On start of FreezeFrame sequence, the J1939 Diagnostic Communication Manager shall call the Dem_J1939DcmSetFreezeFrameFilter with the parameters ‘ FreezeFrameKind’ defined by the DMx message that triggered the sequence, as well as the assigned ‘DemClient’ of the requested ‘node’ .

requirement SWS_J1939Dcm_00018 [SWS_J1939Dcm_00018] 📄 PDF

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_NOT_OK , the J1939 Diagnostic Communication Manag er shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

requirement SWS_J1939Dcm_00020 [SWS_J1939Dcm_00020] 📄 PDF

If the return ed value is DEM_FILTERED_OK and the ‘ FreezeFrameKind ’ is set to ‘ DEM_J1939DCM_FREEZEFRAME ’ or ’ DEM_J1939DCM_EXPANDED_FREEZEFRAME ’, the parameter ‘BufSize’, ‘DestBuffer, ‘J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the response message layout according to SAE J1939 - 73.

requirement SWS_J1939Dcm_00021 [SWS_J1939Dcm_00021] 📄 PDF

The J1939 Diagno stic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939DcmGetNextFreezeFrame, except the maximum sequence counter threshold per MainFunction is reached (see J1939DcmMaxFreezeFramesPerMainFunction ) or the return ed value is ‘ DEM_PENDING ’.

requirement SWS_J1939Dcm_00022 [SWS_J1939Dcm_00022] 📄 PDF

If the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’ and the ‘ FreezeFrameKind ’ is set to ‘ DEM_J1939DCM_FREEZEFRAME ’ or ’ DEM_J1939DCM_EXPANDED_FREEZEFRAME ’ the J1939 Diagnostic Communication Manager shall trigger PduR_J1939DcmTransmit with the PduId of the requested message and set the destination address (via MetaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

requirement SWS_J1939Dcm_00023 [SWS_J1939Dcm_00023] 📄 PDF

On start of Ratio sequence, the J1939 Diagnostic Communication Manager shall call the Dem_J1939DcmSetRatioFilter with the assigned ‘DemClient’ of the requested ‘node’ .

requirement SWS_J1939Dcm_00024 [SWS_J1939Dcm_00024] 📄 PDF

In case the Dem_J1939DcmSetRatioFi lter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_OK , the values in parameter ‘ Ignition_Cycle_Counter ’ and ‘ OBD_Monitoring_Conditions_Encountered ’ shall be encoded into the response message layout according to SAE J1939 - 73.

requirement SWS_J1939Dcm_00025 [SWS_J1939Dcm_00025] 📄 PDF

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_NOT_OK , the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_ NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

requirement SWS_J1939Dcm_00027 [SWS_J1939Dcm_00027] 📄 PDF

[SWS_J1939Dcm_00027] ⌈If the returned value is E_OK, the parameters SPN, Nu- merator, and Denominator shall be copied to the response message defined by the DMx message that triggered the sequence.⌋

requirement SWS_J1939Dcm_00028 [SWS_J1939Dcm_00028] 📄 PDF

The J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939DcmGetNextFilteredRatio, except the maximum sequence counter threshold per MainFunction is reached (see J1939DcmMaxRatiosPerMainFunction ) or the retu rn ed value is ‘ DEM_PENDING ’.

requirement SWS_J1939Dcm_00029 [SWS_J1939Dcm_00029] 📄 PDF

If the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’ the J1939 Diagnostic Communication Manager shall call PduR_J1939DcmTransmit with the PduId of the requested message and set the destination address (via M etaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

requirement SWS_J1939Dcm_00030 [SWS_J1939Dcm_00030] 📄 PDF

On reception of request for DM01 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall lo ck the dedicated DM01 buffer and use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

requirement SWS_J1939Dcm_00031 [SWS_J1939Dcm_00031] 📄 PDF

The J1939 Diagnostic Communication Manager shall lock the dedicated DM01 buffer, collect all active DTCs and the summarized lamp status in this buffer, and transmit the DM01 message with a period of 1s as defined by [ SWS_J1939Dcm_00033] , [SWS_J1939Dcm_0 0032] , [SWS_J1939Dcm_00114] and [SWS_J1939Dcm_00034] .

requirement SWS_J1939Dcm_00032 [SWS_J1939Dcm_00032] 📄 PDF

When DEM calls J1939Dcm_DemTriggerOnDTCStatus , the DM01 message shall be transmitted (additionally to the regular periodic transmission) for the corresponding ‘node’ of the reported ‘DemClient’ for all configured channels, except J1939Dcm_DemTriggerOnDTCStatus for the same DTC is triggered more than once per second. The separate DM01 buffer shall be used .

requirement SWS_J1939Dcm_00033 [SWS_J1939Dcm_00033] 📄 PDF

The DM01 shall use for all configured DM1 messages (J1939DcmDmxSupport == J1939DCM_DM01_SUPPORT) on all nodes (J1939DcmNode) and on all cha nnels (J1939DcmDiagnosticMessageSupportChannelRef) the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

requirement SWS_J1939Dcm_00034 [SWS_J1939Dcm_00034] 📄 PDF

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM01 layout according to SAE J1939 - 73.

requirement SWS_J1939Dcm_00035 [SWS_J1939Dcm_00035] 📄 PDF

On reception of request for DM02 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to table Table 2

requirement SWS_J1939Dcm_00036 [SWS_J1939Dcm_00036] 📄 PDF

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM02 layout according to SAE J1939 - 73.

requirement SWS_J1939Dcm_00037 [SWS_J1939Dcm_00037] 📄 PDF

On reception of request for DM 0 3 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall trigger Dem_J1939DcmClearDTC with parameter DTCTypeFilter set to DEM_J1939DTC_CLEAR_PREVIOUSLY_ACTIVE.

requirement SWS_J1939Dcm_00038 [SWS_J1939Dcm_00038] 📄 PDF

If the return value of the function Dem_J1939DcmClearDTC is DEM _PENDING, the J1939 Diagnostic Communication Manager shall retrigger Dem_J1939DcmClearDTC (with parameter DTCTypeFilter set to DEM_J1939DTC_CLEAR_PREVIOUSLY_ACTIVE) in the next call of J1939Dcm_MainFunction.

requirement SWS_J1939Dcm_00041 [SWS_J1939Dcm_00041] 📄 PDF

On reception of request for DM 0 4 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter “ 7.6.2 FreezeFrame ” with the parameters ‘ FreezeFrameKind’ set to ‘ DEM_J1939DCM_FREEZEFRAME ’ .

requirement SWS_J1939Dcm_00042 [SWS_J1939Dcm_00042] 📄 PDF

On receptio n of request for DM05 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall call Dem_J1939DcmReadDiagnosticReadiness1 with the assigned ‘DemClient’ of the requested ‘node’ latest on next J19 39Dcm_MainFunction .

requirement SWS_J1939Dcm_00043 [SWS_J1939Dcm_00043] 📄 PDF

If the return value of Dem_J1939DcmReadDiagnosticReadiness1 is E_OK, t he return parameter ‘ DataValue’ shall be encoded into the DM 0 5 layout according to SAE J1939 - 73. Afterwards PduR_J1939DcmTransmit with the PduId of the requested message shall be called with the destination address (via MetaData) set according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

requirement SWS_J1939Dcm_00045 [SWS_J1939Dcm_00045] 📄 PDF

If the return value of Dem_J1939DcmReadDiagnosticReadiness1 is unequal E_OK, the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

requirement SWS_J1939Dcm_00046 [SWS_J1939Dcm_00046] 📄 PDF

On reception of request for DM 0 6 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

requirement SWS_J1939Dcm_00047 [SWS_J1939Dcm_00047] 📄 PDF

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM 0 6 layout according to SAE J1939 - 73.

requirement SWS_J1939Dcm_00048 [SWS_J1939Dcm_00048] 📄 PDF

On reception of request for DM11 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table 1 column "PGN (Hexadecimal)") the J1939 Diagnostic Communication Man ager shall trigger Dem_J1939DcmClearDTC with parameter DTCTypeFilter set to 'DEM_J1939DTC_CLEAR_ACTIVE' .

requirement SWS_J1939Dcm_00049 [SWS_J1939Dcm_00049] 📄 PDF

If return value of the function Dem_J193 9DcmClearDTC is DEM _PENDING, the J1939 Diagnostic Communication Manager shall retrigger Dem_J1939DcmClearDTC (with parameter DTCTypeFilter set to 'DEM_J1939DTC_CLEAR_ACTIVE') in the next call of J1939Dcm_MainFunction.

requirement SWS_J1939Dcm_00050 [SWS_J1939Dcm_00050] 📄 PDF

If the return value of the function Dem_J1939DcmClearDTC is E _OK, the J 1939 Diagnostic Communication Manager shall send a positive acknowledgement (PACK) by J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_POSITIVE .

requirement SWS_J1939Dcm_00051 [SWS_J1939Dcm_00051] 📄 PDF

If return value of the function Dem_J1939DcmClearDTC is other than E _OK, the J1939 Diagnostic Communication Manager shall send a negative acknowledgement (NACK) by J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE .

requirement SWS_J1939Dcm_00052 [SWS_J1939Dcm_00052] 📄 PDF

On reception of request for DM12 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

requirement SWS_J1939Dcm_00053 [SWS_J1939Dcm_00053] 📄 PDF

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM12 layout according to SAE J1939 - 73.

requirement SWS_J1939Dcm_00054 [SWS_J1939Dcm_00054] 📄 PDF

On reception of DM13 command message via call of J1939Dcm_RxIndication with parameter Rx PduId set to the configured J1939DcmRxPduId and the hold signal set to ‘not available’ , the J1939 Diagnostic Communication Manager shall start timeout supervision and call BswM_J1939DcmBroadcastStatus with the updated broadcast status information ; see also [SWS_J1939Dcm_00055] , [SWS_J1939Dcm_00056] , [SWS_J1939Dcm_00057] , and [SWS_J1939Dcm_00058] .

requirement SWS_J1939Dcm_00055 [SWS_J1939Dcm_00055] 📄 PDF

For network “Current Data Link”, the corresponding ComMChannelId of received DM13 command message determines the network bit reported to BswM .

requirement SWS_J1939Dcm_00056 [SWS_J1939Dcm_00056] 📄 PDF

A ‘Stop Broadcast’ shall result in a ‘0’ in the bit associated with the network in the broadcast status information provided to BswM.

requirement SWS_J1939Dcm_00057 [SWS_J1939Dcm_00057] 📄 PDF

A ‘Start Broadcast’ shall result in a ‘1’ in the bit associated with the network in the broadcast status information provided to BswM.

requirement SWS_J1939Dcm_00058 [SWS_J1939Dcm_00058] 📄 PDF

A ‘Don’t Care/take no action (leave as is)’ in the bit assoc iated with the network in the broadcast status information shall not update the J1939Dcm internal broadcast status information.

requirement SWS_J1939Dcm_00060 [SWS_J1939Dcm_00060] 📄 PDF

If the returned value is any value other than E_OK or E_NEXT, the J1939 Diagnostic Communication Manager shall send the acknowledgement by J1939Rm_SendAck with par ameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE (considering [SWS_J1939Dcm_00113] ).

requirement SWS_J1939Dcm_00061 [SWS_J1939Dcm_00061] 📄 PDF

If the returned value is E_NEXT, the J1939 Diagnostic Communication Manager shall encode the return parameter ‘CalibrationVerificationNumber’ and ‘CalibrationID’ into the DM19 layout according to SAE J1939 - 73. Afterwards the operation GetCalibrationVerificationNumber of port prototype J1939Dcm_CalibrationInformation shall be re - triggered to colle ct the next part of the CVN .

requirement SWS_J1939Dcm_00062 [SWS_J1939Dcm_00062] 📄 PDF

If the returned value is E_OK, the J1939 Diagnostic Communication Manager shall encode the return parameter ‘CalibrationVerificationNumber’ and ‘CalibrationID’ into the DM19 layout according to SAE J193 9 - 73. Afterwards PduR_J1939DcmTransmit with the PduId of the requested message shall be triggered and set the destination address (via MetaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

requirement SWS_J1939Dcm_00063 [SWS_J1939Dcm_00063] 📄 PDF

On reception of request for DM20 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter “ 7.6.3 Ratio ”.

requirement SWS_J1939Dcm_00065 [SWS_J1939Dcm_00065] 📄 PDF

If the return value of Dem_J1939DcmReadDiagnosticReadiness2 is E_OK, t he return parameter ‘ DataValue’ shall be encoded into the DM21 layout according to SAE J1939 - 73. Afterwards PduR_J1939DcmTransmit with the PduId of DM21 shall be triggered and the destination address shall be set (via MetaData) to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

requirement SWS_J1939Dcm_00067 [SWS_J1939Dcm_00067] 📄 PDF

If the return value of Dem_J1939DcmReadDiagnosticReadiness2 is unequal E_OK, the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

requirement SWS_J1939Dcm_00068 [SWS_J1939Dcm_00068] 📄 PDF

On reception of request for DM23 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnos tic Communication Manager shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

requirement SWS_J1939Dcm_00069 [SWS_J1939Dcm_00069] 📄 PDF

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM23 layout according to SAE J1939 - 73.

requirement SWS_J1939Dcm_00070 [SWS_J1939Dcm_00070] 📄 PDF

On reception of request for DM26 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnosti c Communication Manager shall call Dem_J1939DcmReadDiagnosticReadiness3 with the assigned ‘DemClient’ of the requested ‘node’ latest on next J1939Dcm_MainFunction cycle .

requirement SWS_J1939Dcm_00071 [SWS_J1939Dcm_00071] 📄 PDF

If the return value of Dem_J1939DcmReadDiagnosticReadiness3 i s E_OK, t he return parameter ‘ DataValue’ shall be encoded into the DM26 layout according to SAE J1939 - 73. Afterwards PduR_J1939DcmTransmit with the PduId of DM26 shall be triggered and the destination address (via MetaData) set according to the source addr ess of the request, or to 0xFF when the destination of the request was 0xFF.

requirement SWS_J1939Dcm_00073 [SWS_J1939Dcm_00073] 📄 PDF

If the return value of Dem_J1939DcmReadDiagnosticReadiness3 is unequal E_OK, the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

requirement SWS_J1939Dcm_00074 [SWS_J1939Dcm_00074] 📄 PDF

On reception of request for DM28 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

requirement SWS_J1939Dcm_00075 [SWS_J1939Dcm_00075] 📄 PDF

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM28 layout according to SAE J1939 - 73.

requirement SWS_J1939Dcm_00076 [SWS_J1939Dcm_00076] 📄 PDF

On reception of request for DM29 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN ( Hexadecimal)”) the J1939 Diagnostic Communication Manager shall call for each byte in the response message the Dem_J1939DcmSetDTCFilter with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ as defined by Table 3 .

requirement SWS_J1939Dcm_00077 [SWS_J1939Dcm_00077] 📄 PDF

After each call of Dem_J1939DcmSetDTCFilter, the J1939 Diagnostic Communication Manager shall call Dem_J1939DcmGetNumberOfFilteredDTC to get the current count of matching DTCs.

requirement SWS_J1939Dcm_00078 [SWS_J1939Dcm_00078] 📄 PDF

If the return ed value is DEM_NUMBER_OK, the J1939 Diagnostic Communication Manager shall copy the value of return parameter NumberOfFilteredDTC to the corresponding byte in the response message of DM29.

requirement SWS_J1939Dcm_00079 [SWS_J1939Dcm_00079] 📄 PDF

If the return ed value is DEM_NUMBER_PENDING, the J193 9 Diagnostic Communication Manager shall retrigger Dem_J1939DcmGetNumberOfFilteredDTC in the next call of J1939Dcm_MainFunction. The unused bytes 6 to 8 shall be set to 0xFF.

requirement SWS_J1939Dcm_00080 [SWS_J1939Dcm_00080] 📄 PDF

On reception of request for DM31 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall call the function Dem_ J1939DcmFirstDTCwithLampStatus to start the data streaming.

requirement SWS_J1939Dcm_00081 [SWS_J1939Dcm_00081] 📄 PDF

The return values ‘ J1939DTC’, ‘OccurenceCounter’ and ‘LampStatus’ of each function call Dem_ J1939DcmGetNextDTCwithLampStatus shall be subsequently encoded into the DM31 layout according to SA E J1939 - 73.

requirement SWS_J1939Dcm_00082 [SWS_J1939Dcm_00082] 📄 PDF

On reception of request for DM35 (call of J 1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall start to collect all immediate DTCs and the summarized lamp status using the separate DM35 buffer and transmit the DM35 message with a period of 1s until module shutdown.

requirement SWS_J1939Dcm_00083 [SWS_J1939Dcm_00083] 📄 PDF

The DM35 shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to table Table 2 .

requirement SWS_J1939Dcm_00084 [SWS_J1939Dcm_00084] 📄 PDF

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM35 layout according to SAE J1939 - 73.

requirement SWS_J1939Dcm_00085 [SWS_J1939Dcm_00085] 📄 PDF

Module Header File Imported Type Com Stack_ Types Com Stack_ Types.h Buf Req _ Return Type Com Stack_ Types.h Network Handle Type Com Stack_ Types.h Pdu Id Type Com Stack_ Types.h Pdu Info Type Com Stack_ Types.h Pdu Length Type Com Stack_ Types.h Retry Info Type Com Stack_ Types.h Tp Data State Type Dem Dem.h Dem _ J1939 Dcm D T C Status Filter Type Dem.h Dem _ J1939 Dcm Diagnostic Readiness1 Type Dem.h Dem _ J1939 Dcm Diagnostic Readiness2 Type Dem.h Dem _ J1939 Dcm Diagnostic Readiness3 Type Dem.h Dem _ J1939 Dcm Lamp Status Type Dem.h Dem _ J1939 Dcm Set Clear Filter Type Dem.h Dem _ J1939 Dcm Set Freeze Frame Filter Type Dem_ J1939Dcm.h Dem _ D T C Kind Type Rte_ Dem_ Type.h Dem _ D T C Origin Type J1939Rm Rte_ J1939Rm_ Type.h J1939 Rm _ Ack Code Rte_ J1939Rm_ Type.h J1939 Rm _ Ext Id Info Type Rte_ J1939Rm_ Type.h J1939 Rm _ Ext Id Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

requirement SWS_J1939Dcm_00089 [SWS_J1939Dcm_00089] 📄 PDF

On errors and exceptions, the J1939Dcm module shall not modify its current module state but shall simply report the error event.

requirement SWS_J1939Dcm_00090 [SWS_J1939Dcm_00090] 📄 PDF

Type of error Related error code Error value API service called with wrong PDU or SDU. J1939DCM_ E_ INVALID_ PDU_ SDU_ ID 0x01 API service called with or in a wrong state J1939DCM_ E_ INVALID_ STATE 0x06 API service called with wrong node parameter J1939DCM_ E_ INVALID_ NODE 0x08 API service called with wrong channel parameter J1939DCM_ E_ INVALID_ CHANNEL 0x0B API service called with wrong PGN parameter J1939DCM_ E_ INVALID_ PGN 0x0D API function called with a NULL Pointer J1939DCM_ E_ PARAM_ POINTER 0x11 J1939Dcm initialisation failed J1939DCM_ E_ INIT_ FAILED 0x14 API service used in un - initialized state J1939DCM_ E_ UNINIT 0x20 J1939Dcm_ Init used in initialized state J1939DCM_ E _ REINIT 0x21

requirement SWS_J1939Dcm_00091 [SWS_J1939Dcm_00091] 📄 PDF

T he configured DMx messages in J1939Dcm shall match the J1939RmUserPGN configured for J1939RmUserType J1939RM_USER_J1939DCM in J1939Rm.

requirement SWS_J1939Dcm_00092 [SWS_J1939Dcm_00092] 📄 PDF

For other bus types in the DM13 command message, if there is an adequate J1939DcmBusType the corresponding referenced ComMChannelId of J1939DcmComMChannelR ef shall represent the network bit in the NetworkMask reported to BswM. Otherwise the request is ignored .

requirement SWS_J1939Dcm_00094 [SWS_J1939Dcm_00094] 📄 PDF

If the return ed value is DEM_FILTERED_OK and the ‘ FreezeFrameKind ’ is set to ’ DEM_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME ’, the parameter ‘SPNSupported’ and ‘SPNDataLength‘ shall be encoded int o the response message layout according to SAE J1939 - 73 and the bit 1 ‘Supported in Expanded Freeze Frame’ in ‘SPN support type’ shall be set to 0 .

requirement SWS_J1939Dcm_00095 [SWS_J1939Dcm_00095] 📄 PDF

In addition to [SWS_J1939Dcm_00094] the bit 2 ‘Supported in Data Stream’ in ‘SPN support type’ shall be set to 0 in case the SPN is also contained in the list of configuration parameters J1939DcmSPNsInDataStream.

requirement SWS_J1939Dcm_00096 [SWS_J1939Dcm_00096] 📄 PDF

If the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’ and the ‘ FreezeFrameKind ’ is set to ’ DEM_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME ’ the J1939 Diagnostic Communication Manager shall add to the response message all SPNs which are only supported in J1939DcmSPNsIn DataStream and not in the ExpandedFreezFrame (returned by [SWS_J1939Dcm_00094] ). The bit 2 ‘Supported in Data Stream’ in ‘SPN support type’ sha ll be set to 0 and the ‘SPN Data Length’ shall be set to 0x00. Afterwards PduR_J1939DcmTransmit shall be triggered with the PduId of the requested message and set the destination address (via MetaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

requirement SWS_J1939Dcm_00097 [SWS_J1939Dcm_00097] 📄 PDF

Name J1939Dcm_ Calibration Information Comment -- Is Service true Variation {ecuc(J1939Dcm/ J1939Dcm Config Set/ J1939Dcm Node/ J1939Dcm Diagnostic Message Support.J1939Dcm Dmx Support)} == J1939Dcm Dm19Support Possible Errors 0 E_ OK Operation successful 1 E_ NOT_ READY E_ NOT_ READY is used if the CVN calculation is not finished yet. The tool needs to send the request again. 2 E_ NEXT E_ NEXT is used if the CVN calculation is finished, but not all CVNs returned yet. Operation Get Calibration Verification Number Comment -- Variation -- Parameters Calibration Verification Number Type uint32 Direction OUT Comment -- Variation -- Calibration ID Type Calibration I D Array Type Direction OUT Comment -- Variation -- Possible Errors E _ O K E _ N O T _ R E A D Y E _ N E X T

requirement SWS_J1939Dcm_00108 [SWS_J1939Dcm_00108] 📄 PDF

The frequency of invocations of J1939Dcm_MainFunction is determined by the configuration parameter J1939DcmMainFunctionPeriod.

requirement SWS_J1939Dcm_00113 [SWS_J1939Dcm_00113] 📄 PDF

When J1939Dcm_RequestIndication is called with destination address (destAddress) is set to the global address (0xff), the J1939Dcm shall not call J1939Rm_SendA ck to send an acknowledgement.

requirement SWS_J1939Dcm_00114 [SWS_J1939Dcm_00114] 📄 PDF

The J1939Dcm shall provide a buffer in size of J1939Dcm DM01 BufferSize for the parallel DM01 processing to support [SWS_J1939Dcm_00031] .

requirement SWS_J1939Dcm_00115 [SWS_J1939Dcm_00115] 📄 PDF

The J1939Dcm shall provide a buffer in size of J1939DcmCommonBufferSize for the common DMx message processing including a semaphore to lock the buffer to prevent a multiple usage of this buffer.

requirement SWS_J1939Dcm_00116 [SWS_J1939Dcm_00116] 📄 PDF

After transmission of configured DTCs in parameter J1939DcmDM01MaxDTCs [ ECUC_J1939Dcm_00050 : ] the transmission shall be stopped.

requirement SWS_J1939Dcm_00117 [SWS_J1939Dcm_00117] 📄 PDF

On reception of request for DM25 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter “ 7.6.2 FreezeFrame ” with the parameters ‘ FreezeFrameKind ’ set to ’ DEM_J1939DCM_EXPANDED_FREEZEFRAME ’ .

requirement SWS_J1939Dcm_00118 [SWS_J1939Dcm_00118] 📄 PDF

On reception of request for DM24 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter “ 7.6.2 FreezeFrame ” with the parameters ‘ FreezeFrameKind ’ set to ’ DEM_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME ’ .

requirement SWS_J1939Dcm_00120 [SWS_J1939Dcm_00120] 📄 PDF

The J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_ J1939DcmGetNextDTCwithLampStatus, except the maximum sequence counter threshold per MainFunction is reached (see J1939DcmMaxDTCsPerMainFunction ) or the return ed value is ‘ DEM_PENDING ’. In this case, the execution is postponed to the next J1939Dcm_MainFunction call.

requirement SWS_J1939Dcm_00121 [SWS_J1939Dcm_00121] 📄 PDF

If the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’ the J1939 Diagnostic Communication Manager shall call PduR_J1939DcmTransmit with the PduId of the requested message and set the destination address (via MetaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

requirement SWS_J1939Dcm_00129 [SWS_J1939Dcm_00129] 📄 PDF

The J1939Dcm shall maintain the broadcast status information of the DM13 command message. The initial value of the broadcast status information is the normal broadcasting mode f or all networks.

requirement SWS_J1939Dcm_00130 [SWS_J1939Dcm_00130] 📄 PDF

The J1939 Diagnostic Manager shall reject the state change by returning E_NOT_OK when the ‘newState’ is not in the valid range. If DET is enabled via J1939DcmDevErrorDetect, the DET error J1939DCM_E_INVALID_STATE shall be reported.

requirement SWS_J1939Dcm_00132 [SWS_J1939Dcm_00132] 📄 PDF

Bsw M _ J1939 Dcm - Broadcast Status Bsw M_ J1939Dcm.h This API tells the Bsw M the desired communication status of the available networks. The status will typically be activated via COM I - PDU group switches. Dem _ J1939 Dcm - Clear D T C Dem_ J1 939Dcm.h Clears the status of all event(s) related to the specified DTC(s), as well as all associated event memory entries for these event(s). Dem _ J1939 Dcm First - D T Cwith Lamp Status Dem_ J1939Dcm.h The function sets the filter to the first applicable DTC for the DM31 response for a specific node. Dem _ J1939 Dcm Get - Next D T Cwith Lamp - Status Dem_ J1939Dcm.h Gets the next filtered J1939 DTC for DM31 including current Lamp Status. Dem _ J1939 Dcm Get - Next Filtered D T C Dem_ J1939Dcm.h Gets the next filtered J1939 DTC. Dem _ J1939 Dcm Get - Next Filtered Ratio Dem_ J1939Dcm.h Gets the next filtered Ratio. Dem _ J1939 Dcm Get - Next Freeze Frame Dem_ J1939Dcm.h Gets next freeze frame d ata. The function stores the data in the provided Dest Buffer. Dem _ J1939 Dcm Get - Next S P N In Freeze - Frame Dem_ J1939Dcm.h Gets next SPN. Dem _ J1939 Dcm Get - Number Of Filtered D T - C Dem_ J1939Dcm.h Gets the number of currently filtered DTCs set by the function Dem_ J1939Dcm Set DTCFilter. Dem _ J1939 Dcm - Read Diagnostic - Readiness1 Dem_ J1939Dcm.h Service to report the value of Diagnostic Readiness 1 (DM05) computed by the Dem. Dem _ J1939 Dcm - Read Diagnostic - Readiness2 Dem_ J1939Dcm.h Service to report the value of Diagnostic Readiness 2 (DM21) computed by the Dem. Dem _ J1939 Dcm - Read Diagnostic - Readiness3 Dem_ J1939Dcm.h Service to report the value of Diagnostic Readiness 3 (DM26) computed by the Dem. Dem _ J1939 Dcm Set - D T C Filter Dem_ J1939Dcm.h The function sets the DTC filter for a specific node and returns the composite lamp status of the filtered DTCs. Dem _ J1939 Dcm Set - Freeze Frame Filter Dem_ J1939Dcm.h The function sets the Freeze F rame filter for a specific node. Dem _ J1939 Dcm Set - Ratio Filter Dem_ J1939Dcm.h The function sets the Ratio filter for a specific node and returns the corresponding Ignition Cycle Counter and General Denominator. Det _ Report Error Det.h Service to report development errors. J1939 Rm _ Send Ack J1939Rm.h Requests transmission of an Acknowledgement PG. Pdu R _ J1939 Dcm - Cancel Receive Pdu R_ J1939Dcm.h Requests cancellation of an ongoing reception of a PDU in a lower layer transport proto col module. Pdu R _ J1939 Dcm - Cancel Transmit Pdu R_ J1939Dcm.h Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module. Pdu R _ J1939 Dcm - Transmit Pdu R_ J1939Dcm.h Requests transmission of a PDU.

requirement SWS_J1939Dcm_00133 [SWS_J1939Dcm_00133] 📄 PDF

The J1939Dcm shall ensure that access to the DEM is strictly serialized, i.e. that only one DEM sequence is executed in parallel.

requirement SWS_J1939Dcm_00134 [SWS_J1939Dcm_00134] 📄 PDF

On reception of DM13 command message via call of J1939Dcm_RxIndication with parameter RxPduId set to the configured J1939DcmRxPduId and the hold signal set to ‘all devices’ or to ‘d evices whose broadcast state has been modified ’ , the J1939 Diagnostic Commu nication Manager shall restart timeout supervision .

requirement SWS_J1939Dcm_00135 [SWS_J1939Dcm_00135] 📄 PDF

When timeout occurs after 6 seconds without another DM13 message, all buses shall be set back to broadcast mode by calling BswM_J1939DcmBroadcastStatus with a broadcast status information where all buses are set to ‘1’ .

requirement SWS_J1939Dcm_00137 [SWS_J1939Dcm_00137] 📄 PDF

Port to retrieve the Calibration Verification Numbers (CVNs) from the application. Variation {ecuc(J1939Dcm/ J1939Dcm Config Set/ J1939Dcm Node/ J1939Dcm Diagnostic Message Support.J1939Dcm Dmx Support)} == J1939Dcm Dm19Support

requirement SWS_J1939Dcm_00138 [SWS_J1939Dcm_00138] 📄 PDF

When the interface J1939Dcm_RequestIndication is called while the J1939Dcm is in offline state (refer API J1939Dcm_SetState ) , the J1939 Diagnostic Communication Manager shall ignore the request message. Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

requirement SWS_J1939Dcm_00139 [SWS_J1939Dcm_00139] 📄 PDF

When the interface J1939Dcm_ Rx Indication is called while the J1939Dcm is in offline state (refer API J1939Dcm_SetState ) , the J1939 Diagnostic Communication Manager shall ignore the command message. Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

requirement SWS_J1939Dcm_00140 [SWS_J1939Dcm_00140] 📄 PDF

When the interface J1939Dcm_ StartOfReception is called while the J1939Dcm is in offline state (refer API J1939Dcm_SetState ) , the J1939 Diagnostic Communication Manage r shall reject this command message by returning BUFREQ_E_NOT_OK . Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

requirement SWS_J1939Dcm_00141 [SWS_J1939Dcm_00141] 📄 PDF

T he function J1939Dcm_ CopyRxData shall check if it is called out of context i.e. if the J1939Dcm is currently receiving a command message over TP protocol. In case of an error, the function J1939Dcm_ CopyRxData shall return BUFREQ_E_NOT_OK . Further a call to DET with parameter J1939DCM_E_INVALID_STAT E shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

requirement SWS_J1939Dcm_00142 [SWS_J1939Dcm_00142] 📄 PDF

T he function J1939Dcm_ TpRxIndication shall check if it is called out of context i.e. if the J1939Dcm is currently receiving a response message over TP protocol. In case of an error, the function J1939Dcm_ TpRxIndication shall return without any effect . Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

requirement SWS_J1939Dcm_00143 [SWS_J1939Dcm_00143] 📄 PDF

T he function J1939Dcm_ CopyTxData shall check if it is called out of context i.e. if the J1939Dcm is currently transmit ing a response message over TP protocol. In case of an error, the function J1939Dcm_ CopyTxData shall return BUFREQ_E_NOT_OK . Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

requirement SWS_J1939Dcm_00146 [SWS_J1939Dcm_00146] 📄 PDF

When the interface J1939Dcm_ TxConfirmation is called while the J1939Dcm is in offline state (refer API J1939Dcm_SetState ) , the J1939 Diagnostic Communication Manager shall release the buffer (of [SWS_J1939Dcm_00115] ) . Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

requirement SWS_J1939Dcm_00147 [SWS_J1939Dcm_00147] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is ena bled, the function J1939Dcm_SetState shall check if the node parameter is configured (J1939DcmNmNodeRef [ ECUC_J1939Dcm_00013 : ]). In case of an error, the function J1939Dcm_SetState shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_NODE.

requirement SWS_J1939Dcm_00148 [SWS_J1939Dcm_00148] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_SetState shall check if the channel parameter is configured (J1939DcmNodeChannelRef) for the req uested node parameter. In case of an error, the function J1939Dcm_SetState shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_CHANNEL

requirement SWS_J1939Dcm_00149 [SWS_J1939Dcm_00149] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_RequestIndication shall check if the node parameter is configured (J1939DcmNmNodeRef [ECUC_J1939Dcm_00013]). In case of an error, the function J1939Dcm_RequestIndication shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_I NVALID_NODE.

requirement SWS_J1939Dcm_00150 [SWS_J1939Dcm_00150] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm _RequestIndication shall check if the channel parameter is configured (J1939DcmNodeChannelRef) for the requested node parameter. In case of an error, the function J1939Dcm_RequestIndication shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_CHANNEL.

requirement SWS_J1939Dcm_00151 [SWS_J1939Dcm_00151] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_RxIndication shall check if the RxPduId parameter is not configured (J1939DcmRxPduId) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of an error, the function J1939Dcm_RxIndication shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID .

requirement SWS_J1939Dcm_00152 [SWS_J1939Dcm_00152] 📄 PDF

I f the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_StartOfReception shall check if the id parameter is not configured (J1939DcmRxPduId) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of an error, the function J1939Dcm_StartOfReception shall return with BUFREQ_E_NOT_OK and without any effect and shall report the error to t he Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID.

requirement SWS_J1939Dcm_00153 [SWS_J1939Dcm_00153] 📄 PDF

[SWS_J1939Dcm_00153] ⌈The function J1939Dcm_StartOfReception shall check if the TpSduLength parameter is smaller or equal as the configured buffer size (J1939DcmCommonBufferSize). In case of an error, the function J1939Dcm_ StartOfReception shall return with BUFREQ_E_OVFL.⌋

requirement SWS_J1939Dcm_00154 [SWS_J1939Dcm_00154] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_CopyRxData shall check if the id parameter is no t configured (J1939DcmRxPduId) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of an error, the function J1939Dcm_CopyRxData shall return with BUFREQ_E_NOT_OK and without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID.

requirement SWS_J1939Dcm_00155 [SWS_J1939Dcm_00155] 📄 PDF

[SWS_J1939Dcm_00155] Upstream requirements: SRS_BSW_00386 ⌈If the configuration parameter J1939DcmDevErrorDetect is enabled, the function J1939Dcm_StartOfReception shall check if the J1939Dcm is the right state to receive a command message over TP protocol. In case of an error, the function J1939Dcm_StartOfReception shall return with BUFREQ_E_NOT_OK without any ef- fect, and shall report the runtime error J1939DCM_E_INVALID_STATE.⌋

requirement SWS_J1939Dcm_00156 [SWS_J1939Dcm_00156] 📄 PDF

[SWS_J1939Dcm_00156] Upstream requirements: SRS_BSW_00386 ⌈If the configuration parameter J1939DcmDevErrorDetect is enabled, the function J1939Dcm_TpRxIndication shall check if the id pa- rameter is not configured (J1939DcmRxPduId) on any DMx message ( J1939DcmDiagnosticMessageSupport). In case of an error, the function J1939Dcm_TpRxIndication shall return and without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_ PDU_SDU_ID.⌋ Manager for SAE J1939

requirement SWS_J1939Dcm_00158 [SWS_J1939Dcm_00158] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_CopyTxData shall check if the id parameter is not configured (J1939DcmTxPduId) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of an er ror, the function J1939Dcm_CopyTxData shall return with BUFREQ_E_NOT_OK and without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID.

requirement SWS_J1939Dcm_00160 [SWS_J1939Dcm_00160] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_TpTxConfirmation shall check if the id parameter is not configured (J1939Dcm T xPduId) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of an error, the function J1939Dcm_TpTxConfirmation shall return and without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID.

requirement SWS_J1939Dcm_00161 [SWS_J1939Dcm_00161] 📄 PDF

T he function J1939Dcm_TpTxConfirmation shall check if it is called out of context i.e. if the J1939Dcm is currently transmit ting a response message over TP protocol. In case of an error, the function J1939Dcm_TpTxConfirmation shal l return and without any effect. Further a call to DET with param eter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

requirement SWS_J1939Dcm_00162 [SWS_J1939Dcm_00162] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enab led, the function J1939Dcm_ TxConfirmation shall check if the id parameter is not configured ( J1939DcmTxPduId ) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of a n error, the function J1939Dcm_ TxConfirmation shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID.

requirement SWS_J1939Dcm_00163 [SWS_J1939Dcm_00163] 📄 PDF

T he function J1939Dcm_TxConfirmation shall check if it is called out of context i.e. if the J1939Dcm is currently transmitting a response message over TP protocol. In case of an error, the function J1939Dcm_TxConfirmation shall return return without any effect . Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled .

requirement SWS_J1939Dcm_00164 [SWS_J1939Dcm_00164] 📄 PDF

For messages sent via IF (Size in Table is 8), the transmission is terminated when J1939Dcm_TxConfirmation is called after transmission of a requested message which has been accepted and processed according to [SWS_J1939Dcm_00007] . The J1939 Diagnostic Communication Manager shall then release the buffer of [SWS_J1939Dcm_00115] .

requirement SWS_J1939Dcm_00165 [SWS_J1939Dcm_00165] 📄 PDF

If the retur ned value is DEM_BUFFER_TOO_SMALL , the J1939Dcm shall report this error to the Default Error Tracer with the error code J1939DCM_E_BUFFER_TOO_SMALL , and shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ) .

requirement SWS_J1939Dcm_00177 [SWS_J1939Dcm_00177] 📄 PDF

[SWS_J1939Dcm_00177] Upstream requirements: RS_Diag_04112 ⌈While processing DM53, DM54, or DM55, the J1939Dcm shall call the DEM APIs Dem_ J1939DcmClearDTC and Dem_J1939DcmSetDTCFilter with the Dem_DTCOrig- inType corresponding to the DemUserDefinedMemory referenced by J1939Dcm ServiceOnlyDTCsMemoryDestinationRef.⌋ J1939Dcm/DEM interaction in the J1939Dcm:

requirement SWS_J1939Dcm_00178 [SWS_J1939Dcm_00178] 📄 PDF

On reception of request for DM53 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table 1 column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.5.1 ‘DTC status’ with the parameters ‘DTCStatusFilter’, 'DTCOrigin' and ‘DTCKi nd’ according to table Table 2

requirement SWS_J1939Dcm_00179 [SWS_J1939Dcm_00179] 📄 PDF

The return values ‘J1939DTC’ and ‘OccurrenceCounter’ shall be encoded into the DM53 layout accor ding to SAE J1939 - 73.

requirement SWS_J1939Dcm_00180 [SWS_J1939Dcm_00180] 📄 PDF

On reception of request for DM54 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table 1 column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.5.1 ‘DTC status’ with the parameters ‘DTCStatusFilter’, 'DTCOrigin' and ‘DTCKind’ according to table Table 2 .

requirement SWS_J1939Dcm_00181 [SWS_J1939Dcm_00181] 📄 PDF

The return values ‘J1939DTC’ and ‘OccurrenceCounter’ shall be encoded into the DM54 layout according to SAE J1939 - 73.

requirement SWS_J1939Dcm_00182 [SWS_J1939Dcm_00182] 📄 PDF

On reception of request for DM55 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table 1 column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall trigger Dem_J1939DcmClearDTC with parameter DTCTypeFilter set to DEM_J1939DTC_CLEAR_ACTIVE_AND_PREVIOUSLY_ACTIVE and DTCOrigin set to definition from J1939DcmServiceOnlyDTCsMemoryDestinationRef.

requirement SWS_J1939Dcm_00183 [SWS_J1939Dcm_00183] 📄 PDF

If the return value of the function Dem_J193 9DcmClearDTC is DEM _PENDING, the J1939 Diagnostic Communication Manager shall retrigger Dem_J1939DcmClearDTC (with parameter DT CTypeFilter set to DEM_J1939DTC_CLEAR_ACTIVE_AND_PREVIOUSLY_ACTIVE) in the next call of J1939Dcm_MainFunction.

requirement SWS_J1939Dcm_00184 [SWS_J1939Dcm_00184] 📄 PDF

If the return value of the function Dem_J1939DcmClearDTC is E _OK or DEM_PENDING , the J1939 Diagnostic Comm unication Manager shall send a positive acknowledgement (PACK) by J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_POSITIVE.

requirement SWS_J1939Dcm_00185 [SWS_J1939Dcm_00185] 📄 PDF

If return value is other than E _OK or DEM_PENDING, the J1939 Diagnostic Communic ation Manager shall send a negative acknowledgement (NACK) by J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE.

requirement SWS_J1939Dcm_00186 [SWS_J1939Dcm_00186] 📄 PDF

When the API J1939Dcm_StartOfReception is invoked with TpSduLength equal to 0, the value BUFREQ_E_NOT_OK shall be returned and no further action shall be taken .

requirement SWS_J1939Dcm_00193 [SWS_J1939Dcm_00193] 📄 PDF

DMx message with variable size are exchanged with the J1939Tp, using the TP API (PduR_J1939DcmTransmit, J1939Dcm_CopyTxData, J1939Dcm_TpTxConfirmation for transmission and J1939Dcm_StartOfReception, J1939Dcm_CopyRxData, J1939Dcm_TpRx Indication for reception). DMx message with a fixed size of 8 bytes are exchanged with the CanIf, using the IF API (PduR_J1939DcmTransmit, J1939Dcm_TxConfirmation for transmission and J1939Dcm_RxIndication for reception).

requirement SWS_J1939Dcm_00194 [SWS_J1939Dcm_00194] 📄 PDF

Meta data items of type CAN_ID_32 contain the source address in the fourth (least significant) byte.

requirement SWS_J1939Dcm_00195 [SWS_J1939Dcm_00195] 📄 PDF

Meta data items of type CAN_ID_32 contain the destination address in the third byte.

requirement SWS_J1939Dcm_00196 [SWS_J1939Dcm_00196] 📄 PDF

Meta data items of type CAN_ID_32 contain the priority in the bits 2 - 4 of the first (most significant) byte, where bit 0 is the least significant bit of a byte.

requirement SWS_J1939Dcm_00197 [SWS_J1939Dcm_00197] 📄 PDF

When PduR_J1939DcmTransmit returns anything but E_OK, or when J1939Dcm_TpTxConfirmation or J1939Dcm_TxConfirmation reports E_NOT_OK, the J1939Dcm shall retry the failed transmission from the next main function.

requirement SWS_J1939Dcm_00198 [SWS_J1939Dcm_00198] 📄 PDF

Type of error Related error code Error value Buffer too small J1939DCM_ E_ BUFFER_ TOO_ SMALL 0x0E

requirement SWS_J1939Dcm_00199 [SWS_J1939Dcm_00199] 📄 PDF

Det _ Report - Runtime Error Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called.

requirement SWS_J1939Dcm_00200 [SWS_J1939Dcm_00200] 📄 PDF

The J1939Dcm shall provide a buffer in size of J1939DcmDM35BufferSize for the parallel DM35 processing to support [SWS_J1939Dcm_00082] .

requirement SWS_J1939Dcm_00201 [SWS_J1939Dcm_00201] 📄 PDF

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_OK and the ‘FreezeFrameKind’ is set to ‘ DEM_J1939DCM_FREEZEFRAME ’ or ’ DEM_J1939DCM_EXPANDED_FREEZEFRAME ’, t he J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939D cmGetNextFreezeFrame, till the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’. The calls may spread over several calls of J1939Dcm_MainFunction.

requirement SWS_J1939Dcm_00202 [SWS_J1939Dcm_00202] 📄 PDF

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_OK and the ‘ FreezeFrameKind ’ is set to ’ DE M_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME ’, t he J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939DcmGetNextSPNInFreezeFrame, till the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’. The calls may spread over several calls of J1939Dcm_MainFunction.

requirement SWS_J1939Dcm_00203 [SWS_J1939Dcm_00203] 📄 PDF

The J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939DcmGetNextFilteredRatio, till the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’. The calls may spread over several calls of J1939Dcm_MainFunction.

requirement SWS_J1939Dcm_00204 [SWS_J1939Dcm_00204] 📄 PDF

If J1939DcmGenericDMxSupport is enabled, Requests for DMx messages that are not listed in Table 1 shall be forwarded via the callout configured as J1939DcmGenericDMxRequestFunction. They can be answered using J1939Dcm_ GenericDMxTransmit, which will trigger the callbacks configured via J193 9DcmGenericDMxCopyTxDataFunction and J1939DcmGenericDMxTxConfirmationFunction .

requirement SWS_J1939Dcm_00205 [SWS_J1939Dcm_00205] 📄 PDF

If J1939DcmGenericDMxSupport is enabled, received DMx messages that are not listed in Table 1 shall be forwarded to the application using the callbacks configured via J1939DcmGenericDMxStartOfReceptionFunction, J1939DcmGenericDMxCopyRxDataFunction, and J1939DcmGenericDMxRxIndicationFunction.

requirement SWS_J1939Dcm_00206 [SWS_J1939Dcm_00206] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_GenericDMxTransmit shall check if the dmId parameter address es a configured but unsupported DMx message ( J1939DcmDiagnosticMessageSupport that c annot be found in Table 1 ). In case of an error, the function J1939Dcm_GenericDMxTransmit shall return without any effect and shall report the error to the Default Error Trac er with the er ror code J1939DCM_E_INVALID_PGN .

requirement SWS_J1939Dcm_00207 [SWS_J1939Dcm_00207] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_GenericDMxTransmit shall check if the node parameter is configured (J1939DcmNmNodeRef [ ECUC_J1939Dcm_00013 : ]). In case of an error, the function J1939Dcm_GenericDMxTransmit shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_NODE .

requirement SWS_J1939Dcm_00208 [SWS_J1939Dcm_00208] 📄 PDF

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_GenericDMxTransmit shall check if the channel parameter is configured (J1939DcmNodeChannelRef) for the requested node parameter. In case of an error, the function J1939Dcm_GenericDMxTransmit shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_CHANNEL .

requirement SWS_J1939Dcm_00209 [SWS_J1939Dcm_00209] 📄 PDF

The diagnostic (DMx) messages that are supported by the J1939 Diagnostic Communicati on Manager are listed in Table 1 .

requirement SWS_J1939Dcm_00236 [SWS_J1939Dcm_00236] 📄 PDF

[SWS_J1939Dcm_00236].⌋() The common “DTC status” sequence is described in subsection 7.6.1.

requirement SWS_J1939Dcm_00238 [SWS_J1939Dcm_00238] 📄 PDF

[SWS_J1939Dcm_00238]) the J1939 Diagnostic Com- munication Manager shall use the common “DTC status” sequence with the pa- rameters DTCStatusFilter and DTCKind set according to the corresponding table columns in [SWS_J1939Dcm_00236].⌋() The common “DTC status” sequence is described in subsection 7.6.1.

requirement SWS_J1939Dcm_CONSTR_06203 [SWS_J1939Dcm_CONSTR_06203] 📄 PDF

[SWS_J1939Dcm_CONSTR_06203] ⌈The J1939DcmServiceOnlyDTCsMemoryDes- tinationRef shall reference an event memory assigned to the DemEventMemorySet of the current J1939DcmDemClientRef.⌋ Manager for SAE J1939

requirement SWS_J1939Dcm_CONSTR_6201 [SWS_J1939Dcm_CONSTR_6201] 📄 PDF

J1939DcmModeCondition shall have either a J1939DcmBswModeRef or a J1939DcmSwcModeRef or a J1939DcmSwcSRDataEl- ementRef as external reference.

requirement SWS_J1939Dcm_CONSTR_6202 [SWS_J1939Dcm_CONSTR_6202] 📄 PDF

The values J1939DCM_GREATER_ THAN, J1939DCM_GREATER_OR_EQUAL, J1939DCM_LESS_OR_EQUAL and J1939DCM_LESS_THAN shall not be used with a Mode reference (J1939DcmBsw ModeRef or J1939DcmSwcModeRef).

requirement SWS_J1939Dcm_CONSTR_6203 [SWS_J1939Dcm_CONSTR_6203] 📄 PDF

The J1939DcmServiceOnlyDTCsMemoryDesti- nationRef shall reference an event memory assigned to the DemEventMemorySet of the current J1939DcmDemClientRef.

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

Record
AUTOSAR/AP/record/CP_MOD_J1939Dcm
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_J1939Dcm@rel:R20-11#87a65e30
Content hash
87a65e30
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_SAEJ1939DiagnosticCommunicationManager.pdf#nameddest=SWS_J1939Dcm_00098

خريطة المواضيع

المتطلبات

162
SWS_J1939Dcm_00002SWS_J1939Dcm_00003SWS_J1939Dcm_00006SWS_J1939Dcm_00007SWS_J1939Dcm_00008SWS_J1939Dcm_00009SWS_J1939Dcm_00010SWS_J1939Dcm_00011SWS_J1939Dcm_00012SWS_J1939Dcm_00014SWS_J1939Dcm_00015SWS_J1939Dcm_00016SWS_J1939Dcm_00017SWS_J1939Dcm_00018SWS_J1939Dcm_00020SWS_J1939Dcm_00021SWS_J1939Dcm_00022SWS_J1939Dcm_00023SWS_J1939Dcm_00024SWS_J1939Dcm_00025SWS_J1939Dcm_00027SWS_J1939Dcm_00028SWS_J1939Dcm_00029SWS_J1939Dcm_00030SWS_J1939Dcm_00031SWS_J1939Dcm_00032SWS_J1939Dcm_00033SWS_J1939Dcm_00034SWS_J1939Dcm_00035SWS_J1939Dcm_00036SWS_J1939Dcm_00037SWS_J1939Dcm_00038SWS_J1939Dcm_00041SWS_J1939Dcm_00042SWS_J1939Dcm_00043SWS_J1939Dcm_00045SWS_J1939Dcm_00046SWS_J1939Dcm_00047SWS_J1939Dcm_00048SWS_J1939Dcm_00049SWS_J1939Dcm_00050SWS_J1939Dcm_00051SWS_J1939Dcm_00052SWS_J1939Dcm_00053SWS_J1939Dcm_00054SWS_J1939Dcm_00055SWS_J1939Dcm_00056SWS_J1939Dcm_00057SWS_J1939Dcm_00058SWS_J1939Dcm_00060SWS_J1939Dcm_00061SWS_J1939Dcm_00062SWS_J1939Dcm_00063SWS_J1939Dcm_00065SWS_J1939Dcm_00067SWS_J1939Dcm_00068SWS_J1939Dcm_00069SWS_J1939Dcm_00070SWS_J1939Dcm_00071SWS_J1939Dcm_00073SWS_J1939Dcm_00074SWS_J1939Dcm_00075SWS_J1939Dcm_00076SWS_J1939Dcm_00077SWS_J1939Dcm_00078SWS_J1939Dcm_00079SWS_J1939Dcm_00080SWS_J1939Dcm_00081SWS_J1939Dcm_00082SWS_J1939Dcm_00083SWS_J1939Dcm_00084SWS_J1939Dcm_00085SWS_J1939Dcm_00089SWS_J1939Dcm_00090SWS_J1939Dcm_00091SWS_J1939Dcm_00092SWS_J1939Dcm_00094SWS_J1939Dcm_00095SWS_J1939Dcm_00096SWS_J1939Dcm_00097SWS_J1939Dcm_00108SWS_J1939Dcm_00113SWS_J1939Dcm_00114SWS_J1939Dcm_00115SWS_J1939Dcm_00116SWS_J1939Dcm_00117SWS_J1939Dcm_00118SWS_J1939Dcm_00120SWS_J1939Dcm_00121SWS_J1939Dcm_00129SWS_J1939Dcm_00130SWS_J1939Dcm_00132SWS_J1939Dcm_00133SWS_J1939Dcm_00134SWS_J1939Dcm_00135SWS_J1939Dcm_00137SWS_J1939Dcm_00138SWS_J1939Dcm_00139SWS_J1939Dcm_00140SWS_J1939Dcm_00141SWS_J1939Dcm_00142SWS_J1939Dcm_00143SWS_J1939Dcm_00146SWS_J1939Dcm_00147SWS_J1939Dcm_00148SWS_J1939Dcm_00149SWS_J1939Dcm_00150SWS_J1939Dcm_00151SWS_J1939Dcm_00152SWS_J1939Dcm_00153SWS_J1939Dcm_00154SWS_J1939Dcm_00155SWS_J1939Dcm_00156SWS_J1939Dcm_00158SWS_J1939Dcm_00160SWS_J1939Dcm_00161SWS_J1939Dcm_00162SWS_J1939Dcm_00163SWS_J1939Dcm_00164SWS_J1939Dcm_00165SWS_J1939Dcm_00167SWS_J1939DCM_00168SWS_J1939DCM_00169SWS_J1939DCM_00170SWS_J1939DCM_00171SWS_J1939DCM_00172SWS_J1939DCM_00173SWS_J1939Dcm_00177SWS_J1939Dcm_00178SWS_J1939Dcm_00179SWS_J1939Dcm_00180SWS_J1939Dcm_00181SWS_J1939Dcm_00182SWS_J1939Dcm_00183SWS_J1939Dcm_00184SWS_J1939Dcm_00185SWS_J1939Dcm_00186SWS_J1939Dcm_00187SWS_J1939Dcm_00193SWS_J1939Dcm_00194SWS_J1939Dcm_00195SWS_J1939Dcm_00196SWS_J1939Dcm_00197SWS_J1939Dcm_00198SWS_J1939Dcm_00199SWS_J1939Dcm_00200SWS_J1939Dcm_00201SWS_J1939Dcm_00202SWS_J1939Dcm_00203SWS_J1939Dcm_00204SWS_J1939Dcm_00205SWS_J1939Dcm_00206SWS_J1939Dcm_00207SWS_J1939Dcm_00208SWS_J1939Dcm_00209SWS_J1939Dcm_00236SWS_J1939Dcm_00237SWS_J1939Dcm_00238SWS_J1939Dcm_CONSTR_06203SWS_J1939Dcm_CONSTR_6201SWS_J1939Dcm_CONSTR_6202SWS_J1939Dcm_CONSTR_6203

عرض التفاصيل

اختر عنصرًا من المخطط.

التهيئة والحالة

This function resets the J1939 Diagnostic Communication Manager to the uninitialized state.

void J1939Dcm_DeInit(void);

Returns the version information of this module.

void J1939Dcm_GetVersionInfo(Std_VersionInfoType* versioninfo);
J1939Dcm_Init دالة

This function initializes the J1939 Diagnostic Communication Manager.

void J1939Dcm_Init(const J1939Dcm_ConfigType* configPtr);

الخدمات

Trigger for DM01 message that a UDS status chang e has happened.

void J1939Dcm_DemTriggerOnDTCStatus(uint32 DTC, uint8 ClientId);

Requests transmission of a diagnostic message

Std_ReturnType J1939Dcm_GenericDMxTransmit(uint8 dmId, uint8 node, NetworkHandleType channel, uint8 destAddress, uint8 priority);

Indicates reception of a Request or Request2 PG.

void J1939Dcm_RequestIndication(uint8 node, NetworkHandleType channel, uint32 requestedPgn, const J1939Rm_ExtIdInfoType* extIdInfo, uint8 sourceAddress, uint8 destAddress, uint8 priority);

Changes the communication state of J1939Dcm to offline or online.

Std_ReturnType J1939Dcm_SetState(NetworkHandleType channel, uint8 node, J1939Dcm_StateType newState);

دوال الاستدعاء الراجع

Indication of a receive d PDU from a lower layer communication interface module.

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

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

void J1939Dcm_TpRxIndication(PduIdType id, Std_ReturnType result);

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

void J1939Dcm_TpTxConfirmation(PduIdType id, Std_ReturnType result);

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

void J1939Dcm_TxConfirmation(PduIdType TxPduId, Std_ReturnType result);

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

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

This function is called t o 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 - >Tp Data State is TP_ DATARETRY. In this case the function restarts to copy the data beginning at the offset from the current position indicated by retry - >Tx Tp Data Cnt. The size of the remaining data is written to the position indicated by available Data Ptr.

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

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

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

دوال Callout والواجهات المتوقعة

Service Name <Generic DMx Copy Rx Data> Syntax Buf Req_ Return Type <Generic DMx Copy Rx Data> ( uint8 dm Id, Network Handle Type channel, const Pdu Info Type* info, Pdu Length Type* buffer Size Ptr ) Sync/ Async Synchronous Reentrancy Non Reentrant Parameters (in) dm Id Number of the J1939 diagnostic message. channel Channel on which the message is received. info Provides the source buffer (Sdu Data Ptr) and the number of bytes to be copied (Sdu Length). An Sdu Length of 0 can be used to query the current amount of available buffer in the upper layer module. In this case, the Sdu Data Ptr may be a NULL_ PTR. Param eters (inout) None Parameters (out) buffer Size Ptr Available receive buffer after data has been copied. Return value Buf Req _ - Return - Type BUFREQ_ OK: Data copied successfully BUFREQ_ E_ NOT_ OK: Data was not copied because an error occurred. Descript ion This function is called to provide the received data of a diagnostic message segment to the upper layer. Each call to this function provides the next part of the diagnostic message data. The size of the remaining buffer is written to the position indic ated by buffer Size Ptr. Available via J1939Dcm.h

BufReq_ReturnType <Generic DMx Copy Rx Data>(uint8 dmId, NetworkHandleType channel, const PduInfoType* info, PduLengthType* bufferSizePtr);

This function is called to acquire the transmit data of a diagnostic message segment. Each call to this function provides the next part of the diagnostic message data unles s retry - >Tp Data State is TP_ DATARETRY. In this case the function restarts to copy the data beginning at the offset from the current position indicated by retry - >Tx Tp Data Cnt. The size of the remaining data is written to the position indicated by availa ble Data Ptr.

BufReq_ReturnType <Generic DMx Copy Tx Data>(uint8 dmId, NetworkHandleType channel, const PduInfoType info, const RetryInfoType* retry, PduLengthType* availableDataPtr);

Indicates reception of a Request or Request2 PG for an unsupported diagnostic message.

void <Generic DMx Request Indication>(uint8 dmId, NetworkHandleType channel, uint8 sourceAddress, uint8 destAddress, uint8 priority);

Called after a diagnostic message has been received, the result indicates whether the reception was successful or not.

void <Generic DMx RxIndication>(uint8* dmId, NetworkHandleType channel, Std_ReturnType result);

This function is called at the start of receiving an diagnostic message.

BufReq_ReturnType <Generic DMx Start Of Reception>(uint8 mId, NetworkHandleType channel, PduLengthType length, PduLengthType bufferSizePtr, uint8 sourceAddress, uint8 priority);

Called after a diagnostic message has been transmitted, the result indicates whether the transmission was successful or not.

void <Generic DMx TxConfirmation>(uint8 dmId, NetworkHandleType channel, Std_ReturnType result);

دورية

Main function of the J1939 Diagnostic Communication Manager. Used for scheduling purposes and timeout supervision.

void J1939Dcm_MainFunction(void);

الأنواع

- Variation --

This is the base type for the configuration of the J1939 Diagnostic Communication Manager. A pointer to an instance of this structure will be used in the initialization of the J1939 Diagnostic Communication Manager. The content of this structure is defined in chapter 10 Configuration specification.

This type represents the communication state of the J1939 Diagnostic Communication Manager. Available J1939Dcm.h via

المتطلبات

SWS_J1939Dcm_00002 requirement

A call to J1939Dcm_Init initializes all internal variables and sets the J1939 D iagnostic Communication Manager to the initialized state .

SWS_J1939Dcm_00003 requirement

A call to J1939Dcm_DeInit sets the J1939 Diagnostic Communication Manager back to the uninitialized state.

SWS_J1939Dcm_00006 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_RequestIndication shall check if the requestedPgn parameter address a configured DMx message ( J1939DcmDiagnosticMessageSupport and the corresponding PGN could be found in Table 1 column “ PGN (Hexadecimal)”). In case of an error, the function J1939Dcm_RequestIndication shall return without any effect and shall report the error to the Default Error Tracer with the er ror code J1939DCM_E_INVALID_PGN .

SWS_J1939Dcm_00007 requirement

When J1939Dcm_Req uestIndication is called and the requested diagnostic message is supported (configured via DMx specific configuration switch in container J1939DcmDiagnosticMessageSupport ); the J1939 Diagnostic Communication Manager shall, except for DM 0 1 and DM35 message s (see 7.7.1 for DM01 and 7.7.20 for DM35 handling), lock the common buffer (of [SWS_J1939Dcm_00115] ) and start to process it with next execution of J1939Dcm_MainFunction.

SWS_J1939Dcm_00008 requirement

When J1939Dcm_RequestIndication is called and any other diagnostic message (apart from DM01 and DM35 ) is currently processed, the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parame ters ‘ackCode’ set to J1939RM_ACK_CANNOT_RESPOND to send a negative acknowledgement (considering [SWS_J1939Dcm_00113] ).

SWS_J1939Dcm_00009 requirement

For messages sent via TP (Size in Table is variable), the transmission is terminated when J1939Dcm_TpTxConfirmation is called after transmission of a requested message which has been accepted and processed according to [SWS_J1939Dcm_00007] , the J1939 Diagnostic Communication Manager shall then release the buffer of [SWS_J1939Dcm_00115] .

SWS_J1939Dcm_00010 requirement

On start of DTC status sequence, the J1939 Diagnostic Communication Manager shall call the Dem_J1939DcmSetDTCFilter with the parameters ‘ DTCStatusFilter’ and ‘DTCKind’ defined by the DMx message that triggered the sequence, as well as the assigned ‘DemClient’ of the requested node .

SWS_J1939Dcm_00011 requirement

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_OK , the values in parameter ‘LampStatus’ shall be encoded into the response message layout according to SAE J1939 - 73. The high byte is the Byte 1 in the response message. The low byte is the Byte 2 of the response message.

SWS_J1939Dcm_00012 requirement

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreeze FrameFilter returns E_NOT_OK , the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

SWS_J1939Dcm_00014 requirement

If the return ed value is DEM_FILTERED_OK, the parameter ‘J1939DTC’ and ‘OccurenceCounter’ shall be copied to the response message defined by the DMx message tha t triggered the sequence.

SWS_J1939Dcm_00015 requirement

The J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939DcmGetNextFilteredDTC, except the maximum sequence counter threshold per MainFunction is reached (see J1939DcmMaxDTCsPerMainFunction ) or the return ed value is ‘ DEM_PENDING ’. In this case, the execution is postponed to the next J1939Dcm_MainFunctio n call.

SWS_J1939Dcm_00016 requirement

If the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’ the J1939 Diagnostic Communication Manager shall call PduR_J1939DcmTransmit with the PduId of the requested message and set the destination address (via MetaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF, or to 0xFF (broadcast) for spontaneous DM1 messages.

SWS_J1939Dcm_00017 requirement

On start of FreezeFrame sequence, the J1939 Diagnostic Communication Manager shall call the Dem_J1939DcmSetFreezeFrameFilter with the parameters ‘ FreezeFrameKind’ defined by the DMx message that triggered the sequence, as well as the assigned ‘DemClient’ of the requested ‘node’ .

SWS_J1939Dcm_00018 requirement

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_NOT_OK , the J1939 Diagnostic Communication Manag er shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

SWS_J1939Dcm_00020 requirement

If the return ed value is DEM_FILTERED_OK and the ‘ FreezeFrameKind ’ is set to ‘ DEM_J1939DCM_FREEZEFRAME ’ or ’ DEM_J1939DCM_EXPANDED_FREEZEFRAME ’, the parameter ‘BufSize’, ‘DestBuffer, ‘J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the response message layout according to SAE J1939 - 73.

SWS_J1939Dcm_00021 requirement

The J1939 Diagno stic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939DcmGetNextFreezeFrame, except the maximum sequence counter threshold per MainFunction is reached (see J1939DcmMaxFreezeFramesPerMainFunction ) or the return ed value is ‘ DEM_PENDING ’.

SWS_J1939Dcm_00022 requirement

If the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’ and the ‘ FreezeFrameKind ’ is set to ‘ DEM_J1939DCM_FREEZEFRAME ’ or ’ DEM_J1939DCM_EXPANDED_FREEZEFRAME ’ the J1939 Diagnostic Communication Manager shall trigger PduR_J1939DcmTransmit with the PduId of the requested message and set the destination address (via MetaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

SWS_J1939Dcm_00023 requirement

On start of Ratio sequence, the J1939 Diagnostic Communication Manager shall call the Dem_J1939DcmSetRatioFilter with the assigned ‘DemClient’ of the requested ‘node’ .

SWS_J1939Dcm_00024 requirement

In case the Dem_J1939DcmSetRatioFi lter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_OK , the values in parameter ‘ Ignition_Cycle_Counter ’ and ‘ OBD_Monitoring_Conditions_Encountered ’ shall be encoded into the response message layout according to SAE J1939 - 73.

SWS_J1939Dcm_00025 requirement

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_NOT_OK , the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_ NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

SWS_J1939Dcm_00027 requirement

[SWS_J1939Dcm_00027] ⌈If the returned value is E_OK, the parameters SPN, Nu- merator, and Denominator shall be copied to the response message defined by the DMx message that triggered the sequence.⌋

SWS_J1939Dcm_00028 requirement

The J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939DcmGetNextFilteredRatio, except the maximum sequence counter threshold per MainFunction is reached (see J1939DcmMaxRatiosPerMainFunction ) or the retu rn ed value is ‘ DEM_PENDING ’.

SWS_J1939Dcm_00029 requirement

If the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’ the J1939 Diagnostic Communication Manager shall call PduR_J1939DcmTransmit with the PduId of the requested message and set the destination address (via M etaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

SWS_J1939Dcm_00030 requirement

On reception of request for DM01 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall lo ck the dedicated DM01 buffer and use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

SWS_J1939Dcm_00031 requirement

The J1939 Diagnostic Communication Manager shall lock the dedicated DM01 buffer, collect all active DTCs and the summarized lamp status in this buffer, and transmit the DM01 message with a period of 1s as defined by [ SWS_J1939Dcm_00033] , [SWS_J1939Dcm_0 0032] , [SWS_J1939Dcm_00114] and [SWS_J1939Dcm_00034] .

SWS_J1939Dcm_00032 requirement

When DEM calls J1939Dcm_DemTriggerOnDTCStatus , the DM01 message shall be transmitted (additionally to the regular periodic transmission) for the corresponding ‘node’ of the reported ‘DemClient’ for all configured channels, except J1939Dcm_DemTriggerOnDTCStatus for the same DTC is triggered more than once per second. The separate DM01 buffer shall be used .

SWS_J1939Dcm_00033 requirement

The DM01 shall use for all configured DM1 messages (J1939DcmDmxSupport == J1939DCM_DM01_SUPPORT) on all nodes (J1939DcmNode) and on all cha nnels (J1939DcmDiagnosticMessageSupportChannelRef) the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

SWS_J1939Dcm_00034 requirement

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM01 layout according to SAE J1939 - 73.

SWS_J1939Dcm_00035 requirement

On reception of request for DM02 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to table Table 2

SWS_J1939Dcm_00036 requirement

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM02 layout according to SAE J1939 - 73.

SWS_J1939Dcm_00037 requirement

On reception of request for DM 0 3 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall trigger Dem_J1939DcmClearDTC with parameter DTCTypeFilter set to DEM_J1939DTC_CLEAR_PREVIOUSLY_ACTIVE.

SWS_J1939Dcm_00038 requirement

If the return value of the function Dem_J1939DcmClearDTC is DEM _PENDING, the J1939 Diagnostic Communication Manager shall retrigger Dem_J1939DcmClearDTC (with parameter DTCTypeFilter set to DEM_J1939DTC_CLEAR_PREVIOUSLY_ACTIVE) in the next call of J1939Dcm_MainFunction.

SWS_J1939Dcm_00041 requirement

On reception of request for DM 0 4 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter “ 7.6.2 FreezeFrame ” with the parameters ‘ FreezeFrameKind’ set to ‘ DEM_J1939DCM_FREEZEFRAME ’ .

SWS_J1939Dcm_00042 requirement

On receptio n of request for DM05 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall call Dem_J1939DcmReadDiagnosticReadiness1 with the assigned ‘DemClient’ of the requested ‘node’ latest on next J19 39Dcm_MainFunction .

SWS_J1939Dcm_00043 requirement

If the return value of Dem_J1939DcmReadDiagnosticReadiness1 is E_OK, t he return parameter ‘ DataValue’ shall be encoded into the DM 0 5 layout according to SAE J1939 - 73. Afterwards PduR_J1939DcmTransmit with the PduId of the requested message shall be called with the destination address (via MetaData) set according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

SWS_J1939Dcm_00045 requirement

If the return value of Dem_J1939DcmReadDiagnosticReadiness1 is unequal E_OK, the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

SWS_J1939Dcm_00046 requirement

On reception of request for DM 0 6 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

SWS_J1939Dcm_00047 requirement

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM 0 6 layout according to SAE J1939 - 73.

SWS_J1939Dcm_00048 requirement

On reception of request for DM11 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table 1 column "PGN (Hexadecimal)") the J1939 Diagnostic Communication Man ager shall trigger Dem_J1939DcmClearDTC with parameter DTCTypeFilter set to 'DEM_J1939DTC_CLEAR_ACTIVE' .

SWS_J1939Dcm_00049 requirement

If return value of the function Dem_J193 9DcmClearDTC is DEM _PENDING, the J1939 Diagnostic Communication Manager shall retrigger Dem_J1939DcmClearDTC (with parameter DTCTypeFilter set to 'DEM_J1939DTC_CLEAR_ACTIVE') in the next call of J1939Dcm_MainFunction.

SWS_J1939Dcm_00050 requirement

If the return value of the function Dem_J1939DcmClearDTC is E _OK, the J 1939 Diagnostic Communication Manager shall send a positive acknowledgement (PACK) by J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_POSITIVE .

SWS_J1939Dcm_00051 requirement

If return value of the function Dem_J1939DcmClearDTC is other than E _OK, the J1939 Diagnostic Communication Manager shall send a negative acknowledgement (NACK) by J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE .

SWS_J1939Dcm_00052 requirement

On reception of request for DM12 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

SWS_J1939Dcm_00053 requirement

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM12 layout according to SAE J1939 - 73.

SWS_J1939Dcm_00054 requirement

On reception of DM13 command message via call of J1939Dcm_RxIndication with parameter Rx PduId set to the configured J1939DcmRxPduId and the hold signal set to ‘not available’ , the J1939 Diagnostic Communication Manager shall start timeout supervision and call BswM_J1939DcmBroadcastStatus with the updated broadcast status information ; see also [SWS_J1939Dcm_00055] , [SWS_J1939Dcm_00056] , [SWS_J1939Dcm_00057] , and [SWS_J1939Dcm_00058] .

SWS_J1939Dcm_00055 requirement

For network “Current Data Link”, the corresponding ComMChannelId of received DM13 command message determines the network bit reported to BswM .

SWS_J1939Dcm_00056 requirement

A ‘Stop Broadcast’ shall result in a ‘0’ in the bit associated with the network in the broadcast status information provided to BswM.

SWS_J1939Dcm_00057 requirement

A ‘Start Broadcast’ shall result in a ‘1’ in the bit associated with the network in the broadcast status information provided to BswM.

SWS_J1939Dcm_00058 requirement

A ‘Don’t Care/take no action (leave as is)’ in the bit assoc iated with the network in the broadcast status information shall not update the J1939Dcm internal broadcast status information.

SWS_J1939Dcm_00060 requirement

If the returned value is any value other than E_OK or E_NEXT, the J1939 Diagnostic Communication Manager shall send the acknowledgement by J1939Rm_SendAck with par ameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE (considering [SWS_J1939Dcm_00113] ).

SWS_J1939Dcm_00061 requirement

If the returned value is E_NEXT, the J1939 Diagnostic Communication Manager shall encode the return parameter ‘CalibrationVerificationNumber’ and ‘CalibrationID’ into the DM19 layout according to SAE J1939 - 73. Afterwards the operation GetCalibrationVerificationNumber of port prototype J1939Dcm_CalibrationInformation shall be re - triggered to colle ct the next part of the CVN .

SWS_J1939Dcm_00062 requirement

If the returned value is E_OK, the J1939 Diagnostic Communication Manager shall encode the return parameter ‘CalibrationVerificationNumber’ and ‘CalibrationID’ into the DM19 layout according to SAE J193 9 - 73. Afterwards PduR_J1939DcmTransmit with the PduId of the requested message shall be triggered and set the destination address (via MetaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

SWS_J1939Dcm_00063 requirement

On reception of request for DM20 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter “ 7.6.3 Ratio ”.

SWS_J1939Dcm_00065 requirement

If the return value of Dem_J1939DcmReadDiagnosticReadiness2 is E_OK, t he return parameter ‘ DataValue’ shall be encoded into the DM21 layout according to SAE J1939 - 73. Afterwards PduR_J1939DcmTransmit with the PduId of DM21 shall be triggered and the destination address shall be set (via MetaData) to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

SWS_J1939Dcm_00067 requirement

If the return value of Dem_J1939DcmReadDiagnosticReadiness2 is unequal E_OK, the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

SWS_J1939Dcm_00068 requirement

On reception of request for DM23 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnos tic Communication Manager shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

SWS_J1939Dcm_00069 requirement

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM23 layout according to SAE J1939 - 73.

SWS_J1939Dcm_00070 requirement

On reception of request for DM26 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnosti c Communication Manager shall call Dem_J1939DcmReadDiagnosticReadiness3 with the assigned ‘DemClient’ of the requested ‘node’ latest on next J1939Dcm_MainFunction cycle .

SWS_J1939Dcm_00071 requirement

If the return value of Dem_J1939DcmReadDiagnosticReadiness3 i s E_OK, t he return parameter ‘ DataValue’ shall be encoded into the DM26 layout according to SAE J1939 - 73. Afterwards PduR_J1939DcmTransmit with the PduId of DM26 shall be triggered and the destination address (via MetaData) set according to the source addr ess of the request, or to 0xFF when the destination of the request was 0xFF.

SWS_J1939Dcm_00073 requirement

If the return value of Dem_J1939DcmReadDiagnosticReadiness3 is unequal E_OK, the J1939 Diagnostic Communication Manager shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ).

SWS_J1939Dcm_00074 requirement

On reception of request for DM28 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to Table 2 .

SWS_J1939Dcm_00075 requirement

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM28 layout according to SAE J1939 - 73.

SWS_J1939Dcm_00076 requirement

On reception of request for DM29 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN ( Hexadecimal)”) the J1939 Diagnostic Communication Manager shall call for each byte in the response message the Dem_J1939DcmSetDTCFilter with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ as defined by Table 3 .

SWS_J1939Dcm_00077 requirement

After each call of Dem_J1939DcmSetDTCFilter, the J1939 Diagnostic Communication Manager shall call Dem_J1939DcmGetNumberOfFilteredDTC to get the current count of matching DTCs.

SWS_J1939Dcm_00078 requirement

If the return ed value is DEM_NUMBER_OK, the J1939 Diagnostic Communication Manager shall copy the value of return parameter NumberOfFilteredDTC to the corresponding byte in the response message of DM29.

SWS_J1939Dcm_00079 requirement

If the return ed value is DEM_NUMBER_PENDING, the J193 9 Diagnostic Communication Manager shall retrigger Dem_J1939DcmGetNumberOfFilteredDTC in the next call of J1939Dcm_MainFunction. The unused bytes 6 to 8 shall be set to 0xFF.

SWS_J1939Dcm_00080 requirement

On reception of request for DM31 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall call the function Dem_ J1939DcmFirstDTCwithLampStatus to start the data streaming.

SWS_J1939Dcm_00081 requirement

The return values ‘ J1939DTC’, ‘OccurenceCounter’ and ‘LampStatus’ of each function call Dem_ J1939DcmGetNextDTCwithLampStatus shall be subsequently encoded into the DM31 layout according to SA E J1939 - 73.

SWS_J1939Dcm_00082 requirement

On reception of request for DM35 (call of J 1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall start to collect all immediate DTCs and the summarized lamp status using the separate DM35 buffer and transmit the DM35 message with a period of 1s until module shutdown.

SWS_J1939Dcm_00083 requirement

The DM35 shall use the common sequence of chapter 7.6.1 ‘ DTC status ’ with the parameters ‘ DTCStatusFilter ’ and ‘DTCKind’ according to table Table 2 .

SWS_J1939Dcm_00084 requirement

The return values ‘ J1939DTC’ and ‘OccurenceCounter’ shall be encoded into the DM35 layout according to SAE J1939 - 73.

SWS_J1939Dcm_00085 requirement

Module Header File Imported Type Com Stack_ Types Com Stack_ Types.h Buf Req _ Return Type Com Stack_ Types.h Network Handle Type Com Stack_ Types.h Pdu Id Type Com Stack_ Types.h Pdu Info Type Com Stack_ Types.h Pdu Length Type Com Stack_ Types.h Retry Info Type Com Stack_ Types.h Tp Data State Type Dem Dem.h Dem _ J1939 Dcm D T C Status Filter Type Dem.h Dem _ J1939 Dcm Diagnostic Readiness1 Type Dem.h Dem _ J1939 Dcm Diagnostic Readiness2 Type Dem.h Dem _ J1939 Dcm Diagnostic Readiness3 Type Dem.h Dem _ J1939 Dcm Lamp Status Type Dem.h Dem _ J1939 Dcm Set Clear Filter Type Dem.h Dem _ J1939 Dcm Set Freeze Frame Filter Type Dem_ J1939Dcm.h Dem _ D T C Kind Type Rte_ Dem_ Type.h Dem _ D T C Origin Type J1939Rm Rte_ J1939Rm_ Type.h J1939 Rm _ Ack Code Rte_ J1939Rm_ Type.h J1939 Rm _ Ext Id Info Type Rte_ J1939Rm_ Type.h J1939 Rm _ Ext Id Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

SWS_J1939Dcm_00089 requirement

On errors and exceptions, the J1939Dcm module shall not modify its current module state but shall simply report the error event.

SWS_J1939Dcm_00090 requirement

Type of error Related error code Error value API service called with wrong PDU or SDU. J1939DCM_ E_ INVALID_ PDU_ SDU_ ID 0x01 API service called with or in a wrong state J1939DCM_ E_ INVALID_ STATE 0x06 API service called with wrong node parameter J1939DCM_ E_ INVALID_ NODE 0x08 API service called with wrong channel parameter J1939DCM_ E_ INVALID_ CHANNEL 0x0B API service called with wrong PGN parameter J1939DCM_ E_ INVALID_ PGN 0x0D API function called with a NULL Pointer J1939DCM_ E_ PARAM_ POINTER 0x11 J1939Dcm initialisation failed J1939DCM_ E_ INIT_ FAILED 0x14 API service used in un - initialized state J1939DCM_ E_ UNINIT 0x20 J1939Dcm_ Init used in initialized state J1939DCM_ E _ REINIT 0x21

SWS_J1939Dcm_00091 requirement

T he configured DMx messages in J1939Dcm shall match the J1939RmUserPGN configured for J1939RmUserType J1939RM_USER_J1939DCM in J1939Rm.

SWS_J1939Dcm_00092 requirement

For other bus types in the DM13 command message, if there is an adequate J1939DcmBusType the corresponding referenced ComMChannelId of J1939DcmComMChannelR ef shall represent the network bit in the NetworkMask reported to BswM. Otherwise the request is ignored .

SWS_J1939Dcm_00094 requirement

If the return ed value is DEM_FILTERED_OK and the ‘ FreezeFrameKind ’ is set to ’ DEM_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME ’, the parameter ‘SPNSupported’ and ‘SPNDataLength‘ shall be encoded int o the response message layout according to SAE J1939 - 73 and the bit 1 ‘Supported in Expanded Freeze Frame’ in ‘SPN support type’ shall be set to 0 .

SWS_J1939Dcm_00095 requirement

In addition to [SWS_J1939Dcm_00094] the bit 2 ‘Supported in Data Stream’ in ‘SPN support type’ shall be set to 0 in case the SPN is also contained in the list of configuration parameters J1939DcmSPNsInDataStream.

SWS_J1939Dcm_00096 requirement

If the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’ and the ‘ FreezeFrameKind ’ is set to ’ DEM_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME ’ the J1939 Diagnostic Communication Manager shall add to the response message all SPNs which are only supported in J1939DcmSPNsIn DataStream and not in the ExpandedFreezFrame (returned by [SWS_J1939Dcm_00094] ). The bit 2 ‘Supported in Data Stream’ in ‘SPN support type’ sha ll be set to 0 and the ‘SPN Data Length’ shall be set to 0x00. Afterwards PduR_J1939DcmTransmit shall be triggered with the PduId of the requested message and set the destination address (via MetaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

SWS_J1939Dcm_00097 requirement

Name J1939Dcm_ Calibration Information Comment -- Is Service true Variation {ecuc(J1939Dcm/ J1939Dcm Config Set/ J1939Dcm Node/ J1939Dcm Diagnostic Message Support.J1939Dcm Dmx Support)} == J1939Dcm Dm19Support Possible Errors 0 E_ OK Operation successful 1 E_ NOT_ READY E_ NOT_ READY is used if the CVN calculation is not finished yet. The tool needs to send the request again. 2 E_ NEXT E_ NEXT is used if the CVN calculation is finished, but not all CVNs returned yet. Operation Get Calibration Verification Number Comment -- Variation -- Parameters Calibration Verification Number Type uint32 Direction OUT Comment -- Variation -- Calibration ID Type Calibration I D Array Type Direction OUT Comment -- Variation -- Possible Errors E _ O K E _ N O T _ R E A D Y E _ N E X T

SWS_J1939Dcm_00108 requirement

The frequency of invocations of J1939Dcm_MainFunction is determined by the configuration parameter J1939DcmMainFunctionPeriod.

SWS_J1939Dcm_00113 requirement

When J1939Dcm_RequestIndication is called with destination address (destAddress) is set to the global address (0xff), the J1939Dcm shall not call J1939Rm_SendA ck to send an acknowledgement.

SWS_J1939Dcm_00114 requirement

The J1939Dcm shall provide a buffer in size of J1939Dcm DM01 BufferSize for the parallel DM01 processing to support [SWS_J1939Dcm_00031] .

SWS_J1939Dcm_00115 requirement

The J1939Dcm shall provide a buffer in size of J1939DcmCommonBufferSize for the common DMx message processing including a semaphore to lock the buffer to prevent a multiple usage of this buffer.

SWS_J1939Dcm_00116 requirement

After transmission of configured DTCs in parameter J1939DcmDM01MaxDTCs [ ECUC_J1939Dcm_00050 : ] the transmission shall be stopped.

SWS_J1939Dcm_00117 requirement

On reception of request for DM25 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter “ 7.6.2 FreezeFrame ” with the parameters ‘ FreezeFrameKind ’ set to ’ DEM_J1939DCM_EXPANDED_FREEZEFRAME ’ .

SWS_J1939Dcm_00118 requirement

On reception of request for DM24 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter “ 7.6.2 FreezeFrame ” with the parameters ‘ FreezeFrameKind ’ set to ’ DEM_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME ’ .

SWS_J1939Dcm_00120 requirement

The J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_ J1939DcmGetNextDTCwithLampStatus, except the maximum sequence counter threshold per MainFunction is reached (see J1939DcmMaxDTCsPerMainFunction ) or the return ed value is ‘ DEM_PENDING ’. In this case, the execution is postponed to the next J1939Dcm_MainFunction call.

SWS_J1939Dcm_00121 requirement

If the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’ the J1939 Diagnostic Communication Manager shall call PduR_J1939DcmTransmit with the PduId of the requested message and set the destination address (via MetaData) according to the source address of the request, or to 0xFF when the destination of the request was 0xFF.

SWS_J1939Dcm_00129 requirement

The J1939Dcm shall maintain the broadcast status information of the DM13 command message. The initial value of the broadcast status information is the normal broadcasting mode f or all networks.

SWS_J1939Dcm_00130 requirement

The J1939 Diagnostic Manager shall reject the state change by returning E_NOT_OK when the ‘newState’ is not in the valid range. If DET is enabled via J1939DcmDevErrorDetect, the DET error J1939DCM_E_INVALID_STATE shall be reported.

SWS_J1939Dcm_00132 requirement

Bsw M _ J1939 Dcm - Broadcast Status Bsw M_ J1939Dcm.h This API tells the Bsw M the desired communication status of the available networks. The status will typically be activated via COM I - PDU group switches. Dem _ J1939 Dcm - Clear D T C Dem_ J1 939Dcm.h Clears the status of all event(s) related to the specified DTC(s), as well as all associated event memory entries for these event(s). Dem _ J1939 Dcm First - D T Cwith Lamp Status Dem_ J1939Dcm.h The function sets the filter to the first applicable DTC for the DM31 response for a specific node. Dem _ J1939 Dcm Get - Next D T Cwith Lamp - Status Dem_ J1939Dcm.h Gets the next filtered J1939 DTC for DM31 including current Lamp Status. Dem _ J1939 Dcm Get - Next Filtered D T C Dem_ J1939Dcm.h Gets the next filtered J1939 DTC. Dem _ J1939 Dcm Get - Next Filtered Ratio Dem_ J1939Dcm.h Gets the next filtered Ratio. Dem _ J1939 Dcm Get - Next Freeze Frame Dem_ J1939Dcm.h Gets next freeze frame d ata. The function stores the data in the provided Dest Buffer. Dem _ J1939 Dcm Get - Next S P N In Freeze - Frame Dem_ J1939Dcm.h Gets next SPN. Dem _ J1939 Dcm Get - Number Of Filtered D T - C Dem_ J1939Dcm.h Gets the number of currently filtered DTCs set by the function Dem_ J1939Dcm Set DTCFilter. Dem _ J1939 Dcm - Read Diagnostic - Readiness1 Dem_ J1939Dcm.h Service to report the value of Diagnostic Readiness 1 (DM05) computed by the Dem. Dem _ J1939 Dcm - Read Diagnostic - Readiness2 Dem_ J1939Dcm.h Service to report the value of Diagnostic Readiness 2 (DM21) computed by the Dem. Dem _ J1939 Dcm - Read Diagnostic - Readiness3 Dem_ J1939Dcm.h Service to report the value of Diagnostic Readiness 3 (DM26) computed by the Dem. Dem _ J1939 Dcm Set - D T C Filter Dem_ J1939Dcm.h The function sets the DTC filter for a specific node and returns the composite lamp status of the filtered DTCs. Dem _ J1939 Dcm Set - Freeze Frame Filter Dem_ J1939Dcm.h The function sets the Freeze F rame filter for a specific node. Dem _ J1939 Dcm Set - Ratio Filter Dem_ J1939Dcm.h The function sets the Ratio filter for a specific node and returns the corresponding Ignition Cycle Counter and General Denominator. Det _ Report Error Det.h Service to report development errors. J1939 Rm _ Send Ack J1939Rm.h Requests transmission of an Acknowledgement PG. Pdu R _ J1939 Dcm - Cancel Receive Pdu R_ J1939Dcm.h Requests cancellation of an ongoing reception of a PDU in a lower layer transport proto col module. Pdu R _ J1939 Dcm - Cancel Transmit Pdu R_ J1939Dcm.h Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module. Pdu R _ J1939 Dcm - Transmit Pdu R_ J1939Dcm.h Requests transmission of a PDU.

SWS_J1939Dcm_00133 requirement

The J1939Dcm shall ensure that access to the DEM is strictly serialized, i.e. that only one DEM sequence is executed in parallel.

SWS_J1939Dcm_00134 requirement

On reception of DM13 command message via call of J1939Dcm_RxIndication with parameter RxPduId set to the configured J1939DcmRxPduId and the hold signal set to ‘all devices’ or to ‘d evices whose broadcast state has been modified ’ , the J1939 Diagnostic Commu nication Manager shall restart timeout supervision .

SWS_J1939Dcm_00135 requirement

When timeout occurs after 6 seconds without another DM13 message, all buses shall be set back to broadcast mode by calling BswM_J1939DcmBroadcastStatus with a broadcast status information where all buses are set to ‘1’ .

SWS_J1939Dcm_00137 requirement

Port to retrieve the Calibration Verification Numbers (CVNs) from the application. Variation {ecuc(J1939Dcm/ J1939Dcm Config Set/ J1939Dcm Node/ J1939Dcm Diagnostic Message Support.J1939Dcm Dmx Support)} == J1939Dcm Dm19Support

SWS_J1939Dcm_00138 requirement

When the interface J1939Dcm_RequestIndication is called while the J1939Dcm is in offline state (refer API J1939Dcm_SetState ) , the J1939 Diagnostic Communication Manager shall ignore the request message. Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

SWS_J1939Dcm_00139 requirement

When the interface J1939Dcm_ Rx Indication is called while the J1939Dcm is in offline state (refer API J1939Dcm_SetState ) , the J1939 Diagnostic Communication Manager shall ignore the command message. Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

SWS_J1939Dcm_00140 requirement

When the interface J1939Dcm_ StartOfReception is called while the J1939Dcm is in offline state (refer API J1939Dcm_SetState ) , the J1939 Diagnostic Communication Manage r shall reject this command message by returning BUFREQ_E_NOT_OK . Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

SWS_J1939Dcm_00141 requirement

T he function J1939Dcm_ CopyRxData shall check if it is called out of context i.e. if the J1939Dcm is currently receiving a command message over TP protocol. In case of an error, the function J1939Dcm_ CopyRxData shall return BUFREQ_E_NOT_OK . Further a call to DET with parameter J1939DCM_E_INVALID_STAT E shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

SWS_J1939Dcm_00142 requirement

T he function J1939Dcm_ TpRxIndication shall check if it is called out of context i.e. if the J1939Dcm is currently receiving a response message over TP protocol. In case of an error, the function J1939Dcm_ TpRxIndication shall return without any effect . Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

SWS_J1939Dcm_00143 requirement

T he function J1939Dcm_ CopyTxData shall check if it is called out of context i.e. if the J1939Dcm is currently transmit ing a response message over TP protocol. In case of an error, the function J1939Dcm_ CopyTxData shall return BUFREQ_E_NOT_OK . Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

SWS_J1939Dcm_00146 requirement

When the interface J1939Dcm_ TxConfirmation is called while the J1939Dcm is in offline state (refer API J1939Dcm_SetState ) , the J1939 Diagnostic Communication Manager shall release the buffer (of [SWS_J1939Dcm_00115] ) . Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

SWS_J1939Dcm_00147 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is ena bled, the function J1939Dcm_SetState shall check if the node parameter is configured (J1939DcmNmNodeRef [ ECUC_J1939Dcm_00013 : ]). In case of an error, the function J1939Dcm_SetState shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_NODE.

SWS_J1939Dcm_00148 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_SetState shall check if the channel parameter is configured (J1939DcmNodeChannelRef) for the req uested node parameter. In case of an error, the function J1939Dcm_SetState shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_CHANNEL

SWS_J1939Dcm_00149 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_RequestIndication shall check if the node parameter is configured (J1939DcmNmNodeRef [ECUC_J1939Dcm_00013]). In case of an error, the function J1939Dcm_RequestIndication shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_I NVALID_NODE.

SWS_J1939Dcm_00150 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm _RequestIndication shall check if the channel parameter is configured (J1939DcmNodeChannelRef) for the requested node parameter. In case of an error, the function J1939Dcm_RequestIndication shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_CHANNEL.

SWS_J1939Dcm_00151 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_RxIndication shall check if the RxPduId parameter is not configured (J1939DcmRxPduId) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of an error, the function J1939Dcm_RxIndication shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID .

SWS_J1939Dcm_00152 requirement

I f the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_StartOfReception shall check if the id parameter is not configured (J1939DcmRxPduId) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of an error, the function J1939Dcm_StartOfReception shall return with BUFREQ_E_NOT_OK and without any effect and shall report the error to t he Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID.

SWS_J1939Dcm_00153 requirement

[SWS_J1939Dcm_00153] ⌈The function J1939Dcm_StartOfReception shall check if the TpSduLength parameter is smaller or equal as the configured buffer size (J1939DcmCommonBufferSize). In case of an error, the function J1939Dcm_ StartOfReception shall return with BUFREQ_E_OVFL.⌋

SWS_J1939Dcm_00154 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_CopyRxData shall check if the id parameter is no t configured (J1939DcmRxPduId) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of an error, the function J1939Dcm_CopyRxData shall return with BUFREQ_E_NOT_OK and without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID.

SWS_J1939Dcm_00155 requirement

[SWS_J1939Dcm_00155] Upstream requirements: SRS_BSW_00386 ⌈If the configuration parameter J1939DcmDevErrorDetect is enabled, the function J1939Dcm_StartOfReception shall check if the J1939Dcm is the right state to receive a command message over TP protocol. In case of an error, the function J1939Dcm_StartOfReception shall return with BUFREQ_E_NOT_OK without any ef- fect, and shall report the runtime error J1939DCM_E_INVALID_STATE.⌋

SWS_J1939Dcm_00156 requirement

[SWS_J1939Dcm_00156] Upstream requirements: SRS_BSW_00386 ⌈If the configuration parameter J1939DcmDevErrorDetect is enabled, the function J1939Dcm_TpRxIndication shall check if the id pa- rameter is not configured (J1939DcmRxPduId) on any DMx message ( J1939DcmDiagnosticMessageSupport). In case of an error, the function J1939Dcm_TpRxIndication shall return and without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_ PDU_SDU_ID.⌋ Manager for SAE J1939

SWS_J1939Dcm_00158 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_CopyTxData shall check if the id parameter is not configured (J1939DcmTxPduId) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of an er ror, the function J1939Dcm_CopyTxData shall return with BUFREQ_E_NOT_OK and without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID.

SWS_J1939Dcm_00160 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_TpTxConfirmation shall check if the id parameter is not configured (J1939Dcm T xPduId) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of an error, the function J1939Dcm_TpTxConfirmation shall return and without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID.

SWS_J1939Dcm_00161 requirement

T he function J1939Dcm_TpTxConfirmation shall check if it is called out of context i.e. if the J1939Dcm is currently transmit ting a response message over TP protocol. In case of an error, the function J1939Dcm_TpTxConfirmation shal l return and without any effect. Further a call to DET with param eter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled.

SWS_J1939Dcm_00162 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enab led, the function J1939Dcm_ TxConfirmation shall check if the id parameter is not configured ( J1939DcmTxPduId ) on any DMx message (J1939DcmDiagnosticMessageSupport). In case of a n error, the function J1939Dcm_ TxConfirmation shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_PDU_SDU_ID.

SWS_J1939Dcm_00163 requirement

T he function J1939Dcm_TxConfirmation shall check if it is called out of context i.e. if the J1939Dcm is currently transmitting a response message over TP protocol. In case of an error, the function J1939Dcm_TxConfirmation shall return return without any effect . Further a call to DET with parameter J1939DCM_E_INVALID_STATE shall be triggered if the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled .

SWS_J1939Dcm_00164 requirement

For messages sent via IF (Size in Table is 8), the transmission is terminated when J1939Dcm_TxConfirmation is called after transmission of a requested message which has been accepted and processed according to [SWS_J1939Dcm_00007] . The J1939 Diagnostic Communication Manager shall then release the buffer of [SWS_J1939Dcm_00115] .

SWS_J1939Dcm_00165 requirement

If the retur ned value is DEM_BUFFER_TOO_SMALL , the J1939Dcm shall report this error to the Default Error Tracer with the error code J1939DCM_E_BUFFER_TOO_SMALL , and shall call J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE to send a negative acknowledgement (NACK) (considering [SWS_J1939Dcm_00113] ) .

SWS_J1939Dcm_00167 requirement

The parameter "broadcast" of J1939Rm_SendAck shall always be set to FALSE .

SWS_J1939DCM_00168 requirement

The J1939DcmModeRule shall evaluate all referenced J1939DcmModeConditions and/or nested J1939DcmModeRules either by a logical AND in case J1939DcmLogicalOperator is set to J1939DCM_AND or b y a logical OR in case the J1939DcmLogicalOperator is set to J1939DCM_OR. In case only a single J1939DcmModeCondition or J1939DcmModeRule is referenced the J1939DcmLogicalOperator shall not be present and therefore not be used.

SWS_J1939DCM_00169 requirement

The J1939DcmSwcModeRef and J1939DcmBswModeRef of J1939 DcmMode Conditions shall evaluate if the referenced Mode - Declaration is set in case of J1939 DcmConditionType is set to J1939DCM_ EQUALS or is not set in case of J1939 DcmConditionType is set to J1939DCM_EQUALS_NOT.

SWS_J1939DCM_00170 requirement

The J1939DcmSwcSRDataEl ementRef of J1939DcmModeCondition shall be evaluated if the referenced data element (by J1939DcmExternalSRDataElementClass): • is equal to the value represented by the J1939DcmSwcSRDataElementValue in case of J1939 DcmConditionType is set to J1939DCM_ EQUALS • is unequal to the value represented by the J1939DcmSwcSRDataElementValue in case of J1939 DcmConditionType is set to J1939DCM_ EQUALS_NOT • is greater than the value represented by the J1939DcmSwcSRDataElementValue in case of J1939 DcmConditionType is set to J1939DCM_ GREATER_THAN • is greater than or equal to the value represented by the J1939DcmSwcSRDataElementValue in case of J1939 DcmConditionType is set to J1939DCM_ GREATER_OR_EQUAL • is less than the value represented by the J1939 DcmSwcSRDataElementValue in case of J1939 DcmConditionType is set to J1939DCM_ LESS_THAN • is less than or equal to the value represented by the J1939DcmSwcSRDataElementValue in case of J1939DcmConditionType is set to J1939DCM_ LESS_OR_EQUAL .

SWS_J1939DCM_00171 requirement

In case multiple J1939Dc mModeConditions are referenced within a J1939DcmModeRule they shall be evaluated in order of the index attributes of the EcucReferenceValues for J1939DcmArgumentRef .

SWS_J1939DCM_00172 requirement

The J1939Dcm shall create for commonly used ModeDeclarationGroupPrototype of each J1939DcmSwcModeRef of J1939DcmModeConditions a required mode switch port referencing this ModeDeclarationGroupPrototype. The name pattern of this port prototype shall be J1939DcmModeUser_<ModeDeclarationGroupPrototype>" in case the ModeDeclarationGroupPrototype short name is unique. Otherwise, the name pattern is implementation specific, except the required prefix "J1939 DcmModeUser_".

SWS_J1939DCM_00173 requirement

If the newly received D iagnostic Message is not allowed in the current mode condition (according to the con fi guration parameter J1939DcmDiagnosticMessageModeRul eRef ), the J19393Dcm shall ignore the current request.

SWS_J1939Dcm_00177 requirement

[SWS_J1939Dcm_00177] Upstream requirements: RS_Diag_04112 ⌈While processing DM53, DM54, or DM55, the J1939Dcm shall call the DEM APIs Dem_ J1939DcmClearDTC and Dem_J1939DcmSetDTCFilter with the Dem_DTCOrig- inType corresponding to the DemUserDefinedMemory referenced by J1939Dcm ServiceOnlyDTCsMemoryDestinationRef.⌋ J1939Dcm/DEM interaction in the J1939Dcm:

SWS_J1939Dcm_00178 requirement

On reception of request for DM53 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table 1 column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.5.1 ‘DTC status’ with the parameters ‘DTCStatusFilter’, 'DTCOrigin' and ‘DTCKi nd’ according to table Table 2

SWS_J1939Dcm_00179 requirement

The return values ‘J1939DTC’ and ‘OccurrenceCounter’ shall be encoded into the DM53 layout accor ding to SAE J1939 - 73.

SWS_J1939Dcm_00180 requirement

On reception of request for DM54 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table 1 column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall use the common sequence of chapter 7.5.1 ‘DTC status’ with the parameters ‘DTCStatusFilter’, 'DTCOrigin' and ‘DTCKind’ according to table Table 2 .

SWS_J1939Dcm_00181 requirement

The return values ‘J1939DTC’ and ‘OccurrenceCounter’ shall be encoded into the DM54 layout according to SAE J1939 - 73.

SWS_J1939Dcm_00182 requirement

On reception of request for DM55 (call of J1939Dcm_RequestIndication with parameter requestedPgn set according Table 1 column “PGN (Hexadecimal)”) the J1939 Diagnostic Communication Manager shall trigger Dem_J1939DcmClearDTC with parameter DTCTypeFilter set to DEM_J1939DTC_CLEAR_ACTIVE_AND_PREVIOUSLY_ACTIVE and DTCOrigin set to definition from J1939DcmServiceOnlyDTCsMemoryDestinationRef.

SWS_J1939Dcm_00183 requirement

If the return value of the function Dem_J193 9DcmClearDTC is DEM _PENDING, the J1939 Diagnostic Communication Manager shall retrigger Dem_J1939DcmClearDTC (with parameter DT CTypeFilter set to DEM_J1939DTC_CLEAR_ACTIVE_AND_PREVIOUSLY_ACTIVE) in the next call of J1939Dcm_MainFunction.

SWS_J1939Dcm_00184 requirement

If the return value of the function Dem_J1939DcmClearDTC is E _OK or DEM_PENDING , the J1939 Diagnostic Comm unication Manager shall send a positive acknowledgement (PACK) by J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_POSITIVE.

SWS_J1939Dcm_00185 requirement

If return value is other than E _OK or DEM_PENDING, the J1939 Diagnostic Communic ation Manager shall send a negative acknowledgement (NACK) by J1939Rm_SendAck with parameters ‘ackCode’ set to J1939RM_ACK_NEGATIVE.

SWS_J1939Dcm_00186 requirement

When the API J1939Dcm_StartOfReception is invoked with TpSduLength equal to 0, the value BUFREQ_E_NOT_OK shall be returned and no further action shall be taken .

SWS_J1939Dcm_00187 requirement

The parameter "extIdInfo" of J1939Rm_SendAck shall always be set to NULL_PTR.

SWS_J1939Dcm_00193 requirement

DMx message with variable size are exchanged with the J1939Tp, using the TP API (PduR_J1939DcmTransmit, J1939Dcm_CopyTxData, J1939Dcm_TpTxConfirmation for transmission and J1939Dcm_StartOfReception, J1939Dcm_CopyRxData, J1939Dcm_TpRx Indication for reception). DMx message with a fixed size of 8 bytes are exchanged with the CanIf, using the IF API (PduR_J1939DcmTransmit, J1939Dcm_TxConfirmation for transmission and J1939Dcm_RxIndication for reception).

SWS_J1939Dcm_00194 requirement

Meta data items of type CAN_ID_32 contain the source address in the fourth (least significant) byte.

SWS_J1939Dcm_00195 requirement

Meta data items of type CAN_ID_32 contain the destination address in the third byte.

SWS_J1939Dcm_00196 requirement

Meta data items of type CAN_ID_32 contain the priority in the bits 2 - 4 of the first (most significant) byte, where bit 0 is the least significant bit of a byte.

SWS_J1939Dcm_00197 requirement

When PduR_J1939DcmTransmit returns anything but E_OK, or when J1939Dcm_TpTxConfirmation or J1939Dcm_TxConfirmation reports E_NOT_OK, the J1939Dcm shall retry the failed transmission from the next main function.

SWS_J1939Dcm_00198 requirement

Type of error Related error code Error value Buffer too small J1939DCM_ E_ BUFFER_ TOO_ SMALL 0x0E

SWS_J1939Dcm_00199 requirement

Det _ Report - Runtime Error Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called.

SWS_J1939Dcm_00200 requirement

The J1939Dcm shall provide a buffer in size of J1939DcmDM35BufferSize for the parallel DM35 processing to support [SWS_J1939Dcm_00082] .

SWS_J1939Dcm_00201 requirement

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_OK and the ‘FreezeFrameKind’ is set to ‘ DEM_J1939DCM_FREEZEFRAME ’ or ’ DEM_J1939DCM_EXPANDED_FREEZEFRAME ’, t he J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939D cmGetNextFreezeFrame, till the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’. The calls may spread over several calls of J1939Dcm_MainFunction.

SWS_J1939Dcm_00202 requirement

In case the Dem_J1939DcmSetRatioFilter, Dem_J1939DcmSetDTCFilter or Dem_J1939DcmSetFreezeFrameFilter returns E_OK and the ‘ FreezeFrameKind ’ is set to ’ DE M_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME ’, t he J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939DcmGetNextSPNInFreezeFrame, till the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’. The calls may spread over several calls of J1939Dcm_MainFunction.

SWS_J1939Dcm_00203 requirement

The J1939 Diagnostic Communication Manager shall continue the sequence by subsequent calling the Dem_J1939DcmGetNextFilteredRatio, till the return ed value is ‘ DEM_NO_SUCH_ELEMENT ’. The calls may spread over several calls of J1939Dcm_MainFunction.

SWS_J1939Dcm_00204 requirement

If J1939DcmGenericDMxSupport is enabled, Requests for DMx messages that are not listed in Table 1 shall be forwarded via the callout configured as J1939DcmGenericDMxRequestFunction. They can be answered using J1939Dcm_ GenericDMxTransmit, which will trigger the callbacks configured via J193 9DcmGenericDMxCopyTxDataFunction and J1939DcmGenericDMxTxConfirmationFunction .

SWS_J1939Dcm_00205 requirement

If J1939DcmGenericDMxSupport is enabled, received DMx messages that are not listed in Table 1 shall be forwarded to the application using the callbacks configured via J1939DcmGenericDMxStartOfReceptionFunction, J1939DcmGenericDMxCopyRxDataFunction, and J1939DcmGenericDMxRxIndicationFunction.

SWS_J1939Dcm_00206 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_GenericDMxTransmit shall check if the dmId parameter address es a configured but unsupported DMx message ( J1939DcmDiagnosticMessageSupport that c annot be found in Table 1 ). In case of an error, the function J1939Dcm_GenericDMxTransmit shall return without any effect and shall report the error to the Default Error Trac er with the er ror code J1939DCM_E_INVALID_PGN .

SWS_J1939Dcm_00207 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_GenericDMxTransmit shall check if the node parameter is configured (J1939DcmNmNodeRef [ ECUC_J1939Dcm_00013 : ]). In case of an error, the function J1939Dcm_GenericDMxTransmit shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_NODE .

SWS_J1939Dcm_00208 requirement

If the configuration parameter J1939DcmDevErrorDetect [ ECUC_J1939Dcm_00003 : ] is enabled, the function J1939Dcm_GenericDMxTransmit shall check if the channel parameter is configured (J1939DcmNodeChannelRef) for the requested node parameter. In case of an error, the function J1939Dcm_GenericDMxTransmit shall return without any effect and shall report the error to the Default Error Tracer with the error code J1939DCM_E_INVALID_CHANNEL .

SWS_J1939Dcm_00209 requirement

The diagnostic (DMx) messages that are supported by the J1939 Diagnostic Communicati on Manager are listed in Table 1 .

SWS_J1939Dcm_00236 requirement

[SWS_J1939Dcm_00236].⌋() The common “DTC status” sequence is described in subsection 7.6.1.

SWS_J1939Dcm_00237 requirement

[SWS_J1939Dcm_00237].⌋

SWS_J1939Dcm_00238 requirement

[SWS_J1939Dcm_00238]) the J1939 Diagnostic Com- munication Manager shall use the common “DTC status” sequence with the pa- rameters DTCStatusFilter and DTCKind set according to the corresponding table columns in [SWS_J1939Dcm_00236].⌋() The common “DTC status” sequence is described in subsection 7.6.1.

[SWS_J1939Dcm_CONSTR_06203] ⌈The J1939DcmServiceOnlyDTCsMemoryDes- tinationRef shall reference an event memory assigned to the DemEventMemorySet of the current J1939DcmDemClientRef.⌋ Manager for SAE J1939

J1939DcmModeCondition shall have either a J1939DcmBswModeRef or a J1939DcmSwcModeRef or a J1939DcmSwcSRDataEl- ementRef as external reference.

The values J1939DCM_GREATER_ THAN, J1939DCM_GREATER_OR_EQUAL, J1939DCM_LESS_OR_EQUAL and J1939DCM_LESS_THAN shall not be used with a Mode reference (J1939DcmBsw ModeRef or J1939DcmSwcModeRef).

The J1939DcmServiceOnlyDTCsMemoryDesti- nationRef shall reference an event memory assigned to the DemEventMemorySet of the current J1939DcmDemClientRef.