DEENESPTFRRUARHIKOZHNL

类 ara::diag::ServiceValidation

[SWS_DM_00771] Upstream: RS_Diag_04199

class ServiceValidation {...};

DiagnosticServiceValidationInterface.

Header-Datei#include "ara/diag/service_validation.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopenamespace ara::diag

用户指南人工智能生成

在 Diagnostic Management 中根据制造商或供应商检查验证传入的诊断请求。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: f91c31f76f32 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

在 Diagnostic Management 中根据制造商或供应商检查验证传入的诊断请求。

类 ara::diag::ServiceValidation 用于在 Diagnostic Management 中根据制造商或供应商标准对传入的 UDS 诊断请求进行特定于应用的验证 [SWS_DM_00772]。创建后必须通过 Offer() 激活该服务,以便将请求数据异步转发至 Validate() 进行检查,随后通过 Confirmation() 进行确认 [SWS_DM_00776]。作为一个重要的约束条件,该实例绑定到一个端口,不可拷贝也不可移动,且除构造函数外均非线程安全。

上下文

类 ara::diag::ServiceValidation 为 AUTOSAR Adaptive 诊断栈内的建模元素 DiagnosticServiceValidationInterface 提供编程接口。应用程序可以通过该接口为传入的诊断请求实现特定于应用的检查。该实例直接与 Diagnostic Management (DM) 交互,DM 被授权将传入的诊断请求转发给验证逻辑 [SWS_DM_00776]。

验证的功能归属通过建模属性 DiagnosticServiceValidationMapping.category 进行控制。根据此类别,验证方法 Validate() 在符合 ISO 14229-1(第 8.7 章)的 UDS 响应规则框架内,在制造商检查(“Manufacturer Check”)或供应商检查(“Supplier Check”)的上下文中被调用 [SWS_DM_00772]。DM 可能会在实际服务执行之前对传入的请求消息执行此验证检查,以便及早过滤掉不允许的请求。 问题 Q-d84302d27d940634 (未决)

生命周期

创建通过构造函数显式进行,并指定一个 ara::core::InstanceSpecifier,该标识符必须引用在系统模型中定义的 PortPrototype [SWS_DM_00772]。ara::diag::ServiceValidation 被设计为不可拷贝且不可移动的单一实例:拷贝构造函数 [SWS_DM_01689]、移动构造函数 [SWS_DM_01690] 以及拷贝赋值运算符 [SWS_DM_01687] 和移动赋值运算符 [SWS_DM_01688] 均被声明为已删除(=delete)。

初始化后,对象处于静止状态。只有通过调用 Offer(),才会启用从 DM 到处理程序的诊断请求转发 [SWS_DM_00776]。服务提供可以在运行期间通过 StopOffer() 终止,从而使 DM 再次停用转发 [SWS_DM_00777]。资源的释放通过虚析构函数 ~ServiceValidation() [SWS_DM_00773] 进行。

在并发性方面,仅构造函数被指定为线程安全 [SWS_DM_00772]。方法 Offer() [SWS_DM_00776]、StopOffer() [SWS_DM_00777]、Validate() [SWS_DM_00774]、Confirmation() [SWS_DM_00775] 以及析构函数 [SWS_DM_00773] 被归类为非线程安全,但具备异常安全性(noexcept)。

使用路径

具体的验证逻辑大概由应用程序通过派生 ara::diag::ServiceValidation 并重写虚接口方法来提供。 问题 Q-84efdab7839212b5 (未决)典型的操作流程分为以下阶段:

  1. 实例化:创建实例并传入引用已配置端口的 InstanceSpecifier [SWS_DM_00772]。
  2. 服务提供:调用 Offer() 以激活 DM 对请求的转发 [SWS_DM_00776]。
  3. 验证:对于每个传入的诊断请求,DM 都会调用方法 Validate() [SWS_DM_00774]。原始数据(包括服务标识符 SID)作为 ara::core::Span<const std::uint8_t> 传入,同时传入请求的 MetaInfo [SWS_DM_00774]。数据保持有效,直到返回的 ara::core::Future<void> 被满足或处理被取消处理程序中止 [SWS_DM_00774]。
  4. 确认:一旦诊断请求的处理完成,DM 就会通过方法 Confirmation() 通知处理程序,并传入结果状态(ConfirmationStatusType)和 MetaInfo [SWS_DM_00775]。
  5. 停用:通过 StopOffer() 终止请求处理 [SWS_DM_00777]。
