DEENESPTFRRUARHIKOZHNL

类 <SI-Namespace>::common::<SI>

用户指南人工智能生成

为服务接口提供公共静态元数据、版本信息和标识符。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: f6b3f809e490 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

为服务接口提供公共静态元数据、版本信息和标识符。

该类作为公共命名空间,汇集了 AUTOSAR Adaptive 通信管理中接口的静态元数据和标识符 SWS CommunicationManagement §8.2.2.1 “Public Member Variables”。它通过 serviceIdentifier 和 serviceVersion 提供用于唯一标识和版本化服务的基础信息 [SWS_CM_11506]。此外,serviceContractVersionMajor 以及 serviceContractVersionMinor 定义了服务协定的确切版本,以确保接口兼容性。解释:由于所有声明的元素都是静态存在的,该类推测在运行时不需要实例化,并在整个进程范围内以不可变方式引入。 问题 Q-bdf8084e3c4a2dec (未决)

上下文

在 AUTOSAR Adaptive Platform 中,模块 com(Communication Management)中的 C++ 类 <SI-Namespace>::common::<SI> 承担着已定义 Service Interface 的公共元数据和命名空间容器的核心角色 SWS CommunicationManagement §8.2.2.1 “Public Member Variables”。该类汇总了对服务使用者和服务提供者均统一适用的静态属性和接口标识符,并通过头文件 #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_common.h" 提供 [SWS_CM_11506]。

主要交互方包括功能性通信管理 ara::com,其基本数据类型已被引入。该类公开了类型为 const ara::com::ServiceIdentifierType [SWS_CM_11506] 的服务标识符 serviceIdentifier(SWS CommunicationManagement §8.2.2.1.3 “serviceIdentifier”)以及类型为 const ara::com::ServiceVersionType [SWS_CM_11507] 的服务版本 serviceVersion(SWS CommunicationManagement §8.2.2.1.4 “serviceVersion”)。解释:应用程序组件和平台组件使用此公共类定义作为权威参考,以便通过统一的标识符和接口协定建立服务实例。 问题 (未决)

diag_kontext Dienstanwendung Dienstanwendung GemeinsameKlasse <SI-Namespace>::common::<SI> Dienstanwendung->GemeinsameKlasse 包含并读取元数据 Kommunikationsmanagement ara::com GemeinsameKlasse->Kommunikationsmanagement 使用来自 ara::com 的类型

上下文图:公共接口类在与服务应用和通信管理基本类型交互中的归类。来源:[SWS_CM_11506]、[SWS_CM_11507]、SWS CommunicationManagement §8.2.2.1 “Public Member Variables”。

生命周期

在生命周期方面,<SI-Namespace>::common::<SI> 与动态实例类有着根本区别:它不需要显式实例化,并且不具有动态管理的状态。规范中定义的所有接口变量均声明为静态类成员 SWS CommunicationManagement §8.2.2.1 “Public Member Variables”。

标识符 serviceIdentifier [SWS_CM_11506] 和版本控制 serviceVersion [SWS_CM_11507] 被声明为 static const。补充说明的是,serviceContractVersionMajor [SWS_CM_11508](SWS CommunicationManagement §8.2.2.1.1 “serviceContractVersionMajor”)和 serviceContractVersionMinor [SWS_CM_11509](SWS CommunicationManagement §8.2.2.1.2 “serviceContractVersionMinor”)将协定版本号定义为静态 std::uint32_t 值。解释:这些符号的静态生命周期对应于整个进程周期;其初始化可能在加载相应模块或共享库时进行。 问题 (未决)不存在内存资源的动态销毁或释放。

关于并发性,带有 const 限定符的变量 serviceIdentifier 和 serviceVersion 在并发读取访问时提供无限制的线程安全性。解释:由于版本变量 serviceContractVersionMajor 和 serviceContractVersionMinor 代表协定规范状态,它们在运行时推测保持不变,因此允许多个执行线程同时进行读取访问而无需同步开销。 问题 Q-2335ea4535e239d6 (未决)

使用路径

典型使用路径包括对元数据和版本信息的静态访问,以确保接口兼容性:

  • 包含头文件:应用程序或生成的通信层包含文件 <SiNamespaceDerivedDirectoryPath>/<SiShortname>_common.h,以获得对命名空间 <SI-Namespace>::common::<SI> 的访问权限 [SWS_CM_11506]。
  • 服务标识:组件直接通过 <SI-Namespace>::common::<SI>::serviceIdentifier 访问服务的唯一标识符,例如用于实例的初始化或向通信基础设施进行注册 [SWS_CM_11506](SWS CommunicationManagement §8.2.2.1.3 “serviceIdentifier”)。
  • 版本比对:为了验证通信伙伴之间的接口兼容性,读取 serviceVersion [SWS_CM_11507] 以及协定版本 serviceContractVersionMajor [SWS_CM_11508] 和 serviceContractVersionMinor [SWS_CM_11509]。

