DEENESPTFRRUARHIKOZHNL

Diagnostic Event Manager (DEM)

ModulDEM (Diagnostic Event Manager)
BSW-Modul-ID54
Standard-Header#include "Dem.h"
SWS-SpezifikationAUTOSAR_SWS_DiagnosticEventManager.pdf
ClusterDiagnostic Services

模块指南人工智能生成

收集监控器的诊断结果,对其进行确认判定,并为测试仪管理包含环境数据的故障存储器。
AI 生成 未审核 模型: claude-opus-5-5 · 推理强度: high · 温度: 不可控 · 提示词: 28cc2ed3ddd0 来源 未决问题(1)
因果锚点:R20-11 自 R20-11 起有效 为此规范版本重新合成。
译自德文指南AI 生成gemini-3.8-flash-low · 2026-10-13 · 德文原文

收集监控器的诊断结果,对其进行确认判定,并为测试仪管理包含环境数据的故障存储器。

每个ECU恰好存在一个Diagnostic Event Manager [SWS_Dem_00126]。它接收来自诊断监控器的测试结果,对其进行消抖,并据此维护UDS状态位以及包含冻结帧(Freeze Frames)和扩展数据(Extended Data)的事件存储器条目。DCM和J1939Dcm通过面向客户端的API对这些数据进行过滤、读取和清除。在此过程中,它们大多遵循“先选择,后请求”模式[SWS_Dem_01253]。最重要的约束条件是生命周期:在Dem_Init之前,消息仅被缓冲,模块在此之后才具备完整功能。

每个ECU恰好存在一个Diagnostic Event Manager [SWS_Dem_00126]。它接收SW-C和BSW模块中诊断监控器的结果并对其进行确认判定。它向DCM和J1939Dcm提供故障存储器内容。它嵌入在EcuM、Dem_MainFunction的调度、NvM、FiM和DET之间SWS DEM 第247页。

kontext SW-C-Monitore SW-C-Monitore Dem Dem SW-C-Monitore->Dem Dem_SetEventStatus (RTE) Dem->SW-C-Monitore InitMonitorForEvent, Status-Callbacks NvM NvM Dem->NvM NvM_ReadBlock / NvM_WriteBlock FiM FiM Dem->FiM FiM_DemInit / FiM_DemTriggerOnMonitorStatus Det Det Dem->Det Det_ReportError BSW-Monitore BSW-Monitore BSW-Monitore->Dem Dem_SetEventStatus EcuM EcuM EcuM->Dem Dem_PreInit / Dem_Init / Dem_Shutdown SchM SchM SchM->Dem Dem_MainFunction Dcm Dcm Dcm->Dem 选择、过滤、读取、清除 (ClientId) J1939Dcm J1939Dcm J1939Dcm->Dem Dem_J1939Dcm-APIs FiM->Dem Dem_GetMonitorStatus

上下文图:监控器提供结果,诊断客户端与FiM使用DEM。来源:SWS DEM 第247页

生命周期将预初始化模式与完整功能区分开[SWS_Dem_00169]。在Dem_PreInit之后报告的结果将被缓冲,且尚不触发监控器状态回调([SWS_Dem_00167]、[SWS_Dem_01289])。通过Dem_Init,DEM具备完整功能[SWS_Dem_00340]。Dem_Shutdown完成未决的操作并将修改后的数据移交给NvM([SWS_Dem_00102]、[SWS_Dem_00341])。

监控器使用Dem_SetEventStatus报告确认的或初步的结果[SWS_Dem_00926]。DEM按事件以基于计数器、基于时间或监控器内部方式进行消抖[SWS_Dem_00413]。由此生成从-128至+127的故障检测计数器(Fault Detection Counter)[SWS_Dem_00415]。消抖和监控器状态同步运行,UDS状态字节异步运行([SWS_Dem_01279]、[SWS_Dem_01285])。使能条件(Enable Conditions)和禁用的DTC设置将阻塞处理SWS DEM 第83页。

处理监控器报告监视器DemFiMSchMDem_SetEventStatus(EventId, EventStatus)altEnable Conditions 满足且 DTC-Setting 已启用基于计数器的去抖(同步)Monitorstatus aktualisieren (synchron)FiM_DemTriggerOnMonitorStatus(EventId)(falls konfiguriert)否则Verarbeitung blockiertStd_ReturnTypeUse Case: Asynchrone FolgeverarbeitungDem_MainFunction()UDS-Statusbyte berechnen,更新事件内存与数据EventUdsStatusChanged-Callback(falls konfiguriert)

时序图:报告被同步消抖,UDS处理在MainFunction中随后进行。来源:SWS DEM 图 9.12 第372页、[SWS_Dem_01285]

DEM根据配置的触发器创建包含计数器、冻结帧和扩展数据的条目([SWS_Dem_00783]、[SWS_Dem_00039]、[SWS_Dem_00809])。若存储器已满,则由置换策略决定([SWS_Dem_00400]、[SWS_Dem_00402])。DCM按照“先选择,后请求”的模式进行访问。Dem_SelectDTC确定读取、状态查询和清除的目标[SWS_Dem_01253]。Dem_SetDTCFilter确定DTC列表的标准[SWS_Dem_00057]。

DEM将错误作为DET开发错误报告,例如DEM_E_UNINIT或DEM_E_WRONG_CONDITION [SWS_Dem_00173]。在运行时,它提供诸如DEM_WRONG_DTC或DEM_BUSY的返回值([SWS_Dem_01261]、[SWS_Dem_01306])。对于NvM无法读取的数据,它进行初始化[SWS_Dem_00578]。

角色与系统边界:ECU的中央故障存储器服务

Diagnostic Event Manager接收来自诊断监控器的结果,并将其确认为事件。它将这些事件连同环境数据一起存入事件存储器。每个ECU恰好存在一个DEM模块[SWS_Dem_00126]。每个诊断事件均由唯一的EventId和一个EventName表示([SWS_Dem_00153]、[SWS_Dem_00154])。Dem_EventIdType基于uint16,值0无效[SWS_Dem_00925] SWS DEM 第339页。

与环境的接口见Figure 8.1 SWS DEM 第247页:

  • EcuM调用Init和Shutdown。
  • 调度系统调用Dem_MainFunction。
  • NvM持久化数据[SWS_Dem_00164]。
  • FiM获知状态变更[SWS_Dem_00029]。
  • DET接收开发错误。
SW-C监控器通过诸如DiagnosticMonitor [SWS_Dem_00598]的RTE端口进行报告。DCM和J1939Dcm作为客户端通过ClientId访问配置的DemEventMemorySet([SWS_Dem_01247]、[SWS_Dem_01251])。
kontext SW-C-Monitore SW-C-Monitore Dem Dem SW-C-Monitore->Dem Dem_SetEventStatus (RTE) Dem->SW-C-Monitore InitMonitorForEvent, Status-Callbacks NvM NvM Dem->NvM NvM_ReadBlock / NvM_WriteBlock FiM FiM Dem->FiM FiM_DemInit / FiM_DemTriggerOnMonitorStatus Det Det Dem->Det Det_ReportError BSW-Monitore BSW-Monitore BSW-Monitore->Dem Dem_SetEventStatus EcuM EcuM EcuM->Dem Dem_PreInit / Dem_Init / Dem_Shutdown SchM SchM SchM->Dem Dem_MainFunction Dcm Dcm Dcm->Dem 选择、过滤、读取、清除 (ClientId) J1939Dcm J1939Dcm J1939Dcm->Dem Dem_J1939Dcm-APIs FiM->Dem Dem_GetMonitorStatus

上下文图:DEM是监控器的数据接收器,也是诊断客户端与FiM的数据源。来源:SWS DEM 第247页、[SWS_Dem_00256]

生命周期:预初始化、运行与关断

DEM区分为预初始化模式和完全初始化模式[SWS_Dem_00169]。Dem_PreInit初始化事件处理所需的状态[SWS_Dem_00180],其中包括内部消抖[SWS_Dem_01213]。此后报告的事件进入缓冲区[SWS_Dem_00167],且尚不触发监控器状态回调[SWS_Dem_01289] SWS DEM 图 7.42 第169页。

Dem_Init接收指向Dem_ConfigType的构建后指针([SWS_Dem_00181]、[SWS_Dem_00924])。该函数初始化或重新初始化模块SWS DEM 第260页。此后DEM具备完整功能[SWS_Dem_00340]。监控器状态由先前报告的结果或NvM状态生成[SWS_Dem_01326]。在此之后才执行FiM_DemInit [SWS_Dem_01325]。在Dem_Init之前触发的周期重启将被补行执行[SWS_Dem_01318]。

在运行中,Dem_MainFunction处理所有非事件驱动的功能[SWS_Dem_00125]。Dem_Shutdown完成未决的操作[SWS_Dem_00102]。修改后的非易失性数据最迟在此时发送给NvM [SWS_Dem_00341]。推测理解:鉴于根据[SWS_Dem_00181] Dem_Init亦执行重新初始化,在Dem_Shutdown之后的重启推测应通过再次调用Dem_Init进行。 问题 (未决)

lebenszyklus start 开始 uninit 未初始化 start->uninit pre 已预初始化 (消息被缓冲) uninit->pre Dem_PreInit voll Voll initialisiert (Dem_MainFunction verarbeitet) pre->voll Dem_Init(ConfigPtr) voll->voll Dem_Init (Reinitialisierung) aus Heruntergefahren voll->aus Dem_Shutdown aus->voll Dem_Init (vermutlich Neustart)

状态图:DEM从预初始化到关断的模式。关断后的重启为假定。来源:[SWS_Dem_00169]、[SWS_Dem_00181]、[SWS_Dem_00182]

Dem_PreInit 与 Dem_Init 之间的缓冲EcuMMonitor (SW-C/BSW)DemFiMSchMUse Case: VorinitialisierungDem_PreInit()内部状态与Entprellung initialisierenDem_SetEventStatus(EventId, EventStatus)Meldung puffern,无监控器状态回调Use Case: InitialisierungDem_Init(ConfigPtr)根据消息生成监控器状态或 NvM 状态形成FiM_DemInit()返回:Dem 功能完整可用Use Case: BetriebloopzyklischDem_MainFunction()非事件驱动处理

时序图:在Dem_PreInit与Dem_Init之间,消息在无回调的情况下被缓冲。来源:SWS DEM 图 7.15 第85页、[SWS_Dem_01189]

从监控器报告到确认结果

一旦有新结果可用,监控器即使用Dem_SetEventStatus报告测试结果([SWS_Dem_00330]、SWS DEM 第81页)。Dem_EventStatusType区分三种报告类型[SWS_Dem_00926]:

  • 确认的结果(DEM_EVENT_STATUS_PASSED/_FAILED),
  • 用于内部消抖的预结果(_PREPASSED/_PREFAILED),
  • DEM_EVENT_STATUS_FDC_THRESHOLD_REACHED.

消抖针对每个事件可配置[SWS_Dem_00413]:

DEM将计数器值或定时器值线性映射到-128至+127的Fault Detection Counter([SWS_Dem_00415]、[SWS_Dem_00427])。基于计数器的消抖和监控器状态在调用上下文中同步运行([SWS_Dem_01279]、[SWS_Dem_01280])。与此相对,DEM异步计算UDS状态字节[SWS_Dem_01285] SWS DEM 第83页。
处理监控器报告监视器DemFiMSchMDem_SetEventStatus(EventId, EventStatus)altEnable Conditions 满足且 DTC-Setting 已启用基于计数器的去抖(同步)Monitorstatus aktualisieren (synchron)FiM_DemTriggerOnMonitorStatus(EventId)(falls konfiguriert)否则Verarbeitung blockiertStd_ReturnTypeUse Case: Asynchrone FolgeverarbeitungDem_MainFunction()UDS-Statusbyte berechnen,更新事件内存与数据EventUdsStatusChanged-Callback(falls konfiguriert)

时序图:报告被同步消抖,UDS后续处理异步运行。来源:SWS DEM 图 9.12 第372页、[SWS_Dem_01285]

DEM根据自身的状态转移规则设置UDS状态位0至7([SWS_Dem_00386]、[SWS_Dem_00395])。Dem_ResetEventStatus异步复位位0并初始化消抖,而不报告Passed结果[SWS_Dem_00187] SWS DEM 第79页。若该事件在当前周期中已被测试,则该调用返回E_NOT_OK [SWS_Dem_00638]。Dem_ResetEventDebounceStatus冻结或复位消抖([SWS_Dem_00684]、[SWS_Dem_00685])。

testfailed start 开始 f TestFailed = FALSE start->f Initialzustand t TestFailed = TRUE f->t Dem_SetEventStatus(FAILED) 或经合格去抖 t->f Dem_SetEventStatus(PASSED) t->f Dem_ResetEventStatus t->f ClearDTC

状态图:UDS状态位0(TestFailed)的转移。来源:SWS DEM 图 7.15 第70页、[SWS_Dem_00386]

使能条件、操作周期与可用性

使能条件和禁用的DTC设置将阻塞状态消息的处理SWS DEM 第83页。相关规则参见[SWS_Dem_00449]和[SWS_Dem_00079]。DemDebounceBehavior确定消抖在此过程中是被复位[SWS_Dem_00654]还是被冻结[SWS_Dem_00655]。相反,存储条件(Storage Conditions)仅阻止存入存储器([SWS_Dem_00455]、[SWS_Dem_00556])。

Dem_RestartOperationCycle以异步方式工作。受影响的监控器通过InitMonitorForEvent重新初始化[SWS_Dem_00679] SWS DEM 第274页。重启不被缓冲[SWS_Dem_01316]。InitMonitorForEvent的其他触发因素包括:

在同时触发的情况下,回调仅被调用一次,并带有最高优先级的原因[SWS_Dem_01046] SWS DEM 第47页。

DEM将使用Dem_SetEventAvailable标记为不可用的事件视为未配置处理[SWS_Dem_01108] SWS DEM 第66页。在VARIANT-POST-BUILD中缺少该API [SWS_Dem_01106]。相反,被抑制的DTC仅对测试仪不可见,事件处理继续进行[SWS_Dem_01102]。

事件存储器:存储、环境数据与置换

DEM维护主事件存储器[SWS_Dem_00010]以及具有相同行为的可选用户定义存储器[SWS_Dem_01063]。一个条目捆绑计数器、冻结帧和扩展数据SWS DEM 图 7.13 第77页。DemEventMemoryEntryStorageTrigger确定条目何时生成:

通过老化(Aging),事件相关数据会被移除 [SWS_Dem_01075]。

冻结帧是针对具体事件的,由配置的 DID 组成([SWS_Dem_00039]、[SWS_Dem_00040])。对于易失性数据,监控器会使用 Dem_PrestoreFreezeFrame 预先采集。DEM 在存储时会使用这些数据 [SWS_Dem_00464] SWS DEM 图 7.37 第128页。扩展数据记录(Extended Data Records)根据配置的触发条件进行采集 [SWS_Dem_00809]。它们可以包含内部值,例如发生次数计数器(Occurrence Counter)[SWS_Dem_00471]。

如果缺少空闲条目,DEM 会检查是否进行置换 [SWS_Dem_00400]。DEM_DISPLACEMENT_NONE 则排除了置换 [SWS_Dem_00402]。若没有候选条目,则放弃存储 [SWS_Dem_00407]。否则将移除该条目并调整状态位([SWS_Dem_00408]、[SWS_Dem_00409])。DEM 会针对每个存储区指示溢出 [SWS_Dem_00397]。

verdraengung s 需要新的内存条目 frei Freier Eintrag vorhanden? s->frei anlegen Eintrag anlegen frei->anlegen 是 strat DemEventDisplacementStrategy = DEM_DISPLACEMENT_NONE? frei->strat 不 such 查找最低优先级的条目 strat->such 不 verw Speicheranforderung verwerfen strat->verw 是 prio 所报告事件的优先级 是否足够(参见 Figure 7.28)? such->prio passiv 在查找结果中优先选择被动条目 prio->passiv 是 prio->verw nein / kein Kandidat verdr 逐出找到的最旧条目, 调整状态位 passiv->verdr verdr->anlegen

活动图:简化的置换标准序列,不含 OBD 过滤阶段。来源:SWS DEM 图 7.28 第98页、[SWS_Dem_00406]

通过 DCM、J1939Dcm 和 OBD 服务的访问

许多 API 遵循“先选择,后请求”的模式。Dem_SelectDTC 将 DTC、格式和 Origin 确定为目标。诸如 Dem_ClearDTC、Dem_GetStatusOfDTC 和 Dem_SelectFreezeFrameData 等对其生效 [SWS_Dem_01253] SWS DEM 第215页。对于 DTC 列表,Dem_SetDTCFilter 用于设置条件 [SWS_Dem_00057]。随后 Dem_GetNextFilteredDTC 遍历匹配项 [SWS_Dem_00216]。返回的状态字节会使用 Availability-Mask 进行掩码处理 [SWS_Dem_00657]。

DCM 在选择 DTC 和记录后 [SWS_Dem_01268] SWS DEM 图 9.7 第369页,使用 Dem_GetNextFreezeFrameData 读取冻结帧。在此过程中 DEM 提供完整的记录布局 SWS DEM 图 7.48 第195页。扩展数据也以类似方式读取 [SWS_Dem_01272]。

执行清除时,DCM 首先检查选择情况,然后调用 Dem_ClearDTC([SWS_Dem_91020]、[SWS_Dem_00665])。在清除之前,DEM 会查询 DemClearEventAllowed [SWS_Dem_00515] SWS DEM 图 9.3 第367页。如果配置了 DemGeneralJ1939,则提供 J1939-API [SWS_Dem_00845]。如果支持 OBD,DEM 还额外提供:

PID $31/$4D/$4E 仅由 Master-ECU 计算 [SWS_Dem_00703] SWS DEM 第170页。
清除 DTC (UDS 0x14)TesterDcmDemMonitor-SW-CClearDiagnosticInformation(DTC)Dem_SelectDTC(ClientId, DTC, DTCFormat, DTCOrigin)loopsolange DEM_PENDINGDem_GetDTCSelectionResultForClearDTC(ClientId)loopsolange DEM_PENDINGDem_ClearDTC(ClientId)<Module>_DemClearEventAllowed(Allowed)AllowedoptAllowed == TRUE状态、事件相关数据以及复位 Prestored Freeze FramesInitMonitorForEvent(DEM_INIT_MONITOR_CLEAR)DEM_PENDING / Ergebnis肯定或否定响应

时序图:通过选择、释放查询和监控器重新初始化进行清除。来源:SWS DEM 图 9.2 第366页、[SWS_Dem_00680]

发生错误时的行为

DEM 向 DET 报告开发错误,例如 DEM_E_UNINIT、DEM_E_PARAM_POINTER 或 DEM_E_WRONG_CONDITION [SWS_Dem_00173] SWS DEM 第238页。在初始化之前的调用会引发 DEM_E_UNINIT;其中包括 Dem_SetEventStatus 和 Dem_ResetEventStatus 等例外 [SWS_Dem_00124]。在关断(Shutdown)之后同样如此 [SWS_Dem_00368]。

在运行时,各 API 提供以下返回值:

在何种条件下清除过程被视为失败由 [SWS_Dem_01202] 定义。

对于 NvM 无法读取的数据,DEM 会对其进行初始化 [SWS_Dem_00578]。它会忽略写入错误 [SWS_Dem_00579]。如果在重编程后布局不再匹配,预存(Prestore)数据将被跳过 [SWS_Dem_01323]。

进一步详细证据

基于有效负载中包含的需求(R20-11)及文档出处的 AI 生成指南。仅引用的需求具有规范性;部分文档出处来自其他版本。

Diagnostic Event Manager (DEM)

The DEM is responsible for processing and storing diagnostic events, fault memories, DTC statuses, and associated freeze frame data.

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

函数 Dem_GetVersionInfo [SWS_Dem_00177] 📄 PDF

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)

函数 Dem_PreInit [SWS_Dem_00179] 📄 PDF

void Dem_PreInit (void);

Initializes the internal states necessary to process events reported by BSW-modules.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 52979462b246 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

函数 Dem_PreInit 用于在系统启动期间预初始化 DEM 模块的内部状态,这些状态是早期处理来自 BSW 模块的事件报告所必需的([SWS_Dem_00179]、[SWS_Dem_00180])。调用以同步方式进行,不可重入,并且既没有传递参数也没有返回值([SWS_Dem_00179])。

随着 Dem_PreInit 的调用,包括计数器和定时器在内的内部去抖机制被初始化([SWS_Dem_01213])。如果配置了 DEM 内部去抖,则模块重置相应的去抖算法([SWS_Dem_00438])。

在 Dem_PreInit 成功完成之后且在调用 Dem_Init 之前,选定的接口和行为被释放可用:

  • 事件状态与去抖:支持带有状态 DEM_EVENT_STATUS_PREPASSED 和 DEM_EVENT_STATUS_PREFAILED 的 Dem_SetEventStatus 调用以进行去抖([SWS_Dem_01212])。但是,在 Dem_Init 之前报告的所有事件都不会触发用于监视器状态变更的回调([SWS_Dem_01289])。
  • 控制去抖状态:在 Dem_PreInit 完成后,BSW 模块可使用用于重置或冻结去抖计数器的函数 Dem_ResetEventDebounceStatus([SWS_Dem_00180]、[SWS_Dem_00683])。
  • 确认阈值与运行周期:在 Dem_PreInit 之后,DEM 支持 Dem_SetEventConfirmationThresholdCounter 的调用([SWS_Dem_01242])。对 Dem_RestartOperationCycle 的调用同样仅从该时间点起才允许;如果在 Dem_Init 之前重新启动运行周期,则重新启动的实际处理仅在 Dem_Init 之后进行([SWS_Dem_01318])。