诊断请求的验证与确认流程应用ServiceValidation诊断管理Offer()Registrierung aktivierenValidate(requestData, metaInfo)检查数据与 MetaInfoaltValidierung erfolgreichFuture<void> (Erfolg)Validierung fehlgeschlagenFuture<void> (DiagUdsNrcErrc)Confirmation(status, metaInfo)StopOffer()Registrierung deaktivieren

时序图:用于验证和确认诊断请求的调用序列。来源:[SWS_DM_00772]、[SWS_DM_00774]、[SWS_DM_00775]、[SWS_DM_00776]、[SWS_DM_00777]。

错误场景

错误条件既会在构造期间的静态配置检查中发生,也会在运行时发生:

  • 构造违例:构造函数将特定的建模错误作为违例(Violations)报告 [SWS_DM_00772]:
    • InstanceSpecifierMappingIntegrityViolation:该标识符在 Executable 上下文中无法解析,或者未引用 PortPrototype [SWS_DM_00772]。
    • PortInterfaceMappingViolation:所引用的 PortPrototype 未由 DiagnosticServiceValidationInterface 定型 [SWS_DM_00772]。
    • ProcessMappingViolation:针对该进程不存在匹配的已建模 Process [SWS_DM_00772]。
    • InstanceSpecifierAlreadyInUseViolation:该 InstanceSpecifier 在运行中的进程中已被另一个实例使用 [SWS_DM_00772]。
  • 服务提供:如果在服务已处于主动提供状态时调用 Offer(),返回值 ara::core::Result<void> 将返回错误码 DiagOfferErrc::kAlreadyOffered [SWS_DM_00776]。
  • 验证错误:如果对请求的内容检查失败,应用程序通过返回的 ara::core::Future<void> 并借助 DiagUdsNrcErrc 设置来自 ISO 14229-1 的相应否定响应码(NRC)来指示拒绝 [SWS_DM_00774]。

本指南基于针对 diag 模块的 AUTOSAR Adaptive 规范 R25-11。

成员图

类图

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__diag__ServiceValidation871 ServiceValidation + ServiceValidation() + operator=() + ~ServiceValidation() + Confirmation() + Offer() + StopOffer() + Validate()

详细视图

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

构造函数和析构函数

Constructor of ServiceValidation. Depending on value of attribute DiagnosticServiceValidationMapping.category, the Validate is either called in the context of the NRC sequence in chapter 8.7 response implementation rules from UDS ISO 14229-1 as a Manufacturer or a Supplier Check.

重载 ServiceValidation 3
explicit ServiceValidation (const ara::core::InstanceSpecifier &specifier) noexcept; SWS_DM_00772
ServiceValidation (ServiceValidation &)=delete; SWS_DM_01689
ServiceValidation (ServiceValidation &&)=delete; SWS_DM_01690

Destructor of ServiceValidation .

virtual ~ServiceValidation () noexcept;

方法

This method is called, when a diagnostic request has been finished, to notify about the outcome.

virtual void Confirmation (ConfirmationStatusType status, const Meta Info &metaInfo) noexcept;
Offer 函数

This Offer will enable the DM to forward request messages to this handler.

ara::core::Result< void > Offer () noexcept;
StopOffer 函数

This StopOffer will disable the forwarding of request messages from DM.

void StopOffer () noexcept;
Validate 函数

Called for any request message.

virtual ara::core::Future< void > Validate (ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo) noexcept;

运算符

operator= 函数 2

ServiceValidation shall be a single not assignable instance.

重载 = 2

方法文档

函数 Confirmation [SWS_DM_00775] Upstream: RS_AP_00138, RS_Diag_04170, RS_Diag_04199

virtual void Confirmation (ConfirmationStatusType status, const Meta Info &metaInfo) noexcept;

This method is called, when a diagnostic request has been finished, to notify about the outcome.

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

接口 ara::diag::ServiceValidation 的方法 Confirmation([SWS_DM_00775],在 ara/diag/service_validation.h 中声明)用作对先前处理的诊断请求的完成和结果的通知。

用法与语义