读取访问不存在前置条件,因为所有常量在程序启动时均已可用。对于这些静态变量的纯读取访问,未指定错误状态或异常。

本指南仅基于 AUTOSAR Adaptive Communication Management (R25-11) 规范。

成员图

类图

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

G n_SI_Namespace___common___SI_356 <SI> + serviceContractVersionMajor + serviceContractVersionMinor + serviceIdentifier + serviceVersion

详细视图

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

常量

Service Contract Major Version

static std::uint32_t serviceContractVersionMajor;

Service Contract Minor Version

static std::uint32_t serviceContractVersionMinor;

Service Identifier

static const ara::com::ServiceIdentifierType serviceIdentifier;

Service Version

static const ara::com::ServiceVersionType serviceVersion;

常量 / 变量文档

变量 serviceContractVersionMajor [SWS_CM_11508] Upstream: RS_CM_00200, RS_CM_00500

static std::uint32_t serviceContractVersionMajor;

Service Contract Major Version

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_common.h"
Scopeclass <SI-Namespace>::common::<SI>
SymbolserviceContractVersionMajor
Typstd::uint32_t

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

Record
AUTOSAR/AP/record/SWS_CM_11508
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11508@rel:R25-11#9c1917e4
Content hash
9c1917e4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11508
Status: valid/unmigrated Version: rel:R25-11#b5b0fd99 Versionshistorie & Revisions (1 transition, 3 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_CM_11508@rel:R25-11#b5b0fd99
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#5091ff4d2026-09-30
  • R24-11rel:R24-11#f4c82cce2026-10-14
  • R25-11rel:R25-11#b5b0fd992026-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

变量 serviceContractVersionMinor [SWS_CM_11509] Upstream: RS_CM_00200, RS_CM_00500

static std::uint32_t serviceContractVersionMinor;

Service Contract Minor Version

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_common.h"
Scopeclass <SI-Namespace>::common::<SI>
SymbolserviceContractVersionMinor
Typstd::uint32_t

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

Record
AUTOSAR/AP/record/SWS_CM_11509
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11509@rel:R25-11#89827aa3
Content hash
89827aa3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11509
Status: valid/unmigrated Version: rel:R25-11#1514e3bf Versionshistorie & Revisions (1 transition, 3 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_CM_11509@rel:R25-11#1514e3bf
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#de150a232026-09-30
  • R24-11rel:R24-11#1514e3bf2026-10-14
  • R25-11rel:R25-11#1514e3bf2026-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

变量 serviceIdentifier [SWS_CM_11506] Upstream: RS_CM_00200, RS_CM_00500

static const ara::com::ServiceIdentifierType serviceIdentifier;

Service Identifier

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_common.h"
Scopeclass <SI-Namespace>::common::<SI>
SymbolserviceIdentifier
Typconst ara::com::ServiceIdentifierType

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

Record
AUTOSAR/AP/record/SWS_CM_11506
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11506@rel:R25-11#8c52876b
Content hash
8c52876b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11506
Status: valid/unmigrated Version: rel:R25-11#7ada766f Versionshistorie & Revisions (1 transition, 3 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_CM_11506@rel:R25-11#7ada766f
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#c38c2d9f2026-09-30
  • R24-11rel:R24-11#7ada766f2026-10-14
  • R25-11rel:R25-11#7ada766f2026-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

变量 serviceVersion [SWS_CM_11507] Upstream: RS_CM_00200, RS_CM_00500

static const ara::com::ServiceVersionType serviceVersion;

Service Version

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_common.h"
Scopeclass <SI-Namespace>::common::<SI>
SymbolserviceVersion
Typconst ara::com::ServiceVersionType

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

Record
AUTOSAR/AP/record/SWS_CM_11507
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11507@rel:R25-11#153f4d8b
Content hash
153f4d8b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11507
Status: valid/unmigrated Version: rel:R25-11#5ba837f8 Versionshistorie & Revisions (1 transition, 3 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_CM_11507@rel:R25-11#5ba837f8
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#1c29e6f02026-09-30
  • R24-11rel:R24-11#5ba837f82026-10-14
  • R25-11rel:R25-11#5ba837f82026-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