本文本由 AI 基于规范生成。

实现者指南即将推出(复杂度 I2)

函数 Dem_Init [SWS_Dem_00181] 📄 PDF

void Dem_Init (const Dem_ConfigType* ConfigPtr);

Initializes or reinitializes this module.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 940f61d4751b 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步且不可重入的函数Dem_Init根据[SWS_Dem_00181]完全初始化或重新初始化 Diagnostic Event Manager (DEM) 模块。此调用完成后,DEM 完全处于就绪状态([SWS_Dem_00340])。在VARIANT-POST-BUILD中通过输入参数ConfigPtr传递指向 Post-Build 配置数据集的指针([SWS_Dem_00181])。

作为初始化流程的一部分,Dem_Init执行关键的恢复和同步步骤:

  • 状态与监视器初始化:初始化监视器和组件状态([SWS_Dem_01324])。虽然在初始化完成前调用Dem_GetMonitorStatus会提供E_NOT_OK([SWS_Dem_01326]),但在此时点之后Dem_GetMonitorStatus和Dem_GetComponentFailed将返回E_OK([SWS_Dem_01324])。
  • 非易失性存储器(NVM):如果已配置(DemDebounceCounterStorage == True),DEM 最迟在Dem_Init中恢复内部消抖计数器([SWS_Dem_00675])。同样,预配置的冻结帧数据会在函数从 NVM 返回之前被加载([SWS_Dem_01322]),为此 DEM 会使用如NvM_ReadBlock等 NvM API([SWS_Dem_00164])。此外,通过调用Dem_Init,在先前的Dem_Shutdown之后解除事件存储器的锁定([SWS_Dem_00102])。
  • 交互与缓冲:若 DemTriggerFiMReports 设置为 True,Dem_Init 会在此刻专门调用 FiM_DemInit,以初始化 Function Inhibition Manager 中的权限([SWS_Dem_01189])。在 Dem_Init 之前缓冲的事件([SWS_Dem_00167]、[SWS_Dem_01079])在 Dem_Init 之前不会触发监视器状态变更回调([SWS_Dem_01289])。在 Dem_Init 之前通过 Dem_RestartOperationCycle 请求的循环重启,仅在 Dem_Init 之后才会被处理([SWS_Dem_01318])。

关于错误处理:若已调用 Dem_Shutdown,在开发错误检测处于激活状态时,DEM 会在 Dem_Init 重新执行之前,以错误 DEM_E_UNINIT 应答大多数 API 的调用([SWS_Dem_00368])。

本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。

实现者指南即将推出(复杂度 I2)

函数 Dem_Shutdown [SWS_Dem_00182] 📄 PDF

void Dem_Shutdown (void);

Shuts down this module.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: d50e7ed9388c 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步且不可重入函数 Dem_Shutdown 用于有序关闭 Diagnostic Event Manager 模块([SWS_Dem_00182])。它既没有输入参数也没有返回参数([SWS_Dem_00182])。调用上下文大概位于中央 ECU 关闭序列的范围内。 问题 Q-a0e6a5700c49d786 (未决)

调用时,Dem_Shutdown 结束 DEM 模块的所有仍待处理的操作,以准备将内部状态和数据传输到 NVRAM 中([SWS_Dem_00102])。对于已更改的非易失性数据,DEM 在 Dem_Shutdown 之前或期间触发在 NVRAM 中的存储([SWS_Dem_00341])。在必要时,该模块使用 NVRAM 管理器的接口 NvM_WriteBlock 和 NvM_ReadBlock 在 Dem_Init 和 Dem_Shutdown 之间保存和恢复数据([SWS_Dem_00164])。如果 DEM 配置为非易失性存储预先保存的冻结帧数据,则此存储将执行一次,且最晚在 Dem_Shutdown 期间执行([SWS_Dem_01321])。

随着关机的执行,事件存储器被锁定,并且在再次调用 Dem_Init 之前不得再被修改([SWS_Dem_00102])。此外,在开发错误检测(Development Error Detection)激活时适用以下错误条件:

  • 如果在 Dem_Shutdown 之后调用 DEM-API(Dem_SetEventStatus、Dem_ResetEventDebounceStatus、Dem_GetVersionInfo 和 Dem_MainFunction 除外),该模块会在下一次 Dem_Init 之前设置错误码 DEM_E_UNINIT([SWS_Dem_00368])。
  • 如果在 Dem_Shutdown 之后针对 DemDebounceCounterStorage 设置为 True 的事件调用 Dem_SetEventStatus 或 Dem_ResetEventDebounceStatus,DEM 会报告错误码 DEM_E_WRONG_CONDITION([SWS_Dem_00676])。

本段文本由人工智能生成,仅供参考。应以相应 AUTOSAR 规范的规定为准。

实现者指南即将推出(复杂度 I2)

函数 Dem_ClearDTC [SWS_Dem_00665] 📄 PDF

Std_ReturnType Dem_ClearDTC (uint8 ClientId);

Clears single DTCs, as well as groups of DTCs.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 746b093f9e55 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

异步函数 Dem_ClearDTC 用于在 Diagnostic Event Manager 中删除单个诊断故障码 (DTC) 或整个 DTC 组 [SWS_Dem_00665]。在调用之前,必须已经使用 Dem_SelectDTC 为相应的 ClientId 确定了由 DTC、格式和存储位置组成的目标选择 [SWS_Dem_01253]。该函数对于不同的 ClientId 值是可重入的,但对于相同的客户端是不可重入的 [SWS_Dem_00665]。

一旦成功完成,删除过程将通过 E_OK 得到确认 [SWS_Dem_00665]。只要清理正在运行,API 就会返回 DEM_PENDING,随后调用者必须在稍后的时间点再次调用该函数 [SWS_Dem_00665]。如果同一客户端并行激活了另一个依赖于 Dem_SelectDTC 的操作,则会报告 DEM_BUSY [SWS_Dem_00665]。DEM 在内部处理多个并行的客户端请求 [SWS_Dem_00661],其中在正在进行的删除过程中的并发调用可能会接收到 DEM_PENDING [SWS_Dem_00664] 或 DEM_CLEAR_BUSY [SWS_Dem_00665]。

API 通过特定的返回值确认错误的调用:

在删除过程中,对于组合 DTC,所有关联的事件都会被清除 [SWS_Dem_00440],并通过带有 DEM_INIT_MONITOR_CLEAR 的 InitMonitorForEvent 触发其监控器初始化 [SWS_Dem_00680]。当设置了 DemTriggerMonitorInitBeforeClearOk 时,只有在此触发之后才会返回 E_OK [SWS_Dem_00573]。如果删除了某个事件内存的所有 DTC,DEM 会重置其溢出指示 [SWS_Dem_00399];此外,在 OBD 服务 $04 时,未分配的 DTR 数据将被重置 [SWS_Dem_00764],非存储绑定的事件也将被清理 [SWS_Dem_01249]。

本文由 AI 生成,用于技术指导。

实现者指南即将推出(复杂度 I2)

函数 Dem_ClearPrestoredFreezeFrame [SWS_Dem_00193] 📄 PDF

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 Dem.h. API Availability: This API will be available only if ({ecuc(Dem/DemConfigSet/DemEvent Parameter.DemFFPrestorageSupported)} == true)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: e3d7b3899eb8 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与调用上下文

同步函数 Dem_ClearPrestoredFreezeFrame 用于删除先前针对特定诊断事件暂存的冻结帧([SWS_Dem_00193])。该调用仅通过 RTE 进行;头文件 Dem.h 中不提供声明([SWS_Dem_00193])。仅当系统中为至少一个事件配置了预存储(配置参数 DemFFPrestorageSupported)时,该 API 才在系统中实现([SWS_Dem_00193]、[SWS_Dem_00334])。函数在删除成功时返回 E_OK,如果操作失败则返回 E_NOT_OK([SWS_Dem_00193])。

并发性与限制

该接口对于不同的事件 ID(EventId)是可重入的,但对于相同的 EventId 不得并发执行([SWS_Dem_00193])。不支持针对配置为从事件(DemMultiEventTriggeringSlaveEventRef)或替代事件(DemStorageConditionReplacementEventRef)的事件进行调用;此时 DEM 的行为是未定义的([SWS_Dem_01339])。如果事件被设置为不可用,则它将被视为未配置的事件([SWS_Dem_01108]);解释:在这种情况下,调用推测可能会被拒绝并返回 E_NOT_OK。 问题 Q-d8ebaf6883138fdf (未决)

多事件触发中的协同交互

只要配置了 DemMultiEventTriggering 且针对主事件(DemMultiEventTriggeringMasterEventRef)调用了该函数,DEM 就会自动使用相同的参数为所有关联的从事件(DemMultiEventTriggeringSlaveEventRef)触发删除调用([SWS_Dem_01250])。

本使用说明由 AI 基于 AUTOSAR Classic Release R20-11 规范生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_GetDTCSelectionResult [SWS_Dem_91023] 📄 PDF

Std_ReturnType Dem_GetDTCSelectionResult (uint8 ClientId);

Provides information if the last call to Dem_SelectDTC has selected a valid DTC or group of DTCs.

函数 Dem_GetDTCSelectionResultForClearDTC [SWS_Dem_91020] 📄 PDF

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.

函数 Dem_GetDebouncingOfEvent [SWS_Dem_00730] 📄 PDF

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.

函数 Dem_GetDTCSuppression [SWS_Dem_91025] 📄 PDF

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)

函数 Dem_GetFaultDetectionCounter [SWS_Dem_00203] 📄 PDF

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 Dem.h.

函数 Dem_GetIndicatorStatus [SWS_Dem_00205] 📄 PDF

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/DemEventMemory Set/DemIndicator)} != NULL)

函数 Dem_ResetEventDebounceStatus [SWS_Dem_00683] 📄 PDF

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

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 1c0673b083cc 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_ResetEventDebounceStatus 供 BSW 模块和软件组件 (SW-C) 用于有针对性地冻结或重置诊断事件的内部消抖计数器或定时器,而不影响事件确认 [SWS_Dem_00683]。

用法与参数

通过参数 DebounceResetStatus 控制所需的操作:值 DEM_DEBOUNCE_STATUS_FREEZE 冻结内部消抖定时器 [SWS_Dem_00685],而 DEM_DEBOUNCE_STATUS_RESET 重置关联的故障检测计数器 (Fault Detection Counter) [SWS_Dem_00684] [SWS_Dem_00927]。函数在成功执行时返回 E_OK,并且仅在开发错误的情况下返回 E_NOT_OK [SWS_Dem_00683]。

错误处理与生命周期

对于 BSW 模块,该 API 在 Dem_PreInit 完成后即可用,因此在完全初始化之前免于通用初始化检查 [SWS_Dem_00124] [SWS_Dem_00683]。在启用开发错误检测时,适用以下条件:

  • 如果在预初始化之前调用该函数,DEM 将报告错误 DEM_E_UNINIT [SWS_Dem_00364]。
  • 如果针对具有持久消抖计数器的事件(DemDebounceCounterStorage 为 True)在 Dem_Init 之前或 Dem_Shutdown 之后进行调用,则设置 DEM_E_WRONG_CONDITION [SWS_Dem_00676]。
  • 如果某个事件被标记为不可用,则它将作为未配置的事件处理 [SWS_Dem_01108]。

并发性与限制

Dem_ResetEventDebounceStatus 针对不同的 EventId 值是可重入的,但针对同一事件是不可重入的 [SWS_Dem_00683]。在配置了 DemMultiEventTriggering 的情况下,使用主事件的调用会针对所有关联的从事件触发相同的调用 [SWS_Dem_01250]。不支持针对纯内部从事件或通过 DemStorageConditionReplacementEventRef 引用的事件进行直接调用,且会导致未定义行为 [SWS_Dem_01339]。

本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。

实现者指南即将推出(复杂度 I2)

函数 Dem_ResetEventStatus [SWS_Dem_00185] 📄 PDF

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 Dem.h.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: b20c64ec7b3a 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

函数 Dem_ResetEventStatus 用于重置诊断事件的错误状态,且仅可通过 RTE 使用 [SWS_Dem_00185]。调用随 EventId 进行并具有异步语义:在成功接受请求时,函数返回 E_OK [SWS_Dem_00185]。随后,DEM 模块在时间延迟后将状态位 0(TestFailed)重置为 0,并在进行相应配置时将内部去抖动算法重置为其初始值 [SWS_Dem_00187]。

如果该事件在当前操作周期中已经过测试(UDS 状态位 6 为 0)[SWS_Dem_00185]、[SWS_Dem_00638],或者该事件被配置或设置为不可用 [SWS_Dem_01108],则请求失败并带有返回值 E_NOT_OK。在 DEM 完全初始化之前调用,即使在开发错误检测(DemDevErrorDetect)激活的情况下,也不会导致报告错误 DEM_E_UNINIT [SWS_Dem_00124]。

在并发性方面,Dem_ResetEventStatus对于不同的EventId值是可重入的,但对于相同的EventId则是不可重入的[SWS_Dem_00185]。如果配置了DemMultiEventTriggering且使用Master-Event调用该函数,则DEM会自动为所有关联的Slave-Event触发相同的调用[SWS_Dem_01250]。使用配置为Slave-Event或配置为DemStorageConditionReplacementEventRef的EventId进行直接调用不受支持,并会导致未定义行为[SWS_Dem_01339]。

本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。

实现者指南即将推出(复杂度 I2)

函数 Dem_RestartOperationCycle [SWS_Dem_00194] 📄 PDF

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 Dem.h. The interface has an asynchronous behavior to avoid exceeding of typical timing requirements on APIs if a large number of events has to be processed and during the re-initializations of the related monitors. The asynchronous acknowledgements are the related InitMonitorForEvent callbacks.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 43517846effb 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

函数 Dem_RestartOperationCycle 用于重新启动运行周期([SWS_Dem_00194])。调用仅通过 RTE 进行,因此不会通过 Dem.h 导出任何声明([SWS_Dem_00194])。

语义与参数

通过输入参数 OperationCycleId 标识要重新启动的运行周期(例如 Power Cycle 或 Driving Cycle)([SWS_Dem_00194])。该函数以可重入及异步方式工作([SWS_Dem_00194]):

  • E_OK:设置运行周期已被接受,并将进行异步进一步处理([SWS_Dem_00194])。
  • E_NOT_OK:设置周期的请求已被拒绝([SWS_Dem_00194])。

交互与异步流程

当必须处理大量事件并重新初始化监视器时,异步行为可防止违反典型的时间要求([SWS_Dem_00194])。相关回调 InitMonitorForEvent 用作异步反馈([SWS_Dem_00194])。在重新启动过程中,DEM 通过调用其回调 InitMonitorForEvent(其中参数 InitMonitorReason 设置为 DEM_INIT_MONITOR_RESTART)来重新初始化所有受影响事件的诊断监视器([SWS_Dem_00679])。

如果通过 Dem_RestartOperationCycle 重新启动某个运行周期,则所有依赖于它的运行周期也必须重新启动,前提是它们已符合条件([SWS_Dem_01224])。

本文本由 AI 生成,仅供参考。一切以 AUTOSAR 规范为准。

实现者指南即将推出(复杂度 I2)

函数 Dem_PrestoreFreezeFrame [SWS_Dem_00188] 📄 PDF

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 Dem.h. API Availability: This API will be available only if ({ecuc(Dem/DemConfigSet/DemEvent Parameter.DemFFPrestorageSupported)} == true)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: c489dfc2152d 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

该函数用于为特定诊断事件同步采集和暂存冻结帧数据 [SWS_Dem_00188]。该接口仅通过 RTE 提供,不通过 Dem.h 导出 [SWS_Dem_00188]。仅当为至少一个事件配置了预存储(DemFFPrestorageSupported)时,它才存在于模块中 [SWS_Dem_00334]。

返回值和错误处理:

并发性与调用条件:该函数对于不同的事件 ID 是可重入的,但对于相同的事件 ID 则不可重入 EventId [SWS_Dem_00188]。

多事件触发中的协同工作:如果使用配置的主事件(DemMultiEventTriggeringMasterEventRef)调用该函数,DEM 会自动为所有关联的从事件(DemMultiEventTriggeringSlaveEventRef)触发相同的调用 [SWS_Dem_01250]。不支持使用从事件 ID 或存储条件的替代事件(DemStorageConditionReplacementEventRef)进行直接调用,且会导致未定义行为 [SWS_Dem_01339]。

本说明由 AI 基于 AUTOSAR Classic R20-11 规范生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_SelectDTC [SWS_Dem_91016] 📄 PDF

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.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: c8301a45c8d2 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数Dem_SelectDTC在定义的格式(DTCFormat)和事件内存(DTCOrigin)中为特定ClientId选择一个DTC或DTC组作为后续操作的目标[SWS_Dem_91016]。它在分配给该ClientId的事件内存上触发DEM的内部选择过程[SWS_Dem_01254]。

在并发性和调用上下文方面,该函数对于不同的ClientId是可重入的,但对于相同的ClientId则是不可重入的[SWS_Dem_91016]。定义的返回值如下[SWS_Dem_91016]:

  • E_OK:DTC或组已成功选择[SWS_Dem_91016]。
  • DEM_BUSY:此客户端的对Dem_SelectDTC的另一调用或依赖于它的操作当前已在执行中[SWS_Dem_91016]。

选择的结果体现在后续API调用的返回值中[SWS_Dem_01254]。DEM将所选的DTC或DTC组用作同一客户端后续函数调用的目标,例如Dem_ClearDTC、Dem_DisableDTCRecordUpdate、Dem_GetFunctionalUnitOfDTC、Dem_GetSeverityOfDTC、Dem_GetStatusOfDTC、Dem_SelectFreezeFrameData、Dem_SelectExtendedDataRecord以及Dem_SetDTCSuppression等[SWS_Dem_01253]。此外,Dem_SelectFreezeFrameData和Dem_SelectExtendedDataRecord均基于此选定的DTC[SWS_Dem_01268],[SWS_Dem_01272]。

如果在之前没有有效选择的情况下调用了某个依赖API,或者传入的DTC在指定格式下无效,则DEM返回DEM_WRONG_DTC[SWS_Dem_01261]。如果请求的内存区域(DTCOrigin)不存在或无效,则后续调用报告DEM_WRONG_DTCORIGIN[SWS_Dem_01258],[SWS_Dem_01262]。通过Dem_GetDTCSelectionResult可以明确检查使用E_OK的选择是否成功以及DTC是否已准备好进行进一步处理[SWS_Dem_01256],[SWS_Dem_01257]。

此使用说明由AI生成,且仅基于AUTOSAR Classic R20-11的规范数据。

实现者指南即将推出(复杂度 I2)

函数 Dem_SetDTCSuppression [SWS_Dem_01047] 📄 PDF

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.DemSuppression Support)} == DEM_DTC_SUPPRESSION)

函数 Dem_SetEnableCondition [SWS_Dem_00201] 📄 PDF

Std_ReturnType Dem_SetEnableCondition (uint8 EnableConditionID, boolean ConditionFulfilled);

Sets an enable condition. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemEnable Condition)} != NULL)

函数 Dem_SetEventStatus [SWS_Dem_00183] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 706d7cf70a2d 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

函数 Dem_SetEventStatus 用于 SW-C 和 BSW 模块向 DEM 传输监视器测试结果 [SWS_Dem_00183]、[SWS_Dem_00330]。当为事件配置了 STANDARD_REPORTING 时,该函数可用 [SWS_Dem_00183]。作为状态值传递的有已判决结果(DEM_EVENT_STATUS_PASSED、DEM_EVENT_STATUS_FAILED)、用于 DEM 内部消抖的预判决(DEM_EVENT_STATUS_PREPASSED、DEM_EVENT_STATUS_PREFAILED)或消抖阈值的达到 DEM_EVENT_STATUS_FDC_THRESHOLD_REACHED [SWS_Dem_00926]。

在并发性方面,该 API 针对不同的 EventId 值为可重入,但针对相同的 EventId 为不可重入 [SWS_Dem_00183]。在通过 Dem_PreInit 进行预初始化之前,若开发错误检测处于激活状态,调用该函数会导致错误 DEM_E_UNINIT [SWS_Dem_00364]。相反,在 Dem_PreInit 之后但在 Dem_Init 之前,该调用是允许的 [SWS_Dem_00124]、[SWS_Dem_00180];符合条件的事件将在一个队列中缓冲,该队列的大小由 DemBswErrorBufferSize 决定,而 FDC 阈值则不会被缓冲 [SWS_Dem_00167]、[SWS_Dem_00207]。即使在 Dem_Shutdown 之后,该函数也不会生成 DEM_E_UNINIT 错误 [SWS_Dem_00368]。

