DEENESPTFRRUARHIKOZHNL

类 ara::diag::DoIPEntityIdentification

[SWS_DM_01362] Upstream: RS_Diag_00026

class DoIPEntityIdentification {...};

DoIPEntityIdentification class to obtain the EID if required.

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

用户指南人工智能生成

使自适应应用程序能够为诊断管理提供 DoIP 实体标识。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 73f8b2cf1d2e 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使自适应应用程序能够为诊断管理提供 DoIP 实体标识。

类 ara::diag::DoIPEntityIdentification 使自适应应用程序能够动态地为 DoIP 诊断协议提供实体标识(EID)[SWS_DM_01361]。实例化后,应用程序使用 Offer() 激活转发,并通过纯虚方法 GetEntityId() 使用 Future 异步响应 Diagnostic Management 的查询 [SWS_DM_01366]、[SWS_DM_01367]。如果在查询时该接口尚未提供,则诊断管理会替代地发送一个标准化的 0xFF 值 [SWS_DM_01528]。

上下文

类 ara::diag::DoIPEntityIdentification 用于为 DoIP 协议(Diagnostic over IP)动态提供实体标识(EID)[SWS_DM_01361]。在 AUTOSAR Adaptive 环境中,它构成了单个自适应应用程序与 Diagnostic Management(DM)之间的功能桥梁 AUTOSAR_AP_SWS_Diagnostics, 第107页。如果配置中的 DoIpNetworkConfiguration.eidRetrieval 设置为模式 DoIpEidRetrievalEnum.eidUseApi,则 Diagnostic Management 通过此编程接口请求 EID [SWS_DM_01361]。与软件架构的绑定通过指向 DiagnosticDoIPEntityIdentificationInterface 的 PortPrototype 的 ara::core::InstanceSpecifier 进行 [SWS_DM_01364]。

生命周期

创建通过显式构造函数进行,除了 InstanceSpecifier 之外,还向其传递参数 ConcurrencyType(kConcurrent 或 kNotConcurrent)[SWS_DM_01364]。后者指定了后续对该接口的检索是否必须以线程安全的方式处理 [SWS_DM_01364]、[SWS_DM_01366]。构造之后,对象最初保持在非活动状态。通过调用 Offer(),该接口为 Diagnostic Management 启用,并激活向处理程序的请求转发 [SWS_DM_01367]。在对象销毁之前或操作终止时,StopOffer() 会再次阻止转发 [SWS_DM_01368]。销毁最终通过虚析构函数 [SWS_DM_01365] 进行。Offer()、StopOffer() 以及析构函数都不是线程安全的,因此需要在应用程序代码中进行协调同步 [SWS_DM_01365]、[SWS_DM_01367]、[SWS_DM_01368]。

DoIPEntityIdentificationStates NichtBereitgestellt NichtBereitgestellt Bereitgestellt Bereitgestellt NichtBereitgestellt->Bereitgestellt Offer() Bereitgestellt->NichtBereitgestellt StopOffer() Bereitgestellt->Bereitgestellt GetEntityId()

状态图:DoIP 实体标识的生命周期和注册阶段。来源:[SWS_DM_01364]、[SWS_DM_01365]、[SWS_DM_01367]、[SWS_DM_01368]。

使用路径

在典型使用场景中,自适应应用程序从 ara::diag::DoIPEntityIdentification 派生出自己的实现类,并重写纯虚方法 GetEntityId() [SWS_DM_01366]。在用有效标识符实例化后,应用程序使用 Offer() 注册该处理程序 [SWS_DM_01367]。一旦 Diagnostic Management 需要实体 ID 来组装 DoIP 消息,它就会调用 GetEntityId() [SWS_DM_01361]、[SWS_DM_01366]。该方法返回一个 ara::core::Future<EntityId>,由此可以异步确定并提供标识数据 [SWS_DM_01366]。功能操作结束时,应用程序通过 StopOffer() 撤回该 Offer [SWS_DM_01368]。

DoIP Entity-ID 提供流程应用DoIPEntityIdentification诊断管理DoIPEntityIdentification(specifier, concurrencyType)Offer()ara::core::Result<void>Use Case: DoIP 协议中的 EID 查询GetEntityId()GetEntityId()ara::core::Future<EntityId>Use Case: DienstbeendigungStopOffer()

序列图:Diagnostic Management 注册和查询 EID 的典型调用顺序。来源:[SWS_DM_01361]、[SWS_DM_01364]、[SWS_DM_01366]、[SWS_DM_01367]、[SWS_DM_01368]。

错误场景

