DEENESPTFRRUARHIKOZHNL

classe ara::diag::DiagnosticSovdArrayContentElementDataConstView

[SWS_DM_02248] Upstream: RS_Diag_04260

class DiagnosticSovdArrayContentElementDataConstView {...};

Const view on a DiagnosticSovdContentElementData with Array type.

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopenamespace ara::diag

Guia do utilizadorGERADO POR IA

Permite o acesso thread-safe, somente leitura, a elementos de array de um objeto de dados de diagnóstico SOVD.
GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 46670b91e1ad Procedência Perguntas em aberto (2)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

Permite o acesso thread-safe, somente leitura, a elementos de array de um objeto de dados de diagnóstico SOVD.

A classe ara::diag::DiagnosticSovdArrayContentElementDataConstView oferece uma visualização somente leitura para um DiagnosticSovdContentElementData do tipo array visando à consulta eficiente de diagnóstico [SWS_DM_02248]. As aplicações verificam inicialmente o estado de integridade por meio de HasError() e, em seguida, acessam os elementos do array aleatoriamente via operator[] ou iterativamente via CBegin() e CEnd() [SWS_DM_02253]. Todas as operações são executadas de modo thread-safe bem como seguro contra exceções (noexcept), pressupondo, contudo, a validade contínua do elemento base referenciado.

Contexto

A classe ara::diag::DiagnosticSovdArrayContentElementDataConstView disponibiliza uma visão somente de leitura (const view) para um elemento de dados de diagnóstico do tipo array dentro da arquitetura de diagnóstico do Adaptive AUTOSAR para SOVD (Service-Oriented Vehicle Diagnostics) [SWS_DM_02248] (AUTOSAR_AP_SWS_Diagnostics §8.60.3 «Class: DiagnosticSovdArrayContentElementDataConstView»). Ela permite o acesso de leitura controlado a elementos sequenciais de um conteúdo de diagnóstico, sem a necessidade de copiar o buffer de dados subjacente.

Entre os principais parceiros de interação da classe estão:

  • a aplicação de diagnóstico chamadora, que avalia dados de array,
  • o DiagnosticSovdContentElementData referenciado, que armazena os elementos de array concretos e para o qual é feita referência em caso de acesso aleatório via [SWS_DM_02253],
  • o tipo auxiliar DiagnosticSovdArrayContentElementDataConstIterator, que é gerado para iterações em conformidade com o padrão sobre os elementos do array [SWS_DM_02254].
diag_kontext anwendung Diagnose-Anwendung view DiagnosticSovdArrayContentElementDataConstView anwendung->view liest element DiagnosticSovdContentElementData view->element referenziert const iterator DiagnosticSovdArrayContentElementDataConstIterator view->iterator erzeugt iterator->element traversiert

Diagrama de contexto: integração da view entre aplicação de diagnóstico, elemento de base e iteradores. Fontes: [SWS_DM_02248], [SWS_DM_02253], [SWS_DM_02254].

Ciclo de vida

A classe está disponível através do cabeçalho #include "ara/diag/diagnostic_sovd_content_element_data.h" [SWS_DM_02248]. Como uma classe puramente de visão, ela não possui a propriedade dos dados reais do array. Interpretação: O tempo de vida de uma instância de view está vinculado à validade do DiagnosticSovdContentElementData subjacente; o objeto de dados deve permanecer na memória durante o período de utilização da view. Pergunta Q-1a3079bdd09b4ddd (aberta)

Em relação à simultaneidade, todas as funções-membro da classe são explicitamente declaradas como thread-safe [SWS_DM_02250], [SWS_DM_02253]. Múltiplas threads podem, portanto, acessar simultaneamente a mesma instância de view para leitura (interpretação: desde que o objeto de dados subjacente não seja modificado concorrentemente por operações de escrita). Pergunta Q-61e5fa3990052e70 (aberta) Além disso, todos os métodos garantem segurança de exceção completa (exception safe) e são especificados, sem exceção, com noexcept [SWS_DM_02249], [SWS_DM_02251]. Por se tratar de uma visão imutável, a classe não apresenta transições de estado internas ou fases complexas de ciclo de vida.

Caminho de utilização

