DEENESPTFRRUARHIKOZHNL

класс 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

Руководство пользователяСОЗДАНО ИИ

Обеспечивает потокобезопасный доступ только для чтения к элементам массива объекта диагностических данных SOVD.
СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 46670b91e1ad Происхождение Открытые вопросы (2)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Обеспечивает потокобезопасный доступ только для чтения к элементам массива объекта диагностических данных SOVD.

Класс ara::diag::DiagnosticSovdArrayContentElementDataConstView предоставляет доступное только для чтения представление на DiagnosticSovdContentElementData типа массива для эффективного диагностического опроса [SWS_DM_02248]. Приложения сначала проверяют статус целостности с помощью HasError(), а затем обращаются к элементам массива либо произвольным образом через operator[], либо итеративно через CBegin() и CEnd() [SWS_DM_02253]. Все операции реализованы как thread-safe и исключебно-безопасные (noexcept), однако предполагают непрерывную валидность базового элемента, на который указывает ссылка.

Контекст

Класс ara::diag::DiagnosticSovdArrayContentElementDataConstView предоставляет доступное только для чтения представление (const view) на элемент диагностических данных типа массива в рамках диагностической архитектуры Adaptive AUTOSAR для SOVD (Service-Oriented Vehicle Diagnostics) [SWS_DM_02248] (AUTOSAR_AP_SWS_Diagnostics §8.60.3 «Class: DiagnosticSovdArrayContentElementDataConstView»). Он обеспечивает контролируемый доступ на чтение к последовательным элементам диагностического содержимого без необходимости копирования базового буфера данных.

К основным партнерам по взаимодействию класса относятся:

  • вызывающее диагностическое приложение, оценивающее данные массива,
  • ссылочный DiagnosticSovdContentElementData, который хранит конкретные элементы массива и на который осуществляется ссылка при произвольном доступе через [SWS_DM_02253],
  • вспомогательный тип DiagnosticSovdArrayContentElementDataConstIterator, создаваемый для стандартных итераций по элементам массива [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

Контекстная диаграмма: встраивание View между диагностическим приложением, базовым элементом и итераторами. Источники: [SWS_DM_02248], [SWS_DM_02253], [SWS_DM_02254].

Жизненный цикл

Класс доступен через заголовочный файл #include "ara/diag/diagnostic_sovd_content_element_data.h" [SWS_DM_02248]. Будучи чисто интерфейсным представлением, он не владеет собственно данными массива. Интерпретация: время жизни экземпляра представления привязано к действительности базового DiagnosticSovdContentElementData; объект данных должен оставаться в памяти на протяжении всего времени использования представления. Вопрос Q-1a3079bdd09b4ddd (открытый)

Что касается параллелизма, все функции-члены класса явно объявлены как thread-safe [SWS_DM_02250], [SWS_DM_02253]. Таким образом, несколько потоков могут одновременно обращаться к одному и тому же экземпляру представления на чтение (интерпретация: при условии, что базовый объект данных параллельно не изменяется операциями записи). Вопрос Q-61e5fa3990052e70 (открытый) Кроме того, все методы гарантируют полную безопасность исключений (exception safe) и без исключения специфицированы с noexcept [SWS_DM_02249], [SWS_DM_02251]. Поскольку речь идет о неизменяемом представлении, класс не имеет внутренних переходов состояний или сложных фаз жизненного цикла.

Путь использования

Обычный порядок использования данных массива подразделяется на проверку целостности, запрос размерности и извлечение данных:

  1. Проверка целостности: перед доступом приложению следует проверить через HasError(), присутствует ли элемент содержимого без ошибок [SWS_DM_02249].
  2. Запрос размерности: с помощью Empty() можно проверить, содержит ли массив элементы ([SWS_DM_02252], AUTOSAR_AP_SWS_Diagnostics §8.60.3.1.1.5 «Empty»). Текущее количество элементов возвращает Size() [SWS_DM_02250], тогда как Capacity() возвращает зарезервированную емкость массива ([SWS_DM_02251], AUTOSAR_AP_SWS_Diagnostics §8.60.3.1.1.4 «Capacity»).
  3. Доступ к данным: для доступа к элементам массива предусмотрено два пути:
Типичная последовательность чтения и итерацииDiagnose-AnwendungDiagnosticSovdArrayContentElementDataConstViewHasError()ara::core::Result<void> (Erfolg)Size()std::size_t (Elementanzahl)altDirektzugriff per Indexoperator[](index)ara::core::Result<reference_wrapper<...>>Sequenzielle IterationCBegin()DiagnosticSovdArrayContentElementDataConstIteratorCEnd()DiagnosticSovdArrayContentElementDataConstIterator

Диаграмма последовательности: типичная последовательность действий для проверки ошибок, определения размера и запроса элементов. Источники: [SWS_DM_02249], [SWS_DM_02250], [SWS_DM_02253], [SWS_DM_02256], [SWS_DM_02257].

Сценарии ошибок

Класс отказывается от исключений C++ и сообщает о функциональных ошибках через ara::core::Result:

  • Ошибочное содержимое данных: если элемент содержимого содержит ошибочные данные, HasError() возвращает не пустой результат успешного выполнения, а код ошибки типа ara::diag::DiagSovdErrc [SWS_DM_02249].
  • Конфликт типов при доступе по индексу: operator[] строго требует, чтобы элемент, на который указывает ссылка, действительно относился к типу ArrayContentElementData [SWS_DM_02253]. Если это не так, вызов завершается ошибкой и возвращает соответствующий объект ошибки в Result вместо ссылки.
  • Границы индекса: поскольку operator[] разрешено вызывать только в пределах допустимого диапазона, вызывающим сторонам следует предварительно убедиться через Size() [SWS_DM_02250] или Empty() [SWS_DM_02252], что запрошенный индекс существует.

Данное руководство основано на спецификации AUTOSAR Adaptive R25-11.

Карта членов

Диаграмма классов

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

Подробный вид

Выберите элемент в оглавлении.

Методы

Begin функция

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

auto Begin () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
Capacity функция

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

auto Capacity () const noexcept -> std::size_t;
CBegin функция

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

auto CBegin () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
CEnd функция

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

auto CEnd () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
Empty функция

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

auto Empty () const noexcept -> bool;
End функция

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

auto End () noexcept -> DiagnosticSovdArrayContentElementDataConst Iterator;
HasError функция

Returns if the content contains an error.

auto HasError () const noexcept -> ara::core::Result< void >;
Size функция

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

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

Операторы

operator[] функция

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

Документация методов

функция 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#d36a9757
Content hash
d36a9757
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

функция 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#4f577b41
Content hash
4f577b41
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

функция 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#fc3bfa35
Content hash
fc3bfa35
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

функция 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#8e7b0452
Content hash
8e7b0452
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

функция 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#9c718e19
Content hash
9c718e19
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

функция 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#e221f142
Content hash
e221f142
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

функция 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#5e8809b6
Content hash
5e8809b6
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

функция 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#aa637d36
Content hash
aa637d36
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

функция 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#ec487878
Content hash
ec487878
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