DEENESPTFRRUARHIKOZHNL
AUTOSAR_AP_EXP_SWArchitecture FIG-1163424c1507a5ad 470 × 425 px 1 Release(s)

Figure 9.37: Interfaces for key-value-based data storage

SHA-256 Inhalts-Fingerabdruck: 1163424c1507a5ad456ec959ba65b69f45ef108cb078daa424e80bcd1607e79e
✦ KI-generierte Bildanalyse & technische Beschreibung Modell: gemini-3.8-flash (via agy) · Rezept figure-series@1 · erstellt am 2026-10-08

1. Diagrammtyp & Architektur-Kontext

UML-Klassendiagramm / Komponentendiagramm im Kontext der AUTOSAR Adaptive Platform Architecture (Cluster Persistency, Sub-Bereich Key-Value-Storage). Das Diagramm spezifiziert die Schnittstellenbeziehungen zwischen einer Anwendungskomponente (Adaptive Application), den angebotenen C++-APIs des Functional Clusters und der Realisierung durch das funktionale Cluster Persistency.

2. Komponenten, Entitäten & Schnittstellen

  • Adaptive Application («component»): Anwendungskomponente, die persistente Schlüssel-Wert-Speicherung nutzt; besitzt ausgehende gerichtete Abhängigkeiten («use») auf beide Persistency-Schnittstellen.
  • «aapFunctionalCluster» Persistency («component»): Realisierende Plattformkomponente des Clusters Persistency; implementiert (--▷, Interface Realization) sowohl das native Interface als auch das Port Interface.
  • «aapAPI,aapNativeInterface» Persistency (Interface/Klasse): Statische bzw. freie native C++-API-Funktionen zur Speicherverwaltung:
    • + GetCurrentKeyValueStorageSize()
    • + OpenKeyValueStorage(): KeyValueStorage
    • + RecoverKeyValueStorage()
    • + ResetKeyValueStorage() (alle Operationen unterstrichen, d. h. statische Elementfunktionen / globale Funktionen).
  • «aapAPI,aapPortInterface» Persistency::KeyValueStorage (Interface/Klasse): Instanzspezifisches Objektinterface für den Zugriff auf Schlüssel-Wert-Paare:
    • + DiscardPendingChanges()
    • + GetAllKeys()
    • + GetValue()
    • + KeyExists()
    • + RecoverKey()
    • + RemoveAllKeys()
    • + RemoveKey()
    • + ResetKey()
    • + SetValue()
    • + SyncToStorage()

3. Dynamisches Verhalten & Sequenzablauf

  1. Eine Adaptive Application ruft zunächst die statische Fabrikmethode OpenKeyValueStorage() des nativen Interface Persistency auf und erhält eine Instanz bzw. Referenz/Handle vom Typ KeyValueStorage.
  2. Über administrative Funktionen von Persistency können Integrität und Gesamtzustand des Speichers geprüft oder modifiziert werden (GetCurrentKeyValueStorageSize(), RecoverKeyValueStorage(), ResetKeyValueStorage()).
  3. Auf der erhaltenen Instanz Persistency::KeyValueStorage liest und schreibt die Anwendung Werte (GetValue(), SetValue()), prüft Schlüssel (KeyExists()), fragt vorhandene Schlüssel ab (GetAllKeys()) oder entfernt bzw. setzt sie zurück (RemoveKey(), RemoveAllKeys(), ResetKey(), RecoverKey()).
  4. Änderungen werden über SyncToStorage() persistent auf das physische Speichermedium synchronisiert oder über DiscardPendingChanges() verworfen.

4. Normative Relevanz & Entwickler-Hinweise

  • Klare Trennung zwischen Plattform-Einstiegs-API (Persistency, Native Interface mit Factory OpenKeyValueStorage()) und Datenzugriffs-Objekt (KeyValueStorage, Port Interface).
  • Die Unterstreichung der Operationen im Native Interface Persistency kennzeichnet statische Methoden bzw. freie Funktionen im C++-Mapping.
  • Persistenzoperationen sind transaktionsartig aufgebaut: Schreib- und Löschoperationen können im Speicher gepuffert sein und erfordern zur persistenten Festschreibung den expliziten Aufruf von SyncToStorage(), andernfalls können sie via DiscardPendingChanges() verworfen werden.
  • Fehlerbehandlung und Recovery sind zweistufig ausgelegt: auf Granularitätsebene des gesamten Speichers (RecoverKeyValueStorage(), ResetKeyValueStorage()) und auf Granularitätsebene einzelner Schlüssel (RecoverKey(), ResetKey()).

Versionsvergleich KI-generiert · gemini-3.8-flash (via agy)

R22-11 → R23-11 keine inhaltliche Änderung Vorgänger: FIG-ef55605bc8ffc3ca

Keine inhaltlichen Änderungen erkennbar.

R23-11 → R24-11 normative Änderung Nachfolger: FIG-115a9d945489550c
  • Schnittstelle KeyValueStorage: Operation + GetCurrentValueSize() hinzugefügt.
  • Schnittstelle KeyValueStorage: Header-Beschriftung von «aapAPI,aapPortInterface» Persistency::KeyValueStorage auf getrennte Zeilen «aapAPI,aapPortInterface» und KeyValueStorage (ohne Namespace-Präfix Persistency::) geändert.

Zugeordnete Anforderungen

Diese Angaben zeigt der Versions-Explorer.

Aus dem Dokument extrahierter Text & Kontext

Beschriftungen im Schaubild:

«aapFunctionalCluster» | Persistency | «aapAPI,aapPortInterface» Persistency::KeyValueStorage | + DiscardPendingChanges() + GetAllKeys() + GetValue() + KeyExists() + RecoverKey() + RemoveAllKeys() + RemoveKey() + ResetKey() + SetValue() + SyncToStorage() | «aapAPI,aapNativeInterface» | Persistency | + GetCurrentKeyValueStorageSize() + OpenKeyValueStorage(): KeyValueStorage + RecoverKeyValueStorage() + ResetKeyValueStorage() | Adaptive Application | «use» «use»

Begleitender Spezifikationstext:

Explanation of Adaptive Platform Software Architecture AUTOSAR AP R23-11 △ PeekChar Returns the character at the current position of the file. ReadBinary Reads all remaining bytes into a Vector of Byte, starting from the current position. ReadLine Reads a complete line of characters into a String, advancing the current position accordingly. ReadText Reads all remaining characters into a String, starting from the current position. SetPosition Sets the current position relative to the beginning of the file. Name: ReadWriteAccessor Technology: Native interface Usage: Public API Description: This interface provides functions to read and write text and binary data from / to a file. SetFileSize Reduces the size of the file to ’size’, effectively removing the current content of the file beyond this size. SyncToFile Triggers flushing of the current file content to the physical storage. WriteBinary Writes binary data to the file. WriteText Writes a string to the file. Operations: operator<< Writes a String to the file. 9.4.1.1.2 Interfaces for key-value storage Persistency provides read and write access to data structured as key-value pairs by means of the KeyValueStorage API (cf. Figure 9.37). A KeyValueStorage has to be created by calling OpenKeyValueStorage(). A KeyValueStorage then provides access to data stored for individual keys using the GetValue() and SetValue() operations. «aapFunctionalCluster» Persistency «aapAPI,aapPortInterface» Persistency::KeyValueStorage + DiscardPend

Vorkommen in AUTOSAR-Releases (1)

Release Dokument Seite Nr. Bildunterschrift im Dokument
R23-11 AUTOSAR_AP_EXP_SWArchitecture S. 73 9.37 Figure 9.37: Interfaces for key-value-based data storage