结构体 ara::diag::SovdContentConcurrencyType
[SWS_DM_02182] Upstream: RS_Diag_04166
struct SovdContentConcurrencyType {...};
Specifies the Concurrency type of a SOVD Content related port.
| Header-Datei | #include "ara/diag/concurrency.h" |
|---|
| Forwarding-Header | #include "ara/diag/diag_fwd.h" |
|---|
| Scope | namespace ara::diag |
|---|
用户指南人工智能生成
定义 Diagnostic Management 中对 SOVD 内容读写访问的并发行为。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 21b2907a6642
来源
未决问题(3)
定义 Diagnostic Management 中对 SOVD 内容读写访问的并发行为。
结构体 ara::diag::SovdContentConcurrencyType 指定了 AUTOSAR Adaptive [SWS_DM_02182] 中基于端口的 SOVD 内容的并发行为。它通过三个属性控制 Diagnostic Management 是可以并行执行针对应用程序端口的读写操作,还是必须对其进行串行化。默认情况下,所有字段均被防御性地初始化为 kNotConcurrent,因此开发人员必须显式启用并发性(如在 readWrite 中)[SWS_DM_02185]。该配置应在诊断通信开始之前完成,以确保线程安全处理。
上下文
数据结构 ara::diag::SovdContentConcurrencyType 在头文件 ara/diag/concurrency.h 中声明,用于在面向服务的车辆诊断(SOVD,Service-Oriented Vehicle Diagnostics)[SWS_DM_02182] 的上下文中指定端口的并发行为。在基于 AUTOSAR Adaptive Platform 的架构中,Diagnostic Management(DM)充当处理传入诊断请求的核心实例 SWS Diagnostics 第79页。当外部诊断客户端通过 SOVD 发起对诊断内容的读或写访问时,Diagnostic Management 必须能够确定提供服务的 Adaptive Application 或关联端口是否能够并发且线程安全地处理多个请求。
为此,SovdContentConcurrencyType 为纯读访问、纯写访问以及读写组合访问定义了三个配置属性 SWS Diagnostics §8.8.3 “Struct: SovdContentConcurrencyType”。因此,该结构充当了应用端端口实现与 Diagnostic Management 流程控制之间的配置接口。
上下文图:Diagnostic Management、SovdContentConcurrencyType 与 Adaptive Application 的 SOVD 端口之间的交互。来源:[SWS_DM_02182]、[SWS_DM_02185]、SWS Diagnostics §8.8.3 “Struct: SovdContentConcurrencyType”
生命周期
作为纯数据传输和配置结构体,SovdContentConcurrencyType 具有简单的生命周期,不涉及动态资源管理或复杂的内部状态控制 [SWS_DM_02182]。
实例化通常发生在 Adaptive Application 的配置和初始化阶段,可能位于栈上,或者在诊断通信开始前作为上层端口管理类的一部分。 问题 Q-f78487eff58a4775 (未决)在创建对象时,所有成员变量默认都进行防御性初始化:
关于并发性和线程处理:结构体本身是一个被动配置对象,不包含自己的同步机制。因此,在将该结构传递给 Diagnostic Management 或由多个线程读取之前,应对字段的修改全部完成。在端口上注册后,该配置在相应诊断端口的整个生命周期内保持不变(解释:规范未预见在诊断通信运行时的动态修改)。 问题 Q-71f96ed7cd3a6f61 (未决)结构体实例的清理在超出其作用域后根据常规 C++ 语义进行,无需额外的清理操作。
使用路径
典型的使用路径包括应用程序定义端口能力、运行时提供以及由 Diagnostic Management 进行评估:
- 能力配置:Adaptive Application 实例化一个
SovdContentConcurrencyType 类型的对象。如果端口方法的实现设计为线程安全,则有针对性地将相应属性设置为 ConcurrencyType::kConcurrent。将 readWrite 设置为 kConcurrent 明确向 Diagnostic Management 发出信号,表明允许同时调用读和写 API [SWS_DM_02185]。
- 保持默认行为:如果端口实现不是可重入的或内部未同步,开发人员应将这些值保留为
kNotConcurrent [SWS_DM_02183], [SWS_DM_02184]。解释:在此情况下,Diagnostic Management 确保该端口的待处理请求按序执行,以防止数据冲突。 问题 (未决)
- DM 进行流程控制:在运行期间,Diagnostic Management 接收外部 SOVD 请求。根据保存的配置,DM 确定是否可以将针对读和写例程的并行方法调用转发到端口,或者串行化是否必不可少 SWS Diagnostics §8.8.3.1.2 “readWrite”。
本指南由 AI 基于 AUTOSAR 规范 R25-11 生成。
成员图
类图
Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
详细视图
此版本没有元素数据
常量
Concurrency type for Reads.
Concurrency type for calling Read and Write methods in a concurrent way. If set to kConcurrent the DM can call Read and Write APIs concurrently.
Concurrency type for Writes.
常量 / 变量文档
ConcurrencyType read {ConcurrencyType::kNotConcurrent};
Concurrency type for Reads.
Status: valid/unmigrated
Version: rel:R25-11#db4180c6
Versionshistorie & Revisions (1 transition)
- 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_02183@rel:R25-11#db4180c6
Point-in-Time History:
Historical Snapshot:
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
ConcurrencyType readWrite {ConcurrencyType::kNotConcurrent};
Concurrency type for calling Read and Write methods in a concurrent way. If set to kConcurrent the DM can call Read and Write APIs concurrently.
Status: valid/unmigrated
Version: rel:R25-11#c04ffb49
Versionshistorie & Revisions (1 transition)
- 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_02185@rel:R25-11#c04ffb49
Point-in-Time History:
Historical Snapshot:
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
ConcurrencyType write {ConcurrencyType::kNotConcurrent};
Concurrency type for Writes.
Status: valid/unmigrated
Version: rel:R25-11#30544b76
Versionshistorie & Revisions (1 transition)
- 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_02184@rel:R25-11#30544b76
Point-in-Time History:
Historical Snapshot:
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · 德文原文