DEENESPTFRRUARHIKOZHNL

namespace ara::per

User GuideKI-GENERIERT

Ermöglicht die persistente Speicherung und Verwaltung von Anwendungsdaten über Schlüssel-Wert- und Dateispeicher.
KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 9cb072b2740a Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Ermöglicht die persistente Speicherung und Verwaltung von Anwendungsdaten über Schlüssel-Wert- und Dateispeicher.

Der Namespace ara::per stellt Schnittstellen für die persistente Datenspeicherung bereit, indem er Adaptive Anwendungen über Instanzbezeichner den Zugriff auf dateibasierte und schlüsselwertbasierte Speicherbereiche ermöglicht ([SWS_PER_00052], [SWS_PER_00116]). Anwendungen verwalten geöffnete Speicher über geteilte Handles, führen bei Manifeständerungen koordinierte Updates durch und können inkonsistente Daten über Wiederherstellungsmechanismen reparieren ([SWS_PER_00333], [SWS_PER_00357]). Während Speicherzugriffe nebenläufig über Handles erfolgen, bedingen administrative Vorgänge wie Updates oder Speicher-Resets die Abwesenheit konkurrierender Zugriffe ([SWS_PER_00311]).

Kontext

Der Namespace ara::per stellt die Schnittstellen der Persistenz-Funktionsgruppe für die AUTOSAR Adaptive Platform bereit. Seine primäre Verantwortung ist die dauerhafte, speicherüberdauernde Speicherung von Anwendungsdaten über Systemstarts und Prozesslebenszyklen hinweg. Das Modul unterscheidet zwei grundlegende Speicherparadigmen: KeyValueStorage für strukturierte Schlüssel-Wert-Paare und FileStorage für dateibasierten Speicherzugriff. Adaptive Anwendungen greifen auf diese Ressourcen über konfigurierte Port-Prototypen mittels ara::core::InstanceSpecifier zu ([SWS_PER_00052], [SWS_PER_00116]).

Wichtige Interaktionspartner des Namespace sind das Update and Configuration Management (UCM), das während der Laufzeit aktualisierte Zielkonfigurationen (Target Configuration) bereitstellen kann ([SWS_PER_00576], [SWS_PER_00577]), sowie das physische Speichermedium, auf dem ara::per Konsistenz, Redundanz und Datensicherheit gewährleistet ([SWS_PER_00311]).

diag_per_kontext Application Adaptive Application PerService ara::per Application->PerService OpenFileStorage / OpenKeyValueStorage StorageBackend Physischer Speicher PerService->StorageBackend Persistierung / Redundanz UCM UCM / Target Configuration UCM->PerService Manifest-Update

Kontextdiagramm: Zusammenspiel von Anwendung, ara::per, Update Management und physischem Speicher. Quellen: [SWS_PER_00052], [SWS_PER_00116], [SWS_PER_00576]

Lebenszyklus

Der Zugriff auf Speicherobjekte wird über Handle-Abstraktionen geregelt. Das Öffnen eines Speichers über OpenKeyValueStorage oder OpenFileStorage erzeugt ein SharedHandle ([SWS_PER_00052], [SWS_PER_00116]). Da mehrere Threads nebenläufig auf denselben Speicher zugreifen können, wird die physische Ressource nicht zwangsläufig geschlossen, wenn ein einzelnes SharedHandle seinen Gültigkeitsbereich verlässt; das Schließen erfolgt erst, wenn sämtliche referenzierenden SharedHandle-Instanzen abgebaut sind ([SWS_PER_00052], [SWS_PER_00116]).

Für Dateien innerhalb eines FileStorage werden Erzeugungs- und Modifikationszustände detailliert nachverfolgt. Die Enumeration FileCreationState bildet ab, ob eine Datei bei der Installation (kCreatedDuringInstallation), während eines Updates (kCreatedDuringUpdate), durch einen Reset (kCreatedDuringReset), infolge einer Wiederherstellung (kCreatedDuringRecovery) oder durch die Anwendung selbst (kCreatedByApplication) angelegt wurde ([SWS_PER_00435]). Analog spiegelt FileModificationState wider, wann und durch welchen Vorgang eine Datei zuletzt geändert wurde ([SWS_PER_00436]).

Zur Verwaltung von Ausgangszuständen stellt der Namespace Reset-Funktionen bereit: ResetKeyValueStorage ([SWS_PER_00334]) und ResetAllFiles ([SWS_PER_00336]) setzen einzelne Speicher auf die Werte zurück, die im Manifest initial definiert wurden. Demgegenüber leert die globale Operation ResetPersistency ([SWS_PER_00358]) sämtliche Schlüssel-Wert- und Dateispeicher vollständig; deren Wiedererzeugung geschieht beim nächsten Aufruf von OpenFileStorage oder OpenKeyValueStorage.

Hinsichtlich der Nebenläufigkeit sind die Öffnungsfunktionen (OpenFileStorage, OpenKeyValueStorage), Speichergrößenabfragen (GetCurrentFileStorageSize, GetCurrentKeyValueStorageSize) sowie speicherbezogene Wiederherstellungs- und Reset-Funktionen threadsicher ([SWS_PER_00052], [SWS_PER_00116], [SWS_PER_00405], [SWS_PER_00406], [SWS_PER_00333], [SWS_PER_00334], [SWS_PER_00335], [SWS_PER_00336]). Globale Aktualisierungs- und Bereinigungsvorgänge wie UpdatePersistency ([SWS_PER_00357]), CleanUpPersistency ([SWS_PER_00567]), ResetPersistency ([SWS_PER_00358]), CheckForManifestUpdate ([SWS_PER_00576]) und ReloadPersistencyManifest ([SWS_PER_00577]) sind dagegen nicht threadsicher deklariert.

Nutzungspfad

Ein typischer Anwendungsablauf umfasst die Prüfung auf Konfigurationsaktualisierungen, das Einspielen von Datenmigrationen und den nachfolgenden Speicherzugriff:

Vor oder während des Regelbetriebs prüft die Anwendung mittels CheckForManifestUpdate, ob UCM eine neue Zielkonfiguration installiert hat ([SWS_PER_00576]). Ist dies der Fall, wird das neue Manifest über ReloadPersistencyManifest eingelesen ([SWS_PER_00577]). Während der anschließenden Verifikationsphase stößt die Anwendung UpdatePersistency an ([SWS_PER_00357]). Um versionsspezifische Datenmigrationen zu steuern, registriert die Anwendung vorab über RegisterApplicationDataUpdateCallback eine Rückruffunktion, die über ältere Vertragsversionen informiert wird und anwendungseigene Migrationsschritte ausführt ([SWS_PER_00356]). Zusätzlich können Elementänderungen mittels RegisterDataUpdateIndication überwacht werden ([SWS_PER_00578]). Nach Abschluss des Updates entfernt CleanUpPersistency veraltete Sicherungen und redundante Altbestände ([SWS_PER_00567]).

Für den regulären Zugriff öffnet die Anwendung die Zielressource über OpenKeyValueStorage ([SWS_PER_00052]) oder OpenFileStorage ([SWS_PER_00116]). Dateizugriffe im FileStorage werden über Bitmasken der Enumeration OpenMode gesteuert (z. B. kAtTheBeginning, kAtTheEnd, kTruncate, kAppend), die über die Operatoren operator| ([SWS_PER_00144]) und operator|= ([SWS_PER_00434]) kombiniert werden ([SWS_PER_00147]). Positionierungen erfolgen relativ zu Origin (kBeginning, kCurrent, kEnd) ([SWS_PER_00146]). Die aktuell belegte Speichergröße kann zur Laufzeit über GetCurrentKeyValueStorageSize ([SWS_PER_00405]) und GetCurrentFileStorageSize ([SWS_PER_00406]) ermittelt werden.

Manifest-Aktualisierung und SpeicherzugriffAdaptive Applicationara::perUse Case: Prüfung auf KonfigurationsaktualisierungenCheckForManifestUpdate()Result<bool> (true)optAktualisierung verfügbarReloadPersistencyManifest()Result<void>UpdatePersistency()Result<void>CleanUpPersistency()Result<void>Use Case: Regulärer SpeicherzugriffOpenKeyValueStorage(kvs)Result<SharedHandle<KeyValueStorage>>

Sequenzdiagramm: Ablauf zur Prüfung auf Manifest-Aktualisierungen, Durchführung des Updates und anschließendem Zugriff auf Key-Value-Speicher. Quellen: [SWS_PER_00052], [SWS_PER_00356], [SWS_PER_00357], [SWS_PER_00567], [SWS_PER_00576], [SWS_PER_00577]

Fehlerszenarien

Fehler werden im Namespace standardisiert über die Enumeration PerErrc ([SWS_PER_00311]) in Verbindung mit PerErrorDomain ([SWS_PER_00352]) und MakeErrorCode ([SWS_PER_00351]) signalisiert. Die deklarierte Klasse PerException dürfte als C++-Ausnahmetyp für Umgebungen dienen, in denen Fehler nicht über ara::core::Result, sondern über Exceptions behandelt werden (Interpretation). Frage Q-263982a4a4dae284 (offen)

Zentrale Fehlerszenarien umfassen:

  • Konfigurations- und Adressierungsfehler: Entspricht der übergebene InstanceSpecifier keinem im Modell konfigurierten Port-Interface, schlägt das Öffnen mit PerErrc::kStorageNotFound fehl ([SWS_PER_00052], [SWS_PER_00116], [SWS_PER_00311]). Dateizugriffe auf nicht vorhandene Dateien erzeugen PerErrc::kFileNotFound ([SWS_PER_00311]).
  • Ressourcenkonflikte: Wenn Speicher geöffnet sind oder zeitgleich administrative Befehle laufen, schlagen Operationen wie OpenKeyValueStorage, OpenFileStorage, RecoverKeyValueStorage, RecoverAllFiles, ResetKeyValueStorage, ResetAllFiles, UpdatePersistency, CleanUpPersistency oder ResetPersistency mit PerErrc::kResourceBusy fehl ([SWS_PER_00052], [SWS_PER_00116], [SWS_PER_00333], [SWS_PER_00334], [SWS_PER_00335], [SWS_PER_00336], [SWS_PER_00357], [SWS_PER_00358], [SWS_PER_00567]).
  • Integritätsverlust und Wiederherstellung: Bei strukturellen Beschädigungen (PerErrc::kIntegrityCorrupted) oder fehlgeschlagenen Redundanzprüfungen (PerErrc::kValidationFailed) ermöglicht ara::per eine Best-Effort-Wiederherstellung über RecoverKeyValueStorage ([SWS_PER_00333]) bzw. RecoverAllFiles ([SWS_PER_00335]). Über RegisterRecoveryReportCallback ([SWS_PER_00433]) können sicherheitsrelevante Anwendungen Korrekturmaßnahmen anhand von RecoveryReportKind (z. B. kKeyValueStorageRecovered, kFileRecovered) automatisiert protokollieren ([SWS_PER_00432]).
  • Speichergrenzen und physische Fehler: Werden Kontingente oder physische Kapazitäten überschritten, werden PerErrc::kOutOfStorageSpace, PerErrc::kQuotaExceeded oder PerErrc::kTooManyFiles gemeldet ([SWS_PER_00311]). Hardware- oder Dateisystemfehler resultieren in PerErrc::kPhysicalStorageFailure ([SWS_PER_00311]).
  • Sicherheit und Zugriffsmodi: Schlagen kryptografische Verifikationen oder Berechnungen fehl, gibt das Modul PerErrc::kEncryptionFailed oder PerErrc::kAuthenticationFailed zurück ([SWS_PER_00311]). Schreibversuche auf schreibgeschützte Speicherbereiche werden mit PerErrc::kIllegalWriteAccess abgewiesen ([SWS_PER_00311]).

Dieser Leitfaden basiert ausschließlich auf der Spezifikation von AUTOSAR Adaptive R25-11.

Themenkarte

KI-gestützte Gruppierung auf Basis der Records und Spezifikationsauszüge; keine Gliederung aus der AUTOSAR-Spezifikation.

