DEENESPTFRRUARHIKOZHNL

classe 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

Guia do utilizadorGERADO POR IA

Permite o acesso exclusivo de leitura a eventos recebidos e controla o tempo de vida da memória do middleware.
GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: f5d97c2beaf2 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

Permite o acesso exclusivo de leitura a eventos recebidos e controla o tempo de vida da memória do middleware.

A classe template encapsula a posse exclusiva de amostras de eventos recebidas segundo o modelo de std::unique_ptr e concede à aplicação acesso direto e imutável de leitura aos buffers do middleware (EXP ARAComAPI §5.3.5.4). As instâncias são passadas na consulta de novas amostras, podem ser transferidas exclusivamente por semântica de movimentação e mantêm o espaço de memória ocupado ([SWS_CM_11537]). Somente a destruição do ponteiro ou uma anulação explícita libera novamente o slot de buffer. A validade pressupõe que o evento permaneça subscrito e que o proxy correspondente exista.

Contexto

A classe template ara::com::SamplePtr representa, na Adaptive Platform, o modelo central de acesso e posse para dados de eventos recebidos (event samples) (EXP ARAComAPI §5.3.5.4). Semanticamente, a classe reproduz um smart pointer exclusivo segundo o modelo de std::unique_ptr (EXP ARAComAPI §5.3.5.4). Os parceiros primários de interação são o nível de aplicação, o objeto de evento ou proxy receptor e o middleware de comunicação subjacente ara::com, que gerencia os recursos de buffer (EXP ARAComAPI, p. 44, EXP ARAComAPI, p. 50).

O conceito segue expressamente uma abordagem zero-copy baseada em referências: em vez de passar dados de eventos por cópia de valor para a aplicação, ara::com encaminha ponteiros ou referências para buffers de comunicação centrais (EXP ARAComAPI, p. 50). Em cenários típicos de distribuição 1:N, os caches locais de eventos podem, com isso, ser atendidos puramente por atualizações de referência, o que minimiza o consumo de memória e a latência (EXP ARAComAPI, p. 50). O acesso aos dados úteis é projetado conceitualmente como estritamente de leitura: na disponibilização, SamplePtr é sempre instanciado com um tipo constante de dados úteis (ara::com::SamplePtr<SampleType const>), tornando todos os operadores de acesso implicitamente constantes (EXP ARAComAPI, p. 39, EXP ARAComAPI, p. 44, [SWS_CM_00701]).

Ciclo de vida

Instâncias de SamplePtr podem ser criadas como ponteiros vazios por meio do construtor padrão ou com nullptr ([SWS_CM_11534], [SWS_CM_11535]). Já instâncias válidas e preenchidas com dados úteis são criadas dentro do middleware durante a desserialização de eventos em slots de buffer e são transmitidas a um callable do lado da aplicação no âmbito de GetNewSamples() (EXP ARAComAPI, p. 44).

Com a entrega, ocorre uma transferência completa de posse (ownership transfer) para a aplicação (EXP ARAComAPI §5.3.5.4). Para garantir a exclusividade da posse, o construtor de cópia e o operador de atribuição por cópia são excluídos ([SWS_CM_11536], [SWS_CM_11538]). A transferência do slot de memória gerenciado é possível exclusivamente por meio de construção por movimentação ou atribuição por movimentação ([SWS_CM_11537], [SWS_CM_11540]), enquanto Swap() permite a troca de conteúdo entre dois ponteiros ([SWS_CM_11544]).

Enquanto uma instância de SamplePtr existir e mantiver o sample, o middleware não pode reivindicar de volta nem sobrescrever o espaço de memória ocupado (EXP ARAComAPI §5.3.5.4). A liberação do slot do middleware ocorre apenas quando o tempo de vida do SamplePtr termina pela chamada do destrutor ([SWS_CM_11547]) ou quando o ponteiro é explicitamente esvaziado mediante Reset(nullptr) ou atribuição de 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 Destruído Leer->Zerstoert ~SamplePtr() Verwaltend->Leer Reset(nullptr) Verwaltend->Verwaltend Swap() Verwaltend->Zerstoert ~SamplePtr()

Diagrama de estados: Fases do ciclo de vida e transições de posse de um SamplePtr. Fontes: [SWS_CM_11534], [SWS_CM_11537], [SWS_CM_11545], [SWS_CM_11547], EXP ARAComAPI §5.3.5.4.

Caminho de utilização