虚回调函数在请求处理完成后由 Diagnostic Management 同步调用。它没有返回值(void)并接收两个形参([SWS_DM_00775]):

  • status(ConfirmationStatusType):指示服务处理的最终状态或结果([SWS_DM_00775])。
  • metaInfo(const Meta Info &):包含诊断请求的相关元信息([SWS_DM_00775])。

错误处理与并发

该函数被指定为异常安全(exception safe)并以标识符 noexcept 声明([SWS_DM_00775])。因此,应用端重写不得向外传播异常。未为此方法定义特定错误码(如 DET 或 DEM 消息)。在并发性方面,Confirmation 被归类为非线程安全(not thread-safe)([SWS_DM_00775]);在并行流程中,在回调内访问应用内部状态需要进行相应同步。

相互作用

触发通知与诊断请求的生命周期结束相关联([SWS_DM_00775])。一旦发送或抑制了肯定或否定响应,该周期即告完成(AUTOSAR_AP_SWS_Diagnostics §7.3.2.1.2 “Life-cycle of a Diagnostic Conversation”)。Interpretation:在模块级别,Diagnostic Management 可能会在通过传输层使用 TransmitConfirmation 确认传输且结果为 kTransmitOk 或 kTransmitFailed 之后,才触发回调 Confirmation([SWS_DM_00307],[SWS_DM_00351])。 问题 Q-97c38586ef5e3704 (未决)

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

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

Header-Datei#include "ara/diag/service_validation.h"
Scopeclass ara::diag::ServiceValidation
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
statusstatus/outcome of the service processing.
metaInfoMetaInfo of the request.

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_DM_00775
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00775@rel:R25-11#c17e5590
Content hash
c17e5590
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00775
Status: valid/unmigrated Version: rel:R25-11#bbcfd2e3 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00775@rel:R25-11#bbcfd2e3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#044090102026-09-30
  • R19-11rel:R19-11#20a5939d2026-10-14
  • R20-11rel:R20-11#761e125d2026-10-14
  • R21-11rel:R21-11#761e125d2026-10-14
  • R22-11rel:R22-11#991a58222026-10-14
  • R23-11rel:R23-11#a506b4142026-10-14
  • R24-11rel:R24-11#5339f3712026-10-14
  • R25-11rel:R25-11#bbcfd2e32026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 Offer [SWS_DM_00776] Upstream: RS_AP_00119, RS_AP_00139, RS_Diag_04199

ara::core::Result< void > Offer () noexcept;

This Offer will enable the DM to forward request messages to this handler.

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

使用

类 ara::diag::ServiceValidation 的成员函数 Offer(头文件 ara/diag/service_validation.h)激活 Diagnostic Manager (DM) 向该特定验证处理程序转发传入诊断请求 [SWS_DM_00776]。该调用同步进行,且不带传入参数,签名通过 ara::core::Result<void> Offer() noexcept; [SWS_DM_00776] 定义。返回值是一个 ara::core::Result<void>,在成功时为空,在发生错误时封装所发生的错误码 [SWS_DM_00776]。

错误处理

如果注册失败,该方法将返回错误的 Result。如果该服务先前已针对该实例提供,则返回错误码 DiagOfferErrc::kAlreadyOffered [SWS_DM_00776]。此处适用回滚语义,以便该实例先前的状态保持不变 [SWS_DM_00776]。

并发性与限制

该函数被指定为异常安全(exception safe),但明确指定为非线程安全(not thread-safe)[SWS_DM_00776]。对同一实例的并行访问必须由调用方应用程序进行协调。关于顺序,必须先调用 Offer,然后 Diagnostic Manager 才能转发服务请求以进行验证 [SWS_DM_00776]。

相互作用

通过 Offer 提供接口是 AUTOSAR Adaptive 诊断的一致设计模式,并在例程([SWS_DM_00557],[SWS_DM_00594])、通用 UDS 服务([SWS_DM_00619])、DoIP 功能([SWS_DM_00725],[SWS_DM_00735])以及安全访问([SWS_DM_00766])等中类似地使用。只要接口尚未通过 Offer 提供,DM 就会丢弃请求或采用定义的替代值([SWS_DM_01525],[SWS_DM_01527])。与 ara::com 的术语相似性源于功能动机,但代表了诊断的独立实现(AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”)。

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

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

