DEENESPTFRRUARHIKOZHNL

class ara::per::KeyValueStorage

[SWS_PER_00339] Upstream: RS_PER_00002, RS_AP_00122, RS_AP_00140, RS_AP_00146

class KeyValueStorage final {...};

The Key-Value Storage contains a set of keys with associated values.

Header-Datei#include "ara/per/key_value_storage.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per

User GuideKI-GENERIERT

Verwaltet persistente Schlüssel-Wert-Paare über transaktionale Lese- und Schreiboperationen mit expliziter Synchronisation.
KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 74f93d55aa8a Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwaltet persistente Schlüssel-Wert-Paare über transaktionale Lese- und Schreiboperationen mit expliziter Synchronisation.

Die Klasse stellt einen transaktional arbeitenden Schlüssel-Wert-Speicher bereit, dessen Modifikationen erst durch SyncToStorage() auf den physischen Datenträger geschrieben oder durch DiscardPendingChanges() verworfen werden [SWS_PER_00049], [SWS_PER_00365]. Instanzen sind weder kopier- noch verschiebbar und bieten threadsichere Zugriffsmethoden, erfordern beim Zerstören jedoch den Ausschluss nebenläufiger Aufrufe [SWS_PER_00322], [SWS_PER_00050]. Bei Hardwaredefekten während der Synchronisation greift keine automatische Rollback-Semantik mehr [SWS_PER_00049].

Kontext

Die Klasse ara::per::KeyValueStorage stellt einen typisierten Schlüssel-Wert-Speicher innerhalb der AUTOSAR Adaptive Plattform bereit, der persistente Daten als Menge von Schlüsseln mit zugeordneten Werten verwaltet. Sie dient Anwendungen als primäre Schnittstelle zur persistenten Ablage und zum Abruf konfigurierter Anwendungsdaten. Zugriffe erfolgen mit Transaktionssemantik über einen internen Transaktionszustand statt direkt auf dem physischen Speichermedium, wie etwa für Leseoperationen in [SWS_PER_00042], [SWS_PER_00043], [SWS_PER_00044], [SWS_PER_00332] und [SWS_PER_00554] spezifiziert ist. Modifizierende Operationen wirken sich zunächst rein transaktional aus und verändern den physischen Speicher erst bei einer expliziten Synchronisation [SWS_PER_00046], [SWS_PER_00047], [SWS_PER_00048], [SWS_PER_00049].

Lebenszyklus

Die Instanziierung und Eigentümerschaft von ara::per::KeyValueStorage unterliegt strengen Einschränkungen: Sowohl der Standardkonstruktor [SWS_PER_00459] als auch der Kopier- und der Move-Konstruktor [SWS_PER_00324], [SWS_PER_00322] sind gelöscht (=delete). Ebenso sind Kopier- und Move-Zuweisungsoperatoren explizit entfernt [SWS_PER_00325], [SWS_PER_00323]. Instanzen können somit weder kopiert noch verschoben werden. Die Erzeugung eines Speicherobjekts erfolgt über die Initialisierung via OpenKeyValueStorage(), welche zugleich den Ausgangspunkt für anstehende Änderungen definiert [SWS_PER_00365]. Der Destruktor [SWS_PER_00050] ist als ausnahmesicher, jedoch explizit als nicht threadsicher spezifiziert; die Zerstörung darf daher erst stattfinden, wenn keine parallelen Zugriffe mehr laufen. Im regulären Betrieb sind sämtliche Zugriffsmethoden threadsicher ausgelegt, können sich jedoch bei gleichzeitigen Schreib- oder Synchronisationsaufrufen anderer Threads verzögern [SWS_PER_00046], [SWS_PER_00049], [SWS_PER_00365].

Nutzungspfad

Ein typischer Nutzungspfad umfasst das Setzen oder Aktualisieren von Datenwerten, optionales Prüfen oder Lesen des aktuellen Transaktionsstands und das abschließende persistente Schreiben oder Verwerfen der Änderungen. Mit SetValue<T>() wird ein Schlüssel-Wert-Paar im aktuellen Transaktionskontext zugewiesen oder überschrieben [SWS_PER_00046]. Existierende Schlüssel können über KeyExists() geprüft [SWS_PER_00043], deren Bytegröße über GetCurrentValueSize() ermittelt [SWS_PER_00554] und deren Werte über die typsicheren Überladungen von GetValue<T>() ausgelesen werden [SWS_PER_00044], [SWS_PER_00332]. Erst der Aufruf von SyncToStorage() überträgt sämtliche aufgelaufenen Änderungen atomar auf das physische Speichermedium [SWS_PER_00049]. Sollen nicht synchronisierte Änderungen hingegen verworfen werden, setzt DiscardPendingChanges() den Zustand auf den Stand des letzten SyncToStorage() bzw. des Öffnens zurück [SWS_PER_00365].

Transaktionaler Speicher- und SynchronisationsablaufAnwendungKeyValueStoragePhysischerSpeicherSetValue(key, value)Transaktionspuffer aktualisierenResult<void>GetValue<T>(key)Transaktionsstand lesenResult<T>altÄnderungen dauerhaft sichernSyncToStorage()Datenblöcke persistierenStatus QuittungResult<void>Änderungen verwerfenDiscardPendingChanges()Puffer auf Stand des letzten Sync leerenResult<void>

Sequenzdiagramm: Typischer Ablauf von Modifikation, Prüfung und Synchronisation mit physischem Speicher. Quellen: [SWS_PER_00046], [SWS_PER_00332], [SWS_PER_00049], [SWS_PER_00365]

Fehlerszenarien

Sämtliche Methoden geben Fehler über ara::core::Result zurück. Dabei wird präzise zwischen Operationen mit Rollback-Garantie und Fehlern ohne Rollback unterschieden:

  • Konfigurations- und Schreibschutzfehler: Bei Aufruf schreibender Methoden auf einem schreibgeschützten Speicher oder bei bereits vorhandenem Schlüssel in Write-Only-Once-Konfigurationen schlägt die Operation mit PerErrc::kIllegalWriteAccess fehl [SWS_PER_00046], [SWS_PER_00047], [SWS_PER_00048], [SWS_PER_00049].
  • Typkonflikte und Schlüsselverfügbarkeit: Stimmt der Datentyp beim Überschreiben oder Lesen nicht mit dem gespeicherten Typ überein, tritt PerErrc::kDataTypeMismatch auf [SWS_PER_00044], [SWS_PER_00332], [SWS_PER_00046]. Nicht gefundene Schlüssel melden PerErrc::kKeyNotFound [SWS_PER_00044], [SWS_PER_00554]. Bei ResetKey() wird PerErrc::kInitValueNotAvailable ausgelöst, falls kein Initialwert definiert ist [SWS_PER_00426].
  • Speicherplatz- und Quotenverletzungen: Übersteigt der neue Datenumfang das konfigurierte Limit maximumAllowedSize, wird PerErrc::kQuotaExceeded gemeldet [SWS_PER_00046], [SWS_PER_00049]. Reicht der physische Speicher nicht aus, liefert SyncToStorage() oder RecoverKey() den Fehler PerErrc::kOutOfStorageSpace ohne Rollback-Semantik [SWS_PER_00049], [SWS_PER_00427].
  • Integritäts-, Krypto- und Hardwarefehler: Physische Zugriffsfehler (PerErrc::kPhysicalStorageFailure) besitzen bei Lesevorgängen und SetValue() Rollback-Semantik [SWS_PER_00046], bei SyncToStorage() hingegen keine Rollback-Semantik [SWS_PER_00049]. Strukturkorruption (PerErrc::kIntegrityCorrupted), Entschlüsselungsfehler (PerErrc::kEncryptionFailed) oder fehlgeschlagene MAC-Prüfungen (PerErrc::kAuthenticationFailed) werden von Lese-, Schreib- und Wiederherstellungsoperationen wie RecoverKey() signalisiert [SWS_PER_00427].