成功接收时返回值是 E_OK,发生错误或当事件设置为不可用时返回值是 E_NOT_OK [SWS_Dem_00183]、[SWS_Dem_01108]。BSW 模块可以忽略该返回值 [SWS_Dem_00183]。一旦分配的使能条件满足,上报即会被接受 [SWS_Dem_00450];若 DTC 设置被禁用,DEM 会忽略针对 UDS 状态的上报 [SWS_Dem_00626]。

在调用上下文中可触发同步操作:

  • 当 DemTriggerFiMReports 处于激活状态时,在状态变更时通过 FiM_DemTriggerOnEventStatus 通知 FiM [SWS_Dem_00029]。
  • 在配置了选项 DEM_CAPTURE_SYNCHRONOUS_TO_REPORTING 时采集同步冻结帧数据和扩展数据记录 [SWS_Dem_00805]、[SWS_Dem_01082]。
  • 在 DemMultiEventTriggering 配置激活时,针对已配置的从事件执行级联调用 [SWS_Dem_01250]。

本提示基于 AUTOSAR 规范 R20-11 自动生成。

实现者指南即将推出(复杂度 I2)

函数 Dem_SetEventStatusWithMonitorData [SWS_Dem_91037] 📄 PDF

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/DemEvent ReportingType} == STANDARD_REPORTING_WITH_MONITOR_DATA)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: eb7046584bdf 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

函数Dem_SetEventStatusWithMonitorData用于将特定诊断事件(EventId)的监视器测试结果(EventStatus)连同监视器特定的附加数据(monitorData0和monitorData1)一起报告给DEM[SWS_Dem_91037]。它具有与Dem_SetEventStatus相同的功能,但传递了额外的参数以存储在事件相关数据中[SWS_Dem_01333]。

在与读出操作的交互中:如果Read-Data操作被配置为提供monitorData0,则DEM将来自Dem_SetEventStatusWithMonitorData的传入monitorData0添加到该Read-Data操作的参数monitorData0中[SWS_Dem_01330]。

对于使用和并发性,适用以下条件:

  • 可用性:仅当DemEventReportingType配置为STANDARD_REPORTING_WITH_MONITOR_DATA时,该API才通过Dem.h可用[SWS_Dem_91037]。
  • 执行和可重入性:执行是同步/异步的。该函数对于不同的EventId是可重入的,但对于相同的EventId是不可重入的[SWS_Dem_91037]。
  • 返回值:成功设置事件状态时返回E_OK;当设置或处理失败或无法接受时返回E_NOT_OK[SWS_Dem_91037]。

本使用说明是基于规范自动生成的。

实现者指南即将推出(复杂度 I1)

函数 Dem_SetStorageCondition [SWS_Dem_00556] 📄 PDF

Std_ReturnType Dem_SetStorageCondition (uint8 StorageConditionID, boolean ConditionFulfilled);

Sets a storage condition. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemStorage Condition)} != NULL)

函数 Dem_SetWIRStatus [SWS_Dem_00839] 📄 PDF

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 Dem.h.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 7e5ab1b6f9c0 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与调用上下文

异步函数 Dem_SetWIRStatus 用于故障安全软件组件(failsafe SW-C)针对性地请求诊断事件的 Warning-Indicator-Requested 状态位(WIR 位)[SWS_Dem_00839]、[SWS_Dem_01303]。由于调用完全通过 RTE 进行,因此头文件 Dem.h 中不存在声明 [SWS_Dem_00839]。

功能行为与交互

该位的设置与重置取决于传入参数 WIRStatus 以及已配置指示器的状态:

  • 若传入 WIRStatus = TRUE,DEM 会将相关事件的 WIR 位置 1 [SWS_Dem_00833]。
  • 传入 WIRStatus = FALSE 时,仅当未设置所引用的 DEM 指示器时,WIR 位才会被重置为 0 [SWS_Dem_00834]。
  • 通过 Dem_SetWIRStatus 设置的 WIR 位还会阻止 DEM 在达到消抖或自愈周期时自动将 UDS 状态位 7 (WarningIndicatorRequested) 重置为 0 [SWS_Dem_00503]、[SWS_Dem_01233]。

并发与错误处理

该 API 针对不同事件是可重入的,但针对相同 EventId 不可重入 [SWS_Dem_00839]。成功接受请求时,函数返回 E_OK [SWS_Dem_00839]。返回值 E_NOT_OK 表示请求已被拒绝且应重试;当 DTC 设置被禁用(disabled ControlDTCSetting)或事件被标记为不可用时,尤其会出现这种情况 [SWS_Dem_00836]、[SWS_Dem_01108]、[SWS_Dem_00839]。

本使用说明是基于规范 AUTOSAR R20-11 自动生成的。

实现者指南即将推出(复杂度 I2)

函数 Dem_SetEventFailedWithSyncFreezeFrame [SWS_Dem_91041] 📄 PDF

void Dem_SetEventFailedWithSyncFreezeFrame (Dem_EventIdType EventId);

If called the Dem sets the event to failed and this failed event requires that a snapshot record is captured, the Dem synchronously retrieves the data within the call of this API. Tags: atp.Status=draft

函数 Dem_GetStatusOfDTC [SWS_Dem_00212] 📄 PDF

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.

函数 Dem_GetSeverityOfDTC [SWS_Dem_00232] 📄 PDF

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

函数 Dem_SetDTCFilter [SWS_Dem_00208] 📄 PDF

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 clients 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

函数 Dem_GetNextFilteredDTC [SWS_Dem_00215] 📄 PDF

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.

函数 Dem_GetNextFilteredDTCAndFDC [SWS_Dem_00227] 📄 PDF

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.

函数 Dem_GetNextFilteredDTCAndSeverity [SWS_Dem_00281] 📄 PDF

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.

函数 Dem_GetNextFilteredRecord [SWS_Dem_00224] 📄 PDF

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.

函数 Dem_DisableDTCRecordUpdate [SWS_Dem_00233] 📄 PDF

Std_ReturnType Dem_DisableDTCRecordUpdate (uint8 ClientId);

Disables the event memory update of a specific DTC (only one at one time).

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 793bc4c92bab 来源
译自德文指南AI 生成gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用与流程

异步函数 Dem_DisableDTCRecordUpdate([SWS_Dem_00233])会针对先前通过 Dem_SelectDTC 确定的 DTC([SWS_Dem_01253])禁用事件内存的更新。该调用的目的是保护相应 DTCOrigin 中所选故障的事件相关数据不被覆盖或删除,以确保后续对冻结帧数据和扩展数据记录(Extended Data Records)的一致读取访问([SWS_Dem_00270])。通过参数 ClientId 标识调用方模块实例([SWS_Dem_00233])。

返回值与错误处理

该函数通过特定返回值指示处理状态([SWS_Dem_00233]):

  • E_OK:已成功禁用事件内存的更新。
  • DEM_PENDING:该禁用操作正在异步执行;调用方必须在稍后时间再次调用该函数。
  • DEM_BUSY:针对该客户端,已有另一个依赖于 Dem_SelectDTC 的操作正在处理中。
  • E_NOT_OK:未预先选择 DTC。
  • DEM_WRONG_DTC:所选 DTC 在所选格式中不存在,或不合规地选择了 DTC 组。
  • DEM_WRONG_DTCORIGIN:指定的源(DTCOrigin)不存在。

并发性与限制

Dem_DisableDTCRecordUpdate 对于使用不同 ClientId 的调用是可重入的,但对于相同的 ClientId 是不可重入的([SWS_Dem_00233])。在同一时间只能禁止更新恰好一个 DTC([SWS_Dem_00233])。读取诊断数据后,必须通过 Dem_EnableDTCRecordUpdate 再次释放对数据集的更新([SWS_Dem_00234]、[SWS_Dem_00270])。

本使用说明是基于 AUTOSAR 规范自动生成的。

实现者指南即将推出(复杂度 I1)

函数 Dem_EnableDTCRecordUpdate [SWS_Dem_00234] 📄 PDF

Std_ReturnType Dem_EnableDTCRecordUpdate (uint8 ClientId);

Enables the event memory update of the DTC disabled by Dem_DisableDTCRecordUpdate() before. Note: As the call to Dem_EnableDTCRecordUpdate is the last action in the sequence of disabling/enabling a DTC, the caller is not interested in the return value. Therefore E_OK should be returned even if the DTC is enabled asynchronously.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: de89b4e41f66 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

异步函数 Dem_EnableDTCRecordUpdate([SWS_Dem_00234])用于重新启用先前被锁定的 DTC 的事件内存更新。根据 [SWS_Dem_00271],该函数重新释放当前受 Dem_DisableDTCRecordUpdate 保护的 DTC,以便其数据可以在 DEM 中再次更新。

作为传入参数,该函数需要 ClientId,它唯一标识调用模块的实例([SWS_Dem_00234])。由于调用 Dem_EnableDTCRecordUpdate 代表禁用和启用 DTC 序列中的最终操作,因此调用者对实际的返回值不感兴趣;因此,根据 [SWS_Dem_00234],即使在异步释放的情况下也应返回 E_OK。

关于错误处理和返回值,定义了以下状态([SWS_Dem_00234]):

  • E_OK:已成功启用 DTC 数据记录的更新。
  • E_NOT_OK:未选择 DTC。

关于并发性和限制,Dem_EnableDTCRecordUpdate 对于使用不同客户端 ID 的调用是可重入的,但对于相同的 ClientId 是不可重入的([SWS_Dem_00234])。

本使用说明由 AI 基于 AUTOSAR CP R20-11 规范生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_GetSizeOfExtendedDataRecordSelection [SWS_Dem_00240] 📄 PDF

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.

函数 Dem_GetSizeOfFreezeFrameSelection [SWS_Dem_00238] 📄 PDF

Std_ReturnType Dem_GetSizeOfFreezeFrameSelection (uint8 ClientId, uint32* SizeOfFreezeFrame);

Gets the size of freeze frame data by DTC selected by the call of Dem_SelectFreezeFrame Data.

函数 Dem_GetNextExtendedDataRecord [SWS_Dem_00239] 📄 PDF

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.

函数 Dem_GetNextFreezeFrameData [SWS_Dem_00236] 📄 PDF

Std_ReturnType Dem_GetNextFreezeFrameData (uint8 ClientId, uint8* DestBuffer, uint16* BufSize);

Gets freeze frame data by the DTC selected by Dem_SelectFreezeFrameData. The function stores the data in the provided DestBuffer.

函数 Dem_SelectExtendedDataRecord [SWS_Dem_91017] 📄 PDF

Std_ReturnType Dem_SelectExtendedDataRecord (uint8 ClientId, uint8 ExtendedDataNumber);

Sets the filter to be used by Dem_GetNextExtendedDataRecord and Dem_GetSizeOfExtended DataRecordSelection.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2ece0d12a55d 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

异步函数 Dem_SelectExtendedDataRecord 初始化用于读取先前通过 Dem_SelectDTC 确定的 DTC 的扩展诊断数据的过滤器 [SWS_Dem_91017] [SWS_Dem_01253]。它在客户端的关联事件内存中触发内部选择过程 [SWS_Dem_01273],并确定用于后续通过 Dem_GetSizeOfExtendedDataRecordSelection 和 Dem_GetNextExtendedDataRecord 查询的目标记录 [SWS_Dem_01272]。

在参数化与流程方面,适用以下规定:

  • 参数:除特定记录号外,ExtendedDataNumber 还接受值 0xFE(所有 OBD 记录的总大小)以及 0xFF(所有记录的总大小)[SWS_Dem_91017]。为避免读取过程中的数据不一致,可事先使用 Dem_DisableDTCRecordUpdate 保护该记录 [SWS_Dem_00270]。
  • 返回值与错误:选择成功时返回 E_OK [SWS_Dem_91017]。即使请求了未存储任何条目的有效记录号,此规则同样适用;在这种情况下,后续读取将返回缓冲区大小 0 [SWS_Dem_00631]。如果通过 Dem_SelectDTC 选择的不是单个故障代码而是 DTC 组,或者 DTC 不存在,则调用失败并返回 DEM_WRONG_DTC [SWS_Dem_91017] [SWS_Dem_01349]。如果存储位置不存在,则报告 DEM_WRONG_DTCORIGIN [SWS_Dem_91017]。
  • 并发性:若选择仍在处理中,DEM_PENDING 提示需要再次调用 [SWS_Dem_91017]。状态 DEM_BUSY 表示针对此 ClientId 仍有另一个依赖于 DTC 的操作处于活动状态 [SWS_Dem_91017]。该函数针对不同的 ClientId 值是可重入的,但针对同一实例不可重入 [SWS_Dem_91017]。

本使用说明基于 AUTOSAR 规范 R20-11 自动生成。

实现者指南即将推出(复杂度 I2)

函数 Dem_SelectFreezeFrameData [SWS_Dem_91015] 📄 PDF

Std_ReturnType Dem_SelectFreezeFrameData (uint8 ClientId, uint8 RecordNumber);

Sets the filter to be used by Dem_GetNextFreezeFrameData and Dem_GetSizeOfFreezeFrame Selection.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 5188ca62aa0a 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与语义

异步函数 Dem_SelectFreezeFrameData 用于设置过滤器,以便随后通过 Dem_GetSizeOfFreezeFrameSelection 和 Dem_GetNextFreezeFrameData 读取冻结帧数据 [SWS_Dem_91015]、[SWS_Dem_01268]。通过参数 ClientId 标识调用模块实例,而 RecordNumber 根据 ISO 14229-1 指定快照记录号;其中 0xFF 代表 DTC 的所有快照记录,0x00 代表 DTC 特定的 WWH-OBD 快照 [SWS_Dem_91015]。该调用触发关联事件内存中的内部选择 [SWS_Dem_01269]。

返回值与错误处理

若成功启动选择过程,函数返回 E_OK [SWS_Dem_91015]。若选择仍在处理中,DEM_PENDING 则提示调用方必须在稍后再次调用该函数 [SWS_Dem_91015]。若该客户端已有另一个依赖操作处于活动状态,API 将返回 DEM_BUSY [SWS_Dem_91015]、[SWS_Dem_01253]。若目标 DTC 不存在于所需格式中,或者通过 Dem_SelectDTC 选择的是 DTC 组而非单个 DTC,则返回 DEM_WRONG_DTC [SWS_Dem_91015]、[SWS_Dem_01348]。存储位置无效时会导致 DEM_WRONG_DTCORIGIN [SWS_Dem_91015]。若在未事先选择的情况下调用相关联的读取函数,DEM 将报告 DET 错误 [SWS_Dem_01270]、[SWS_Dem_01271]。

顺序与并发性

该函数针对不同调用方(ClientId)是可重入的,但针对同一客户端不可重入 [SWS_Dem_91015]。强制的前提条件是先前已调用 Dem_SelectDTC 以确定目标 DTC 和存储位置 [SWS_Dem_01253]。为确保读取的一致性,可以调用 Dem_DisableDTCRecordUpdate 以保护事件相关数据免遭更改或删除 [SWS_Dem_00270]。

此使用说明由人工智能基于规范自动生成。

实现者指南即将推出(复杂度 I2)

函数 Dem_GetNumberOfFreezeFrameRecords [SWS_Dem_91191] 📄 PDF

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

函数 Dem_DisableDTCSetting [SWS_Dem_00242] 📄 PDF

Std_ReturnType Dem_DisableDTCSetting (uint8 ClientId);

Disables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 4c222839a4a6 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与语义

函数 Dem_DisableDTCSetting 为分配给调用客户端 DemEventMemorySet 的所有诊断事件禁用 DTC 设置 [SWS_Dem_00242]、[SWS_Dem_01290]。该调用为异步调用,并且需要传递唯一的 ClientId [SWS_Dem_00242]。除了通过 E_OK 指示成功完成外,返回值 DEM_PENDING 还指示该操作仍在处理中;在此情况下,调用方必须在稍后时间再次调用该函数 [SWS_Dem_00242]。

功能性影响

如果调用 Dem_DisableDTCSetting,DEM 会阻止相关事件的存储以及 UDS 状态字节的更新 [SWS_Dem_00079]。若配置参数 DemDebounceBehavior 另外设置为 DEM_DEBOUNCE_RESET,则该调用还会导致重置相应的故障检测计数器(Fault Detection Counters)[SWS_Dem_00677]。

并发性与限制

该函数对于使用不同客户端 ID 的调用是可重入的,但对于相同的 ClientId 是不可重入的 [SWS_Dem_00242]。该禁用操作仅对通过 ClientId 引用的 DemEventMemorySet 的事件和 UDS 状态字节生效;该内存区域之外的 DTC 不受影响 [SWS_Dem_01290]。

本使用说明基于 AUTOSAR 规范的要求。

实现者指南即将推出(复杂度 I1)

函数 Dem_EnableDTCSetting [SWS_Dem_00243] 📄 PDF

Std_ReturnType Dem_EnableDTCSetting (uint8 ClientId);

(Re)-Enables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 4784195edff9 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

异步函数 Dem_EnableDTCSetting 为分配给被寻址客户端 DemEventMemorySet 的所有 DTC 激活或重新激活 DTC 设置 [SWS_Dem_00243]。调用时会传递调用方模块实例的唯一标识符 ClientId [SWS_Dem_00243]。

定义的返回值如下 [SWS_Dem_00243]:

  • E_OK:操作已成功完成。
  • DEM_PENDING:该过程正在异步执行;调用方必须在稍后时间再次调用该函数。

关于并发性,Dem_EnableDTCSetting 对于不同的 ClientId 值是可重入的,但不得针对相同的 ClientId 并发调用 [SWS_Dem_00243]。

在与事件处理的协同交互中,该函数确保 DEM 允许存储相关事件和 UDS 状态字节 [SWS_Dem_00080]。如果为事件重新激活 DTC 设置,则 Dem_EnableDTCSetting 会触发受影响事件的回调函数 InitMonitorForEvent,其中参数 InitMonitorReason 设为 DEM_INIT_MONITOR_REENABLED [SWS_Dem_00682]。

本段文字由 AI 生成,仅供参考。唯一具有约束力的是各 AUTOSAR 版本的规范。

实现者指南即将推出(复杂度 I1)

函数 Dem_DcmGetInfoTypeValue08 [SWS_Dem_00316] 📄 PDF

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 _GetInfotypeValueData() defined by the Dcm. Therefore Dcm_Op StatusType 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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 51829835ffc5 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

同步函数 Dem_DcmGetInfoTypeValue08([SWS_Dem_00316])由 DCM 调用,以在 OBD 服务 $09 的框架下查询 InfoType $08 的 IUMPR(In-Use Monitor Performance Ratio)数据([SWS_Dem_00298])。由于处理是同步进行的,DCM 为参数 OpStatus 仅传递值 DCM_INITIAL([SWS_Dem_00316])。有效负载数据以及符合 ISO-15031-5 的数据元素数量将写入 DCM 提供的缓冲区 Iumprdata08 中;最大可写入的缓冲区大小通过输入输出参数 Iumprdata08BufferSize 指定([SWS_Dem_00316])。

错误处理

该函数的返回值始终为 E_OK([SWS_Dem_00316])。针对此调用未指定具体的错误代码或开发错误报告(DET)。

并发与配置

该接口为不可重入(Non Reentrant),并通过 Dem_Dcm.h 声明([SWS_Dem_00316])。它仅存在于具有有效 OBD 支持(DemOBDSupport != DEM_OBD_NO_OBD_SUPPORT)且与 OBD 相关的控制单元中([SWS_Dem_00316]),并在 DemOBDEngineType 针对汽油发动机配置为 DEM_IGNITION_SPARK 时提供([SWS_Dem_00357])。

相互作用

在查询时不得显示被抑制的故障代码(suppressed DTCs),且必须按如同过滤器不匹配一样进行处理([SWS_Dem_01101])。该函数与 Dem_DcmGetInfoTypeValue0B 一起用于支持服务 $09 中的数据请求([SWS_Dem_00298])。

此使用说明基于 AUTOSAR CP R20-11 规范自动生成。

实现者指南即将推出(复杂度 I2)

函数 Dem_DcmGetInfoTypeValue0B [SWS_Dem_00317] 📄 PDF

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 _GetInfotypeValueData() defined by the Dcm. Therefore Dcm_Op StatusType 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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: dde27ef1779b 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用与参数接口

同步函数 Dem_DcmGetInfoTypeValue0B(服务 ID 0x6c,可通过 Dem_Dcm.h 获取)供 DCM 用于在 OBD 服务 $09 的框架下根据 InfoType $0B 查询 IUMPR(In-Use Performance Ratio)数据 [SWS_Dem_00317] [SWS_Dem_00298]。该函数接口派生自 DCM 原型 <Module>_GetInfotypeValueData(),因此它使用 Dcm_OpStatusType 和 Std_ReturnType [SWS_Dem_00317]:

  • OpStatus(输入):由于该函数呈现同步行为,调用时仅会出现状态 DCM_INITIAL [SWS_Dem_00317]。
  • Iumprdata0BBufferSize(输入输出):定义允许写入缓冲区的最大数据字节数 [SWS_Dem_00317]。
  • Iumprdata0B(输出):由 DCM 提供的缓冲区,用于接收符合 ISO-15031-5 的数据元素数量以及 InfoType $0B 的内容 [SWS_Dem_00317]。

返回值始终提供 E_OK [SWS_Dem_00317]。

错误处理与并发