O fluxo típico de acesso aos dados divide-se nas seguintes etapas:

  1. Disparar consulta de sample: A aplicação chama GetNewSamples() no proxy do evento e passa uma função de callback adequada com a assinatura void(ara::com::SamplePtr<SampleType const>), bem como um limite superior para a quantidade de samples a serem buscados (EXP ARAComAPI, p. 44).
  2. Entrega ao callback: Se houver novos dados disponíveis e a cota do buffer não estiver esgotada, o middleware desserializa o sample e entrega a nova instância de SamplePtr ao callback (EXP ARAComAPI, p. 44).
  3. Verificar status End-to-End: Por meio de GetProfileCheckStatus(), a aplicação pode consultar o resultado da verificação de proteção E2E para o pacote de dados presente ([SWS_CM_90420]).
  4. Ler dados: A lógica da aplicação acessa o objeto gerenciado para leitura por meio de operator* ([SWS_CM_11541]), operator-> ([SWS_CM_11542]) ou do método Get() ([SWS_CM_11546]).
  5. Processamento posterior ou liberação: caso o sample deva ser persistido além do callback, a aplicação move o ponteiro por meio de construção por movimento para estruturas de memória próprias ([SWS_CM_11537]). Se o ponteiro permanecer no escopo do callback, ele será automaticamente destruído ao sair ([SWS_CM_11547]), o que libera imediatamente o slot no middleware (EXP ARAComAPI §5.3.5.4).
Fluxo do fornecimento de samples e gerenciamento de memóriaAplicaçãoProxy / Eventara::com MiddlewareGetNewSamples(f, maxNumberOfSamples)Verificar samples retidos contra a cotaaltCota excedidaRetorno de ErrorCodeBuffer contém novo sampleDeserialisierung in Sample-Slotf(SamplePtr<SampleType const>)Assunção de posse; acesso de leitura via * / -> / Get() e verificação E2EDestruição (~SamplePtr) ou Reset(nullptr)Liberação do slot de memóriaResult(Anzahl verarbeiteter Samples)

Diagrama de sequência: sequência de interação no GetNewSamples() com transferência de posse e liberação de buffer. Fontes: [SWS_CM_11541], [SWS_CM_11547], [SWS_CM_90420], EXP ARAComAPI, p. 44, EXP ARAComAPI §5.3.5.4.

Cenários de erro

Ao utilizar o SamplePtr, devem ser observadas condições de contorno e fontes de erro específicas:

  • Esgotamento da cota de buffer: a cada chamada de GetNewSamples(), o middleware monitora se a quantidade de samples atualmente retidos pela aplicação excede a cota previamente assegurada na chamada de Subscribe(). Se a cota for excedida, o GetNewSamples() recusa a entrega de novos samples e retorna, em vez disso, um ara::core::ErrorCode (EXP ARAComAPI, p. 44, EXP ARAComAPI, p. 45).
  • Invalidade por perda de assinatura ou destruição do proxy: o SamplePtr comporta-se de forma determinística como um std::unique_ptr apenas enquanto o evento subjacente permanecer assinado e a instância de proxy de nível superior existir. Reter ponteiros além do término da assinatura ou da destruição do proxy é considerado uma violação das pré-condições.
  • Validade do ponteiro e estado nulo: por meio de operator bool(), é possível avaliar o estado de ocupação do ponteiro ([SWS_CM_11543]). A desreferenciação de um ponteiro vazio via operator* ou operator-> leva a comportamento indefinido. Todos os métodos de acesso e modificação são declarados como noexcept ([SWS_CM_11541], [SWS_CM_11542], [SWS_CM_11546]).
  • Erros de validação E2E: um ponteiro recebido de forma válida não garante obrigatoriamente dados de transmissão livres de erros; por meio do valor de retorno de GetProfileCheckStatus(), a aplicação deve verificar se a proteção End-to-End sinaliza corrupção de dados ou atrasos de transmissão ([SWS_CM_90420]).

Este guia de classe foi gerado por um assistente de curadoria de IA com base nas especificações AUTOSAR para Adaptive Platform Release R25-11.

Mapa de membros

Diagrama de classes

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->()

Vista de detalhes

Selecione uma entrada no índice.

Construtores e destrutor

SamplePtr função 4

Default constructor

Sobrecargas 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 função

Destructor

~SamplePtr () noexcept;

Métodos

Get função

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 função

Replaces the managed object.

void Reset (std::nullptr_t other) noexcept;
Swap função

Swaps the managed object.

void Swap (SamplePtr &other) noexcept;

Operadores

operator bool função

Checks if the stored pointer is null

explicit operator bool () const noexcept;
operator* função

Dereferences the stored pointer.

T & operator* () const noexcept;
operator-> função

Dereferences the stored pointer.

T * operator-> () const noexcept;
operator= função 3

Copy assignment constructor deletion

Sobrecargas = 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

Documentação dos métodos

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 1cc8beae7ae3 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

Utilização e semântica

A função Get é uma função-membro sem parâmetros da classe ara::com::SamplePtr do cabeçalho ara/com/service/sample_ptr.h [SWS_CM_11546]. Retorna de forma síncrona um ponteiro bruto do tipo T* para o objeto gerido pela instância [SWS_CM_11546]. Ao contrário de consultas assíncronas de campos de serviço, que disponibilizam um ara::core::Future [SWS_CM_00112], este acesso ocorre imediatamente na thread chamadora.

Tratamento de erros e condições de contorno

