DEENESPTFRRUARHIKOZHNL

类 ara::com::ServiceIdentifierType

[SWS_CM_11510] Upstream: RS_CM_00200, RS_CM_00500

class ServiceIdentifierType {...};

Specifies a Service Identifier The exact type may be overridden by the Communication Management software provider. but shall at least satisfy the [equalitycomparable] ([SWS_CM_11511]), [lessthancomparable] ([SWS_CM_11512]) and [copyassignable] ([SWS_CM_11513]) requirements as per [30] to allow for logging, storing and managing ara:: com::ServiceIdentifierTypes by the application.

Literaturverzeichnis SWS CommunicationManagement: [30] ISO/IEC 14882:2014, Information technology – Programming languages – C++ – www.iso.org

Header-Datei#include "ara/com/service/service_identifier.h"
Forwarding-Header#include "ara/com/com_fwd.h"
Scopenamespace ara::com

用户指南人工智能生成

用于唯一标识服务,以便在 Adaptive 应用中进行管理、排序与记录。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 6478b06ad565 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用于唯一标识服务,以便在 Adaptive 应用中进行管理、排序与记录。

类 ara::com::ServiceIdentifierType 用于在 AUTOSAR Adaptive Communication Management 中唯一标识服务 [SWS_CM_11510]。它允许应用管理、复制和排序服务标识符,并通过标准化的 C++ 概念和运算符输出文本以用于记录目的 SWS CommunicationManagement §8.10.1 “Class: ServiceIdentifierType”。具体类型形式由软件提供商指定,根据规范,所提供的所有成员函数均被归类为非异常安全。

上下文

类 ara::com::ServiceIdentifierType 规范了 AUTOSAR Adaptive Platform 的 Communication Management 中服务的唯一标识符 [SWS_CM_11510]。具体类型形式由 Communication Management 的各软件制造商负责,且允许特定于提供商进行重载 SWS CommunicationManagement §8.10.1 “Class: ServiceIdentifierType”。在具体服务的接口处,该类以静态常量 serviceIdentifier 等形式出现 SWS CommunicationManagement 第319页。应用软件使用此标识符来记录、存储和管理实例 SWS CommunicationManagement §8.10.1 “Class: ServiceIdentifierType”。

Context Provider Communication Management Software Provider ServiceId ara::com::ServiceIdentifierType Provider->ServiceId 定义 / 覆盖 Service Service-Schnittstelle (serviceIdentifier) Service->ServiceId deklariert statische Instanz App Applikation App->ServiceId 用于管理和日志记录

上下文图:ServiceIdentifierType 在提供者实现、服务接口与应用程序之间的集成。来源:[SWS_CM_11510],SWS CommunicationManagement §8.10.1,第 319 页

生命周期

作为标识符,ara::com::ServiceIdentifierType 充当没有自身复杂状态机的值类型。创建与赋值遵循 C++ 概念 copyassignable,该概念通过赋值运算符 operator= 实现 [SWS_CM_11513]。由此,标识符实例可以毫无问题地被复制并在应用内部传递。

所有权要么静态保留在接口定义 SWS CommunicationManagement 第319页 处,要么作为独立副本属于调用方应用程序的职责范围。未定义固定的生命周期阶段或转换。由于根据规范所有成员函数均为非异常安全,因此在没有应用程序外部同步的情况下,对同一实例的并发写赋值推测不是线程安全的。 问题 Q-f6569be429992e62 (未决)

使用路径

ara::com::ServiceIdentifierType 的典型用法包括以下步骤:

  • 获取与赋值:应用程序从静态服务接口 SWS CommunicationManagement 第319页 获取标识符,并通过复制赋值 operator= 将其分配给局部变量或存储结构 [SWS_CM_11513]。
  • 比较与排序:为了在已排序或关联容器中进行存储,类根据 equalitycomparable 提供了 operator== [SWS_CM_11511],并根据 lessthancomparable 提供了 operator< [SWS_CM_11512]。由此可以检查标识符是否相等并建立严格的顺序。
  • 用于诊断的序列化:出于记录与跟踪目的,方法 toString() 以 ara::core::StringView 的形式提供文本表示 [SWS_CM_11514]。

错误场景

该接口未定义类型 ara::core::ErrorCode 的特殊错误码或返回值。要求中明确将所有成员函数(operator=、operator<、operator==、toString)归类为 not exception safe [SWS_CM_11511] [SWS_CM_11512] [SWS_CM_11513] [SWS_CM_11514]。

作为比较操作的前提条件,相关实例必须经过有效初始化。由 toString() 返回的 ara::core::StringView 不具备自己的内存;因此其有效性推测与底层内存缓冲区或实例的生命周期绑定(解释)。 问题 Q-60373784c6a80c99 (未决)

本指南基于 AUTOSAR Adaptive R25-11 规范并自动策展。

成员图

类图

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

G nara__com__ServiceIdentifierType24 ServiceIdentifierType + operator=() + operator<() + operator==() + toString()

详细视图

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

方法

toString 函数

Stringification method for ara::com::ServiceIdentifierType

ara::core::StringView toString () const;

运算符

operator< 函数

LessThan operator as per [lessthancomparable] in [30] LessThan operator as per [lessthancomparable] in [30]

bool operator< (const ServiceIdentifierType &other) const;
operator= 函数

Copy assignment constructor

ServiceIdentifierType & operator= (const ServiceIdentifierType &other);
operator== 函数

Equality operator as per [equalitycomparable] in [30]

bool operator== (const ServiceIdentifierType &other) const;

方法文档

函数 operator< [SWS_CM_11512] Upstream: RS_CM_00200, RS_CM_00500