规范中未针对此函数定义具体的错误代码或错误响应(例如 DET 报告);该调用在形式上始终返回 E_OK [SWS_Dem_00317]。该 API 被归类为不可重入(Non Reentrant)[SWS_Dem_00317]。因此,推测调用方(DCM)不得为多个诊断请求并行并发执行此服务。 问题 Q-636518c23ec3801a (未决)

配置依赖性与交互

该 API 仅存在于配置参数 DemOBDSupport 配置为不等于 DEM_OBD_NO_OBD_SUPPORT 的 OBD 相关控制单元中 [SWS_Dem_00317]。此外,当 DemOBDEngineType 设置为 DEM_IGNITION_COMPRESSION 时,该 API 亦会提供 [SWS_Dem_00358]。在与 DTC 抑制的协同交互中,被抑制的 DTC 对该查询函数不可见,且必须按如同过滤器不匹配一样进行处理 [SWS_Dem_01101]。

本段文字由 AI 创建;指导准则要求用户根据 AUTOSAR 规范进行核对。

实现者指南即将推出(复杂度 I2)

函数 Dem_DcmReadDataOfPID01 [SWS_Dem_00318] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 6941d67caf4d 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数Dem_DcmReadDataOfPID01用于将DEM计算出的OBD参数PID $01的内容传递给DCM[SWS_Dem_00318]。该接口在头文件Dem_Dcm.h中声明,并且仅在DemOBDSupport未设置为DEM_OBD_NO_OBD_SUPPORT的OBD相关ECU中可用[SWS_Dem_00318]。

DCM通过输出参数PID01value传递一个指向目标缓冲区的指针,DEM将数据写入该缓冲区中[SWS_Dem_00318]。DCM负责提供足够大小的此缓冲区;其大小在配置期间根据用于建立PIDBuffer的最大可能出现的PID来确定[SWS_Dem_00318]。

该函数设计为不可重入(Non Reentrant)[SWS_Dem_00318]。返回值始终为E_OK,因为根据规范,带有E_NOT_OK的错误状态绝不会出现[SWS_Dem_00318]。

在与故障查询的交互中,被抑制的故障码(suppressed DTC)对于Dem_DcmReadDataOfPID01必须不可见[SWS_Dem_01101]。DEM在评估时必须将受抑制的DTC当作过滤器不匹配一样处理[SWS_Dem_01101]。

注意:本文档由AI系统基于AUTOSAR Classic R20-11规范自动生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_DcmReadDataOfPID1C [SWS_Dem_00325] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 1c7eda1b0fc3 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与调用上下文

函数 Dem_DcmReadDataOfPID1C 提供了 Diagnostic Event Manager 的一个同步服务,Diagnostic Communication Module (DCM) 通过该服务查询 OBD PID $1C 的计算内容 [SWS_Dem_00325]。

  • 参数:DEM 通过输出参数 PID1Cvalue(指向 uint8 的指针)将数据写入 DCM 的缓冲区中。在配置 DCM 时,所需的缓冲区大小根据最大 PID 进行计算,以提供合适的 PIDBuffer [SWS_Dem_00325]。
  • 返回值:该服务始终返回状态值 E_OK。按照规范,绝不会出现带有 E_NOT_OK 的错误情况 [SWS_Dem_00325]。

专业内容与交互

根据 [SWS_Dem_00748],该接口返回车辆或发动机所认证的 OBD 要求(例如 OBD、OBDII 或 JOBD)。要在 PID1Cvalue 中输出的值通过配置参数 DemOBDCompliancy 确定 [SWS_Dem_00325] [SWS_Dem_00748]。

并发性与可用性

该函数被规范为不可重入(Non Reentrant)[SWS_Dem_00325]。它在头文件 Dem_Dcm.h 中声明,并且仅在具有活动 OBD 支持的 ECU 中可用,其中 DemGeneral.DemOBDSupport 未设置为 DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00325]。

此使用说明基于 AUTOSAR CP R20-11 规范自动生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_DcmReadDataOfPID21 [SWS_Dem_00319] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2dc814aaf11d 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_DcmReadDataOfPID21(服务 ID 0x64)供 Diagnostic Communication Manager(DCM)用于查询由 DEM 计算出的 OBD 参数 PID $21 的当前值 [SWS_Dem_00319]、[SWS_Dem_01098]。该接口通过头文件 Dem_Dcm.h 声明,且仅在与 OBD 相关的控制单元中可用(前提是配置参数 DemOBDSupport 未设置为 DEM_OBD_NO_OBD_SUPPORT)[SWS_Dem_00319]。

对于使用和操作协同,适用以下规定:

  • 缓冲区提供:指针 PID21value 作为输出参数传递 [SWS_Dem_00319]。调用方(DCM)必须提供该缓冲区,并在配置期间根据配置的最大 PID 将其调整为合适大小 [SWS_Dem_00319]。调用时,DEM 会将 PID $21 的当前值写入此缓冲区 [SWS_Dem_01098]。
  • 返回值:该函数始终返回 E_OK,因为根据规范,错误值如 E_NOT_OK 绝不会出现 [SWS_Dem_00319]。
  • 初始状态/错误处理:如果在通过 Dem_SetDataOfPID21 设置值之前调用 Dem_DcmReadDataOfPID21,DEM 将返回替代值 0xFFFF 作为 PID $21 的内容 [SWS_Dem_01099]。
  • 并发性:该函数被指定为不可重入(Non Reentrant)[SWS_Dem_00319]。因此,禁止由多个上下文进行并发调用。

本使用说明由 AI 基于 AUTOSAR 规范 R20-11 生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_DcmReadDataOfPID30 [SWS_Dem_00320] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: aa9161844e39 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_DcmReadDataOfPID30 用于将由 DEM 计算出的参数 PID $30 的数据内容传递给 DCM [SWS_Dem_00320]。它通过头文件 Dem_Dcm.h 声明,并且当配置参数 DemOBDSupport 不等于 DEM_OBD_NO_OBD_SUPPORT 时,仅在具有 OBD 相关性的控制单元中可用 [SWS_Dem_00320]。

对于该接口的使用,适用以下规定:

  • 传递参数:通过输出参数 PID30value,调用方提供一个缓冲区,DEM 将 PID $30 的计算数据写入其中 [SWS_Dem_00320]。DCM 负责提供大小合适的该缓冲区;DCM 在配置期间根据最大 PID 确定其尺寸 [SWS_Dem_00320]。
  • 返回值与错误处理:该接口作为 Std_ReturnType 始终返回 E_OK [SWS_Dem_00320]。根据规范,错误值 E_NOT_OK 绝不会出现,并且未提供特定的错误代码或单独的错误处理例程 [SWS_Dem_00320]。
  • 并发性:该函数被定义为不可重入(Non Reentrant)[SWS_Dem_00320]。由于规范未提供内部同步机制,调用方应有责任排除并发调用 [SWS_Dem_00320]。 问题 Q-976bc8dc189021a1 (未决)

本使用说明由 AI 基于 AUTOSAR Classic R20-11 规范生成。

函数 Dem_DcmReadDataOfPID31 [SWS_Dem_00321] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: cfc8a8d1c498 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_DcmReadDataOfPID31 用于将由 DEM 计算出的 OBD 参数 PID $31 的值传递给 DCM [SWS_Dem_00321]。该接口通过头文件 Dem_Dcm.h 提供,服务 ID 为 0x66 [SWS_Dem_00321]。

用法与参数

该调用为同步调用,且定义为不可重入 [SWS_Dem_00321]:

  • PID31value(输出参数):指向接收 PID $31 计算数据的缓冲区(uint8*)的指针 [SWS_Dem_00321]。提供合适大小的缓冲区是调用方 DCM 的职责;DCM 在配置期间根据最大 PID 确定所需的缓冲区大小,以设计 PIDBuffer [SWS_Dem_00321]。
  • 返回值:该服务作为 Std_ReturnType 始终返回 E_OK;根据规范,错误值 E_NOT_OK 绝不会出现 [SWS_Dem_00321]。

限制与配置

该 API 仅用于 OBD 相关的控制单元 [SWS_Dem_00321]。仅当配置参数 DemGeneral.DemOBDSupport 设置为值 DEM_OBD_MASTER_ECU 时,它才可用 [SWS_Dem_00321]。由于该函数不可重入,DCM 不得进行并行调用 [SWS_Dem_00321]。

本使用说明由自动生成,完全基于 Release R20-11 的规范数据。

函数 Dem_DcmReadDataOfPID41 [SWS_Dem_00322] 📄 PDF

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

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 18b86d10b784 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_DcmReadDataOfPID41 用于将由 DEM 计算出的 PID $41 内容传递给 DCM [SWS_Dem_00322]。它通过头文件 Dem_Dcm.h 声明,服务 ID 为 0x67 [SWS_Dem_00322]。

用法与参数

该调用为同步调用,且被指定为不可重入(Non Reentrant)[SWS_Dem_00322]。作为输出参数,该接口需要指针 PID41value(uint8*):

  • PID41value 接收 PID $41 的计算数据 [SWS_Dem_00322]。
  • 该缓冲区必须由 DCM 以合适的大小提供;为此,DCM 早在配置期间便根据出现的最大的 PID 确定配置 PIDBuffer 所需的大小 [SWS_Dem_00322]。

返回值与错误处理

该函数始终返回 E_OK 作为返回值,因为根据规范,错误值 E_NOT_OK 绝不会出现 [SWS_Dem_00322]。未针对此接口定义特定的错误代码或错误响应 [SWS_Dem_00322]。

配置依赖性与可用性

该 API 仅在 OBD 相关的控制单元中需要 [SWS_Dem_00322]。仅当 DemGeneral 中的配置参数 DemOBDSupport 配置为不等于 DEM_OBD_NO_OBD_SUPPORT 时,它才可用 [SWS_Dem_00322]。

本段文字由 AI 创建,仅基于规范 R20-11。

函数 Dem_DcmReadDataOfPID4D [SWS_Dem_00323] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 0df731691150 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与调用上下文

同步函数 Dem_DcmReadDataOfPID4D 用于将由 DEM 计算出的 OBD 参数 PID $4D 的值传输给 DCM [SWS_Dem_00323]。该服务通过头文件 Dem_Dcm.h 提供,服务 ID 为 0x68 [SWS_Dem_00323]。

作为唯一的传递参数,输出指针 PID4Dvalue 指向由 DCM 提供的目标缓冲区 [SWS_Dem_00323]。DCM 提供大小合适的该缓冲区,其方法是早在配置期间根据出现的最大的 PID 确定 PIDBuffer 所需的大小 [SWS_Dem_00323]。

返回值与错误处理

该函数的返回类型为 Std_ReturnType,且无一例外地返回 E_OK [SWS_Dem_00323]。根据规范,排除 E_NOT_OK 这一返回值,且其绝不会出现 [SWS_Dem_00323]。针对此调用不存在特殊的错误处理或特定的错误代码。

并发性与配置依赖性

该接口被声明为不可重入(Non Reentrant),因此不得并发执行 [SWS_Dem_00323]。

此外,该函数仅在 OBD 相关的控制单元中需要 [SWS_Dem_00323]。仅当在配置中将 DemGeneral 内的参数 DemOBDSupport 设置为值 DEM_OBD_MASTER_ECU 时,它才可用 [SWS_Dem_00323]。

本使用说明基于 AUTOSAR CP R20-11 中 Diagnostic Event Manager 的规范。

函数 Dem_DcmReadDataOfPID4E [SWS_Dem_00324] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 51321ea5857b 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_DcmReadDataOfPID4E 用于将由 DEM 计算出的 OBD 参数 ID PID $4E 的内容传输给 DCM [SWS_Dem_00324]。该函数具有服务 ID 0x69,并通过头文件 Dem_Dcm.h 声明 [SWS_Dem_00324]。

调用与缓冲区管理

该调用为同步调用,且定义为不可重入(Non Reentrant)[SWS_Dem_00324]。作为输出参数,该函数接收指针 PID4Evalue(类型 uint8*),DEM 通过该指针存放计算出的数据 [SWS_Dem_00324]。调用方 DCM 必须为此提供具有合适大小的缓冲区 [SWS_Dem_00324]。DCM 在配置期间根据出现的最大的 PID 确定所需的缓冲区大小,以相应调整共享的 PIDBuffer 的尺寸 [SWS_Dem_00324]。

返回值与错误处理

该接口始终返回类型为 Std_ReturnType 的 E_OK,因为根据规范,返回值 E_NOT_OK 绝不会出现 [SWS_Dem_00324]。在规范范围内未标明针对错误情况的特定错误代码,也未标明 DET 或 DEM 错误报告 [SWS_Dem_00324]。

限制与可用性

该 API 仅在 OBD 相关的控制单元中需要 [SWS_Dem_00324]。其可用性与配置条件 DemGeneral.DemOBDSupport == DEM_OBD_MASTER_ECU 绑定;在其他配置中,该函数不可用 [SWS_Dem_00324]。

本段文字由 AI 创建;它不能替代对 AUTOSAR 规范的研读。

函数 Dem_DcmReadDataOfPID91 [SWS_Dem_01187] 📄 PDF

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

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: b21962c6ebc5 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_DcmReadDataOfPID91(服务 ID 0x6a)用于将 DEM 计算的 OBD 参数 PID $91 的数据传递给 DCM [SWS_Dem_01187]。该接口通过头文件 Dem_Dcm.h 声明,且仅在 DemOBDSupport 未配置为 DEM_OBD_NO_OBD_SUPPORT 的 OBD 相关 ECU 中可用 [SWS_Dem_01187]。

作为输出参数,函数需要指针 PID91value,该指针指向由 DCM 提供的缓冲区 [SWS_Dem_01187]。DCM 负责以合适的大小提供该缓冲区;在配置期间便已根据最大 PID 确定所需大小,以创建缓冲区 PIDBuffer [SWS_Dem_01187]。

该函数被指定为不可重入(Non Reentrant),且必须同步处理 [SWS_Dem_01187]。因此,不允许来自不同上下文的并行调用。不存在错误返回值:函数作为 Std_ReturnType 始终返回 E_OK,因为根据规范错误值 E_NOT_OK 绝不会出现 [SWS_Dem_01187]。

本使用说明自动生成,且完全基于 AUTOSAR Classic R20-11 的规范数据。

函数 Dem_DcmReadDataOfOBDFreezeFrame [SWS_Dem_00327] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: f57c1c183634 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_DcmReadDataOfOBDFreezeFrame 为被选用于输出 OBD 服务 $02 的最重要的冻结帧读取 PID 数据元素的数据 [SWS_Dem_00327]。

调用上下文与参数

调用由 DCM 通过头文件 Dem_Dcm.h 进行 [SWS_Dem_00327]。向该函数传递以下参数:

  • PID:符合 ISO 15031-5 的 PID 标识符 [SWS_Dem_00327]。
  • DataElementIndexOfPID:PID 内部数据元素基于零的连续索引。顺序直接源自 DCM 配置的 PID 布局中数据元素的位置 [SWS_Dem_00327]、[SWS_Dem_00597]。
  • DestBuffer:指向缓冲区的指针,数据元素以无头信息的十六进制原始格式写入该缓冲区 [SWS_Dem_00327]。
  • BufSize:用作输入和输出参数;调用时包含最大缓冲区容量,并返回实际写入的数据字节数 [SWS_Dem_00327]。

限制与错误处理

该函数不可重入(Non Reentrant),并且仅在启用了 OBD 支持(DemOBDSupport != DEM_OBD_NO_OBD_SUPPORT)的 ECU 中可用 [SWS_Dem_00327]。成功提供数据时返回 E_OK,否则返回 E_NOT_OK [SWS_Dem_00327]。被抑制的 DTC 对该查询函数不可见 [SWS_Dem_01101];推测在这种情况下函数会返回 E_NOT_OK。 问题 Q-09c77cdccc138247 (未决)

此文本由 AI 创建;以引用的规范为准。

实现者指南即将推出(复杂度 I1)

函数 Dem_DcmGetDTCOfOBDFreezeFrame [SWS_Dem_00624] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: f96309635c05 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步、不可重入函数 Dem_DcmGetDTCOfOBDFreezeFrame 读取与给定的冻结帧记录号对应的 DTC [SWS_Dem_00624]。它主要供 DCM 在 OBD 服务 $02 (PID $02) 范围内输出使用,以确定最相关的选定冻结帧的 DTC [SWS_Dem_00623]。

调用与参数

  • FrameNumber (IN):符合 ISO 15031-5 的冻结帧记录的唯一标识符。值 0x00 表示完整的 OBD 冻结帧,其他值保留 [SWS_Dem_00624]。
  • DTCFormat (IN):DTC 值的所需输出格式 [SWS_Dem_00624]。
  • DTC (OUT):指向以 OBD 格式存储所确定的故障码的存储位置的指针 [SWS_Dem_00624]。

返回值与错误处理

如果能够成功确定 DTC,该函数返回 E_OK。如果没有合适的 DTC 可用,则调用返回 E_NOT_OK;在这种情况下,输出参数 DTC 不包含有效数据 [SWS_Dem_00624]。

条件与协同工作

该接口通过头文件 Dem_Dcm.h 可用,且仅存在于具有 OBD 支持的 ECU 中(配置 DemOBDSupport != DEM_OBD_NO_OBD_SUPPORT)[SWS_Dem_00624]。被抑制的 DTC(suppressed DTC)被该函数视为不存在匹配项,并且对该查询不可见 [SWS_Dem_01101]。

本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_DcmGetAvailableOBDMIDs [SWS_Dem_00766] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 5b769d67b0cc 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步且可重入的函数 Dem_DcmGetAvailableOBDMIDs(服务 ID 0xa3)由 DCM 调用,以便在 OBD 服务 $06 请求的范围内读取所请求的可用性 OBDMID 的值 [SWS_Dem_00766]。通过输入参数 Obdmid(类型 uint8),调用者传递标准化的可用性标识符,如 $00、$20 或 $40。DEM 通过 32 位输出指针 Obdmidvalue 将受支持的测试标识符作为位编码信息返回 [SWS_Dem_00766]。诊断测试仪根据这些数据确定向维修站人员显示哪些检查项目以供选择 [SWS_Dem_00766]。

该函数通过头文件 Dem_Dcm.h 声明。它仅适用于 OBD 相关的 ECU,并且仅当配置选项 DemGeneral.DemOBDSupport 设置为不等于 DEM_OBD_NO_OBD_SUPPORT 时才在模块中可用 [SWS_Dem_00766]。

在正确传输 DTR 可用性时,该接口返回 E_OK [SWS_Dem_00766]。如果在 DEM 完全初始化之前或在它关闭之后调用该函数,则错误码 DEM_E_UNINIT 生效 [SWS_Dem_00173]。同样,使用无效指针(DEM_E_PARAM_POINTER)或错误参数值(DEM_E_PARAM_DATA)的调用会导致符合 [SWS_Dem_00173] 的开发错误。在这些错误情况下,推测返回值可能会提供 E_NOT_OK。 问题 Q-b42d268116fb8df7 (未决)

本使用说明由 AI 基于 AUTOSAR 规范 R20-11 生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_DcmGetNumTIDsOfOBDMID [SWS_Dem_00767] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 49e6e35927e4 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步且可重入的函数 Dem_DcmGetNumTIDsOfOBDMID(服务 ID 0xa4)通过头文件 Dem_Dcm.h 声明 [SWS_Dem_00767]。它供 Diagnostic Communication Manager (DCM) 在收到请求时查询所指定的某个功能性 OBDMID 关联的测试标识符(TID)数量 [SWS_Dem_00761]。

调用时,DCM 在输入参数 Obdmid 中传递相关 OBDMID 的标识符,并通过指针 numberOfTIDs 取回分配的 TID 数量 [SWS_Dem_00767]。该输出值用作 DCM 从 0 到 numberOfTIDs - 1 的计数循环上限,随后在该循环中通过 Dem_DcmGetDTRData 顺序查询各个 DTR 结果值、测试结果和限值 [SWS_Dem_00761] [SWS_Dem_00768]。

当成功确定 TID 数量时,函数返回返回值 E_OK;若查询失败,则返回 E_NOT_OK [SWS_Dem_00767]。规范中未对失败情况单独列出具体的开发错误(DET)或详细错误原因。

该调用仅适用于与 OBD 相关的 ECU。仅当配置参数 DemOBDSupport 未设置为 DEM_OBD_NO_OBD_SUPPORT 时,该接口在 DEM 中才可用 [SWS_Dem_00767]。

本使用说明由 AI 生成,且仅基于 AUTOSAR Classic R20-11 的规范文档。

实现者指南即将推出(复杂度 I1)

函数 Dem_DcmGetDTRData [SWS_Dem_00768] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 18535af5aa7f 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步且可重入的函数Dem_DcmGetDTRData供Diagnostic Communication Manager(DCM)用于查询DTR数据(Diagnostic Test Results),包括TID值、UaSID以及包含下限和上限的当前测试结果[SWS_Dem_00768]。当配置了DemOBDSupport != DEM_OBD_NO_OBD_SUPPORT时,它仅在具有OBD支持的ECU中可用[SWS_Dem_00768]。

使用与交互

DCM调用该函数以获取特定Obdmid和TIDindex的可用DTR数据[SWS_Dem_00762]。查询通常通过索引TIDindex从0到numberOfTIDs - 1进行迭代,其中总数先前已通过Dem_DcmGetNumTIDsOfOBDMID()确定[SWS_Dem_00768],[SWS_Dem_00762]。通过输出参数TIDvalue、UaSID、Testvalue、Lowlimvalue和Upplimvalue提供用于诊断仪响应的值[SWS_Dem_00768]。