O método é declarado como noexcept e especificado como seguro face a exceções (exception safe) [SWS_CM_11546]; não ocorrem estados de erro através de exceções C++. Se a instância não gerir atualmente nenhum objeto, o ponteiro retornado será presumivelmente nullptr. Pergunta Q-d850bd8ee144369a (aberta) Antes do processamento posterior do dado referenciado, deve assegurar-se que a monitorização E2E apresenta o estado ara::com::e2e::SMState::kValid e que a verificação de estado do perfil não indicou qualquer erro [SWS_CM_90422].

Interação e distinção

Na gestão de comunicações, Get serve para o acesso direto a dados de valores recebidos (amostras), tal como são disponibilizados no âmbito da gestão de amostras AUTOSAR_AP_EXP_ARAComAPI §10 «GetNewSamples». Esta função deve ser claramente delimitada de outras operações de Get:

  • Getter de campo: a obtenção de campos de serviço no proxy ocorre via Get() com o retorno de um ara::core::Future [SWS_CM_00112], para o qual pode ser registado um manipulador do lado do servidor [SWS_CM_00114].
  • Estado E2E: o estado de monitorização de um getter de campo é determinado separadamente via GetE2EStateMachineStateGetter [SWS_CM_00145].

Este texto foi criado por uma IA e baseia-se no release AUTOSAR R25-11.

Guia do implementador em breve (complexidade 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#4cb2d0d4
Content hash
4cb2d0d4
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

função 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#de3b7dce
Content hash
de3b7dce
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 0a03c7966b10 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

A função-membro Reset da classe ara::com::SamplePtr serve para reinicializar o ponteiro para o objeto gerido [SWS_CM_11545]. Como parâmetro, aceita o valor other do tipo std::nullptr_t. A chamada substitui o objeto atualmente detido por um ponteiro nulo e não retorna nenhum valor (void) [SWS_CM_11545].

No que concerne ao tratamento de erros e à segurança face a exceções, o método é declarado com noexcept e especificado como totalmente seguro face a exceções (exception safe) [SWS_CM_11545]. Não são lançadas exceções C++ nem são reportados códigos de erro específicos.

No sistema global, a libertação de instâncias SamplePtr cumpre uma pré-condição essencial para evitar erros de memória:

Interpretação: a chamada explícita de Reset(nullptr) deverá ser, em cenários de aplicação, o meio direto para renunciar deterministicamente à posse de uma amostra de evento antes de tais transições de ciclo de vida, caso o ponteiro não saia automaticamente do seu âmbito de validade. Pergunta Q-a615fa4078ab03ce (aberta)

Esta nota de uso foi criada de forma automatizada com base na especificação AUTOSAR R25-11.

Guia do implementador em breve (complexidade 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#76f66b30
Content hash
76f66b30
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

função 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#45a8402f
Content hash
45a8402f
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

função 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#7a2b0e26
Content hash
7a2b0e26
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

função 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#b3d0cdf3
Content hash
b3d0cdf3
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

função 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#3c7372a5
Content hash
3c7372a5
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 18d4b3f3f0f9 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

usar

A função Swap é um método-membro da classe ara::com::SamplePtr e serve para trocar o objeto atualmente gerido por outra instância ([SWS_CM_11544]). A interface está definida no cabeçalho ara/com/service/sample_ptr.h (AUTOSAR_AP_SWS_CommunicationManagement §8.9.1.1.3.4 «Swap»).

A chamada ocorre de forma síncrona e espera o seguinte parâmetro:

  • other: referência a outra instância de ara::com::SamplePtr cujo objeto gerido é trocado com o de *this ([SWS_CM_11544]).

O método não possui valor de retorno (void) ([SWS_CM_11544]).

Tratamento de erros

A assinatura é declarada com noexcept e classificada como segura face a exceções (exception safe) ([SWS_CM_11544]). A chamada não lança exceções e não retorna códigos de erro.

Simultaneidade e restrições

Como Swap altera o estado de dois objetos (*this e other) em simultâneo, chamadas paralelas em pelo menos uma das instâncias envolvidas presumivelmente não serão thread-safe sem sincronização externa. Pergunta Q-d906e8c05aefbd15 (aberta)

Interação

O método é parte integrante da classe ara::com::SamplePtr ([SWS_CM_11544]). Permite a transferência eficiente de propriedade ou a nova atribuição de amostras de dados recebidas em fluxos de comunicação, sem que o objeto de dados úteis subjacente tenha de ser copiado.

Esta nota de uso foi gerada automaticamente com base nos documentos de especificação.

Guia do implementador em breve (complexidade 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#2ea091ea
Content hash
2ea091ea
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

função 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#78c3bc94
Content hash
78c3bc94
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

função 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#2dc10626
Content hash
2dc10626
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

função 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#02905181
Content hash
02905181
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

função 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#d2d44049
Content hash
d2d44049
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

função 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#97e7011c
Content hash
97e7011c
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

função 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#19bec8a4
Content hash
19bec8a4
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

função ~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#144b6211
Content hash
144b6211
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