模块 ara::diag — Diagnostics
模块指南人工智能生成
提供标准化诊断服务、UDS 和 SOVD 协议以及集中式故障存储管理。
提供标准化诊断服务、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页)。
上下文图: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 请求从传输层经由诊断管理器到达调用应用程序的完整控制流。来源:[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 (未决)
上下文图: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 传输处理器的生命周期控制。来源:[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 请求从传输层经由诊断管理器到达调用应用程序的完整控制流。来源:[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])。
状态/活动图:从 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 车辆通告之间的交互。来源:[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),这些错误域定义了错误码以及相应的异常类:
- 通用诊断错误:
DiagErrorDomain([SWS_DM_00520]、[SWS_DM_00524])和关联的DiagException([SWS_DM_00516])指示基本平台或配置错误,例如无效参数或未初始化的实例。 - UDS 否定响应码 (NRC):符合 ISO 14229 的特定 UDS 协议拒绝通过
DiagUdsNrcErrorDomain([SWS_DM_00532]、[SWS_DM_00536])和DiagUdsNrcException([SWS_DM_00528])进行映射。 - 服务提供错误:若端口接口的激活或停用失败,则由
DiagOfferErrorDomain([SWS_DM_00992]、[SWS_DM_01003])及DiagOfferException([SWS_DM_00986])生效。 - 事件与 Monitor 报告错误:Monitor 状态报告期间的错误由
DiagReportingErrorDomain([SWS_DM_00999]、[SWS_DM_01004])和DiagReportingException([SWS_DM_00988])指示。 - SOVD 协议错误:REST 端点、JSON 内容或访问控制中的错误通过
DiagSovdErrorDomain([SWS_DM_01812]、[SWS_DM_01816])和DiagSovdException([SWS_DM_01808])进行报告。
在传输层级别,传输中止、缓冲区溢出或连接中断通过回调 NotifyMessageFailure() 报告给 Diagnostic Management([SWS_DM_00310])。这使该模块能够立即释放已分配的资源,并在必要时向测试仪发送否定响应消息。
类图:Diagnostic Management 中的错误域架构以及标准化异常和错误码的分配。来源:[SWS_DM_00520]、[SWS_DM_00532]、[SWS_DM_00992]、[SWS_DM_00999]、[SWS_DM_01812]
进一步详细证据
模块 diag 的规范基础基于 AUTOSAR Adaptive Platform 的三个核心规范文档:
- 接口与组件架构:系统接口、守护进程模型以及传输层与应用层的分离在
AUTOSAR_AP_EXP_SWArchitecture中规定(AUTOSAR_AP_EXP_SWArchitecture 第150页、AUTOSAR_AP_EXP_SWArchitecture 第164页、AUTOSAR_AP_EXP_SWArchitecture 第168页)。 - Diagnostic Management 规范:详细的 API 签名、请求处理的时序流程、传输处理器生命周期和去抖规则由
AUTOSAR_SWS_Diagnostics定义(AUTOSAR_SWS_Diagnostics 第128页、AUTOSAR_SWS_Diagnostics 第130页、SWS_Diagnostics 第225页)。 - Manifest 与元模型定义:端口接口、校验逻辑和服务映射到软件组件的声明式绑定由
AUTOSAR_AP_TPS_ManifestSpecification规定(AUTOSAR_AP_TPS_ManifestSpecification 第311页、AUTOSAR_AP_TPS_ManifestSpecification 第321页、AUTOSAR_AP_TPS_ManifestSpecification 第341页)。
本模块指南基于适用于 Release R25-11 的 AUTOSAR Adaptive 规范生成。所有规范性要求均来自所引用的 SWS 和架构文档。
function: 755 variable: 102 class: 79 type alias: 45 struct: 39 enumeration: 35
<ExtendedDataRecord-Namespace>
<ExtendedDataRecordElementInterface><RoutineInterface>UdsMessageUdsTransportProtocolHandlerUdsTransportProtocolMgrUdsTransportProtocolPeriodicHandlerByteSpanChannelIDUdsMessageConstPtrUdsMessagePtrUdsTransportProtocolHandlerIDAuthenticationCancellationHandlerClientAuthenticationClientAuthenticationHandleCommunicationControlConditionConversationCounterBasedDataIdentifierConcurrencyTypeDataTransferReadByPullHandlerDataTransferReadByPushHandlerDataTransferReadSessionDataTransferReadSharedDataHandlerDataTransferWriteHandlerDataTransferWriteSessionDiagErrorDomainDiagExceptionDiagnosticServiceDynamicAccessListDiagnosticSovdArrayContentElementDataConstIteratorDiagnosticSovdArrayContentElementDataConstViewDiagnosticSovdArrayContentElementDataIteratorDiagnosticSovdArrayContentElementDataViewDiagnosticSovdContentDataDiagnosticSovdContentElementDataDiagnosticSovdContentElementDataWithKeyDiagnosticSovdRecordContentElementDataConstIteratorDiagnosticSovdRecordContentElementDataConstViewDiagnosticSovdRecordContentElementDataIteratorDiagnosticSovdRecordContentElementDataViewDiagOfferErrorDomainDiagOfferExceptionDiagReportingErrorDomainDiagReportingExceptionDiagSovdErrorDomainDiagSovdExceptionDiagUdsNrcErrorDomainDiagUdsNrcExceptionDoIPActivationLineDoIPEntityIdentificationDoIPGroupIdentificationDoIPPowerModeDoIPTriggerVehicleAnnouncementDownloadServiceDTCInformationDynamicAccessListDiagServiceBuilderEcuResetRequestEventEventStatusByteExternalAuthenticationFileTransferServiceGenericDataIdentifierGenericDiagnosticSovdContentGenericDiagnosticSovdOperationGenericRoutineGenericUDSServiceHttpRedirectIndicatorMetaInfoMonitorMultipleConditionMultipleEventMultipleMonitorOperationCycleReleaseHandlerSecurityAccessServiceValidationSovdAuthorizationSovdBulkDataSovdConfigurationSovdContentConcurrencyTypeSovdOperationExecutionSovdProximityChallengeSovdProximityChallengeTypeSovdServiceValidationSovdSwUpdateTimeBasedTransmitCertificateUploadServiceGetDiagDomainGetDiagOfferDomainGetDiagReportingDomainGetDiagSovdErrorDomainGetDiagUdsNrcDomainMakeErrorCodeActivityStatusTypeConcurrencyTypeConditionTypeConfirmationStatusTypeControlDtcStatusTypeDataTransferExitTypeDebouncingStateDiagErrcDiagnosticSovdContentElementDataTypeDiagnosticSovdPrimitiveContentValueTypeDiagOfferErrcDiagReportingErrcDiagSovdErrcDiagUdsNrcErrcDTCFormatTypeEventStatusBitIndicatorStatusTypeInitMonitorReasonKeyCompareResultTypeMonitorActionOperationExecutionCapabilityOperationExecutionStatusPowerModeTypeProximityChallengeResultTypeSovdRequestMethodSovdUpdatePhaseSovdUpdateStatusTerminateOperationExecutionReasonUdsDtcStatusBitTypeConditionHandleTypeEventHandleTypeEventStatusByteNotifierInitMonitorNotifierMonitorHandleTypeProximityChallengeValidationResultTypeResetRequestTypeSecurityLevelTypeSessionControlTypekCustomResetkDefaultSessionkExtendedDiagnosticSessionkHardResetkKeyOffOnResetkLockedkProgrammingSessionkSafetySystemDiagnosticSessionkSoftReset类
<DataElementInterface><DataIdentifierInterface><ExtendedDataRecordElementInterface><RoutineInterface>AuthenticationCancellationHandlerClientAuthenticationClientAuthenticationHandleCommunicationControlConditionConversationCounterBasedDataIdentifierConcurrencyTypeDataTransferReadByPullHandlerDataTransferReadByPushHandlerDataTransferReadSessionDataTransferReadSharedDataHandlerDataTransferWriteHandlerDataTransferWriteSessionDiagErrorDomainDiagExceptionDiagnosticServiceDynamicAccessListDiagnosticSovdArrayContentElementDataConstIteratorDiagnosticSovdArrayContentElementDataConstViewDiagnosticSovdArrayContentElementDataIteratorDiagnosticSovdArrayContentElementDataViewDiagnosticSovdContentDataDiagnosticSovdContentElementDataDiagnosticSovdContentElementDataWithKeyDiagnosticSovdRecordContentElementDataConstIteratorDiagnosticSovdRecordContentElementDataConstViewDiagnosticSovdRecordContentElementDataIteratorDiagnosticSovdRecordContentElementDataViewDiagOfferErrorDomainDiagOfferExceptionDiagReportingErrorDomainDiagReportingExceptionDiagSovdErrorDomainDiagSovdExceptionDiagUdsNrcErrorDomainDiagUdsNrcExceptionDoIPActivationLineDoIPEntityIdentificationDoIPGroupIdentificationDoIPPowerModeDoIPTriggerVehicleAnnouncementDownloadServiceDTCInformationDynamicAccessListDiagServiceBuilderEcuResetRequestEventEventStatusByteExternalAuthenticationFileTransferServiceGenericDataIdentifierGenericDiagnosticSovdContentGenericDiagnosticSovdOperationGenericRoutineGenericUDSServiceHttpRedirectIndicatorMetaInfoMonitorMultipleConditionMultipleEventMultipleMonitorOperationCycleReleaseHandlerSecurityAccessServiceValidationSovdAuthorizationSovdBulkDataSovdConfigurationSovdContentConcurrencyTypeSovdOperationExecutionSovdProximityChallengeSovdProximityChallengeTypeSovdServiceValidationSovdSwUpdateTimeBasedTransmitCertificateUdsMessageUdsTransportProtocolHandlerUdsTransportProtocolMgrUdsTransportProtocolPeriodicHandlerUploadService函数
GetDiagDomainGetDiagOfferDomainGetDiagReportingDomainGetDiagSovdErrorDomainGetDiagUdsNrcDomainMakeErrorCode类型
ByteSpanChannelIDConditionHandleTypeEventHandleTypeEventStatusByteNotifierInitMonitorNotifierMonitorHandleTypeProximityChallengeValidationResultTypeResetRequestTypeSecurityLevelTypeSessionControlTypeUdsMessageConstPtrUdsMessagePtrUdsTransportProtocolHandlerID枚举
ActivityStatusTypeConcurrencyTypeConditionTypeConfirmationStatusTypeControlDtcStatusTypeDataTransferExitTypeDebouncingStateDiagErrcDiagnosticSovdContentElementDataTypeDiagnosticSovdPrimitiveContentValueTypeDiagOfferErrcDiagReportingErrcDiagSovdErrcDiagUdsNrcErrcDTCFormatTypeEventStatusBitIndicatorStatusTypeInitMonitorReasonKeyCompareResultTypeMonitorActionOperationExecutionCapabilityOperationExecutionStatusPowerModeTypeProximityChallengeResultTypeSovdRequestMethodSovdUpdatePhaseSovdUpdateStatusTerminateOperationExecutionReasonUdsDtcStatusBitType常量
kCustomResetkDefaultSessionkExtendedDiagnosticSessionkHardResetkKeyOffOnResetkLockedkProgrammingSessionkSafetySystemDiagnosticSessionkSoftReset主题图
ara::diag
131此版本没有元素数据
<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.
This is the type of ByteSpan.
using ByteSpan = ara::core::Span<ara::core::Byte>;This is the identification of channel on which to transmit.
using ChannelID = std::uint32_t;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*)>>;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 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.
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;Create a new ErrorCode for DiagErrorDomain with the given support data type.
重载 MakeErrorCode 5
constexpr ara::core::ErrorCode MakeErrorCode (DiagErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept; SWS_DM_00525constexpr ara::core::ErrorCode MakeErrorCode (DiagUdsNrcErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept; SWS_DM_00537constexpr ara::core::ErrorCode MakeErrorCode (DiagOfferErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept; SWS_DM_01005constexpr ara::core::ErrorCode MakeErrorCode (DiagReportingErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept; SWS_DM_01006constexpr ara::core::ErrorCode MakeErrorCode (DiagSovdErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept; SWS_DM_01817Type 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 {...};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 {...};Type to identify a condition.
using ConditionHandleType = std::uint8_t;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)>;Notifier function which is called if the monitor needs to be re-initialized.
using InitMonitorNotifier = std::function<void(InitMonitorReason)>;Type to identify an monitor .
using MonitorHandleType = std::uint32_t;This is the type of ProximityChallengeValidationResultType.
using ProximityChallengeValidationResultType = ProximityChallenge ResultType;The type of the requested reset.
using ResetRequestType = std::uint8_t;Type for the active security level. .
using SecurityLevelType = std::uint8_t;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;HardReset.
constexpr ResetRequestType kHardReset = 1;KeyOffOnReset.
constexpr ResetRequestType kKeyOffOnReset = 2;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;SoftReset.
constexpr ResetRequestType kSoftReset = 0;命名空间
- <DataElement-Namespace> 1 Klassen, 0 freie Funktionen
- <DataIdentifier-Namespace> 1 Klassen, 0 freie Funktionen
- <ExtendedDataRecord-Namespace> 1 Klassen, 0 freie Funktionen
- <RoutineInterface-Namespace> 1 Klassen, 0 freie Funktionen
- apext::diag::uds_transport 4 Klassen, 0 freie Funktionen
- ara::diag 78 Klassen, 10 freie Funktionen
模块的 UML 类图
Abgerundete Rahmen = Namespaces; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = modulfremde bzw. externe Basisklassen. Klicken öffnet die Klassenseite.
gemini-3.8-flash-low· 2026-10-13 · 德文原文