Dieser Leitfaden wurde durch ein KI-gestütztes Dokumentationssystem auf Basis von AUTOSAR R25-11 generiert.

Mitgliederkarte

Klassendiagramm

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

G nara__per__KeyValueStorage981 KeyValueStorage + KeyValueStorage() + operator=() + ~KeyValueStorage() + DiscardPendingChanges() + GetAllKeys() + GetCurrentValueSize() + GetValue() + KeyExists() + RecoverKey() + RemoveAllKeys() + RemoveKey() + ResetKey() + SetValue() + SyncToStorage()

Detailansicht

Wähle in der Gliederung einen Eintrag aus.

Konstruktoren und Destruktor

KeyValueStorage function 3

The move constructor for KeyValueStorage shall not be used.

Überladungen KeyValueStorage 3
KeyValueStorage (KeyValueStorage &&kvs)=delete; SWS_PER_00322
KeyValueStorage (const KeyValueStorage &)=delete; SWS_PER_00324
KeyValueStorage ()=delete; SWS_PER_00459

Destructor for KeyValueStorage.

~KeyValueStorage () noexcept;

Methoden

Removes all pending changes to this Key-Value Storage since the last call to SyncToStorage() or since this Key-Value Storage was opened using OpenKeyValueStorage(). DiscardPendingChanges may be delayed by an ongoing call from another thread to RemoveAll Keys, SyncToStorage, DiscardPendingChanges, SetValue, GetValue, GetCurrentValueSize, RemoveKey, RecoverKey, or ResetKey.

ara::core::Result< void > DiscardPendingChanges () noexcept;
GetAllKeys function

Returns a list of all currently available keys of this Key-Value Storage. The list of keys is only accurate if no key-value pair is added or deleted at the same time. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

ara::core::Result< ara::core::Vector< ara::core::String > > GetAllKeys () const noexcept;

Returns the size (in bytes) of the value assigned to a key of this Key-Value Storage. GetCurrentValueSize may be delayed by an ongoing call from another thread to RemoveAllKeys or DiscardPendingChanges, or to SetValue, RemoveKey, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

ara::core::Result< std::uint64_t > GetCurrentValueSize (ara::core::StringView key) const noexcept;
GetValue function 2

Returns the value assigned to a key of this KeyValueStorage. This method should only be used to access very large values repeatedly. GetValue may be delayed by an ongoing call from another thread to RemoveAllKeys or Discard PendingChanges, or to SetValue, RemoveKey, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

Überladungen GetValue 2
template <class T> ara::core::Result< void > GetValue (ara::core::StringView key, T &value) const noexcept; SWS_PER_00044
template <class T> ara::core::Result< T > GetValue (ara::core::StringView key) const noexcept; SWS_PER_00332
KeyExists function

Checks if a key-value pair exists in this Key-Value Storage. The result is only accurate if no key-value pair is added or deleted at the same time. E.g. when a key-value pair is removed in another thread directly after this function returned "true", the result is not valid anymore. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

ara::core::Result< bool > KeyExists (ara::core::StringView key) const noexcept;
RecoverKey function

Recovers a single key-value pair of this Key Value Storage. This method allows to recover a single key-value pair when the redundancy checks fail. This method does a best-effort recovery of the key-value pair. After recovery, the key-value pair might contain outdated or initial content, or might be lost. RecoverKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair.

ara::core::Result< void > RecoverKey (ara::core::StringView key) noexcept;
RemoveAllKeys function

Removes all key-value pairs and associated values from this Key-Value Storage. RemoveAllKeys may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncToStorage, DiscardPendingChanges, SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

ara::core::Result< void > RemoveAllKeys () noexcept;
RemoveKey function

Removes a key and the associated value from this Key-Value Storage. RemoveKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

ara::core::Result< void > RemoveKey (ara::core::StringView key) noexcept;
ResetKey function

Resets a key of this Key-Value Storage to its initial value. ResetKey allows to reset a single key to its initial value. If the key is currently not available in the Key-Value Storage, it is re-created. Afterwards, the key-value pair will appear in both cases as if it was newly installed from the current Target Configuration. ResetKey will fail with kInitValueNotAvailable when neither Application Design nor Target Configuration define an initial value for the key. ResetKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair.

ara::core::Result< void > ResetKey (ara::core::StringView key) noexcept;
SetValue function

Stores a key-value pair in this Key-Value Storage. If a value already exists and has the same data type as the new value, it is overwritten. If the new value has a different data type than the stored value, kDataTypeMismatch is returned. SetValue may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

template <class T> ara::core::Result< void > SetValue (ara::core::StringView key, const T &value) noexcept;
SyncToStorage function

Flushes changed key-value pairs of the Key-Value Storage to the physical storage. SyncToStorage may be delayed by an ongoing call from another thread to RemoveAllKeys, DiscardPendingChanges, SetValue, RemoveKey, RecoverKey, or ResetKey.

ara::core::Result< void > SyncToStorage () noexcept;

Operatoren

operator= function 2

The move assignment operator for KeyValueStorage shall not be used.

Überladungen = 2
KeyValueStorage & operator= (KeyValueStorage &&kvs)=delete; SWS_PER_00323
KeyValueStorage & operator= (const KeyValueStorage &)=delete; SWS_PER_00325

Dokumentation der Methoden

function DiscardPendingChanges [SWS_PER_00365] Upstream: RS_PER_00002, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > DiscardPendingChanges () noexcept;

Removes all pending changes to this Key-Value Storage since the last call to SyncToStorage() or since this Key-Value Storage was opened using OpenKeyValueStorage(). DiscardPendingChanges may be delayed by an ongoing call from another thread to RemoveAll Keys, SyncToStorage, DiscardPendingChanges, SetValue, GetValue, GetCurrentValueSize, RemoveKey, RecoverKey, or ResetKey.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 73a36630080a Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwendung und Semantik

Die synchrone Elementfunktion DiscardPendingChanges der Klasse ara::per::KeyValueStorage ([SWS_PER_00365]) wird über den Header ara/per/key_value_storage.h bereitgestellt. Sie nimmt keine Parameter entgegen und liefert ein ara::core::Result<void> zurück. Ihr Zweck ist das Verwerfen aller ausstehenden Änderungen an der Key-Value-Storage-Instanz, die seit dem letzten Aufruf von SyncToStorage oder seit dem Öffnen mittels OpenKeyValueStorage() angefallen sind [SWS_PER_00365].

Zusammenspiel und Transaktionsverhalten

Schreibende Operationen wie SetValue [SWS_PER_00046], RemoveKey [SWS_PER_00047] und RemoveAllKeys [SWS_PER_00048] unterliegen einer Transaktionssemantik. Deren Änderungen werden erst durch den Aufruf von SyncToStorage dauerhaft auf das physikalische Speichermedium geschrieben [SWS_PER_00049]. Durch DiscardPendingChanges werden diese ungesicherten Modifikationen zurückgerollt, sodass auch Abfragen über GetCurrentValueSize wieder den vorherigen transaktionalen Ausgangszustand widerspiegeln [SWS_PER_00554].

Fehlerbehandlung und Nebenläufigkeit

Im Fehlerfall enthält das Ergebnis einen herstellerspezifischen Fehler oder einen Fehlercode aus PerErrc mit definierter Rollback-Semantik [SWS_PER_00365]:

  • PerErrc::kIllegalWriteAccess: wenn der Speicher schreibgeschützt ist oder bei Write-Only-Once-Konfiguration der Schlüssel bereits existiert.
  • PerErrc::kPhysicalStorageFailure: wenn der Zugriff auf das physikalische Speichermedium fehlschlägt.
  • PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed oder PerErrc::kAuthenticationFailed: bei Integritätsverlust, Validierungsfehlern, Entschlüsselungsfehlern oder fehlgeschlagener MAC-Prüfung.

Die Methode ist als noexcept deklariert, ausnahmesicher (exception safe) sowie threadsicher (thread-safe) [SWS_PER_00365]. Die Ausführung kann jedoch verzögert werden, wenn parallel in anderen Threads Aufrufe von SyncToStorage, SetValue, RemoveKey, RemoveAllKeys, ResetKey oder RecoverKey aktiv sind [SWS_PER_00365] [SWS_PER_00426] [SWS_PER_00427].

Dieser Text wurde durch eine KI generiert und anhand der AUTOSAR-Spezifikation kuratiert.

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
PerErrc::kIllegalWriteAccessrollback_semantics Returned if the Key-Value Storage is configured as read- only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00365
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00365@rel:R25-11#0793e9a5
Content hash
0793e9a5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00365
Status: valid/unmigrated Version: rel:R25-11#f3496212 Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00365@rel:R25-11#f3496212
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0793e9a52026-09-30
  • R19-11rel:R19-11#90dcd0d22026-10-14
  • R20-11rel:R20-11#306302ca2026-10-14
  • R21-11rel:R21-11#5bb9ceb52026-10-14
  • R22-11rel:R22-11#6374aaa62026-10-14
  • R23-11rel:R23-11#7a4bc2902026-10-14
  • R24-11rel:R24-11#fd18fb832026-10-14
  • R25-11rel:R25-11#f34962122026-10-14 active
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

function GetAllKeys [SWS_PER_00042] Upstream: RS_PER_00003, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< ara::core::Vector< ara::core::String > > GetAllKeys () const noexcept;

Returns a list of all currently available keys of this Key-Value Storage. The list of keys is only accurate if no key-value pair is added or deleted at the same time. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kPhysical rollback_semantics

Rückgabewert

TypBeschreibung
ara::core::Result<ara::core::Vector<ara::core::String > >A Result containing a list of available keys. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
StorageFailureReturned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00042
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00042@rel:R25-11#b9c10dc7
Content hash
b9c10dc7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00042
Status: valid/unmigrated Version: rel:R25-11#7764796d Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00042@rel:R25-11#7764796d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b9c10dc72026-09-30
  • R19-11rel:R19-11#dc305f7c2026-10-14
  • R20-11rel:R20-11#5ed793b42026-10-14
  • R21-11rel:R21-11#d356f6902026-10-14
  • R22-11rel:R22-11#ef6f96bc2026-10-14
  • R23-11rel:R23-11#13f7a5a82026-10-14
  • R24-11rel:R24-11#84dcd6932026-10-14
  • R25-11rel:R25-11#7764796d2026-10-14 active
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

function GetCurrentValueSize [SWS_PER_00554] Upstream: RS_PER_00017, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< std::uint64_t > GetCurrentValueSize (ara::core::StringView key) const noexcept;

Returns the size (in bytes) of the value assigned to a key of this Key-Value Storage. GetCurrentValueSize may be delayed by an ongoing call from another thread to RemoveAllKeys or DiscardPendingChanges, or to SetValue, RemoveKey, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kKeyNotFound rollback_semantics

Parameter (in)

ParameterBeschreibung
keyThe key to look up.

Rückgabewert

TypBeschreibung
ara::core::Result<std::uint64_t >A Result containing the size of the value in bytes. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
Returned if the provided key does not exist in the Key-Value
Storage.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00554
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00554@rel:R25-11#83415bd3
Content hash
83415bd3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00554
Status: valid/unmigrated Version: rel:R25-11#24655af4 Versionshistorie & Revisions (1 transition, 5 revision)
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_PER_00554@rel:R25-11#24655af4
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#83415bd32026-09-30
  • R22-11rel:R22-11#929002202026-10-14
  • R23-11rel:R23-11#de5e8c192026-10-14
  • R24-11rel:R24-11#031b61af2026-10-14
  • R25-11rel:R25-11#24655af42026-10-14 active
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

function GetValue [SWS_PER_00044] Upstream: RS_PER_00003, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00136, RS_AP_00139, RS_AP_00141, RS_AP_00159

template <class T> ara::core::Result< void > GetValue (ara::core::StringView key, T &value) const noexcept;

Returns the value assigned to a key of this KeyValueStorage. This method should only be used to access very large values repeatedly. GetValue may be delayed by an ongoing call from another thread to RemoveAllKeys or Discard PendingChanges, or to SetValue, RemoveKey, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kKeyNotFound rollback_semantics

Template-Parameter

ParameterBeschreibung
TThe type of the value that shall be retrieved.

Parameter (in)

ParameterBeschreibung
keyThe key to look up.

Parameter (out)

ParameterBeschreibung
valueThe retrieved value.

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
Returned if the provided key does not exist in the Key-Value
Storage.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kDataTypeMismatchrollback_semantics Returned if the data type of stored value does not match the templated type.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00044
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00044@rel:R25-11#51af7b75
Content hash
51af7b75
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00044
Status: valid/unmigrated Version: rel:R25-11#d1fc24ca Versionshistorie & Revisions (1 transition, 5 revision)
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_PER_00044@rel:R25-11#d1fc24ca
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#51af7b752026-09-30
  • R22-11rel:R22-11#aba3314c2026-10-14
  • R23-11rel:R23-11#5ce84da62026-10-14
  • R24-11rel:R24-11#e55139fe2026-10-14
  • R25-11rel:R25-11#d1fc24ca2026-10-14 active
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

function GetValue [SWS_PER_00332] Upstream: RS_PER_00003, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00136, RS_AP_00139, RS_AP_00159

template <class T> ara::core::Result< T > GetValue (ara::core::StringView key) const noexcept;

Returns the value assigned to a key of this Key-Value Storage. GetValue may be delayed by an ongoing call from another thread to RemoveAllKeys or Discard PendingChanges, or to SetValue, RemoveKey, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kKeyNotFound rollback_semantics

Template-Parameter

ParameterBeschreibung
TThe type of the value that shall be retrieved.

Parameter (in)

ParameterBeschreibung
keyThe key to look up.

Rückgabewert

TypBeschreibung
ara::core::Result< T >A Result containing the retrieved value. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
Returned if the provided key does not exist in the Key-Value
Storage.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kDataTypeMismatchrollback_semantics Returned if the data type of stored value does not match the templated type.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00332
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00332@rel:R25-11#f6c15de4
Content hash
f6c15de4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00332
Status: valid/unmigrated Version: rel:R25-11#dcb7cd2f Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00332@rel:R25-11#dcb7cd2f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f6c15de42026-09-30
  • R19-11rel:R19-11#e0b2cbd72026-10-14
  • R20-11rel:R20-11#817780202026-10-14
  • R21-11rel:R21-11#efed588e2026-10-14
  • R22-11rel:R22-11#cb63ddd02026-10-14
  • R23-11rel:R23-11#03fe0a512026-10-14
  • R24-11rel:R24-11#e6d6eef02026-10-14
  • R25-11rel:R25-11#dcb7cd2f2026-10-14 active
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

function KeyExists [SWS_PER_00043] Upstream: RS_PER_00003, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< bool > KeyExists (ara::core::StringView key) const noexcept;

Checks if a key-value pair exists in this Key-Value Storage. The result is only accurate if no key-value pair is added or deleted at the same time. E.g. when a key-value pair is removed in another thread directly after this function returned "true", the result is not valid anymore. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: d5f804c0cf2d Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die synchrone Methode KeyExists der Klasse ara::per::KeyValueStorage prüft, ob ein bestimmtes Schlüssel-Wert-Paar im Speicher vorhanden ist [SWS_PER_00043]. Als Eingabeparameter wird der zu prüfende Schlüssel key vom Typ ara::core::StringView übergeben [SWS_PER_00043]. Der Rückgabewert ist ein ara::core::Result<bool>, das true enthält, falls der Schlüssel lokalisiert werden konnte, und andernfalls false [SWS_PER_00043]. Die Funktion ist als const sowie noexcept deklariert und ausnahmesicher (exception safe) [SWS_PER_00043].

Hinsichtlich Semantik und Nebenläufigkeit arbeitet KeyExists transaktionsbasiert: Sie reflektiert den aktuellen Zustand der Transaktion und nicht zwingend den physischen Speicher [SWS_PER_00043]. Die Ausführung ist zwar threadsicher (thread-safe), das gelieferte Ergebnis ist jedoch nur dann präzise, wenn nicht zeitgleich Schlüssel-Wert-Paare hinzugefügt oder gelöscht werden [SWS_PER_00043]. Wird beispielsweise unmittelbar nach Rückgabe von true das Paar in einem anderen Thread entfernt, verliert das Ergebnis seine Gültigkeit [SWS_PER_00043].

Im Fehlerfall enthält das Result einen spezifischen Fehlercode [SWS_PER_00043]:

  • StorageFailure: Fehler beim Zugriff auf den physischen Speicher [SWS_PER_00043].
  • PerErrc::kIntegrityCorrupted: Gespeicherte Daten können wegen verletzter struktureller Integrität nicht gelesen werden [SWS_PER_00043].
  • PerErrc::kValidationFailed: Die Validität der gespeicherten Daten kann nicht gewährleistet werden [SWS_PER_00043].
  • PerErrc::kEncryptionFailed: Entschlüsselung der Daten schlägt fehl [SWS_PER_00043].
  • PerErrc::kAuthenticationFailed: Überprüfung des MAC schlägt fehl [SWS_PER_00043].
  • Herstellerspezifische Fehler (vendor specific error) können ebenfalls zurückgegeben werden [SWS_PER_00043].

Dieser Text wurde von einer KI generiert und basiert auf der Spezifikation AUTOSAR R25-11.

Implementer's Guide folgt (Komplexität I1)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kPhysical rollback_semantics

Parameter (in)

ParameterBeschreibung
keyThe key that shall be checked.

Rückgabewert

TypBeschreibung
ara::core::Result< bool >A Result containing true if the key could be located or false if it couldn’t. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
StorageFailureReturned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00043
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00043@rel:R25-11#e8b3c803
Content hash
e8b3c803
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00043
Status: valid/unmigrated Version: rel:R25-11#e65b8880 Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00043@rel:R25-11#e65b8880
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#e8b3c8032026-09-30
  • R19-11rel:R19-11#acb4571e2026-10-14
  • R20-11rel:R20-11#508cbca52026-10-14
  • R21-11rel:R21-11#198de15f2026-10-14
  • R22-11rel:R22-11#4b0b474d2026-10-14
  • R23-11rel:R23-11#b85446a12026-10-14
  • R24-11rel:R24-11#416f86462026-10-14
  • R25-11rel:R25-11#e65b88802026-10-14 active
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

function KeyValueStorage [SWS_PER_00322] Upstream: RS_PER_00002, RS_AP_00120, RS_AP_00121, RS_AP_00129, RS_AP_00145, RS_AP_00159

KeyValueStorage (KeyValueStorage &&kvs)=delete;

The move constructor for KeyValueStorage shall not be used.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage

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

Record
AUTOSAR/AP/record/SWS_PER_00322
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00322@rel:R25-11#98b7adb1
Content hash
98b7adb1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00322
Status: valid/unmigrated Version: rel:R25-11#225c60f1 Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00322@rel:R25-11#225c60f1
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#98b7adb12026-09-30
  • R19-11rel:R19-11#061b66e82026-10-14
  • R20-11rel:R20-11#61caa7ac2026-10-14
  • R21-11rel:R21-11#0d2d108a2026-10-14
  • R22-11rel:R22-11#2127e47e2026-10-14
  • R23-11rel:R23-11#1e46b07b2026-10-14
  • R24-11rel:R24-11#225c60f12026-10-14
  • R25-11rel:R25-11#225c60f12026-10-14 active
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

