DEENESPTFRRUARHIKOZHNL

class ara::com::ServiceVersionType

[SWS_CM_11515] Upstream: RS_CM_00200, RS_CM_00500

class ServiceVersionType {...};

Specifies a Service Version. The exact type may be overridden by the Communication Management software provider. but shall at least satisfy the [equalitycomparable] ([SWS_CM_11516]), [lessthancomparable] ([SWS_CM_11517]) and [copyassignable] ([SWS_CM_11518]) requirements as per [30] to allow for logging, storing and managing ara:: com::ServiceVersionTypes 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_version.h"
Forwarding-Header#include "ara/com/com_fwd.h"
Scopenamespace ara::com

User GuideAI-GENERATED

Serves for the representation, logging, and comparative management of service versions in applications.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: abf1d9197db7 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves for the representation, logging, and comparative management of service versions in applications.

Class ara::com::ServiceVersionType serves for the standardized representation and management of service versions in the AUTOSAR Adaptive Platform ([SWS_CM_11515]). Applications use the instances for compatibility checks via equality and ordering comparisons, for storage in containers, and for logging via ToString() ([SWS_CM_11519]). The exact type may be overridden by the Communication Management provider, but must satisfy elementary C++ comparison and assignment requirements. When using it, note that all member functions of the class are specificationally classified as not exception-safe.

Context

Class ara::com::ServiceVersionType defines the version of a communication service ([SWS_CM_11515]) in header ara/com/service/service_version.h (AUTOSAR_AP_SWS_CommunicationManagement §8.11 “Header: ara/com/service/service_version.h”). Its primary responsibility is to make service versions manageable for application software so that it can store, manage, compare, and log version information ([SWS_CM_11515]).

An architectural characteristic lies in the platform's flexibility: according to [SWS_CM_11515], the concrete data type may be overridden or extended by the software provider of Communication Management. To nevertheless ensure consistent handling in portable applications, the specification requires that the type satisfy at least the C++ standard concepts [equalitycomparable] ([SWS_CM_11516]), [lessthancomparable] ([SWS_CM_11517]), and [copyassignable] ([SWS_CM_11518]) in accordance with ISO/IEC 14882:2014.

Interaction partners include not only the Communication Management software provider, but also service interfaces that provide versions as static constant serviceVersion (AUTOSAR_AP_SWS_CommunicationManagement p. 320), as well as the application software that performs version comparisons.

diag_serviceversion_kontext provider Communication Management Software Provider service_version ara::com::ServiceVersionType provider->service_version defines / overrides service_interface Service-Schnittstelle (serviceVersion) service_interface->service_version exponiert application Anwendungssoftware (Application) application->service_interface liest Version application->service_version speichert, vergleicht, protokolliert

Context diagram: embedding of ara::com::ServiceVersionType between software provider, service interface, and application. Sources: [SWS_CM_11515], AUTOSAR_AP_SWS_CommunicationManagement p. 320, AUTOSAR_AP_SWS_CommunicationManagement §8.11.1 “Class: ServiceVersionType”.

Lifecycle

Instances of ara::com::ServiceVersionType are designed as regular value types. Creation and value transfer take place via copy and assignment: the assignment operator operator= satisfies the requirement [copyassignable] ([SWS_CM_11518]), allowing instances to take on new values.

In terms of ownership, ara::com::ServiceVersionType is subject to the scope of the respective caller or is maintained as a constant of a service definition (AUTOSAR_AP_SWS_CommunicationManagement p. 320). The type possesses no complex internal state machine, but encapsulates a discrete version value. Its destruction occurs automatically upon leaving scope.

Regarding concurrency, the read operations operator== ([SWS_CM_11516]), operator< ([SWS_CM_11517]), and ToString ([SWS_CM_11519]) are declared as const. Interpretation: Concurrent read accesses to the same instance from multiple threads are likely safe without synchronization, whereas parallel write and assignment operations must be protected externally. Question Q-9582ce9a82b9b833 (open)

Usage Path

The typical sequence for using ara::com::ServiceVersionType in an application is structured into the following steps:

  1. Version query: The application accesses the version information of a service, for example via the static constant serviceVersion of an interface (AUTOSAR_AP_SWS_CommunicationManagement p. 320).
  2. Compatibility check: The application compares the version with an expected version via operator== ([SWS_CM_11516]). For ordering checks or storage in sorted standard containers, operator< is used ([SWS_CM_11517]).
  3. Management and storage: To pass on or locally store version states, the application uses the assignment operator operator= ([SWS_CM_11518]).
  4. Logging: For diagnostic messages or log outputs, the application generates a textual representation as ara::core::StringView via method ToString() ([SWS_CM_11519], AUTOSAR_AP_SWS_CommunicationManagement §8.11.1.1.2.1 “ToString”).

Error Scenarios

When using the interface, specific constraints must be observed:

  • Exception safety: All specified functions—operator= ([SWS_CM_11518]), operator== ([SWS_CM_11516]), operator< ([SWS_CM_11517]), and ToString ([SWS_CM_11519])—are explicitly declared as not exception safe in the specification. In case of an error (such as during memory allocations in provider-specific implementations), applications must not rely on automatic recovery guarantees.
  • Validity of the string view: Method ToString() returns a ara::core::StringView ([SWS_CM_11519]). Interpretation: Since a StringView does not manage its own storage, the lifetime of the referenced character string is likely coupled to the underlying instance or to static storage; use beyond the validity of the data source leads to undefined behavior. Question Q-fdb6e821db46af00 (open)