构造过程中的错误模型配置会导致特定的运行时违规:如果模型中的 InstanceSpecifier 无法解析或未指向 PortPrototype,则会导致 InstanceSpecifierMappingIntegrityViolation [SWS_DM_01364]。如果端口映射未指向 DiagnosticDoIPEntityIdentificationInterface,则存在 PortInterfaceMappingViolation,而缺失进程匹配则会触发 ProcessMappingViolation [SWS_DM_01364]。如果在进程中多次使用相同的标识符,则会导致 InstanceSpecifierAlreadyInUseViolation [SWS_DM_01364]。

如果在服务已处于活动提供状态时调用 Offer(),则该方法将返回带有错误码 DiagOfferErrc::kAlreadyOffered 的 ara::core::Result [SWS_DM_01367]。如果 Diagnostic Management 无法查询 EID——例如因为该接口在请求时尚未被提供——则采用已定义协议回退:Diagnostic Management 在 DoIP 消息中替代发送 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 的 6 字节 EID 值 [SWS_DM_01528]。

本指南由 AI 助手基于 AUTOSAR Adaptive 规范 R25-11 生成。

成员图

类图

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

G nara__diag__DoIPEntityIdentification87 DoIPEntityIdentification + ~DoIPEntityIdentification() + DoIPEntityIdentification() + GetEntityId() + Offer() + StopOffer()

详细视图

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

构造函数和析构函数

Constructor of DoIPEntityIdentification.

explicit DoIPEntityIdentification (const ara::core::InstanceSpecifier &specifier, ConcurrencyType concurrencyType) noexcept;

Destructor of DoIPEntityIdentification.

virtual ~DoIPEntityIdentification () noexcept;

方法

Called to get the EID for the DoIP protocol.

virtual ara::core::Future< EntityId > GetEntityId () noexcept=0;
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;

嵌套类型

方法文档

函数 DoIPEntityIdentification [SWS_DM_01364] Upstream: RS_AP_00137, RS_Diag_00026, RS_AP_00170, RS_AP_00171, RS_AP_00172, RS_AP_00173

explicit DoIPEntityIdentification (const ara::core::InstanceSpecifier &specifier, ConcurrencyType concurrencyType) noexcept;

Constructor of DoIPEntityIdentification.

Header-Datei#include "ara/diag/doip_entity_identification.h"
Scopeclass ara::diag::DoIPEntityIdentification
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 DiagnosticDoIpEntityIdentificationPortMapping needs to be typed by a DiagnosticDoIPEntityIdentificationInterface. 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 DiagnosticDoIPEntityIdentificationInterface.
concurrencyTypeSpecifies if the interface is implemented as thread safe ( kConcurrent) or non-thread safe (kNotConcurrent)..

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

Record
AUTOSAR/AP/record/SWS_DM_01364
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01364@rel:R25-11#29b7b253
Content hash
29b7b253
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01364
Status: valid/unmigrated Version: rel:R25-11#01461b41 Versionshistorie & Revisions (1 transition, 5 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_01364@rel:R25-11#01461b41
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#8c31120d2026-09-30
  • R22-11rel:R22-11#97f4f9572026-10-14
  • R23-11rel:R23-11#6285024e2026-10-14
  • R24-11rel:R24-11#bff980792026-10-14
  • R25-11rel:R25-11#01461b412026-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

函数 GetEntityId [SWS_DM_01366] Upstream: RS_AP_00138, RS_Diag_00026

virtual ara::core::Future< EntityId > GetEntityId () noexcept=0;

Called to get the EID for the DoIP protocol.

Header-Datei#include "ara/diag/doip_entity_identification.h"
Scopeclass ara::diag::DoIPEntityIdentification
Exception-Sicherheitexception safe
Thread-Sicherheitconditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor

Rückgabewert

TypBeschreibung
ara::core::Future< EntityId >Entity identification

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_DM_01366
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01366@rel:R25-11#cfa2edef
Content hash
cfa2edef
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01366
Status: valid/unmigrated Version: rel:R25-11#b7599708 Versionshistorie & Revisions (1 transition, 5 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_01366@rel:R25-11#b7599708
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#0daba9352026-09-30
  • R22-11rel:R22-11#03ed90322026-10-14
  • R23-11rel:R23-11#dc0449c22026-10-14
  • R24-11rel:R24-11#35c811cd2026-10-14
  • R25-11rel:R25-11#b75997082026-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_01367] Upstream: RS_AP_00119, RS_AP_00139, RS_Diag_00026

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 · 温度: 不可控 · 提示词: 60c723a50d6c 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

类 ara::diag::DoIPEntityIdentification 的方法 Offer 启用 Diagnostic Management Daemon (DM) 向已注册处理程序转发传入 DoIP 请求的功能 ([SWS_DM_01367])。仅在成功调用之后,报文才会传递给处理程序。解释:该调用通常在 Adaptive Application 的初始化阶段、应接收诊断报文之前进行。 问题 Q-4b78d4f80bda63a4 (未决)

