DEENESPTFRRUARHIKOZHNL

class ara::com::SamplePtr

[SWS_CM_00306] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

template <typename T> class SamplePtr {...};

Emulates a std::unique_ptr to an event sample.

The ara::com::SamplePtr behaves as a std::unique_ptr as long as the event/ field is subscribed to, or the Proxy it belongs to is not destroyed. The precondition defined in [SWS_CM_00085] and [SWS_CM_00087] must be fulfilled. Otherwise it is considered a violation.

Note: The SamplePtr is always passed with a const SampleType to the callable in GetNewSamples() (see [SWS_CM_00701]). Therefore the sample datatype (typename T) and the SamplePtr operators using the sample datatype (typename T) are implicitly declared as const. This means that the sample data will always be read-only.

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

User GuideAI-GENERATED

Enables exclusive read access to received events and controls the lifetime of middleware memory.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f5d97c2beaf2 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Enables exclusive read access to received events and controls the lifetime of middleware memory.

The template class encapsulates exclusive ownership of received event samples modeled after std::unique_ptr and grants the application direct, immutable read access to buffers of the middleware (EXP ARAComAPI §5.3.5.4). Instances are passed when querying new samples, can be transferred exclusively via move semantics, and keep the memory space allocated ([SWS_CM_11537]). Only the destruction of the pointer or an explicit nulling releases the buffer slot again. Validity requires that the event remains subscribed and the associated proxy exists.

Context

The template class ara::com::SamplePtr represents the central access and ownership model for received event data (event samples) in the Adaptive Platform (EXP ARAComAPI §5.3.5.4). Semantically, the class models an exclusive smart pointer after the pattern of std::unique_ptr (EXP ARAComAPI §5.3.5.4). The primary interaction partners are the application layer, the receiving event or proxy object, and the underlying communication middleware ara::com, which manages the buffer resources (EXP ARAComAPI, p. 44, EXP ARAComAPI, p. 50).

The concept explicitly follows a reference-based zero-copy approach: instead of passing event data to the application by value copy, ara::com forwards pointers or references to central communication buffers (EXP ARAComAPI, p. 50). In typical 1:N distribution scenarios, local event caches can thus be served purely via reference updates, minimizing memory overhead and latency (EXP ARAComAPI, p. 50). Access to the payload is conceptually strictly read-only: upon provision, SamplePtr is always instantiated with a constant payload type (ara::com::SamplePtr<SampleType const>), whereby all access operators are implicitly const (EXP ARAComAPI, p. 39, EXP ARAComAPI, p. 44, [SWS_CM_00701]).

Lifecycle

Instances of SamplePtr can be created as empty pointers via the default constructor or with nullptr ([SWS_CM_11534], [SWS_CM_11535]). Valid instances populated with payload, by contrast, originate within the middleware during deserialization of events into buffer slots and are passed to an application-side callable in the context of GetNewSamples() (EXP ARAComAPI, p. 44).

With the handoff, a complete ownership transfer to the application takes place (EXP ARAComAPI §5.3.5.4). To guarantee exclusivity of ownership, the copy constructor and copy assignment operator are deleted ([SWS_CM_11536], [SWS_CM_11538]). Transfer of the managed memory slot is possible exclusively via move construction or move assignment ([SWS_CM_11537], [SWS_CM_11540]), whereas Swap() allows swapping the contents of two pointers ([SWS_CM_11544]).

As long as a SamplePtr instance exists and holds the sample, the middleware cannot reclaim or overwrite the occupied memory space (EXP ARAComAPI §5.3.5.4). The middleware slot is released only when the lifetime of the SamplePtr ends upon calling the destructor ([SWS_CM_11547]) or when the pointer is explicitly cleared by means of Reset(nullptr) or assignment of nullptr ([SWS_CM_11539], [SWS_CM_11545]).

diag_lebenszyklus Init Leer Leer (nullptr) Init->Leer SamplePtr() Verwaltend Verwaltend (Exklusiver Besitz) Init->Verwaltend GetNewSamples() Leer->Verwaltend Move-Zuweisung Zerstoert Destroyed Leer->Zerstoert ~SamplePtr() Verwaltend->Leer Reset(nullptr) Verwaltend->Verwaltend Swap() Verwaltend->Zerstoert ~SamplePtr()

State diagram: Lifecycle phases and ownership transitions of a SamplePtr. Sources: [SWS_CM_11534], [SWS_CM_11537], [SWS_CM_11545], [SWS_CM_11547], EXP ARAComAPI §5.3.5.4.