Header-Datei#include "ara/diag/service_validation.h"
Scopeclass ara::diag::ServiceValidation
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns nothing or an error

Fehler

FehlercodeBeschreibung
DiagOfferErrc::kAlreadyOfferedrollback_semantics The service is already offered.

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

Record
AUTOSAR/AP/record/SWS_DM_00776
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00776@rel:R25-11#efb87a73
Content hash
efb87a73
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00776
Status: valid/unmigrated Version: rel:R25-11#98f79358 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00776@rel:R25-11#98f79358
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f679147c2026-09-30
  • R19-11rel:R19-11#1c84ea4d2026-10-14
  • R20-11rel:R20-11#cea448532026-10-14
  • R21-11rel:R21-11#bcd37d0f2026-10-14
  • R22-11rel:R22-11#c7eb78232026-10-14
  • R23-11rel:R23-11#3732217c2026-10-14
  • R24-11rel:R24-11#d9522beb2026-10-14
  • R25-11rel:R25-11#98f793582026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 ServiceValidation [SWS_DM_00772] Upstream: RS_AP_00137, RS_Diag_04199, RS_AP_00170, RS_AP_00171, RS_AP_00172, RS_AP_00173

explicit ServiceValidation (const ara::core::InstanceSpecifier &specifier) noexcept;

Constructor of ServiceValidation. Depending on value of attribute DiagnosticServiceValidationMapping.category, the Validate is either called in the context of the NRC sequence in chapter 8.7 response implementation rules from UDS ISO 14229-1 as a Manufacturer or a Supplier Check.

Header-Datei#include "ara/diag/service_validation.h"
Scopeclass ara::diag::ServiceValidation
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)InstanceSpeci- InstanceSpecifier either cannot be resolved in the model in the fierMappingIn- context of your executable, or it refers to a model element other tegrityViolation than a PortPrototype. PortInterfaceMap- A PortPrototype that is referenced by a pingViolation DiagnosticServiceValidationMapping needs to be typed by a DiagnosticServiceValidationInterface. ProcessMappingVio- Matching InstanceRef exists, but no matching (modelled) Process lation found that matches the (runtime) process. InstanceSpecifier- Violation message that is sent in case a constructor in the ara AlreadyInUseViola- framework was called with an InstanceSpecifier already in use in tion this process.

Parameter (in)

ParameterBeschreibung
specifierInstanceSpecifier to a PortPrototype of a DiagnosticServiceValidationInterface

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

Record
AUTOSAR/AP/record/SWS_DM_00772
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00772@rel:R25-11#62fe33a7
Content hash
62fe33a7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00772
Status: valid/unmigrated Version: rel:R25-11#551e2d84 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00772@rel:R25-11#551e2d84
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#db1a817b2026-09-30
  • R19-11rel:R19-11#8ba9fe932026-10-14
  • R20-11rel:R20-11#12b557df2026-10-14
  • R21-11rel:R21-11#1f0371f52026-10-14
  • R22-11rel:R22-11#f49056232026-10-14
  • R23-11rel:R23-11#6c563b032026-10-14
  • R24-11rel:R24-11#f8f0ab112026-10-14
  • R25-11rel:R25-11#551e2d842026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 ServiceValidation [SWS_DM_01689] Upstream: RS_AP_00147

ServiceValidation (ServiceValidation &)=delete;

ServiceValidation shall be a single not copy-able instance.

Header-Datei#include "ara/diag/service_validation.h"
Scopeclass ara::diag::ServiceValidation

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

Record
AUTOSAR/AP/record/SWS_DM_01689
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01689@rel:R25-11#69ed22e5
Content hash
69ed22e5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01689
Status: valid/unmigrated Version: rel:R25-11#d48785a6 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01689@rel:R25-11#d48785a6
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#614925122026-09-30
  • R23-11rel:R23-11#428fd8c92026-10-14
  • R24-11rel:R24-11#d48785a62026-10-14
  • R25-11rel:R25-11#d48785a62026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 ServiceValidation [SWS_DM_01690] Upstream: RS_AP_00147

ServiceValidation (ServiceValidation &&)=delete;

Move constructor of ServiceValidation.

Header-Datei#include "ara/diag/service_validation.h"
Scopeclass ara::diag::ServiceValidation

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