Klassendiagramm

Abgerundete Rahmen = Namespace- bzw. Klassen-Scopes; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = namespace-fremde bzw. externe Basisklassen. Klicken öffnet die jeweilige Klassen- bzw. cppreference-Seite.

G cluster_ns ara::per nara__per__FileAccessor FileAccessor nara__per__FileInfo «struct» FileInfo nara__per__FileStorage FileStorage nara__per__KeyValueStorage KeyValueStorage nara__per__PerErrorDomain PerErrorDomain next_ara__core__ErrorDomain ara::core::ErrorDomain nara__per__PerErrorDomain->next_ara__core__ErrorDomain nara__per__PerException PerException next_ara__core__Exception ara::core::Exception nara__per__PerException->next_ara__core__Exception nara__per__ReadAccessor ReadAccessor nara__per__ReadAccessor->nara__per__FileAccessor nara__per__ReadWriteAccessor ReadWriteAccessor nara__per__ReadWriteAccessor->nara__per__ReadAccessor nara__per__WriteAccessor WriteAccessor nara__per__ReadWriteAccessor->nara__per__WriteAccessor nara__per__WriteAccessor->nara__per__FileAccessor nara__per__SharedHandle SharedHandle nara__per__UniqueHandle UniqueHandle

Detailansicht

Wähle in der Gliederung einen Eintrag aus.

Dateizugriff

FileAccessor contains a common basis for ReadAccessor and WriteAccessor

Basis für ReadAccessor, WriteAccessor

FileInfo class

This structure contains additional information on a file returned by GetFileInfo.

ReadAccessor is used to read file data

erbt von FileAccessor

Basis für ReadWriteAccessor

ReadWriteAccessor is used to read and write file data

erbt von ReadAccessor, WriteAccessor

Handle to a ReadAccessor or ReadWriteAccessor

WriteAccessor is used to write file data

erbt von FileAccessor

Basis für ReadWriteAccessor

operator| function

Merges two OpenMode modifiers into one.

constexpr OpenMode operator| (OpenMode left, OpenMode right);
operator|= function

Merges an OpenMode modifier into this OpenMode.

OpenMode & operator|= (OpenMode &left, const OpenMode &right);
FileCreationState enumeration

This enumeration describes how and when a file was created.

enum class FileCreationState : std::uint32_t {...};

This enumeration describes how and when a file was last modified.

enum class FileModificationState : std::uint32_t {...};
OpenMode enumeration

This enumeration defines how a file shall be opened. The values can be combined (using | and |=) as long as they do not contradict each other.

enum class OpenMode : std::uint32_t {...};
Origin enumeration

Specification of origin used in MovePosition.

enum class Origin : std::uint32_t {...};

Speicheröffnung

The File Storage contains a set of files identified by their file names.

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

Handle to a File Storage or Key-Value Storage

Returns the space in bytes currently occupied by a File Storage. The returned size includes all metadata and the space used for redundancy and backups. The returned size is only guaranteed to be accurate if the File Storage is not opened and no other operation on the File Storage takes place at the same time.

ara::core::Result< std::uint64_t > GetCurrentFileStorageSize (const ara::core::InstanceSpecifier &fs) noexcept;

Returns the space in bytes currently occupied by a Key-Value Storage. The returned size includes all metadata and the space used for redundancy and backups. The returned size is only guaranteed to be accurate if the Key-Value Storage is not opened and no other operation on the Key-Value Storage takes place at the same time.

ara::core::Result< std::uint64_t > GetCurrentKeyValueStorageSize (const ara::core::InstanceSpecifier &kvs) noexcept;

Opens a File Storage. OpenFileStorage will fail with kResourceBusy when the File Storage is currently being modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles. Because multiple threads can access the same File Storage concurrently, the File Storage might not be closed when the SharedHandle returned by this function goes out of scope. It will only be closed when all SharedHandles that refer to the same File Storage went out of scope.

ara::core::Result< SharedHandle< FileStorage > > OpenFileStorage (const ara::core::InstanceSpecifier &fs) noexcept;

Opens a Key-Value Storage. OpenKeyValueStorage will fail with kResourceBusy when the Key-Value Storage is currently being modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage. Because multiple threads can access the same Key-Value Storage concurrently, the Key-Value Storage might not be closed when the SharedHandle returned by this function goes out of scope. It will only be closed when all SharedHandles that refer to the same Key-Value Storage went out of scope.

ara::core::Result< SharedHandle< KeyValueStorage > > OpenKeyValue Storage (const ara::core::InstanceSpecifier &kvs) noexcept;

Fehlerbehandlung

Defines the error domain for Persistency.

erbt von ara::core::ErrorDomain

Exception type thrown by Persistency.

erbt von ara::core::Exception

GetPerDomain function

Returns the global PerErrorDomain object.

constexpr const ara::core::ErrorDomain & GetPerDomain () noexcept;
MakeErrorCode function

Creates an error code.