This guide is based on AUTOSAR standard release R25-11 and exclusively considers requirements from AUTOSAR_AP_SWS_CommunicationManagement.

Member map

Class diagram

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

G nara__com__ServiceVersionType743 ServiceVersionType + operator=() + ToString() + operator<() + operator==()

Detail view

Select an entry in the outline.

Methods

ToString function

Stringification method for ara::com::ServiceVersionType

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

Operators

operator< function

LessThan operator as per [lessthancomparable] in [30]

bool operator< (const ServiceVersionType &other) const;
operator= function

Copy assignment constructor

ServiceVersionType & operator= (const ServiceVersionType &other);
operator== function

Equality operator as per [equalitycomparable] in [30]

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

Method documentation

function ToString [SWS_CM_11519] Upstream: RS_CM_00200, RS_CM_00500

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

Stringification method for ara::com::ServiceVersionType

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6f062cc4edae Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous member function ToString of class ara::com::ServiceVersionType serves to serialize and provide version information as a human-readable string representation ([SWS_CM_11519], SWS CommunicationManagement §8.11.1.1.2.1 “ToString”). It is declared in header #include "ara/com/service/service_version.h", takes no parameters as a const method, and returns a ara::core::StringView to the string representation of the service version ([SWS_CM_11519]).

The represented version information is derived according to [SWS_CM_99029] from the attributes majorVersion and minorVersion of the respective ServiceInterface (SWS CommunicationManagement §7.5.22.1 “Service Identifier Data Types”). According to [SWS_CM_00088], the specific format of the string is vendor-specific for Communication Management and not standardized across AUTOSAR (SWS CommunicationManagement §7.5.22.1 “Service Identifier Data Types”).

The following boundary conditions apply to usage and concurrency:

  • Exception safety: In the specification, the function is explicitly classified as not exception safe ([SWS_CM_11519]). Specific error codes or messages to DET or DEM are not defined.
  • Return value lifetime: Since a ara::core::StringView is returned, the referenced buffer is presumably bound to the lifetime of the ServiceVersionType object or to static storage (interpretation). Question Q-dc38956a7fe0476a (open) The view should therefore not be used beyond the lifetime of the source instance.
  • Call context: As a side-effect-free const operation, the call does not modify the object; separate reentrancy specifications are not defined.

This text was generated by an AI based on the AUTOSAR specification R25-11.

Implementer's Guide to follow (complexity I1)

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

Rückgabewert

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

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

Record
AUTOSAR/AP/record/SWS_CM_11519
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11519@rel:R25-11#0f392a64
Content hash
0f392a64
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11519
Status: valid/unmigrated Version: rel:R25-11#abf5021f 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_11519@rel:R25-11#abf5021f
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#0f392a642026-09-30
  • R24-11rel:R24-11#2df22b872026-10-14
  • R25-11rel:R25-11#abf5021f2026-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

function operator< [SWS_CM_11517] Upstream: RS_CM_00200, RS_CM_00500

bool operator< (const ServiceVersionType &other) const;

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_version.h"
Scopeclass ara::com::ServiceVersionType
Exception-Sicherheitnot exception safe

Parameter (in)

ParameterBeschreibung
otherara::com::ServiceVersionType 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_11517
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11517@rel:R25-11#f371b0f0
Content hash
f371b0f0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11517
Status: valid/unmigrated Version: rel:R25-11#2d7b1db2 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_11517@rel:R25-11#2d7b1db2
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f371b0f02026-09-30
  • R24-11rel:R24-11#abc475902026-10-14
  • R25-11rel:R25-11#2d7b1db22026-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

function operator= [SWS_CM_11518] Upstream: RS_CM_00200, RS_CM_00500

ServiceVersionType & operator= (const ServiceVersionType &other);

Copy assignment constructor

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

Parameter (in)

ParameterBeschreibung
otherara::com::ServiceVersionType to copy

Rückgabewert

TypBeschreibung
ServiceVersionType &New ara::com::ServiceVersionType

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

Record
AUTOSAR/AP/record/SWS_CM_11518
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11518@rel:R25-11#a7abbb5e
Content hash
a7abbb5e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11518
Status: valid/unmigrated Version: rel:R25-11#b8a11cec 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_11518@rel:R25-11#b8a11cec
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#a7abbb5e2026-09-30
  • R24-11rel:R24-11#31f02ac92026-10-14
  • R25-11rel:R25-11#b8a11cec2026-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

function operator== [SWS_CM_11516] Upstream: RS_CM_00200, RS_CM_00500

bool operator== (const ServiceVersionType &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_version.h"
Scopeclass ara::com::ServiceVersionType
Exception-Sicherheitnot exception safe

Parameter (in)

ParameterBeschreibung
otherara::com::ServiceVersionType 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_11516
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11516@rel:R25-11#b31c2260
Content hash
b31c2260
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11516
Status: valid/unmigrated Version: rel:R25-11#8e598b1d 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_11516@rel:R25-11#8e598b1d
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#b31c22602026-09-30
  • R24-11rel:R24-11#38d0957c2026-10-14
  • R25-11rel:R25-11#8e598b1d2026-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