Record
AUTOSAR/AP/record/SWS_DM_01690
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01690@rel:R25-11#f96b843a
Content hash
f96b843a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01690
Status: valid/unmigrated Version: rel:R25-11#e4fdb290 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01690@rel:R25-11#e4fdb290
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#52b974e02026-09-30
  • R23-11rel:R23-11#646ef28b2026-10-14
  • R24-11rel:R24-11#e4fdb2902026-10-14
  • R25-11rel:R25-11#e4fdb2902026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 StopOffer [SWS_DM_00777] Upstream: RS_Diag_04199

void StopOffer () noexcept;

This StopOffer will disable the forwarding of request messages from DM.

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

使用

类 ara::diag::ServiceValidation(头文件 ara/diag/service_validation.h)的方法 StopOffer() 用于停用将 Diagnostic Management(DM)传入的请求消息转发至服务验证实例 [SWS_DM_00777]。调用以同步方式进行,不接受任何传入参数,且不提供返回值 [SWS_DM_00777]。

错误处理与并发

该函数声明为 noexcept,并被视为异常安全(exception safe),因此在执行时不会发生 C++ 异常 [SWS_DM_00777]。针对该调用,未定义特定的错误码或向错误管理器的反馈 [SWS_DM_00777]。

在并发性方面,该方法被指定为非线程安全(not thread-safe)[SWS_DM_00777]。解读:调用方应用程序必须确保对 StopOffer() 的同一实例的并发调用得到同步,以避免数据不一致。 问题 Q-dde3c015d30a9db1 (未决)

相互作用

通过 Offer() 和 StopOffer() 提供和收回接口借鉴了已知的 ara::com 语义,但在诊断领域代表了一项独立的功能 AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”。停用来自 DM 的请求转发模式在标准中一致地应用于其他诊断处理程序,例如身份验证服务 [SWS_DM_01131]、通信控制 [SWS_DM_00810]、下载服务 [SWS_DM_00793] 以及 ECU 复位请求 [SWS_DM_01017]。

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

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

Header-Datei#include "ara/diag/service_validation.h"
Scopeclass ara::diag::ServiceValidation
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_DM_00777
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00777@rel:R25-11#3a384e03
Content hash
3a384e03
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00777
Status: valid/unmigrated Version: rel:R25-11#809ce59e Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00777@rel:R25-11#809ce59e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ecbd75f12026-09-30
  • R19-11rel:R19-11#988e9cc52026-10-14
  • R20-11rel:R20-11#556e7ce62026-10-14
  • R21-11rel:R21-11#ee572f802026-10-14
  • R22-11rel:R22-11#db0a3b992026-10-14
  • R23-11rel:R23-11#c1a089312026-10-14
  • R24-11rel:R24-11#1b0c9f462026-10-14
  • R25-11rel:R25-11#809ce59e2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 Validate [SWS_DM_00774] Upstream: RS_AP_00138, RS_Diag_04170, RS_Diag_04199, RS_AP_00119

virtual ara::core::Future< void > Validate (ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo) noexcept;

Called for any request message.

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

使用

虚方法 ara::diag::ServiceValidation::Validate 会针对每个传入的诊断请求消息被调用 [SWS_DM_00774]。Diagnostic Server(DM)通过它执行已配置的、符合 ISO 14229-1 的制造商特定 [SWS_DM_01252] 以及供应商特定服务检查 [SWS_DM_01253]。归属于制造商还是供应商检查取决于构造函数中的建模 [SWS_DM_00772]。

该函数通过 requestData 接收包含服务标识符(SID)的诊断数据,并通过 metaInfo 接收元信息 [SWS_DM_00774]。缓冲区 requestData 保持有效,直到返回的 ara::core::Future<void> 通过关联的 Promise 被满足或执行被取消 [SWS_DM_00774]。如果验证成功完成且无错误,Diagnostic Server 将根据 ISO 14229-1 继续处理该请求 [SWS_DM_01254]。

错误处理与边界条件

如果检查失败,则必须通过 DiagUdsNrcErrc 返回符合 ISO 14229-1 的合适 NRC [SWS_DM_00774]。如果 Validate 返回错误 kNoProcessingNoResponse,则 Diagnostic Server 实例将直接丢弃该消息而不再作进一步响应 [SWS_DM_00860]。