Usage Path

The typical data access workflow is divided into the following steps:

  1. Trigger sample query: The application calls GetNewSamples() on the event proxy, passing a suitable callback function with signature void(ara::com::SamplePtr<SampleType const>) as well as an upper limit for the number of samples to retrieve (EXP ARAComAPI, p. 44).
  2. Handoff to callback: If new data is available and the buffer quota is not exhausted, the middleware deserializes the sample and passes the new SamplePtr instance to the callback (EXP ARAComAPI, p. 44).
  3. Check End-to-End status: Via GetProfileCheckStatus(), the application can query the result of the E2E protection check for the data packet at hand ([SWS_CM_90420]).
  4. Read data: Application logic accesses the managed object in a read-only manner via operator* ([SWS_CM_11541]), operator-> ([SWS_CM_11542]), or the Get() method ([SWS_CM_11546]).
  5. Further processing or release: If the sample is to be persisted beyond the callback, the application moves the pointer into its own storage structures via move construction ([SWS_CM_11537]). If the pointer remains in the scope of the callback, it is automatically destroyed upon leaving ([SWS_CM_11547]), which immediately frees the slot in the middleware (EXP ARAComAPI §5.3.5.4).
Sequence of sample provision and memory managementApplicationProxy / Eventara::com MiddlewareGetNewSamples(f, maxNumberOfSamples)Check held samples against quotaaltQuota exceededReturn ErrorCodeBuffer contains new sampleDeserialisierung in Sample-Slotf(SamplePtr<SampleType const>)Ownership takeover; read access via * / -> / Get() and E2E checkDestruction (~SamplePtr) or Reset(nullptr)Release of the memory slotResult(Anzahl verarbeiteter Samples)

Sequence diagram: Interaction sequence for GetNewSamples() with ownership transfer and buffer release. Sources: [SWS_CM_11541], [SWS_CM_11547], [SWS_CM_90420], EXP ARAComAPI, p. 44, EXP ARAComAPI §5.3.5.4.

Error Scenarios

When using SamplePtr, specific boundary conditions and sources of errors must be observed:

  • Exhaustion of the buffer quota: On each call to GetNewSamples(), the middleware checks whether the number of samples currently held by the application exceeds the quota previously guaranteed during the call to Subscribe(). If the quota is exceeded, GetNewSamples() refuses to deliver further samples and returns a ara::core::ErrorCode instead (EXP ARAComAPI, p. 44, EXP ARAComAPI, p. 45).
  • Invalidity due to subscription loss or proxy destruction: SamplePtr behaves deterministically like a std::unique_ptr only as long as the underlying event remains subscribed and the parent proxy instance exists. Retaining pointers beyond the end of the subscription or the destruction of the proxy is considered a violation of preconditions.
  • Pointer validity and null state: Via operator bool(), the occupancy state of the pointer can be evaluated ([SWS_CM_11543]). Dereferencing an empty pointer via operator* or operator-> leads to undefined behavior. All access and modification methods are declared as noexcept ([SWS_CM_11541], [SWS_CM_11542], [SWS_CM_11546]).
  • E2E validation errors: A validly received pointer does not necessarily guarantee error-free transmission data; via the return value of GetProfileCheckStatus(), the application must verify whether End-to-End protection signals data corruption or transmission delays ([SWS_CM_90420]).

This class guide was generated by an AI curation assistant based on the AUTOSAR specifications for Adaptive Platform Release R25-11.

Member map

Class diagram

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

G nara__com__SamplePtr589 SamplePtr + SamplePtr() + operator=() + ~SamplePtr() + Get() + GetProfileCheckStatus() + Reset() + Swap() + operator bool() + operator*() + operator->()

Detail view

Select an entry in the outline.

Constructors and destructor

SamplePtr function 4

Default constructor

Overloads SamplePtr 4
constexpr SamplePtr () noexcept; SWS_CM_11534
constexpr SamplePtr (std::nullptr_t other) noexcept; SWS_CM_11535
SamplePtr (const SamplePtr &)=delete; SWS_CM_11536
SamplePtr (SamplePtr &&other) noexcept; SWS_CM_11537
~SamplePtr function

Destructor

~SamplePtr () noexcept;

Methods

Get function

Returns a pointer to the managed object.

T * Get () const noexcept;

Returns the E2E protection check result

ara::com::e2e::ProfileCheckStatus GetProfileCheckStatus () const noexcept;
Reset function

Replaces the managed object.