O fluxo regular para o uso dos dados de array divide-se em verificação de integridade, consulta de dimensões e extração de dados:

  1. Verificação de integridade: antes do acesso, a aplicação deve verificar via HasError() se o elemento de conteúdo está livre de erros [SWS_DM_02249].
  2. Consulta de dimensões: através de Empty() é possível verificar se o array contém elementos ([SWS_DM_02252], AUTOSAR_AP_SWS_Diagnostics §8.60.3.1.1.5 «Empty»). A quantidade atual de elementos é fornecida por Size() [SWS_DM_02250], enquanto Capacity() retorna a capacidade reservada do array ([SWS_DM_02251], AUTOSAR_AP_SWS_Diagnostics §8.60.3.1.1.4 «Capacity»).
  3. Acesso aos dados: estão disponíveis dois caminhos para o acesso aos elementos do array:
Fluxo típico de leitura e iteraçãoDiagnose-AnwendungDiagnosticSovdArrayContentElementDataConstViewHasError()ara::core::Result<void> (Erfolg)Size()std::size_t (Elementanzahl)altDirektzugriff per Indexoperator[](index)ara::core::Result<reference_wrapper<...>>Sequenzielle IterationCBegin()DiagnosticSovdArrayContentElementDataConstIteratorCEnd()DiagnosticSovdArrayContentElementDataConstIterator

Diagrama de sequência: sequência típica para verificação de erros, determinação de tamanho e consulta de elementos. Fontes: [SWS_DM_02249], [SWS_DM_02250], [SWS_DM_02253], [SWS_DM_02256], [SWS_DM_02257].

Cenários de erro

A classe abre mão de C++ Exceptions e reporta erros funcionais via ara::core::Result:

  • Conteúdo de dados incorreto: caso o elemento de conteúdo contenha dados incorretos, HasError() não fornece um Result de sucesso vazio, mas sim um código de erro do tipo ara::diag::DiagSovdErrc [SWS_DM_02249].
  • Conflito de tipos no acesso por índice: o operator[] exige obrigatoriamente que o elemento referenciado seja de fato do tipo ArrayContentElementData [SWS_DM_02253]. Se este não for o caso, a chamada falha e retorna um objeto de erro correspondente no Result em vez de uma referência.
  • Limites de índice: como operator[] só pode ser chamado dentro da faixa válida, os chamadores devem assegurar previamente via Size() [SWS_DM_02250] ou Empty() [SWS_DM_02252] que o índice solicitado existe.

Este guia baseia-se na especificação AUTOSAR Adaptive R25-11.

Mapa de membros

Diagrama de classes

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

G nara__diag__DiagnosticSovdArrayContentElementDataConstView162 DiagnosticSovdArrayContentElementDataConstView + Begin() + CBegin() + CEnd() + Capacity() + Empty() + End() + HasError() + Size() + operator[]()

Vista de detalhes

Selecione uma entrada no índice.

Métodos

Begin função

Returns the begin operator of an array. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

auto Begin () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
Capacity função

Returns the capacity of the Array content element. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

auto Capacity () const noexcept -> std::size_t;
CBegin função

Returns the begin operator of an array. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

auto CBegin () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
CEnd função

Returns the end operator of an array. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

auto CEnd () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
Empty função

Returns if the Array is empty. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

auto Empty () const noexcept -> bool;
End função

Returns the end operator of an array. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

auto End () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
HasError função

Returns if the content contains an error.

auto HasError () const noexcept -> ara::core::Result< void >;
Size função

Returns the size of the Array content element. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

auto Size () const noexcept -> std::size_t;

Operadores

operator[] função

Access the content element with specified index of an array. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

auto operator[] (std::size_t index) const noexcept -> ara::core::Result< std::reference_wrapper< DiagnosticSovdContent ElementData const > >; DIRECTION NOT index -- DEFINED

Documentação dos métodos

função Begin [SWS_DM_02254] Upstream: RS_Diag_04260

auto Begin () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;

Returns the begin operator of an array. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataConstView
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
DiagnosticSovdArrayContentElementDataConstIteratorThe iterator

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

Record
AUTOSAR/AP/record/SWS_DM_02254
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02254@rel:R25-11#86b5699f
Content hash
86b5699f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02254
Status: valid/unmigrated Version: rel:R25-11#656898ea Versionshistorie & Revisions (1 transition)
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_DM_02254@rel:R25-11#656898ea
Point-in-Time History:
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 CBegin [SWS_DM_02256] Upstream: RS_Diag_04260

auto CBegin () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;

Returns the begin operator of an array. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataConstView
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
DiagnosticSovdArrayContentElementDataConstIteratorThe iterator

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

Record
AUTOSAR/AP/record/SWS_DM_02256
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02256@rel:R25-11#e17b2907
Content hash
e17b2907
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02256
Status: valid/unmigrated Version: rel:R25-11#b1016bc5 Versionshistorie & Revisions (1 transition)
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_DM_02256@rel:R25-11#b1016bc5
Point-in-Time History:
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 CEnd [SWS_DM_02257] Upstream: RS_Diag_04260

