1

How to map internal DataElements from the Dem (Diagnostic Event Manager) to Dcm (Diagnostic Communication Manager) DIDs (Data Identifier)?

Let's say, I have a DemDataClass with DemDataElementUsePort set to USE_DATA_INTERNAL and DemDataElementInternalData set to DEM_AGINGCTR.

This DemDataClass is referenced in a DemDidClass as DemDidDataClassRef.

But how do I map this to the normal ReadDataByIdentifier service, which is handled in Dcm?

P.S.: I know how to implement it manually, but it sounds a bit weird that I can do it by configuration in Dem, but apparently not in Dcm.

Torsten Knodt
  • 477
  • 1
  • 5
  • 20

1 Answers1

0

The AgingCounter (and other counters) are actually DTC specific elements, and are part of the so called ExtendedDataRecord of a DTC.

In Dem, you have to configure the DemExtendedDataClass and DemExtendedDataRecordClass and assign them to the DTCs.

These ExtendedDataRecords are not read out as DIDs over DiagService 0x22 RBDI, but with the DiagService 0x19 RDTCI (ReadDTCInformation):

  • sub-function = 0x06 reportDTCExtDataRecordByDTCNumber)
  • sub-function = 0x10 reportMirrorMemoryDTCExtDataRecordByDTCNumber
  • sub-function = 0x16 reportDTCExtDataRecordByRecordNumber
  • sub-function = 0x19 reportUserDefMemoryDTCExtDataRecordByDTCNumber

The Dcm will actually pick them up for each DTC, using e.g. Dem_SelectExtendedDataRecord(), Dem_GetNextExtendedDataRecord().

The similar approach is BTW used for the FreezeFrames/SnapshotRecords (see for the according subfunctions of DiagService 0x19 RDTCI).

Currently, I wonder, why you would do this with DIDs and 0x22-RDBI.

kesselhaus
  • 1,241
  • 8
  • 9
  • Good point, thanks. Frankly I blindly read the customer requirement and thought how to get it done. Something I should not have done based on my experience. For sure this is anyway different across the DTCs, so having this for 0x22 would not make any sense. – Torsten Knodt Jul 31 '22 at 10:30