DEENESPTFRRUARHIKOZHNL

模块 ara::diag — Diagnostics

Spezifikation: AUTOSAR_AP_SWS_Diagnostics.pdf (R25-11) · 1055 API-Records

模块指南人工智能生成

提供标准化诊断服务、UDS 和 SOVD 协议以及集中式故障存储管理。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2d21a18c42f9 来源 未决问题(1)
因果锚点:R25-11 自 R25-11 起有效 为此规范版本重新合成。
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

提供标准化诊断服务、UDS 和 SOVD 协议以及集中式故障存储管理。

功能集群 Diagnostic Management 在 AUTOSAR Adaptive Platform 中为传统 UDS 和现代 SOVD 车辆诊断提供核心基础设施(AUTOSAR_AP_EXP_SWArchitecture 第150页)。作为平台守护进程,它终止 DoIP 等传输层,控制协议处理器,并通过类型安全的回调接口将诊断请求转发给 Adaptive Applications([SWS_DM_00311])。同时,该模块负责故障监控、基于时间和计数器的去抖以及故障存储器的管理。应用程序通过声明式 Offer 模型开放服务功能,从而使应用逻辑与协议处理保持清晰分离。

功能集群 Diagnostic Management(ara::diag)在 AUTOSAR Adaptive Platform 中为处理适应车辆的诊断通信提供基于守护进程的核心基础设施(AUTOSAR_AP_EXP_SWArchitecture 第150页)。它将传输特定的协议处理器(如 DoIP 或 CAN-TP)与实际的诊断核心解耦(UdsTransportProtocolMgr),从而实现诊断请求的统一终止与转发(AUTOSAR_AP_EXP_SWArchitecture 第164页)。

G Tester Diagnose-Client / Tester (UDS / SOVD) DM «aapFunctionalCluster» Diagnostic Management (daemon-based) Tester->DM SOVD REST / HTTP TPH «aapNativeInterface» UdsTransportProtocolHandler (DoIP / CAN-TP) Tester->TPH Transport Frames DM->TPH Transmit() AA Adaptive Application (Service Provider / Client) DM->AA Port Interfaces / Callbacks (Routine / DataIdentifier) SM «aapFunctionalCluster» State Management (Reset / Rapid Shutdown) DM->SM EcuResetRequest TPH->DM UdsMessage / HandleMessage() AA->DM Offer() / MonitorAction / DTCInformation

上下文图:Diagnostic Management 守护进程在传输处理器、Adaptive Applications 与外部测试仪之间的嵌入关系。来源:AUTOSAR_AP_EXP_SWArchitecture 第150页、AUTOSAR_AP_EXP_SWArchitecture 第164页、AUTOSAR_AP_EXP_SWArchitecture 第168页

对于服务处理,该模块实现了一种声明式提供模型:诊断守护进程实现端口接口,而 Adaptive Applications 则注册针对 DataIdentifier、例程或基于块的传输的服务回调,并通过 Offer() 或 StopOffer() 控制其可用性([SWS_DM_00557]、AUTOSAR_AP_EXP_SWArchitecture 第156页)。传入的消息通过两阶段指示与交付机制(IndicateMessage 和 HandleMessage)进行防错处理([SWS_DM_00309]、[SWS_DM_00311])。

UDS 请求处理与向应用程序转发DiagnosetesterTransport Handler诊断管理Adaptive ApplicationUDS Request FrameIndicateMessage(sourceAddr, targetAddr, ...)pair<kAccept, UdsMessagePtr>altUDS Request akzeptiertHandleMessage(UdsMessagePtr)Service Callback (z. B. Read / Start)Future<OperationOutput>Transmit(UdsMessageConstPtr, channelId)UDS Positive / Negative ResponseUDS Request abgelehnt / FehlerNotifyMessageFailure(UdsMessagePtr)

时序图:UDS 请求从传输层经由诊断管理器到达调用应用程序的完整控制流。来源:[SWS_DM_00309]、[SWS_DM_00311]、[SWS_DM_00327]、AUTOSAR_SWS_Diagnostics 第130页

除经典 UDS 功能外,该集群还管理诊断 Monitor,执行已配置的去抖,并将合格故障持久化存储在主故障存储器中(DTCInformation)([SWS_DM_00664]、SWS_Diagnostics 第225页)。ISO 13400-2(DoIP)和 ASAM SOVD(Service-Oriented Vehicle Diagnostics)等扩展标准通过用于激活线、身份验证和分层 JSON 有效负载的专用接口无缝集成到平台中([SWS_DM_00834]、[SWS_DM_02370]、AUTOSAR_AP_EXP_SWArchitecture 第170页)。

Diagnostic Management 的架构角色与系统边界

功能集群 Diagnostic Management(ara::diag)在 AUTOSAR Adaptive Platform(Release R25-11)中构成了车内及车外车辆诊断的核心控制中枢(AUTOSAR_AP_EXP_SWArchitecture 第150页)。在架构上,该模块被设计为基于守护进程的后台服务(«aapFunctionalCluster» Diagnostic Management daemon-based)。它终止物理及逻辑诊断协议,管理全局诊断上下文,并提供中间件基础设施,单个 Adaptive Applications 可通过该基础设施提供与诊断相关的数据和例程(AUTOSAR_AP_EXP_SWArchitecture 第156页)。

接口体系主要分为两类:通过 AUTOSAR Manifest 配置并绑定到应用进程的建模端口接口,以及原生 C++ 运行时接口(AUTOSAR_AP_EXP_SWArchitecture 第150页)。原生接口中尤其包括 Conversation 类,应用程序可通过该类查询当前会话状态([SWS_DM_00696])、获取安全级别([SWS_DM_00698])或检查活动诊断会话([SWS_DM_00783])。解读:选择在中央诊断守护进程与调用进程之间进行严格分离,大概是为了在单个应用程序重启时也能保证对外部测试仪的确定性响应时间。 问题 Q-2e2ea8eb9d415fed (未决)