错误处理与边界条件

在成功获取DTR结果时,该函数返回E_OK,在出错时返回E_NOT_OK[SWS_Dem_00768]。特别是当引用的诊断事件不可用时会发生错误:

  • 若某个事件被设置为不可用,则它会被视为未配置的事件,且Dem_DcmGetDTRData失败[SWS_Dem_01108]。
  • 如果为某个DTR调用该函数,而该DTR通过DemDtrEventRef引用的事件配置有DemEventAvailable == FALSE,则DEM强制返回E_NOT_OK[SWS_Dem_01336]。在此情况下,所有输出参数均为未定义[SWS_Dem_01336]。

此使用说明是基于规范要求自动生成的。

实现者指南即将推出(复杂度 I1)

函数 Dem_J1939DcmSetDTCFilter [SWS_Dem_00970] 📄 PDF

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.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: fedc82312f61 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

同步函数 Dem_J1939DcmSetDTCFilter(服务 ID 0x90,在 Dem_J1939Dcm.h 中声明)设置过滤掩码属性,以选择通过 ClientId 寻址的 J1939 节点的 J1939 DTC [SWS_Dem_00970],[SWS_Dem_00855]。作为过滤条件的是状态过滤器 DTCStatusFilter(可能的值:DEM_J1939DTC_ACTIVE、DEM_J1939DTC_PREVIOUSLY_ACTIVE、DEM_J1939DTC_PENDING、DEM_J1939DTC_PERMANENT 或 DEM_J1939DTC_CURRENTLY_ACTIVE)、功能组 DTCKind 以及源存储区 DTCOrigin [SWS_Dem_00970]。通过输出参数 LampStatus,该调用返回已过滤 DTC 的当前组合灯状态 [SWS_Dem_00970],[SWS_Dem_00857]。此外,内部计数器重置为第一个匹配的事件 [SWS_Dem_00855]。解释:该接口的调用方可能是 J1939Dcm 模块,用于准备诊断读取操作。 问题 Q-5f25345851de686f (未决)

错误处理与返回值

作为返回值,函数在成功配置过滤器时返回 E_OK,如果无法设置过滤器则返回 E_NOT_OK [SWS_Dem_00970]。被抑制的 DTC 不包含在过滤范围内,并被视为过滤条件不满足;它们对于查询保持不可见 [SWS_Dem_01101]。

并发性与限制

该函数针对不同的 ClientId 值是可重入的,但针对相同的 ClientId 是不可重入的 [SWS_Dem_00970]。因此,必须避免对相同 J1939 事件存储区的并发过滤调用。

相互作用

设置过滤器构成了后续处理的基础:

此使用说明基于 AUTOSAR Classic R20-11 规范自动生成。

实现者指南即将推出(复杂度 I2)

函数 Dem_J1939DcmGetNumberOfFilteredDTC [SWS_Dem_00972] 📄 PDF

Std_ReturnType Dem_J1939DcmGetNumberOfFilteredDTC (uint16* NumberOfFilteredDTC, uint8 ClientId);

Gets the number of currently filtered DTCs set by the function Dem_J1939DcmSetDTCFilter.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 79d994fe5d97 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

函数 [SWS_Dem_00972] 异步确定在传入 ClientId 的主事件内存中与先前使用 Dem_J1939DcmSetDTCFilter 定义的过滤条件相匹配的 J1939 DTC 数量([SWS_Dem_00874])。必须先调用 Dem_J1939DcmSetDTCFilter,因为该调用会设置过滤掩码属性并将内部计数器重置为第一个事件([SWS_Dem_00855])。

计数结果通过输出参数 NumberOfFilteredDTC 提供。对于流程和返回值,适用以下规则:

  • 成功:一旦匹配 DTC 的总数完全确定,函数便返回 E_OK([SWS_Dem_00874])。
  • 中断:若由于内部限制必须中断搜索过程,函数将返回 DEM_PENDING。在这种情况下,输出参数尚不必有效;后续调用将在被中断元素之后继续进行确定([SWS_Dem_00874])。
  • 错误代码:规范此外还规定了状态值 DEM_NO_SUCH_ELEMENT 以及 DEM_BUFFER_TOO_SMALL([SWS_Dem_00972])。

在可见性方面,[SWS_Dem_01101] 规定被抑制的故障(suppressed DTC)必须按过滤条件不满足来处理。该函数被定义为不可重入([SWS_Dem_00972]),因此必须避免并发调用。

此使用说明由 AI 生成,总结了 AUTOSAR 规范的核心要点。

实现者指南即将推出(复杂度 I1)

函数 Dem_J1939DcmGetNextFilteredDTC [SWS_Dem_00973] 📄 PDF

Std_ReturnType Dem_J1939DcmGetNextFilteredDTC (uint32* J1939DTC, uint8* OccurenceCounter, uint8 ClientId);

Gets the next filtered J1939 DTC.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: c6cbd3422fd3 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

异步且不可重入的函数 Dem_J1939DcmGetNextFilteredDTC(服务 ID 0x92)从通过 ClientId 寻址的 J1939 事件内存中读取下一个已过滤的 J1939-DTC [SWS_Dem_00973]。它通过头文件 Dem_J1939Dcm.h 声明 [SWS_Dem_00973]。

若函数找到符合过滤条件的事件,则返回 E_OK,并通过输出参数提供相应的 J1939DTC 以及关联的 OccurenceCounter [SWS_Dem_00877]、[SWS_Dem_00973]。若发生计数器超过 126(0x7E),则返回的值会被固定限制为 126(0x7E)[SWS_Dem_00877]。

若搜索过程由于内部限制或实现细节必须中断,则函数返回 DEM_PENDING [SWS_Dem_00877]、[SWS_Dem_00973]。在这种情况下,输出参数不包含有效数据;下一次调用会在中断的元素之后直接继续搜索 [SWS_Dem_00877]。若不存在更多匹配的元素,则返回值归为 DEM_NO_SUCH_ELEMENT;缓冲区过小时会报告 DEM_BUFFER_TOO_SMALL [SWS_Dem_00973]。

被抑制的诊断事件(suppressed DTCs)对查询函数不可见;它们被 Dem_J1939DcmGetNextFilteredDTC 视为不满足过滤条件 [SWS_Dem_01101]。

本文字由 AI 自动生成,不能替代官方 AUTOSAR 规范。

实现者指南即将推出(复杂度 I1)

函数 Dem_J1939DcmFirstDTCwithLampStatus [SWS_Dem_00974] 📄 PDF

void Dem_J1939DcmFirstDTCwithLampStatus (uint8 ClientId);

The function sets the filter to the first applicable DTC for the DM31 response for a specific node.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 7183056cd60e 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

同步接口 Dem_J1939DcmFirstDTCwithLampStatus 为特定节点的 DM31 响应初始化针对第一个匹配的诊断故障码(DTC)的过滤 [SWS_Dem_00974]。类型为 uint8 的 ClientId 用作唯一的输入参数,以此寻址关联的 J1939 事件内存 [SWS_Dem_00974]。该函数既无输入参数也无输出参数,且不提供返回值(void)[SWS_Dem_00974]。它通过头文件 Dem_J1939Dcm.h 以服务 ID 0x93 声明 [SWS_Dem_00974]。Interpretation:该函数大致应主要由模块 J1939Dcm 调用,以在传输 DM31 灯状态消息前初始化过滤。 问题 Q-064513be4f06584b (未决)

过滤逻辑与交互

该函数的每次调用都会将内部计数器重置为针对指定 ClientId 分配了 J1939DTC 的第一个事件 [SWS_Dem_00880]。关于诊断事件的状态,规范规定被抑制的 DTC(suppressed DTC)对于 DCM 查询函数必须保持不可见 [SWS_Dem_01101]。因此,Dem_J1939DcmFirstDTCwithLampStatus 处理被抑制的 DTC 时,就如同未满足过滤条件一样 [SWS_Dem_01101]。

并发性与限制

关于并发行为,该接口对于使用不同 ClientId 值的调用是可重入的,但对于相同的 ClientId 值是不可重入的 [SWS_Dem_00974]。因此,不允许通过相同的客户端 ID 对同一个 J1939 事件内存进行并行查询。

本文字由 AI 策划助手自动生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_J1939DcmGetNextDTCwithLampStatus [SWS_Dem_00975] 📄 PDF

Std_ReturnType Dem_J1939DcmGetNextDTCwithLampStatus (Dem_J1939DcmLampStatusType* LampStatus, uint32* J1939DTC, uint8* OccurenceCounter, uint8 ClientId);

Gets the next filtered J1939 DTC for DM31 including current LampStatus.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 48ed4a1205b0 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与调用上下文

函数 Dem_J1939DcmGetNextDTCwithLampStatus 同步执行且不可重入([SWS_Dem_00975])。在 J1939 诊断通信(DM31)框架内,它用于从通过 ClientId 寻址的事件内存中迭代查询下一个过滤出的 J1939 DTC 以及相关的指示灯状态和事件计数器(OccurenceCounter)([SWS_Dem_00975])。该迭代要求事先已通过 Dem_J1939DcmFirstDTCwithLampStatus 对事件内存进行了准备([SWS_Dem_00881])。

流程与返回值

每次调用都会在内存中搜索分配有 J1939 DTC 的下一个事件([SWS_Dem_00881])。被抑制的 DTC(suppressed DTC)将像不匹配的事件一样处理并被跳过([SWS_Dem_01101])。

  • E_OK:找到了匹配的事件。参数 LampStatus、J1939DTC 和 OccurenceCounter 包含有效值([SWS_Dem_00882])。解释:参数规范中提及的条件 DEM_FILTERED_OK 可能指的是 E_OK,因为 DEM_FILTERED_OK 未声明为该函数的返回值([SWS_Dem_00975])。 问题 Q-5284fb30b98babf6 (未决)
  • DEM_PENDING:由于实现限制,内部搜索必须中断。输出参数不包含有效数据,且下一次调用将在被中断元素之后继续搜索([SWS_Dem_00882])。
  • DEM_NO_SUCH_ELEMENT:内存中没有更多匹配的事件;输出参数无效([SWS_Dem_00881])。
  • DEM_BUFFER_TOO_SMALL:传入的缓冲区过小([SWS_Dem_00975])。

指示灯状态与取值范围

为了确定指示灯状态,DEM 会检查 UDS 状态位 7(WarningIndicator)以及相应的指示器引用:当该位处于激活状态且已分配引用时,Malfunction Indicator Lamp([SWS_Dem_00883])、Red Stop Lamp([SWS_Dem_00887])和 Amber Warning Lamp([SWS_Dem_00891])分别被设置为 Lamp On;否则为 Lamp Off。当计数值超过 126 (0x7F) 时,OccurenceCounter 将被限制为恰好 126([SWS_Dem_00882])。

本使用说明基于 AUTOSAR 规范 R20-11 自动生成。

实现者指南即将推出(复杂度 I2)

函数 Dem_J1939DcmClearDTC [SWS_Dem_00976] 📄 PDF

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

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: cb1db17652c2 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

函数Dem_J1939DcmClearDTC([SWS_Dem_00976])通过头文件Dem_J1939Dcm.h提供给J1939Dcm模块,以从事件内存中清除所有当前处于激活状态或先前处于激活状态的诊断故障码(DTC)([SWS_Dem_00878])。该调用以异步方式工作。作为输入参数,该接口需要用于确定待清除DTC的过滤类型DTCTypeFilter、用于选择源内存的DTCOrigin以及用于寻址J1939事件内存的ClientId。

错误处理与返回值

执行结果通过返回类型Std_ReturnType指示:

  • E_OK:删除过程已成功完成。
  • DEM_PENDING:清除正在进行中;调用者必须在稍后时间再次调用该函数。
  • DEM_CLEAR_BUSY:另一个客户端正在同时执行清除操作;该操作未启动,稍后必须重试。
  • DEM_WRONG_DTC:所选DTC在所选格式中不存在,或者清除按配置被限制为组。
  • DEM_WRONG_DTCORIGIN:指定的源内存不存在。
  • DEM_CLEAR_FAILED或DEM_CLEAR_MEMORY_ERROR:清除失败或在清除内存区域时发生错误(例如在未完全清除不可失内存时)。

并发性与限制

根据[SWS_Dem_00976],该函数对于不同的客户端ID是可重入的,但对于相同的ClientId则是不可重入的。因此,通过相同的客户端进行并行清除调用是不允许的。

相互作用

根据[SWS_Dem_00879],清除会重置所有受影响事件的状态并移除相应的事件内存条目。此外,根据[SWS_Dem_00878],清除过程会根据[SWS_Dem_00003]触发受影响SW-C和BSW模块的重新初始化。

本文本根据 AUTOSAR 规范 R20-11 自动生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_J1939DcmSetFreezeFrameFilter [SWS_Dem_00977] 📄 PDF

Std_ReturnType Dem_J1939DcmSetFreezeFrameFilter (Dem_J1939DcmSetFreezeFrameFilterType FreezeFrameKind, uint8 ClientId);

The function sets the FreezeFrame filter for a specific node.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ee201d0b0970 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_J1939DcmSetFreezeFrameFilter 用于通过头文件 Dem_J1939Dcm.h 为特定节点设置冻结帧过滤器 [SWS_Dem_00977]。它为后续使用 Dem_J1939DcmGetNextFreezeFrame 的查询配置过滤掩码属性,并将内部计数器重置为第一个冻结帧 [SWS_Dem_00899]。

参数与返回值

  • FreezeFrameKind:确定过滤类型 [SWS_Dem_00977]。可用类型包括 DEM_J1939DCM_FREEZEFRAME(过滤 DemJ1939FreezeFrameClassRef 中的数据)、DEM_J1939DCM_EXPANDED_FREEZEFRAME(过滤 DemJ1939ExpandedFreezeFrameClassRef 中的数据)以及 DEM_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME([SWS_Dem_00977]、[SWS_Dem_00899])。
  • ClientId:传递用于寻址 J1939 事件内存的标识符 [SWS_Dem_00977]。
  • 返回值:执行成功时返回 E_OK,无法设置过滤器时返回 E_NOT_OK [SWS_Dem_00977]。

并发与有效性

在并发性方面,该函数针对不同的 ClientId 值是可重入的,但针对相同的 ClientId 值不可重入 [SWS_Dem_00977]。调用后,设置的过滤掩码属性将保持有效,直至再次调用 Dem_J1939DcmSetFreezeFrameFilter 或重新初始化 DEM 模块 [SWS_Dem_00899]。

本文本由 AI 基于规范生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_J1939DcmGetNextFreezeFrame [SWS_Dem_00978] 📄 PDF

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.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 0611ff42285c 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

异步且不可重入的函数 Dem_J1939DcmGetNextFreezeFrame 逐步读取特定事件内存的冻结帧数据 [SWS_Dem_00978]。迭代过程基于先前通过 Dem_J1939DcmSetFreezeFrameFilter 设置的过滤条件 FreezeFrameKind 和 ClientId [SWS_Dem_00900]。有效载荷数据被复制到缓冲区 DestBuffer 中(对于不带 SPN 信息且未使用位填充为 0 的扩展冻结帧),而 BufSize 传递缓冲区大小并返回实际写入的字节量 [SWS_Dem_00978]、[SWS_Dem_00903]。此外,调用还提供关联的 J1939DTC 以及 OccurenceCounter,后者在值超过 126 时被限制为 0x7F [SWS_Dem_00903]。

返回值与错误处理

返回值控制迭代的流程:

若传入不受支持的过滤类型,函数将报告 DET 错误 DEM_E_WRONG_CONDITION;唯有 DEM_J1939DCM_FREEZEFRAME 和 DEM_J1939DCM_EXPANDED_FREEZEFRAME 有效 [SWS_Dem_00901]。只要返回值不等于成功,输出参数即不包含有效数据 [SWS_Dem_00978]、[SWS_Dem_00900]、[SWS_Dem_00902]、[SWS_Dem_00903]。

限制与交互

被抑制的 DTC 会被查询忽略,并被视为不匹配的过滤条件 [SWS_Dem_01101]。

本使用说明系自动生成,且完全基于 AUTOSAR CP R20-11 规范。

实现者指南即将推出(复杂度 I1)

函数 Dem_J1939DcmGetNextSPNInFreezeFrame [SWS_Dem_00979] 📄 PDF

Std_ReturnType Dem_J1939DcmGetNextSPNInFreezeFrame (uint32* SPNSupported, uint8* SPNDataLength, uint8 ClientId);

Gets next SPN.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 92b02fdbb0d3 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与语义

函数 Dem_J1939DcmGetNextSPNInFreezeFrame 从扩展冻结帧([SWS_Dem_00979])中逐步读取下一个 SPN(Suspect Parameter Number)。每次调用都会迭代到通过 ClientId 寻址的事件内存([SWS_Dem_00904])的 SPN 定义的下一个元素。成功找到时,调用返回 E_OK,并通过 SPNSupported 返回找到的 SPN 以及通过 SPNDataLength 返回其数据长度([SWS_Dem_00979]、[SWS_Dem_00907])。

异步处理与返回值

该操作被指定为异步([SWS_Dem_00979])。若搜索运行由于内部限制必须中断,函数将返回 DEM_PENDING;在这种情况下,输出参数不一定有效,后续调用将在中断处继续搜索([SWS_Dem_00905])。若定义中不再存在其他 SPN,则报告 DEM_NO_SUCH_ELEMENT,此时输出参数同样不必有效([SWS_Dem_00904])。若提供的缓冲区不足,接口将报告 DEM_BUFFER_TOO_SMALL([SWS_Dem_00979])。

错误处理与并发

若请求不受支持的冻结帧类型,模块将触发 DET 错误 DEM_E_WRONG_CONDITION;唯有 Dem_SPNsInExpandedFreezeFrame 有效([SWS_Dem_00906])。由于该函数被定义为不可重入([SWS_Dem_00979]),因此不得针对同一上下文并发调用。头文件 Dem_J1939Dcm.h 提供该接口([SWS_Dem_00979])。

此使用说明基于 AUTOSAR CP R20-11 规范自动生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_J1939DcmSetRatioFilter [SWS_Dem_00980] 📄 PDF

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.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 618098c9083d 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_J1939DcmSetRatioFilter 为特定的 J1939 节点设置比率过滤器,并根据 [SWS_Dem_00980] 初始化 IUMPR 比率的过滤。在此过程中,它将内部计数器重置为具有已定义 DemRatioId 的第一个有效 SPN,以准备随后通过 Dem_J1939DcmGetNextFilteredRatio 进行的逐步查询 [SWS_Dem_00912]。

该函数通过输出参数提供上级计数器值:

  • IgnitionCycleCounter:根据 SAE J1939-73(第 5.7.20.1 节)提供点火循环计数器 [SWS_Dem_00912]。
  • OBDMonitoringConditionsEncountered:根据 SAE J1939-73(第 5.7.20.2 节)提供已发生的 OBD 监控条件计数器,由 CARB 定义为通用分母(General Denominator)[SWS_Dem_00912]。
  • ClientId:标识用于寻址 J1939 事件内存的调用客户端 [SWS_Dem_00980]。

关于并发性,该函数对于不同的 ClientId 值是可重入的,但对于相同的 ClientId 则是不可重入的 [SWS_Dem_00980]。Interpretation:该调用通常应同步从 J1939 诊断通信管理器(J1939Dcm)的流程中发起,以查询 IUMPR 诊断数据。 问题 Q-e577651b88f64132 (未决)成功设置过滤器时,函数返回 E_OK;若设置失败,则报告 E_NOT_OK [SWS_Dem_00980]。

在与诊断事件交互时,被抑制的 DTC 对诸如 Dem_J1939DcmSetRatioFilter 之类的查询函数必须不可见,且必须被视为过滤器不匹配 [SWS_Dem_01101]。

此使用说明基于 AUTOSAR R20-11 自动生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_J1939DcmGetNextFilteredRatio [SWS_Dem_00981] 📄 PDF

Std_ReturnType Dem_J1939DcmGetNextFilteredRatio (uint32* SPN, uint16* Numerator, uint16* Denominator, uint8 ClientId);

Gets the next filtered Ratio.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: a599c5bc4d30 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

同步且不可重入的函数 Dem_J1939DcmGetNextFilteredRatio([SWS_Dem_00981])用于迭代读取下一个已过滤的 IUMPR 比率(Ratio)。通过参数 ClientId 寻址相应的 J1939 事件内存。成功调用时,函数通过输出参数 SPN、Numerator 和 Denominator 提供匹配系统监控项的 Suspect Parameter Number 以及分子和分母([SWS_Dem_00981])。

流程与交互

为了正确迭代,必须预先通过 Dem_J1939DcmSetRatioFilter 初始化过滤器([SWS_Dem_00912])。该调用将内部计数器重置为具有已定义 DemRatioId 的第一个有效 SPN,后续对 Dem_J1939DcmGetNextFilteredRatio 的调用将以此为基础。被抑制的 DTC 对查询不可见,并被视为过滤器不匹配([SWS_Dem_01101])。

返回值与错误处理

根据 [SWS_Dem_00981],定义了以下返回值:

  • E_OK:操作成功。仅在此情况下,SPN、Numerator 和 Denominator 才包含有效数据(参数描述中提及的 DEM_FILTERED_OK 大致可解读为代表 E_OK)。 问题 Q-57774bbc88fe3c0b (未决)
  • DEM_NO_SUCH_ELEMENT:不存在其他匹配的元素。
  • DEM_PENDING:操作成功,但结果仍待定。
  • DEM_BUFFER_TOO_SMALL:传入的缓冲区过小。

并发性

由于该函数被声明为不可重入([SWS_Dem_00981]),因此不得针对相同的 ClientId 进行并发调用。

此文本由 AI 生成,用作参考指引。引用的 AUTOSAR 规范具有权威性。

实现者指南即将推出(复杂度 I1)

函数 Dem_J1939DcmReadDiagnosticReadiness [SWS_Dem_00982] 📄 PDF

Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness1 (Dem_J1939DcmDiagnosticReadiness1Type* DataValue, uint8 ClientId);

Service to report the value of Diagnostic Readiness 1 (DM05) computed by the Dem.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 42bfb79acbf8 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步接口 Dem_J1939DcmReadDiagnosticReadiness1(在 Classic 标准中列为 Dem_J1939DcmReadDiagnosticReadiness)用于查询 Diagnostic Event Manager 计算出的 Diagnostic Readiness 1 (DM05) 值 [SWS_Dem_00982]。它通过头文件 Dem_J1939Dcm.h 声明,且服务 ID 为 0x9b [SWS_Dem_00982]。

用法与参数

调用同步进行,并使用以下函数参数 [SWS_Dem_00982]:

  • ClientId (IN, uint8):标识要寻址的 J1939 事件内存 (J1939 event memory) [SWS_Dem_00982]。
  • DataValue(OUT,指向 Dem_J1939DcmDiagnosticReadiness1Type 的指针):指向一个 8 字节大小的缓冲区,DEM 将 Diagnostic Readiness 1 (DM05) 的计算内容写入其中 [SWS_Dem_00982]。

返回值与错误处理

该函数返回类型为 Std_ReturnType 的状态 [SWS_Dem_00982]:

  • E_OK:服务已成功执行,就绪性数据已存入输出缓冲区 [SWS_Dem_00982]。
  • E_NOT_OK:操作失败 [SWS_Dem_00982]。函数规范中未列出特定的错误代码、DEM 事件或 DET 消息 [SWS_Dem_00982]。

并发性与限制

在并发访问方面,该服务被指定为针对不同的 ClientId 可重入,但明确定义为针对相同的 ClientId 不可重入 [SWS_Dem_00982]。

本使用说明基于 AUTOSAR R20-11 规范数据自动创建。

函数 Dem_J1939DcmReadDiagnosticReadiness [SWS_Dem_00983] 📄 PDF

Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness2 (Dem_J1939DcmDiagnosticReadiness2Type* DataValue, uint8 ClientId);

Service to report the value of Diagnostic Readiness 2 (DM21) computed by the Dem.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: da1e3ecb89af 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步函数 Dem_J1939DcmReadDiagnosticReadiness2(服务 ID 0x9c)用于查询 DEM 计算出的 Diagnostic Readiness 2 (DM21) 值 [SWS_Dem_00983]。该接口通过头文件 Dem_J1939Dcm.h 提供 [SWS_Dem_00983]。

为该调用定义了两个参数 [SWS_Dem_00983]:

  • ClientId(输入):寻址相应的 J1939 事件内存 [SWS_Dem_00983]。
  • DataValue(输出):指向类型为 Dem_J1939DcmDiagnosticReadiness2Type 的 8 字节缓冲区的指针,用于接收计算得出的 DM21 数据 [SWS_Dem_00983]。

作为返回值,函数返回 Std_ReturnType;查询成功时返回 E_OK,而发生错误时报告 E_NOT_OK [SWS_Dem_00983]。未单独列出具体的错误原因;当返回 E_NOT_OK 时,调用方可能必须假定缓冲区不包含有效数据。 问题 Q-97b94d15a8634712 (未决)

在并发性方面,该服务针对不同的 ClientId 值是可重入的,但针对相同的 ClientId 不可重入 [SWS_Dem_00983]。因此,针对相同 ClientId 的并发调用必须在调用上下文中进行串行化。

该文本由 AI 基于 AUTOSAR R20-11 规范生成。

函数 Dem_J1939DcmReadDiagnosticReadiness [SWS_Dem_00770] 📄 PDF

Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness3 (Dem_J1939DcmDiagnosticReadiness3Type* DataValue, uint8 ClientId);

Service to report the value of Diagnostic Readiness 3 (DM26) computed by the Dem.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: cb06cae402da 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

服务 Dem_J1939DcmReadDiagnosticReadiness(在签名中指定为 Dem_J1939DcmReadDiagnosticReadiness3)用于同步读取由 DEM 确定的关于 Diagnostic Readiness 3 (DM26) 的数据 [SWS_Dem_00770]。其声明通过头文件 Dem_J1939Dcm.h 提供 [SWS_Dem_00770]。根据接口名称,该调用推测可能主要由 J1939Dcm 模块执行。 问题 Q-dc204541dfc23d6b (未决)

该接口需要两个参数 [SWS_Dem_00770]:

  • ClientId (in):寻址相应的 J1939 事件内存 [SWS_Dem_00770]。
  • DataValue (out):指向类型为 Dem_J1939DcmDiagnosticReadiness3Type 的 8 字节缓冲区的指针,用于接收计算得出的 DM26 数据 [SWS_Dem_00770]。

作为返回值,若操作成功,该函数返回 E_OK;若执行期间发生错误,则返回 E_NOT_OK [SWS_Dem_00770]。

在并发性方面,该函数针对不同的 ClientId 值是可重入的,但针对相同的 ClientId 值不可重入 [SWS_Dem_00770]。因此,调用方必须排除或同步针对同一客户端的并行调用。

本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。

函数 Dem_SetEventDisabled [SWS_Dem_00312] 📄 PDF

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)

函数 Dem_RepIUMPRFaultDetect [SWS_Dem_00313] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 8fa8b5c52739 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

同步函数 Dem_RepIUMPRFaultDetect 用于报告 OBD 监控器已满足所有执行条件,从而本可以发现潜在的故障 [SWS_Dem_00313]。该接口通过头文件 Dem.h 提供,且仅在具有 OBD 支持的 ECU 中可用,前提是 DemOBDSupport 未配置为 DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00313]、[SWS_Dem_00360]。

当选择接口选项“API”时,作为参数传递类型为 Dem_RatioIdType 的标识符 RatioID [SWS_Dem_00313]。成功记录 IUMPR 结果后,该函数返回状态 E_OK [SWS_Dem_00313]。

并发性与错误行为

关于并发性,该服务对于不同的标识符 RatioID 是可重入的,但对于相同的 RatioID 值则不可重入 [SWS_Dem_00313]。因此,调用者必须避免使用相同标识符进行并发调用。

如果对应的事件被设置为不可用,DEM 模块会将其视为未在系统中配置一样进行处理 [SWS_Dem_01108]。Dem_RepIUMPRFaultDetect 也明确受到该停用的影响 [SWS_Dem_01108];解释:在这种状态下,与其他受影响的状态 API 类似,调用推测可能会返回 E_NOT_OK。 问题 Q-6d1775c9bff08f42 (未决)

本段文本由 AI 基于 AUTOSAR Classic R20-11 规范生成。

实现者指南即将推出(复杂度 I1)

函数 Dem_SetIUMPRDenCondition [SWS_Dem_00733] 📄 PDF

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)

函数 Dem_GetIUMPRDenCondition [SWS_Dem_00734] 📄 PDF

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 retrieve the condition status from the Dem of the ECU where the conditions are computed. 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)

函数 Dem_RepIUMPRDenRelease [SWS_Dem_00315] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 22348b6c2b61 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

同步且可重入的函数 Dem_RepIUMPRDenRelease 用于基于物理原因(例如达到特定温度条件或最小活性)启用特定监控器的分母 [SWS_Dem_00315]。DEM 为与 IUMPR 相关的软件组件 (SW-C) 提供此接口,以有针对性地控制属于相应 RatioID 的分母 [SWS_Dem_00308]。

该函数的提供和行为遵循固定的配置及运行时条件:

  • 可用性与配置:该 API 仅在 OBD 相关的 ECU 中可用,前提是 DemOBDSupport 未配置为 DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00315]。此外,如果 DemIUMPRDenGroup 被配置为 DEM_IUMPR_DEN_PHYS_API,则提供用于在特殊条件下启用的接口 [SWS_Dem_00362]。
  • 参数和返回值:作为输入参数传递标识符 RatioID。如果已成功报告 IUMPR 分母的状态,该函数返回 E_OK,否则返回 E_NOT_OK [SWS_Dem_00315]。
  • 非活动事件的错误行为:如果对应的事件被设置为不可用,它将被视为未在系统中配置;Dem_RepIUMPRDenRelease 的调用直接受此影响并返回 E_NOT_OK [SWS_Dem_01108]。

得益于可重入设计,该函数可以根据需要在不同的 SW-C 上下文中并发调用 [SWS_Dem_00315]。

本段文本由 AI 生成,不能替代权威的 AUTOSAR 规范。

实现者指南即将推出(复杂度 I1)

函数 Dem_SetPtoStatus [SWS_Dem_00627] 📄 PDF

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)

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 047a07d76a94 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

同步函数 Dem_SetPtoStatus([SWS_Dem_00627])用于在 Diagnostic Event Manager (DEM) 中设置动力输出(Power Take-Off,PTO)状态。该接口在头文件 Dem.h 中声明,并具有服务 ID 0x79([SWS_Dem_00627])。

  • 参数:输入参数 PtoStatus(类型 boolean)传递动力输出状态,其中 TRUE 表示激活,FALSE 表示未激活([SWS_Dem_00627])。不存在输入/输出参数或输出参数。
  • 返回值:返回类型为 Std_ReturnType。当 DEM 接受了新的 PTO 状态时,函数返回 E_OK,在所有其他情况下返回 E_NOT_OK([SWS_Dem_00627])。

并发性与限制

该函数同步工作,并被规范为不可重入(Non Reentrant)([SWS_Dem_00627])。

系统上下文与配置

该接口仅在与 OBD 相关的 ECU 中需要([SWS_Dem_00627])。仅当配置参数 DemGeneral.DemOBDSupport 未设置为 DEM_OBD_NO_OBD_SUPPORT 时,它才可用([SWS_Dem_00627])。

本段文本由 AI 生成,基于 AUTOSAR Classic R20-11 中 DEM 模块的规范。

实现者指南即将推出(复杂度 I1)

函数 Dem_ReadDataOfPID01 [SWS_Dem_01167] 📄 PDF

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

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 24f93781d796 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与参数

同步函数 Dem_ReadDataOfPID01(服务 ID 0xb3)用于查询由 Diagnostic Event Manager(DEM)计算的 PID $01 的值 [SWS_Dem_01167]。该接口通过头文件 Dem.h 提供 [SWS_Dem_01167]。函数期望 PID01value 作为输出参数,它作为指向缓冲区的指针传入 [SWS_Dem_01167]。该缓冲区必须强制由调用应用程序以固定的 4 字节大小分配并提供,以接收计算出的数据 [SWS_Dem_01167]。

错误处理与返回值

作为返回类型,接口形式上提供 Std_ReturnType,但根据规范无一例外地返回 E_OK [SWS_Dem_01167]。错误值 E_NOT_OK 绝不会出现 [SWS_Dem_01167]。针对该接口,既未指定具体的错误代码,也未指定向 DET 或 DEM 发送的报告 [SWS_Dem_01167]。

并发性与限制

该函数被指定为不可重入(Non Reentrant)[SWS_Dem_01167]。因此,调用方必须确保不会发生并发调用。此外,该 API 具有功能限制,仅在具有 OBD 相关性的 ECU 中需要 [SWS_Dem_01167]。

此使用说明基于 AUTOSAR 规范 R20-11 自动生成。

函数 Dem_GetDataOfPID21 [SWS_Dem_01093] 📄 PDF

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.Dem OBDSupport)} == DEM_OBD_MASTER_ECU)

函数 Dem_SetDataOfPID21 [SWS_Dem_00735] 📄 PDF

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)

函数 Dem_SetDataOfPID31 [SWS_Dem_00736] 📄 PDF

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)

函数 Dem_SetDataOfPID4D [SWS_Dem_00737] 📄 PDF

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)

函数 Dem_SetDataOfPID4E [SWS_Dem_00738] 📄 PDF

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)

函数 Dem_GetCycleQualified [SWS_Dem_00740] 📄 PDF

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/Dem OperationCycle.DemLeadingCycleRef)} != NULL)

函数 Dem_SetCycleQualified [SWS_Dem_91001] 📄 PDF

Std_ReturnType Dem_SetCycleQualified (uint8 OperationCycleId);

Sets a dependent operation cycle as qualified, so it may be processed along with its leading cycle.

函数 Dem_GetDTCSeverityAvailabilityMask [SWS_Dem_01168] 📄 PDF

Std_ReturnType Dem_GetDTCSeverityAvailabilityMask (uint8 ClientId, Dem_DTCSeverityType* DTCSeverityMask);

Gets the DTC Severity availability mask.

函数 Dem_SetDTR [SWS_Dem_00765] 📄 PDF

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)

函数 Dem_CallbackEventSyncStorageProcessed [SWS_Dem_91042] 📄 PDF

Std_ReturnType Dem_CallbackEventSyncStorageProcessed (void);

Called by the Dem after the internal processing of Dem_SetEventFailedWithSyncFreezeFrame is done and a further call of Dem_SetEventFailedWithSyncFreezeFrame with the same event ID can be processed by the Dem. Tags: atp.Status=draft

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: d0c8e2a4847f 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

一旦 Dem_SetEventFailedWithSyncFreezeFrame 的内部处理完成,回调函数 Dem_CallbackEventSyncStorageProcessed 便会被 Diagnostic Event Manager (DEM) 同步调用([SWS_Dem_91042])。它通知调用组件:DEM 可以处理针对相同事件 ID 的又一次 Dem_SetEventFailedWithSyncFreezeFrame 调用([SWS_Dem_91042])。

对于使用和集成,适用以下接口与执行特性:

  • 参数和返回值:该接口既无输入、输出参数,也无输入/输出参数([SWS_Dem_91042])。返回类型为 Std_ReturnType,出于 RTE 兼容性原因,仅允许且返回返回值 E_OK([SWS_Dem_91042])。
  • 并发性:该函数被指定为可重入([SWS_Dem_91042])。
  • 错误处理:未规定特定的错误代码或向开发错误跟踪(DET)发送的消息([SWS_Dem_91042])。

在交互和配置方面存在一项固定前提条件:Dem_CallbackEventSyncStorageProcessed 仅允许配置给参数 DemEventReportingType 设置为 IMMEDIATE_FAIL_AND_SYNCHRONOUS_PROCESSING 的诊断事件([SWS_Dem_01356])。此外,该元素在 Release R20-11 中带有 draft 状态批注([SWS_Dem_91042]、[SWS_Dem_01356])。

此使用说明是基于规范要求自动生成的。

实现者指南即将推出(复杂度 I2)

函数 Dem_MainFunction [SWS_Dem_00266] 📄 PDF

void Dem_MainFunction (void);

Processes all not event based Dem internal functions.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 0be629ee3c44 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

基础函数 Dem_MainFunction 具有签名 void Dem_MainFunction(void),服务 ID 为 0x55,并通过头文件 SchM_Dem.h 提供([SWS_Dem_00266])。它不接收任何参数,不返回任何返回值,用于执行 DEM 模块的所有非基于事件的内部流程([SWS_Dem_00266]、[SWS_Dem_00125])。

对于调用上下文和错误处理,在模块生命周期中存在特殊例外:若开发错误检测 DemDevErrorDetect 设置为 TRUE,则在完全初始化之前调用常规 DEM 接口会导致报告错误 DEM_E_UNINIT;但 Dem_MainFunction 明确免于此错误生成([SWS_Dem_00124])。同样,在调用 Dem_Shutdown 之后,该函数免于错误报告 DEM_E_UNINIT,直到再次调用 Dem_Init([SWS_Dem_00368])。

在与故障内存的协同交互中,该函数决定性地控制诊断数据的采集和缓冲:

  • 如果 DemEnvironmentDataCapture 配置为 DEM_CAPTURE_ASYNCHRONOUS_TO_REPORTING(相对于 DemPrimaryMemory 或 DemUserDefinedMemory),则必须最晚在 Dem_MainFunction 的下一个周期中采集事件特定的冻结帧数据([SWS_Dem_00461])和扩展数据记录([SWS_Dem_01081])。
  • 如果 DemEnvironmentDataCapture 设置为 DEM_CAPTURE_SYNCHRONOUS_TO_REPORTING,DEM 模块会将环境数据排入队列,直到下一次调用 Dem_MainFunction([SWS_Dem_01083])。在此过程中,该模块至少缓冲符合 DemMaxNumberEventEntryEventBuffer 的配置数量;当队列已满时,数据会在 Dem_MainFunction 内的事件处理期间被采集([SWS_Dem_01083])。

本使用说明基于 AUTOSAR Classic Release R20-11 规范自动生成。

实现者指南即将推出(复杂度 I1)

类型 Dem_ComponentIdType [SWS_Dem_01114] 📄 PDF

Identification of a DemComponent by assigned ComponentId. The ComponentId is automatically assigned by the Dem.

类型 Dem_ConfigType [SWS_Dem_00924] 📄 PDF

This type of the external data structure shall contain the post build initialization data for the Dem.

类型 Dem_DTCRequestType [SWS_Dem_00935] 📄 PDF

This type is used to request a DTC with specific attributes.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 760d1343beae 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用与取值范围

数据类型 Dem_DTCRequestType 派生自 uint8,并通过头文件 Dem.h 可用 [SWS_Dem_00935]。它用于根据特定的时间属性请求诊断故障码(DTC)[SWS_Dem_00935]。

允许的值范围包括以下枚举值 [SWS_Dem_00935]:

  • DEM_FIRST_FAILED_DTC(0x01):请求在时间上最先失败的 DTC。
  • DEM_MOST_RECENT_FAILED_DTC(0x02):请求最后失败的 DTC。
  • DEM_FIRST_DET_CONFIRMED_DTC(0x03):请求最先被确认的 DTC。
  • DEM_MOST_REC_DET_CONFIRMED_DTC(0x04):请求最后被确认的 DTC。

交互、并发性与错误处理

该类型作为同步函数 Dem_GetDTCByOccurrenceTime 的输入参数 DTCRequest 传递 [SWS_Dem_00218]。通过该参数确定应按照何种标准查询 DTC [SWS_Dem_00218]。结果以 UDS 格式通过输出参数 DTC 返回 [SWS_Dem_00218]。

该接口对于通过不同 ClientId 值的不同调用者是可重入的,但对于相同的 ClientId 则不可重入 [SWS_Dem_00218]。可能的返回值包括:查询成功时返回 E_OK,发生错误时返回 E_NOT_OK,以及在未存储匹配条目时返回 DEM_NO_SUCH_ELEMENT [SWS_Dem_00218]。如果函数结果不等于 DEM_OCCURR_OK,则参数 DTC 不包含有效数据 [SWS_Dem_00218]。

本使用说明由 AI 基于 AUTOSAR CP R20-11 规范生成。

类型 Dem_J1939DcmDTCStatusFilterType [SWS_Dem_00945] 📄 PDF

The type to distinguish which DTCs should be filtered.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 92ccd2ad8a5a 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用与取值范围

类型 Dem_J1939DcmDTCStatusFilterType 是一个基于 uint8 的枚举类型,通过头文件 Dem.h 提供 [SWS_Dem_00945]。它用于确定在过滤操作中根据何种 J1939 状态对诊断故障码(DTC)进行区分和筛选 [SWS_Dem_00945]。

规范了以下状态过滤器值:

  • DEM_J1939DTC_ACTIVE(0):过滤活动故障码 [SWS_Dem_00945]。
  • DEM_J1939DTC_PREVIOUSLY_ACTIVE(1):过滤先前活动故障码 [SWS_Dem_00945]。
  • DEM_J1939DTC_PENDING(2):过滤待定故障码 [SWS_Dem_00945]。
  • DEM_J1939DTC_PERMANENT(3):过滤永久故障码 [SWS_Dem_00945]。
  • DEM_J1939DTC_CURRENTLY_ACTIVE(4):过滤当前活动故障码 [SWS_Dem_00945]。

交互与调用上下文

过滤器类型在接口 Dem_J1939DcmSetDTCFilter 中用作传递参数 DTCStatusFilter [SWS_Dem_00970]。该函数同步工作,并在考虑故障类别(DTCKind)、存储来源(DTCOrigin)以及 J1939 事件存储器的各 ClientId 的情况下设置过滤器 [SWS_Dem_00970]。作为解释,调用通常推测来自 J1939 的诊断通信管理器。 问题 Q-898d508b7b341ef8 (未决)

并发与错误处理

服务 Dem_J1939DcmSetDTCFilter 对于不同的 ClientId 值是可重入的,但对于相同的 ClientId 明确不可重入 [SWS_Dem_00970]。成功的过滤器配置由该服务以返回值 E_OK 确认 [SWS_Dem_00970]。

本文由 AI 基于规范文档编写。

实现者指南即将推出(复杂度 I1)

类型 Dem_J1939DcmSetFreezeFrameFilterType [SWS_Dem_00947] 📄 PDF

The type to distinguish which DTCs gets cleared

类型 Dem_J1939DcmLampStatusType [SWS_Dem_00948] 📄 PDF

For details refer SAE J1939-73

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 92989a7111ae 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

结构体类型 Dem_J1939DcmLampStatusType 根据 [SWS_Dem_00948] 在 Dem.h 中声明,用于采集符合 SAE J1939-73 的 J1939 灯状态。该数据结构将两项状态信息捆绑为 uint8 元素:LampStatus 用于当前灯状态,FlashLampStatus 用于相应的闪烁行为。

在 Diagnostic Event Manager 的 J1939 DTC 过滤中,该类型在两个同步接口中充当指针输出参数:

  • 通过 Dem_J1939DcmSetDTCFilter([SWS_Dem_00970]),在为特定 J1939 事件存储器(通过 ClientId 寻址)初始化 DTC 过滤器时查询初始灯状态。
  • 通过 Dem_J1939DcmGetNextDTCwithLampStatus([SWS_Dem_00975]),为每个匹配的故障存储器条目迭代地将关联的灯状态填入该结构体。

在错误处理方面必须严格注意,根据 [SWS_Dem_00975],仅当函数的返回值为 DEM_FILTERED_OK 时,Dem_J1939DcmGetNextDTCwithLampStatus 才会向输出参数写入有效值。如果调用返回其他返回值,则该结构体不包含有效数据。

在并发性和调用条件方面,结构体本身不包含内部保护。重入性取决于相应的调用上下文:Dem_J1939DcmSetDTCFilter 对于不同的客户端 ID 是可重入的,但对于相同的 ClientId 则不可重入([SWS_Dem_00970])。通过 Dem_J1939DcmGetNextDTCwithLampStatus 进行的迭代获取被完全规范为不可重入([SWS_Dem_00975])。

本段文本由 AI 生成,基于 AUTOSAR 发行版本 R20-11 的规范。

实现者指南即将推出(复杂度 I1)

类型 Dem_J1939DcmDiagnosticReadiness1Type [SWS_Dem_00949] 📄 PDF

This structure represents all data elemets of the DM05 message. The encoding shall be done acording SAE J1939-73

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: a760cec9362d 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

结构体 Dem_J1939DcmDiagnosticReadiness1Type 映射了 J1939 诊断报文 DM05 的所有数据元素,并根据 [SWS_Dem_00949] 在头文件 Dem.h 中定义。字段编码符合 SAE J1939-73 [SWS_Dem_00949]。

该结构体包含类型为 uint8 的八个数据字段,共同构成用于诊断就绪状态 1(Diagnostic Readiness 1)的 8 字节缓冲区 [SWS_Dem_00949]、[SWS_Dem_00982]:

  • ActiveTroubleCodes:活动 DTC 数量 [SWS_Dem_00949]。
  • PreviouslyActiveDiagnosticTroubleCodes:先前活动 DTC 数量 [SWS_Dem_00949]。
  • OBDCompliance:OBD 合规性 [SWS_Dem_00949]。
  • ContinuouslyMonitoredSystemsSupport_Status:连续监控系统的支持情况和状态 [SWS_Dem_00949]。
  • NonContinuouslyMonitoredSystemsSupport5 和 NonContinuouslyMonitoredSystemsSupport6:非连续监控系统的系统支持情况(第 5 和第 6 字节)[SWS_Dem_00949]。
  • NonContinuouslyMonitoredSystemsStatus7 和 NonContinuouslyMonitoredSystemsStatus8:非连续监控系统的状态(第 7 和第 8 字节)[SWS_Dem_00949]。

主要的交互是与同步 API Dem_J1939DcmReadDiagnosticReadiness1 进行(可通过 Dem_J1939Dcm.h 获得)[SWS_Dem_00982]。调用者通过输出参数 DataValue 传递指向 Dem_J1939DcmDiagnosticReadiness1Type 实例的指针,连同 J1939 事件存储器的各 ClientId [SWS_Dem_00982]。

在并发性与错误处理方面,读取访问适用以下规则:查询函数在 DEM 成功计算并提供 DM05 值时返回 E_OK,在发生错误时返回 E_NOT_OK [SWS_Dem_00982]。该访问对于不同的 ClientId 值是可重入的,但对于相同的 ClientId 则不可重入 [SWS_Dem_00982]。因此,可能需要针对同一客户端上下文中的并发调用对该类型的实例进行保护。 问题 Q-7613ded1aa18fd2b (未决)

本段文本由 AI 创建。依据仅来源于发行版本 R20-11 的规范。

类型 Dem_J1939DcmDiagnosticReadiness2Type [SWS_Dem_00950] 📄 PDF

This structure represents all data elemets of the DM21 message. The encoding shall be done acording SAE J1939-73

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 4e1cd28c8cba 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

结构体类型 Dem_J1939DcmDiagnosticReadiness2Type 表示符合 SAE J1939-73 的诊断报文 DM21(Diagnostic Readiness 2)的数据元素,并通过头文件 Dem.h 声明 [SWS_Dem_00950]。该结构体将四个 16 位计数器(uint16)汇聚在一个 8 字节缓冲区中 [SWS_Dem_00950]、[SWS_Dem_00983]:

  • DistanceTraveledWhileMILisActivated:故障指示灯(MIL)激活时的累计行驶里程(公里)[SWS_Dem_00950]。
  • DistanceSinceDTCsCleared:自清除排放相关诊断故障码(DTC)以来的累计行驶里程 [SWS_Dem_00950]。
  • MinutesRunbyEngineWhileMILisActivated:MIL 处于活动状态时的累计发动机运转时间(分钟)[SWS_Dem_00950]。
  • TimeSinceDiagnosticTroubleCodesCleared:自清除排放相关 DTC 以来的累计发动机运转时间 [SWS_Dem_00950]。

该类型用作同步服务 Dem_J1939DcmReadDiagnosticReadiness2 的输出缓冲区 DataValue,该服务在 Dem_J1939Dcm.h 中定义 [SWS_Dem_00983]。调用时,J1939-DCM 传递 ClientId 以寻址 DEM 中的特定事件存储器 [SWS_Dem_00983]。该函数确定当前计数器读数,并通过返回值 E_OK 确认成功提供,或通过 E_NOT_OK 指示错误 [SWS_Dem_00983]。

关于并发性,读取服务对于不同的 ClientId 值是可重入的,但对于相同的 ClientId 值则是不可重入的 [SWS_Dem_00983]。

本使用说明由 AI 自动生成。所有陈述均完全基于 AUTOSAR R20-11 所提供的规范范围。

类型 Dem_J1939DcmDiagnosticReadiness3Type [SWS_Dem_00951] 📄 PDF

This structure represents all data elemets of the DM26 message. The encoding shall be done acording SAE J1939-73

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: b4812c5890e8 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

结构体类型 Dem_J1939DcmDiagnosticReadiness3Type 根据 [SWS_Dem_00951] 映射诊断报文 DM26(Diagnostic Readiness 3)的所有数据元素。所包含字段的编码强制遵循 SAE J1939-73 [SWS_Dem_00951]。

该结构体包含一个 8 字节的数据缓冲区,由以下各个字段组成 [SWS_Dem_00951]:

  • TimeSinceEngineStart(uint16):点火开关接通以来的发动机运行时间。
  • NumberofWarmupsSinceDTCsCleared(uint8):清除所有故障码以来的 OBD 暖机循环次数。
  • ContinuouslyMonitoredSystemsEnableCompletedStatus(uint8):连续监控系统的使能和完成状态。
  • NonContinuouslyMonitoredSystemsEnableStatus5 和 NonContinuouslyMonitoredSystemsEnableStatus6(各 uint8):当前循环中非连续监控项的使能状态(第 5 字节和第 6 字节)。
  • NonContinuouslyMonitoredSystems7 和 NonContinuouslyMonitoredSystems8(各 uint8):当前循环中非连续监控项的完成状态(第 7 字节和第 8 字节)。

使用与交互:该类型的一个实例作为输出参数 DataValue 传递给同步函数 Dem_J1939DcmReadDiagnosticReadiness3 [SWS_Dem_00770]。DEM 为传入的 J1939 事件内存 ClientId 确定 DM26 值,并在成功执行时提供返回值 E_OK,或在发生错误时提供 E_NOT_OK [SWS_Dem_00770]。

并发性与限制:读取函数调用对于不同的 ClientId 值是可重入的,但对于相同的 ClientId 不得并发进行 [SWS_Dem_00770]。模块 J1939Dcm 大致应作为主调用方。 问题 Q-e001ad1880fee789 (未决)该类型在 Dem.h 中声明 [SWS_Dem_00951],而相关的读取服务则通过 Dem_J1939Dcm.h 提供 [SWS_Dem_00770]。

本使用说明基于 Diagnostic Event Manager 的 AUTOSAR 规范规定。

类型 Dem_DTCOriginType [SWS_Dem_00934] 📄 PDF

This enum is used to define the location of the events. The definition and use of the different memory types is OEM-specific.

类型 Dem_DebounceResetStatusType [SWS_Dem_00927] 📄 PDF

This type contains all definitions to control an internal debounce counter/timer via the function Dem_ResetEventDebounceStatus().

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2ba3237222eb 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

数据类型 Dem_DebounceResetStatusType 用于控制 Diagnostic Event Manager 中内部消抖计数器和消抖定时器的行为 [SWS_Dem_00927]。它被定义为 uint8,可通过头文件 Rte_Dem_Type.h 获取,并提供两种定义的控制状态 [SWS_Dem_00927]:

  • DEM_DEBOUNCE_STATUS_FREEZE (0x00):冻结所寻址事件的内部消抖计数器或消抖定时器 [SWS_Dem_00927]。
  • DEM_DEBOUNCE_STATUS_RESET (0x01):重置内部消抖计数器或消抖定时器 [SWS_Dem_00927]。

范围从 0x02 到 0xFF 的值被保留 [SWS_Dem_00927]。该类型作为参数 DebounceResetStatus 传递给服务函数 Dem_ResetEventDebounceStatus() [SWS_Dem_00683]。此调用同步进行,控制内部消抖状态,而不会直接影响相应事件的判定 [SWS_Dem_00683]。

关于并发性,Dem_ResetEventDebounceStatus() 针对不同的 EventId 值是可重入的,但不得针对相同 EventId 并发调用 [SWS_Dem_00683]。基础初始化 Dem_PreInit 一旦完成,BSW 模块即可使用该接口 [SWS_Dem_00683]。对于软件组件,很可能是通过允许修改事件信息的端口特定接口(如 DiagnosticMonitor)来提供 [SWS_Dem_00598]。 问题 Q-32468003718a4933 (未决)发生错误时,调用函数返回 E_NOT_OK,根据规范,这仅在开发错误时出现 [SWS_Dem_00683]。

此使用说明是基于规范要求自动生成的。

实现者指南即将推出(复杂度 I1)

类型 Dem_DTRControlType [SWS_Dem_00941] 📄 PDF

Control parameter for the interpretation of the reported test results.

类型 Dem_EventIdType [SWS_Dem_00925] 📄 PDF

Identification of an event by assigned EventId. The EventId is assigned by the Dem. Example: 1 refers to monitor x, 2 refers to monitor y, etc.

类型 Dem_EventStatusType [SWS_Dem_00926] 📄 PDF

This type contains all monitor test result values, which can be reported via Dem_SetEventStatus().

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 6d8ec716ce5e 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

数据类型Dem_EventStatusType派生自uint8,并通过头文件Rte_Dem_Type.h提供([SWS_Dem_00926])。它供软件组件(SW-C)以及BSW模块用于向DEM报告诊断监视器的测试结果([SWS_Dem_00926],[SWS_Dem_00183])。

该类型定义了以下监视器结果值([SWS_Dem_00926]):

  • DEM_EVENT_STATUS_PASSED(0x00)和DEM_EVENT_STATUS_FAILED(0x01):合格测试结果的传输(分别表示通过和失败)。
  • DEM_EVENT_STATUS_PREPASSED(0x02)和DEM_EVENT_STATUS_PREFAILED(0x03):预备的、未合格的监视器测试结果,其去抖动在DEM内部进行。
  • DEM_EVENT_STATUS_FDC_THRESHOLD_REACHED(0x04):在达到FDC阈值时触发FreezeFrame和ExtendedDataRecord的存储(ON_FDC_THRESHOLD)。
  • 取值范围0x05至0xFF保留。

该类型在BSW API Dem_SetEventStatus()([SWS_Dem_00183])和Dem_SetEventStatusWithMonitorData()([SWS_Dem_91037])中用作输入参数EventStatus,并通过接口DiagnosticMonitor([SWS_Dem_00598])和DiagnosticMonitor_MonitorData([SWS_Dem_91038])使用。调用以同步或异步方式进行([SWS_Dem_00183],[SWS_Dem_91037])。

这些函数返回Std_ReturnType(成功时返回E_OK,出错或被拒绝时返回E_NOT_OK),其中调用的BSW模块可以忽略Dem_SetEventStatus()的返回值([SWS_Dem_00183])。在并发性方面,针对不同EventId的调用是可重入的,但针对相同EventId则是不可重入的([SWS_Dem_00183],[SWS_Dem_91037])。此外,目标API的可用性取决于参数DemEventReportingType的配置([SWS_Dem_00183],[SWS_Dem_91037])。

此文本由 AI 生成,仅供参考。具有约束力的是 AUTOSAR 规范。

实现者指南即将推出(复杂度 I1)

类型 Dem_InitMonitorReasonType [SWS_Dem_00942] 📄 PDF

(Re-)Initialization reason returned by the callback _DemInitMonitorFor().

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: a883663c849a 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用与取值范围

数据类型 Dem_InitMonitorReasonType 基于 uint8,并通过 Rte_Dem_Type.h 可用 [SWS_Dem_00942]。它标识诊断监视器进行(重新)初始化的具体原因,以便监视器能够为受影响的事件选择并执行相应的初始化例程 [SWS_Dem_00942] [SWS_Dem_00256]。

为该类型定义了以下值 [SWS_Dem_00942]:

  • DEM_INIT_MONITOR_CLEAR(0x01):诊断事件已被清除;所有内部值和状态均被重置。
  • DEM_INIT_MONITOR_RESTART(0x02):事件的操作循环已重新启动。
  • DEM_INIT_MONITOR_REENABLED(0x03):使能条件(Enable Conditions)或 DTC 设置已重新激活。
  • DEM_INIT_MONITOR_STORAGE_REENABLED(0x04):存储条件(Storage Condition)已重新激活。

调用上下文与接口

该值作为输入参数 InitMonitorReason,通过在 Dem_Externals.h 中声明的事件特定 C 回调 <Module>_DemInitMonitorFor<EventName>() 进行同步且可重入地传递 [SWS_Dem_00256]。如果存在到软件组件的端口接口,则传递给服务接口 CallbackInitMonitorForEvent 的操作 InitMonitorForEvent [SWS_Dem_00613]。

错误处理与返回值

对于 C 回调,类型为 Std_ReturnType 的返回值未被使用,仅用于与相应 RTE 操作的兼容性 [SWS_Dem_00256]。如果该接口通过 RTE 调用,则操作 InitMonitorForEvent 返回错误值 E_OK(成功)或 E_NOT_OK(失败)[SWS_Dem_00613]。未针对该数据类型定义专有错误码或 DET/DEM 消息。

本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。

实现者指南即将推出(复杂度 I1)

类型 Dem_IumprDenomCondIdType [SWS_Dem_00943] 📄 PDF

This type contains all possible additional IUMPR denominator conditions to be broadcasted among OBD-relevant ECUs.

类型 Dem_IumprDenomCondStatusType [SWS_Dem_00944] 📄 PDF

This type contains all possible states of an additional IUMPR denominator condition to be broadcasted among OBD-relevant ECUs.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 8df8011c88ff 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

类型 Dem_IumprDenomCondStatusType 基于 uint8,并定义了用于在与 OBD 相关的 ECU 之间分发的附加 IUMPR 分母条件的可能状态 [SWS_Dem_00944]。该类型通过 Rte_Dem_Type.h 可用,并包含以下值 [SWS_Dem_00944]:

  • DEM_IUMPR_DEN_STATUS_NOT_REACHED(0x00):条件(尚)未满足。
  • DEM_IUMPR_DEN_STATUS_REACHED(0x01):条件已满足。
  • DEM_IUMPR_DEN_STATUS_INHIBITED(0x02):条件被锁定且无法达到。

0x03 至 0xFF 范围内的值被保留 [SWS_Dem_00944]。

交互与服务接口

在服务接口 IUMPRDenominatorCondition 的框架下,传输 General Denominator、Cold start、EVAP 或 500mi 等条件的状态 [SWS_Dem_00733] [SWS_Dem_00742]。存在两个核心服务函数:

  • Dem_SetIUMPRDenCondition:通过输入参数 ConditionStatus 同步或异步地将状态转发给某个 ECU 的 DEM [SWS_Dem_00733]。
  • Dem_GetIUMPRDenCondition:通过指针输出参数 ConditionStatus 从计算这些条件的 ECU 同步查询状态 [SWS_Dem_00734]。

错误处理与并发

这两个函数均被规范为可重入 [SWS_Dem_00733] [SWS_Dem_00734]。成功执行时,API 返回 E_OK;如果设置或获取失败,或者无法接受该条件,则它们返回 E_NOT_OK [SWS_Dem_00733] [SWS_Dem_00734]。

本使用说明由 AI 基于 AUTOSAR CP R20-11 规范自动生成。

实现者指南即将推出(复杂度 I1)

类型 Dem_IndicatorStatusType [SWS_Dem_00930] 📄 PDF

Indicator mode used by Dem_GetIndicatorStatus().

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 05853b91068c 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

数据类型 Dem_IndicatorStatusType 基于 uint8 并通过 Rte_Dem_Type.h 提供 [SWS_Dem_00930]。它反映了从 UDS 状态派生出的警告指示器运行模式 [SWS_Dem_00205]。状态范围从 DEM_INDICATOR_OFF (0x00) 经 DEM_INDICATOR_CONTINUOUS (0x01)、DEM_INDICATOR_BLINKING (0x02)、DEM_INDICATOR_BLINK_CONT (0x03)、DEM_INDICATOR_SLOW_FLASH (0x04)、DEM_INDICATOR_FAST_FLASH (0x05) 和 DEM_INDICATOR_ON_DEMAND (0x06) 直至 DEM_INDICATOR_SHORT (0x07) [SWS_Dem_00930]。

该类型在同步 C 函数 Dem_GetIndicatorStatus() [SWS_Dem_00205] 以及服务端口 IndicatorStatus 的操作 GetIndicatorStatus 中用作输出参数 [SWS_Dem_00606]。DEM 服务组件为每个配置的指示器提供单独的端口,其中各 IndicatorId 用作端口定义的实参 [SWS_Dem_00606]。执行查询的软件组件通常会使用所确定的状态来控制光学或声学指示仪表。 问题 Q-6bfabb33805bd0e8 (未决)

调用方必须注意,Dem_GetIndicatorStatus() 被指定为不可重入(Non Reentrant)[SWS_Dem_00205]。此外,仅当配置中在 DemIndicator 下至少定义了一个指示器时,该查询 API 才可用 [SWS_Dem_00205]。该操作通过返回值 Std_ReturnType 报告执行状态:评估成功时返回 E_OK,发生错误时返回 E_NOT_OK [SWS_Dem_00205][SWS_Dem_00606]。

本文本由 AI 生成,旨在为 AUTOSAR 环境提供参考指引。

实现者指南即将推出(复杂度 I1)

类型 Dem_RatioIdType [SWS_Dem_00940] 📄 PDF

OBD specific ratio Id (related to a specific event, a FID, and an IUMPR group). This type depends on the Dem configuration.

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

Record
AUTOSAR/AP/record/CP_MOD_Dem
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_Dem@rel:R20-11#7597f290
Content hash
7597f290
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_DiagnosticEventManager.pdf#nameddest=SWS_Dem_00177

主题图

初始化与状态

2

详细视图

请在大纲中选择一个条目。

初始化与状态

Returns the version information of this module. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemVersionInfoApi)} == true)

void Dem_GetVersionInfo (Std_VersionInfoType* versioninfo);
Dem_Init 函数

Initializes or reinitializes this module.

void Dem_Init (const Dem_ConfigType* ConfigPtr);

服务 · Get…

Service to report the value of the B1 counter computed by the Dem. API is needed in WWH-OBD relevant ECUs only

Std_ReturnType Dem_GetB1Counter (uint16* B1Counter);

Gets the failed status of a DemComponent.

Std_ReturnType Dem_GetComponentFailed (Dem_ComponentIdType ComponentId, boolean* ComponentFailed);

Returns the qualification state of the dependent operation cycle. API Availability: This API will be available only if any of the ({ecuc(Dem/DemGeneral/Dem OperationCycle.DemLeadingCycleRef)} != NULL)

Std_ReturnType Dem_GetCycleQualified (uint8 OperationCycleId, boolean* isQualified);

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.Dem OBDSupport)} == DEM_OBD_MASTER_ECU)