在并发性方面,Validate 被指定为异常安全(exception safe),但非线程安全(not thread-safe)[SWS_DM_00774]。解读:由于该函数非线程安全,Diagnostic Server 可能会对同一实例的调用进行序列化,或排除并发访问。 问题 Q-e150c15ad709602c (未决)调用上下文由 ISO 14229-1 的 NRC 序列在实际服务执行之前确定 [SWS_DM_00772]。

本使用说明是基于 AUTOSAR Adaptive 规范 R25-11 自动创建的。

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

Header-Datei#include "ara/diag/service_validation.h"
Scopeclass ara::diag::ServiceValidation
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
requestDataDiagnostic request data (including SID). Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler.
metaInfoMetaInfo of the request.

Rückgabewert

TypBeschreibung
ara::core::Future< void >Returns nothing or an error

Fehler

FehlercodeBeschreibung
Please use an applicable NRC, as defined in ISO 14229-1, using DiagUdsNrcErrc.

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

Record
AUTOSAR/AP/record/SWS_DM_00774
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00774@rel:R25-11#2dc4618e
Content hash
2dc4618e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00774
Status: valid/unmigrated Version: rel:R25-11#697b56ca Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00774@rel:R25-11#697b56ca
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#97b264c92026-09-30
  • R19-11rel:R19-11#7333f5562026-10-14
  • R20-11rel:R20-11#5a132c282026-10-14
  • R21-11rel:R21-11#59f85a3b2026-10-14
  • R22-11rel:R22-11#43a758b42026-10-14
  • R23-11rel:R23-11#05e1af662026-10-14
  • R24-11rel:R24-11#8a3b62802026-10-14
  • R25-11rel:R25-11#697b56ca2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 operator= [SWS_DM_01687] Upstream: RS_AP_00147

ServiceValidation & operator= (ServiceValidation &)=delete;

ServiceValidation shall be a single not assignable instance.

Header-Datei#include "ara/diag/service_validation.h"
Scopeclass ara::diag::ServiceValidation

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

Record
AUTOSAR/AP/record/SWS_DM_01687
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01687@rel:R25-11#786fa3ad
Content hash
786fa3ad
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01687
Status: valid/unmigrated Version: rel:R25-11#4d0e8e99 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01687@rel:R25-11#4d0e8e99
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#cca774bf2026-09-30
  • R23-11rel:R23-11#b0b3cfec2026-10-14
  • R24-11rel:R24-11#4d0e8e992026-10-14
  • R25-11rel:R25-11#4d0e8e992026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 operator= [SWS_DM_01688] Upstream: RS_AP_00147

ServiceValidation & operator= (ServiceValidation &&)=delete;

Move assignment operator of ServiceValidation.

Header-Datei#include "ara/diag/service_validation.h"
Scopeclass ara::diag::ServiceValidation

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

Record
AUTOSAR/AP/record/SWS_DM_01688
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01688@rel:R25-11#4e36b9e7
Content hash
4e36b9e7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01688
Status: valid/unmigrated Version: rel:R25-11#1b73524b Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01688@rel:R25-11#1b73524b
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#070b54192026-09-30
  • R23-11rel:R23-11#451c17372026-10-14
  • R24-11rel:R24-11#1b73524b2026-10-14
  • R25-11rel:R25-11#1b73524b2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 ~ServiceValidation [SWS_DM_00773] Upstream: RS_AP_00134, RS_Diag_04199

virtual ~ServiceValidation () noexcept;

Destructor of ServiceValidation .

Header-Datei#include "ara/diag/service_validation.h"
Scopeclass ara::diag::ServiceValidation
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_00773
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00773@rel:R25-11#34d766ef
Content hash
34d766ef
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00773
Status: valid/unmigrated Version: rel:R25-11#ef75a44c Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00773@rel:R25-11#ef75a44c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#6c06b72e2026-09-30
  • R19-11rel:R19-11#7fc7f8282026-10-14
  • R20-11rel:R20-11#c80e4a8e2026-10-14
  • R21-11rel:R21-11#c80e4a8e2026-10-14
  • R22-11rel:R22-11#af4050602026-10-14
  • R23-11rel:R23-11#bfb288b52026-10-14
  • R24-11rel:R24-11#ef75a44c2026-10-14
  • R25-11rel:R25-11#ef75a44c2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill