DEENESPTFRRUARHIKOZHNL

clase 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

Guía del usuarioGENERADO POR IA

Permite el acceso de solo lectura y seguro para subprocesos a elementos de array de un objeto de datos de diagnóstico SOVD.
GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 46670b91e1ad Procedencia Preguntas abiertas (2)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

Permite el acceso de solo lectura y seguro para subprocesos a elementos de array de un objeto de datos de diagnóstico SOVD.

La clase ara::diag::DiagnosticSovdArrayContentElementDataConstView ofrece una vista de solo lectura sobre un DiagnosticSovdContentElementData de tipo array para una consulta de diagnóstico eficiente [SWS_DM_02248]. Las aplicaciones comprueban en primer lugar el estado de integridad mediante HasError() y, a continuación, acceden a los elementos del array, ya sea de forma aleatoria mediante operator[] o de forma iterativa mediante CBegin() y CEnd() [SWS_DM_02253]. Todas las operaciones están implementadas como thread-safe y seguras frente a excepciones (noexcept), pero requieren la validez continua del elemento base referenciado.

Contexto

La clase ara::diag::DiagnosticSovdArrayContentElementDataConstView proporciona una vista de solo lectura (const view) sobre un elemento de datos de diagnóstico de tipo array dentro de la arquitectura de diagnóstico de Adaptive AUTOSAR para SOVD (Service-Oriented Vehicle Diagnostics) [SWS_DM_02248] (AUTOSAR_AP_SWS_Diagnostics §8.60.3 «Class: DiagnosticSovdArrayContentElementDataConstView»). Permite el acceso de lectura controlado a elementos secuenciales de un contenido de diagnóstico sin necesidad de copiar el búfer de datos subyacente.

Entre las principales partes que interactúan con la clase se incluyen:

  • la aplicación de diagnóstico invocadora, que evalúa los datos del array,
  • el DiagnosticSovdContentElementData referenciado, que almacena los elementos concretos del array y al que se hace referencia en el acceso aleatorio mediante [SWS_DM_02253],
  • el tipo auxiliar DiagnosticSovdArrayContentElementDataConstIterator, que se crea para iteraciones conformes al estándar sobre los elementos del 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: Integración de la vista entre la aplicación de diagnóstico, el elemento base y los iteradores. Fuentes: [SWS_DM_02248], [SWS_DM_02253], [SWS_DM_02254].

Ciclo de vida

La clase está disponible a través del encabezado #include "ara/diag/diagnostic_sovd_content_element_data.h" [SWS_DM_02248]. Al ser una clase de vista pura, no posee la propiedad de los datos reales del array. Interpretación: La vida útil de una instancia de vista está ligada a la validez del DiagnosticSovdContentElementData subyacente; el objeto de datos debe permanecer en memoria mientras se utilice la vista. Pregunta Q-1a3079bdd09b4ddd (abierta)

En cuanto a la concurrencia, todas las funciones miembro de la clase están declaradas explícitamente como thread-safe [SWS_DM_02250], [SWS_DM_02253]. Por lo tanto, múltiples hilos pueden acceder simultáneamente en modo de lectura a la misma instancia de vista (interpretación: siempre que el objeto de datos subyacente no se modifique de forma concurrente mediante operaciones de escritura). Pregunta Q-61e5fa3990052e70 (abierta) Además, todos los métodos garantizan una seguridad total frente a excepciones (exception safe) y están especificados sin excepción con noexcept [SWS_DM_02249], [SWS_DM_02251]. Dado que se trata de una vista inmutable, la clase no presenta transiciones de estado internas ni fases complejas en su ciclo de vida.

Ruta de uso

El flujo regular para la utilización de los datos del array se divide en verificación de integridad, consulta de dimensiones y extracción de datos:

  1. Verificación de integridad: antes de acceder, la aplicación debería verificar mediante HasError() si el elemento de contenido está presente sin errores [SWS_DM_02249].
  2. Consulta de dimensiones: mediante Empty() se puede comprobar si el array contiene elementos ([SWS_DM_02252], AUTOSAR_AP_SWS_Diagnostics §8.60.3.1.1.5 «Empty»). Size() proporciona el número actual de elementos [SWS_DM_02250], mientras que Capacity() devuelve la capacidad reservada del array ([SWS_DM_02251], AUTOSAR_AP_SWS_Diagnostics §8.60.3.1.1.4 «Capacity»).
  3. Acceso a datos: existen dos vías disponibles para acceder a los elementos del array:
Flujo típico de lectura e iteraciónDiagnose-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 secuencia: secuencia típica para la verificación de errores, determinación del tamaño y consulta de elementos. Fuentes: [SWS_DM_02249], [SWS_DM_02250], [SWS_DM_02253], [SWS_DM_02256], [SWS_DM_02257].

Escenarios de error

La clase prescinde de excepciones de C++ y notifica errores funcionales a través de ara::core::Result:

  • Contenido de datos erróneo: si el elemento de contenido incluye datos erróneos, HasError() no devuelve un resultado de éxito vacío, sino un código de error de tipo ara::diag::DiagSovdErrc [SWS_DM_02249].
  • Conflicto de tipos en el acceso por índice: el operator[] exige imperativamente que el elemento referenciado sea efectivamente de tipo ArrayContentElementData [SWS_DM_02253]. Si este no es el caso, la llamada falla y devuelve el correspondiente objeto de error en el Result en lugar de una referencia.
  • Límites del índice: dado que operator[] solo debe invocarse dentro del rango válido, los llamadores deberían asegurarse previamente mediante Size() [SWS_DM_02250] o Empty() [SWS_DM_02252] de que el índice solicitado existe.

Esta guía se basa en la especificación AUTOSAR Adaptive R25-11.

Mapa de miembros

Diagrama de clases

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 detalle

Selecciona una entrada en el índice.

Métodos

Begin función

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

auto Begin () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
Capacity función

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

auto Capacity () const noexcept -> std::size_t;
CBegin función

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

auto CBegin () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
CEnd función

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

auto CEnd () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
Empty función

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

auto Empty () const noexcept -> bool;
End función

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

auto End () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
HasError función

Returns if the content contains an error.

auto HasError () const noexcept -> ara::core::Result< void >;
Size función

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

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

Operadores

operator[] función

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

Documentación de los métodos

función 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#e5f32249
Content hash
e5f32249
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

función 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#0f2e931c
Content hash
0f2e931c
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

función 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#f654f42b
Content hash
f654f42b
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

función 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#b5618057
Content hash
b5618057
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

función 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#85341b30
Content hash
85341b30
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

función 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#d1b7d882
Content hash
d1b7d882
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

función 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#b32f35bb
Content hash
b32f35bb
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

función 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#341cfb28
Content hash
341cfb28
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

función 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#d4bacb1b
Content hash
d4bacb1b
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