function KeyValueStorage [SWS_PER_00324] Upstream: RS_PER_00002, RS_AP_00120, RS_AP_00145

KeyValueStorage (const KeyValueStorage &)=delete;

The copy constructor for KeyValueStorage shall not be used.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage

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

Record
AUTOSAR/AP/record/SWS_PER_00324
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00324@rel:R25-11#b723be56
Content hash
b723be56
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00324
Status: valid/unmigrated Version: rel:R25-11#3458c64f Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00324@rel:R25-11#3458c64f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b723be562026-09-30
  • R19-11rel:R19-11#9cddb3192026-10-14
  • R20-11rel:R20-11#eab3f9102026-10-14
  • R21-11rel:R21-11#eab3f9102026-10-14
  • R22-11rel:R22-11#b9dc355d2026-10-14
  • R23-11rel:R23-11#64874c0d2026-10-14
  • R24-11rel:R24-11#3458c64f2026-10-14
  • R25-11rel:R25-11#3458c64f2026-10-14 active
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

function KeyValueStorage [SWS_PER_00459] Upstream: RS_PER_00002, RS_AP_00120, RS_AP_00129, RS_AP_00146

KeyValueStorage ()=delete;

The default constructor for KeyValueStorage shall not be used.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage

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

Record
AUTOSAR/AP/record/SWS_PER_00459
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00459@rel:R25-11#75758524
Content hash
75758524
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00459
Status: valid/unmigrated Version: rel:R25-11#2cda50df Versionshistorie & Revisions (1 transition, 6 revision)
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_PER_00459@rel:R25-11#2cda50df
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#757585242026-09-30
  • R21-11rel:R21-11#74095de92026-10-14
  • R22-11rel:R22-11#db0f4fa82026-10-14
  • R23-11rel:R23-11#4c09eb602026-10-14
  • R24-11rel:R24-11#2cda50df2026-10-14
  • R25-11rel:R25-11#2cda50df2026-10-14 active
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

function RecoverKey [SWS_PER_00427] Upstream: RS_PER_00003, RS_PER_00009, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > RecoverKey (ara::core::StringView key) noexcept;

Recovers a single key-value pair of this Key Value Storage. This method allows to recover a single key-value pair when the redundancy checks fail. This method does a best-effort recovery of the key-value pair. After recovery, the key-value pair might contain outdated or initial content, or might be lost. RecoverKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 424fba0f9a95 Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die synchrone Methode RecoverKey der Klasse ara::per::KeyValueStorage dient der Best-Effort-Wiederherstellung eines einzelnen Schlüssel-Wert-Paares, wenn interne Redundanzprüfungen fehlschlagen [SWS_PER_00427]. Sie nimmt den Bezeichner des Schlüssels über den Parameter key als ara::core::StringView entgegen und meldet den Erfolg oder Fehler über ein ara::core::Result<void> zurück [SWS_PER_00427]. Nach der Wiederherstellung kann das Paar veraltete Inhalte oder initiale Werte aufweisen oder gänzlich verloren sein [SWS_PER_00427].

Tritt ein Fehler auf, liefert das Ergebnis spezifische Fehlercodes aus PerErrc oder herstellerspezifische Fehler [SWS_PER_00427]:

  • kKeyNotFound: Der angegebene Schlüssel existiert nicht im Speicher [SWS_PER_00427].
  • kIllegalWriteAccess: Der Speicher ist schreibgeschützt (read-only) konfiguriert [SWS_PER_00427].
  • kPhysicalStorageFailure: Der Zugriff auf den physischen Speicher ist fehlgeschlagen [SWS_PER_00427].
  • kIntegrityCorrupted: Strukturelle Integritätsschäden verhindern das Schreiben von Daten [SWS_PER_00427].
  • kEncryptionFailed bzw. kAuthenticationFailed: Die Ver- oder Entschlüsselung oder die MAC-Validierung schlägt fehl [SWS_PER_00427].
  • kOutOfStorageSpace bzw. kQuotaExceeded: Der verfügbare physische Speicher reicht nicht aus oder die konfigurierte Maximalgröße wird überschritten [SWS_PER_00427].

Die Operation ist als thread-safe sowie exception-safe spezifiziert [SWS_PER_00427]. Aufrufe können jedoch verzögert werden, wenn parallel speicherweite Aktionen wie RemoveAllKeys [SWS_PER_00048], SyncToStorage [SWS_PER_00049] oder DiscardPendingChanges [SWS_PER_00365] ausgeführt werden [SWS_PER_00427]. Ebenso führen zeitgleiche Aufrufe von SetValue [SWS_PER_00046], GetValue [SWS_PER_00044], GetCurrentValueSize [SWS_PER_00554], RemoveKey [SWS_PER_00047], ResetKey [SWS_PER_00426] oder erneut RecoverKey für denselben Schlüssel zu Verzögerungen [SWS_PER_00427]. Im Unterschied zu ResetKey [SWS_PER_00426], das den Eintrag auf seinen Auslieferungszustand zurücksetzt, versucht RecoverKey eine Datenrettung [SWS_PER_00427].

Dieser Nutzungshinweis wurde automatisch auf Basis der Spezifikation generiert.

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kKeyNotFound rollback_semantics

Parameter (in)

ParameterBeschreibung
keyThe key to be recovered.

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
Returned if the provided key does not exist in the Key-Value
Storage.
PerErrc::kIllegalWriteAccessrollback_semantics Returned if the Key-Value Storage is configured as read- only.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the recovered value.
PerErrc::kQuotaExceededrollback_semantics Returned if the recovered value would exceed the configured maximumAllowedSize of the Key-Value Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00427
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00427@rel:R25-11#1ff272ae
Content hash
1ff272ae
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00427
Status: valid/unmigrated Version: rel:R25-11#aaccab12 Versionshistorie & Revisions (1 transition, 7 revision)
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_PER_00427@rel:R25-11#aaccab12
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#1ff272ae2026-09-30
  • R20-11rel:R20-11#2a43812a2026-10-14
  • R21-11rel:R21-11#d955febb2026-10-14
  • R22-11rel:R22-11#e216dd632026-10-14
  • R23-11rel:R23-11#9839d1302026-10-14
  • R24-11rel:R24-11#4dc9fbc22026-10-14
  • R25-11rel:R25-11#aaccab122026-10-14 active
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

function RemoveAllKeys [SWS_PER_00048] Upstream: RS_PER_00003, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_ AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > RemoveAllKeys () noexcept;

Removes all key-value pairs and associated values from this Key-Value Storage. RemoveAllKeys may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncToStorage, DiscardPendingChanges, SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 0ae35af4fc43 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwendung und Transaktionssemantik