void Reset (std::nullptr_t other) noexcept;
Swap function

Swaps the managed object.

void Swap (SamplePtr &other) noexcept;

Operators

operator bool function

Checks if the stored pointer is null

explicit operator bool () const noexcept;
operator* function

Dereferences the stored pointer.

T & operator* () const noexcept;
operator-> function

Dereferences the stored pointer.

T * operator-> () const noexcept;
operator= function 3

Copy assignment constructor deletion

Overloads = 3
SamplePtr & operator= (const SamplePtr &)=delete; SWS_CM_11538
SamplePtr & operator= (std::nullptr_t other) noexcept; SWS_CM_11539
SamplePtr & operator= (SamplePtr &&other) noexcept; SWS_CM_11540

Method documentation

function Get [SWS_CM_11546] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

T * Get () const noexcept;

Returns a pointer to the managed object.

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

Usage and Semantics

The function Get is a parameterless member function of class ara::com::SamplePtr from header ara/com/service/sample_ptr.h [SWS_CM_11546]. It synchronously returns a raw pointer of type T* to the object managed by the instance [SWS_CM_11546]. In contrast to asynchronous queries of service fields that provide a ara::core::Future [SWS_CM_00112], this access occurs immediately in the calling thread.

Error Handling and Boundary Conditions

The method is declared as noexcept and specified as exception safe [SWS_CM_11546]; error states via C++ exceptions do not occur. If the instance currently does not manage an object, the returned pointer is presumably nullptr. Question Q-d850bd8ee144369a (open) Prior to further processing of the referenced data, it must be ensured that E2E supervision has state ara::com::e2e::SMState::kValid and the status check of the profile yielded no error [SWS_CM_90422].

Interaction and Distinction

In Communication Management, Get serves for direct data access to received values (samples), as provided in the context of sample management AUTOSAR_AP_EXP_ARAComAPI §10 “GetNewSamples”. This function is to be clearly distinguished from other Get operations:

  • Field getter: Retrieval of service fields on the proxy is performed via Get() with return of a ara::core::Future [SWS_CM_00112], for which a handler can be registered on the server side [SWS_CM_00114].
  • E2E state: The supervision state of a field getter is determined separately via GetE2EStateMachineStateGetter [SWS_CM_00145].

This text was created by an AI and is based on AUTOSAR Release R25-11.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
T*A pointer to the managed object

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

Record
AUTOSAR/AP/record/SWS_CM_11546
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11546@rel:R25-11#19683df2
Content hash
19683df2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11546
Status: valid/unmigrated Version: rel:R25-11#ff040cc4 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_11546@rel:R25-11#ff040cc4
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#19683df22026-09-30
  • R24-11rel:R24-11#83411fd82026-10-14
  • R25-11rel:R25-11#ff040cc42026-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 GetProfileCheckStatus [SWS_CM_90420] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

ara::com::e2e::ProfileCheckStatus GetProfileCheckStatus () const noexcept;

Returns the E2E protection check result

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
ara::com::e2e::ProfileCheckStatusThe ara::com::e2e::ProfileCheckStatus

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

Record
AUTOSAR/AP/record/SWS_CM_90420
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_90420@rel:R25-11#35d07221
Content hash
35d07221
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_90420
Status: valid/unmigrated Version: rel:R25-11#0b9ab03a Versionshistorie & Revisions (1 transition, 8 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_90420@rel:R25-11#0b9ab03a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#35d072212026-09-30
  • R19-11rel:R19-11#8060df8d2026-10-14
  • R20-11rel:R20-11#8060df8d2026-10-14
  • R21-11rel:R21-11#8060df8d2026-10-14
  • R22-11rel:R22-11#8060df8d2026-10-14
  • R23-11rel:R23-11#8060df8d2026-10-14
  • R24-11rel:R24-11#331b13032026-10-14
  • R25-11rel:R25-11#0b9ab03a2026-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 Reset [SWS_CM_11545] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

void Reset (std::nullptr_t other) noexcept;

Replaces the managed object.

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

The member function Reset of class ara::com::SamplePtr serves to reset the pointer to the managed object [SWS_CM_11545]. As a parameter, it accepts the value other of type std::nullptr_t. The call replaces the currently held object with a null pointer and returns no value (void) [SWS_CM_11545].

Regarding error handling and exception safety, the method is declared with noexcept and specified as unconditionally exception safe [SWS_CM_11545]. Neither are C++ exceptions thrown, nor are specific error codes returned.

In the overall system, releasing SamplePtr instances fulfills an essential precondition for avoiding memory errors:

Interpretation: The explicit call of Reset(nullptr) is likely the direct means in application scenarios to deterministically surrender ownership of an event sample prior to such lifecycle transitions if the pointer does not go out of scope automatically. Question Q-a615fa4078ab03ce (open)

This usage note was automatically created based on AUTOSAR specification R25-11.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherA replacing std::nullptr_t

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_11545
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11545@rel:R25-11#82ec68c8
Content hash
82ec68c8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11545
Status: valid/unmigrated Version: rel:R25-11#93bd20e9 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_11545@rel:R25-11#93bd20e9
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#82ec68c82026-09-30
  • R24-11rel:R24-11#d3c7100f2026-10-14
  • R25-11rel:R25-11#93bd20e92026-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 SamplePtr [SWS_CM_11534] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

constexpr SamplePtr () noexcept;

Default constructor

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_CM_11534
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11534@rel:R25-11#b186477a
Content hash
b186477a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11534
Status: valid/unmigrated Version: rel:R25-11#d0884e08 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_11534@rel:R25-11#d0884e08
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#b186477a2026-09-30
  • R24-11rel:R24-11#78fdb2182026-10-14
  • R25-11rel:R25-11#d0884e082026-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 SamplePtr [SWS_CM_11535] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

constexpr SamplePtr (std::nullptr_t other) noexcept;

Semantically equivalent to [SWS_CM_11534]

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherA std::nullptr_t to copy

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

Record
AUTOSAR/AP/record/SWS_CM_11535
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11535@rel:R25-11#fa854bdf
Content hash
fa854bdf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11535
Status: valid/unmigrated Version: rel:R25-11#6e679051 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_11535@rel:R25-11#6e679051
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#fa854bdf2026-09-30
  • R24-11rel:R24-11#123387c32026-10-14
  • R25-11rel:R25-11#6e6790512026-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 SamplePtr [SWS_CM_11536] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

SamplePtr (const SamplePtr &)=delete;

Copy constructor deletion

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr

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

Record
AUTOSAR/AP/record/SWS_CM_11536
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11536@rel:R25-11#3909673e
Content hash
3909673e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11536
Status: valid/unmigrated Version: rel:R25-11#1ab46188 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_11536@rel:R25-11#1ab46188
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#3909673e2026-09-30
  • R24-11rel:R24-11#1ab461882026-10-14
  • R25-11rel:R25-11#1ab461882026-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 SamplePtr [SWS_CM_11537] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

SamplePtr (SamplePtr &&other) noexcept;

Move constructor

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherOther ara::com::SamplePtr to move

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

Record
AUTOSAR/AP/record/SWS_CM_11537
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11537@rel:R25-11#0fee2242
Content hash
0fee2242
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11537
Status: valid/unmigrated Version: rel:R25-11#3c5f39c0 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_11537@rel:R25-11#3c5f39c0
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#0fee22422026-09-30
  • R24-11rel:R24-11#165c3cab2026-10-14
  • R25-11rel:R25-11#3c5f39c02026-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 Swap [SWS_CM_11544] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

void Swap (SamplePtr &other) noexcept;

Swaps the managed object.

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

use

The function Swap is a member method of class ara::com::SamplePtr and serves to swap the currently managed object with another instance ([SWS_CM_11544]). The interface is defined in header ara/com/service/sample_ptr.h (AUTOSAR_AP_SWS_CommunicationManagement §8.9.1.1.3.4 “Swap”).

The call is synchronous and expects the following parameter:

  • other: Reference to another instance of ara::com::SamplePtr whose managed object is swapped with that of *this ([SWS_CM_11544]).

The method has no return value (void) ([SWS_CM_11544]).

Error handling

The signature is declared with noexcept and classified as exception safe ([SWS_CM_11544]). The call throws no exceptions and returns no error codes.

Concurrency and Limitations

Because Swap modifies the state of two objects (*this and other) simultaneously, concurrent calls on at least one of the participating instances are presumably not thread-safe without external synchronization. Question Q-d906e8c05aefbd15 (open)

Interaction

The method is an integral part of class ara::com::SamplePtr ([SWS_CM_11544]). It enables efficient ownership transfer or reassignment of received data samples in communication sequences without having to copy the underlying payload object.

