function Add [SWS_DM_02288] Upstream: RS_Diag_04260
auto Add (ara::core::StringView key, std::int64_t content_element) noexcept -> ara::core::Result< void >;
Adds an element with the specified key with signed integer as primitive value. This DiagnosticSovdContentElementData shall be of type RecordContentElementData or ContentData and the element to add shall not be of type ContentData
use
The synchronous function [SWS_DM_02288] inserts a signed integer value (std::int64_t) under the specified key key (ara::core::StringView) into an SOVD data structure. It is declared as a method of class ara::diag::DiagnosticSovdRecordContentElementDataView and included via header ara/diag/diagnostic_sovd_content_element_data.h.
Prerequisites and error handling
According to [SWS_DM_02288], the underlying DiagnosticSovdContentElementData object must be of type RecordContentElementData or ContentData, while the element to be added must not itself be a ContentData. The function is defined as noexcept and returns a ara::core::Result<void>. If the operation fails—such as when the target container has an incompatible type or the element cannot be added—the result contains an error code; interpretation: this is also likely to be the case for key collisions. Question Q-524c832a794559b7 (open)
Concurrency and Interaction
Execution is specified as thread-safe and exception safe [SWS_DM_02288]. Within the interface, type-identical overloads exist for unsigned integers ([SWS_DM_02289]), floating-point numbers ([SWS_DM_02290]), boolean values ([SWS_DM_02291]), strings ([SWS_DM_02292]), and nested data elements ([SWS_DM_02293]). The same method is also provided on the carrier class DiagnosticSovdContentElementData ([SWS_DM_02368]).
This usage note was generated automatically and is based on the AUTOSAR R25-11 specification.
Implementer's Guide to follow (complexity I1)
| Header-Datei | #include "ara/diag/diagnostic_sovd_content_element_data.h" |
|---|---|
| Scope | class ara::diag::DiagnosticSovdRecordContentElementDataView |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| key | The key |
| content_element | The content element to add |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result< void > | void result or an error if DiagnosticSovdContentElementData is not of type RecordContentElementData or ContentData OR the element cannot be added |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_DM_02288- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_DM_02288@rel:R25-11#904cfff5- Content hash
904cfff5- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02288
Status: valid/unmigrated
Version: rel:R25-11#904cfff5
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_02288@rel:R25-11#904cfff5
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · German original