Die Methode RemoveAllKeys der Klasse ara::per::KeyValueStorage entfernt sämtliche Schlüssel-Wert-Paare und deren zugehörige Inhalte aus dem Speicher [SWS_PER_00048]. Die Funktion wird synchron aufgerufen, besitzt keine Übergabeparameter und ist mit noexcept spezifiziert [SWS_PER_00048]. Die Operation unterliegt einer Transaktionssemantik: Das Löschen aller Schlüssel wird erst dauerhaft im physischen Speicher wirksam, sobald nachfolgend SyncToStorage [SWS_PER_00049] aufgerufen wird [SWS_PER_00048]. Innerhalb der laufenden Transaktion spiegeln Leseoperationen wie GetValue [SWS_PER_00332] oder Größenabfragen über GetCurrentValueSize [SWS_PER_00554] unmittelbar den geleerten Zustand wider [SWS_PER_00044].

Fehlerbehandlung

Als Rückgabewert dient ara::core::Result<void> [SWS_PER_00048]. Tritt ein Fehler auf, wird eine Rollback-Semantik angewendet [SWS_PER_00048]. Zu den möglichen Fehlern gehören:

  • Zugriffsverletzung bei schreibgeschützt konfiguriertem Speicher (Interpretation: dies dürfte dem Fehlercode PerErrc::kIllegalWrite entsprechen) [SWS_PER_00048], Frage Q-a820d779e19ac5c9 (offen)
  • PerErrc::kPhysicalStorageFailure bei Fehlern beim Zugriff auf das physische Speichermedium [SWS_PER_00048],
  • PerErrc::kIntegrityCorrupted bei beschädigter struktureller Datenintegrität [SWS_PER_00048],
  • PerErrc::kEncryptionFailed sowie PerErrc::kAuthenticationFailed bei Fehlschlägen der Ver-/Entschlüsselung oder der MAC-Prüfung [SWS_PER_00048] sowie herstellerspezifische Fehler.

Nebenläufigkeit und Zusammenspiel

Die Methode ist als thread-safe und exception safe eingestuft [SWS_PER_00048]. Die Ausführung kann jedoch verzögert werden, wenn in einem anderen Thread zeitgleich Aufrufe von RemoveAllKeys, SyncToStorage [SWS_PER_00049], SetValue [SWS_PER_00046], RemoveKey [SWS_PER_00047], ResetKey [SWS_PER_00426] oder RecoverKey [SWS_PER_00427] aktiv sind [SWS_PER_00048].

Dieser Text wurde von einer KI auf Basis der Spezifikationsvorgaben generiert.

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kIllegalWrite rollback_semantics

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
AccessReturned if the Key-Value Storage is configured as read- only.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00048
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00048@rel:R25-11#8a8820ba
Content hash
8a8820ba
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00048
Status: valid/unmigrated Version: rel:R25-11#098d4bc1 Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00048@rel:R25-11#098d4bc1
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8a8820ba2026-09-30
  • R19-11rel:R19-11#1050c61d2026-10-14
  • R20-11rel:R20-11#68ed9c542026-10-14
  • R21-11rel:R21-11#b0a3d35f2026-10-14
  • R22-11rel:R22-11#4ff9fb912026-10-14
  • R23-11rel:R23-11#c2afbb972026-10-14
  • R24-11rel:R24-11#5988f1162026-10-14
  • R25-11rel:R25-11#098d4bc12026-10-14 active
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

function RemoveKey [SWS_PER_00047] Upstream: RS_PER_00003, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > RemoveKey (ara::core::StringView key) noexcept;

Removes a key and the associated value from this Key-Value Storage. RemoveKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: ea5f39b17dd8 Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die synchrone Memberfunktion RemoveKey der Klasse ara::per::KeyValueStorage dient dem Entfernen eines Schlüssels und des zugeordneten Werts aus dem Key-Value Storage [SWS_PER_00047]. Sie nimmt den Bezeichner des zu entfernenden Schlüssels als ara::core::StringView über den Parameter key entgegen und liefert ein ara::core::Result<void> zurück [SWS_PER_00047].

Die Operation unterliegt einer Transaktionssemantik: Änderungen werden nicht sofort im physischen Speicher persistent, sondern erst wirksam, wenn explizit SyncToStorage aufgerufen wird [SWS_PER_00047], welches geänderte Schlüssel-Wert-Paare synchronisiert [SWS_PER_00049]. Ausstehende Änderungen können vor der Synchronisation mit DiscardPendingChanges verworfen werden [SWS_PER_00365]. Lesende Zugriffe wie GetValue [SWS_PER_00044], [SWS_PER_00332] oder GetCurrentValueSize [SWS_PER_00554] operieren ebenfalls auf dem Transaktionszustand und spiegeln die Löschung unmittelbar wider.

Hinsichtlich Nebenläufigkeit ist die Methode als threadsicher (thread-safe) und ausnahmesicher (exception safe) spezifiziert [SWS_PER_00047]. Ein Aufruf kann verzögert werden, wenn parallel in einem anderen Thread RemoveAllKeys, SyncToStorage oder DiscardPendingChanges ausgeführt werden, oder wenn zeitgleich Operationen wie SetValue, GetValue, GetCurrentValueSize, RemoveKey, RecoverKey oder ResetKey auf dasselbe Schlüssel-Wert-Paar zugreifen [SWS_PER_00047].

Tritt bei der Ausführung ein Fehler auf, greift eine Rollback-Semantik und das zurückgegebene Result-Objekt enthält einen Fehlercode [SWS_PER_00047]:

  • PerErrc::kKeyNotFound: Der angegebene Schlüssel existiert nicht im Speicher [SWS_PER_00047].
  • PerErrc::kIllegalWriteAccess: Der Key-Value Storage ist schreibgeschützt (read-only) konfiguriert [SWS_PER_00047].
  • PerErrc::kPhysicalStorageFailure: Der Zugriff auf das physische Speichermedium ist fehlgeschlagen [SWS_PER_00047].
  • PerErrc::kIntegrityCorrupted: Das Schreiben schlägt aufgrund beschädigter struktureller Integrität fehl [SWS_PER_00047].
  • PerErrc::kEncryptionFailed bzw. PerErrc::kAuthenticationFailed: Die Ver- bzw. Entschlüsselung schlägt fehl oder die MAC-Berechnung/Prüfung ist fehlerhaft [SWS_PER_00047].

Dieser Nutzungshinweis basiert ausschließlich auf den Spezifikationen der AUTOSAR-Adaptive-Plattform für das Release R25-11.

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kKeyNotFound rollback_semantics

Parameter (in)