bool operator< (const ServiceIdentifierType &other) const;

LessThan operator as per [lessthancomparable] in [30] LessThan operator as per [lessthancomparable] in [30]

Literaturverzeichnis SWS CommunicationManagement: [30] ISO/IEC 14882:2014, Information technology – Programming languages – C++ – www.iso.org

Header-Datei#include "ara/com/service/service_identifier.h"
Scopeclass ara::com::ServiceIdentifierType
Exception-Sicherheitnot exception safe

Parameter (in)

ParameterBeschreibung
otherOther ara::com::ServiceIdentifierType to compare

Rückgabewert

TypBeschreibung
boolTRUE if other is less than *this, FALSE otherwise.

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

Record
AUTOSAR/AP/record/SWS_CM_11512
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11512@rel:R25-11#3b6b845d
Content hash
3b6b845d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11512
Status: valid/unmigrated Version: rel:R25-11#e5fa89ba 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_11512@rel:R25-11#e5fa89ba
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#1c25fbcd2026-09-30
  • R24-11rel:R24-11#5a9cbdb02026-10-14
  • R25-11rel:R25-11#e5fa89ba2026-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_CM_11513] Upstream: RS_CM_00200, RS_CM_00500

ServiceIdentifierType & operator= (const ServiceIdentifierType &other);

Copy assignment constructor

Header-Datei#include "ara/com/service/service_identifier.h"
Scopeclass ara::com::ServiceIdentifierType
Exception-Sicherheitnot exception safe

Parameter (in)

ParameterBeschreibung
otherara::com::ServiceIdentifierType to copy

Rückgabewert

TypBeschreibung
ServiceIdentifierType &New ara::com::ServiceIdentifierType

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

Record
AUTOSAR/AP/record/SWS_CM_11513
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11513@rel:R25-11#8523bbd3
Content hash
8523bbd3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11513
Status: valid/unmigrated Version: rel:R25-11#5c10ce0a 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_11513@rel:R25-11#5c10ce0a
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#d0d051232026-09-30
  • R24-11rel:R24-11#311f46172026-10-14
  • R25-11rel:R25-11#5c10ce0a2026-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_CM_11511] Upstream: RS_CM_00200, RS_CM_00500

bool operator== (const ServiceIdentifierType &other) const;

Equality operator as per [equalitycomparable] in [30]

Literaturverzeichnis SWS CommunicationManagement: [30] ISO/IEC 14882:2014, Information technology – Programming languages – C++ – www.iso.org

Header-Datei#include "ara/com/service/service_identifier.h"
Scopeclass ara::com::ServiceIdentifierType
Exception-Sicherheitnot exception safe

Parameter (in)

ParameterBeschreibung
otherara::com::ServiceIdentifierType to compare

Rückgabewert

TypBeschreibung
boolTRUE if other is equal to *this, FALSE otherwise.

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

Record
AUTOSAR/AP/record/SWS_CM_11511
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11511@rel:R25-11#00f75b38
Content hash
00f75b38
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11511
Status: valid/unmigrated Version: rel:R25-11#278988fc 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_11511@rel:R25-11#278988fc
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#6cf83e6e2026-09-30
  • R24-11rel:R24-11#65c2c63e2026-10-14
  • R25-11rel:R25-11#278988fc2026-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

函数 toString [SWS_CM_11514] Upstream: RS_CM_00200, RS_CM_00500

ara::core::StringView toString () const;

Stringification method for ara::com::ServiceIdentifierType

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

类 ara::com::ServiceIdentifierType 的同步成员函数 toString 以 ara::core::StringView 形式生成服务标识符的文本表示([SWS_CM_11514],SWS CommunicationManagement §8.10.1.1.2.3 “toString”)。它通过头文件 #include "ara/com/service/service_identifier.h" 声明,不接受任何参数,且不更改对象的状态([SWS_CM_11514])。

在错误安全性方面,该函数在规范中被明确归类为 not exception safe([SWS_CM_11514])。源材料中未指定具体的错误码、错误返回值或DET/DEM报告;因此调用者必须考虑到在调用过程中可能会发生异常。

由于返回类型被定义为 ara::core::StringView,该类型推测引用标识符对象的内部字符数据。 问题 Q-54e93f60d3b6a2b4 (未决)因此,所提供的视图的有效性推测与底层 ServiceIdentifierType 实例的生命周期绑定,且在其生命周期结束后不得再进行解引用。

在与相关接口的协同中,存在一个用于实例标识 ara::com::InstanceIdentifier 的类似方法 toString([SWS_CM_11522],SWS CommunicationManagement §8.8.1.1.3.4 “toString”)。与被指定为 noexcept 且异常安全的那个函数不同,ServiceIdentifierType::toString 不提供无异常的保证([SWS_CM_11514],[SWS_CM_11522])。

本文由人工智能生成,完全基于 AUTOSAR R25-11 的规范数据。

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

Header-Datei#include "ara/com/service/service_identifier.h"
Scopeclass ara::com::ServiceIdentifierType
Exception-Sicherheitnot exception safe

Rückgabewert

TypBeschreibung
ara::core::StringViewString representation of a ara::com:: ServiceIdentifierType

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

Record
AUTOSAR/AP/record/SWS_CM_11514
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11514@rel:R25-11#000e505e
Content hash
000e505e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11514
Status: valid/unmigrated Version: rel:R25-11#00f1cc2e 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_11514@rel:R25-11#00f1cc2e
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f8f8e1d02026-09-30
  • R24-11rel:R24-11#68f3452d2026-10-14
  • R25-11rel:R25-11#00f1cc2e2026-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