constexpr ara::core::ErrorCode MakeErrorCode (PerErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept;
PerErrc enumeration

Defines the errors for Persistency. The enumeration values 0 - 255 are reserved for AUTOSAR assigned errors, the stack provider is free to define additional errors starting from 256.

enum class PerErrc : ara::core::ErrorDomain::CodeType {...};

Wiederherstellung

Recovers a File Storage, including all files. RecoverAllFiles recovers a File Storage when the redundancy checks fail. It will fail with kResourceBusy when the File Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles. This method does a best-effort recovery of all files. After recovery, files might show outdated or initial content, or might be lost.

ara::core::Result< void > RecoverAllFiles (const ara::core::Instance Specifier &fs) noexcept;

Recovers a Key-ValueStorage. RecoverKeyValueStorage allows to recover a Key-Value Storage when the redundancy checks fail. It will fail with kResourceBusy when the Key-Value Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage. This method does a best-effort recovery of all key-value pairs. After recovery, keys might show outdated or initial value, or might be lost.

ara::core::Result< void > RecoverKeyValueStorage (const ara::core::InstanceSpecifier &kvs) noexcept;

Register a recovery reporting callback with Persistency. This callback can be used in safety-aware Adaptive Applications to detect actions of the Persistency that are related to the correctness of the persisted data and the reliability of the storage.

void RegisterRecoveryReportCallback (std::function< void(const ara::core::InstanceSpecifier &storage, ara::per::RecoveryReportKind recoveryReportKind, ara::core::Vector< ara::core::String > reported Elements, ara::core::Vector< std::uint8_t > reportedInstances)> recoveryReportCallback) noexcept;
RecoveryReportKind enumeration

Defines the reported recovery actions.

enum class RecoveryReportKind : std::uint32_t {...};

Datenpflege

Checks for updates of the Persistency Target Configuration. This method can be used to detect configuration updates that are installed by UCM while the Adaptive Application that uses Persistency is running. To re-read the updated Target Configuration, the Adaptive Application needs to call ara::per:: ReloadPersistencyManifest.

ara::core::Result< bool > CheckForManifestUpdate () noexcept;

Removes backup data and other unused data of all Persistency Key-Value Storages and File Storages.

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

Registers an application data update callback with Persistency. The provided callback function will be called by Persistency if an update of stored application data might be necessary. This decision is based on the contract versions. The contract version that last accessed Persistency is provided as an argument to the callback, as well as the ara::core::InstanceSpecifier referring to the updated Key- Value Storage or File Storage. Based on this information, the Adaptive Application can decide which updates are actually necessary, e.g. a migration from any older contract version could be supported, with different steps required for each of these. The provided function will be called from the context of ara::per::UpdatePersistency, ara::per::OpenKeyValueStorage, or ara::per::OpenFileStorage.

void RegisterApplicationDataUpdateCallback (std::function< void(const ara::core::InstanceSpecifier &storage, ara::core::String contract Version)> appDataUpdateCallback) noexcept;

Registers a data update indication callback with Persistency. The provided callback function will be called by Persistency when an update of stored data happened. It will be called from the context of ara::per::UpdatePersistency, ara:: per::OpenKeyValueStorage, or ara::per::OpenFileStorage.

void RegisterDataUpdateIndication (std::function< void(const ara::core::InstanceSpecifier &updatedStorage, ara::core::StringView updatedElement)> dataUpdateIndication, ara::core::InstanceSpecifier monitoredStorage, ara::core::Vector< ara::core::String > monitored Elements) noexcept;

Re-reads the Target Configuration. This method can be used to prepare for updates of the Key-Value Storages and File Storages of Persistency after a new Target Configuration was installed by UCM while the Adaptive Application that uses Persistency is running. Storages are only updated after closing them, either when they are opened again or by an explicit call to ara:: per::UpdatePersistency.

ara::core::Result< void > ReloadPersistencyManifest () noexcept;
ResetAllFiles function

Resets a File Storage, including all files. ResetAllFiles resets a File Storage to the initial state, containing only the files which were deployed from the Target Configuration, with their initial content. Afterwards, the File Storage will appear as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the File Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles.

ara::core::Result< void > ResetAllFiles (const ara::core::Instance Specifier &fs) noexcept;

Resets a Key-Value Storage to the initial state. ResetKeyValueStorage allows to reset a Key-Value Storage to the initial state, containing only key-value pairs which were deployed from the Target Configuration, with their initial values. Afterwards, the Key-Value Storage will appear as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the Key-Value Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage.

ara::core::Result< void > ResetKeyValueStorage (const ara::core::InstanceSpecifier &kvs) noexcept;

Resets all Key-Value Storages and File Storages by entirely removing their content. The Key-Value Storages and File Storages will be re-created when ara::per:: OpenFileStorage or ara::per::OpenKeyValueStorage is called next time.

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

Updates all Persistency Key-Value Storages and File Storages after a new Target Configuration was installed. This method can be used to update the persistent data of the Adaptive Application during verification phase.

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

Enumerationen

enumeration FileCreationState [SWS_PER_00435] Upstream: RS_PER_00004, RS_AP_00122, RS_AP_00125, RS_AP_00143

enum class FileCreationState :                std::uint32_t {...};

This enumeration describes how and when a file was created.

Header-Datei#include "ara/per/file_storage.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per
SymbolFileCreationState
Basistypstd::uint32_t

Werte

EnumeratorBeschreibung
kCreatedDuringInstallation=1 The file was created by Persistency after installation of the Adaptive Application or after ResetPersistency.
kCreatedDuringUpdate=2 The file was created by Persistency during an update.
kCreatedDuringReset=3 The file was re-created due to a call to ResetFile or ResetAllFiles.
kCreatedDuringRecovery=4 The file was re-created by Persistency after a corruption was detected.
kCreatedByApplication=5 The file was created by the Persistency user.

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

Record
AUTOSAR/AP/record/SWS_PER_00435
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00435@rel:R25-11#91c90ae1
Content hash
91c90ae1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00435
Status: valid/unmigrated Version: rel:R25-11#5c76ed9c 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_00435@rel:R25-11#5c76ed9c
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#91c90ae12026-09-30
  • R20-11rel:R20-11#fc72e8cf2026-10-14
  • R21-11rel:R21-11#fade16892026-10-14
  • R22-11rel:R22-11#76ad97da2026-10-14
  • R23-11rel:R23-11#096eb2152026-10-14
  • R24-11rel:R24-11#67a514e92026-10-14
  • R25-11rel:R25-11#5c76ed9c2026-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

enumeration FileModificationState [SWS_PER_00436] Upstream: RS_PER_00004, RS_AP_00122, RS_AP_00125, RS_AP_00143

enum class FileModificationState :                 std::uint32_t {...};

This enumeration describes how and when a file was last modified.

Header-Datei#include "ara/per/file_storage.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per
SymbolFileModificationState
Basistypstd::uint32_t

Werte

EnumeratorBeschreibung
kModifiedDuringUpdate=2 The file was last modified by Persistency during an update.
kModifiedDuringReset=3 The file was last modified by Persistency due to a call to ResetFile or ResetAllFiles.
kModifiedDuringRecovery=4 The file was last modified by Persistency after a corruption was detected.
kModifiedByApplication=5 The file was last modified by the Persistency user.

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

Record
AUTOSAR/AP/record/SWS_PER_00436
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00436@rel:R25-11#399a2032
Content hash
399a2032
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00436
Status: valid/unmigrated Version: rel:R25-11#13cb5d42 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_00436@rel:R25-11#13cb5d42
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#399a20322026-09-30
  • R20-11rel:R20-11#83ce45b72026-10-14
  • R21-11rel:R21-11#98b8ab052026-10-14
  • R22-11rel:R22-11#2ce2c3962026-10-14
  • R23-11rel:R23-11#d9854b632026-10-14
  • R24-11rel:R24-11#93230b352026-10-14
  • R25-11rel:R25-11#13cb5d422026-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

enumeration OpenMode [SWS_PER_00147] Upstream: RS_PER_00003, RS_AP_00122, RS_AP_00125, RS_AP_00143

enum class OpenMode :            std::uint32_t {...};

This enumeration defines how a file shall be opened. The values can be combined (using | and |=) as long as they do not contradict each other.

Header-Datei#include "ara/per/file_storage.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per
SymbolOpenMode
Basistypstd::uint32_t

Werte

EnumeratorBeschreibung
kAtTheBeginning= 1 << 0 Sets the seek position to the beginning of the file when the file is opened. This mode cannot be combined with kAtTheEnd.
kAtTheEnd= 1 << 1 Sets the seek position to the end of the file when the file is opened. This mode cannot be combined with kAtTheBeginning or kTruncate.
kTruncate= 1 << 2 Removes existing content when the file is opened. This mode cannot be combined with kAtTheEnd.
kAppend= 1 << 3 Append to the end. Always seeks to the end of the file before writing.

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

Record
AUTOSAR/AP/record/SWS_PER_00147
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00147@rel:R25-11#1232fbf5
Content hash
1232fbf5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00147
Status: valid/unmigrated Version: rel:R25-11#76cbd793 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_00147@rel:R25-11#76cbd793
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#1232fbf52026-09-30
  • R19-11rel:R19-11#850afae02026-10-14
  • R20-11rel:R20-11#1262e3062026-10-14
  • R21-11rel:R21-11#6e04c4702026-10-14
  • R22-11rel:R22-11#53c040ad2026-10-14
  • R23-11rel:R23-11#48e6b88e2026-10-14
  • R24-11rel:R24-11#678f13022026-10-14
  • R25-11rel:R25-11#76cbd7932026-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

enumeration Origin [SWS_PER_00146] Upstream: RS_PER_00003, RS_AP_00122, RS_AP_00125, RS_AP_00143

enum class Origin :            std::uint32_t {...};

Specification of origin used in MovePosition.

Header-Datei#include "ara/per/file_accessor.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per
SymbolOrigin
Basistypstd::uint32_t

Werte

EnumeratorBeschreibung
kBeginning=0 Seek from the beginning of the file.
kCurrent=1 Seek from the current position.
kEnd=2 Seek from the end of the file.

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

Record
AUTOSAR/AP/record/SWS_PER_00146
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00146@rel:R25-11#3a8c900d
Content hash
3a8c900d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00146
Status: valid/unmigrated Version: rel:R25-11#d2fd11c4 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_00146@rel:R25-11#d2fd11c4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#3a8c900d2026-09-30
  • R19-11rel:R19-11#852935312026-10-14
  • R20-11rel:R20-11#25a49a522026-10-14
  • R21-11rel:R21-11#118ba30a2026-10-14
  • R22-11rel:R22-11#118ba30a2026-10-14
  • R23-11rel:R23-11#f995dce12026-10-14
  • R24-11rel:R24-11#f995dce12026-10-14
  • R25-11rel:R25-11#d2fd11c42026-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

enumeration PerErrc [SWS_PER_00311] Upstream: RS_AP_00122, RS_AP_00125, RS_AP_00127, RS_AP_00149

enum class PerErrc :            ara::core::ErrorDomain::CodeType {...};

Defines the errors for Persistency. The enumeration values 0 - 255 are reserved for AUTOSAR assigned errors, the stack provider is free to define additional errors starting from 256.

Header-Datei#include "ara/per/per_error_domain.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per
SymbolPerErrc
Basistypara::core::ErrorDomain::CodeType

Werte

EnumeratorBeschreibung
kStorageNotFound=1 The requested Key-Value Storage or File Storage is not configured in the AUTOSAR model.
kKeyNotFound=2 The provided key cannot be not found in the Key-Value Storage.
kIllegalWriteAccess=3 The operation could not be performed because the accessed Key-Value Storage or File Storage is configured as read-only or write-only-once.
kPhysicalStorageFailure=4 An error occurred when accessing the physical storage, e.g. because of a corrupted file system or corrupted hardware, or because of insufficient access rights.
kIntegrityCorrupted=5 The structural integrity of the Key-Value Storage or File Storage could not be established. This can happen when the internal structure of a Key-Value Storage or the metadata of a File Storage is corrupted.
kValidationFailed=6 The validation of redundancy measures failed for a single key-value pair, for the whole Key-Value Storage, for a single file, or for the whole File Storage.
kEncryptionFailed=7 The encryption or decryption failed for a single key-value pair, for the whole Key-Value Storage, for a single file, or for the whole File Storage.
kDataTypeMismatch=8 The provided data type does not match the stored data type.
kInitValueNotAvailable=9 The operation could not be performed because no initial value is available.
kResourceBusy= 10 The operation could not be performed because the resource is currently busy.
kOutOfStorageSpace= 12 The physical storage space was exceeded.
kFileNotFound= 13 The requested file name cannot be not found in the File Storage.
kInvalidPosition= 15 SetPosition tried to move to a position that is not reachable (i.e. which is smaller than zero or greater than the current size of the file).
kEof= 16 The Persistency user tried to read from the end of the file or from an empty file.
kInvalidOpenMode= 17 Opening a file failed because the requested combination of Open Modes is invalid.
kInvalidSize= 18 SetFileSize tried to set a new size that is bigger than the current file size.
kTooManyFiles= 19 The maximum number of files was exceeded.
kQuotaExceeded= 20 The allocated storage quota was exceeded.
kAuthenticationFailed= 21 Calculating or checking of the MAC failed for a single key-value pair, for the whole Key-Value Storage, for a single file, or for the whole File Storage.

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

Record
AUTOSAR/AP/record/SWS_PER_00311
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00311@rel:R25-11#74bafb1d
Content hash
74bafb1d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00311
Status: valid/unmigrated Version: rel:R25-11#bb710d42 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_00311@rel:R25-11#bb710d42
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#74bafb1d2026-09-30
  • R19-11rel:R19-11#52a505112026-10-14
  • R20-11rel:R20-11#31f87d482026-10-14
  • R21-11rel:R21-11#9bbbacde2026-10-14
  • R22-11rel:R22-11#4c6de6f22026-10-14
  • R23-11rel:R23-11#3774a98c2026-10-14
  • R24-11rel:R24-11#7af9c3ee2026-10-14
  • R25-11rel:R25-11#bb710d422026-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

enumeration RecoveryReportKind [SWS_PER_00432] Upstream: RS_PER_00008, RS_AP_00122, RS_AP_00125, RS_AP_00143

enum class RecoveryReportKind :            std::uint32_t {...};

Defines the reported recovery actions.

Header-Datei#include "ara/per/recovery.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per
SymbolRecoveryReportKind
Basistypstd::uint32_t

Werte

EnumeratorBeschreibung
kKeyValueStorageRecoveryFailed=1 A Key-Value Storage was corrupted, an insufficient number of valid copies existed. storage contains the short-name path of the Key-Value Storage, reportedElements is empty, reportedInstances contains the indices of the affected Key-Value Storage copies.
kKeyValueStorageRecovered=2 A Key-Value Storage was corrupted, but a sufficient number of valid copies existed. storage contains the short-name path of the Key-Value Storage, reportedElements is empty, reportedInstances contains the indices of the affected Key-Value Storage copies.
kKeyRecoveryFailed=3 A set of key-value pairs was corrupted, an insufficient number of valid copies existed. storage contains the short-name path of the Key-Value Storage, reportedElements contains the list of affected keys, reportedInstances contains the indices of the affected Key-Value Storage or key-value pair copies. In general, the nth key in reportedElements corresponds to the nth index in reported Instances, i.e. a key may be reported several times if several copies are broken. In case only one key-value pair is affected, reported Elements may be provided containing just this key.
kKeyRecovered=4 A set of key-value pairs was corrupted, but a sufficient number of valid copies existed. storage contains the short-name path of the Key-Value Storage, reportedElements contains the list of affected keys, reportedInstances contains the indices of the affected Key-Value Storage or key-value pair copies. In general, the nth key in reportedElements corresponds to the nth index in reported Instances, i.e. a key may be reported several times if several copies are broken. In case only one key-value pair is affected, reported Elements may be provided containing just this key.
kFileStorageRecoveryFailed=5 A File Storage was corrupted, an insufficient number of valid copies existed. storage contains the short-name path of the File Storage, reportedElements is empty, reportedInstances contains the indices of the affected File Storage copies.
kFileStorageRecovered=6 A File Storage was corrupted, but a sufficient number of valid copies existed. storage contains the short-name path of the File Storage, reportedElements is empty, reportedInstances contains the indices of the affected File Storage copies.
kFileRecoveryFailed=7 A set of files was corrupted, an insufficient number of valid copies existed. storage contains the short-name path of the File Storage, reportedElements contains the list of affected file names, reported Instances contains the indices of the affected File Storage or file copies. In general, the nth file name in reportedElements corresponds to the nth index in reportedInstances, i.e. a file name may be reported several times if several copies are broken. In case only one file is affected, reportedElements may be provided containing just this file name.
kFileRecovered=8 A set of files was corrupted, but a sufficient number of valid copies existed. storage contains the short-name path of the File Storage, reportedElements contains the list of affected file names, reported Instances contains the indices of the affected File Storage or file copies. In general, the nth file name in reportedElements corresponds to the nth index in reportedInstances, i.e. a file name may be reported several times if several copies are broken. In case only one file is affected, reportedElements may be provided containing just this file name.

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

Record
AUTOSAR/AP/record/SWS_PER_00432
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00432@rel:R25-11#3adbe73c
Content hash
3adbe73c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00432
Status: valid/unmigrated Version: rel:R25-11#dd38feda 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_00432@rel:R25-11#dd38feda
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#3adbe73c2026-09-30
  • R20-11rel:R20-11#6815294e2026-10-14
  • R21-11rel:R21-11#8fb22ccf2026-10-14
  • R22-11rel:R22-11#92f94a6b2026-10-14
  • R23-11rel:R23-11#4cff42322026-10-14
  • R24-11rel:R24-11#2ec0a9942026-10-14
  • R25-11rel:R25-11#dd38feda2026-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

Dokumentation der freien Funktionen

function CheckForManifestUpdate [SWS_PER_00576] Upstream: RS_PER_00013, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< bool > CheckForManifestUpdate () noexcept;

Checks for updates of the Persistency Target Configuration. This method can be used to detect configuration updates that are installed by UCM while the Adaptive Application that uses Persistency is running. To re-read the updated Target Configuration, the Adaptive Application needs to call ara::per:: ReloadPersistencyManifest.

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

Verwendung

Die synchrone Funktion CheckForManifestUpdate aus dem Header ara/per/update.h prüft im Namensraum ara::per, ob Aktualisierungen der Persistency Target Configuration vorliegen [SWS_PER_00576]. Sie dient dazu, Konfigurationsänderungen zu erkennen, die vom Update and Configuration Management (UCM) eingespielt wurden, während die Persistenz nutzende adaptive Anwendung bereits läuft [SWS_PER_00576]. Die Funktion nimmt keine Parameter entgegen und liefert ein ara::core::Result<bool> zurück: true, wenn die Konfiguration seit dem letzten Auslesen aktualisiert wurde, oder false, wenn sie unverändert geblieben ist [SWS_PER_00576].

Fehlerbehandlung und Nebenläufigkeit

Die Funktion ist als noexcept deklariert und ausnahmesicher (exception safe), jedoch nicht threadsicher (not thread-safe) [SWS_PER_00576]. Im Fehlerfall enthält das Ergebnis entweder herstellerspezifische Fehler oder einen der folgenden Fehlercodes [SWS_PER_00576]:

  • kPhysicalStorageFailure: Tritt auf, wenn der Zugriff auf den physikalischen Speicher während der Überprüfung fehlschlägt [SWS_PER_00576].
  • kIntegrityCorrupted: Tritt auf, wenn hinterlegte Daten aufgrund beschädigter struktureller Integrität nicht gelesen werden können [SWS_PER_00576].

Zusammenspiel

Wird eine Aktualisierung festgestellt (Rückgabewert true), muss die Anwendung anschließend ara::per::ReloadPersistencyManifest aufrufen, um die geänderte Target Configuration tatsächlich neu einzulesen [SWS_PER_00576].

Dieser Text wurde von einer KI generiert und dient als Orientierungshilfe anhand der Spezifikation.

Header-Datei#include "ara/per/update.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< bool >A Result containing true if the Target Configuration was updated or false if it is unchanged since the last time the Target Configuration was read. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
kPhysicalStorage-Failurerollback_semantics Returned if access to the physical storage fails during the checking operation.
kIntegrityCor-ruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.

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

Record
AUTOSAR/AP/record/SWS_PER_00576
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00576@rel:R25-11#b26d10d9
Content hash
b26d10d9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00576
Status: valid/unmigrated Version: rel:R25-11#f5cc3f5c Versionshistorie & Revisions (1 transition, 3 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_00576@rel:R25-11#f5cc3f5c
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#b26d10d92026-09-30
  • R24-11rel:R24-11#478f6c8c2026-10-14
  • R25-11rel:R25-11#f5cc3f5c2026-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 CleanUpPersistency [SWS_PER_00567] Upstream: RS_PER_00016, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00135, RS_AP_00139, RS_AP_00159

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

Removes backup data and other unused data of all Persistency Key-Value Storages and File Storages.

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

Verwendung

Die synchrone Funktion CleanUpPersistency aus ara/per/update.h dient dem Entfernen von Sicherungsdaten (Backup Data) und weiteren ungenutzten Daten über sämtliche Key-Value- und File-Storages einer Instanz hinweg [SWS_PER_00567]. Sie nimmt keine Parameter entgegen und gibt das Ergebnis über den Rückgabetyp ara::core::Result<void> zurück [SWS_PER_00567].

Nebenläufigkeit und Einschränkungen

Die Funktion ist nicht threadsicher (not thread-safe) und verlangt exklusiven Zugriff auf alle Speicherressourcen [SWS_PER_00567]. Ist noch ein ara::per::SharedHandle eines Key-Value- oder File-Storage geöffnet, schlägt der Aufruf mit kResourceBusy fehl [SWS_PER_00567]. Ebenso führen parallel laufende Operationen wie UpdatePersistency, ResetPersistency, RecoverKeyValueStorage, ResetKeyValueStorage, RecoverAllFiles oder ResetAllFiles zum Fehlercode kResourceBusy [SWS_PER_00567].

Solange CleanUpPersistency ausgeführt wird, scheitern konkurrierende Aufrufe zum Öffnen von Speichern über OpenKeyValueStorage [SWS_PER_00052] oder OpenFileStorage [SWS_PER_00116] sowie Wiederherstellungs- und Reset-Funktionen [SWS_PER_00333], [SWS_PER_00334], [SWS_PER_00335], [SWS_PER_00336] ebenfalls mit kResourceBusy.

Fehlerbehandlung

Für aufgetretene Fehler gilt eine speicherbezogene Rollback-Semantik [SWS_PER_00567]. Zu den möglichen Fehlern gehören neben kResourceBusy:

  • kPhysicalStorageFailure bei Fehlern beim Zugriff auf das physische Speichermedium [SWS_PER_00567],
  • kIntegrityCorrupted bei struktureller Beschädigung der gespeicherten Daten [SWS_PER_00567],
  • kValidationFailed bei fehlschlagender Prüfung der Datengültigkeit [SWS_PER_00567],
  • kEncryptionFailed bei Fehlern während der Ver- oder Entschlüsselung [SWS_PER_00567],
  • kAuthenticationFailed bei fehlgeschlagener Berechnung oder Überprüfung des MAC [SWS_PER_00567],
  • sowie herstellerspezifische Fehlercodes [SWS_PER_00567].

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

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/update.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe kPhysicalStorage- 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
FailureReturned if access to the physical storage fails during the update operation.
kIntegrityCor-ruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails during the update operation.
kResourceBusyrollback_semantics Returned if ara::per::UpdatePersistency or ara::per:: ResetPersistency is currently being executed, or if ara:: per::RecoverKeyValueStorage or ara::per:: ResetKeyValueStorage is currently being executed for any Key-Value Storage, or if ara::per::RecoverAllFiles or ara::per::ResetAllFiles is currently being executed for any File Storage, or a ara::per::SharedHandle of a Key- Value Storage or a File Storage is currently in use.
kAuthentication-Failedrollback_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_00567
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00567@rel:R25-11#7398665b
Content hash
7398665b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00567
Status: valid/unmigrated Version: rel:R25-11#f9cdaf08 Versionshistorie & Revisions (1 transition, 4 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_00567@rel:R25-11#f9cdaf08
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#7398665b2026-09-30
  • R23-11rel:R23-11#e1f7fda32026-10-14
  • R24-11rel:R24-11#0bfb7d2d2026-10-14
  • R25-11rel:R25-11#f9cdaf082026-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 GetCurrentFileStorageSize [SWS_PER_00406] 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_00137, RS_AP_00139, RS_AP_00159

ara::core::Result< std::uint64_t > GetCurrentFileStorageSize (const ara::core::InstanceSpecifier &fs) noexcept;

Returns the space in bytes currently occupied by a File Storage. The returned size includes all metadata and the space used for redundancy and backups. The returned size is only guaranteed to be accurate if the File Storage is not opened and no other operation on the File Storage takes place at the same time.

Header-Datei#include "ara/per/file_storage.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
fsThe shortName path of a PortPrototype typed by a PersistencyFile StorageInterface.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
PerErrc::kStorageNotFoundrollback_semantics Returned if the passed InstanceSpecifier does not match any PersistencyFileStorageInterface configured for this Executable.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00406
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00406@rel:R25-11#602f8c77
Content hash
602f8c77
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00406
Status: valid/unmigrated Version: rel:R25-11#05c094c0 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_00406@rel:R25-11#05c094c0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#602f8c772026-09-30
  • R19-11rel:R19-11#67f89fa62026-10-14
  • R20-11rel:R20-11#87f0114c2026-10-14
  • R21-11rel:R21-11#ee9e70cd2026-10-14
  • R22-11rel:R22-11#def327602026-10-14
  • R23-11rel:R23-11#06e0e64e2026-10-14
  • R24-11rel:R24-11#78d010822026-10-14
  • R25-11rel:R25-11#05c094c02026-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 GetCurrentKeyValueStorageSize [SWS_PER_00405] 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_00137, RS_AP_00139, RS_AP_00159

ara::core::Result< std::uint64_t > GetCurrentKeyValueStorageSize (const ara::core::InstanceSpecifier &kvs) noexcept;

Returns the space in bytes currently occupied by a Key-Value Storage. The returned size includes all metadata and the space used for redundancy and backups. The returned size is only guaranteed to be accurate if the Key-Value Storage is not opened and no other operation on the Key-Value Storage takes place at the same time.

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

Parameter (in)

ParameterBeschreibung
kvsThe shortName path of a PortPrototype typed by a PersistencyKey ValueStorageInterface.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
PerErrc::kStorageNotFoundrollback_semantics Returned if the passed InstanceSpecifier does not match any PersistencyKeyValueStorageInterface configured for this Executable.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00405
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00405@rel:R25-11#c4ec6e96
Content hash
c4ec6e96
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00405
Status: valid/unmigrated Version: rel:R25-11#542916fb 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_00405@rel:R25-11#542916fb
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c4ec6e962026-09-30
  • R19-11rel:R19-11#3f8d2ee72026-10-14
  • R20-11rel:R20-11#f394ab092026-10-14
  • R21-11rel:R21-11#e1cb35cd2026-10-14
  • R22-11rel:R22-11#39a308942026-10-14
  • R23-11rel:R23-11#5c939f722026-10-14
  • R24-11rel:R24-11#542916fb2026-10-14
  • R25-11rel:R25-11#542916fb2026-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 GetPerDomain [SWS_PER_00352] Upstream: RS_AP_00119, RS_AP_00120, RS_AP_00159

constexpr const ara::core::ErrorDomain & GetPerDomain () noexcept;

Returns the global PerErrorDomain object.

Header-Datei#include "ara/per/per_error_domain.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
const ara::core::ErrorDomain &The global PerErrorDomain object.

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

Record
AUTOSAR/AP/record/SWS_PER_00352
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00352@rel:R25-11#404a1748
Content hash
404a1748
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00352
Status: valid/unmigrated Version: rel:R25-11#0f9be8a3 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_00352@rel:R25-11#0f9be8a3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#404a17482026-09-30
  • R19-11rel:R19-11#9cb2d1f82026-10-14
  • R20-11rel:R20-11#ba7c6ddb2026-10-14
  • R21-11rel:R21-11#ba7c6ddb2026-10-14
  • R22-11rel:R22-11#a22a71a82026-10-14
  • R23-11rel:R23-11#e20d90152026-10-14
  • R24-11rel:R24-11#0f9be8a32026-10-14
  • R25-11rel:R25-11#0f9be8a32026-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 MakeErrorCode [SWS_PER_00351] Upstream: RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00135, RS_AP_00159

constexpr ara::core::ErrorCode MakeErrorCode (PerErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept;

Creates an error code.

Header-Datei#include "ara/per/per_error_domain.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
codeError code number.
dataVendor defined data associated with the error.

Rückgabewert

TypBeschreibung
ara::core::ErrorCodeAn ErrorCode object.

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

Record
AUTOSAR/AP/record/SWS_PER_00351
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00351@rel:R25-11#d180b00f
Content hash
d180b00f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00351
Status: valid/unmigrated Version: rel:R25-11#6bc3a705 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_00351@rel:R25-11#6bc3a705
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d180b00f2026-09-30
  • R19-11rel:R19-11#4a2f0cae2026-10-14
  • R20-11rel:R20-11#0405c8a02026-10-14
  • R21-11rel:R21-11#df6b498d2026-10-14
  • R22-11rel:R22-11#cc3dc3172026-10-14
  • R23-11rel:R23-11#caf22e062026-10-14
  • R24-11rel:R24-11#6bc3a7052026-10-14
  • R25-11rel:R25-11#6bc3a7052026-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 OpenFileStorage [SWS_PER_00116] Upstream: RS_PER_00001, RS_PER_00004, 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_00137, RS_AP_00139, RS_AP_00144, RS_AP_00147, RS_AP_00159

ara::core::Result< SharedHandle< FileStorage > > OpenFileStorage (const ara::core::InstanceSpecifier &fs) noexcept;

Opens a File Storage. OpenFileStorage will fail with kResourceBusy when the File Storage is currently being modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles. Because multiple threads can access the same File Storage concurrently, the File Storage might not be closed when the SharedHandle returned by this function goes out of scope. It will only be closed when all SharedHandles that refer to the same File Storage went out of scope.

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

Die synchrone Funktion ara::per::OpenFileStorage öffnet einen Dateispeicher für persistente Daten und stellt diesen über ein geteiltes Zugriffshandle bereit [SWS_PER_00116]. Als Parameter erwartet sie eine Referenz auf einen ara::core::InstanceSpecifier, welcher den shortName-Pfad eines durch ein PersistencyFileStorageInterface typisierten Port-Prototyps angibt. Der Rückgabewert ist ein ara::core::Result<ara::core::SharedHandle<FileStorage>> [SWS_PER_00116].

Hinsichtlich der Nebenläufigkeit ist die Funktion thread-safe und exception-safe spezifiziert [SWS_PER_00116]. Da mehrere Threads parallel auf dieselbe Dateispeicher-Instanz zugreifen können, wird der physische Speicher nicht zwingend geschlossen, wenn ein einzelnes SharedHandle den Gültigkeitsbereich verlässt. Die Schließung erfolgt erst dann, wenn alle referenzierenden Handles out-of-scope gegangen sind [SWS_PER_00116].

Im Fehlerfall enthält das Result Fehlercodes der Enumeration PerErrc oder herstellerspezifische Fehler [SWS_PER_00116]:

  • PerErrc::kResourceBusy: Wird zurückgegeben, wenn zeitgleich administrative Operationen wie CleanUpPersistency, ResetPersistency, RecoverAllFiles oder ResetAllFiles ausgeführt werden. Während UpdatePersistency aktiv ist, tritt dieser Fehler auf, falls der Aufruf außerhalb des über RegisterApplicationDataUpdateCallback registrierten Callbacks oder mit einem abweichenden Bezeichner erfolgt [SWS_PER_00116], [SWS_PER_00356].
  • Konfigurations- und Zugriffsfehler: kStorageNotFound bei nicht konfigurierter Instanz, kPhysicalStorageFailure bei Fehlern des physischen Speichers sowie kIntegrityCorrupted, kValidationFailed, kEncryptionFailed und kAuthenticationFailed bei Integritäts-, Prüf- oder Entschlüsselungsproblemen [SWS_PER_00116].
  • Kapazitätsgrenzen bei impliziten Updates: kOutOfStorageSpace, kTooManyFiles oder kQuotaExceeded [SWS_PER_00116].

Im Zusammenspiel mit dem Modul bewirkt ein vorheriges Zurücksetzen mittels ResetPersistency, dass gelöschte Dateispeicher beim nächsten Aufruf von OpenFileStorage neu angelegt werden [SWS_PER_00358]. Werden während des Öffnens Daten aktualisiert, wird ein über RegisterDataUpdateIndication registrierter Indication-Callback direkt im Kontext von OpenFileStorage aufgerufen [SWS_PER_00578].

Dieser Text wurde von einer KI auf Basis der Spezifikation AUTOSAR Adaptive R25-11 generiert.

Implementer's Guide folgt (Komplexität I1)

Header-Datei#include "ara/per/file_storage.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
fsThe shortName path of a PortPrototype typed by a PersistencyFile StorageInterface.

Rückgabewert

TypBeschreibung
ara::core::Result<SharedHandle< FileStorage > >A Result containing a SharedHandle for the File Storage. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
PerErrc::kStorageNotFoundrollback_semantics Returned if the passed InstanceSpecifier does not match any PersistencyFileStorageInterface configured for this Executable.
PerErrc::kPhysicalStorageFailureno_rollback_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::kResourceBusyrollback_semantics Returned if CleanUpPersistency, or ResetPersistency is currently being executed, or if RecoverAllFiles or ResetAllFiles is currently being executed for the same File Storage. Also, while Update Persistency is currently being executed, this error is returned when OpenFileStorage is called outside of the callback registered via RegisterApplicationDataUpdateCallback, or if the used Instance Specifier differs from the one provided by the callback.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the files that are added/updated during an implicit update of the File Storage.
PerErrc::kTooManyFilesrollback_semantics Returned if the files that are added during an implicit update of the File Storage would exceed the configured maxNumberOfFiles.
PerErrc::kQuotaExceededrollback_semantics Returned if the files that are added/updated during an implicit update of the File Storage would exceed the configured maximum AllowedSize.
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_00116
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00116@rel:R25-11#3d9a9e5b
Content hash
3d9a9e5b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00116
Status: valid/unmigrated Version: rel:R25-11#045a694e 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_00116@rel:R25-11#045a694e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#3d9a9e5b2026-09-30
  • R19-11rel:R19-11#bf01f2fc2026-10-14
  • R20-11rel:R20-11#f59e7f982026-10-14
  • R21-11rel:R21-11#8ea5df192026-10-14
  • R22-11rel:R22-11#4ac6fa6a2026-10-14
  • R23-11rel:R23-11#21db3eff2026-10-14
  • R24-11rel:R24-11#a4ff2c552026-10-14
  • R25-11rel:R25-11#045a694e2026-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 OpenKeyValueStorage [SWS_PER_00052] 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_00137, RS_AP_00139, RS_AP_00144, RS_AP_00147, RS_AP_00159

ara::core::Result< SharedHandle< KeyValueStorage > > OpenKeyValue Storage (const ara::core::InstanceSpecifier &kvs) noexcept;

Opens a Key-Value Storage. OpenKeyValueStorage will fail with kResourceBusy when the Key-Value Storage is currently being modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage. Because multiple threads can access the same Key-Value Storage concurrently, the Key-Value Storage might not be closed when the SharedHandle returned by this function goes out of scope. It will only be closed when all SharedHandles that refer to the same Key-Value Storage went out of scope.

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

Verwendung und Lebenszyklus

Die synchrone Funktion OpenKeyValueStorage öffnet einen Key-Value-Speicher und ist als thread-safe sowie noexcept spezifiziert [SWS_PER_00052]. Als Parameter kvs wird ein ara::core::InstanceSpecifier übergeben, der den Pfad eines durch ein PersistencyKeyValueStorageInterface typisierten PortPrototype referenziert. Die Rückgabe erfolgt als ara::core::Result<SharedHandle<KeyValueStorage>>. Da mehrere Threads denselben Speicher nebenläufig öffnen können, schließt Persistency den physischen Speicher erst, wenn alle referenzierenden SharedHandle-Instanzen ihren Gültigkeitsbereich verlassen haben [SWS_PER_00052].

Fehlerbehandlung und Nebenläufigkeit

Im Fehlerfall liefert das Result spezifische Fehlercodes der Persistency-Fehlerdomäne [SWS_PER_00052]:

  • PerErrc::kStorageNotFound: Der Bezeichner passt zu keinem konfigurierten Interface der Executable.
  • PerErrc::kResourceBusy: Tritt auf, wenn konkurrierend CleanUpPersistency, ResetPersistency [SWS_PER_00358], RecoverKeyValueStorage oder ResetKeyValueStorage für diesen Speicher ausgeführt werden. Während UpdatePersistency ist der Aufruf nur innerhalb des über RegisterApplicationDataUpdateCallback registrierten Callbacks mit dem dort übergebenen Instanzbezeichner zulässig [SWS_PER_00356].
  • PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed und PerErrc::kAuthenticationFailed bei Defekten, Validierungs- oder Krypto-Fehlern.
  • PerErrc::kOutOfStorageSpace und PerErrc::kQuotaExceeded bei unzureichendem Speicherplatz oder Quotenüberschreitung während eines impliziten Updates.

Zusammenspiel

Wurden alle Daten zuvor mittels ResetPersistency gelöscht, wird der Speicher beim nächsten Aufruf von OpenKeyValueStorage automatisch neu erzeugt [SWS_PER_00358]. Nach dem Öffnen können ungespeicherte Modifikationen über DiscardPendingChanges auf den Zustand des Öffnens zurückgesetzt werden [SWS_PER_00365]. Zudem kann das Öffnen die Ausführung von Callbacks auslösen, die über RegisterDataUpdateIndication registriert wurden [SWS_PER_00578].

Dieser Nutzungshinweis wurde automatisiert auf Basis der Spezifikationsanforderungen generiert.

Implementer's Guide folgt (Komplexität I2)

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

Parameter (in)

ParameterBeschreibung
kvsThe shortName path of a PortPrototype typed by a PersistencyKey ValueStorageInterface.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
FoundReturned if the passed InstanceSpecifier does not match any PersistencyKeyValueStorageInterface configured for this Executable.
PerErrc::kPhysicalStorageFailureno_rollback_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::kResourceBusyrollback_semantics Returned if CleanUpPersistency, or ResetPersistency is currently being executed, or if RecoverKeyValueStorage or ResetKeyValue Storage is currently being executed for the same Key-Value Storage. Also, while UpdatePersistency is currently being executed, this error is returned when OpenKeyValueStorage is called outside of the callback registered via RegisterApplicationDataUpdate Callback, or if the used InstanceSpecifier differs from the one provided by the callback.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the values that are added/updated during an implicit update of the Key-Value Storage.
PerErrc::kQuotaExceededrollback_semantics Returned if the values that are added/updated during an implicit update of the Key-Value Storage would exceed the configured maximumAllowedSize.
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_00052
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00052@rel:R25-11#caeeeace
Content hash
caeeeace
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00052
Status: valid/unmigrated Version: rel:R25-11#d4b1e761 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_00052@rel:R25-11#d4b1e761
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#caeeeace2026-09-30
  • R19-11rel:R19-11#34496dec2026-10-14
  • R20-11rel:R20-11#f68c65ef2026-10-14
  • R21-11rel:R21-11#b958923e2026-10-14
  • R22-11rel:R22-11#e940c9852026-10-14
  • R23-11rel:R23-11#704678462026-10-14
  • R24-11rel:R24-11#124418c72026-10-14
  • R25-11rel:R25-11#d4b1e7612026-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 RecoverAllFiles [SWS_PER_00335] Upstream: RS_PER_00001, RS_PER_00004, 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_00137, RS_AP_00139, RS_AP_00159

ara::core::Result< void > RecoverAllFiles (const ara::core::Instance Specifier &fs) noexcept;

Recovers a File Storage, including all files. RecoverAllFiles recovers a File Storage when the redundancy checks fail. It will fail with kResourceBusy when the File Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles. This method does a best-effort recovery of all files. After recovery, files might show outdated or initial content, or might be lost.

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

Die Funktion RecoverAllFiles führt eine Wiederherstellung eines dateibasierten Speichers (File Storage) einschließlich aller darin abgelegten Dateien durch, wenn Redundanzprüfungen fehlschlagen [SWS_PER_00335]. Der Aufruf erfolgt synchron unter Angabe des InstanceSpecifier für den konfigurierten Port-Prototyp und liefert ein ara::core::Result<void> zurück [SWS_PER_00335].

Die Wiederherstellung arbeitet nach dem Best-Effort-Prinzip: Nach Abschluss können Dateien veraltete Inhalte aufweisen, auf ihren Initialzustand zurückgesetzt sein oder ganz verloren gehen [SWS_PER_00335]. Schlägt der Zugriff auf das Speichermedium fehl (PerErrc::kPhysicalStorageFailure) oder reicht der Speicherplatz nicht aus (PerErrc::kOutOfStorageSpace), existiert keine Rollback-Garantie [SWS_PER_00335]. Tritt ein Fehler bei Verschlüsselung (PerErrc::kEncryptionFailed), Integritätsprüfung (PerErrc::kAuthenticationFailed) oder Speichergrößenbegrenzung (PerErrc::kQuotaExceeded) auf, greift die Rollback-Semantik [SWS_PER_00335]. Passt der Bezeichner zu keiner konfigurierten Schnittstelle, resultiert dies in PerErrc::kStorageNotFound [SWS_PER_00335].

Obwohl die Funktion threadsicher ist, schlägt die Ausführung mit PerErrc::kResourceBusy fehl, solange der Speicher geöffnet ist oder ein aktiver Shared-Handle vorliegt [SWS_PER_00335], [SWS_PER_00116]. Ebenso blockieren parallele Ausführungen von ResetAllFiles [SWS_PER_00336] für denselben Speicher sowie die globalen Aktualisierungsoperationen UpdatePersistency [SWS_PER_00357], ResetPersistency [SWS_PER_00358] und CleanUpPersistency [SWS_PER_00567] den Aufruf [SWS_PER_00335].

Dieser Nutzungshinweis wurde von einer KI auf Basis der Spezifikationen erstellt.

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/file_storage.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kStorageNot rollback_semantics

Parameter (in)

ParameterBeschreibung
fsThe shortName path of a PortPrototype typed by a PersistencyFile StorageInterface.

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
FoundReturned if the passed InstanceSpecifier does not match any PersistencyFileStorageInterface configured for this Executable.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption of stored data fails.
PerErrc::kResourceBusyrollback_semantics Returned if UpdatePersistency, CleanUpPersistency, or Reset Persistency is currently being executed, or if ResetAllFiles is currently being executed for the same File Storage, or a Shared Handle of the same File Storage is currently in use.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the recovered files.
PerErrc::kQuotaExceededrollback_semantics Returned if the recovered files would exceed the configured maximumAllowedSize of the File 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_00335
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00335@rel:R25-11#73a08245
Content hash
73a08245
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00335
Status: valid/unmigrated Version: rel:R25-11#2f7dfc4c 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_00335@rel:R25-11#2f7dfc4c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#73a082452026-09-30
  • R19-11rel:R19-11#3ad2a41d2026-10-14
  • R20-11rel:R20-11#313148252026-10-14
  • R21-11rel:R21-11#524080052026-10-14
  • R22-11rel:R22-11#ec0502c32026-10-14
  • R23-11rel:R23-11#c58779272026-10-14
  • R24-11rel:R24-11#bd0fcca72026-10-14
  • R25-11rel:R25-11#2f7dfc4c2026-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 RecoverKeyValueStorage [SWS_PER_00333] 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_00137, RS_AP_00139, RS_AP_00159

ara::core::Result< void > RecoverKeyValueStorage (const ara::core::InstanceSpecifier &kvs) noexcept;

Recovers a Key-ValueStorage. RecoverKeyValueStorage allows to recover a Key-Value Storage when the redundancy checks fail. It will fail with kResourceBusy when the Key-Value Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage. This method does a best-effort recovery of all key-value pairs. After recovery, keys might show outdated or initial value, or might be lost.

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

Die synchrone Funktion RecoverKeyValueStorage im Namensraum ara::per dient der Wiederherstellung eines Key-Value-Speichers nach fehlgeschlagenen Redundanzprüfungen ([SWS_PER_00333]). Als Parameter kvs wird ein ara::core::InstanceSpecifier übergeben, der den ShortName-Pfad eines entsprechenden PortPrototype referenziert ([SWS_PER_00333]). Die Wiederherstellung erfolgt nach dem Best-Effort-Prinzip; nach dem Vorgang können Schlüssel veraltete oder initiale Werte aufweisen oder gänzlich verloren sein ([SWS_PER_00333]).

Obwohl die Funktion als threadsicher spezifiziert ist, schlägt die Ausführung mit dem Fehlercode PerErrc::kResourceBusy fehl, falls der betreffende Key-Value-Speicher geöffnet ist – also mindestens ein aktives SharedHandle existiert ([SWS_PER_00052], [SWS_PER_00333]). Der gleiche Fehler tritt auf, wenn andere Threads gleichzeitig modifizierende Funktionen aufrufen: UpdatePersistency ([SWS_PER_00357]), CleanUpPersistency ([SWS_PER_00567]), ResetPersistency ([SWS_PER_00358]) oder ResetKeyValueStorage ([SWS_PER_00334]). Während der Wiederherstellung scheitert auch ein Aufruf von OpenKeyValueStorage mit kResourceBusy ([SWS_PER_00052]).

Das Ergebnis wird synchron als ara::core::Result<void> zurückgegeben. Neben PerErrc::kResourceBusy sind folgende spezifische Fehler definiert ([SWS_PER_00333]):

  • PerErrc::kStorageNotFound: Der übergebene Bezeichner passt zu keiner konfigurierten Schnittstelle.
  • PerErrc::kPhysicalStorageFailure: Zugriff auf den physischen Speicher schlägt fehl (keine Rollback-Semantik).
  • PerErrc::kOutOfStorageSpace: Unzureichender physischer Speicherplatz für die wiederhergestellten Daten (keine Rollback-Semantik).
  • PerErrc::kQuotaExceeded: Überschreitung der konfigurierten Maximallänge (maximumAllowedSize).
  • PerErrc::kEncryptionFailed und PerErrc::kAuthenticationFailed: Fehler bei Verschlüsselung oder MAC-Berechnung.

Dieser Text wurde von einer KI basierend auf der AUTOSAR-Spezifikation erstellt.

Implementer's Guide folgt (Komplexität I2)

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

Parameter (in)

ParameterBeschreibung
kvsThe shortName path of a PortPrototype typed by a PersistencyKey ValueStorageInterface.

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::kStorageNotFoundrollback_semantics Returned if the passed InstanceSpecifier does not match any PersistencyKeyValueStorageInterface configured for this Executable.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption of stored data fails.
PerErrc::kResourceBusyrollback_semantics Returned if UpdatePersistency, CleanUpPersistency, or Reset Persistency is currently being executed, or if ResetKeyValue Storage is currently being executed for the same Key-Value Storage, or a SharedHandle of the same Key-Value Storage is currently in use.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the recovered values.
PerErrc::kQuotaExceededrollback_semantics Returned if the recovered 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_00333
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00333@rel:R25-11#ea333842
Content hash
ea333842
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00333
Status: valid/unmigrated Version: rel:R25-11#6863ad8c 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_00333@rel:R25-11#6863ad8c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ea3338422026-09-30
  • R19-11rel:R19-11#3c9d0f722026-10-14
  • R20-11rel:R20-11#8230292c2026-10-14
  • R21-11rel:R21-11#dff1a22a2026-10-14
  • R22-11rel:R22-11#e3e6a2c42026-10-14
  • R23-11rel:R23-11#d7c298b92026-10-14
  • R24-11rel:R24-11#093db65f2026-10-14
  • R25-11rel:R25-11#6863ad8c2026-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 RegisterApplicationDataUpdateCallback [SWS_PER_00356] Upstream: RS_PER_00013, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00135, RS_AP_00137, RS_AP_00159

void RegisterApplicationDataUpdateCallback (std::function< void(const ara::core::InstanceSpecifier &storage, ara::core::String contract Version)> appDataUpdateCallback) noexcept;

Registers an application data update callback with Persistency. The provided callback function will be called by Persistency if an update of stored application data might be necessary. This decision is based on the contract versions. The contract version that last accessed Persistency is provided as an argument to the callback, as well as the ara::core::InstanceSpecifier referring to the updated Key- Value Storage or File Storage. Based on this information, the Adaptive Application can decide which updates are actually necessary, e.g. a migration from any older contract version could be supported, with different steps required for each of these. The provided function will be called from the context of ara::per::UpdatePersistency, ara::per::OpenKeyValueStorage, or ara::per::OpenFileStorage.

Header-Datei#include "ara/per/update.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
appDataUpdateCallbackThe callback function to be called by Persistency after an update of persistent data took place. The function will be called with the shortName path of an updated Key-Value Storage or File Storage, and with the contract version with which the Persistency was last accessed.

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_PER_00356
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00356@rel:R25-11#ddfa8c35
Content hash
ddfa8c35
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00356
Status: valid/unmigrated Version: rel:R25-11#b578b750 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_00356@rel:R25-11#b578b750
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ddfa8c352026-09-30
  • R19-11rel:R19-11#34e96d122026-10-14
  • R20-11rel:R20-11#86e5368a2026-10-14
  • R21-11rel:R21-11#86e5368a2026-10-14
  • R22-11rel:R22-11#abcf8b8d2026-10-14
  • R23-11rel:R23-11#691305fc2026-10-14
  • R24-11rel:R24-11#60beb5142026-10-14
  • R25-11rel:R25-11#b578b7502026-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 RegisterDataUpdateIndication [SWS_PER_00578] Upstream: RS_PER_00013, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00135, RS_AP_00137, RS_AP_00159

void RegisterDataUpdateIndication (std::function< void(const ara::core::InstanceSpecifier &updatedStorage, ara::core::StringView updatedElement)> dataUpdateIndication, ara::core::InstanceSpecifier monitoredStorage, ara::core::Vector< ara::core::String > monitored Elements) noexcept;

Registers a data update indication callback with Persistency. The provided callback function will be called by Persistency when an update of stored data happened. It will be called from the context of ara::per::UpdatePersistency, ara:: per::OpenKeyValueStorage, or ara::per::OpenFileStorage.

Header-Datei#include "ara/per/update.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
dataUpdateIndicationThe callback function to be called by Persistency after an update of persistent data took place. The function will be called with the shortName path of an updated Key-Value Storage or File Storage, and with the the updated elements of the storage.
monitoredStorageA Key-Value Storage or File Storage for which updates shall be reported.
monitoredElementsA set of elements for which updates shall be reported.

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_PER_00578
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00578@rel:R25-11#685948a7
Content hash
685948a7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00578
Status: valid/unmigrated Version: rel:R25-11#59c9fead Versionshistorie & Revisions (1 transition, 3 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_00578@rel:R25-11#59c9fead
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#685948a72026-09-30
  • R24-11rel:R24-11#9946b5902026-10-14
  • R25-11rel:R25-11#59c9fead2026-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 RegisterRecoveryReportCallback [SWS_PER_00433] Upstream: RS_PER_00008, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00135, RS_AP_00137, RS_AP_00159

void RegisterRecoveryReportCallback (std::function< void(const ara::core::InstanceSpecifier &storage, ara::per::RecoveryReportKind recoveryReportKind, ara::core::Vector< ara::core::String > reported Elements, ara::core::Vector< std::uint8_t > reportedInstances)> recoveryReportCallback) noexcept;

Register a recovery reporting callback with Persistency. This callback can be used in safety-aware Adaptive Applications to detect actions of the Persistency that are related to the correctness of the persisted data and the reliability of the storage.

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

Die Funktion RegisterRecoveryReportCallback im Namensraum ara::per ([SWS_PER_00433]) dient der Registrierung einer Callback-Routine bei der Persistency-Komponente. Sie wird in sicherheitsgerichteten Adaptive Applications genutzt, um Korrekturmaßnahmen der Persistency bezüglich der Korrektheit persistierter Daten sowie der Zuverlässigkeit des Speichers zu erkennen [SWS_PER_00433].

Parameter und Aufrufsemantik

Als Parameter wird recoveryReportCallback übergeben, eine std::function, die von der Persistency aufgerufen wird, wenn Fehler in den gespeicherten Daten unter Nutzung verfügbarer Redundanz erfolgreich korrigiert wurden [SWS_PER_00433]. Dem Callback werden dabei folgende Kontextinformationen übergeben [SWS_PER_00433]:

  • storage: Der Pfad (shortName) des betroffenen Key-Value Storage oder File Storage als ara::core::InstanceSpecifier.
  • recoveryReportKind: Die Art des Wiederherstellungsberichts (ara::per::RecoveryReportKind).
  • reportedElements: Ein Vektor von Bezeichnern der betroffenen Elemente (ara::core::Vector<ara::core::String>).
  • reportedInstances: Ein Vektor der betroffenen Instanzen (ara::core::Vector<std::uint8_t>).

Fehlerbehandlung und Nebenläufigkeit

Die Funktion liefert keinen Rückgabewert und ist als noexcept deklariert; sie gilt als ausnahmesicher (exception safe) [SWS_PER_00433]. Eigene Fehlercodes existieren nicht [SWS_PER_00433]. Hinsichtlich der Thread-Sicherheit ist die Schnittstelle als not thread-safe eingestuft [SWS_PER_00433]. Der Aufruf dürfte daher typischerweise in der Initialisierungsphase der Anwendung vor dem Start nebenläufiger Speicherzugriffe erfolgen. Frage Q-e5b93ea58fb56a1c (offen)

Dieser Verwendungshinweis wurde von einer KI erstellt und basiert auf den Spezifikationen der AUTOSAR-Plattform.

Header-Datei#include "ara/per/recovery.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
recoveryReportCallbackThe callback function to be called by Persistency to report errors in the stored data that were corrected using the available redundancy. The function will be called with the shortName path of the affected Key-Value Storage or File Storage in storage and information on what has been corrected, placed in the parameters recoveryReport Kind, reportedElements, and reportedInstances.

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_PER_00433
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00433@rel:R25-11#627aa0e1
Content hash
627aa0e1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00433
Status: valid/unmigrated Version: rel:R25-11#69cc138a 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_00433@rel:R25-11#69cc138a
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#627aa0e12026-09-30
  • R20-11rel:R20-11#3a84481e2026-10-14
  • R21-11rel:R21-11#a74b248f2026-10-14
  • R22-11rel:R22-11#cb37dbf52026-10-14
  • R23-11rel:R23-11#6ca484be2026-10-14
  • R24-11rel:R24-11#71de55b32026-10-14
  • R25-11rel:R25-11#69cc138a2026-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 ReloadPersistencyManifest [SWS_PER_00577] Upstream: RS_PER_00013, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00135, RS_AP_00139, RS_AP_00159

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

Re-reads the Target Configuration. This method can be used to prepare for updates of the Key-Value Storages and File Storages of Persistency after a new Target Configuration was installed by UCM while the Adaptive Application that uses Persistency is running. Storages are only updated after closing them, either when they are opened again or by an explicit call to ara:: per::UpdatePersistency.

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

Die synchrone Funktion ReloadPersistencyManifest aus dem Namespace ara::per (deklariert in #include "ara/per/update.h") liest die Zielkonfiguration (Target Configuration) der Persistenz neu ein [SWS_PER_00577]. Sie dient dazu, Aktualisierungen der Key-Value Storages und File Storages vorzubereiten, nachdem durch das Update and Config Management (UCM) während der Laufzeit der Adaptive Application eine neue Zielkonfiguration installiert wurde [SWS_PER_00577].

Typischerweise prüft die Anwendung vorab mit CheckForManifestUpdate [SWS_PER_00576], ob eine Konfigurationsaktualisierung vorliegt, und ruft anschließend ReloadPersistencyManifest auf [SWS_PER_00576]. Das erneute Einlesen aktualisiert die persistenten Speicher jedoch noch nicht sofort: Storages werden erst nach ihrem Schließen aktualisiert – entweder beim erneuten Öffnen oder über einen expliziten Aufruf von ara::per::UpdatePersistency [SWS_PER_00577]. Interpretation: Bereits geöffnete Speicherbereiche werden durch den Aufruf vermutlich nicht automatisch geschlossen, sodass die Anwendung diese selbst schließen oder explizit aktualisieren muss. Frage Q-16f9dae418feb3fa (offen)

Die Funktion nimmt keine Parameter entgegen und gibt ein ara::core::Result<void> zurück [SWS_PER_00577]. Im Fehlerfall enthält das Ergebnis herstellerspezifische Fehler oder einen der folgenden Fehlercodes mit Rollback-Semantik [SWS_PER_00577]:

  • kPhysicalStorageFailure: Tritt auf, wenn der Zugriff auf den physischen Speicher während des Lesevorgangs fehlschlägt [SWS_PER_00577].
  • kIntegrityCorrupted: Tritt auf, wenn gespeicherte Daten wegen beschädigter struktureller Integrität nicht gelesen werden können [SWS_PER_00577].

Hinsichtlich der Nebenläufigkeit ist die Funktion als nicht threadsicher (not thread-safe) spezifiziert, jedoch als ausnahmesicher (exception safe) und noexcept deklariert [SWS_PER_00577]. Parallele Aufrufe müssen daher anwendungsseitig synchronisiert werden.

Dieser Verwendungshinweis wurde von einer KI auf Basis der Spezifikation erstellt.

Implementer's Guide folgt (Komplexität I1)

Header-Datei#include "ara/per/update.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-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
kPhysicalStorage-Failurerollback_semantics Returned if access to the physical storage fails during the read operation.
kIntegrityCor-ruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.

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

Record
AUTOSAR/AP/record/SWS_PER_00577
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00577@rel:R25-11#68a8e5e4
Content hash
68a8e5e4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00577
Status: valid/unmigrated Version: rel:R25-11#7f7b5c0c Versionshistorie & Revisions (1 transition, 3 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_00577@rel:R25-11#7f7b5c0c
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#68a8e5e42026-09-30
  • R24-11rel:R24-11#685afcab2026-10-14
  • R25-11rel:R25-11#7f7b5c0c2026-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 ResetAllFiles [SWS_PER_00336] Upstream: RS_PER_00001, RS_PER_00004, 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_00137, RS_AP_00139, RS_AP_00159

ara::core::Result< void > ResetAllFiles (const ara::core::Instance Specifier &fs) noexcept;

Resets a File Storage, including all files. ResetAllFiles resets a File Storage to the initial state, containing only the files which were deployed from the Target Configuration, with their initial content. Afterwards, the File Storage will appear as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the File Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles.

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

Die Funktion ResetAllFiles setzt einen File Storage synchron auf seinen initialen Auslieferungszustand gemäß der aktuellen Target Configuration zurück [SWS_PER_00336]. Nach erfolgreicher Ausführung enthält der Speicher ausschließlich die dort definierten Dateien mit ihren ursprünglichen Inhalten, als wäre er neu installiert worden [SWS_PER_00336].

Verwendung und Nebenläufigkeit: Über den Parameter fs wird der Instanzbezeichner eines über PersistencyFileStorageInterface typisierten PortPrototype übergeben [SWS_PER_00336]. Obwohl die Funktion als thread-safe und exception safe spezifiziert ist, setzt sie exklusiven Speicherzugriff voraus: Ist der Speicher aktuell geöffnet (beispielsweise über ein aktives SharedHandle aus OpenFileStorage [SWS_PER_00116]) oder wird er parallel durch UpdatePersistency [SWS_PER_00357], CleanUpPersistency [SWS_PER_00567], ResetPersistency [SWS_PER_00358], RecoverAllFiles [SWS_PER_00335] oder einen weiteren Aufruf von ResetAllFiles modifiziert, schlägt die Ausführung fehl [SWS_PER_00336].

Fehlerbehandlung: Die Funktion gibt ein ara::core::Result<void> zurück [SWS_PER_00336]. Mögliche Fehlercodes aus PerErrc sind:

  • kResourceBusy: Der Dateispeicher ist geöffnet oder wird parallel modifiziert (Rollback-Semantik) [SWS_PER_00336].
  • kStorageNotFound: Der Bezeichner passt zu keinem für das Executable konfigurierten Interface [SWS_PER_00336].
  • kPhysicalStorageFailure oder kOutOfStorageSpace: Physikalischer Speicherfehler bzw. unzureichender Speicherplatz (keine Rollback-Semantik) [SWS_PER_00336].
  • kEncryptionFailed oder kAuthenticationFailed: Fehler bei Verschlüsselung oder MAC-Berechnung (Rollback-Semantik) [SWS_PER_00336].

Zusammenspiel: Nach dem Zurücksetzen besitzen wiederhergestellte Dateien bei Zustandsabfragen den Status FileCreationState::kCreatedDuringReset [SWS_PER_00435] sowie FileModificationState::kModifiedDuringReset [SWS_PER_00436].

Dieser Nutzungshinweis wurde von einer KI auf Basis der Spezifikation AUTOSAR R25-11 generiert.

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/file_storage.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kStorageNot rollback_semantics

Parameter (in)

ParameterBeschreibung
fsThe shortName path of a PortPrototype typed by a PersistencyFile StorageInterface.

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
FoundReturned if the passed InstanceSpecifier does not match any PersistencyFileStorageInterface configured for this Executable.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption of stored data fails.
PerErrc::kResourceBusyrollback_semantics Returned if UpdatePersistency, CleanUpPersistency, or Reset Persistency is currently being executed, or if RecoverAllFiles is currently being executed for the same File Storage, or a Shared Handle of the same File Storage is currently in use.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the initial files.
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_00336
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00336@rel:R25-11#58b5b3b7
Content hash
58b5b3b7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00336
Status: valid/unmigrated Version: rel:R25-11#e599a530 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_00336@rel:R25-11#e599a530
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#58b5b3b72026-09-30
  • R19-11rel:R19-11#6f3f0cf62026-10-14
  • R20-11rel:R20-11#a8b98a422026-10-14
  • R21-11rel:R21-11#886423992026-10-14
  • R22-11rel:R22-11#3a2ec7602026-10-14
  • R23-11rel:R23-11#6a7428df2026-10-14
  • R24-11rel:R24-11#b2af05972026-10-14
  • R25-11rel:R25-11#e599a5302026-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 ResetKeyValueStorage [SWS_PER_00334] 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_00137, RS_AP_00139, RS_AP_00159

ara::core::Result< void > ResetKeyValueStorage (const ara::core::InstanceSpecifier &kvs) noexcept;

Resets a Key-Value Storage to the initial state. ResetKeyValueStorage allows to reset a Key-Value Storage to the initial state, containing only key-value pairs which were deployed from the Target Configuration, with their initial values. Afterwards, the Key-Value Storage will appear as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the Key-Value Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage.

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

Die synchrone Funktion ResetKeyValueStorage setzt einen spezifischen Key-Value-Storage auf seinen Initialzustand zurück [SWS_PER_00334]. Nach erfolgreicher Ausführung enthält der Speicher ausschließlich diejenigen Schlüssel-Wert-Paare mit ihren Initialwerten, die über die Target Configuration bereitgestellt wurden; der Speicher verhält sich danach so, als wäre er aus der aktuellen Konfiguration frisch installiert worden [SWS_PER_00334]. Als Parameter wird der kvs-Pfad als ara::core::InstanceSpecifier übergeben, der den PortPrototype einer konfigurierten PersistencyKeyValueStorageInterface referenziert [SWS_PER_00334].

Die Funktion ist als thread-safe und exception safe spezifiziert, unterliegt jedoch strengen Nebenläufigkeitsbedingungen bezüglich geöffneter Speicher und globaler Persistenzoperationen [SWS_PER_00334]:

  • Der Aufruf schlägt mit PerErrc::kResourceBusy fehl, falls der betreffende Key-Value-Storage aktuell geöffnet ist (also noch ein SharedHandle existiert, siehe [SWS_PER_00052]) oder zeitgleich eine Wiederherstellung mittels RecoverKeyValueStorage [SWS_PER_00333] auf demselben Speicher ausgeführt wird [SWS_PER_00334].
  • Ebenfalls zu kResourceBusy führt eine parallele Ausführung der globalen Operationen UpdatePersistency [SWS_PER_00357], CleanUpPersistency [SWS_PER_00567], ResetPersistency [SWS_PER_00358] oder ein nebenläufiger Aufruf von ResetKeyValueStorage in einem anderen Thread [SWS_PER_00334].

Als Ergebnis liefert die Funktion ein ara::core::Result<void> [SWS_PER_00334]. Im Fehlerfall treten neben kResourceBusy folgende spezifische Fehlercodes auf: PerErrc::kStorageNotFound (ungültiger InstanceSpecifier), PerErrc::kPhysicalStorageFailure (Zugriffsfehler auf das Speichermedium, keine Rollback-Semantik), PerErrc::kOutOfStorageSpace (unzureichender Speicherplatz für Initialwerte, keine Rollback-Semantik), PerErrc::kEncryptionFailed (Verschlüsselungsfehler) sowie PerErrc::kAuthenticationFailed (Fehler bei der MAC-Berechnung) [SWS_PER_00334].

Dieser Verwendungshinweis wurde von einer KI auf Basis der Spezifikation AUTOSAR R25-11 generiert.

Implementer's Guide folgt (Komplexität I2)

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

Parameter (in)

ParameterBeschreibung
kvsThe shortName path of a PortPrototype typed by a PersistencyKey ValueStorageInterface.

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::kStorageNotFoundrollback_semantics Returned if the passed InstanceSpecifier does not match any PersistencyKeyValueStorageInterface configured for this Executable.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption of stored data fails.
PerErrc::kResourceBusyrollback_semantics Returned if UpdatePersistency, CleanUpPersistency, or Reset Persistency is currently being executed, or if RecoverKeyValue Storage is currently being executed for the same Key-Value Storage, or a SharedHandle of the same Key-Value Storage is currently in use.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the initial values.
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_00334
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00334@rel:R25-11#370e52a0
Content hash
370e52a0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00334
Status: valid/unmigrated Version: rel:R25-11#6250b32b 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_00334@rel:R25-11#6250b32b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#370e52a02026-09-30
  • R19-11rel:R19-11#cd1560792026-10-14
  • R20-11rel:R20-11#1ed663b32026-10-14
  • R21-11rel:R21-11#f31fb8fb2026-10-14
  • R22-11rel:R22-11#764c93d52026-10-14
  • R23-11rel:R23-11#f7e8d0052026-10-14
  • R24-11rel:R24-11#cdcd205a2026-10-14
  • R25-11rel:R25-11#6250b32b2026-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 ResetPersistency [SWS_PER_00358] Upstream: RS_PER_00009, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00135, RS_AP_00139, RS_AP_00159

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

Resets all Key-Value Storages and File Storages by entirely removing their content. The Key-Value Storages and File Storages will be re-created when ara::per:: OpenFileStorage or ara::per::OpenKeyValueStorage is called next time.

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

Verwendung

Die synchrone Funktion ResetPersistency ([SWS_PER_00358]) aus dem Header ara/per/update.h dient dem vollständigen Zurücksetzen aller Key-Value- und File-Storages einer Anwendung. Beim Aufruf werden sämtliche persistenten Inhalte restlos gelöscht. Die Speicher selbst werden dabei nicht unmittelbar neu erzeugt, sondern erst beim jeweils nächsten Aufruf von ara::per::OpenKeyValueStorage ([SWS_PER_00052]) oder ara::per::OpenFileStorage ([SWS_PER_00116]) wieder angelegt. Dateien, die nach dem Reset neu bereitgestellt werden, erhalten dabei den Erstellungsstatus FileCreationState::kCreatedDuringInstallation ([SWS_PER_00435]).

Fehlerbehandlung

Als Rückgabewert liefert die Funktion ein ara::core::Result<void> ([SWS_PER_00358]). Schlägt der Zugriff auf das physische Speichermedium während der Operation fehl, gibt die Funktion kPhysicalStorageFailure ohne Rollback-Semantik zurück. Falls persistente Ressourcen belegt sind oder parallel modifiziert werden, wird der Aufruf mit kResourceBusy und aktiver Rollback-Semantik abgebrochen ([SWS_PER_00358]). Darüber hinaus können herstellerspezifische Fehler auftreten.

Nebenläufigkeit und Einschränkungen

Die Schnittstelle ist als exception safe deklariert, aber explizit als not thread-safe eingestuft ([SWS_PER_00358]). Sie schlägt mit kResourceBusy fehl, sobald:

  • bereits globale Operationen wie UpdatePersistency ([SWS_PER_00357]) oder CleanUpPersistency ([SWS_PER_00567]) ausgeführt werden,
  • ein einzelner Speicher parallel über RecoverKeyValueStorage, ResetKeyValueStorage, RecoverAllFiles ([SWS_PER_00335]) oder ResetAllFiles ([SWS_PER_00336]) bearbeitet wird,
  • oder noch mindestens ein aktiver SharedHandle eines Key-Value- oder File-Storage existiert ([SWS_PER_00358]).

Solange ResetPersistency läuft, führen zeitgleiche Öffnungsversuche über OpenKeyValueStorage ([SWS_PER_00052]) oder OpenFileStorage ([SWS_PER_00116]) in anderen Threads ebenfalls zu kResourceBusy.

Dieser Text wurde von einer KI erstellt. AUTOSAR-Spezifikationen sind maßgeblich.

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/update.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-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
kPhysicalStorage-Failureno_rollback_semantics Returned if access to the physical storage fails during the reset operation.
kResourceBusyrollback_semantics Returned if ara::per::UpdatePersistency or ara::per:: CleanUpPersistency is currently being executed, or if ara:: per::RecoverKeyValueStorage or ara::per:: ResetKeyValueStorage is currently being executed for any Key-Value Storage, or if ara::per::RecoverAllFiles or ara::per::ResetAllFiles is currently being executed for any File Storage, or a ara::per::SharedHandle of a Key- Value Storage or a File Storage is currently in use.

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

Record
AUTOSAR/AP/record/SWS_PER_00358
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00358@rel:R25-11#c8860b2d
Content hash
c8860b2d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00358
Status: valid/unmigrated Version: rel:R25-11#5a943877 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_00358@rel:R25-11#5a943877
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c8860b2d2026-09-30
  • R19-11rel:R19-11#8d6229f02026-10-14
  • R20-11rel:R20-11#cdbd91872026-10-14
  • R21-11rel:R21-11#58c165482026-10-14
  • R22-11rel:R22-11#675e4de82026-10-14
  • R23-11rel:R23-11#9628a79f2026-10-14
  • R24-11rel:R24-11#a5d729472026-10-14
  • R25-11rel:R25-11#5a9438772026-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 UpdatePersistency [SWS_PER_00357] Upstream: RS_PER_00013, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00135, RS_AP_00139, RS_AP_00159

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

Updates all Persistency Key-Value Storages and File Storages after a new Target Configuration was installed. This method can be used to update the persistent data of the Adaptive Application during verification phase.

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

Verwendung

Die synchrone Funktion ara::per::UpdatePersistency ([SWS_PER_00357], Header ara/per/update.h) aktualisiert nach der Installation einer neuen Zielkonfiguration sämtliche Key-Value- und File-Storages einer Anwendung. Sie dient dazu, die persistenten Daten einer Adaptive Application während der Verifikationsphase zu aktualisieren [SWS_PER_00357]. Die Funktion nimmt keine Übergabeparameter entgegen und liefert ein ara::core::Result<void> zurück [SWS_PER_00357].

Fehlerbehandlung

Im Fehlerfall enthält das zurückgegebene Result einen spezifischen Fehlercode oder einen herstellerspezifischen Fehler [SWS_PER_00357]. Dabei wird zwischen Operationen mit und ohne Rollback-Semantik unterschieden:

  • Rollback-Semantik: Bei kIntegrityCorrupted, kValidationFailed, kEncryptionFailed, kAuthenticationFailed, kTooManyFiles (Überschreitung von maxNumberOfFiles), kQuotaExceeded (Überschreitung von MaximumAllowedSize) sowie kResourceBusy werden vorgenommene Änderungen zurückgesetzt [SWS_PER_00357].
  • Keine Rollback-Semantik: Bei physischen Speicherfehlern (kPhysicalStorageFailure) sowie unzureichendem physischem Speicherplatz (kOutOfStorageSpace) ist kein Rollback garantiert [SWS_PER_00357].

Nebenläufigkeit und Einschränkungen

Die Funktion ist als ausnahmesicher (exception safe), aber ausdrücklich als nicht threadsicher (not thread-safe) spezifiziert [SWS_PER_00357]. Ein Aufruf scheitert mit kResourceBusy, sobald ein SharedHandle eines Key-Value- oder File-Storages noch in Verwendung ist oder parallel Wartungsfunktionen wie CleanUpPersistency [SWS_PER_00567], ResetPersistency [SWS_PER_00358], RecoverKeyValueStorage [SWS_PER_00333], ResetKeyValueStorage [SWS_PER_00334], RecoverAllFiles [SWS_PER_00335] oder ResetAllFiles [SWS_PER_00336] ausgeführt werden [SWS_PER_00357]. Umgekehrt schlagen gleichzeitige Aufrufe von OpenKeyValueStorage [SWS_PER_00052] und OpenFileStorage [SWS_PER_00116] aus anderen Threads während der Aktualisierung ebenfalls mit kResourceBusy fehl.

Zusammenspiel

Wurde durch UCM im laufenden Betrieb eine neue Zielkonfiguration installiert und diese über ReloadPersistencyManifest [SWS_PER_00577] neu eingelesen, werden geschlossene Speicher über UpdatePersistency aktualisiert. Wurden zuvor Callbacks über RegisterDataUpdateIndication [SWS_PER_00578] oder RegisterApplicationDataUpdateCallback [SWS_PER_00356] hinterlegt, erfolgt deren Aufruf synchron im Kontext von UpdatePersistency [SWS_PER_00578].

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

Implementer's Guide folgt (Komplexität I2)

Header-Datei#include "ara/per/update.h"
Scopenamespace ara::per
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-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
kPhysicalStorage-Failureno_rollback_semantics Returned if access to the physical storage fails during the update operation.
kIntegrityCor-ruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails during the update operation.
kResourceBusyrollback_semantics Returned if ara::per::CleanUpPersistency or ara::per:: ResetPersistency is currently being executed, or if ara:: per::RecoverKeyValueStorage or ara::per:: ResetKeyValueStorage is currently being executed for any Key-Value Storage, or if ara::per::RecoverAllFiles or ara::per::ResetAllFiles is currently being executed for any File Storage, or a ara::per::SharedHandle of a Key- Value Storage or a File Storage is currently in use.
kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the update.
kTooManyFilesrollback_semantics Returned if the files added during the update of any File Storage would exceed the configured PersistencyFileStorageInterface.maxNumberOfFiles.
kQuotaExceededrollback_semantics Returned if the update would exceed the configured PersistencyCommon.MaximumAllowedSize of any Key- Value Storage or File Storage.
kAuthentication-Failedrollback_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_00357
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00357@rel:R25-11#77e03de5
Content hash
77e03de5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00357
Status: valid/unmigrated Version: rel:R25-11#1d0f3ff3 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_00357@rel:R25-11#1d0f3ff3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#77e03de52026-09-30
  • R19-11rel:R19-11#b69714eb2026-10-14
  • R20-11rel:R20-11#2ada0bc82026-10-14
  • R21-11rel:R21-11#fc219af52026-10-14
  • R22-11rel:R22-11#8c6aea8d2026-10-14
  • R23-11rel:R23-11#9bb026b22026-10-14
  • R24-11rel:R24-11#936392f02026-10-14
  • R25-11rel:R25-11#1d0f3ff32026-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_00144] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00121

constexpr OpenMode operator| (OpenMode left, OpenMode right);

Merges two OpenMode modifiers into one.

Header-Datei#include "ara/per/file_storage.h"
Scopenamespace ara::per
Exception-Sicherheitnot exception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
leftFirst OpenMode modifiers.
rightSecond OpenMode modifiers.

Rückgabewert

TypBeschreibung
OpenModereturns Merged OpenMode modifiers.

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

Record
AUTOSAR/AP/record/SWS_PER_00144
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00144@rel:R25-11#089c0252
Content hash
089c0252
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00144
Status: valid/unmigrated Version: rel:R25-11#be0c00de 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_00144@rel:R25-11#be0c00de
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#089c02522026-09-30
  • R19-11rel:R19-11#4ac4ea742026-10-14
  • R20-11rel:R20-11#d1a0a9db2026-10-14
  • R21-11rel:R21-11#a74548b62026-10-14
  • R22-11rel:R22-11#f391a35f2026-10-14
  • R23-11rel:R23-11#0b63b8d12026-10-14
  • R24-11rel:R24-11#be0c00de2026-10-14
  • R25-11rel:R25-11#be0c00de2026-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_00434] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00121

OpenMode & operator|= (OpenMode &left, const OpenMode &right);

Merges an OpenMode modifier into this OpenMode.

Header-Datei#include "ara/per/file_storage.h"
Scopenamespace ara::per
Exception-Sicherheitnot exception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
leftLeft OpenMode modifiers.
rightRight OpenMode modifiers.

Rückgabewert

TypBeschreibung
OpenMode &returns The modified OpenMode.

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

Record
AUTOSAR/AP/record/SWS_PER_00434
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00434@rel:R25-11#eda27c89
Content hash
eda27c89
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00434
Status: valid/unmigrated Version: rel:R25-11#481cc8ef 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_00434@rel:R25-11#481cc8ef
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#eda27c892026-09-30
  • R20-11rel:R20-11#7995a25b2026-10-14
  • R21-11rel:R21-11#7c5577592026-10-14
  • R22-11rel:R22-11#483368c52026-10-14
  • R23-11rel:R23-11#951ada062026-10-14
  • R24-11rel:R24-11#481cc8ef2026-10-14
  • R25-11rel:R25-11#481cc8ef2026-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