ParameterBeschreibung
keyThe key to be removed.

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
Returned if the provided key does not exist in the Key-Value
Storage.
PerErrc::kIllegalWriteAccessrollback_semantics Returned if the Key-Value Storage is configured as read- only.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00047
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00047@rel:R25-11#4afcff80
Content hash
4afcff80
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00047
Status: valid/unmigrated Version: rel:R25-11#60324d85 Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00047@rel:R25-11#60324d85
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4afcff802026-09-30
  • R19-11rel:R19-11#653b04072026-10-14
  • R20-11rel:R20-11#0d9118072026-10-14
  • R21-11rel:R21-11#53a1e66d2026-10-14
  • R22-11rel:R22-11#6d261f9c2026-10-14
  • R23-11rel:R23-11#8d4fd37e2026-10-14
  • R24-11rel:R24-11#e99607a92026-10-14
  • R25-11rel:R25-11#60324d852026-10-14 active
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

function ResetKey [SWS_PER_00426] Upstream: RS_PER_00003, RS_PER_00009, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > ResetKey (ara::core::StringView key) noexcept;

Resets a key of this Key-Value Storage to its initial value. ResetKey allows to reset a single key to its initial value. If the key is currently not available in the Key-Value Storage, it is re-created. Afterwards, the key-value pair will appear in both cases as if it was newly installed from the current Target Configuration. ResetKey will fail with kInitValueNotAvailable when neither Application Design nor Target Configuration define an initial value for the key. ResetKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: ddb1025237e2 Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwendung

Die synchrone Methode ResetKey setzt ein einzelnes Schlüssel-Wert-Paar in einer Instanz von ara::per::KeyValueStorage auf dessen Initialwert zurück [SWS_PER_00426]. Als Parameter wird der Bezeichner key als ara::core::StringView übergeben [SWS_PER_00426]. Ist der Schlüssel im Speicher gegenwärtig nicht vorhanden, wird er neu angelegt. In beiden Fällen entspricht der Zustand des Eintrags anschließend dem einer Neuinstallation aus der aktuellen Target Configuration [SWS_PER_00426]. Die Funktion ist als noexcept deklariert und liefert ein ara::core::Result<void> zurück [SWS_PER_00426].

Fehlerbehandlung

Tritt bei der Ausführung ein Fehler auf, liefert das Result-Objekt einen entsprechenden Fehlercode [SWS_PER_00426]:

  • PerErrc::kInitValueNotAvailable: Wenn weder im Application Design noch in der Target Configuration ein Initialwert für den Schlüssel definiert ist (Rollback-Semantik) [SWS_PER_00426].
  • kIllegalWrite: Wenn der Key-Value Storage als schreibgeschützt (read-only) konfiguriert ist [SWS_PER_00426].
  • PerErrc::kPhysicalStorageFailure oder PerErrc::kOutOfStorageSpace: Bei physikalischen Speicherzugriffsfehlern oder unzureichendem Speicherplatz (ohne Rollback-Semantik) [SWS_PER_00426].
  • PerErrc::kIntegrityCorrupted, PerErrc::kEncryptionFailed, PerErrc::kAuthenticationFailed oder PerErrc::kQuotaExceeded: Bei Integritätsverletzungen, Krypto- und Authentifizierungsfehlern oder Überschreitung der konfigurierten AllowedSize (jeweils mit Rollback-Semantik) [SWS_PER_00426].

Nebenläufigkeit und Zusammenspiel

Die Funktion ist thread-safe und exception-safe [SWS_PER_00426]. Der Aufruf kann jedoch verzögert werden, wenn parallel aus einem anderen Thread speicherweite Operationen wie RemoveAllKeys [SWS_PER_00048], SyncToStorage [SWS_PER_00049] oder DiscardPendingChanges [SWS_PER_00365] aktiv sind. Ebenso führen nebenläufige Zugriffe auf denselben Schlüssel über SetValue [SWS_PER_00046], GetValue [SWS_PER_00044] [SWS_PER_00332], GetCurrentValueSize [SWS_PER_00554], RemoveKey [SWS_PER_00047], RecoverKey [SWS_PER_00427] oder ein weiteres ResetKey zu Verzögerungen [SWS_PER_00426].

Dieser Nutzungshinweis wurde automatisch auf Basis der Spezifikation von AUTOSAR Adaptive R25-11 erstellt.

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kIllegalWrite rollback_semantics

Parameter (in)

ParameterBeschreibung
keyThe key to be reset.

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
AccessReturned if the Key-Value Storage is configured as read- only.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kInitValueNotAvailablerollback_semantics Returned if no intitial value was configured for this key.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the initial value.
PerErrc::kQuotaExceededrollback_semantics Returned if the initial value would exceed the configured maximum AllowedSize of the Key-Value Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00426
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00426@rel:R25-11#cb5662c2
Content hash
cb5662c2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00426
Status: valid/unmigrated Version: rel:R25-11#e8b55641 Versionshistorie & Revisions (1 transition, 7 revision)
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_PER_00426@rel:R25-11#e8b55641
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#cb5662c22026-09-30
  • R20-11rel:R20-11#0af4dfeb2026-10-14
  • R21-11rel:R21-11#504218172026-10-14
  • R22-11rel:R22-11#e62113552026-10-14
  • R23-11rel:R23-11#221d69462026-10-14
  • R24-11rel:R24-11#e9b91b262026-10-14
  • R25-11rel:R25-11#e8b556412026-10-14 active
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

function SetValue [SWS_PER_00046] Upstream: RS_PER_00003, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00136, RS_AP_00139, RS_AP_00159

template <class T> ara::core::Result< void > SetValue (ara::core::StringView key, const T &value) noexcept;

Stores a key-value pair in this Key-Value Storage. If a value already exists and has the same data type as the new value, it is overwritten. If the new value has a different data type than the stored value, kDataTypeMismatch is returned. SetValue may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kIllegalWrite rollback_semantics

Template-Parameter

ParameterBeschreibung
TThe type of the value that shall be set.

Parameter (in)

ParameterBeschreibung
keyThe key to assign the value to.
valueThe value to store.

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
AccessReturned if the Key-Value Storage is configured as read- only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kDataTypeMismatchrollback_semantics Returned if the data type of an already stored value does not match the templated type.
PerErrc::kOutOfStorageSpacerollback_semantics Returned if the available physical storage space is insufficient for the new value.
PerErrc::kQuotaExceededrollback_semantics Returned if the new value would exceed the configured maximum AllowedSize of the Key-Value Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00046
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00046@rel:R25-11#91434584
Content hash
91434584
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00046
Status: valid/unmigrated Version: rel:R25-11#7952a862 Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00046@rel:R25-11#7952a862
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#914345842026-09-30
  • R19-11rel:R19-11#394485ea2026-10-14
  • R20-11rel:R20-11#9bd70fdb2026-10-14
  • R21-11rel:R21-11#fc6359392026-10-14
  • R22-11rel:R22-11#f00787ed2026-10-14
  • R23-11rel:R23-11#640b066a2026-10-14
  • R24-11rel:R24-11#6fe6b6b92026-10-14
  • R25-11rel:R25-11#7952a8622026-10-14 active
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