G Tester Diagnose-Client / Tester (UDS / SOVD) DM «aapFunctionalCluster» Diagnostic Management (daemon-based) Tester->DM SOVD REST / HTTP TPH «aapNativeInterface» UdsTransportProtocolHandler (DoIP / CAN-TP) Tester->TPH Transport Frames DM->TPH Transmit() AA Adaptive Application (Service Provider / Client) DM->AA Port Interfaces / Callbacks (Routine / DataIdentifier) SM «aapFunctionalCluster» State Management (Reset / Rapid Shutdown) DM->SM EcuResetRequest TPH->DM UdsMessage / HandleMessage() AA->DM Offer() / MonitorAction / DTCInformation

上下文图:Diagnostic Management 守护进程在传输处理器、Adaptive Applications 与外部测试仪之间的嵌入关系。来源:AUTOSAR_AP_EXP_SWArchitecture 第150页、AUTOSAR_AP_EXP_SWArchitecture 第164页、AUTOSAR_AP_EXP_SWArchitecture 第168页

传输层连接与协议处理器的生命周期控制

为了独立于特定网络技术(如 Ethernet/DoIP 或 CAN/ISO-TP)运行,Diagnostic Management 通过标准化传输接口将协议核心解耦(AUTOSAR_AP_EXP_SWArchitecture 第164页)。通用核心实现 UdsTransportProtocolMgr 接口,而特定传输的适配器则作为 UdsTransportProtocolHandler 连接(AUTOSAR_AP_EXP_SWArchitecture 第165页)。每个处理器都通过唯一标识符进行标识,该标识符可通过 GetHandlerID() 查询([SWS_DM_00325])。

传输处理器的生命周期控制分为确定性的运行阶段(AUTOSAR_SWS_Diagnostics 第128页):在启动期间,Diagnostic Management 通过 Initialize() 初始化处理器([SWS_DM_00319]),随后通过 Start() 激活消息处理([SWS_DM_00322])。在受控终止时,管理器通过 Stop() 请求处理器关闭打开的连接([SWS_DM_00323]),随后处理器通过 HandlerStopped() 确认完成([SWS_DM_00314])。

对于长期存在的诊断会话,AUTOSAR 还规定了跨进程生命周期的恢复机制(AUTOSAR_SWS_Diagnostics 第134页)。如果在 Diagnostic Manager 重启后可以重新建立先前持久化的通道,则传输处理器通过 NotifyReestablishment() 报告此情况([SWS_DM_00326])。管理器在内部同步该状态,并通过调用 ChannelReestablished() 对其进行确认([SWS_DM_00313])。

UDS 传输处理程序的生命周期Diagnostic Management (DM_Generic)UdsTransportProtocolHandlerUse Case: InitialisierungsphaseInitialize()kSuccessStart()Use Case: Betriebsphase (Run)UDS 报文处理与诊断通信已激活Use Case: Terminierungsphase (Shutdown)Stop()HandlerStopped(handlerId)

时序图:通用诊断管理器对 UDS 传输处理器的生命周期控制。来源:[SWS_DM_00314]、[SWS_DM_00319]、[SWS_DM_00322]、[SWS_DM_00323]、AUTOSAR_SWS_Diagnostics 第128页

UDS 服务处理与应用特定请求处理

传入的 UDS 消息在经过协议验证后逐步处理(AUTOSAR_SWS_Diagnostics 第130页)。首先,传输处理器通过 IndicateMessage() 向管理器通告开始的消息,以分配资源和缓冲区([SWS_DM_00309])。消息被封装为 UdsMessage,该对象提供源地址([SWS_DM_00297])、目标地址([SWS_DM_00298])和寻址类型([SWS_DM_00299])。完全接收后,处理器通过 HandleMessage() 将数据对象传递给 Diagnostic Management([SWS_DM_00311]),同时使用 AddMetaInfo() 补充通道特定的元信息([SWS_DM_00302])。

在 Release R25-11 中,平台守护进程与应用程序之间的交互遵循反转的服务提供模型(AUTOSAR_AP_EXP_SWArchitecture 第156页):平台守护进程实现服务端口,而 Adaptive Applications 则实现回调方法,并显式通过 Offer() 激活其转发准备就绪状态([SWS_DM_00557])或通过 StopOffer() 挂起([SWS_DM_00558])。这同样适用于通用例程(GenericRoutine [SWS_DM_00552])、类型化例程(带 Start [SWS_DM_00591] 的 RoutineInterface [SWS_DM_00589])、数据标识符(带 Read [SWS_DM_00636] 和 Write [SWS_DM_00637] 的 GenericDataIdentifier [SWS_DM_00634])以及通用 UDS 服务(带 HandleMessage [SWS_DM_00618] 的 GenericUDSService [SWS_DM_00616])。

持续时间较长的诊断事务(例如符合 AUTOSAR_AP_EXP_SWArchitecture 第163页 的经由 UploadService [SWS_DM_00797]、DownloadService [SWS_DM_00787] 或 FileTransferService [SWS_DM_01325] 的块传输)通过 ara::core::Future 异步处理。为避免资源阻塞,应用特定的处理器会接收一个 CancellationHandler 实例(AUTOSAR_AP_EXP_SWArchitecture 第152页)。应用程序可通过 IsCanceled() 查询中止([SWS_DM_00614])或通过 SetNotifier() 注册通知函数([SWS_DM_00615])。对于协调重启,提供了 EcuResetRequest 接口([SWS_DM_01010]),该接口将复位请求委托给 State Management(AUTOSAR_AP_EXP_SWArchitecture 第162页)。

UDS 请求处理与向应用程序转发DiagnosetesterTransport Handler诊断管理Adaptive ApplicationUDS Request FrameIndicateMessage(sourceAddr, targetAddr, ...)pair<kAccept, UdsMessagePtr>altUDS Request akzeptiertHandleMessage(UdsMessagePtr)Service Callback (z. B. Read / Start)Future<OperationOutput>Transmit(UdsMessageConstPtr, channelId)UDS Positive / Negative ResponseUDS Request abgelehnt / FehlerNotifyMessageFailure(UdsMessagePtr)