Std_ReturnType Dem_GetDataOfPID21 (uint8* PID21value);

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.

Std_ReturnType Dem_GetDebouncingOfEvent (Dem_EventIdType EventId, Dem_DebouncingStateType* DebouncingState);

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.

Std_ReturnType Dem_GetDTCByOccurrenceTime (uint8 ClientId, Dem_DTCRequestType DTCRequest, uint32* DTC);

Gets the DTC of an event.

Std_ReturnType Dem_GetDTCOfEvent (Dem_EventIdType EventId, Dem_DTCFormatType DTCFormat, uint32* DTCOfEvent);

Provides information if the last call to Dem_SelectDTC has selected a valid DTC or group of DTCs.

Std_ReturnType Dem_GetDTCSelectionResult (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.

Std_ReturnType Dem_GetDTCSelectionResultForClearDTC (uint8 ClientId);

Gets the DTC Severity availability mask.

Std_ReturnType Dem_GetDTCSeverityAvailabilityMask (uint8 ClientId, Dem_DTCSeverityType* DTCSeverityMask);

Gets the DTC Status availability mask of the selected fault memory.

Std_ReturnType Dem_GetDTCStatusAvailabilityMask (uint8 ClientId, Dem_UdsStatusByteType* DTCStatusMask, Dem_DTCOriginType DTCOrigin);

Returns the suppression status of a specific DTC. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemSuppressionSupport)} == DEM_DTC_SUPPRESSION)

Std_ReturnType Dem_GetDTCSuppression (uint8 ClientId, boolean* SuppressionStatus);

Get the Event's availability.

Std_ReturnType Dem_GetEventAvailable (Dem_EventIdType EventId, boolean* AvailableStatus);

Gets the data of an extended data record by event.

Std_ReturnType Dem_GetEventExtendedDataRecordEx (Dem_EventIdType EventId, uint8 RecordNumber, uint8* DestBuffer, uint16* BufSize);

Gets the data of a freeze frame by event.

Std_ReturnType Dem_GetEventFreezeFrameDataEx (Dem_EventIdType EventId, uint8 RecordNumber, uint16 DataId, uint8* DestBuffer, uint16* BufSize);

Gets the event memory overflow indication status.

Std_ReturnType Dem_GetEventMemoryOverflow (uint8 ClientId, Dem_DTCOriginType DTCOrigin, boolean* OverflowIndication);

Gets the current UDS status byte assigned to the DTC for the event

Std_ReturnType Dem_GetEventUdsStatus (Dem_EventIdType EventId, Dem_UdsStatusByteType* UDSStatusByte);

Gets the fault detection counter of an event. This API can only be used through the RTE, and therefore no declaration is exported via Dem.h.

Std_ReturnType Dem_GetFaultDetectionCounter (Dem_EventIdType EventId, sint8* FaultDetectionCounter);

Gets the functional unit of the requested DTC.

Std_ReturnType Dem_GetFunctionalUnitOfDTC (uint8 ClientId, uint8* DTCFunctionalUnit);

Gets the indicator status derived from the UDS status. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemEventMemory Set/DemIndicator)} != NULL)

Std_ReturnType Dem_GetIndicatorStatus (uint8 IndicatorId, Dem_IndicatorStatusType* IndicatorStatus);

In order to communicate the status of the (additional) denominator conditions among the OBD relevant ECUs, the API is used to retrieve the condition status from the Dem of the ECU where the conditions are computed. 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)

Std_ReturnType Dem_GetIUMPRDenCondition (Dem_IumprDenomCondIdType ConditionId, Dem_IumprDenomCondStatusType* ConditionStatus);

Gets the current monitor status for an event.

Std_ReturnType Dem_GetMonitorStatus (Dem_EventIdType EventID, Dem_MonitorStatusType* MonitorStatus);

Gets extended data record for the DTC selected by Dem_SelectExtendedDataRecord. The function stores the data in the provided DestBuffer.

Std_ReturnType Dem_GetNextExtendedDataRecord (uint8 ClientId, uint8* DestBuffer, uint16* BufSize);

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.

Std_ReturnType Dem_GetNextFilteredDTC (uint8 ClientId, uint32* DTC, uint8* DTCStatus);

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.

Std_ReturnType Dem_GetNextFilteredDTCAndFDC (uint8 ClientId, uint32* DTC, sint8* DTCFaultDetectionCounter);

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.

Std_ReturnType Dem_GetNextFilteredDTCAndSeverity (uint8 ClientId, uint32* DTC, uint8* DTCStatus, Dem_DTCSeverityType* DTCSeverity, uint8* DTCFunctionalUnit);

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.

Std_ReturnType Dem_GetNextFilteredRecord (uint8 ClientId, uint32* DTC, uint8* RecordNumber);

Gets freeze frame data by the DTC selected by Dem_SelectFreezeFrameData. The function stores the data in the provided DestBuffer.

Std_ReturnType Dem_GetNextFreezeFrameData (uint8 ClientId, uint8* DestBuffer, uint16* BufSize);

Returns the number of entries currently stored in the requested event memory.

Std_ReturnType Dem_GetNumberOfEventMemoryEntries (uint8 ClientId, Dem_DTCOriginType DTCOrigin, uint8* NumberOfEventMemoryEntries);

Gets the number of a filtered DTC.

Std_ReturnType Dem_GetNumberOfFilteredDTC (uint8 ClientId, uint16* NumberOfFilteredDTC);

This function returns the number of all freeze frame records currently stored in the primary event memory

Std_ReturnType Dem_GetNumberOfFreezeFrameRecords (uint8 ClientId, uint16* NumberOfFilteredRecords);

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

Std_ReturnType Dem_GetSeverityOfDTC (Dem_DTCSeverityType* DTCSeverity, uint8 ClientId);

Gets the size of Extended Data Record by DTC selected by the call of Dem_SelectExtended DataRecord.

Std_ReturnType Dem_GetSizeOfExtendedDataRecordSelection (uint8 ClientId, uint32* SizeOfExtendedDataRecord);

Gets the size of freeze frame data by DTC selected by the call of Dem_SelectFreezeFrame Data.

Std_ReturnType Dem_GetSizeOfFreezeFrameSelection (uint8 ClientId, uint32* SizeOfFreezeFrame);

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.

Std_ReturnType Dem_GetStatusOfDTC (uint8 ClientId, uint8* DTCStatus);

Gets the supported DTC formats of the ECU.The supported formats are configured via Dem TypeOfDTCSupported.

Dem_DTCTranslationFormatType Dem_GetTranslationType (uint8 ClientId);

服务 · Set…

Set the availability of a specific DemComponent.

Std_ReturnType Dem_SetComponentAvailable (Dem_ComponentIdType ComponentId, boolean AvailableStatus);

Sets a dependent operation cycle as qualified, so it may be processed along with its leading cycle.

Std_ReturnType Dem_SetCycleQualified (uint8 OperationCycleId);

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)

Std_ReturnType Dem_SetDataOfPID21 (const uint8* PID21value);

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)

Std_ReturnType Dem_SetDataOfPID31 (const uint8* PID31value);

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)

Std_ReturnType Dem_SetDataOfPID4D (const uint8* PID4Dvalue);

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)

Std_ReturnType Dem_SetDataOfPID4E (const uint8* PID4Evalue);

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 clients 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

Std_ReturnType Dem_SetDTCFilter (uint8 ClientId, uint8 DTCStatusMask, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType DTCOrigin, boolean FilterWithSeverity, Dem_DTCSeverityType DTCSeverityMask, boolean FilterForFaultDetectionCounter);

Set the suppression status of a specific DTC. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemSuppression Support)} == DEM_DTC_SUPPRESSION)

Std_ReturnType Dem_SetDTCSuppression (uint8 ClientId, boolean SuppressionStatus);
Dem_SetDTR 函数

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)

Std_ReturnType Dem_SetDTR (uint16 DTRId, sint32 TestResult, sint32 LowerLimit, sint32 UpperLimit, Dem_DTRControlType Ctrlval);

Sets an enable condition. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemEnable Condition)} != NULL)

Std_ReturnType Dem_SetEnableCondition (uint8 EnableConditionID, boolean ConditionFulfilled);

Set the available status of a specific Event.

Std_ReturnType Dem_SetEventAvailable (Dem_EventIdType EventId, boolean AvailableStatus);

Set the failure confirmation threshold of an event.

Std_ReturnType Dem_SetEventConfirmationThresholdCounter (Dem_EventIdType EventId, uint8 FailureCycleCounterThreshold);

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)

Std_ReturnType Dem_SetEventDisabled (Dem_EventIdType EventId);

If called the Dem sets the event to failed and this failed event requires that a snapshot record is captured, the Dem synchronously retrieves the data within the call of this API. Tags: atp.Status=draft

void Dem_SetEventFailedWithSyncFreezeFrame (Dem_EventIdType EventId);

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)

Std_ReturnType Dem_SetEventStatus (Dem_EventIdType EventId, Dem_EventStatusType EventStatus);

This API will be available only if ({Dem/DemConfigSet/DemEventParameter/DemEvent ReportingType} == STANDARD_REPORTING_WITH_MONITOR_DATA)

Std_ReturnType Dem_SetEventStatusWithMonitorData (Dem_EventIdType EventId, Dem_EventStatusType EventStatus, Dem_MonitorDataType monitorData0, Dem_MonitorDataType monitorData1);

Sets a freeze frame record filter.

Std_ReturnType Dem_SetFreezeFrameRecordFilter (uint8 ClientId, Dem_DTCFormatType DTCFormat);

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)

Std_ReturnType Dem_SetIUMPRDenCondition (Dem_IumprDenomCondIdType ConditionId, Dem_IumprDenomCondStatusType ConditionStatus);

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)

Std_ReturnType Dem_SetPtoStatus (boolean PtoStatus);

Sets a storage condition. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemStorage Condition)} != NULL)

Std_ReturnType Dem_SetStorageCondition (uint8 StorageConditionID, boolean ConditionFulfilled);

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 Dem.h.

Std_ReturnType Dem_SetWIRStatus (Dem_EventIdType EventId, boolean WIRStatus);

服务 · Dcm…

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)

Std_ReturnType Dem_DcmGetAvailableOBDMIDs (uint8 Obdmid, uint32* Obdmidvalue);

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)

Std_ReturnType Dem_DcmGetDTCOfOBDFreezeFrame (uint8 FrameNumber, uint32* DTC, Dem_DTCFormatType DTCFormat);

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)

Std_ReturnType Dem_DcmGetDTRData (uint8 Obdmid, uint8 TIDindex, uint8* TIDvalue, uint8* UaSID, uint16* Testvalue, uint16* Lowlimvalue, uint16* Upplimvalue);

Service is used for requesting IUMPR data according to InfoType $08. This interface is derived from the prototype _GetInfotypeValueData() defined by the Dcm. Therefore Dcm_Op StatusType 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)

Std_ReturnType Dem_DcmGetInfoTypeValue08 (Dcm_OpStatusType OpStatus, uint8* Iumprdata08, uint8* Iumprdata08BufferSize);

Service is used for requesting IUMPR data according to InfoType $0B. This interface is derived from the prototype _GetInfotypeValueData() defined by the Dcm. Therefore Dcm_Op StatusType 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)

Std_ReturnType Dem_DcmGetInfoTypeValue0B (Dcm_OpStatusType OpStatus, uint8* Iumprdata0B, uint8* Iumprdata0BBufferSize);

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)

Std_ReturnType Dem_DcmGetNumTIDsOfOBDMID (uint8 Obdmid, uint8* numberOfTIDs);

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)

Std_ReturnType Dem_DcmReadDataOfOBDFreezeFrame (uint8 PID, uint8 DataElementIndexOfPID, uint8* DestBuffer, uint16* BufSize);

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)

Std_ReturnType Dem_DcmReadDataOfPID01 (uint8* PID01value);

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)

Std_ReturnType Dem_DcmReadDataOfPID1C (uint8* PID1Cvalue);

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)

Std_ReturnType Dem_DcmReadDataOfPID21 (uint8* PID21value);

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)

Std_ReturnType Dem_DcmReadDataOfPID30 (uint8* PID30value);

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)

Std_ReturnType Dem_DcmReadDataOfPID31 (uint8* PID31value);

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

Std_ReturnType Dem_DcmReadDataOfPID41 (uint8* PID41value);

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)

Std_ReturnType Dem_DcmReadDataOfPID4D (uint8* PID4Dvalue);

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)

Std_ReturnType Dem_DcmReadDataOfPID4E (uint8* PID4Evalue);

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

Std_ReturnType Dem_DcmReadDataOfPID91 (uint8* PID91value);

服务 · J1939…

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

Std_ReturnType Dem_J1939DcmClearDTC (Dem_J1939DcmSetClearFilterType DTCTypeFilter, Dem_DTCOriginType DTCOrigin, uint8 ClientId);

The function sets the filter to the first applicable DTC for the DM31 response for a specific node.

void Dem_J1939DcmFirstDTCwithLampStatus (uint8 ClientId);

Gets the next filtered J1939 DTC for DM31 including current LampStatus.

Std_ReturnType Dem_J1939DcmGetNextDTCwithLampStatus (Dem_J1939DcmLampStatusType* LampStatus, uint32* J1939DTC, uint8* OccurenceCounter, uint8 ClientId);

Gets the next filtered J1939 DTC.

Std_ReturnType Dem_J1939DcmGetNextFilteredDTC (uint32* J1939DTC, uint8* OccurenceCounter, uint8 ClientId);

Gets the next filtered Ratio.

Std_ReturnType Dem_J1939DcmGetNextFilteredRatio (uint32* SPN, uint16* Numerator, uint16* Denominator, uint8 ClientId);

Gets next freeze frame data. The function stores the data in the provided DestBuffer.

Std_ReturnType Dem_J1939DcmGetNextFreezeFrame (uint32* J1939DTC, uint8* OccurenceCounter, uint8* DestBuffer, uint16* BufSize, uint8 ClientId);

Gets next SPN.

Std_ReturnType Dem_J1939DcmGetNextSPNInFreezeFrame (uint32* SPNSupported, uint8* SPNDataLength, uint8 ClientId);

Gets the number of currently filtered DTCs set by the function Dem_J1939DcmSetDTCFilter.

Std_ReturnType Dem_J1939DcmGetNumberOfFilteredDTC (uint16* NumberOfFilteredDTC, uint8 ClientId);

Service to report the value of Diagnostic Readiness 1 (DM05) computed by the Dem.

Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness1 (Dem_J1939DcmDiagnosticReadiness1Type* DataValue, uint8 ClientId);

Service to report the value of Diagnostic Readiness 2 (DM21) computed by the Dem.

Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness2 (Dem_J1939DcmDiagnosticReadiness2Type* DataValue, uint8 ClientId);

Service to report the value of Diagnostic Readiness 3 (DM26) computed by the Dem.

Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness3 (Dem_J1939DcmDiagnosticReadiness3Type* DataValue, uint8 ClientId);

The function sets the DTC filter for a specific node and returns the composite lamp status of the filtered DTCs.

Std_ReturnType Dem_J1939DcmSetDTCFilter (Dem_J1939DcmDTCStatusFilterType DTCStatusFilter, Dem_DTCKindType DTCKind, Dem_DTCOriginType DTCOrigin, uint8 ClientId, Dem_J1939DcmLampStatusType* LampStatus);

The function sets the FreezeFrame filter for a specific node.

Std_ReturnType Dem_J1939DcmSetFreezeFrameFilter (Dem_J1939DcmSetFreezeFrameFilterType FreezeFrameKind, uint8 ClientId);

The function sets the Ratio filter for a specific node and returns the corresponding Ignition Cycle Counter and General Denominator.

Std_ReturnType Dem_J1939DcmSetRatioFilter (uint16* IgnitionCycleCounter, uint16* OBDMonitoringConditionsEncountered, uint8 ClientId);

服务 · Select…

Selects a DTC or DTC group as target for further operations.

Std_ReturnType Dem_SelectDTC (uint8 ClientId, uint32 DTC, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType DTCOrigin);

Sets the filter to be used by Dem_GetNextExtendedDataRecord and Dem_GetSizeOfExtended DataRecordSelection.

Std_ReturnType Dem_SelectExtendedDataRecord (uint8 ClientId, uint8 ExtendedDataNumber);

Sets the filter to be used by Dem_GetNextFreezeFrameData and Dem_GetSizeOfFreezeFrame Selection.

Std_ReturnType Dem_SelectFreezeFrameData (uint8 ClientId, uint8 RecordNumber);

服务 · 其他

Called by the Dem after the internal processing of Dem_SetEventFailedWithSyncFreezeFrame is done and a further call of Dem_SetEventFailedWithSyncFreezeFrame with the same event ID can be processed by the Dem. Tags: atp.Status=draft

Std_ReturnType Dem_CallbackEventSyncStorageProcessed (void);

Clears single DTCs, as well as groups of DTCs.

Std_ReturnType Dem_ClearDTC (uint8 ClientId);

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 Dem.h. API Availability: This API will be available only if ({ecuc(Dem/DemConfigSet/DemEvent Parameter.DemFFPrestorageSupported)} == true)

Std_ReturnType Dem_ClearPrestoredFreezeFrame (Dem_EventIdType EventId);

Disables the event memory update of a specific DTC (only one at one time).

Std_ReturnType Dem_DisableDTCRecordUpdate (uint8 ClientId);

Disables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.

Std_ReturnType Dem_DisableDTCSetting (uint8 ClientId);

Enables the event memory update of the DTC disabled by Dem_DisableDTCRecordUpdate() before. Note: As the call to Dem_EnableDTCRecordUpdate is the last action in the sequence of disabling/enabling a DTC, the caller is not interested in the return value. Therefore E_OK should be returned even if the DTC is enabled asynchronously.

Std_ReturnType Dem_EnableDTCRecordUpdate (uint8 ClientId);

(Re)-Enables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.

Std_ReturnType Dem_EnableDTCSetting (uint8 ClientId);

Initializes the internal states necessary to process events reported by BSW-modules.

void Dem_PreInit (void);

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 Dem.h. API Availability: This API will be available only if ({ecuc(Dem/DemConfigSet/DemEvent Parameter.DemFFPrestorageSupported)} == true)

Std_ReturnType Dem_PrestoreFreezeFrame (Dem_EventIdType EventId);

Service to report the value of PID $01 computed by the Dem. API is needed in OBD relevant ECUs only

Std_ReturnType Dem_ReadDataOfPID01 (uint8* PID01value);

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)

Std_ReturnType Dem_RepIUMPRDenRelease (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)

Std_ReturnType Dem_RepIUMPRFaultDetect (Dem_RatioIdType RatioID);

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

Std_ReturnType Dem_ResetEventDebounceStatus (Dem_EventIdType EventId, Dem_DebounceResetStatusType DebounceResetStatus);

Resets the event failed status. This API can only be used through the RTE and therefore no declaration is exported via Dem.h.

Std_ReturnType Dem_ResetEventStatus (Dem_EventIdType EventId);

Sets an operation cycle state. This API can only be used through the RTE and therefore no declaration is exported via Dem.h. The interface has an asynchronous behavior to avoid exceeding of typical timing requirements on APIs if a large number of events has to be processed and during the re-initializations of the related monitors. The asynchronous acknowledgements are the related InitMonitorForEvent callbacks.

Std_ReturnType Dem_RestartOperationCycle (uint8 OperationCycleId);

Shuts down this module.

void Dem_Shutdown (void);

周期性

Processes all not event based Dem internal functions.

void Dem_MainFunction (void);

类型

Identification of a DemComponent by assigned ComponentId. The ComponentId is automatically assigned by the Dem.

This type of the external data structure shall contain the post build initialization data for the Dem.

Array data type definition for external data elements

Data type definition for external data elements

This type contains all definitions to control an internal debounce counter/timer via the function Dem_ResetEventDebounceStatus().

This type is used to select the format of the DTC value.

This type is used to filter DTCs for their kind.

This enum is used to define the location of the events. The definition and use of the different memory types is OEM-specific.

This type is used to request a DTC with specific attributes.

DTC translation format as defined in ISO14229-1.

Control parameter for the interpretation of the reported test results.

Identification of an event by assigned EventId. The EventId is assigned by the Dem. Example: 1 refers to monitor x, 2 refers to monitor y, etc.

This type contains all monitor test result values, which can be reported via Dem_SetEventStatus().

Indicator mode used by Dem_GetIndicatorStatus().

(Re-)Initialization reason returned by the callback _DemInitMonitorFor().

This type contains all possible additional IUMPR denominator conditions to be broadcasted among OBD-relevant ECUs.

This type contains all possible states of an additional IUMPR denominator condition to be broadcasted among OBD-relevant ECUs.

This structure represents all data elemets of the DM05 message. The encoding shall be done acording SAE J1939-73

This structure represents all data elemets of the DM21 message. The encoding shall be done acording SAE J1939-73

This structure represents all data elemets of the DM26 message. The encoding shall be done acording SAE J1939-73

The type to distinguish which DTCs should be filtered.

For details refer SAE J1939-73

The type to distinguish which DTCs gets cleared

The type to distinguish which DTCs gets cleared

This type is used to pass monitoring data to the Dem.

OBD specific ratio Id (related to a specific event, a FID, and an IUMPR group). This type depends on the Dem configuration.