function SyncToStorage [SWS_PER_00049] Upstream: RS_PER_00002, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > SyncToStorage () noexcept;

Flushes changed key-value pairs of the Key-Value Storage to the physical storage. SyncToStorage may be delayed by an ongoing call from another thread to RemoveAllKeys, DiscardPendingChanges, SetValue, RemoveKey, RecoverKey, or ResetKey.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 31e98920341c Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die synchrone Methode SyncToStorage der Klasse ara::per::KeyValueStorage schreibt geänderte Schlüssel-Wert-Paare aus dem Speicherpuffer dauerhaft in den physischen Speicher [SWS_PER_00049]. Sie nimmt keine Parameter entgegen und gibt ein ara::core::Result<void> zurück, ist als noexcept deklariert sowie als ausnahmesicher und thread-safe spezifiziert [SWS_PER_00049].

Zusammenspiel und Transaktionssemantik

Modifizierende Operationen wie SetValue [SWS_PER_00046], RemoveKey [SWS_PER_00047] und RemoveAllKeys [SWS_PER_00048] nutzen Transaktionssemantik. Ihre Änderungen werden erst mit dem Aufruf von SyncToStorage wirksam [SWS_PER_00046]. Sollen ausstehende Modifikationen vor dem Schreiben verworfen werden, kann alternativ DiscardPendingChanges aufgerufen werden [SWS_PER_00365].

Nebenläufigkeit

Obwohl die Funktion thread-safe ist, kann die Ausführung verzögert werden, wenn parallel in einem anderen Thread Operationen wie SetValue, RemoveKey, RemoveAllKeys, DiscardPendingChanges, RecoverKey oder ResetKey aktiv sind [SWS_PER_00049].

Fehlerbehandlung

Schlägt die Synchronisation fehl, liefert das Result einen Fehlercode [SWS_PER_00049]:

  • Fehler mit Rollback-Semantik (Änderungen werden zurückgerollt): PerErrc::kIntegrityCorrupted, PerErrc::kEncryptionFailed, PerErrc::kAuthenticationFailed, PerErrc::kQuotaExceeded sowie PerErrc::kIllegalWrite [SWS_PER_00049].
  • Fehler ohne Rollback-Semantik: PerErrc::kPhysicalStorageFailure bei physischen Zugriffsfehlern und PerErrc::kOutOfStorageSpace bei unzureichendem Speicherplatz [SWS_PER_00049].
  • Konfigurationsfehler: Fehlercode Access, wenn der Speicher als read-only konfiguriert ist oder bei write-only-once der Schlüssel bereits existiert [SWS_PER_00049].

Dieser Nutzungshinweis wurde automatisiert auf Basis der AUTOSAR-Spezifikation R25-11 generiert.

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kIllegalWrite rollback_semantics

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
AccessReturned if the Key-Value Storage is configured as read- only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption of stored data fails.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the added/changed values.
PerErrc::kQuotaExceededrollback_semantics Returned if the added/changed values would exceed the configured maximumAllowedSize of the Key-Value Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00049
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00049@rel:R25-11#2fe64153
Content hash
2fe64153
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00049
Status: valid/unmigrated Version: rel:R25-11#bedc7cd3 Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00049@rel:R25-11#bedc7cd3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2fe641532026-09-30
  • R19-11rel:R19-11#a63d7bdd2026-10-14
  • R20-11rel:R20-11#2b2f8c592026-10-14
  • R21-11rel:R21-11#5a7863892026-10-14
  • R22-11rel:R22-11#7ba28f5a2026-10-14
  • R23-11rel:R23-11#0d431f372026-10-14
  • R24-11rel:R24-11#111d5e172026-10-14
  • R25-11rel:R25-11#bedc7cd32026-10-14 active
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

function operator= [SWS_PER_00323] Upstream: RS_PER_00002, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00145, RS_AP_00159

KeyValueStorage & operator= (KeyValueStorage &&kvs)=delete;

The move assignment operator for KeyValueStorage shall not be used.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage

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

Record
AUTOSAR/AP/record/SWS_PER_00323
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00323@rel:R25-11#d0aa05fb
Content hash
d0aa05fb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00323
Status: valid/unmigrated Version: rel:R25-11#0d46009f Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00323@rel:R25-11#0d46009f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d0aa05fb2026-09-30
  • R19-11rel:R19-11#c9df11fd2026-10-14
  • R20-11rel:R20-11#43e209d42026-10-14
  • R21-11rel:R21-11#3fa50ca32026-10-14
  • R22-11rel:R22-11#3a8958662026-10-14
  • R23-11rel:R23-11#d865b2282026-10-14
  • R24-11rel:R24-11#0d46009f2026-10-14
  • R25-11rel:R25-11#0d46009f2026-10-14 active
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

function operator= [SWS_PER_00325] Upstream: RS_PER_00002, RS_AP_00119, RS_AP_00120, RS_AP_00145

KeyValueStorage & operator= (const KeyValueStorage &)=delete;

The copy assignment operator for KeyValueStorage shall not be used.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage

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

Record
AUTOSAR/AP/record/SWS_PER_00325
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00325@rel:R25-11#25bc66e9
Content hash
25bc66e9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00325
Status: valid/unmigrated Version: rel:R25-11#7eccc0d0 Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00325@rel:R25-11#7eccc0d0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#25bc66e92026-09-30
  • R19-11rel:R19-11#fec94e692026-10-14
  • R20-11rel:R20-11#f05ae5d42026-10-14
  • R21-11rel:R21-11#f05ae5d42026-10-14
  • R22-11rel:R22-11#10326f822026-10-14
  • R23-11rel:R23-11#2038e13d2026-10-14
  • R24-11rel:R24-11#7eccc0d02026-10-14
  • R25-11rel:R25-11#7eccc0d02026-10-14 active
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

function ~KeyValueStorage [SWS_PER_00050] Upstream: RS_PER_00002, RS_AP_00120, RS_AP_00129, RS_AP_00134, RS_AP_00145, RS_AP_00159

~KeyValueStorage () noexcept;

Destructor for KeyValueStorage.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_PER_00050
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00050@rel:R25-11#c322006e
Content hash
c322006e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00050
Status: valid/unmigrated Version: rel:R25-11#686fc2dc Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00050@rel:R25-11#686fc2dc
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c322006e2026-09-30
  • R19-11rel:R19-11#d5051f6a2026-10-14
  • R20-11rel:R20-11#a653a0472026-10-14
  • R21-11rel:R21-11#a653a0472026-10-14
  • R22-11rel:R22-11#3e0145ae2026-10-14
  • R23-11rel:R23-11#8187a0df2026-10-14
  • R24-11rel:R24-11#686fc2dc2026-10-14
  • R25-11rel:R25-11#686fc2dc2026-10-14 active
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