DEENESPTFRRUARHIKOZHNL

класс ara::diag::DiagnosticSovdContentElementDataWithKey

[SWS_DM_02375] Upstream: RS_Diag_04260

class DiagnosticSovdContentElementDataWithKey {...};

A DiagnosticSovdContentElementData with associated key.

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 · Температура: не регулируется · Промпт: 816c129f74ba Происхождение Открытые вопросы (2)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Инкапсулирует элемент диагностического содержимого SOVD вместе с идентификатором ключа для операций чтения и записи.

Класс служит для инкапсуляции элемента диагностического содержимого SOVD вместе с уникальным идентификатором ключа [SWS_DM_02375]. Он заполняется Diagnostic Management при операциях записи согласно ASAM SOVD и передается далее в GenericDiagnosticSovdContent::Write [SWS_DM_02166]. Все функции-члены специфицированы как потокобезопасные и исключебно-безопасные, при этом ошибочные присваивания сообщаются через ara::core::Result с DiagErrc::kInvalidArgument [SWS_DM_02381].

Контекст

Класс ara::diag::DiagnosticSovdContentElementDataWithKey служит в рамках Adaptive Platform капсулой данных для отдельного элемента диагностического содержимого в контексте ASAM SOVD (Service-Oriented Vehicle Diagnostics) и сопоставляет объекту полезных данных уникальный идентификатор ключа [SWS_DM_02375]. Данные SOVD структурируются через элемент модели DiagnosticSovdContent, состоящий как минимум из одного DiagnosticSovdContentElement AUTOSAR_AP_SWS_Diagnostics §7.3.3.3.2 «SOVD Data – Conversion». В то время как запросы на чтение обрабатываются через GenericDiagnosticSovdContent::Read [SWS_DM_01432], класс взаимодействует преимущественно с Diagnostic Management (DM) и сервисным интерфейсом GenericDiagnosticSovdContent::Write для выполнения структурированного доступа на запись к ресурсам данных [SWS_DM_01431], [SWS_DM_02166].

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

Инстанцирование и уничтожение ara::diag::DiagnosticSovdContentElementDataWithKey осуществляются с соблюдением принципа RAII. Деструктор, а также соответствующие операции копирования и перемещения (конструкторы перемещения/копирования и операторы присваивания) явно объявлены как noexcept [SWS_DM_02376]. Что касается отношений владения, класс принимает полезное содержимое по значению в SetContent [SWS_DM_02381], тогда как имя ключа передается как ara::core::StringView [SWS_DM_02378]. Diagnostic Management, предположительно, внутренне гарантирует, что базовая строка остается действительной во время доступа или копируется во внутреннюю память. Вопрос Q-f00f62f43629a773 (открытый) Все функции-члены класса, согласно спецификации, спроектированы как потокобезопасные и исключебно-безопасные [SWS_DM_02376], [SWS_DM_02377], [SWS_DM_02378], [SWS_DM_02379], [SWS_DM_02380], [SWS_DM_02381].

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

Типичный сценарий использования возникает при получении запроса на запись SOVD для ресурса данных сущности [SWS_DM_01431]. Diagnostic Management создает или использует экземпляр и сначала с помощью SetName задает shortName соответствующего DiagnosticSovdContentElement [SWS_DM_02166], [SWS_DM_02378]. Затем входящее значение преобразуется на основе правил конвертации AUTOSAR_AP_SWS_Diagnostics §7.3.3.3.2 «SOVD Data – Conversion» и присваивается через SetContent [SWS_DM_02166], [SWS_DM_02381]. Агрегированные таким образом данные затем передаются в GenericDiagnosticSovdContent::Write [SWS_DM_02166]. Потребители могут запросить имя ключа через GetName [SWS_DM_02377] и проверить либо изменить содержимое данных через константную или неконстантную перегрузку GetContent [SWS_DM_02379], [SWS_DM_02380].

Последовательность записи данных SOVD через DiagnosticSovdContentElementDataWithKeySOVD-ClientDiagnostic ManagementDiagnosticSovdContentElementDataWithKeyGenericDiagnosticSovdContentSOVD Write a data resourceSetName(shortName)SetContent(content)ara::core::Result<void>Write(DiagnosticSovdContentData)GetName() / GetContent()Имя ключа & ссылка на данныеSchreibstatusSOVD-Antwort

Диаграмма последовательности: поток вызовов и данных при обработке запроса на запись SOVD с использованием DiagnosticSovdContentElementDataWithKey. Источники: [SWS_DM_01431], [SWS_DM_02166], [SWS_DM_02378], [SWS_DM_02381].

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

В случае ошибки класс отказывается от исключений C++ и сообщает о сбоях через возвращаемый тип ara::core::Result<void> метода SetContent [SWS_DM_02381]. Если установка содержимого не удалась — например, если переданный тип содержимого не соответствует целевой структуре или является недействительным, — возвращается код ошибки DiagErrc::kInvalidArgument [SWS_DM_02381]. Вызывающая сторона должна проверить возвращенный результат перед передачей объекта в GenericDiagnosticSovdContent::Write [SWS_DM_02166].

Настоящее руководство по классу основано на спецификации AUTOSAR AP выпуска R25-11. Все утверждения подтверждены требованиями SWS и разделами документации интерфейса ara::diag.

Карта членов

Конструкторы и деструктор

1

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

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

G nara__diag__DiagnosticSovdContentElementDataWithKey42 DiagnosticSovdContentElementDataWithKey + ~DiagnosticSovdContentElementDataWithKey() + GetContent() + GetName() + SetContent() + SetName()

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

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

Конструкторы и деструктор

Declare the Dtor and move/copy constructors/assignments .

Методы

GetContent функция 2

Gets the associated content.

Перегрузки GetContent 2
auto GetContent () noexcept -> DiagnosticSovdContentElementData &; SWS_DM_02379
auto GetContent () const noexcept -> DiagnosticSovdContentElementData const &; SWS_DM_02380
GetName функция

Gets the name of the key.

auto GetName () const noexcept -> ara::core::StringView;
SetContent функция

Sets the associated content.

auto SetContent (DiagnosticSovdContentElementData content) noexcept -> ara::core::Result< void >;
SetName функция

Sets the name of the key.

void SetName (ara::core::StringView name) noexcept;

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

функция GetContent [SWS_DM_02379] Upstream: RS_Diag_04260

auto GetContent () noexcept -> DiagnosticSovdContentElementData &;

Gets the associated content.

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

Rückgabewert

TypBeschreibung
DiagnosticSovdContentElementDataReference to the associated content

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

Record
AUTOSAR/AP/record/SWS_DM_02379
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02379@rel:R25-11#7c5c7bda
Content hash
7c5c7bda
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02379
Status: valid/unmigrated Version: rel:R25-11#9baa2f7d 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_02379@rel:R25-11#9baa2f7d
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

функция GetContent [SWS_DM_02380] Upstream: RS_Diag_04260

auto GetContent () const noexcept -> DiagnosticSovdContentElementData const &;

Gets the associated content.

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

Rückgabewert

TypBeschreibung
DiagnosticSovdContentReference to the associated content ElementData const

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

Record
AUTOSAR/AP/record/SWS_DM_02380
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02380@rel:R25-11#a239da31
Content hash
a239da31
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02380
Status: valid/unmigrated Version: rel:R25-11#95b7050b 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_02380@rel:R25-11#95b7050b
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

функция GetName [SWS_DM_02377] Upstream: RS_Diag_04260

auto GetName () const noexcept -> ara::core::StringView;

Gets the name of the key.

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

Rückgabewert

TypBeschreibung
ara::core::StringViewThe name of the key

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

Record
AUTOSAR/AP/record/SWS_DM_02377
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02377@rel:R25-11#05812756
Content hash
05812756
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02377
Status: valid/unmigrated Version: rel:R25-11#70bc13b7 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_02377@rel:R25-11#70bc13b7
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

функция SetContent [SWS_DM_02381] Upstream: RS_Diag_04260

auto SetContent (DiagnosticSovdContentElementData content) noexcept -> ara::core::Result< void >;

Sets the associated content.

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

Parameter (in)

ParameterBeschreibung
contentThe content to set

Rückgabewert

TypBeschreibung
ara::core::Result< void >void result or error if the content is of type ContentData

Fehler

FehlercodeBeschreibung
DiagErrc::kInvalidArgumentrollback_semantics e.g. kPreFailed with internal debouncing

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

Record
AUTOSAR/AP/record/SWS_DM_02381
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02381@rel:R25-11#e5073303
Content hash
e5073303
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02381
Status: valid/unmigrated Version: rel:R25-11#019a85d8 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_02381@rel:R25-11#019a85d8
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

функция SetName [SWS_DM_02378] Upstream: RS_Diag_04260

void SetName (ara::core::StringView name) noexcept;

Sets the name of the key.

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

Parameter (in)

ParameterBeschreibung
nameThe name of the key

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_DM_02378
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02378@rel:R25-11#e33b7c7e
Content hash
e33b7c7e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02378
Status: valid/unmigrated Version: rel:R25-11#f02ced67 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_02378@rel:R25-11#f02ced67
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

функция ~DiagnosticSovdContentElementDataWithKey [SWS_DM_02376] Upstream: RS_Diag_04260

~DiagnosticSovdContentElementDataWithKey () noexcept;

Declare the Dtor and move/copy constructors/assignments .

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

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

Record
AUTOSAR/AP/record/SWS_DM_02376
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02376@rel:R25-11#31277e64
Content hash
31277e64
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02376
Status: valid/unmigrated Version: rel:R25-11#c6febcde 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_02376@rel:R25-11#c6febcde
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