时序图:UDS 请求从传输层经由诊断管理器到达调用应用程序的完整控制流。来源:[SWS_DM_00309]、[SWS_DM_00311]、[SWS_DM_00327]、AUTOSAR_SWS_Diagnostics 第130页

事件监控、去抖与故障存储管理

为了采集和判定系统故障,Diagnostic Management 实现了由 Monitor 和诊断事件组成的分层模型(SWS_Diagnostics 第225页)。应用程序实例化一个 Monitor 对象([SWS_DM_00548]),并持续通过 ReportMonitorAction() 报告测试结果([SWS_DM_00543])。该模块同时支持基于计数器和基于时间的去抖算法([SWS_DM_00549]、[SWS_DM_00550])。通过接口 Event,应用程序可以获取当前的 UDS 状态字节值([SWS_DM_00649])、检查去抖状态([SWS_DM_00654])或注册状态更改回调([SWS_DM_00650])。

为了在复杂系统中保持较小的端口占用空间,该平台提供了捆绑接口(AUTOSAR_AP_EXP_SWArchitecture 第153页):通过 MultipleMonitor([SWS_DM_01695])、MultipleEvent([SWS_DM_01705])和 MultipleCondition([SWS_DM_01727]),可以通过公共端口接口寻址多个监控通道。Monitor 的使能管理通过 Condition 对象进行([SWS_DM_00712]),而 OperationCycle([SWS_DM_00752])和 Indicator([SWS_DM_00742]、SWS_Diagnostics 第633页)则控制运行周期并发出警示灯请求信号。

聚合的事件汇集到通过 DTCInformation 暴露的故障存储管理中([SWS_DM_00664]、AUTOSAR_AP_EXP_SWArchitecture 第144页)。该接口允许读取已存储的条目([SWS_DM_00669])、选择性或全局清除 DTC([SWS_DM_00671])以及激活 DTC 记录([SWS_DM_00674])。如果发生主存储器容量超限,应用程序将通过 SetEventMemoryOverflowNotifier() 收到通知([SWS_DM_00918]、[SWS_DM_00919])。

G App Adaptive Application (Fehlererkennung) Mon ara::diag::Monitor ReportMonitorAction() App->Mon kPreFailed / kPrePassed Deb 去抖 (基于时间/基于计数器) Mon->Deb Aktion melden Evt ara::diag::Event EventStatusByte Deb->Evt Entprellstatus qualifiziert (kTestFailed / kTestPassed) Mem DTCInformation Fehlerspeichereintrag Evt->Mem 状态变更 / DTC 激活

状态/活动图:从 Monitor 动作经由去抖到故障存储器中 DTC 判定的流程。来源:[SWS_DM_00543]、[SWS_DM_00649]、[SWS_DM_00664]、SWS_Diagnostics 第225页

扩展诊断协议:DoIP 集成与 SOVD 服务

对于基于以太网的车辆网络,该模块集成了专用 DoIP 功能(符合 ISO 13400-2 的 Diagnostic communication over Internet Protocol)(AUTOSAR_AP_EXP_SWArchitecture 第166页、AUTOSAR_AP_EXP_SWArchitecture 第167页)。平台扩展通过 DoIPActivationLine::UpdateActivationLineState() 报告物理激活线的状态([SWS_DM_00834]、AUTOSAR_AP_TPS_ManifestSpecification 第338页)。以此为基础,可以通过 DoIPTriggerVehicleAnnouncement 触发车辆通告消息(Vehicle Announcement Messages)([SWS_DM_00821]、[SWS_DM_00822]、AUTOSAR_AP_SWS_Diagnostics 第108页)。组识别和实体识别通过 DoIPGroupIdentification([SWS_DM_00722])和 DoIPEntityIdentification([SWS_DM_01364]、[SWS_DM_01366])动态查询。

DoIP 激活线与通告流程Applikation / Hardware-TreiberDoIPActivationLineDiagnostic Management (DoIP-Daemon)Netzwerk (Broadcast)UpdateActivationLineState(true)Signalisiere LeitungszustandoptisActivationLineDependent == trueGetActivationLineState()trueVehicle Announcement Message (UDP)

时序图:应用程序、激活线与触发 DoIP 车辆通告之间的交互。来源:[SWS_DM_00822]、[SWS_DM_00834]、AUTOSAR_AP_SWS_Diagnostics 第108页

除经典 UDS 服务外,Release R25-11 还建立了针对 SOVD(Service-Oriented Vehicle Diagnostics,ASAM SOVD / ISO 13170)的原生接口(AUTOSAR_AP_EXP_SWArchitecture 第168页)。结构化诊断数据通过 DiagnosticSovdContentElementData 建模([SWS_DM_02370]、AUTOSAR_AP_EXP_SWArchitecture 第170页)。为了操作类似 JSON 的复杂有效负载,提供了类型安全的类似 STL 的类,例如 DiagnosticSovdArrayContentElementDataView([SWS_DM_02245]、AUTOSAR_AP_EXP_SWArchitecture 第172页)和 DiagnosticSovdRecordContentElementDataView([SWS_DM_02289]、AUTOSAR_AP_EXP_SWArchitecture 第174页)。

针对扩展的 SOVD 事务和安全保障,该模块定义了标准化角色:大量数据(如 Trace 或 Crash Dump)通过 SovdBulkData 传输([SWS_DM_01847]、[SWS_DM_01854]、AUTOSAR_AP_TPS_ManifestSpecification 第321页)。访问控制通过 SovdAuthorization([SWS_DM_01489])和 SovdProximityChallenge([SWS_DM_01480]、[SWS_DM_01493])借助令牌与近程检查进行,而服务检查则通过 SovdServiceValidation 进行授权([SWS_DM_01823]、[SWS_DM_01827])。

发生错误时的行为

模块 diag 的错误管理基于 AUTOSAR 标准模式 ara::core::Result<T, ErrorCode>,并完全排除了静默错误状态。错误根据其功能原因划分为五个专用错误域(ErrorDomain),这些错误域定义了错误码以及相应的异常类:

在传输层级别,传输中止、缓冲区溢出或连接中断通过回调 NotifyMessageFailure() 报告给 Diagnostic Management([SWS_DM_00310])。这使该模块能够立即释放已分配的资源,并在必要时向测试仪发送否定响应消息。

G Core ara::core::Result<T, ErrorCode> DE DiagErrorDomain (Allgemeine Diagnosefehler) Core->DE NRC DiagUdsNrcErrorDomain (ISO 14229 Negative Response Codes) Core->NRC Offer DiagOfferErrorDomain (Offer / StopOffer 时的错误) Core->Offer Rep DiagReportingErrorDomain (Monitor 报告时的错误) Core->Rep SOVD DiagSovdErrorDomain (SOVD REST- / Inhaltsfehler) Core->SOVD

类图:Diagnostic Management 中的错误域架构以及标准化异常和错误码的分配。来源:[SWS_DM_00520]、[SWS_DM_00532]、[SWS_DM_00992]、[SWS_DM_00999]、[SWS_DM_01812]

进一步详细证据

模块 diag 的规范基础基于 AUTOSAR Adaptive Platform 的三个核心规范文档:

本模块指南基于适用于 Release R25-11 的 AUTOSAR Adaptive 规范生成。所有规范性要求均来自所引用的 SWS 和架构文档。

function: 755 variable: 102 class: 79 type alias: 45 struct: 39 enumeration: 35

主题图

ara::diag

131
AuthenticationCancellationHandlerClientAuthenticationClientAuthenticationHandleCommunicationControlConditionConversationCounterBasedDataIdentifierConcurrencyTypeDataTransferReadByPullHandlerDataTransferReadByPushHandlerDataTransferReadSessionDataTransferReadSharedDataHandlerDataTransferWriteHandlerDataTransferWriteSessionDiagErrorDomainDiagExceptionDiagnosticServiceDynamicAccessListDiagnosticSovdArrayContentElementDataConstIteratorDiagnosticSovdArrayContentElementDataConstViewDiagnosticSovdArrayContentElementDataIteratorDiagnosticSovdArrayContentElementDataViewDiagnosticSovdContentDataDiagnosticSovdContentElementDataDiagnosticSovdContentElementDataWithKeyDiagnosticSovdRecordContentElementDataConstIteratorDiagnosticSovdRecordContentElementDataConstViewDiagnosticSovdRecordContentElementDataIteratorDiagnosticSovdRecordContentElementDataViewDiagOfferErrorDomainDiagOfferExceptionDiagReportingErrorDomainDiagReportingExceptionDiagSovdErrorDomainDiagSovdExceptionDiagUdsNrcErrorDomainDiagUdsNrcExceptionDoIPActivationLineDoIPEntityIdentificationDoIPGroupIdentificationDoIPPowerModeDoIPTriggerVehicleAnnouncementDownloadServiceDTCInformationDynamicAccessListDiagServiceBuilderEcuResetRequestEventEventStatusByteExternalAuthenticationFileTransferServiceGenericDataIdentifierGenericDiagnosticSovdContentGenericDiagnosticSovdOperationGenericRoutineGenericUDSServiceHttpRedirectIndicatorMetaInfoMonitorMultipleConditionMultipleEventMultipleMonitorOperationCycleReleaseHandlerSecurityAccessServiceValidationSovdAuthorizationSovdBulkDataSovdConfigurationSovdContentConcurrencyTypeSovdOperationExecutionSovdProximityChallengeSovdProximityChallengeTypeSovdServiceValidationSovdSwUpdateTimeBasedTransmitCertificateUploadServiceGetDiagDomainGetDiagOfferDomainGetDiagReportingDomainGetDiagSovdErrorDomainGetDiagUdsNrcDomainMakeErrorCodeActivityStatusTypeConcurrencyTypeConditionTypeConfirmationStatusTypeControlDtcStatusTypeDataTransferExitTypeDebouncingStateDiagErrcDiagnosticSovdContentElementDataTypeDiagnosticSovdPrimitiveContentValueTypeDiagOfferErrcDiagReportingErrcDiagSovdErrcDiagUdsNrcErrcDTCFormatTypeEventStatusBitIndicatorStatusTypeInitMonitorReasonKeyCompareResultTypeMonitorActionOperationExecutionCapabilityOperationExecutionStatusPowerModeTypeProximityChallengeResultTypeSovdRequestMethodSovdUpdatePhaseSovdUpdateStatusTerminateOperationExecutionReasonUdsDtcStatusBitTypeConditionHandleTypeEventHandleTypeEventStatusByteNotifierInitMonitorNotifierMonitorHandleTypeProximityChallengeValidationResultTypeResetRequestTypeSecurityLevelTypeSessionControlTypekCustomResetkDefaultSessionkExtendedDiagnosticSessionkHardResetkKeyOffOnResetkLockedkProgrammingSessionkSafetySystemDiagnosticSessionkSoftReset

详细视图

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

<DataElement-Namespace>

DiagnosticDataElementInterface class

<DataIdentifier-Namespace>

DiagnosticDataIdentifierInterface class

<ExtendedDataRecord-Namespace>

DiagnosticExtendedDataRecordInterface class

<RoutineInterface-Namespace>

DiagnosticRoutineInterface class

apext::diag::uds_transport

class represents an UDS message exchanged between DM generic core (UdsTransport ProtocolMgr) and a specific implementation of UdsTransportPr

Abstract Class, which a specific UDS Transport Protocol (plugin) shall subclass.

