Dem¶
文档信息(Document Information)¶
版本历史(Version History)¶
日期(Date) |
作者(Author) |
版本(Version) |
状态(Status) |
说明(Description) |
|---|---|---|---|---|
2024/11/16 |
peng.wu |
V0.1 |
发布(Release) |
首次发布(First release) |
2025/04/04 |
peng.wu |
V1.0 |
发布(Release) |
正式发布(Official release) |
参考文档(Reference Document)¶
编号(Number) |
分类(Classification) |
标题(Title) |
版本(Version) |
|---|---|---|---|
1 |
Autosar |
AUTOSAR_CP_SWS_DefaultErrorTracer.pdf |
R23-11 |
2 |
Autosar |
AUTOSAR_CP_SWS_DiagnosticCommunicationManager.pdf |
R23-11 |
3 |
Autosar |
AUTOSAR_CP_SWS_DiagnosticEventManager.pdf |
R23-11 |
4 |
Autosar |
AUTOSAR_CP_SWS_RTE.pdf |
R23-11 |
5 |
Autosar |
AUTOSAR_FO_TR_Glossary.pdf |
R23-11 |
6 |
Autosar |
AUTOSAR_CP_SWS_BSWGeneral.pdf |
R23-11 |
7 |
Autosar |
AUTOSAR_FO_RS_Diagnostics.pdf |
R23-11 |
8 |
Autosar |
AUTOSAR_CP_SRS_BSWGeneral.pdf |
R23-11 |
9 |
ISO |
17356-3.pdf |
|
10 |
SAE |
J1979.pdf |
|
11 |
ISO |
14229.pdf |
术语与简写(Terms and Abbreviations)¶
术语(Term)¶
术语(Term) |
解释(Explanation) |
|---|---|
Aging |
老化,在达到一定操作循环的条件后从存储空间中移除 |
Aging Counter |
老化计数器 |
Application Layer |
SWC应用层 |
Debounce counter |
计数去抖计数器 |
Dem-internal data value |
Dem内部数据 |
Diagnostic Channel |
诊断仪与ECU的通道,通常指不同的诊断协议,适应不同的总线 |
Displacement |
根据策略用需要存储的更重要的事件替换最不重要的事件 |
DTC group |
DTC分组 |
DtcGroupAllDtcs |
DTC全组 |
Event debouncing |
事件去抖 |
Event confirmation |
事件确认(Bit3:CDTC) |
Event memory |
一个事件存储器由多个事件存储器条目组成 |
Event memory entry |
事件存储器条目 |
Event memory overflow indication |
事件存储器溢出指引 |
Event related data |
事件相关数据(冻结帧、扩展数据) |
Event status byte |
ISO 14229-1 [1] 中定义的状态字节,基于事件级别 |
Extended data record |
扩展数据 |
External Diagnostic Tool |
外部诊断仪 |
Failure counter |
故障计数器 |
Fault Detection Counter |
ISO 和 FDC-API 中使用的 sint8 值 |
Freeze frame |
冻结帧 |
Healing |
处理一段时间/几个运行周期内报告的通过后关闭警告指示器 |
Internal Diagnostic Tool |
处于总线网络上的Dcm客户端,作用与外部诊断仪相同,但是位于车辆内部 |
Monitor |
监视器 |
Operating cycle |
操作循环 |
UDS Service |
UDS服务 |
简写(Abbreviation)¶
简写(Abbreviation) |
全称(Full name) |
解释(Explanation) |
|---|---|---|
BSW |
Basic Software |
基础软件 |
CDD |
Complex Device Driver |
复杂驱动 |
CRC |
Cyclic Redundancy Checkcrc |
校验模块 |
Dcm |
Diagnostic Communication Manager |
诊断通信模块 |
Dem |
Diagnostic Event Manager |
诊断故障管理模块 |
Det |
Default Error Tracer |
错误跟踪模块 |
DID |
Data Identifier |
数据ID |
DTC |
Diagnostic Trouble Code |
诊断故障码 |
DTR |
Diagnostic Test Result |
诊断测试结果 |
DYC |
OBD Term: Driving Cycle |
(OBD Term)驾驶循环 |
ECU |
Electronic Control Unit |
电控单元 |
EcuM |
Electronic Control Unit Manager |
电控单元管理模块 |
FDC |
Fault Detection Counter |
故障检测计数值 |
Fim |
Function Inhibition Manager |
功能抑制管理模块 |
FMI |
Failure Mode Indicator (SAE J1939) |
失败模式灯 |
FTB |
Failure Type Byte |
失败类型字节 |
HW |
Hardware |
硬件 |
ID |
Identification/Identifier |
识别号 |
ISO |
International Standardization Organization |
国际标准组织 |
IUMPR |
In Use Monitoring Performance Ratio (OBD Term) |
故障检测率 |
J1939Dcm |
SAEJ1939 Diagnostic Communication ManagerJ1939 |
诊断通信管理模块 |
MIL |
Malfunction Indicator Light (SAE J1979) or Lamp (SAE J1939) |
故障灯 |
NVRAM |
Non volatile RAM |
非易失存储 |
OBD |
On-Board-Diagnostics |
车上诊断 |
OC |
Occurrence Count (SAE J1939) |
发生计数器 |
OEM |
Original Equipment Manufacturer (Automotive Manufacturer) |
整车厂 |
OS |
Operating System |
操作系统 |
PID |
Parameter Identification (SAE J1587 or SAE J1979) |
参数识别号 |
PTO |
Power Take Off |
电源下电 |
RAM |
Random Access Memory |
易失储存 |
ROM |
Read-only Memory |
只读存储 |
RTE |
Runtime Environment |
运行时环境 |
SPN |
Suspect Parameter Number (SAE J1939) |
参数编号 |
SSCP |
synchronous server call point |
同步调用点 |
SW |
Software |
软件 |
SW-C |
Software Component |
软件组件 |
UDS |
Unified Diagnostic Services |
统一诊断服务 |
VOBD |
Vehicle On-Board-Diagnostic |
车载诊断 |
WUC |
OBD Term: Warm up cycle (OBD Term) |
暖机循环 |
WIR |
Warning Indicator Request |
警告灯请求 |
WWH-OBD |
World Wide Harmonized On-Board-Diagnostic |
全球统一车载诊断系统 |
简介(Introduction)¶
服务组件Diagnostic Event Manager (Dem)负责处理和存储诊断事件(错误)和相关数据。 此外,Dem向Dcm/J939Dcm提供故障信息(例如,从事件存储器中读取所有存储的dtc),并且 为应用层和其他BSW模块提供接口。
The service component Diagnostic Event Manager (Dem) is responsible for processing and storing diagnostic events (errors) and related data. In addition, Dem provides fault information to Dcm/J939Dcm (for example, reading all stored DTCs from the event memory) and offers interfaces for the application layer and other BSW modules.
模块架构如图 DemArchitecture in AUTOSAR 所示,Dem模块按照ISO-14229-1、ISO-15031-5和 SAE-J1939-73等规范实现UDS、OBD和J1939的诊断事件管理及存储功能。 具体实现为:DTC状态管理、冻结帧与扩展数据存储、去抖、恢复与老化、替换等功能。 用户可以通过Dcm或J1939Dcm(J1939事件)中的服务读取或清除事件及其相关数据。 此外,Dem中所有事件及其相关数据的非易失性存储都依赖于NvM。
The module architecture is shown in DemArchitecture in AUTOSAR. The Dem module implements the diagnostic event management and storage functions for UDS, OBD, and J1939 in accordance with specifications such as ISO-14229-1, ISO-15031-5, and SAE-J1939-73. The specific implementations include: DTC status management, freeze frame and extended data storage, debouncing, recovery and aging, replacement, etc. Users can read or clear events and their related data through services in Dcm or J1939Dcm (for J1939 events). In addition, the non-volatile storage of all events and their related data in Dem depends on NvM.
DemArchitecture in AUTOSAR¶
Dem依赖关系如图 Demrelationship 所示,接口的详细内容请参考“接口描述”章节。
The dependencies of Dem are shown in Demrelationship. For detailed information about the interfaces, please refer to the “Interface Description” chapter.
Demrelationship¶
功能描述(Functional Description)¶
特性(Features)¶
主卫星功能(Main Satellite Function)¶
对于单分区操作系统,Dem主分区提供了服务组件的AUTOSAR接口。 对于多分区操作系统,支持一个Dem主分区和多个卫星分区,每一个Dem分区都提供独有的服务接口。 Dem主分区和卫星分区都运行在可信分区中。Dem的核间通讯采用了共享内存的内部数据进行交换,对受保护内存部分的写访问必须在可信任的分区中。
For a single-partition operating system, the Dem main partition provides the AUTOSAR interface of the service component. For a multi-partition operating system, one Dem main partition and multiple satellite partitions are supported, and each Dem partition provides a unique service interface. Both the Dem main partition and satellite partitions run in trusted partitions. The inter-core communication of Dem uses internal data in shared memory for exchange, and write access to the protected memory part must be in the trusted partition.
功能(Function) |
描述(Description) |
|---|---|
Dem主分区(Dem Main Partition) |
作为Dem模块的核心文件,实现Dem模块全部对外接口,以及实现Dem模块功能所必须的local函数,local宏定义,local变量定义。 As the core file of the Dem module, it implements all external interfaces of the Dem module, as well as the local functions, local macro definitions, and local variable definitions necessary for realizing the functions of the Dem module. |
Dem卫星分区(Dem Satellite Partition) |
主要在本地执行去抖动操作(基于计数器和时间的去抖动),以及管理分区的监控状态。 Mainly performs debouncing operations locally (counter-based and time-based debouncing) and manages the monitoring status of the partition. |
初始化功能(Initialization Function)¶
对于单分区操作系统,初始化流程按照AUOTOSAR规范中要求的执行。 对于多分区操作系统,首先在主分区中执行预初始化(Dem_MasterPreInit)加载配置数据,然后预初始化卫星 分区并更新分区的监控状态(Dem_SatellitePreInit),此时主分区以及卫星分区的状态都为PREINITIALIZED (预初始化),分配给各个卫星的事件也可以使用Dem_SetEventStatus向Dem报告监视结果,并在第一个 Dem_Mainfunction调用中排队处理。
For a single-partition operating system, the initialization process is executed in accordance with the requirements specified in the AUTOSAR standard. For a multi-partition operating system, first, the pre-initialization (Dem_MasterPreInit) is performed in the main partition to load configuration data, and then the satellite partitions are pre-initialized and their monitoring status is updated (Dem_SatellitePreInit). At this point, both the main partition and the satellite partitions are in the PREINITIALIZED state. The events assigned to each satellite can also use Dem_SetEventStatus to report monitoring results to Dem, which will be queued for processing in the first call of Dem_Mainfunction.
当NvM读取完Dem的存储数据后,将Dem所有功能全部初始化(Dem_MasterInit),然后初始化各个卫星 (Dem_SatelliteInit),此时主分区以及卫星分区的状态都为INITIALIZED(已初始化)。 若系统已经调用Dem_Shutdown之后,Dem_MasterInit接口还可以用于重新初始化主分区。
After NvM finishes reading the stored data of Dem, all functions of Dem are fully initialized (Dem_MasterInit), and then each satellite is initialized (Dem_SatelliteInit). At this time, both the main partition and the satellite partitions are in the INITIALIZED state. If the system has called Dem_Shutdown, the Dem_MasterInit interface can still be used to re-initialize the main partition.
诊断事件报告(Diagnostic Event Reporting)¶
诊断事件是指在一个SWC或BSW模块中的监控的结果,报告的状态可以是Failed、Passed、PreFailed或PrePassed, SWC与BSW通过Dem_SetEventStatus向Dem报告事件及其状态并存入Dem内部队列中,在下一个Dem_MainFunction中 处理队列中的事件,包括处理内部Memory Entry空间分配以及事件DTC状态切换等,并且将事件及其相关状态和数据 放入对应的Memory Entry中。
A diagnostic event refers to the result of monitoring in a SWC or BSW module, and the reported status can be Failed, Passed, PreFailed, or PrePassed. SWCs and BSW modules report events and their statuses to the Dem module via the Dem_SetEventStatus API. These reports are stored in Dem’s internal queue. In the next Dem_MainFunction, the events in the queue are processed, including handling the allocation of internal Memory Entry space, switching the event DTC status, etc., and each event, along with its related status and data, is placed into the corresponding Memory Entry.
去抖功能(Debounce Function)¶
当报告事件状态为PREPASSED(或PREFAILED)时,需要进行去抖处理来确认事件的状态为PASSED或FAILED。去抖可分为 基于计数去抖和基于时间去抖。当报告的事件状态为PREFAILED或PREPASSED时,在Dem_MainFunction中的内部函数 Dem_DebounceCounterCalculate/Dem_DebounceTimeCalculate里开始根据配置进行计数,当报告PREFAILED或 PREPASSED状态的事件的计数值/超时值达到配置的阈值时,事件状态将被确认为FAILED或PASSED。
When the reported event status is PREPASSED (or PREFAILED), debounce processing is required to confirm the event status as PASSED or FAILED. Debounce can be divided into counter-based debounce and time-based debounce. When the reported event status is PREFAILED or PREPASSED, the internal functions Dem_DebounceCounterCalculate / Dem_DemounceTimeCalculate in Dem_MainFunction start counting according to the configuration. When the count value / timeout value of the event with the reported PREFAILED or PREPASSED status reaches the configured threshold, the event status will be confirmed as FAILED or PASSED.
DTC状态管理(DTC Status Management)¶
每个事件都支持一个DTC状态,分为8个Bit状态位,Dem初始化时,会将每个配置的事件的DTC状态进行初始化, 当SWC或BSW报告事件后,将通过Dem_MainFunction中异步执行计算。
Each event supports a DTC status, which is divided into 8-bit status bits. During Dem initialization, the DTC status of each configured event will be initialized. After the SWC or BSW reports an event, the DTC status bits are updated asynchronously within the Dem_MainFunction.
位(Bit) |
名称(Name) |
缩写(Abbreviation) |
说明(Description) |
|---|---|---|---|
Bit 0 |
TesetFailed |
TF |
表示最近一次测试的测试结果 Indicates the test result of the most recent test |
Bit 1 |
TestFailedThisOperationCycle |
TFTOC |
在开启的操作循环内,事件是否被判定为失败 Whether the event is determined to be failed within the active operation cycle |
Bit 2 |
PendingDTC |
PDTC |
在过去或当前的操作循环中,如果事件被判定为失败,并且自从报告了失败结果以来,它的整个周期内都没有测试通过 In the past or current operation cycle, if an event is determined to be a failure, and since the failure result was reported, it has not passed the test throughout its entire cycle. |
Bit 3 |
ComfirmedDTC |
CDTC |
表示事件已被确认且被存储 Indicates that the event has been confirmed and stored |
Bit 4 |
TestNotCompleteSinceLastClear |
TNCSLC |
自故障存储已被清除后事件是否已被确认(通过或失败) Whether the event has been confirmed (passed or failed) since the fault storage was cleared |
Bit 5 |
TestFailedSinceLastClear |
TFSLC |
自从上次清除故障后该事件是否被标记为失败 Whether the event has been marked as failed since the last fault clearing |
Bit 6 |
TestNotCompleteThisOperationCycle |
TNCTOC |
事件在开启的操作循环内是否已经被确认(通过或失败) Whether the event has been confirmed (passed or failed) within the active operation cycle |
Bit 7 |
WarnningIndicator |
WIR |
表示出此事件的warning indicator是否激活 Indicates whether the warning indicator for this event is activated |
冻结帧和扩展数据(Freeze Frame and Extended Data)¶
ISO-14229-1规定了两种类型的诊断事件相关数据:冻结帧与扩展数据。数据可以以冻结帧和扩展数据的形式与每个DTC一起存储。
ISO-14229-1 specifies two types of diagnostic event-related data: freeze frame and extended data. Data can be stored together with each DTC in the form of freeze frames and extended data.
功能(Function) |
说明(Description) |
|---|---|
冻结帧(Freeze Frame) |
包括一个或多个DID(数据标识符),每个DID又包括一个或多个数据元素。冻结帧在事件确认期间的可配置时间点进行收集和存储,通常会多次存储。 Includes one or more DIDs (Data Identifiers), and each DID includes one or more data elements. Freeze frames are collected and stored at configurable time points during event confirmation, and are usually stored multiple times. |
扩展数据(Extended Data) |
包括一个或多个数据元素,通常用于统计数值 Includes one or more data elements, usually used for statistical values |
SWC与BSW报告事件时,Dem根据配置DemExtendedDataRecordTrigger与DemFreezeFrameRecordTrigger决定在哪种条件下获取实时 扩展数据与冻结帧,并且与事件一同存入buffer中。接着在Dem_MainFunction中等待事件的Memory Entry分配完成后,将数据存储到其中。
When SWC and BSW report an event, Dem determines under which conditions to acquire real-time extended data and freeze frames according to the configurations of DemExtendedDataRecordTrigger and DemFreezeFrameRecordTrigger, and stores them in the buffer together with the event. Then, in Dem_MainFunction, after waiting for the completion of the Memory Entry allocation for the event, the data is stored in it.
恢复与老化功能(Recovery and Aging Functions)¶
功能(Function) |
说明(Description) |
|---|---|
诊断事件的恢复(Recovery of Diagnostic Events) |
某事件已经报告了故障,在经过后续操作循环监测下没有继续报告故障,满足恢复条件,则认为事件已经恢复 If an event has reported a fault and no further faults are reported in subsequent operating cycle monitoring, and the recovery conditions are met, the event is considered recovered |
诊断事件的老化(Aging of Diagnostic Events) |
在当前事件满足恢复条件并且在经过后续操作循环监测下没有继续报告故障,满足老化条件,则开始老化处理 If the current event meets the recovery conditions and no further faults are reported in subsequent operating cycle monitoring, and the aging conditions are met, aging processing is initiated |
恢复:指事件在当前操作循环报告状态为FAILED并且置位了DTC状态位Bit7,后续的操作循环中此事件仅报告了PASSED状态,并在 Dem_OperationCycleRestart中开始执行恢复处理,若在某一个操作循环开启时满足恢复条件则将DTC状态位Bit7清除。恢复条件由 配置中DemIndicatorHealingCycleCounterThreshold的值决定。
Recovery: It means that if an event reports a FAILED status in the current operation cycle, the Dem module will set DTC status bit Bit7. In subsequent operation cycles, the event only reports a PASSED status, and recovery processing starts in Dem_OperationCycleRestart. If the recovery conditions are met when an operation cycle starts, DTC status bit Bit7 will be cleared. The recovery conditions are determined by the value of DemIndicatorHealingCycleCounterThreshold in the configuration.
老化:指事件满足恢复条件并且后续的操作循环中事件继续仅报告PASSED状态,在内部函数Dem_OperationCycleEnd中进行老化处 理,若在某一个操作循环关闭时满足老化条件则将清除DTC状态位Bit3、Bit5,并且删除此事件所有相关的数据,老化条件由配置中 DemAgingCycleCounterThreshold的值决定。若配置DemStatusBitHandlingTestFailedSinceLastClear允许清除Bit5,清除时 机由配置中DemAgingCycleCounterThresholdForTFSLC的值决定。
Aging: It means that the event meets the recovery conditions and continues to report only PASSED status in subsequent operation cycles. Aging processing is performed in the internal function Dem_OperationCycleEnd. If the aging conditions are met when an operation cycle ends, DTC status bits Bit3 and Bit5 for that event will be cleared, and all related data for the event will be deleted. The aging conditions are determined by the value of DemAgingCycleCounterThreshold in the configuration. If DemStatusBitHandlingTestFailedSinceLastClear is configured to allow clearing Bit5, the clearing timing is determined by the value of DemAgingCycleCounterThresholdForTFSLC in the configuration.
替换功能(Replacement Function)¶
诊断事件的替换功能是指若在配置中配置的事件数量大于配置的存储数量,则最不重要的、已经存在的事件的Memory Entry被需要 存储的新事件的Memory Entry取代。 若SWC或BSW向Dem报告了尚未存储新的事件,且此时Dem内部分配的Memory Entry已经达到了配置中的最大值,则在内部函数 Dem_EventDisplacementProcess中进行替换处理。执行替换处理后,Dem将把“最不重要”的事件相关的数据删除,更新此事件相关 的DTC状态。此外,AutoSAR规定事件替换只能由高优先级事件替换低优先级事件。 以下是事件替换的三种策略介绍:
The replacement function for diagnostic events means that if the number of events configured in the configuration is greater than the configured storage quantity, the data in the Memory Entry of the least important existing event will be replaced by the data of the new event that needs to be stored. If the SWC or BSW reports a new, not yet stored event to Dem, and the internally allocated Memory Entries in Dem have reached the maximum value in the configuration, replacement processing will be performed in the internal function Dem_EventDisplacementProcess. After executing the replacement processing, Dem will delete the data related to the “least important” event and update the DTC status related to this event. In addition, AUTOSAR stipulates that event replacement can only be done by a higher-priority event replacing a lower-priority event. The following is an introduction to three strategies for event replacement:
策略(Strategy) |
解释(Explanation) |
|---|---|
DEM_DISPLACEMENT_NONE |
不执行替换 No replacement is performed |
DEM_DISPLACEMENT_FULL |
优先寻找Passive状态的事件,若所有已存储的事件状态都为Active,则按照Occurrence(故障产生的时间最长)来找到将被新事件替换的旧事件。(Active/Passive:事件的DTC状态是否为Failed/Passed) First, look for events in the Passive state. If all stored events are in the Active state, the old event to be replaced by the new event will be found based on Occurrence (the event with the longest time since the fault occurred).(Active/Passive: Whether the DTC status of the event is Failed/Passed) |
DEM_DISPLACEMENT_PRIO_OCC |
先寻找Priority最低的事件,若所有已存储的旧事件的Priority相同,则按照Occurrence(故障产生的时间最长)来找到将被新事件替换的旧事件 First, look for the event with the lowest Priority. If all the stored old events have the same Priority, the old event to be replaced by the new event will be found based on Occurrence (the one with the longest time since the fault occurred). |
事件存储管理功能(Event Storage Management Function)¶
诊断事件的相关数据可以通过NvM模块读写存储单元中的数据,上电初始化时调用Dem_NvMMemoryInit将NvM读取的admin、entry数据 更新到Dem模块中,在下电时调用Dem_NvmShutdown将Dem的数据写入存储单元。如果不使用AUTOSAR NvM模块,则必须提供一个兼容的 存储功能替代品,以便使用与非易失性数据管理相关的功能。 Dem只会触发少量的NvM写操作,所以ECU在运行时通常只存储变化不频繁的数据,如果需要多次触发NvM的写频率,则需要通过配置项 (Dem/DemConfigSet/DemDTC/DemNvStorageStrategy),使能Dem立即写功能。
The relevant data of diagnostic events can read and write data in the storage unit through the NvM module. During power-on initialization, Dem_NvMMemoryInit is called to update the admin and entry data read by NvM to the Dem module. During power-off, Dem_NvmShutdown is called to write the data of Dem into the storage unit. If the AUTOSAR NvM module is not used, a compatible alternative storage function must be provided to use the functions related to non-volatile data management. Dem triggers a minimal number of NvM write operations. Therefore, the ECU typically only stores data that changes infrequently during operation. If it is necessary to trigger the write frequency of NvM multiple times, the Dem immediate write function needs to be enabled through the configuration item (Dem/DemConfigSet/DemDTC/DemNvStorageStrategy).
操作循环功能(Operation Cycle Function)¶
每个事件都分配给一个操作循环,只有当相应的操作循环已启动时,才可以向Dem报告事件,一个操作循环可以通过函数 Dem_OperationCycleSetReStart启动和停止。Dem在初始化时只设置对应操作循环的flag初始值,以及使能操作循环 的接口,并且重启操作循环会调用很多DTC的回调接口,所以操作循环的启动和停止功能是在主函数中异步执行的。
Each event is assigned to an operation cycle. Events can only be reported to the Dem module if their corresponding operation cycle is active (started). An operation cycle can be started and stopped through the function Dem_OperationCycleSetReStart. During initialization, Dem only sets the initial value of the flag for the corresponding operation cycle and enables the interface of the operation cycle. Moreover, restarting the operation cycle will call many DTC callback interfaces, so the start and stop functions of the operation cycle are executed asynchronously in the main function.
使能条件功能(Enable Condition Function)¶
使能条件被定义为一组分配给特定条件的参数。只要这个条件没有得到满足,事件报告(参考Dem_SetEventStatus)就无效,因此不会被接受。 调用Dem_EnableConditionInit激活使能条件后,在主函数中调用Dem_EnableConditionTask异步执行使能条件的功能。
An enable condition is a specific logical state, defined by a set of parameters. As long as this condition is not met, the event report (refer to Dem_SetEventStatus) is invalid and therefore will not be accepted. After calling Dem_EnableConditionInit to activate the enable condition, the function of the enable condition is executed asynchronously by calling Dem_EnableConditionTask in the main function.
存储条件功能(Storage Condition Function)¶
存储条件被定义为一组分配给特定条件的参数。只要这个条件没有得到满足,Dem模块就不会将事件存储到事件存储器中。 调用Dem_StorageConditionInit初始化存储条件的状态以及激活存储条件的功能。
The storage condition is defined as a set of parameters assigned to a specific condition. As long as this condition is not met, the Dem module will not store the event in the event memory. Call Dem_StorageConditionInit to initialize the status of the storage condition and activate the function of the storage condition.
J1939功能(J1939 Function)¶
Dem模块能够支持J1939协议栈,支持J1939定义的特定冻结帧,每个DTC可以被单独配置为支持冻结帧和/或扩展冻结帧。 Lamp支持Malfunction Indicator Lamp(MIL), Red Stop Lamp(RSL), Amber Warning Lamp(AWL), Protect Lamp(PL), 这些Lamp的行为支持:闪烁、持续闪烁、持续、快闪和慢闪等。 调用函数Dem_J1939DcmClearDTC可以清除与指定的J1939 DTC相关的所有事件的状态,以及这些事件的所有关联事件内存条目。
The Dem module can support the J1939 protocol stack and the specific freeze frames defined by J1939. Each DTC can be individually configured to support freeze frames and/or extended freeze frames. The J1939 protocol supports several lamp types, including: Malfunction Indicator Lamp (MIL), Red Stop Lamp (RSL), Amber Warning Lamp (AWL), and Protect Lamp (PL). The behaviors of these lamps include: flashing, continuous flashing, continuous lighting, fast flashing, and slow flashing, etc. Calling the function Dem_J1939DcmClearDTC can clear the status of all events related to the specified J1939 DTC, as well as all associated event memory entries of these events.
Clear DTC功能(Clear DTC Function)¶
不同客户端可通过调用Dem_ClearDTC清除DTC相关的所有事件的状态、关联事件内存条目等。清除过程是在主函数中异步执行的, 当一个清除操作正在进行时:
Different clients can request the clearance of DTCs by calling Dem_ClearDTC. This process clears the status of all related events and their associated event memory entries. The clearing process is executed asynchronously in the main function. When a clearing operation is in progress:
来自不同客户端的清除请求会收到DEM_CLEAR_BUSY响应
Clearing requests from different clients will receive a DEM_CLEAR_BUSY response.
来自同一客户端的清除请求会收到DEM_CLEAR_PENDING响应
Clearing requests from the same client will receive a DEM_CLEAR_PENDING response.
偏差(Deviation)¶
扩展(Extension)¶
Dem与NvM Block的同步功能( Synchronization Function between Dem and NvM Block)
诊断事件的同步功能指的是Dem一键在DemNvRamBlockId下创建reference关系,同时在NvM模块生成相应的NvMBlock。同步功能会根据 Dem的配置自动计算Dem所需Block的长度与个数。选择同步功能会自动在NvM模块创建相应的NvMBlock。Dem支持event分开存储, 会创建 DemMaxNumberEventEntryPrimary + DemMaxNumberEventEntryPermanent个NvMBlock,每个NvMBlock用来单独存放发生 故障的event状态信息、扩展数据、冻结帧数据等。
The synchronization function of diagnostic events refers to that Dem can create a reference relationship under DemNvRamBlockId with one click, and at the same time generate the corresponding NvMBlock in the NvM module. The synchronization function will automatically calculate the length and number of Blocks required by Dem according to the configuration of Dem. Selecting the synchronization function will automatically create the corresponding NvMBlock in the NvM module. Dem supports separate storage of events and will create DemMaxNumberEventEntryPrimary + DemMaxNumberEventEntryPermanent NvMBlocks. Each NvMBlock is used to store the status information, extended data, freeze frame data, etc. of the event with a fault separately.
Dem模块的可选功能(Optional Functions of the Dem Module)
在Dem_OptMacros.h文件中,定义了一些可选功能的宏定义,例如使用C标准库的memcpy功能,使用NvM轮询功能,清除时在一个主函数 周期内需要扫描的事件数目,使用用户定义的同步功能等。用户可根据实际应用场景,在此文件中设置宏定义开关,打开对应的功能。
In the Dem_OptMacros.h file, some macro definitions for optional functions are defined, such as using the memcpy function of the C standard library, using the NvM polling function, the number of events that need to be scanned within one main function cycle during clearing, and using user-defined synchronization functions, etc. Users can set macro definition switches in this file according to actual application scenarios to enable the corresponding functions.
集成(Integration)¶
初始化(Initialization)¶
Dem单分区或无分区( Dem Single Partition or No Partition)
集成时需要EcuM与BswM进行分步初始化,预初始化和初始化流程如下:1、首先调用Dem_PreInit进行预初始化;2、初始化存储栈,调用NvM_ReadAll; 3、等NvM_ReadAll结束(多块通知结果不为PENDING)后调用Dem_Init。
During integration, EcuM and BswM need to perform step-by-step initialization. The pre-initialization and initialization processes are as follows: 1. First, call Dem_PreInit for pre-initialization; 2. Initialize the storage stack and call NvM_ReadAll; 3. Call Dem_Init after NvM_ReadAll ends (the multi-block notification result is not PENDING).
Dem多分区( Dem Multiple Partitions)
需要EcuM与BswM进行不同分区的预初始化和初始化。(注意:Dem多分区初始化情况下会调用GetCurrentApplicationID接口,该接口需要OS启动后才能调用) 如诊断测试工程中,配置了分区0(主分区master分区)和分区1,预初始化和初始化流程如下:1、首先进行分区0(主分区master分区)的预初始化,调用Dem_PreInit; 2、在主分区初始化完成后调用其他分区上卫星分区的预初始化Dem_SatellitePreInit接口;3、初始化存储栈,调用NvM_ReadAll,等NvM_ReadAll结束(多块通知结果不为PENDING) 后调用Dem分区0(主分区master分区)初始化Dem_Init;4、在主分区初始化完成后,调用其他分区上卫星分区的初始化Dem_SatelliteInit接口。
EcuM and BswM are required to perform pre-initialization and initialization for different partitions. (Note: In the case of Dem multi-partition initialization, the GetCurrentApplicationID interface will be called, and this interface can only be called after the OS is started.) For example, in a diagnostic test project, if Partition 0 (master partition) and Partition 1 are configured, the pre-initialization and initialization processes are as follows: 1. First, perform pre-initialization for Partition 0 (master partition) and call Dem_PreInit; 2. After the initialization of the master partition is completed, call the pre-initialization interface Dem_SatellitePreInit for satellite partitions on other partitions; 3. Initialize the storage stack, call NvM_ReadAll, and after NvM_ReadAll ends (the multi-block notification result is not PENDING), call Dem_Init for Dem Partition 0 (master partition); 4. After the initialization of the master partition is completed, call the initialization interface Dem_SatelliteInit for satellite partitions on other partitions.
文件列表(File list)¶
静态文件(Static files)¶
文件(File) |
描述(Description) |
|---|---|
Dem_Cbk.h |
Dem模块与NvM交互的外部接口函数声明 Declaration of External Interface Functions for Interaction between Dem Module and NvM |
Dem_Dcm.h |
Dem模块与Dcm交互的外部接口函数声明 Declaration of external interface functions for interaction between Dem module and Dcm |
Dem_J1939Dcm.h |
Dem模块与J1939Dcm交互的外部接口函数声明 Declaration of external interface functions for interaction between Dem module and J1939Dcm |
Dem_OptMacros.h |
Dem模块可选功能宏定义 Macro definitions for optional functions of Dem module |
Dem_Types.h |
Dem模块标准类型定义 Standard type definitions for Dem module |
Dem.h |
Dem模块外部接口函数声明 Declaration of external interface functions for Dem module |
Dem_APIImplementation.h |
Dem模块外部接口函数实现 Implementation of external interface functions for Dem module |
Dem_ClearDTC.h |
Dem模块清除DTC相关功能函数实现 Implementation of functions related to DTC clearing in Dem module |
Dem_Client.h |
Dem模块客户端相关功能函数实现 Implementation of functions related to client in Dem module |
Dem_DataElement.h |
Dem模块原始数据获取相关功能函数实现 Implementation of functions related to raw data acquisition in Dem module |
Dem_DcmAPIImplementation.h |
Dem模块与Dcm相关的外部接口函数实现 Implementation of external interface functions related to Dcm in Dem module |
Dem_Debounce.h |
Dem模块去抖相关功能函数实现 Implementation of functions related to debouncing in Dem module |
Dem_Dtc.h |
Dem模块DTC处理相关功能函数实现 Implementation of functions related to DTC processing in Dem module |
Dem_DtcInterface.h |
Dem模块DTC处理相关功能函数声明 Declaration of functions related to DTC processing in Dem module |
Dem_EnableCondition.h |
Dem模块使能条件处理相关功能函数实现 Implementation of functions related to enable condition processing in Dem module |
Dem_Error.h |
Dem模块错误处理相关功能函数实现 Implementation of functions related to error handling in Dem module |
Dem_Event.h |
Dem模块事件处理相关功能函数实现 Implementation of functions related to event processing in Dem module |
Dem_EventInterface.h |
Dem模块事件处理相关功能函数声明 Declaration of functions related to event processing in Dem module |
Dem_ExtendedData.h |
Dem模块扩展数据处理相关功能函数实现 Implementation of functions related to extended data processing in Dem module |
Dem_FreezeFrame.h |
Dem模块冻结帧处理相关功能函数实现 Implementation of functions related to freeze frame processing in Dem module |
Dem_Indicator.h |
Dem模块故障灯处理相关功能函数实现 Implementation of functions related to malfunction indicator processing in Dem module |
Dem_InitState.h |
Dem模块初始化状态处理相关功能函数实现 Implementation of functions related to initialization state processing in Dem module |
Dem_Int.h |
Dem模块内部宏定义 Internal macro definitions for Dem module |
Dem_J1939.h |
Dem模块与J1939Dcm相关的外部接口函数实现以及J1939相关功能函数实现 Implementation of external interface functions related to J1939Dcm and functions related to J1939 in Dem module |
Dem_Master.h |
Dem模块主星处理相关功能函数实现 Implementation of functions related to master processing in Dem module |
Dem_MasterInterface.h |
Dem模块主星处理相关功能函数声明 Declaration of functions related to master processing in Dem module |
Dem_MasterSatelliteCom.h |
Dem模块主卫星通信处理相关功能函数实现 Implementation of functions related to master-satellite communication processing in Dem module |
Dem_Mem.h |
Dem模块数据存储处理相关功能函数实现 Implementation of functions related to data storage processing in Dem module |
Dem_MemInterface.h |
Dem模块数据存储处理相关功能函数声明 Declaration of functions related to data storage processing in Dem module |
Dem_MemMap.h |
Dem模块内存映射定义 Memory map definitions for Dem module |
Dem_Obd.h |
Dem模块OBD处理相关功能函数实现 Implementation of functions related to OBD processing in Dem module |
Dem_OperationCycle.h |
Dem模块操作循环处理相关功能函数实现 Implementation of functions related to operation cycle processing in Dem module |
Dem_PreStore.h |
Dem模块预存储冻结帧处理相关功能函数实现 Implementation of functions related to pre-storage freeze frame processing in Dem module |
Dem_Queue.h |
Dem模块队列处理相关功能函数实现 Implementation of functions related to queue processing in Dem module |
Dem_Satellite.h |
Dem模块卫星处理相关功能函数实现 Implementation of functions related to satellite processing in Dem module |
Dem_SatelliteInterface.h |
Dem模块卫星处理相关功能函数声明 Declaration of functions related to satellite processing in Dem module |
Dem_StorageCondition.h |
Dem模块存储条件处理相关功能函数实现 Implementation of functions related to storage condition processing in Dem module |
Dem.c |
Dem模块源码文件入口 Main source file for the Dem module. |
动态文件(Dynamic file)¶
文件(File) |
描述(Description) |
|---|---|
Dem_Cfg.h |
Dem模块PC配置宏定义 PC configuration macro definitions for the Dem module |
Dem_Lcfg.c |
Dem模块非PB配置数据变量定义 Definition of non-PB configuration data variables for the Dem module |
Dem_Lcfg.h |
Dem模块非PB配置数据变量声明、宏定义 Declaration of non-PB configuration data variables and macro definitions for the Dem module |
Dem_PBcfg.c |
Dem模块PB配置数据变量定义 Definition of PB configuration data variables for the Dem module |
Dem_PBcfg.h |
Dem模块PB配置数据变量声明 Declaration of PB configuration data variables for the Dem module |
Rte_Dem_Type.h |
Dem模块实现数据类型定义 Definition of implementation data types for the Dem module |
错误处理(Error handling)¶
开发错误(Development errors)¶
Error code |
Value[hex] |
Description |
|---|---|---|
DEM_E_NO_ERROR |
0x0u |
API function called with no det error |
DEM_E_WRONG_CONFIGURATION |
0x10u |
API function called with a parameter value, which is not allowed by active configuration |
DEM_E_PARAM_POINTER |
0x11u |
API function called with a NULL pointer |
DEM_E_PARAM_DATA |
0x12u |
API function called with wrong parameter value |
DEM_E_PARAM_LENGTH |
0x13u |
API function called with wrong length parameter value |
DEM_E_INIT_FAILED |
0x14u |
Dem initialisation failed |
DEM_E_UNINIT |
0x20u |
API function called before the Dem module has been full initialized or after the Dem module has been shut down |
DEM_E_WRONG_CONDITION |
0x40u |
Required conditions for the respective API call are not fulfilled |
DEM_E_INVALID_OBDMID |
0x50u |
Dem_DcmGetAvailableOBDMIDs called with invalid OBDMID |
运行时错误(Runtime error)¶
Error code |
Value[hex] |
Description |
|---|---|---|
DEM_E_UDS_STATUS_PROCESSING_FAILED |
0x21u |
The UDS status corresponding to a changed monitor status could not be processed |
DEM_E_NODATAAVAILABLE |
0x30u |
No valid data for data element available by SW-C or BSW call |
类型定义(Type definition)¶
None
提供的服务(Provided services)¶
Dem_GetVersionInfo¶
void Dem_GetVersionInfo(Std_VersionInfoType *versionInfo)
Returns the version information of this module. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemVersionInfoApi)} == true)
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
versionInfo |
Pointer to where to store the version information of this module. |
- Return type
void
Dem_PreInit¶
void Dem_PreInit(const Dem_ConfigType *ConfigPtr)
Initializes the internal states necessary to process events reported by BSW-modules.
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
- Return type
void
Dem_Init¶
void Dem_Init(const Dem_ConfigType *ConfigPtr)
Initializes or reinitializes this module.
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ConfigPtr |
Pointer to the configuration set in VARIANT-POST-BUILD. |
- Return type
void
Dem_Shutdown¶
void Dem_Shutdown(void)
Shuts down this module.
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
- Return type
void
Dem_ClearDTC¶
Std_ReturnType Dem_ClearDTC(uint8 ClientId)
Clears single DTCs, as well as groups of DTCs.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
DTC successfully cleared |
E_NOT_OK |
No DTC selected |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist or clearing is restricted by configuration to group of all DTCs only. |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist |
DEM_CLEAR_FAILED |
DTC clearing failed |
DEM_CLEAR_BUSY |
Another client is currently clearing DTCs. The requested operation will not be started and the caller shall try again at a later moment. |
DEM_CLEAR_MEMORY_ERROR |
An error occurred during erasing a memory location (e.g. if DemClearDTCBehavior is set to DEM_CLRRESP_NON-VOLATILE_FINISH and erasing of non-volatile-block failed). |
DEM_PENDING |
Clearing the DTCs is currently in progress. The caller shall call this function again at a later moment. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_ClearPrestoredFreezeFrame¶
Std_ReturnType Dem_ClearPrestoredFreezeFrame(Dem_EventIdType EventId)
Clears a prestored freeze frame of a specific event. This API can only be used through the RTE and therefore no declaration is exported via
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Clear prestored freeze frame was successful |
E_NOT_OK |
Clear prestored freeze frame failed |
Dem_GetComponentFailed¶
Std_ReturnType Dem_GetComponentFailed(Dem_ComponentIdType ComponentId, boolean *ComponentFailed)
Gets the failed status of a DemComponent.
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ComponentId |
Identification of a DemComponent |
[out] |
ComponentFailed |
TRUE: failed FALSE: not failed |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
getting “ComponentFailed” was successful |
E_NOT_OK |
getting “ComponentFailed” was not successful |
Dem_GetDTCSelectionResult¶
Std_ReturnType Dem_GetDTCSelectionResult(uint8 ClientId)
Provides information if the last call to Dem_SelectDTC has selected a valid DTC or group of DTCs.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
The DTC select parameter check is successful and the requested DTC or group of DTC in the selected origin is selected for further operations. |
E_NOT_OK |
No DTC selected |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist |
DEM_PENDING |
Checking the SelectDTC parameters is currently in progress. The caller shall call this function again later. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_GetDTCSelectionResultForClearDTC¶
Std_ReturnType Dem_GetDTCSelectionResultForClearDTC(uint8 ClientId)
Provides information if the last call to Dem_SelectDTC has selected a valid DTC or group of DTCs, respecting the settings if the Dem shall clear only all DTCs.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
The DTC select parameter check is successful and the requested DTC or group of DTC in the selected origin is selected for further operations. |
E_NOT_OK |
No DTC selected |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist |
DEM_PENDING |
Checking the SelectDTC parameters is currently in progress. The caller shall call this function again later. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_GetEventUdsStatus¶
Std_ReturnType Dem_GetEventUdsStatus(Dem_EventIdType EventId, Dem_UdsStatusByteType *UDSStatusByte)
Gets the current UDS status byte assigned to the DTC for the event.
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[out] |
UDSStatusByte |
|
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
get of event status was successful |
E_NOT_OK |
get of event status failed |
Dem_GetMonitorStatus¶
Std_ReturnType Dem_GetMonitorStatus(Dem_EventIdType EventID, Dem_MonitorStatusType *MonitorStatus)
Gets the current monitor status for an event.
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
EventID |
||
[out] |
MonitorStatus |
Monitor status byte of the requested event. If the return value of the function call is E_NOT_OK, this parameter does not contain valid data. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
get monitor status was successful |
E_NOT_OK |
get the monitor status failed |
Dem_GetDebouncingOfEvent¶
Std_ReturnType Dem_GetDebouncingOfEvent(Dem_EventIdType EventId, Dem_DebouncingStateType *DebouncingState)
Gets the debouncing status of an event. This function shall not be used for EventId with native debouncing within their functions. It is rather for EventIds using debouncing within the Dem.
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[out] |
DebouncingState |
Bit 0 Temporarily Defective (corresponds to 0 < FDC < 127) Bit 1 finally Defective (corresponds to FDC = 127) Bit 2 temporarily healed (corresponds to -128 < FDC < 0) Bit 3 Test complete (corresponds to FDC = -128 or FDC = 127) Bit 4 DTR Update (= Test complete && Debouncing complete && enable conditions / storage conditions fulfilled) |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
get of debouncing status per event state successful |
E_NOT_OK |
get of debouncing per event state failed |
Dem_GetDTCOfEvent¶
Std_ReturnType Dem_GetDTCOfEvent(Dem_EventIdType EventId, Dem_DTCFormatType DTCFormat, uint32 *DTCOfEvent)
Gets the DTC of an event.
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[in] |
DTCFormat |
Defines the output-format of the requested DTC value. |
[out] |
DTCOfEvent |
Receives the DTC value in respective format returned by this function. If the return value of the function is other than E_OK this parameter does not contain valid data. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
get of DTC was successful |
E_NOT_OK |
the call was not successful |
DEM_E_NO_DTC_AVAILABLE |
there is no DTC configured in the requested format |
Dem_GetDTCSuppression¶
Std_ReturnType Dem_GetDTCSuppression(uint8 ClientId, boolean *SuppressionStatus)
Returns the suppression status of a specific DTC. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemSuppressionSupport)} == DEM_DTC_SUPPRESSION)
- Sync/Async
Asynchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module |
[out] |
SuppressionStatus |
Defines whether the respective DTC is suppressed (TRUE) or enabled (FALSE). |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation was successful. |
E_NOT_OK |
Dem_SelectDTC was not called. |
DEM_WRONG_DTC |
No valid DTC or DTC group selected. |
DEM_WRONG_DTCORIGIN |
Wrong DTC origin selected. |
DEM_PENDING |
The requested value is calculated asynchronously and currently not available. The caller can retry later. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_GetEventAvailable¶
Std_ReturnType Dem_GetEventAvailable(Dem_EventIdType EventId, boolean *AvailableStatus)
Get the Event availability.
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[out] |
AvailableStatus |
TRUE if the event is available. FALSE if the event is not available. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Event availability has been obtained. |
E_NOT_OK |
Event availability cannot be obtained. |
Dem_GetFaultDetectionCounter¶
Std_ReturnType Dem_GetFaultDetectionCounter(Dem_EventIdType EventId, sint8 *FaultDetectionCounter)
Gets the fault detection counter of an event. This API can only be used through the RTE, and therefore no declaration is exported via
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[out] |
FaultDetectionCounter |
This parameter receives the Fault Detection Counter information of the requested EventId. If the return value of the function call is other than E_OK this parameter does not contain valid data. -128dec…127dec PASSED…FAILED according to ISO 14229-1 |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
request was successful |
E_NOT_OK |
request failed |
DEM_E_NO_FDC_AVAILABLE |
there is no fault detection counter available for the requested event |
Dem_GetIndicatorStatus¶
Std_ReturnType Dem_GetIndicatorStatus(uint8 IndicatorId, Dem_IndicatorStatusType *IndicatorStatus)
Gets the indicator status derived from the UDS status. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemEventMemorySet/DemIndicator)} != NULL)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
IndicatorId |
Number of indicator |
[out] |
IndicatorStatus |
Status of the indicator, like off, on, or blinking. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation was successful |
E_NOT_OK |
Operation failed |
Dem_GetEventFreezeFrameDataEx¶
Std_ReturnType Dem_GetEventFreezeFrameDataEx(Dem_EventIdType EventId, uint8 RecordNumber, uint16 DataId, uint8 *DestBuffer, uint16 *BufSize)
Gets the data of a freeze frame by event.
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[in] |
RecordNumber |
This parameter is a unique identifier for a freeze frame record as defined in ISO14229-1. 0xFF means most recent freeze frame record is returned. 0x00 is only supported if the Dem module supports WWH-OBD (refer to DemOBDSupport) |
[in] |
DataId |
This parameter specifies the DID (ISO14229-1) that shall be copied to the destination buffer. |
[out] |
DestBuffer |
This parameter contains a byte pointer that points to the buffer, to which the freeze frame data record shall be written to. The format is raw hexadecimal values and contains no header-information. |
[inout] |
BufSize |
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation was successful |
E_NOT_OK |
Operation could not be performed |
DEM_NO_SUCH_ELEMENT |
The requested event data is not currently stored (but the request was valid) OR The requested record number is not supported by the event OR The requested DID is not supported by the freeze frame. |
DEM_BUFFER_TOO_SMALL |
The provided buffer size is too small. |
Dem_GetEventExtendedDataRecordEx¶
Std_ReturnType Dem_GetEventExtendedDataRecordEx(Dem_EventIdType EventId, uint8 RecordNumber, uint8 *DestBuffer, uint16 *BufSize)
Gets the data of an extended data record by event.
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[in] |
RecordNumber |
Identification of requested Extended data record. Valid values are between 0x01 and 0xEF as defined in ISO14229-1. |
[out] |
DestBuffer |
This parameter contains a byte pointer that points to the buffer, to which the extended data data record shall be written to. The format is raw hexadecimal values and contains no header-information. |
[inout] |
BufSize |
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation was successful |
E_NOT_OK |
Operation could not be performed |
DEM_NO_SUCH_ELEMENT |
The requested event data is not currently stored (but the request was valid) OR The requested record number is not supported by the event. |
DEM_BUFFER_TOO_SMALL |
The provided buffer size is too small. |
Dem_GetEventMemoryOverflow¶
Std_ReturnType Dem_GetEventMemoryOverflow(uint8 ClientId, Dem_DTCOriginType DTCOrigin, boolean *OverflowIndication)
Gets the event memory overflow indication status.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
DemClientID identifying the DemEventMemorySet indicating in which event memory the overflow has occurred. |
[in] |
DTCOrigin |
If the Dem supports more than one event memory this parameter is used to select the source memory the overflow indication shall be read from. |
[out] |
OverflowIndication |
This parameter returns TRUE if the according event memory was overflowed, otherwise it returns FALSE. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation was successful |
E_NOT_OK |
Operation failed or is not supported |
Dem_GetNumberOfEventMemoryEntries¶
Std_ReturnType Dem_GetNumberOfEventMemoryEntries(uint8 ClientId, Dem_DTCOriginType DTCOrigin, uint8 *NumberOfEventMemoryEntries)
Returns the number of entries currently stored in the requested event memory.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
DemClientID identifying the DemEventMemorySet to which the requested event memory belongs to. |
[in] |
DTCOrigin |
If the Dem supports more than one event memory this parameter is used to select the source memory the overflow indication shall be read from. |
[out] |
NumberOfEventMemoryEntries |
Number of entries currently stored in the requested event memory. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation was successful |
E_NOT_OK |
Operation failed |
Dem_ResetEventDebounceStatus¶
Std_ReturnType Dem_ResetEventDebounceStatus(Dem_EventIdType EventId, Dem_DebounceResetStatusType DebounceResetStatus)
Control the internal debounce counter/timer by BSW modules and SW-Cs. The event qualification will not be affected by these debounce state changes. This API is available for BSW modules as soon as Dem_PreInit has been completed (refer to SWS_Dem_00438 and SWS_Dem_00167).
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[in] |
DebounceResetStatus |
Freeze or reset the internal debounce counter/timer of the specified event. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation was successful |
E_NOT_OK |
Operation failed |
Dem_ResetEventStatus¶
Std_ReturnType Dem_ResetEventStatus(Dem_EventIdType EventId)
Resets the event failed status. This API can only be used through the RTE and therefore no declaration is exported via
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Request to reset the event status was successful accepted. |
E_NOT_OK |
Request to reset the event status failed or is not allowed, because the event is already tested in this operation cycle. |
Dem_ResetMonitorStatus¶
Std_ReturnType Dem_ResetMonitorStatus(Dem_EventIdType EventId)
Resets the monitor failed status.
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Request to reset the monitor status was successful and accepted. |
E_NOT_OK |
Request to reset the monitor status failed or is not allowed. |
Dem_RestartOperationCycle¶
Std_ReturnType Dem_RestartOperationCycle(uint8 OperationCycleId)
Sets an operation cycle state. This API can only be used through the RTE and therefore no declaration is exported via
- Sync/Async
Asynchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
OperationCycleId |
Identification of operation cycle, like power cycle, driving cycle. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
set of operation cycle was accepted and will be handled asynchronously |
E_NOT_OK |
set of operation cycle was rejected |
Dem_PrestoreFreezeFrame¶
Std_ReturnType Dem_PrestoreFreezeFrame(Dem_EventIdType EventId)
Captures the freeze frame data for a specific event. This API can only be used through the RTE and therefore no declaration is exported via
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Freeze frame prestorage was successful |
E_NOT_OK |
Freeze frame prestorage failed |
Dem_SelectDTC¶
Std_ReturnType Dem_SelectDTC(uint8 ClientId, uint32 DTC, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType DTCOrigin)
Selects a DTC or DTC group as target for further operations.
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[in] |
DTC |
Defines the DTC in respective format that is selected. If the DTC fits to a DTC group number, the DTC group is selected. |
[in] |
DTCFormat |
Defines the input-format of the provided DTC value. |
[in] |
DTCOrigin |
The event memory of the requested DTC or group of DTC. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
DTC successfully selected. |
DEM_BUSY |
Another Dem_SelectDTC or Dem_SelectDTC dependent operation of this client is currently in progress. |
Dem_SetComponentAvailable¶
Std_ReturnType Dem_SetComponentAvailable(Dem_ComponentIdType ComponentId, boolean AvailableStatus)
Set the availability of a specific DemComponent.
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ComponentId |
Identification of a DemComponent. |
[in] |
AvailableStatus |
This parameter specifies whether the respective Component shall be available (TRUE) or not (FALSE). |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation was successful |
E_NOT_OK |
Operation failed |
Dem_SetDTCSuppression¶
Std_ReturnType Dem_SetDTCSuppression(uint8 ClientId, boolean SuppressionStatus)
Set the suppression status of a specific DTC. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemSuppressionSupport)} == DEM_DTC_SUPPRESSION)
- Sync/Async
Asynchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module |
[in] |
SuppressionStatus |
This parameter specifies whether the respective DTC shall be disabled (TRUE) or enabled (FALSE). |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
The status of the DTC is correctly provided in the DTCStatus parameter. |
E_NOT_OK |
No DTC selected. |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist. |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist. |
DEM_PENDING |
The requested value is calculated asynchronously and currently not available. The caller can retry later. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_SetEnableCondition¶
Std_ReturnType Dem_SetEnableCondition(uint8 EnableConditionID, boolean ConditionFulfilled)
Sets an enable condition. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemEnableCondition)} != NULL)
- Sync/Async
Asynchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EnableConditionID |
This parameter identifies the enable condition. |
[in] |
ConditionFulfilled |
This parameter specifies whether the enable condition assigned to the EnableConditionID is fulfilled (TRUE) or not fulfilled (FALSE). |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
In case the enable condition could be set successfully the API call returns E_OK. |
E_NOT_OK:If |
the setting of the enable condition failed the return value of the function is E_NOT_OK. |
Dem_SetEventAvailable¶
Std_ReturnType Dem_SetEventAvailable(Dem_EventIdType EventId, boolean AvailableStatus)
Set the available status of a specific Event.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[in] |
AvailableStatus |
This parameter specifies whether the respective Event shall be available (TRUE) or not (FALSE). |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Request to set the availability status was successful. |
E_NOT_OK |
Request to set the availability status not accepted. |
Dem_SetEventConfirmationThresholdCounter¶
Std_ReturnType Dem_SetEventConfirmationThresholdCounter(Dem_EventIdType EventId, uint8 FailureCycleCounterThreshold)
Set the failure confirmation threshold of an event.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[in] |
FailureCycleCounterThreshold |
Failure cycle counter threshold of event to be set. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Change of threshold was successful. |
E_NOT_OK |
Threshold cannot be changed as DemEventConfirmationThresholdCounterAdaptable is set to FALSE for this event. |
Dem_SetEventStatus¶
Std_ReturnType Dem_SetEventStatus(Dem_EventIdType EventId, Dem_EventStatusType EventStatus)
Called by SW-Cs or BSW modules to report monitor status information to the Dem. BSW modules calling Dem_SetEventStatus can safely ignore the return value. This API will be available only if ({Dem/DemConfigSet/DemEventParameter/DemEventReportingType} == STANDARD_REPORTING)
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[in] |
EventStatus |
Monitor test result |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
set of event status was successful |
E_NOT_OK |
Event status setting or processing failed or could not be accepted. |
Dem_SetEventStatusWithMonitorData¶
Std_ReturnType Dem_SetEventStatusWithMonitorData(Dem_EventIdType EventId, Dem_EventStatusType EventStatus, Dem_MonitorDataType monitorData0, Dem_MonitorDataType monitorData1)
This API will be available only if ({Dem/DemConfigSet/DemEventParameter/DemEventReportingType} == STANDARD_REPORTING_WITH_MONITOR_DATA)
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
[in] |
EventStatus |
Monitor test result |
[in] |
monitorData0 |
|
[in] |
monitorData1 |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
set of event status was successful |
E_NOT_OK |
Event status setting or processing failed or could not be accepted. |
Dem_SetStorageCondition¶
Std_ReturnType Dem_SetStorageCondition(uint8 StorageConditionID, boolean ConditionFulfilled)
Sets a storage condition.API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemStorageCondition)} != NULL)
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
StorageConditionID |
This parameter identifies the storage condition. |
[in] |
ConditionFulfilled |
This parameter specifies whether the storage condition assigned to the StorageConditionID is fulfilled (TRUE) or not fulfilled (FALSE). |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
In case the storage condition could be set successfully the API call returns E_OK. |
E_NOT_OK:If |
the setting of the storage condition failed the return value of the function is E_NOT_OK. |
Dem_SetWIRStatus¶
Std_ReturnType Dem_SetWIRStatus(Dem_EventIdType EventId, boolean WIRStatus)
Sets the WIR status bit via failsafe SW-Cs. This API can only be used through the RTE and therefore no declaration is exported via
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. The Event Number is configured in the DEM. Min.: 1 (0: Indication of no Event or Failure) Max.:Result of configuration of Event Numbers in DEM (Max is either 255 or 65535) |
[in] |
WIRStatus |
Requested status of event related WIR-bit (regarding to the current status of function inhibition) WIRStatus = TRUE -> WIR-bit shall be set to “1” WIRStatus = FALSE -> WIR-bit shall be set to “0” |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Request to set the WIR status was successful. |
E_NOT_OK |
Request to set the WIR status was not accepted (e.g. disabled controlDTCSetting) and should be repeated. |
Dem_GetTranslationType¶
Dem_DTCTranslationFormatType Dem_GetTranslationType(uint8 ClientId)
Gets the supported DTC formats of the ECU.The supported formats are configured via Dem TypeOfDTCSupported.
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
- Return type
Dem_DTCTranslationFormatType
Return values
Name |
Description |
|---|---|
Dem_DTCTranslationFormatType |
Returns the configured DTC translation format. A combination of different DTC formats is not possible. |
DEM_DTC_TRANSLATION_ISO15031_6 |
ISO15031-6 DTC format/SAE J2012-DA_DTCFormat_00 DTC format |
DEM_DTC_TRANSLATION_ISO14229_1 |
ISO14229-1 DTC format |
DEM_DTC_TRANSLATION_SAEJ1939_73 |
SAEJ1939-73 DTC format |
DEM_DTC_TRANSLATION_ISO11992_4 |
ISO11992-4 DTC format |
DEM_DTC_TRANSLATION_J2012DA_FORMAT_04 |
SAE_J2012-DA_DTCFormat_04 DTC format |
Dem_GetDTCStatusAvailabilityMask¶
Std_ReturnType Dem_GetDTCStatusAvailabilityMask(uint8 ClientId, Dem_UdsStatusByteType *DTCStatusMask, Dem_DTCOriginType DTCOrigin)
Gets the DTC Status availability mask of the selected fault memory.
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
DTCStatusMask |
DTCStatusMask The value DTCStatusMask indicates the supported DTC status bits from the Dem. All supported information is indicated by setting the corresponding status bit to 1. See ISO14229-1. |
[in] |
DTCOrigin |
This parameter selects the event memory the DTCStatus AvailabilityMask is requested for. Only the values DEM_DTC_ORIGIN_PRIMARY_MEMORY and DEM_DTC_ORIGIN_USERDEFINED_MEMORY_<Name> are valid. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
get of DTC status mask was successful |
E_NOT_OK |
get of DTC status mask failed |
Dem_GetStatusOfDTC¶
Std_ReturnType Dem_GetStatusOfDTC(uint8 ClientId, uint8 *DTCStatus)
Gets the status of a DTC. For large configurations and DTC-calibration, the interface behavior can be asynchronous (splitting the DTC-search into segments). The DTCs of OBD Events Suppression shall be reported as Dem_WRONG_DTC.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[in] |
DTCStatus |
This parameter receives the status information of the requested DTC. It follows the format as defined in ISO14229-1 If the return value of the function call is other than DEM_FILTERED_OK this parameter does not contain valid data. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
The status of the DTC is correctly provided in the DTCStatus parameter. |
E_NOT_OK |
No DTC selected |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist |
DEM_PENDING |
Retrieving the DTC status is currently in progress. The caller shall call this function again at a later moment. |
DEM_NO_SUCH_ELEMENT |
Selected DTC does not have an assigned DTC status. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_GetSeverityOfDTC¶
Std_ReturnType Dem_GetSeverityOfDTC(Dem_DTCSeverityType *DTCSeverity, uint8 ClientId)
Gets the severity of the requested DTC. For large configurations and DTC-calibration, the interface behavior can be asynchronous (splitting the DTC-search into segments).
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
DTCSeverity |
This parameter contains the DTCSeverity according to ISO 14229-1. |
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
The DTC severity is correctly provided in the DTCSeverity parameter. |
E_NOT_OK |
No DTC selected |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist |
DEM_PENDING |
Retrieving the DTC status is currently in progress. The caller shall call this function again at a later moment. |
DEM_NO_SUCH_ELEMENT |
Selected DTC does not have an assigned DTC status. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_GetFunctionalUnitOfDTC¶
Std_ReturnType Dem_GetFunctionalUnitOfDTC(uint8 ClientId, uint8 *DTCFunctionalUnit)
Gets the functional unit of the requested DTC.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
DTCFunctionalUnit |
Functional unit value of this DTC |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
The DTC functional unit is provided in the parameter DTCFunctionalUnit. |
E_NOT_OK |
No DTC selected |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist |
DEM_PENDING |
Retrieving the DTC status is currently in progress. The caller shall call this function again at a later moment. |
DEM_NO_SUCH_ELEMENT |
Selected DTC does not have an assigned DTC status. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_SetDTCFilter¶
Std_ReturnType Dem_SetDTCFilter(uint8 ClientId, uint8 DTCStatusMask, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType DTCOrigin, boolean FilterWithSeverity, Dem_DTCSeverityType DTCSeverityMask, boolean FilterForFaultDetectionCounter)
Sets the DTC Filter. The server shall perform a bit-wise logical AND-ing operation between the parameter DTCStatusMask and the current UDS status in the server. In addition to the DTCStatus AvailabilityMask, the server shall return all DTCs for which the result of the AND-ing operation is non-zero [i.e. (statusOfDTC & DTCStatusMask) != 0]. The server shall process only the DTC Status bits that it is supporting. OBD Events Suppression shall be ignored for this computation. If no DTCs within the server match the masking criteria specified in the client request, no DTC or status information shall be provided following the DTCStatusAvailabilityMask byte in the positive response message (((statusOfDTC & DTCStatusMask) != 0) && ((severity & DTCSeverityMask) != 0)) == TRUE.
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[in] |
DTCStatusMask |
Status-byte mask for DTC status-byte filtering Values: 0x00: Autosar-specific value to deactivate the status-byte filtering (different meaning than in ISO 14229-1) to report all supported DTCs (used for service 0x19 subfunctions 0x0A/0x15) 0x01..0xFF: Status-byte mask according to ISO 14229-1 DTCStatusMask (handed over by Dcm from service request directly) to filter for DTCs with at least one status bit set matching this status-byte mask |
[in] |
DTCFormat |
Defines the output-format of the requested DTC values for the sub-sequent API calls. If passed value does not fit to Configuration, the DET error DEM_E_WRONG_CONFIGURATION shall be reported, e.g. if DTCFormat “DEM_DTC_FORMAT_OBD” is passed, but OBD is not supported per configuration. |
[in] |
DTCOrigin |
If the Dem supports more than one event memory this parameter is used to select the source memory the DTCs shall be read from. If passed value does not fit to Configuration, the DET error DEM_E_WRONG_CONFIGURATION shall be reported. |
[in] |
FilterWithSeverity |
This flag defines whether severity information (ref. to parameter below) shall be used for filtering. This is to allow for coexistence of DTCs with and without severity information. TRUE: severity information is used for filtering. FALSE: severity information is not used for filtering. |
[in] |
DTCSeverityMask |
Contains the DTCSeverityMask according to ISO14229-1. |
[in] |
FilterForFaultDetectionCounter |
This flag defines whether the fault detection counter information shall be used for filtering. This is to allow for coexistence of DTCs with and without fault detection counter information. If fault detection counter information is filter criteria, only those DTCs with a fault detection counter value between 1 and 0x7E shall be reported. Remark: If the event does not use the debouncing inside Dem, then the Dem must request this information via GetFaultDetectionCounter. TRUE: fault detection counter is used for filtering. FALSE: fault detection counter is not used for filtering. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Filter was successfully set. |
E_NOT_OK |
Indicates a wrong DTCOrigin or DTCFormat |
Dem_GetNumberOfFilteredDTC¶
Std_ReturnType Dem_GetNumberOfFilteredDTC(uint8 ClientId, uint16 *NumberOfFilteredDTC)
Gets the number of a filtered DTC.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
NumberOfFilteredDTC |
The number of DTCs matching the defined status mask. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Getting number of filtered DTCs was successful |
E_NOT_OK |
No DTC filter set |
DEM_PENDING |
Retrieving the DTC status is currently in progress. The caller shall call this function again at a later moment. |
Dem_GetNextFilteredDTC¶
Std_ReturnType Dem_GetNextFilteredDTC(uint8 ClientId, uint32 *DTC, uint8 *DTCStatus)
Gets the next filtered DTC matching the filter criteria. For UDS services, the interface has an asynchronous behavior, because a large number of DTCs has to be processed.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
DTC |
Receives the DTC value in respective format of the filter returned by this function. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[out] |
DTCStatus |
This parameter receives the status information of the requested DTC. It follows the format as defined in ISO14229-1 If the return value of the function call is other than DEM_FILTERED_OK this parameter does not contain valid data. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Returned next filtered element |
E_NOT_OK |
No DTC filter set |
DEM_NO_SUCH_ELEMENT |
No further element matching the filter criteria found |
DEM_PENDING |
The requested operation is currently in progress. The caller shall call this function again at a later moment. Note that according to SWS_Dem_00653 this return value is not always allowed. |
Dem_GetNextFilteredDTCAndFDC¶
Std_ReturnType Dem_GetNextFilteredDTCAndFDC(uint8 ClientId, uint32 *DTC, sint8 *DTCFaultDetectionCounter)
Gets the next filtered DTC and its associated Fault Detection Counter (FDC) matching the filter criteria. The interface has an asynchronous behavior, because a large number of DTCs has to be processed and the FDC might be received asynchronously from a SW-C, too.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
DTC |
Receives the DTC value in respective format of the filter returned by this function. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[out] |
DTCFaultDetectionCounter |
This parameter receives the Fault Detection Counter information of the requested DTC. If the return value of the function call is other than DEM_FILTERED_OK this parameter does not contain valid data. -128dec…127dec PASSED…FAILED according to ISO 14229-1 |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Returned next filtered element |
E_NOT_OK |
No DTC filter set |
DEM_NO_SUCH_ELEMENT |
No further element matching the filter criteria found |
DEM_PENDING |
The requested operation is currently in progress. The caller shall call this function again at a later moment. |
Dem_GetNextFilteredDTCAndSeverity¶
Std_ReturnType Dem_GetNextFilteredDTCAndSeverity(uint8 ClientId, uint32 *DTC, uint8 *DTCStatus, Dem_DTCSeverityType *DTCSeverity, uint8 *DTCFunctionalUnit)
Gets the next filtered DTC and its associated Severity matching the filter criteria. The interface has an asynchronous behavior, because a large number of DTCs has to be processed.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
DTC |
Receives the DTC value in respective format of the filter returned by this function. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
DTCStatus |
||
DTCSeverity |
||
DTCFunctionalUnit |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Returned next filtered element |
E_NOT_OK |
No DTC filter set |
DEM_NO_SUCH_ELEMENT |
No further element matching the filter criteria found |
DEM_PENDING |
The requested operation is currently in progress. The caller shall call this function again at a later moment. |
Dem_SetFreezeFrameRecordFilter¶
Std_ReturnType Dem_SetFreezeFrameRecordFilter(uint8 ClientId, Dem_DTCFormatType DTCFormat)
Sets a freeze frame record filter.
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[in] |
DTCFormat |
Defines the output-format of the requested DTC values |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Filter is accepted |
E_NOT_OK |
Wrong filter selected |
Dem_GetNextFilteredRecord¶
Std_ReturnType Dem_GetNextFilteredRecord(uint8 ClientId, uint32 *DTC, uint8 *RecordNumber)
Gets the next freeze frame record number and its associated DTC stored in the event memory. The interface has an asynchronous behavior, because NvRAM access might be required.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
DTC |
DTC Receives the DTC value in respective format of the filter returned by this function. If the return value of the function is other than E_OK this parameter does not contain valid data. |
[out] |
RecordNumber |
Freeze frame record number of the reported DTC (relative addressing). If the return value of the function is other than E_OK this parameter does not contain valid data. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Returned next filtered element |
DEM_NO_SUCH_ELEMENT |
No further element (matching the filter criteria) found |
DEM_PENDING |
The requested value is calculated asynchronously and currently not available. The caller can retry later. Only used by asynchronous interfaces. |
Dem_GetDTCByOccurrenceTime¶
Std_ReturnType Dem_GetDTCByOccurrenceTime(uint8 ClientId, Dem_DTCRequestType DTCRequest, uint32 *DTC)
Gets the DTC by occurrence time. There is no explicit parameter for the DTC-origin as the origin always is DEM_DTC_ORIGIN_PRIMARY_MEMORY.
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[in] |
DTCRequest |
This parameter defines the request type of the DTC. |
[out] |
DTC |
DTC Receives the DTC value in respective format of the filter returned by this function. If the return value of the function is other than E_OK this parameter does not contain valid data. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
get of DTC was successful |
E_NOT_OK |
the call was not successful |
DEM_NO_SUCH_ELEMENT |
The requested element is not stored |
Dem_DisableDTCRecordUpdate¶
Std_ReturnType Dem_DisableDTCRecordUpdate(uint8 ClientId)
Disables the event memory update of a specific DTC (only one at one time).
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Event memory update successfully disabled |
E_NOT_OK |
No DTC selected |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist or a group of DTC was selected |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist |
DEM_PENDING |
Disabling the DTC record update is currently in progress. The caller shall call this function again at a later moment. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_EnableDTCRecordUpdate¶
Std_ReturnType Dem_EnableDTCRecordUpdate(uint8 ClientId)
Enables the event memory update of the DTC disabled by
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
DTC record successfully updated. |
E_NOT_OK |
No DTC selected. |
Dem_GetSizeOfExtendedDataRecordSelection¶
Std_ReturnType Dem_GetSizeOfExtendedDataRecordSelection(uint8 ClientId, uint32 *SizeOfExtendedDataRecord)
Gets the size of Extended Data Record by DTC selected by the call of Dem_SelectExtended DataRecord.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
SizeOfExtendedDataRecord |
Size of the requested extended data record(s) including record number. The format for a single ExtendedDataRecord is: {RecordNumber, data[1], …, data[N]} |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Size returned successfully |
E_NOT_OK |
selection function is not called. |
DEM_PENDING |
The requested value is calculated asynchronously and currently not available. The caller can retry later. |
DEM_WRONG_DTC |
DTC value not existing |
DEM_WRONG_DTCORIGIN |
Wrong DTC origin |
DEM_NO_SUCH_ELEMENT |
Record number is not supported by configuration and therefore invalid |
Dem_GetSizeOfFreezeFrameSelection¶
Std_ReturnType Dem_GetSizeOfFreezeFrameSelection(uint8 ClientId, uint32 *SizeOfFreezeFrame)
Gets the size of Extended Data Record by DTC selected by the call of Dem_SelectExtended DataRecord.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
SizeOfFreezeFrame |
Number of bytes in the requested freeze frame record. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Size returned successfully |
E_NOT_OK |
selection function is not called. |
DEM_PENDING |
The requested value is calculated asynchronously and currently not available. The caller can retry later. |
DEM_WRONG_DTC |
DTC value not existing |
DEM_WRONG_DTCORIGIN |
Wrong DTC origin |
DEM_NO_SUCH_ELEMENT |
Record number is not supported by configuration and therefore invalid |
Dem_GetNextExtendedDataRecord¶
Std_ReturnType Dem_GetNextExtendedDataRecord(uint8 ClientId, uint8 *DestBuffer, uint16 *BufSize)
Gets extended data record for the DTC selected by Dem_SelectExtendedDataRecord. The function stores the data in the provided DestBuffer.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
DestBuffer |
This parameter contains a byte pointer that points to the buffer, to which the extended data record shall be written to. The format is: {ExtendedDataRecordNumber, data[0], data[1], …, data[n]} |
[inout] |
BufSize |
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Size and buffer successfully returned. |
E_NOT_OK |
selection function is not called. |
DEM_BUFFER_TOO_SMALL |
provided buffer size too small. |
DEM_PENDING |
The requested value is calculated asynchronously and currently not available. The caller can retry later. |
DEM_WRONG_DTC |
DTC value not existing |
DEM_WRONG_DTCORIGIN |
Wrong DTC origin |
DEM_NO_SUCH_ELEMENT |
Found no (further) element matching the filter criteria |
Dem_GetNextFreezeFrameData¶
Std_ReturnType Dem_GetNextFreezeFrameData(uint8 ClientId, uint8 *DestBuffer, uint16 *BufSize)
Gets extended data record for the DTC selected by Dem_SelectExtendedDataRecord. The function stores the data in the provided DestBuffer.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
DestBuffer |
This parameter contains a byte pointer that points to the buffer, to which the freeze frame data record shall be written to. The format is: {RecordNumber, NumOfDIDs, DID[1], data[1], …, DID[N], data[N]} |
[inout] |
BufSize |
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Size and buffer successfully returned. |
E_NOT_OK |
selection function is not called. |
DEM_BUFFER_TOO_SMALL |
provided buffer size too small. |
DEM_PENDING |
The requested value is calculated asynchronously and currently not available. The caller can retry later. |
DEM_WRONG_DTC |
DTC value not existing |
DEM_WRONG_DTCORIGIN |
Wrong DTC origin |
DEM_NO_SUCH_ELEMENT |
Found no (further) element matching the filter criteria |
Dem_SelectExtendedDataRecord¶
Std_ReturnType Dem_SelectExtendedDataRecord(uint8 ClientId, uint8 ExtendedDataNumber)
Sets the filter to be used by Dem_GetNextExtendedDataRecord and Dem_GetSizeOfExtendedDataRecordSelection.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[in] |
ExtendedDataNumber |
Identification/Number of requested extended data record. For primary fault memory the value of 0xFE is explictely allowed to request all regulated emissions OBD DTC extended data records. The value of 0xFF is explicitely allowed in all fault memories to retrieve the data of all extended datal records. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Extended data record successfully selected. |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist. |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist. |
DEM_PENDING |
Selecting the extended data record is currently in progress. The caller shall call this function again at a later moment. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_SelectFreezeFrameData¶
Std_ReturnType Dem_SelectFreezeFrameData(uint8 ClientId, uint8 RecordNumber)
Sets the filter to be used by Dem_GetNextFreezeFrameData and Dem_GetSizeOfFreezeFrame Selection.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[in] |
RecordNumber |
Unique identifier for a snapshot record as defined in ISO 14229-1. The value 0xFF is a placeholder referencing all snapshot records of the addressed DTC. The value 0x00 indicates the DTC-specific WWH-OBD snapshot record. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Freeze frame data successfully selected. |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist. |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist. |
DEM_PENDING |
Selecting the freeze frame is currently in progress. The caller shall call this function again at a later moment. |
DEM_BUSY |
A different Dem_SelectDTC dependent operation according to SWS_Dem_01253 of this client is currently in progress. |
Dem_GetNumberOfFreezeFrameRecords¶
Std_ReturnType Dem_GetNumberOfFreezeFrameRecords(uint8 ClientId, uint16 *NumberOfFilteredRecords)
This function returns the number of all freeze frame records currently stored in the primary event memory.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
NumberOfFilteredRecords |
Number of all freeze frame records currently stored in the primary event memory. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Returned correctly the number of freeze frame records |
DEM_PENDING |
The requested value is calculated asynchronously and currently not available. The caller can retry later |
Dem_DisableDTCSetting¶
Std_ReturnType Dem_DisableDTCSetting(uint8 ClientId)
Disables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Returned next filtered element |
DEM_PENDING |
The requested operation is currently in progress. The caller shall call this function again at a later moment. |
Dem_EnableDTCSetting¶
Std_ReturnType Dem_EnableDTCSetting(uint8 ClientId)
(Re)-Enables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.
- Sync/Async
Asynchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
The operation was successful; |
DEM_PENDING |
The started operation is currently in progress. The caller shall call this function again at a later moment. |
Dem_SetEventDisabled¶
Std_ReturnType Dem_SetEventDisabled(Dem_EventIdType EventId)
Service for reporting the event as disabled to the Dem for the PID $41 computation. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
EventId |
Identification of an event by assigned EventId. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
set of event to disabled was successfull. |
E_NOT_OK |
set of event disabled failed |
Dem_RepIUMPRFaultDetect¶
Std_ReturnType Dem_RepIUMPRFaultDetect(Dem_RatioIdType RatioID)
Service for reporting that faults are possibly found because all conditions are fullfilled. API is needed in OBD-relevant ECUs only API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different EventIds. Non reentrant for the same EventId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
RatioID |
Ratio Identifier reporting that a respective monitor could have found a fault only used when interface option “API” is selected |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
report of IUMPR result was successfully reported |
Dem_SetIUMPRDenCondition¶
Std_ReturnType Dem_SetIUMPRDenCondition(Dem_IumprDenomCondIdType ConditionId, Dem_IumprDenomCondStatusType ConditionStatus)
In order to communicate the status of the (additional) denominator conditions among the OBD relevant ECUs, the API is used to forward the condition status to a Dem of a particular ECU. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ConditionId |
Identification of a IUMPR denominator condition ID (General Denominator, Cold start, EVAP, 500mi). |
[in] |
ConditionStatus |
Status of the IUMPR denominator condition (Not-reached, reached, not reachable / inhibited) |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
set of IUMPR denominator condition was successful |
E_NOT_OK |
set of IUMPR denominator condition failed or could not be accepted. |
Dem_GetIUMPRDenCondition¶
Std_ReturnType Dem_GetIUMPRDenCondition(Dem_IumprDenomCondIdType ConditionId, Dem_IumprDenomCondStatusType *ConditionStatus)
In order to communicate the status of the (additional) denominator conditions among the OBD relevant ECUs, the API is used to forward the condition status to a Dem of a particular ECU. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ConditionId |
Identification of a IUMPR denominator condition ID (General Denominator, Cold start, EVAP, 500mi). |
[in] |
ConditionStatus |
Status of the IUMPR denominator condition (Not-reached, reached, not reachable / inhibited) |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
get of IUMPR denominator condition status was successful |
E_NOT_OK |
get of condition status failed |
Dem_RepIUMPRDenRelease¶
Std_ReturnType Dem_RepIUMPRDenRelease(Dem_RatioIdType RatioID)
Service is used to release a denominator of a specific monitor. API is needed in OBD-relevant ECUs only API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
RatioID |
Ratio Identifier reporting that specific denominator is released (for physical reasons |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
report of IUMPR denominator status was successfully reported |
E_NOT_OK |
report of IUMPR denominator status was not successfully reported |
Dem_SetPtoStatus¶
Std_ReturnType Dem_SetPtoStatus(boolean PtoStatus)
API is needed in OBD-relevant ECUs only API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
PtoStatus |
sets the status of the PTO (TRUE==active; FALSE==inactive) |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Returns E_OK when the new PTO-status has been adopted by the Dem |
E_NOT_OK |
returns E_NOT_OK in all other cases. |
Dem_ReadDataOfPID01¶
Std_ReturnType Dem_ReadDataOfPID01(uint8 *PID01value)
Service to report the value of PID $01 computed by the Dem. API is needed in OBD relevant ECUs only.
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID01value |
Buffer containing the contents of PID $01 computed by the Dem. The buffer is provided by the application with the size of 4 bytes. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
Always |
E_OK is returned, as E_NOT_OK will never appear. |
Dem_GetDataOfPID21¶
Std_ReturnType Dem_GetDataOfPID21(uint8 *PID21value)
Service to get the value of PID $21 from the Dem by a software component. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemGeneral OBD.DemOBDCentralizedPID21Handling)} == true) && ({ecuc(Dem/DemGeneral.DemOBDSupport)} == DEM_OBD_MASTER_ECU)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID21value |
Content of PID $21 as raw hex value. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
Always |
E_OK is returned, as E_NOT_OK will never appear. |
Dem_SetDataOfPID21¶
Std_ReturnType Dem_SetDataOfPID21(const uint8 *PID21value)
Service to set the value of PID $21 in the Dem by a software component. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
PID21value |
Buffer containing the contents of PID $21. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
Always |
E_OK is returned, as E_NOT_OK will never appear. |
Dem_SetDataOfPID31¶
Std_ReturnType Dem_SetDataOfPID31(const uint8 *PID31value)
Service to set the value of PID $31 in the Dem by a software component. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
PID31value |
Buffer containing the contents of PID $31. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
Always |
E_OK is returned, as E_NOT_OK will never appear. |
Dem_SetDataOfPID4D¶
Std_ReturnType Dem_SetDataOfPID4D(const uint8 *PID4Dvalue)
Service to set the value of PID $4D in the Dem by a software component. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
PID4Dvalue |
Buffer containing the contents of PID $4D. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
Always |
E_OK is returned, as E_NOT_OK will never appear. |
Dem_SetDataOfPID4E¶
Std_ReturnType Dem_SetDataOfPID4E(const uint8 *PID4Evalue)
Service to set the value of PID $4E in the Dem by a software component. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
PID4Evalue |
Buffer containing the contents of PID $4E. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
Always |
E_OK is returned, as E_NOT_OK will never appear. |
Dem_GetCycleQualified¶
Std_ReturnType Dem_GetCycleQualified(uint8 OperationCycleId, boolean *isQualified)
Returns the qualification state of the dependent operation cycle. API Availability: This API will be available only if any of the ({ecuc(Dem/DemGeneral/DemOperationCycle.DemLeadingCycleRef)} != NULL)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
OperationCycleId |
Identification of a configured DemOperationCycle. |
[out] |
isQualified |
TRUE: The dependent operation cylcle is qualified. FALSE: The qualification conditions of the dependent operation cylcle have not been met. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
Always |
E_OK is returned, as E_NOT_OK will never appear. |
Dem_SetCycleQualified¶
Std_ReturnType Dem_SetCycleQualified(uint8 OperationCycleId)
Sets a dependent operation cycle as qualified, so it may be processed along with its leading cycle.
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
OperationCycleId |
Identification of a configured DemOperationCycle. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
Always |
E_OK is returned. |
Dem_GetDTCSeverityAvailabilityMask¶
Std_ReturnType Dem_GetDTCSeverityAvailabilityMask(uint8 ClientId, Dem_DTCSeverityType *DTCSeverityMask)
Gets the DTC Severity availability mask.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module. |
[out] |
DTCSeverityMask |
DTCSeverityMask The value DTCSeverityMask indicates the supported DTC severity bits from the Dem. All supported information is indicated by setting the corresponding status bit to 1. See ISO14229-1. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
get of DTC severity mask was successful |
E_NOT_OK |
get of DTC severity mask failed |
Dem_GetB1Counter¶
Std_ReturnType Dem_GetB1Counter(uint16 *B1Counter)
Service to report the value of the B1 counter computed by the Dem. API is needed in WWH-OBD relevant ECUs only.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
B1Counter |
Buffer containing the B1 counter. The buffer is provided by the application with the size of 2 bytes. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
Always |
E_OK is returned, as E_NOT_OK will never appear. |
Dem_SetDTR¶
Std_ReturnType Dem_SetDTR(uint16 DTRId, sint32 TestResult, sint32 LowerLimit, sint32 UpperLimit, Dem_DTRControlType Ctrlval)
Reports a DTR result with lower and upper limit. The internal eventstatus serves as master whether the DTR values are forwarded or ignored, also taking the DTRUpdateKind into account. The EventId that is related to the DTR is assigned per configuration (and derived from ServiceNeeds). Processing takes enable/storage conditions into account. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different DTRIds. Non reentrant for the same DTRId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
DTRId |
Identification of a DTR element by assigned DTRId. |
[in] |
TestResult |
Test result of DTR |
[in] |
LowerLimit |
Lower limit of DTR |
[in] |
UpperLimit |
Upper limit of DTR |
[in] |
Ctrlval |
Control value of the DTR to support its interpretation Dem-internally. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Report of DTR result successful |
E_NOT_OK |
Report of DTR result failed |
Dem_MainFunction¶
void Dem_MainFunction(void)
Processes all not event based Dem internal functions.
- Sync/Async
Synchronous
- Reentrancy
Non reentrant
- Return type
void
Dem_SatellitePreInit¶
void Dem_SatellitePreInit(void)
Dem_SatellitePreInit is called directly for pre-initialization in case of single partition, or executed by the corresponding partition in case of multiple partitions.
- Sync/Async
Synchronous
- Reentrancy
Non reentrant
- Return type
void
Dem_SatelliteInit¶
void Dem_SatelliteInit(void)
Dem_SatelliteInit is called directly for initialization in case of single partition, or executed by the corresponding partition in case of multiple partitions.
- Sync/Async
Synchronous
- Reentrancy
Non reentrant
- Return type
void
Dem_SatelliteMainFunction¶
void Dem_SatelliteMainFunction(void)
Cyclic DemSatellite timer task. Processes all time debounce of satellite.
- Sync/Async
Synchronous
- Reentrancy
Non reentrant
- Return type
void
提供给NvM的回调函数(Callback functions provided to NvM)¶
Dem_NvMInitAdminData¶
Std_ReturnType Dem_NvMInitAdminData(NvM_InitBlockRequestType InitBlockRequest)
Initializes the NvBlock for administrative data supposed to be called by the NvM in order to (re)initialize the data in case the non-volatile memory has never been stored, or was corrupted. (See NvMBlockDescriptor/NvMInitBlockCallback) It can also be used to force a reinitialization of the Dem data triggered by the application (e.g. after a new software version has been flashed to the ECU). In the latter case, make sure the function is not called while the Dem is active.
- Sync/Async
Synchronous
- Reentrancy
Non reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
InitBlockRequest |
The request type of the currentlyprocessed block |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Initializes the NvBlock for administrative data successfully |
E_NOT_OK |
Initializes the NvBlock for administrative data failed |
Dem_NvMInitStatusData¶
Std_ReturnType Dem_NvMInitStatusData(NvM_InitBlockRequestType InitBlockRequest)
Initializes the NvBlock for event status data supposed to be called by the NvM in order to (re)initialize the data in case the non-volatile memory has never been stored, or was corrupted. (See NvMBlockDescriptor/NvMInitBlockCallback) It can also be used to force a reinitialization of the Dem data triggered by the application (e.g. after a new software version has been flashed to the ECU). In the latter case, make sure the function is not called while the Dem is active.
- Sync/Async
Synchronous
- Reentrancy
Non reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
InitBlockRequest |
The request type of the currentlyprocessed block |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Initializes the NvBlock for event status data successfully |
E_NOT_OK |
Initializes the NvBlock for event status data failed |
Dem_NvMInitDebounceData¶
Std_ReturnType Dem_NvMInitDebounceData(NvM_InitBlockRequestType InitBlockRequest)
Initializes the NvBlock for persisted debounce values supposed to be called by the NvM in order to (re)initialize the data in case the non-volatile memory has never been stored, or was corrupted. (See NvMBlockDescriptor/NvMInitBlockCallback) It can also be used to force a reinitialization of the Dem data triggered by the application (e.g. after a new software version has been flashed to the ECU). In the latter case, make sure the function is not called while the Dem is active.
- Sync/Async
Synchronous
- Reentrancy
Non reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
InitBlockRequest |
The request type of the currentlyprocessed block |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Initializes the NvBlock for persisted debounce values successfully |
E_NOT_OK |
Initializes the NvBlock for persisted debounce values failed |
Dem_NvMJobFinished¶
Std_ReturnType Dem_NvMJobFinished(NvM_BlockRequestType ServiceId, NvM_RequestResultType JobResult)
Notifies the Dem module about a completed NV operation This function has to be called by the NvM after a write operation has finished. (See NvMBlockDescriptor/NvMSingleBlockCallback)
- Sync/Async
Synchronous
- Reentrancy
Non reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ServiceId |
Service identifier |
[in] |
JobResult |
Result of the NV job |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Notification is successful |
E_NOT_OK |
Notification is fail |
提供给Dcm的函数(Functions provided to Dcm)¶
Dem_SetDTCFilterByExtendedDataRecordNumber¶
Std_ReturnType Dem_SetDTCFilterByExtendedDataRecordNumber(uint8 ClientId, Dem_DTCFormatType DTCFormat, uint8 ExtendedDataRecordNumber)
Sets the DTC Filter based on a given extended data record on the primary fault memory. The server selects all DTCs that have a matching extended data record.
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
Unique client id, assigned to the instance of the calling module |
[in] |
DTCFormat |
Defines the DTC format of the requested data. Valid selections are DEM_DTC_FORMAT_UDS and DEM_DTC_FORMAT_OBD_3BYTE. |
[in] |
ExtendedDataRecordNumber |
the extended data record number the filter is set for. Valid values are within the range of 0x01 and 0xFD. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
DTC filter for requested extended data record successfully set. |
E_NOT_OK |
Indicates an invalid extended data record number was selected. |
Dem_SetDTCFilterByReadinessGroup¶
Std_ReturnType Dem_SetDTCFilterByReadinessGroup(uint8 ClientID, Dem_DTCFormatType DTCFormat, Dem_EventOBDReadinessGroupType ReadinessGroupNumber)
Sets the DTC Filter based on a given DTC readiness group on the primary fault memory. The server selects all DTCs that have this DTC readiness group configured.
- Sync/Async
Synchronous
- Reentrancy
Reentrant for different ClientIds, non reentrant for the same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
ClientID |
||
[in] |
DTCFormat |
Defines the DTC format of the requested data. Valid selections are DEM_DTC_FORMAT_UDS and DEM_DTC_FORMAT_OBD_3BYTE. |
[in] |
ReadinessGroupNumber |
Specifies the DTC readiness group number defined by SAE J1979-DA. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
DTC filter for requested DTC readiness group successfully set. |
E_NOT_OK |
Indicates an invalid DTC readiness group was selected. |
Dem_DcmGetInfoTypeValue08¶
Std_ReturnType Dem_DcmGetInfoTypeValue08(Dcm_OpStatusType OpStatus, uint8 *Iumprdata08, uint8 *Iumprdata08BufferSize)
Service is used for requesting IUMPR data according to InfoType $08. This interface is derived from the prototype <Module>_GetInfotypeValueData() defined by the Dcm. Therefore Dcm_OpStatusType and Std_ReturnType are contained. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
OpStatus |
Only DCM_INITIAL will appear, because this API behaves synchronous. |
[out] |
Iumprdata08 |
Buffer containing the number of data elements (as defined in ISO-15031-5) and contents of InfoType $08. The buffer is provided by the Dcm. |
[inout] |
Iumprdata08BufferSize |
The maximum number of data bytes that can be written to the Iumprdata08 Buffer. When the function returns, the value is updated with the actual number of data bytes that are written to the Iumprdata08BufferSize. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned. |
Dem_DcmGetInfoTypeValue0B¶
Std_ReturnType Dem_DcmGetInfoTypeValue0B(Dcm_OpStatusType OpStatus, uint8 *Iumprdata0B, uint8 *Iumprdata0BBufferSize)
Service is used for requesting IUMPR data according to InfoType $0B. This interface is derived from the prototype <Module>_GetInfotypeValueData() defined by the Dcm. Therefore Dcm_OpStatusType and Std_ReturnType are contained. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
OpStatus |
Only DCM_INITIAL will appear, because this API behaves synchronous. |
[out] |
Iumprdata0B |
Buffer containing the number of data elements (as defined in ISO-15031-5) and contents of InfoType $0B. The buffer is provided by the Dcm. |
[inout] |
Iumprdata0BBufferSize |
The maximum number of data bytes that can be written to the Iumprdata0B Buffer. When the function returns, the value is updated with the actual number of data bytes that are written to the Iumprdata0BBufferSize. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned. |
Dem_DcmReadDataOfPID01¶
Std_ReturnType Dem_DcmReadDataOfPID01(uint8 *PID01value)
Service to report the value of PID $01 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID01value |
Buffer containing the contents of PID $01 computed by the Dem. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned, as E_NOT_OK will never appear. |
Dem_DcmReadDataOfPID1C¶
Std_ReturnType Dem_DcmReadDataOfPID1C(uint8 *PID1Cvalue)
Service to report the value of PID $1C computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID1Cvalue |
Buffer containing the contents of PID $1C computed by the Dem. The value of PID$1C is configuration within DemOBDCompliancy. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned, as E_NOT_OK will never appear. |
Dem_DcmReadDataOfPID21¶
Std_ReturnType Dem_DcmReadDataOfPID21(uint8 *PID21value)
Service to report the value of PID $21 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID21value |
Buffer containing the contents of PID $21 computed by the Dem. The value of PID$21 is configuration within DemOBDCompliancy. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned, as E_NOT_OK will never appear. |
Dem_DcmReadDataOfPID30¶
Std_ReturnType Dem_DcmReadDataOfPID30(uint8 *PID30value)
Service to report the value of PID $30 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID30value |
Buffer containing the contents of PID $30 computed by the Dem. The value of PID$30 is configuration within DemOBDCompliancy. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned, as E_NOT_OK will never appear. |
Dem_DcmReadDataOfPID31¶
Std_ReturnType Dem_DcmReadDataOfPID31(uint8 *PID31value)
Service to report the value of PID $31 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} == DEM_OBD_MASTER_ECU)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID31value |
Buffer containing the contents of PID $31 computed by the Dem. The value of PID$31 is configuration within DemOBDCompliancy. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned, as E_NOT_OK will never appear. |
Dem_DcmReadDataOfPID41¶
Std_ReturnType Dem_DcmReadDataOfPID41(uint8 *PID41value)
Service to report the value of PID $41 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} == DEM_OBD_MASTER_ECU)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID41value |
Buffer containing the contents of PID $41 computed by the Dem. The value of PID$41 is configuration within DemOBDCompliancy. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned, as E_NOT_OK will never appear. |
Dem_DcmReadDataOfPID4D¶
Std_ReturnType Dem_DcmReadDataOfPID4D(uint8 *PID4Dvalue)
Service to report the value of PID $4D computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} == DEM_OBD_MASTER_ECU)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID4Dvalue |
Buffer containing the contents of PID $4D computed by the Dem. The value of PID$4D is configuration within DemOBDCompliancy. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned, as E_NOT_OK will never appear. |
Dem_DcmReadDataOfPID4E¶
Std_ReturnType Dem_DcmReadDataOfPID4E(uint8 *PID4Evalue)
Service to report the value of PID $4E computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} == DEM_OBD_MASTER_ECU)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID4Evalue |
Buffer containing the contents of PID $4E computed by the Dem. The value of PID$4E is configuration within DemOBDCompliancy. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned, as E_NOT_OK will never appear. |
Dem_DcmReadDataOfPID91¶
Std_ReturnType Dem_DcmReadDataOfPID91(uint8 *PID91value)
Service to report the value of PID $91 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} == DEM_OBD_MASTER_ECU)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PID91value |
Buffer containing the contents of PID $91 computed by the Dem. The value of PID$91 is configuration within DemOBDCompliancy. The buffer is provided by the Dcm with the appropriate size, i.e. during configuration, the Dcm identifies the required size from the largest PID in order to configure a PIDBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned, as E_NOT_OK will never appear. |
Dem_DcmReadDataOfOBDFreezeFrame¶
Std_ReturnType Dem_DcmReadDataOfOBDFreezeFrame(uint8 PID, uint8 DataElementIndexOfPID, uint8 *DestBuffer, uint16 *BufSize)
Gets data element per PID and index of the most important freeze frame being selected for the output of service $02. The function stores the data in the provided DestBuffer. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
PID |
This parameter is an identifier for a PID as defined in ISO15031-5. |
[in] |
DataElementIndexOfPID |
Data element index of this PID according to the Dcm configuration of service $02. It is zero-based and consecutive, and ordered by the data element positions (configured in Dcm, refer to SWS_Dem_00597). |
[inout] |
DestBuffer |
This parameter contains a byte pointer that points to the buffer, to which the data element of the PID shall be written to. The format is raw hexadecimal values and contains no header-information. |
[inout] |
BufSize |
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Freeze frame data was successfully reported |
E_NOT_OK |
Freeze frame data was not successfully reported |
Dem_DcmGetDTCOfOBDFreezeFrame¶
Std_ReturnType Dem_DcmGetDTCOfOBDFreezeFrame(uint8 FrameNumber, uint32 *DTC, Dem_DTCFormatType DTCFormat)
Gets DTC by freeze frame record number. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
FrameNumber |
Unique identifier for a freeze frame record as defined in ISO 15031-5. The value 0x00 indicates the complete OBD freeze frame. Other values are reserved for future functionality |
[out] |
DTC |
Diagnostic Trouble Code in ODB format. If the return value of the function is other than E_OK this parameter does not contain valid data. |
[in] |
DTCFormat |
Output format of the DTC value. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
operation was successful |
E_NOT_OK |
no DTC available |
Dem_DcmGetAvailableOBDMIDs¶
Std_ReturnType Dem_DcmGetAvailableOBDMIDs(uint8 Obdmid, uint32 *Obdmidvalue)
Reports the value of a requested “availability-OBDMID” to the DCM upon a Service $06 request. Derived from that the tester displays the supported tests a mechanic can select from. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
Obdmid |
Availablity OBDMID ($00,$20, $40…) |
[out] |
Obdmidvalue |
Bit coded information on the support of OBDMIDs. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Report of DTR result successful |
Dem_DcmGetNumTIDsOfOBDMID¶
Std_ReturnType Dem_DcmGetNumTIDsOfOBDMID(uint8 Obdmid, uint8 *numberOfTIDs)
Gets the number of TIDs per (functional) OBDMID. This can be used by the DCM to iteratively request for OBD/TID result data within a loop from 0….numberOfTIDs-1 API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
Obdmid |
OBDMID subject of the request to identify the number of assigned TIDs |
[out] |
numberOfTIDs |
Number of assigned TIDs for the requested OBDMID. Used as loop value for the DCM to retrieve all OBD/TID result data. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
get number of TIDs successful |
E_NOT_OK |
get number of TIDs failed |
Dem_DcmGetDTRData¶
Std_ReturnType Dem_DcmGetDTRData(uint8 Obdmid, uint8 TIDindex, uint8 *TIDvalue, uint8 *UaSID, uint16 *Testvalue, uint16 *Lowlimvalue, uint16 *Upplimvalue)
Reports a DTR data along with TID-value, UaSID, test result with lower and upper limit. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
Obdmid |
Identification of a DTR element by assigned DTRId. |
[in] |
TIDindex |
Index of the TID within the DEM. Runs from 0 to “numberOfTIDs” obtained in the call to |
[out] |
TIDvalue |
TID to be put on the tester reponse |
[out] |
UaSID |
UaSID to be put on the tester reponse |
[out] |
Testvalue |
Latest test result |
[out] |
Lowlimvalue |
Lower limit value associated to the latest test result |
[out] |
Upplimvalue |
Upper limit value associated to the latest test result |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Report of DTR result successful |
E_NOT_OK |
Report of DTR result failed |
Dem_DcmGetInfoTypeValue79¶
Std_ReturnType Dem_DcmGetInfoTypeValue79(Dcm_OpStatusType OpStatus, uint8 *DataValueBuffer, uint8 *DataValueBufferSize)
Service to report the value of monitor activity denominator PID computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if: ({ecucDem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
OpStatus |
OpStatus “Only DCM_INITIAL will appear, because this API behaves synchronous.” |
[out] |
DataValueBuffer |
Buffer containing the contents of the monitor activity denominator. The buffer is provided by the caller with the appropriate size. |
[inout] |
DataValueBufferSize |
The maximum number of data bytes that can be written to the DataValueBuffer. When the function returns, the value is updated with the actual number of data bytes that are written to the Data ValueBuffer. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned |
Dem_DcmReadDataOfPIDF501¶
Std_ReturnType Dem_DcmReadDataOfPIDF501(uint8 *PIDF501value)
Function to report the value of PID 0xF501 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if: ({ecucDem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
PIDF501value |
Buffer containing the contents of the PID 0xF501. The buffer is provided by the Dcm with the appropriate size. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Always E_OK is returned |
提供给J1939Dcm的函数(Functions provided to J1939Dcm)¶
Dem_J1939DcmSetDTCFilter¶
Std_ReturnType Dem_J1939DcmSetDTCFilter(Dem_J1939DcmDTCStatusFilterType DTCStatusFilter, Dem_DTCKindType DTCKind, Dem_DTCOriginType DTCOrigin, uint8 ClientId, Dem_J1939DcmLampStatusType *LampStatus)
The function sets the DTC filter for a specific node and returns the composite lamp status of the filtered DTCs.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
DTCStatusFilter |
The following types are available: DEM_J1939DTC_ACTIVE DEM_J1939DTC_PREVIOUSLY_ACTIVE DEM_J1939DTC_PENDING DEM_J1939DTC_PERMANENT DEM_J1939DTC_CURRENTLY_ACTIVE |
[in] |
DTCKind |
Defines the functional group of DTCs to be reported (e.g. all DTC, OBD-relevant DTC) |
[in] |
DTCOrigin |
This parameter is used to select the source memory the DTCs shall be read/cleared from. |
[in] |
ClientId |
ClientId to address the J1939 event memory |
[out] |
LampStatus |
Receives the lamp status returned by this function. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
E_NOT_OK |
Filter could not be set |
Dem_J1939DcmGetNumberOfFilteredDTC¶
Std_ReturnType Dem_J1939DcmGetNumberOfFilteredDTC(uint16 *NumberOfFilteredDTC, uint8 ClientId)
Gets the number of currently filtered DTCs set by the function Dem_J1939DcmSetDTCFilter.
- Sync/Async
Asynchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
NumberOfFilteredDTC |
The number of DTCs matching the defined status mask. |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
E_NOT_OK |
Operation successful and result pending. |
Dem_J1939DcmGetNextFilteredDTC¶
Std_ReturnType Dem_J1939DcmGetNextFilteredDTC(uint32 *J1939DTC, uint8 *OccurenceCounter, uint8 ClientId)
Gets the next filtered J1939 DTC.
- Sync/Async
Asynchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
J1939DTC |
Receives the J1939DTC value. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[out] |
OccurenceCounter |
This parameter receives the corresponding occurrence counter. If the return value of the function call is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
DEM_NO_SUCH_ELEMENT |
The requested element is not available |
DEM_PENDING |
Operation successful and result pending. |
DEM_BUFFER_TOO_SMALL |
The provided buffer is too small |
Dem_J1939DcmFirstDTCwithLampStatus¶
void Dem_J1939DcmFirstDTCwithLampStatus(uint8 ClientId)
The function sets the filter to the first applicable DTC for the DM31 response for a specific node.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
void
Dem_J1939DcmGetNextDTCwithLampStatus¶
Std_ReturnType Dem_J1939DcmGetNextDTCwithLampStatus(Dem_J1939DcmLampStatusType *LampStatus, uint32 *J1939DTC, uint8 *OccurenceCounter, uint8 ClientId)
Gets the next filtered J1939 DTC for DM31 including current LampStatus.
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
LampStatus |
Receives the lamp status returned by this function. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[out] |
J1939DTC |
Receives the J1939DTC value. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[out] |
OccurenceCounter |
This parameter receives the corresponding occurrence counter. If the return value of the function call is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
DEM_NO_SUCH_ELEMENT |
The requested element is not available |
DEM_PENDING |
Operation successful and result pending. |
DEM_BUFFER_TOO_SMALL |
The provided buffer is too small |
Dem_J1939DcmClearDTC¶
Std_ReturnType Dem_J1939DcmClearDTC(Dem_J1939DcmSetClearFilterType DTCTypeFilter, Dem_DTCOriginType DTCOrigin, uint8 ClientId)
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).
- Sync/Async
Asynchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
DTCTypeFilter |
Defines the type of DTCs to be cleared. |
[in] |
DTCOrigin |
This parameter is used to select the source memory the DTCs shall be read/cleared from. |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
DTC successfully cleared |
DEM_WRONG_DTC |
Selected DTC value in selected format does not exist or clearing is restricted by configuration to group of all DTCs only. |
DEM_WRONG_DTCORIGIN |
Selected DTCOrigin does not exist |
DEM_CLEAR_FAILED |
DTC clearing failed |
DEM_CLEAR_BUSY |
Another client is currently clearing DTCs. The requested operation will not be started and the caller shall try again at a later moment. |
DEM_CLEAR_MEMORY_ERROR |
An error occurred during erasing a memory location (e.g. if DemClearDTCBehavior is set to DEM_CLRRESP_NON-VOLATILE_FINISH and erasing of non-volatile-block failed). |
DEM_PENDING |
Clearing the DTCs is currently in progress. The caller shall call this function again at a later moment. |
Dem_J1939DcmSetFreezeFrameFilter¶
Std_ReturnType Dem_J1939DcmSetFreezeFrameFilter(Dem_J1939DcmSetFreezeFrameFilterType FreezeFrameKind, uint8 ClientId)
The function sets the FreezeFrame filter for a specific node.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[in] |
FreezeFrameKind |
The following types are available: DEM_J1939DCM_FREEZEFRAME DEM_J1939DCM_EXPANDED_FREEZEFRAME DEM_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
E_NOT_OK |
Filter could not be set |
Dem_J1939DcmGetNextFreezeFrame¶
Std_ReturnType Dem_J1939DcmGetNextFreezeFrame(uint32 *J1939DTC, uint8 *OccurenceCounter, uint8 *DestBuffer, uint16 *BufSize, uint8 ClientId)
Gets next freeze frame data. The function stores the data in the provided DestBuffer.
- Sync/Async
Asynchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
J1939DTC |
Receives the J1939DTC value. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[out] |
OccurenceCounter |
This parameter receives the corresponding occurrence counter. If the return value of the function call is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[inout] |
DestBuffer |
This parameter contains a byte pointer that points to the buffer, to swhich the freeze frame data record shall be written to. |
[inout] |
BufSize |
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of writtens data bytes in Dest Buffer |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
DEM_NO_SUCH_ELEMENT |
The requested element is not available |
DEM_PENDING |
Operation successful and result pending. |
DEM_BUFFER_TOO_SMALL |
The provided buffer is too small |
Dem_J1939DcmGetNextSPNInFreezeFrame¶
Std_ReturnType Dem_J1939DcmGetNextSPNInFreezeFrame(uint32 *SPNSupported, uint8 *SPNDataLength, uint8 ClientId)
Gets next SPN.
- Sync/Async
Asynchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
SPNSupported |
This parameter contains the next SPN in the ExpandedFreezeFrame |
SPNDataLength |
||
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
DEM_NO_SUCH_ELEMENT |
The requested element is not available |
DEM_PENDING |
Operation successful and result pending. |
Dem_J1939DcmSetRatioFilter¶
Std_ReturnType Dem_J1939DcmSetRatioFilter(uint16 *IgnitionCycleCounter, uint16 *OBDMonitoringConditionsEncountered, uint8 ClientId)
The function sets the Ratio filter for a specific node and returns the corresponding Ignition Cycle Counter and General Denominator.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
IgnitionCycleCounter |
Ignition Cycle Counter |
[out] |
OBDMonitoringConditionsEncountered |
OBD Monitoring Conditions Encountered |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
E_NOT_OK |
Filter could not be set |
Dem_J1939DcmGetNextFilteredRatio¶
Std_ReturnType Dem_J1939DcmGetNextFilteredRatio(uint32 *SPN, uint16 *Numerator, uint16 *Denominator, uint8 ClientId)
Gets the next filtered Ratio.
- Sync/Async
Synchronous
- Reentrancy
Non Reentrant
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
SPN |
Receives the SPN of the applicaple system monitor. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[out] |
Numerator |
Receives the Numerator of the applicable system monitor. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[out] |
Denominator |
Receives the Denominator of the applicable system monitor. If the return value of the function is other than DEM_FILTERED_OK this parameter does not contain valid data. |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
DEM_NO_SUCH_ELEMENT |
The requested element is not available |
DEM_PENDING |
Operation successful and result pending. |
DEM_BUFFER_TOO_SMALL |
The provided buffer is too small |
Dem_J1939DcmReadDiagnosticReadiness1¶
Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness1(Dem_J1939DcmDiagnosticReadiness1Type *DataValue, uint8 ClientId)
Service to report the value of Diagnostic Readiness 1 (DM05) computed by the Dem.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
DataValue |
Buffer of 8 bytes containing the contents of Diagnostic Readiness1 (DM05) computed by the Dem. |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
E_NOT_OK |
Operation failed |
Dem_J1939DcmReadDiagnosticReadiness2¶
Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness2(Dem_J1939DcmDiagnosticReadiness2Type *DataValue, uint8 ClientId)
Service to report the value of Diagnostic Readiness 2 (DM21) computed by the Dem.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
DataValue |
Buffer of 8 bytes containing the contents of Diagnostic Readiness2 (DM21) computed by the Dem. |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
E_NOT_OK |
Operation failed |
Dem_J1939DcmReadDiagnosticReadiness3¶
Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness3(Dem_J1939DcmDiagnosticReadiness3Type *DataValue, uint8 ClientId)
Service to report the value of Diagnostic Readiness 3 (DM26) computed by the Dem.
- Sync/Async
Synchronous
- Reentrancy
Re-entrant for different ClientIDs, Non re-entrant for same ClientId.
Parameters
Dir |
Name |
Description |
|---|---|---|
[out] |
DataValue |
Buffer of 8 bytes containing the contents of Diagnostic Readiness3 (DM26) computed by the Dem. |
[in] |
ClientId |
ClientId to address the J1939 event memory |
- Return type
Std_ReturnType
Return values
Name |
Description |
|---|---|
E_OK |
Operation successful |
E_NOT_OK |
Operation failed |
依赖的服务(Dependent Services)¶
可选接口(Optional Interfaces)¶
API Function |
Header File |
Description |
|---|---|---|
Dcm_DemTriggerOnDTCStatus |
Dcm_Dem.h |
Triggers on changes of the UDS status byte. Allowsto trigger on ROE Event for subservice On DTCStatusChanged. |
Det_ReportError |
Det.h |
Service to report development errors. |
FiM_DemInit |
FiM_Dem.h |
This service re-initializes the FIM. |
FiM_DemTriggerOnComponentStatus |
FiM_Dem.h |
Triggers on changes of the component failed status. |
FiM_DemTriggerOnMonitorStatus |
FiM_Dem.h |
This service is provided to be called by the Dem in order to inform the Fim about monitor status changes. |
J1939Dcm_DemTriggerOnDTCStatus |
J1939Dcm_Dem.h |
Trigger for DM01 message that a UDS status change has happened. |
NvM_GetErrorStatus |
NvM.h |
Service to read the block dependent error/status information. |
NvM_ReadBlock |
NvM.h |
Service to copy the data of the NV block to its corresponding RAM block. |
NvM_SetRamBlockStatus |
NvM.h |
Service for setting the RAM block status of a permanent RAM block or the status of the explicit synchronization of a NVRAM block. |
NvM_WriteBlock |
NvM.h |
Service to copy the data of the RAM block to its corresponding NV block. |
配置接口(Configure Interface)¶
API Function |
Header File |
Description |
|---|---|---|
<Module>_DemInitMonitorFor<EventName> |
Dem_Lcfg.h |
Inits the diagnostic monitor of a specific event. There is one separate callback per event (if configured), if no port interface is provided by the Dem. |
<Module>_DemTriggerOnComponentStatus |
Dem_Callback.h |
Triggers on changes of the DemComponent failed status. |
<Module>_ClearDtcNotification |
Dem_Callback.h |
Called by the Dem when performing a clear DTC operation. |
<Module>_DemGeneralTriggerOnMonitorStatus |
Dem_Callback.h |
Triggers on changes of the monitor status. Called synchronously in context of event status reporting. |
<Module>_DemGeneralTriggerOnEventUdsStatus |
Dem_Lcfg.h |
Triggers on changes of the UDS DTC status byte. |
<Module>_DemTriggerOnEventUdsStatus |
Dem_Callback.h |
Triggers on changes of the UDS DTC status byte. |
<Module>_DemTriggerOnDTCStatus |
Dem_Lcfg.h |
Triggers on changes of the UDS status byte. |
<Module>_DemTriggerOnMonitorStatus |
Dem_Lcfg.h |
Triggers on changes of the monitor status. Called synchronously in context of event status reporting. |
<Module>_DemTriggerOnEventData |
Dem_Lcfg.h |
Triggers on changes of the event related data in the event memory. |
<Module>_DemClearEventAllowed<ForCondition> |
Dem_Lcfg.h |
Triggers on DTC-deletion, which is not allowed if the out-parameter returns False. There is one separate callback per condition, which can be assigned to one or several events, if no port interface is provided by the Dem. Parameter “Allowed” will be unchanged in case E_NOT_OK is returned. |
<Module>_DemRead<DataElement> |
Dem_Callback.h |
Requests the current value of the data element. There is one separate callback per data element, if no port interface is provided by the Dem. |
<Module>_DemGetFaultDetectionCounter<ForEvent> |
Dem_Lcfg.h |
Gets the current fault detection counter value. There is one c-callback per event using monitor-internal debouncing, if no port interface is provided by the Dem. |
配置(configuration)¶
主卫星分区(Master-satellite partition)¶
如图 DemMasterEcucPartitionRef 所示,在Dem/DemGeneral/DemMasterEcucPartitionRef配置master Partition。
As shown in DemMasterEcucPartitionRef, configure the master Partition in Dem/DemGeneral/DemMasterEcucPartitionRef.
DemMasterEcucPartitionRef¶
如图 DemEventEcucPartitionRef Config 所示,在每一个event下可以配置对应的Partition。
As shown in DemEventEcucPartitionRef Config, the corresponding Partition can be configured under each event.
DemEventEcucPartitionRef Config¶
所关联的partition必需在如图 EcuCPartition Config 中配置已配置。
The associated partition must be configured as shown in EcuCPartition Config.
EcuCPartition Config¶
扩展数据(Extended Data)¶
首先需要先配置数据元素类型,如图 DemDataElementClass Config 所示,在Dem/DemGeneral/DemDataElementClass 容器下可创建子容器,可配置数据元素长度、内部数据元素、数据元素的访问方式等配置。
First, it is necessary to configure the data element type. As shown in :ref:DemDataElementClass, sub-containers can be created under the Dem/DemGeneral/DemDataElementClass container, where configurations such as the length of data elements, internal data elements, and the access method of data elements can be set.
DemDataElementClass Config¶
其中内部元素包含FailedCycles、AGINGCTR_UPCNT、AGINGCTR_DOWNCNT、CURRENT_FDC、OCC1~OCC6、OVFLIND、SI30等。
The internal elements include FailedCycles, AGINGCTR_UPCNT, AGINGCTR_DOWNCNT, CURRENT_FDC, OCC1~OCC6, OVFLIND, SI30, etc.
DemInternalDataElement Config¶
配置的数据元素,在DemExtendedDataRecordClass中关联,如图:ref:DemExtendedDataRecordClass 所示,在Dem/DemGeneral/ DemExtendedDataRecordClass容器下可创建子容器,配置扩展数据号、扩展数据存储触发方式、是否允许更新扩展数据、扩展数据索引等配置。
The configured data elements are associated in DemExtendedDataRecordClass. As shown in :ref:DemExtendedDataRecordClass, sub-containers can be created under the Dem/DemGeneral/DemExtendedDataRecordClass container to configure settings such as the extended data number, extended data storage trigger mode, whether to allow updating extended data, and extended data index.
DemExtendedDataRecordClass Config¶
配置的DemExtendedDataRecordClass,在DemExtendedDataClass中关联,在Dem/DemGeneral/DemExtendedDataClasss容器下可创建子容器, 如图:ref:DemExtendedDataClass 所示。
The configured DemExtendedDataRecordClass is associated in DemExtendedDataClass. Sub-containers can be created under the Dem/DemGeneral/DemExtendedDataClass container, as shown in :ref:DemExtendedDataClass.
DemExtendedDataClass Config¶
上述中配置的DemExtendedDataRecordClass需要在DemDTCAttributes中关联,然后给DemEventParameter中使用。 详细参考诊断事件参数配置。
The DemExtendedDataRecordClass configured as mentioned above needs to be associated in DemDTCAttributes and then used in DemEventParameter. For details, please refer to the configuration of diagnostic event parameters.
冻结帧(Freeze Frame)¶
若配置冻结帧,需要先配置Did,如图 DemDidClass Config 所示,在Dem/DemGeneral/DemDidClass 容器下可创建子容器,配置Did标识、数据元素索引等配置。
If freeze frames are configured, it is necessary to first configure the Did. As shown in DemDidClass Config, sub-containers can be created under the Dem/DemGeneral/DemDidClass container to configure settings such as the Did identifier and data element index.
DemDidClass Config¶
配置的Did可在DemFreezeFrameClass中关联,如图:ref:DemFreezeFrameClass 所示,在Dem/DemGeneral/ DemFreezeFrameClass容器下可创建子容器,关联Did配置。
The configured Did can be associated in DemFreezeFrameClass. As shown in :ref:DemFreezeFrameClass, sub-containers can be created under the Dem/DemGeneral/DemFreezeFrameClass container to associate with the Did configuration.
DemFreezeFrameClass Config¶
配置DemFreezeFrameRecordClass,如图:ref:DemFreezeFrameRecordClass 所示,在Dem/DemGeneral/ DemFreezeFrameRecordClass容器下可创建子容器,配置冻结帧ID、冻结帧存储触发方式、允许更新冻结帧等配置。
Configure DemFreezeFrameRecordClass. As shown in :ref:DemFreezeFrameRecordClass, sub-containers can be created under the Dem/DemGeneral/DemFreezeFrameRecordClass container to configure settings such as freeze frame ID, freeze frame storage trigger mode, and permission to update freeze frames.
DemFreezeFrameRecordClass Config¶
配置的DemFreezeFrameRecordClass,在DemFreezeFrameRecNumClass中关联,如图:ref:DemFreezeFrameRecNumClass 所示, 在Dem/DemGeneral/DemFreezeFrameRecNumClass容器下可创建子容器,关联配置的DemFreezeFrameRecordClass。
The configured DemFreezeFrameRecordClass is associated in DemFreezeFrameRecNumClass. As shown in DemFreezeFrameRecNumClass Config, sub-containers can be created under the Dem/DemGeneral/DemFreezeFrameRecNumClass container to associate with the configured DemFreezeFrameRecordClass.
DemFreezeFrameRecNumClass Config¶
上述中配置的DemFreezeFrameRecNumClass需要在DemDTCAttributes中关联,然后给DemEventParameter中使用。 详细参考诊断事件参数配置。
The DemFreezeFrameRecNumClass configured as mentioned above needs to be associated in DemDTCAttributes and then used in DemEventParameter. For details, please refer to the configuration of diagnostic event parameters.
诊断事件参数(Diagnostic Event Parameters)¶
在Dem/DemConfigSet/DemEventParameter容器下创建子容器,如图 DemEventParameter Config 所示, 可配置指定组件内的优先级、Bit3置位阈值、诊断事件的ID 、事件种类、Dem事件的报告行为、DTC索引、 操作循环索引、DemEnableConditionGroup索引、DemStorageConditionGroup索引等参数。
Create a sub-container under the Dem/DemConfigSet/DemEventParameter container, as shown in :ref:DemEventParameter. Parameters such as the priority within the specified component, the Bit3 set threshold, the ID of the diagnostic event, the event type, the reporting behavior of the Dem event, the DTC index, the operation cycle index, the DemEnableConditionGroup index, and the DemStorageConditionGroup index can be configured.
DemEventParameter Config¶
在DemEventParameter中关联的DTC如图 DemDTC Config 所示,可配置DTC功能单元、DTCSeverity、 DTC值、存储策略、DTC属性索引、OBD DTC索引等。
The DTC associated in DemEventParameter is shown in DemDTC Config, where configurations such as DTC functional unit, DTC Severity, DTC value, storage strategy, DTC attribute index, and OBD DTC index can be made.
DemDTC Config¶
其中DTC属性索引如图:ref:DemDTCAttributes 所示,可以配置老化阈值、Bit5老化阈值、DTC优先级、 故障分类、扩展数据索引、冻结帧索引、冻结帧号、冻结帧号索引、对DemJ1939FreezeFrameClass的引用、对 DemJ1939FreezeFrameClass的引用、存储地址等参数。
The DTC attribute index is shown in DemDTCAttributes Config, where parameters such as aging threshold, Bit5 aging threshold, DTC priority, fault classification, extended data index, freeze frame index, freeze frame number, freeze frame number index, reference to DemJ1939FreezeFrameClass, reference to DemJ1939FreezeFrameClass, and storage address can be configured.
DemDTCAttributes Config¶
在DemEventParameter中关联的DemEnableConditionGroupRef,如图 DemEnableConditionGroup Config 所示, 可关联使能条件索引。
The DemEnableConditionGroupRef associated in DemEventParameter, as shown in DemEnableConditionGroup Config, can be linked to the enable condition index.
DemEnableConditionGroup Config¶
如图 DemEnableCondition Config 所示,可配置使能条件Id、使能条件状态等。
As shown in DemEnableCondition Config, the enable condition ID, enable condition status, etc. can be configured.
DemEnableCondition Config¶
在DemEventParameter中关联的DemStorageConditionGroupRef,如图 DemStorageConditionGroup Config 所示, 可关联存储条件索引。
The DemStorageConditionGroupRef associated in DemEventParameter, as shown in DemStorageConditionGroup Config, can be linked to the storage condition index.
DemStorageConditionGroup Config¶
如图 DemStorageCondition Config 所示,可配置存储条件Id、存储条件状态等。
As shown in DemStorageCondition Config, the storage condition ID, storage condition status, etc. can be configured.
DemStorageCondition Config¶
在DemEventParameter中关联的DemOperationCycleRef,可关联操作循环索引, 如图 DemOperationCycle Config 所示,DemOperationCycleId根据添加的数量自动增加。
The DemOperationCycleRef associated in DemEventParameter can be linked to the operation cycle index. As shown in DemOperationCycle Config, the DemOperationCycleId increases automatically according to the number of additions.
DemOperationCycle Config¶
在DemEventParameter中每个事件的回调接口可创建对应的子容器,选择是否配置回调接口。 如图 DemCallbackClearEventAllowed Config 所示,可配置ClearEventAllowed回调接口。
In DemEventParameter, a corresponding sub-container can be created for the callback interface of each event, and you can choose whether to configure the callback interface. As shown in DemCallbackClearEventAllowed Config, the ClearEventAllowed callback interface can be configured.
DemCallbackClearEventAllowed Config¶
如图 DemCallbackEventDataChanged Config 所示,可配置EventDataChanged回调接口。
As shown in DemCallbackEventDataChanged Config, the EventDataChanged callback interface can be configured.
DemCallbackEventDataChanged Config¶
如图 DemCallbackEventUdsStatusChanged Config 所示,可配置EventUdsStatusChanged回调接口。
As shown in DemCallbackEventUdsStatusChanged Config, the EventUdsStatusChanged callback interface can be configured.
DemCallbackEventUdsStatusChanged Config¶
如图 DemCallbackInitMForE Config 所示,可配置InitMonitorForEvent回调接口。
As shown in DemCallbackInitMForE Config, the InitMonitorForEvent callback interface can be configured.
DemCallbackInitMForE Config¶
如图 DemCallbackMonitorStatusChanged Config 所示,可配置MonitorStatusChanged回调接口。
As shown in DemCallbackMonitorStatusChanged Config, the MonitorStatusChanged callback interface can be configured.
DemCallbackMonitorStatusChanged Config¶
如图 DemIndicatorAttribute Config 所示,可配置指示器的行为、Indicator的失败循环次数、恢复循环次数、Indicator索引等。
As shown in DemIndicatorAttribute Config, configurations such as the behavior of the indicator, the number of failure cycles of the Indicator, the number of recovery cycles, and the Indicator index can be made.
DemIndicatorAttribute Config¶
去抖功能(Debounce Function)¶
如图 DemDebounceAlgorithmClass Config 所示,在Dem/DemConfigSet/DemEventParameter/DemDebounceAlgorithmClass 容器下可创建子容器关联基于计数/时间、或者监控内部(DemDebounceMonitorInternal)的去抖配置,在对应的子容器中关联配置好的 去抖功能即可。
As shown in :ref:DemDebounceAlgorithmClass, sub-containers can be created under the Dem/DemConfigSet/DemEventParameter/DemDebounceAlgorithmClass container to associate debounce configurations based on count/time or monitor internal (DemDebounceMonitorInternal). Simply associate the configured debounce function in the corresponding sub-container.
DemDebounceAlgorithmClass Config¶
若关联基于计数的去抖功能,如图 DemDebounceCounterBasedClass Config 所示,在Dem/DemConfigSet/ DemDebounceCounterBasedClass容器下可创建多个基于计数去抖的子容器,可配置去抖行为、计算counter的步长、触发fail/pass的阈值、 Jump-up/Jump-down的值、是否存储去抖计数等参数。
If associating a count-based debounce function, as shown in DemDebounceCounterBasedClass Config, multiple count-based debounce sub-containers can be created under the Dem/DemConfigSet/DemDebounceCounterBasedClass container. Parameters such as debounce behavior, step size for calculating the counter, threshold for triggering fail/pass, values of Jump-up/Jump-down, and whether to store the debounce count can be configured.
DemDebounceCounterBasedClass Config¶
若关联基于时间的去抖功能,如图 DemDebounceTimeBasedClass Config 所示,在Dem/DemConfigSet/DemDebounceTimeBasedClass 容器下可创建多个基于时间去抖的子容器,可配置去抖行为、触发fail/pass的阈值、分配事件内存条目和捕获冻结帧的阈值等参数。
If associating a time-based debounce function, as shown in DemDebounceTimeBasedClass Config, multiple time-based debounce sub-containers can be created under the Dem/DemConfigSet/DemDebounceTimeBasedClass container. Parameters such as debounce behavior, thresholds for triggering fail/pass, thresholds for allocating event memory entries and capturing freeze frames can be configured.
DemDebounceTimeBasedClass Config¶
若关联监控内部(DemDebounceMonitorInternal)的去抖功能,如图 DemDebounceMonitorInternal Config 所示, 在Dem/DemConfigSet/DemEventParameter/DemDebounceAlgorithmClass/DemDebounceMonitorInternal容器下创建DemCallbackGetFDC 子容器,可选择是否配置回调接口。
If associating the internal monitoring (DemDebounceMonitorInternal) debounce function, as shown in DemDebounceMonitorInternal Config, create a DemCallbackGetFDC sub-container under the Dem/DemConfigSet/DemEventParameter/DemDebounceAlgorithmClass/DemDebounceMonitorInternal container, and you can choose whether to configure the callback interface.
DemDebounceMonitorInternal Config¶
J939功能(J1939 Functionality)¶
在Dem/DemGeneral/DemGeneralJ1939容器中,如图 DemGeneralJ1939 Config 所示,可勾选使能对应的功能配置。
In the Dem/DemGeneral/DemGeneralJ1939 container, as shown in :ref:DemGeneralJ1939, you can check the box to enable the corresponding function configuration.
DemGeneralJ1939 Config¶
在Dem/DemGeneral/DemGeneralJ1939/DemSPNClass容器中,创建子容器,如图 DemSPNClass Config 所示, 可配置SPN标识符,并关联数据元素。
In the Dem/DemGeneral/DemGeneralJ1939/DemSPNClass container, create a sub-container. As shown in DemSPNClass Config, you can configure the SPN identifier and associate data elements.
DemSPNClass Config¶
在Dem/DemGeneral/DemGeneralJ1939/DemJ1939FreezeFrameClass容器中,创建子容器,如图 DemJ1939FreezeFrameClass Config 所示, 可关联配置的DemSPNClass。
In the Dem/DemGeneral/DemGeneralJ1939/DemJ1939FreezeFrameClass container, create a sub-container. As shown in DemJ1939FreezeFrameClass Config, the configured DemSPNClass can be associated.
DemJ1939FreezeFrameClass Config¶
还可在Dem/DemGeneral/DemGeneralJ1939/DemCallbackJ1939DTCStatusChanged 容器中,创建子容器, 如图 DemCallbackJ1939DTCStatusChanged Config 所示,可配置回调接口。
Additionally, a sub-container can be created in the Dem/DemGeneral/DemGeneralJ1939/DemCallbackJ1939DTCStatusChanged container. As shown in DemCallbackJ1939DTCStatusChanged Config, the callback interface can be configured.
DemCallbackJ1939DTCStatusChanged Config¶
上述中配置的DemJ1939FreezeFrameClass需要在DemDTCAttributes中关联,然后给DemEventParameter中使用。详细参考诊断事件参数配置。
The DemJ1939FreezeFrameClass configured above needs to be associated in DemDTCAttributes and then used in DemEventParameter. For details, please refer to the diagnostic event parameter configuration.
诊断事件存储功能(Diagnostic Event Storage Function)¶
在Dem/DemGeneral/DemEventMemorySet 容器中,如图 DemEventMemorySet Config 所示,配置可存储在永久存储器中的事件的最大数量、 DTC支持的类型(ISO11992_4、ISO14229_1、ISO15031_6、SAEJ1939_73、SAE_J2012_DA_DTCFORMAT_04)、关联的指示灯MIL、RSL、AWL、PL等。
In the Dem/DemGeneral/DemEventMemorySet container, as shown in :ref:DemEventMemorySet, you can configure parameters such as the maximum number of events that can be stored in permanent memory, the types supported by DTCs (ISO11992_4, ISO14229_1, ISO15031_6, SAEJ1939_73, SAE_J2012_DA_DTCFORMAT_04), and associated indicator lights like MIL, RSL, AWL, PL, etc.
DemEventMemorySet Config¶
在Dem/DemGeneral/DemEventMemorySet/DemClearDTCNotification 子容器中,如图 DemClearDTCNotification Config 所示, 可配置清除DTC的回调接口以及清除时机。
In the Dem/DemGeneral/DemEventMemorySet/DemClearDTCNotification sub-container, as shown in DemClearDTCNotification Config, the callback interface for clearing DTCs and the clearing timing can be configured.
DemClearDTCNotification Config¶
在Dem/DemGeneral/DemEventMemorySet/DemIndicator 子容器中,如图 DemIndicator Config 所示,可配置指示灯ID。
In the Dem/DemGeneral/DemEventMemorySet/DemIndicator sub-container, as shown in DemIndicator Config, the indicator light ID can be configured.
DemIndicator Config¶
在Dem/DemGeneral/DemEventMemorySet/DemPrimaryMemory 子容器中,如图 DemPrimaryMemory Config 所示, 可配置用于UDS服务0x19正向响应的掩码、替换策略、触发事件存储的方式、存储在主内存中的最大事件数、OCC计算方式、快照号计算方式等。
In the Dem/DemGeneral/DemEventMemorySet/DemPrimaryMemory sub-container, as shown in DemPrimaryMemory Config, configurations can be made such as the mask for UDS service 0x19 positive response, replacement strategy, the way to trigger event storage, the maximum number of events stored in primary memory, OCC calculation method, snapshot number calculation method, etc.
DemPrimaryMemory Config¶
以及关联的DTC组,如图 DemGroupOfDTC Config 所示。
and the associated DTC group, as shown in DemGroupOfDTC Config.
DemGroupOfDTC Config¶
还可在Dem/DemGeneral/DemEventMemorySet/DemUserDefinedMemory 子容器中,如图 DemUserDefinedMemory Config 所示, 可配置用户定义的事件存储功能。
Additionally, in the Dem/DemGeneral/DemEventMemorySet/DemUserDefinedMemory sub-container, as shown in DemUserDefinedMemory Config, the user-defined event storage function can be configured.
DemUserDefinedMemory Config¶
当Dem需要永久存储event状态信息、内部数据时,需要与NvM进行交互,可在Dem/DemGeneral/DemNvRamBlockId 下通过同步功能创建reference关系。 如图 DemNvRamBlockId Config 所示,
When Dem needs to permanently store event status information and internal data, it needs to interact with NvM. A reference relationship can be created through the synchronization function under Dem/DemGeneral/DemNvRamBlockId. As shown in DemNvRamBlockId Config,
DemNvRamBlockId Config¶
右键点击DemNvRamBlockId 容器,点击同步功能,如图 DemNvRamBlockIdSYNC Config 所示。
Right-click on the DemNvRamBlockId container and click on the synchronization function, as shown in DemNvRamBlockIdSYNC Config.
DemNvRamBlockIdSYNC Config¶
或者右键点击BSW中的Dem模块,点击同步功能,如图 DemSYNCModule Config 所示,
Alternatively, right-click on the Dem module in BSW and click on the synchronization function, as shown in DemSYNCModule Config.
DemSYNCModule Config¶