使用与语义:

  • 调用上下文:该操作同步执行并被声明为 noexcept;不抛出任何异常 ([SWS_DM_01367])。
  • 返回值:返回一个 ara::core::Result<void>,在成功时不包含任何值 ([SWS_DM_01367])。

错误处理:

  • 如果已为该实例提供了该接口,则调用失败并以回滚语义返回错误代码 DiagOfferErrc::kAlreadyOffered ([SWS_DM_01367])。

并发性与限制:

  • 该接口被指定为 not thread-safe ([SWS_DM_01367])。对同一实例的并发调用必须由调用方应用程序进行同步。

相互协作:

该注册模式对应于其他 DoIP 服务的流程,如 DoIPGroupIdentification ([SWS_DM_00725]) 和 DoIPPowerMode ([SWS_DM_00735]) 以及通用 UDS 处理程序 ([SWS_DM_00619])。命名遵循从 ara::com 已知的模式,但代表向 DM 的独立注册 (AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”)。

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

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

Header-Datei#include "ara/diag/doip_entity_identification.h"
Scopeclass ara::diag::DoIPEntityIdentification
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_01367
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01367@rel:R25-11#c78cdfb1
Content hash
c78cdfb1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01367
Status: valid/unmigrated Version: rel:R25-11#1e1b8396 Versionshistorie & Revisions (1 transition, 5 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_01367@rel:R25-11#1e1b8396
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#bac2d0d72026-09-30
  • R22-11rel:R22-11#78e265802026-10-14
  • R23-11rel:R23-11#4d70569b2026-10-14
  • R24-11rel:R24-11#2f07768f2026-10-14
  • R25-11rel:R25-11#1e1b83962026-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_01368] Upstream: RS_Diag_00026

void StopOffer () noexcept;

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

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

使用

方法 ara::diag::DoIPEntityIdentification::StopOffer 终止提供 DoIP 实体识别服务,并停用将请求报文从 Diagnostic Management (DM) 转发到应用程序 [SWS_DM_01368]。该接口通过头文件 ara/diag/doip_entity_identification.h 提供。它不接受任何参数且不提供返回值 (void) [SWS_DM_01368]。解释:由于签名既未规定 Future 对象也未规定通过回调进行通知,因此该调用应以同步阻塞方式执行,直到 DM 中的转发终止。 问题 Q-75f67df3a003b08f (未决)

错误处理与异常安全性

该操作使用说明符 noexcept 声明,并被指定为异常安全(exception safe)[SWS_DM_01368]。既不返回特定错误代码,也不引发异常。

并发性与限制

关于执行环境,该方法被归类为非线程安全(not thread-safe)[SWS_DM_01368]。如果对 ara::diag::DoIPEntityIdentification 的同一实例发生并发调用或访问,则必须在应用侧对其进行同步。

相互作用

该行为契合 AUTOSAR Adaptive Diagnostic Management 的统一生命周期模式。例如,在通过 [SWS_DM_00726] 进行组识别以及通过 [SWS_DM_01089] 进行诊断开关和监视器时,也会发生类似的报文转发停用。正如 AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors” 中所强调的,Offer 和 StopOffer 的命名遵循 ara::com 的模式,但代表用于诊断接口的独立实现。

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

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

Header-Datei#include "ara/diag/doip_entity_identification.h"
Scopeclass ara::diag::DoIPEntityIdentification
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_01368
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01368@rel:R25-11#e5de1716
Content hash
e5de1716
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01368
Status: valid/unmigrated Version: rel:R25-11#995f1e52 Versionshistorie & Revisions (1 transition, 5 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_01368@rel:R25-11#995f1e52
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#0a1040402026-09-30
  • R22-11rel:R22-11#9e1482542026-10-14
  • R23-11rel:R23-11#de1f2b922026-10-14
  • R24-11rel:R24-11#40423c4c2026-10-14
  • R25-11rel:R25-11#995f1e522026-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

函数 ~DoIPEntityIdentification [SWS_DM_01365] Upstream: RS_AP_00134, RS_Diag_00026

virtual ~DoIPEntityIdentification () noexcept;

Destructor of DoIPEntityIdentification.

Header-Datei#include "ara/diag/doip_entity_identification.h"
Scopeclass ara::diag::DoIPEntityIdentification
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_01365
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01365@rel:R25-11#0c802730
Content hash
0c802730
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01365
Status: valid/unmigrated Version: rel:R25-11#dd9937e2 Versionshistorie & Revisions (1 transition, 5 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_01365@rel:R25-11#dd9937e2
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#0ce405e32026-09-30
  • R22-11rel:R22-11#73c187462026-10-14
  • R23-11rel:R23-11#e45fbddd2026-10-14
  • R24-11rel:R24-11#d5ded6fa2026-10-14
  • R25-11rel:R25-11#dd9937e22026-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