How to map internal DataElement
s 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
.
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):
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.