auto CEnd () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;

Returns the end operator of an array. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataConstView
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
DiagnosticSovdArrayContentElementDataConstIteratorThe iterator

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

Record
AUTOSAR/AP/record/SWS_DM_02257
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02257@rel:R25-11#d4fc6e06
Content hash
d4fc6e06
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02257
Status: valid/unmigrated Version: rel:R25-11#5c191314 Versionshistorie & Revisions (1 transition)
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_DM_02257@rel:R25-11#5c191314
Point-in-Time History:
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 Capacity [SWS_DM_02251] Upstream: RS_Diag_04260

auto Capacity () const noexcept -> std::size_t;

Returns the capacity of the Array content element. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataConstView
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
std::size_tThe capacity of the ArrayContentElementData

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

Record
AUTOSAR/AP/record/SWS_DM_02251
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02251@rel:R25-11#0f0dfdb7
Content hash
0f0dfdb7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02251
Status: valid/unmigrated Version: rel:R25-11#dd87bdcc Versionshistorie & Revisions (1 transition)
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_DM_02251@rel:R25-11#dd87bdcc
Point-in-Time History:
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 Empty [SWS_DM_02252] Upstream: RS_Diag_04260

auto Empty () const noexcept -> bool;

Returns if the Array is empty. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataConstView
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
boolIf the array is empty

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

Record
AUTOSAR/AP/record/SWS_DM_02252
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02252@rel:R25-11#656cff12
Content hash
656cff12
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02252
Status: valid/unmigrated Version: rel:R25-11#a85c7949 Versionshistorie & Revisions (1 transition)
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_DM_02252@rel:R25-11#a85c7949
Point-in-Time History:
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 End [SWS_DM_02255] Upstream: RS_Diag_04260

auto End () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;

Returns the end operator of an array. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataConstView
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
DiagnosticSovdArrayContentElementDataConstIteratorThe iterator

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

Record
AUTOSAR/AP/record/SWS_DM_02255
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02255@rel:R25-11#468b08db
Content hash
468b08db
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02255
Status: valid/unmigrated Version: rel:R25-11#5d7352d1 Versionshistorie & Revisions (1 transition)
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_DM_02255@rel:R25-11#5d7352d1
Point-in-Time History:
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 HasError [SWS_DM_02249] Upstream: RS_Diag_04260

auto HasError () const noexcept -> ara::core::Result< void >;

Returns if the content contains an error.

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataConstView
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >void result if it doesn’t contain an error, otherwise the ara::diag::DiagSovdErrc

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

Record
AUTOSAR/AP/record/SWS_DM_02249
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02249@rel:R25-11#e4df74a2
Content hash
e4df74a2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02249
Status: valid/unmigrated Version: rel:R25-11#9d7e1ea6 Versionshistorie & Revisions (1 transition)
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_DM_02249@rel:R25-11#9d7e1ea6
Point-in-Time History:
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 Size [SWS_DM_02250] Upstream: RS_Diag_04260

auto Size () const noexcept -> std::size_t;

Returns the size of the Array content element. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataConstView
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
std::size_tThe size of the ArrayContentElementData

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

Record
AUTOSAR/AP/record/SWS_DM_02250
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02250@rel:R25-11#39d2ebf2
Content hash
39d2ebf2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02250
Status: valid/unmigrated Version: rel:R25-11#e76f7f29 Versionshistorie & Revisions (1 transition)
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_DM_02250@rel:R25-11#e76f7f29
Point-in-Time History:
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_DM_02253] Upstream: RS_Diag_04260

auto operator[] (std::size_t index) const noexcept -> ara::core::Result< std::reference_wrapper< DiagnosticSovdContent ElementData const > >; DIRECTION NOT             index                       -- DEFINED

Access the content element with specified index of an array. This DiagnosticSovdContentElementData shall be of type ArrayContentElementData

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataConstView
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<std::reference_wrapper<DiagnosticSovdContentElementData const > >reference to the content element or an error if DiagnosticSovdContentElementData is not of type ArrayContentElementData

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

Record
AUTOSAR/AP/record/SWS_DM_02253
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02253@rel:R25-11#077b34d6
Content hash
077b34d6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02253
Status: valid/unmigrated Version: rel:R25-11#9a0c8a2c Versionshistorie & Revisions (1 transition)
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_DM_02253@rel:R25-11#9a0c8a2c
Point-in-Time History:
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