This usage note was generated automatically based on the specification documents.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherAnother ara::com::SamplePtr to swap the managed object with

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_11544
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11544@rel:R25-11#ef3edceb
Content hash
ef3edceb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11544
Status: valid/unmigrated Version: rel:R25-11#de8dd35c 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_11544@rel:R25-11#de8dd35c
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#ef3edceb2026-09-30
  • R24-11rel:R24-11#f0b647d12026-10-14
  • R25-11rel:R25-11#de8dd35c2026-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 bool [SWS_CM_11543] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

explicit operator bool () const noexcept;

Checks if the stored pointer is null

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
boolTRUE if the stored pointer is null, FALSE otherwise.

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

Record
AUTOSAR/AP/record/SWS_CM_11543
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11543@rel:R25-11#a426ffae
Content hash
a426ffae
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11543
Status: valid/unmigrated Version: rel:R25-11#d4a800ef 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_11543@rel:R25-11#d4a800ef
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#a426ffae2026-09-30
  • R24-11rel:R24-11#6ef9c5c82026-10-14
  • R25-11rel:R25-11#d4a800ef2026-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_11541] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

T & operator* () const noexcept;

Dereferences the stored pointer.

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
T&The object owned by *this

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

Record
AUTOSAR/AP/record/SWS_CM_11541
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11541@rel:R25-11#7a10ec44
Content hash
7a10ec44
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11541
Status: valid/unmigrated Version: rel:R25-11#2a9978a3 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_11541@rel:R25-11#2a9978a3
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#7a10ec442026-09-30
  • R24-11rel:R24-11#ef9b07162026-10-14
  • R25-11rel:R25-11#2a9978a32026-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_11542] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

T * operator-> () const noexcept;

Dereferences the stored pointer.

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
T*A pointer to the object owned by *this

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

Record
AUTOSAR/AP/record/SWS_CM_11542
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11542@rel:R25-11#782b36dc
Content hash
782b36dc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11542
Status: valid/unmigrated Version: rel:R25-11#40fe26b3 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_11542@rel:R25-11#40fe26b3
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#782b36dc2026-09-30
  • R24-11rel:R24-11#bcd1f0962026-10-14
  • R25-11rel:R25-11#40fe26b32026-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_11538] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

SamplePtr & operator= (const SamplePtr &)=delete;

Copy assignment constructor deletion

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr

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

Record
AUTOSAR/AP/record/SWS_CM_11538
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11538@rel:R25-11#474e38fe
Content hash
474e38fe
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11538
Status: valid/unmigrated Version: rel:R25-11#26e1191d 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_11538@rel:R25-11#26e1191d
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#474e38fe2026-09-30
  • R24-11rel:R24-11#26e1191d2026-10-14
  • R25-11rel:R25-11#26e1191d2026-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_11539] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

SamplePtr & operator= (std::nullptr_t other) noexcept;

Copy assignment of nullptr_t.

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherA std::nullptr_t to copy

Rückgabewert

TypBeschreibung
SamplePtr &New ara::com::SamplePtr

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

Record
AUTOSAR/AP/record/SWS_CM_11539
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11539@rel:R25-11#3c954595
Content hash
3c954595
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11539
Status: valid/unmigrated Version: rel:R25-11#f4df352d 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_11539@rel:R25-11#f4df352d
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#3c9545952026-09-30
  • R24-11rel:R24-11#2a2a48bc2026-10-14
  • R25-11rel:R25-11#f4df352d2026-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_11540] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

SamplePtr & operator= (SamplePtr &&other) noexcept;

Move assignment operator.

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherOther ara::com::SamplePtr to move

Rückgabewert

TypBeschreibung
SamplePtr &New ara::com::SamplePtr

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

Record
AUTOSAR/AP/record/SWS_CM_11540
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11540@rel:R25-11#d5c9766f
Content hash
d5c9766f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11540
Status: valid/unmigrated Version: rel:R25-11#19726bd5 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_11540@rel:R25-11#19726bd5
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#d5c9766f2026-09-30
  • R24-11rel:R24-11#0e9fed532026-10-14
  • R25-11rel:R25-11#19726bd52026-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 ~SamplePtr [SWS_CM_11547] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145

~SamplePtr () noexcept;

Destructor

Header-Datei#include "ara/com/service/sample_ptr.h"
Scopeclass ara::com::SamplePtr
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_CM_11547
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11547@rel:R25-11#79b025ea
Content hash
79b025ea
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11547
Status: valid/unmigrated Version: rel:R25-11#9a0210b5 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_11547@rel:R25-11#9a0210b5
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#79b025ea2026-09-30
  • R24-11rel:R24-11#12a7c5cb2026-10-14
  • R25-11rel:R25-11#9a0210b52026-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