The UdsTransportProtocolMgr class manages the interaction between the Diagnostic Server instance(s) and various UDS Transport Protocols (e.g

UdsTransportProtocolPeriodicHandler class to support 0x2A service from ISO.

ByteSpan 类型别名

This is the type of ByteSpan.

using ByteSpan = ara::core::Span<ara::core::Byte>;
ChannelID 类型别名

This is the identification of channel on which to transmit.

using ChannelID = std::uint32_t;
UdsMessageConstPtr 类型别名

This is the unique_ptr for constant UdsMessages containing a custom deleter as provided by the generic/core DM part towards the UdsTransportLayer-Plugin.

using UdsMessageConstPtr = std::unique_ptr<const UdsMessage, std::function<void(const UdsMessage*)>>;
UdsMessagePtr 类型别名

This is the unique_ptr for UdsMessages containing a custom deleter as provided by the generic/ core DM part towards the UdsTransportLayer-Plugin.

using UdsMessagePtr = std::unique_ptr<UdsMessage, std::function<void(UdsMessage*)>>;

UdsTransportProtocolHandler are flexible "plugins", which need an identification.

using UdsTransportProtocolHandlerID = std::uint8_t;

ara::diag

Class to implement the Service Authentication interfaces to application.

CancellationHandler contains a shared state if the processing should be cancelled.

Interface for the application to inform the Diagnostic Server instance about the authentication states and the user roles that are currently

Definition of the ClientAuthenticationHandle which is returned to the application when an AuthenticationState is set by the application.

0x28 CommunicationControl interface

DiagnosticConditionInterface.

Conversation interface.

Represents the parameters for counter-based debouncing.

Specifies the Concurrency type of a DataIdentifier related port.

Handles data transfers initiated by RequestReadFile/-Directory with data pulled by AraDiag from the implementation.

Handles data transfers initiated by RequestReadFile/-Directory with data pushed by the implementation.

Encapsulates all data transfer reading variants.

Handles data transfers initiated by RequestReadFile/-Directory with shared data from the implementation.

Handles data transfers initiated by AddFile, ResumeFile or ReplaceFile ModeOfOperation handling per requested RequestWriteFile.

Encapsulates all data transfer writing variants.

Error domain for diagnostic errors.

继承自 ara::core::ErrorDomain

Exception type thrown by Diag classes.

继承自 ara::core::Exception

Definition of the DiagnosticServiceDynamicAccessList class, which is used by the application to build a DynamicAccessList.

Const iterator for a DiagnosticSovdArrayContentElementData.

Const view on a DiagnosticSovdContentElementData with Array type.

Iterator for a DiagnosticSovdArrayContentElementData.

View on a DiagnosticSovdContentElementData with Array type.

The DiagnosticSovdContentData declaration.

Diagnostic SOVD Abstract Content Data.

A DiagnosticSovdContentElementData with associated key.

Const iterator for a DiagnosticSovdRecordContentElementData.

Const view on a DiagnosticSovdContentElementData with Record type.

Iterator for a DiagnosticSovdRecordContentElementData.

View on a DiagnosticSovdContentElementData with Record type.

Error domain for diagnostic offer errors.

继承自 ara::core::ErrorDomain

Exception type thrown by Diag classes.

继承自 ara::core::Exception

Error domain for diagnostic reporting errors.

继承自 ara::core::ErrorDomain

Exception type thrown by Diag classes.

继承自 ara::core::Exception

Error domain for errors originating from SOVD.

继承自 ara::core::ErrorDomain

Exception type for SOVD thrown by Diag classes.

继承自 ara::core::Exception

Error domain for errors originating from several diagnostic classes.

继承自 ara::core::ErrorDomain

Exception type thrown by Diag classes.

继承自 ara::core::Exception

DiagnosticDoIPActivationLineInterface.

DoIPEntityIdentification class to obtain the EID if required.

DoIPGroupIdentificationInterface.

DiagnosticDoIPPowerModeInterface.

DiagnosticDoIPTriggerVehicleAnnouncement.

Download service interface.

Class to implement operations on DTC informations per configured DiagnosticMemory Destination.

Definition of the DynamicAccessListDiagServiceBuilder class, which is used by the application to build a DynamicAccessList.

Service EcuReset Request interface.

Event 类

Class to implement operations on diagnostic Events.

Current event status byte, bit-encoded.

Definition of the ExternalAuthentication class, which is used by the application to receive an instance of the ClientAuthentication Class re

File Transfer service interface.

Generic DataIdentifier interface.

Generic Diagnostic SOVD Content interface.

Generic Diagnostic SOVD Operation interface .

Generic Routine interface.

Generic UDS interface.

Definition of HTTP-Redirect

DiagnosticIndicatorInterface provides functionality for handling indicators.

Metainfo interface.

Class to implement operations on diagnostic Monitor interface.

Class for multiple condition operations.

Class to implement operations on diagnostic Events with the multiple event interfaces.

Class to implement monitor operations on the multiple monitor interfaces.

DiagnosticOperationCycleInterface provides functionality for handling of operation cycles.

ReleaseHandler contains a shared state if the processing should be cancelled.

DiagnosticSecurityAccessInterface.

DiagnosticServiceValidationInterface.

Class to implement the SOVD Authorization interfaces in the application.

Generic SOVD Bulk Data interface.

Generic SOVD Configuration interface.

Specifies the Concurrency type of a SOVD Content related port.

Interface to handle the SOVD Operation Execution .

Class to implement the SOVD proximity_challenge interfaces in the application.

Holds the data returned by the SovdProximityChallenge::GetChallenge()

Class to implement manufacturer-/supplier-specific checks for SOVD in the application.

Class to implement the SovdSwUpdate interface.

Represents the parameters for time-based debouncing.

Class to implement the subfunction TransmitCertificate (29 04) of UDS service Authentication as interface to application

Upload service interface.

Obtain the reference to the single global DiagErrorDomain instance.

constexpr const ara::core::ErrorDomain & GetDiagDomain () noexcept;

Obtain the reference to the single global DiagErrorDomain instance.

constexpr const ara::core::ErrorDomain & GetDiagOfferDomain () noexcept;

Obtain the reference to the single global DiagReportingErrorDomain instance.

constexpr const ara::core::ErrorDomain & GetDiagReportingDomain () noexcept;

Obtain the reference to the single global DiagSovdErrorDomain instance.

constexpr const ara::core::ErrorDomain & GetDiagSovdErrorDomain () noexcept;

Obtain the reference to the single global DiagUdsNrcErrorDomain instance.

constexpr const ara::core::ErrorDomain & GetDiagUdsNrcDomain () noexcept;
MakeErrorCode 函数 5

Create a new ErrorCode for DiagErrorDomain with the given support data type.

重载 MakeErrorCode 5

Type for current activity status.

enum class ActivityStatusType : std::uint8_t {...};

Specifies the Concurrency types.

enum class ConcurrencyType : std::uint8_t {...};

Type for Condition status.

enum class ConditionType : std::uint8_t {...};

Represents the status of the service processing.

enum class ConfirmationStatusType : std::uint8_t {...};

Type for ControlDTCStatus status as requested by UDS service 0x85 ControlDTCSetting.

enum class ControlDtcStatusType : std::uint8_t {...};

Determines transfer exit signal type.

enum class DataTransferExitType : ara::core::Byte {...};

Debounce status of event.

enum class DebouncingState : std::uint8_t {...};
DiagErrc 枚举

Specifies the types of internal errors that can occur upon calling Offer or ReportMonitorAction.

enum class DiagErrc : ara::core::ErrorDomain::CodeType {...};

The type of the SOVD content data.

enum class DiagnosticSovdContentElementDataType : std::uint8_t {...};

The primitive content element value types.

enum class DiagnosticSovdPrimitiveContentValueType : std::uint8_t {...};

The DiagOfferErrc enumeration defines the error codes for the DiagOfferErrorDomain.

enum class DiagOfferErrc : ara::core::ErrorDomain::CodeType {...};

The DiagReportingErrc enumeration defines the error codes for the DiagReportingErrorDomain.

enum class DiagReportingErrc : ara::core::ErrorDomain::CodeType {...};

Specifies the types of errors that can occur in SOVD services.

enum class DiagSovdErrc : ara::core::ErrorDomain::CodeType {...};

Specifies the types of internal errors that can occur upon calling Offer or ReportMonitorAction. The error codes described are defined in ISO 14229-1:2020 [1], Table A.1 "Negative Response Codes". In AUTOSAR, the three negative response code ranges, 0x00, 0x01-0x7F and 0x80-0xFF are respected, however, the value 0xFF is used to internally indicate, that there is no further processing and no response handling foreseen.

enum class DiagUdsNrcErrc : ara::core::ErrorDomain::CodeType {...};

Represents the type of the DTC format according to ISO 14229-1 [30].

enum class DTCFormatType : std::uint8_t {...};

Single event status bits.

enum class EventStatusBit : std::uint8_t {...};

Represents the state of an indicator.

enum class IndicatorStatusType : std::uint8_t {...};

Represents the status information reported to AAs why the monitor may be re-initalized.

enum class InitMonitorReason : std::uint32_t {...};

Represents the status of the key compare.

enum class KeyCompareResultType : std::uint8_t {...};

Represents the status information reported by AAs being relevant for error monitoring.

enum class MonitorAction : std::uint32_t {...};

The standard operation execution capabilities .

enum class OperationExecutionCapability : std::uint8_t {...};

The operation execution status .

enum class OperationExecutionStatus : std::uint8_t {...};

PowerMode as defined in ISO 13400-2 [2].

enum class PowerModeType : std::uint8_t {...};

This is the type of ProximityChallengeResultType.

enum class ProximityChallengeResultType : std::uint8_t {...};

HTTP method used in the SOVD request.

enum class SovdRequestMethod : std::uint8_t {...};

Phase type for a SOVD update.

enum class SovdUpdatePhase : std::uint8_t {...};

Status type for a SOVD update .

enum class SovdUpdateStatus : std::uint8_t {...};

The Terminate Operation reason .

enum class TerminateOperationExecutionReason : std::uint8_t {...};

UDS DTC status bits according to ISO 14229-1.

enum class UdsDtcStatusBitType : std::uint8_t {...};
ConditionHandleType 类型别名

Type to identify a condition.

using ConditionHandleType = std::uint8_t;
EventHandleType 类型别名

Type to identify an event.

using EventHandleType = std::uint32_t;

Register a notifier function which is called if a diagnostic event is changed.

using EventStatusByteNotifier = std::function<void(EventStatusByte)>;
InitMonitorNotifier 类型别名

Notifier function which is called if the monitor needs to be re-initialized.

using InitMonitorNotifier = std::function<void(InitMonitorReason)>;
MonitorHandleType 类型别名

Type to identify an monitor .

using MonitorHandleType = std::uint32_t;

This is the type of ProximityChallengeValidationResultType.

using ProximityChallengeValidationResultType = ProximityChallenge ResultType;
ResetRequestType 类型别名

The type of the requested reset.

using ResetRequestType = std::uint8_t;
SecurityLevelType 类型别名

Type for the active security level. .

using SecurityLevelType = std::uint8_t;
SessionControlType 类型别名

Type for the active diagnostic session. .

using SessionControlType = std::uint8_t;

kCustomReset

constexpr ResetRequestType kCustomReset = 3;

Default session according to IS0 14229-1.

constexpr SessionControlType kDefaultSession = 0x01;

Extended diagnostic session according to IS0 14229-1.

constexpr SessionControlType kExtendedDiagnosticSession = 0x03;
kHardReset 变量

HardReset.

constexpr ResetRequestType kHardReset = 1;

KeyOffOnReset.

constexpr ResetRequestType kKeyOffOnReset = 2;
kLocked 变量

Security level locked.

constexpr SecurityLevelType kLocked = 0x00;

Programming session according to IS0 14229-1.

constexpr SessionControlType kProgrammingSession = 0x02;

Safety system diagnostic session according to IS0 14229-1.

constexpr SessionControlType kSafetySystemDiagnosticSession = 0x04;
kSoftReset 变量

SoftReset.

constexpr ResetRequestType kSoftReset = 0;

命名空间

模块的 UML 类图

Abgerundete Rahmen = Namespaces; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = modulfremde bzw. externe Basisklassen. Klicken öffnet die Klassenseite.

G cluster_1 <DataElement-Namespace> cluster_2 <DataElement-Namespace>::<DataElementInterface> cluster_3 <DataIdentifier-Namespace> cluster_4 <DataIdentifier-Namespace>::<DataIdentifierInterface> cluster_5 <ExtendedDataRecord-Namespace> cluster_6 <ExtendedDataRecord-Namespace>::<ExtendedDataRecordElementInterface> cluster_7 <RoutineInterface-Namespace> cluster_8 <RoutineInterface-Namespace>::<RoutineInterface> cluster_9 apext::diag::uds_transport cluster_10 ara::diag cluster_11 ara::diag::CommunicationControl cluster_12 ara::diag::Conversation cluster_13 ara::diag::DTCInformation cluster_14 ara::diag::DoIPEntityIdentification cluster_15 ara::diag::DoIPGroupIdentification cluster_16 ara::diag::DownloadService cluster_17 ara::diag::DynamicAccessListDiagServiceBuilder cluster_18 ara::diag::FileTransferService cluster_19 ara::diag::GenericDataIdentifier cluster_20 ara::diag::GenericDiagnosticSovdOperation cluster_21 ara::diag::GenericRoutine cluster_22 ara::diag::GenericUDSService cluster_23 ara::diag::SovdAuthorization cluster_24 ara::diag::SovdBulkData cluster_25 ara::diag::SovdConfiguration cluster_26 ara::diag::SovdOperationExecution cluster_27 ara::diag::SovdSwUpdate cluster_28 ara::diag::UploadService n_DataElement_Namespace____DataElementInterface_750 <DataElementInterface> n_DataElement_Namespace____DataElementInterface____DataElement_ReadOutp608 «struct» <DataElement>ReadOutput n_DataIdentifier_Namespace____DataIdentifierInterface_960 <DataIdentifierInterface> n_DataIdentifier_Namespace____DataIdentifierInterface____DataIdentifier756 «struct» <DataIdentifier>ReadOutput n_ExtendedDataRecord_Namespace____ExtendedDataRecordElementInterface_765 <ExtendedDataRecordElementInterface> n_ExtendedDataRecord_Namespace____ExtendedDataRecordElementInterface___533 «struct» <ExtendedDataRecordElement>ReadOutput n_RoutineInterface_Namespace____RoutineInterface_950 <RoutineInterface> n_RoutineInterface_Namespace____RoutineInterface____RoutineInterface6_S811 «struct» <RoutineInterface6>StartOutput n_RoutineInterface_Namespace____RoutineInterface____RoutineInterface9_S410 «struct» <RoutineInterface9>StopOutput n_RoutineInterface_Namespace____RoutineInterface____RoutineInterface_Re625 «struct» <RoutineInterface>RequestResultOutput napext__diag__uds_transport__UdsMessage883 UdsMessage napext__diag__uds_transport__UdsTransportProtocolHandler1 UdsTransportProtocolHandler napext__diag__uds_transport__UdsTransportProtocolMgr247 UdsTransportProtocolMgr napext__diag__uds_transport__UdsTransportProtocolPeriodicHandler54 UdsTransportProtocolPeriodicHandler nara__diag__Authentication309 Authentication nara__diag__CancellationHandler489 CancellationHandler nara__diag__ClientAuthentication678 ClientAuthentication nara__diag__ClientAuthenticationHandle939 ClientAuthenticationHandle nara__diag__CommunicationControl599 CommunicationControl nara__diag__Condition778 Condition nara__diag__Conversation235 Conversation nara__diag__CounterBased25 «struct» CounterBased nara__diag__DataIdentifierConcurrencyType801 «struct» DataIdentifierConcurrencyType nara__diag__DataTransferReadByPullHandler313 DataTransferReadByPullHandler nara__diag__DataTransferReadByPushHandler95 DataTransferReadByPushHandler nara__diag__DataTransferReadSession318 DataTransferReadSession nara__diag__DataTransferReadSharedDataHandler544 DataTransferReadSharedDataHandler nara__diag__DataTransferWriteHandler871 DataTransferWriteHandler nara__diag__DataTransferWriteSession996 DataTransferWriteSession nara__diag__DiagErrorDomain167 DiagErrorDomain nara__core__ErrorDomain335 ara::core::ErrorDomain nara__diag__DiagErrorDomain167->nara__core__ErrorDomain335 nara__diag__DiagException942 DiagException nara__core__Exception792 ara::core::Exception nara__diag__DiagException942->nara__core__Exception792 nara__diag__DiagnosticServiceDynamicAccessList408 DiagnosticServiceDynamicAccessList nara__diag__DiagnosticSovdArrayContentElementDataConstIterator518 DiagnosticSovdArrayContentElementDataConstIterator nara__diag__DiagnosticSovdArrayContentElementDataConstView162 DiagnosticSovdArrayContentElementDataConstView nara__diag__DiagnosticSovdArrayContentElementDataIterator554 DiagnosticSovdArrayContentElementDataIterator nara__diag__DiagnosticSovdArrayContentElementDataView429 DiagnosticSovdArrayContentElementDataView nara__diag__DiagnosticSovdContentData509 «struct» DiagnosticSovdContentData nara__diag__DiagnosticSovdContentElementData188 DiagnosticSovdContentElementData nara__diag__DiagnosticSovdContentElementDataWithKey42 DiagnosticSovdContentElementDataWithKey nara__diag__DiagnosticSovdRecordContentElementDataConstIterator644 DiagnosticSovdRecordContentElementDataConstIterator nara__diag__DiagnosticSovdRecordContentElementDataConstView167 DiagnosticSovdRecordContentElementDataConstView nara__diag__DiagnosticSovdRecordContentElementDataIterator471 DiagnosticSovdRecordContentElementDataIterator nara__diag__DiagnosticSovdRecordContentElementDataView16 DiagnosticSovdRecordContentElementDataView nara__diag__DiagOfferErrorDomain584 DiagOfferErrorDomain nara__diag__DiagOfferErrorDomain584->nara__core__ErrorDomain335 nara__diag__DiagOfferException442 DiagOfferException nara__diag__DiagOfferException442->nara__core__Exception792 nara__diag__DiagReportingErrorDomain575 DiagReportingErrorDomain nara__diag__DiagReportingErrorDomain575->nara__core__ErrorDomain335 nara__diag__DiagReportingException911 DiagReportingException nara__diag__DiagReportingException911->nara__core__Exception792 nara__diag__DiagSovdErrorDomain991 DiagSovdErrorDomain nara__diag__DiagSovdErrorDomain991->nara__core__ErrorDomain335 nara__diag__DiagSovdException335 DiagSovdException nara__diag__DiagSovdException335->nara__core__Exception792 nara__diag__DiagUdsNrcErrorDomain838 DiagUdsNrcErrorDomain nara__diag__DiagUdsNrcErrorDomain838->nara__core__ErrorDomain335 nara__diag__DiagUdsNrcException343 DiagUdsNrcException nara__diag__DiagUdsNrcException343->nara__core__Exception792 nara__diag__DoIPActivationLine856 DoIPActivationLine nara__diag__DoIPEntityIdentification87 DoIPEntityIdentification nara__diag__DoIPGroupIdentification259 DoIPGroupIdentification nara__diag__DoIPPowerMode921 DoIPPowerMode nara__diag__DoIPTriggerVehicleAnnouncement193 DoIPTriggerVehicleAnnouncement nara__diag__DownloadService914 DownloadService nara__diag__DTCInformation53 DTCInformation nara__diag__DynamicAccessListDiagServiceBuilder245 DynamicAccessListDiagServiceBuilder nara__diag__EcuResetRequest662 EcuResetRequest nara__diag__Event255 Event nara__diag__EventStatusByte808 «struct» EventStatusByte nara__diag__ExternalAuthentication264 ExternalAuthentication nara__diag__FileTransferService20 FileTransferService nara__diag__GenericDataIdentifier357 GenericDataIdentifier nara__diag__GenericDiagnosticSovdContent32 GenericDiagnosticSovdContent nara__diag__GenericDiagnosticSovdOperation745 GenericDiagnosticSovdOperation nara__diag__GenericRoutine818 GenericRoutine nara__diag__GenericUDSService134 GenericUDSService nara__diag__HttpRedirect903 «struct» HttpRedirect nara__diag__Indicator648 Indicator nara__diag__MetaInfo769 MetaInfo nara__diag__Monitor586 Monitor nara__diag__MultipleCondition516 MultipleCondition nara__diag__MultipleEvent593 MultipleEvent nara__diag__MultipleMonitor546 MultipleMonitor nara__diag__OperationCycle125 OperationCycle nara__diag__ReleaseHandler678 ReleaseHandler nara__diag__SecurityAccess583 SecurityAccess nara__diag__ServiceValidation871 ServiceValidation nara__diag__SovdAuthorization23 SovdAuthorization nara__diag__SovdBulkData992 SovdBulkData nara__diag__SovdConfiguration627 SovdConfiguration nara__diag__SovdContentConcurrencyType404 «struct» SovdContentConcurrencyType nara__diag__SovdOperationExecution800 SovdOperationExecution nara__diag__SovdProximityChallenge981 SovdProximityChallenge nara__diag__SovdProximityChallengeType366 «struct» SovdProximityChallengeType nara__diag__SovdServiceValidation102 SovdServiceValidation nara__diag__SovdSwUpdate737 SovdSwUpdate nara__diag__TimeBased382 «struct» TimeBased nara__diag__TransmitCertificate785 TransmitCertificate nara__diag__UploadService152 UploadService nara__diag__CommunicationControl__ComCtrlRequestParamsType893 «struct» ComCtrlRequestParamsType nara__diag__Conversation__ConversationIdentifierType414 «struct» ConversationIdentifierType nara__diag__DTCInformation__SnapshotDataIdentifierType592 «struct» SnapshotDataIdentifierType nara__diag__DTCInformation__SnapshotDataRecordType1 «struct» SnapshotDataRecordType nara__diag__DTCInformation__SnapshotRecordUpdatedType973 «struct» SnapshotRecordUpdatedType nara__diag__DTCInformation__UdsDtcStatusByteType119 «struct» UdsDtcStatusByteType nara__diag__DoIPEntityIdentification__EntityId720 «struct» EntityId nara__diag__DoIPGroupIdentification__GidStatus478 «struct» GidStatus nara__diag__DownloadService__OperationOutput45 «struct» OperationOutput nara__diag__DynamicAccessListDiagServiceBuilder__ByteRange410 ByteRange nara__diag__FileTransferService__FileSizes857 «struct» FileSizes nara__diag__GenericDataIdentifier__OperationOutput669 «struct» OperationOutput nara__diag__GenericDiagnosticSovdOperation__StartAsynchronousExecutionR4 «struct» StartAsynchronousExecutionResponse nara__diag__GenericDiagnosticSovdOperation__StartSynchronousExecutionRe904 «struct» StartSynchronousExecutionResponse nara__diag__GenericRoutine__OperationOutput174 «struct» OperationOutput nara__diag__GenericUDSService__OperationOutput107 «struct» OperationOutput nara__diag__SovdAuthorization__ValidateAuthorizationOutput846 «struct» ValidateAuthorizationOutput nara__diag__SovdBulkData__BulkDataMetaDataDescriptor441 «struct» BulkDataMetaDataDescriptor nara__diag__SovdBulkData__DeleteByCategoryResult960 «struct» DeleteByCategoryResult nara__diag__SovdBulkData__DeletionError56 «struct» DeletionError nara__diag__SovdConfiguration__SovdConfigurationMetaInfo383 «struct» SovdConfigurationMetaInfo nara__diag__SovdOperationExecution__GetStatusResponse773 «struct» GetStatusResponse nara__diag__SovdSwUpdate__SubProgress643 «struct» SubProgress nara__diag__SovdSwUpdate__UpdatePackageDetails110 «struct» UpdatePackageDetails nara__diag__SovdSwUpdate__UpdatePackageStatus558 «struct» UpdatePackageStatus nara__diag__UploadService__OperationOutput307 «struct» OperationOutput