DEENESPTFRRUARHIKOZHNL

classe ara::per::FileStorage

[SWS_PER_00340] Upstream: RS_PER_00004, RS_AP_00122, RS_AP_00140, RS_AP_00146

class FileStorage final {...};

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

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

Guide utilisateurGÉNÉRÉ PAR IA

Gère des fichiers persistants et les ouvre via des handles basés sur RAII pour la lecture et l’écriture par blocs.
GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 7736cf7ccbd1 Provenance Questions ouvertes (2)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Gère des fichiers persistants et les ouvre via des handles basés sur RAII pour la lecture et l’écriture par blocs.

La classe ara::per::FileStorage permet de gérer et d’ouvrir un ensemble de fichiers persistants configurés via des noms de fichier uniques [SWS_PER_00110]. L’accès effectif en lecture et en écriture s’effectue via des accesseurs régis par UniqueHandle, qui referment automatiquement le fichier dès la sortie de portée [SWS_PER_00114]. Les fichiers déjà ouverts étant protégés contre les opérations concurrentes de suppression ou de restauration, ces accès parallèles échouent avec PerErrc::kResourceBusy [SWS_PER_00111].

Contexte

La classe ara::per::FileStorage encapsule l’accès à une collection configurée de fichiers persistants identifiés par des noms de fichier uniques. Elle sert d’interface centrale pour les applications afin d’effectuer des opérations sur les fichiers telles que le listage des fichiers existants via GetAllFileNames [SWS_PER_00110], la vérification de l’existence au moyen de FileExists [SWS_PER_00112] ainsi que l’interrogation des métadonnées et des tailles de fichier via GetFileInfo [SWS_PER_00438] et GetCurrentFileSize [SWS_PER_00407]. Un accès direct en lecture ou en écriture au niveau de l’octet ne s’effectue pas sur l’instance de stockage elle-même, mais est relayé par des objets accesseurs spéciaux mis à disposition par les méthodes d’ouverture sous forme de UniqueHandle [SWS_PER_00114] [SWS_PER_00113] [SWS_PER_00115].

Cycle de vie

L’instanciation de FileStorage est soumise à de strictes restrictions : le constructeur par défaut [SWS_PER_00460] ainsi que les constructeurs de copie et de déplacement [SWS_PER_00328] [SWS_PER_00326] et les opérateurs d’assignation par copie et par déplacement [SWS_PER_00329] [SWS_PER_00327] sont explicitement supprimés. Une instance de FileStorage devrait donc généralement être ouverte et fournie via des fonctions de fabrique du module de persistance côté plateforme. Le destructeur ~FileStorage est sûr vis-à-vis des exceptions (noexcept), mais explicitement spécifié comme non thread-safe [SWS_PER_00330], raison pour laquelle il convient de s’assurer qu’aucun appel concurrent n’a lieu sur l’objet pendant sa destruction. Question (ouverte)

En cours de fonctionnement, les opérations courantes sur les fichiers telles que FileExists, DeleteFile ou l’ouverture de fichiers sont conçues pour être thread-safe [SWS_PER_00111] [SWS_PER_00112] [SWS_PER_00114]. Il convient toutefois de noter que les résultats d’interrogations d’état telles que GetAllFileNames [SWS_PER_00110] ou FileExists [SWS_PER_00112] ne sont strictement valides que si aucun fichier n’est ajouté ou supprimé simultanément dans un autre thread. Il en va de même pour GetFileInfo : les horodatages de modification et d’accès ainsi que l’état de traitement ne sont fiables et précis que tant que le fichier cible n’est pas ouvert [SWS_PER_00438].

Parcours d'utilisation

Un chemin d’utilisation typique comprend la vérification, l’ouverture ciblée, le traitement des données via le handle de l’accesseur et le nettoyage final :

  1. Vérifier l’état du fichier : avant l’accès, il est possible de déterminer de manière facultative via FileExists si un fichier recherché existe [SWS_PER_00112], ou d’interroger le contenu existant via GetAllFileNames [SWS_PER_00110].
  2. Ouvrir le fichier : selon le mode d’accès prévu, la classe fournit des méthodes dédiées. Pour un accès en lecture seule, des surcharges de OpenFileReadOnly sont disponibles [SWS_PER_00114] [SWS_PER_00376] [SWS_PER_00430]. Pour un accès en lecture et écriture, on utilise OpenFileReadWrite [SWS_PER_00113] [SWS_PER_00375] [SWS_PER_00429], un fichier inexistant étant automatiquement créé. Pour l’écriture seule, il existe OpenFileWriteOnly [SWS_PER_00115] [SWS_PER_00377] [SWS_PER_00431], qui tronque le fichier par défaut (kTruncate) ou le recrée. Pour accroître les performances en cas d’accès multiples de petite taille, des surcharges permettent de passer un tampon défini par l’utilisateur pour la lecture ou l’écriture par blocs [SWS_PER_00430] [SWS_PER_00429] [SWS_PER_00431].
  3. Fermer le fichier et libérer les ressources : le ara::core::Result renvoyé par les méthodes d’ouverture encapsule un UniqueHandle vers l’accesseur concerné. Le fichier est automatiquement fermé dès que ce UniqueHandle quitte sa portée [SWS_PER_00114] [SWS_PER_00113] [SWS_PER_00115]. Vraisemblablement, le marquage d’occupation lié au fichier dans FileStorage est également annulé à cette occasion. Question (ouverte)
  4. Maintenance et nettoyage : les fichiers devenus inutiles sont supprimés avec DeleteFile [SWS_PER_00111]. En cas de violation d’intégrité, RecoverFile propose une restauration au mieux (best-effort) des données redondantes [SWS_PER_00337], tandis que ResetFile réinitialise un fichier à son contenu de déploiement initial ou le recrée s’il est absent [SWS_PER_00338].
Chemin d'utilisation typique pour FileStorageApplicationstorage: FileStoragehandle: UniqueHandleUse Case: 1. Vérification préalableFileExists(fileName)Result<bool> (true)Use Case: 2. Ouvrir le fichierOpenFileReadOnly(fileName, mode, buffer)Result<UniqueHandle<ReadAccessor>>Use Case: 3. Dateiinhalt lesenLecture par blocs via AccessorGelesene Byte-DatenUse Case: 4. Fermeture en fin de portéeUniqueHandle quitte la portéeLe destructeur ferme le fichierUse Case: 5. BereinigungDeleteFile(fileName)Result<void>

Diagramme de séquence : déroulement typique depuis la vérification et l’ouverture d’un fichier jusqu’à la fermeture automatique par la portée du handle, en passant par le traitement par tampon. Sources : [SWS_PER_00112], [SWS_PER_00430], [SWS_PER_00114], [SWS_PER_00111].

Scénarios d'erreur

Les méthodes de FileStorage signalent les erreurs via ara::core::Result en utilisant l’énumération d’erreurs PerErrc. Parmi les situations d’erreur les plus importantes figurent :

  • Conflits de ressources (PerErrc::kResourceBusy) : un fichier ne peut pas être ouvert, supprimé, restauré ou réinitialisé s’il est déjà ouvert ou si un DeleteFile, RecoverFile ou ResetFile est exécuté en parallèle sur le même nom de fichier [SWS_PER_00111] [SWS_PER_00114] [SWS_PER_00113] [SWS_PER_00337] [SWS_PER_00338].
  • Fichiers introuvables (PerErrc::kFileNotFound) : survient lorsqu’un fichier inexistant doit être ouvert en lecture seule [SWS_PER_00114], supprimé [SWS_PER_00111], interrogé [SWS_PER_00407] [SWS_PER_00438] ou restauré [SWS_PER_00337].
  • Violations d’accès et d’autorisations : les ouvertures en écriture ou les suppressions échouent avec PerErrc::kIllegalWriteAccess si le stockage est configuré en lecture seule (read-only) [SWS_PER_00111] [SWS_PER_00113] [SWS_PER_00115]. Les combinaisons de modes non valides sont rejetées avec PerErrc::kInvalidOpenMode [SWS_PER_00114] [SWS_PER_00113].
  • Limites de stockage et quotas : lors d’une nouvelle création ou d’un agrandissement, PerErrc::kOutOfStorageSpace (mémoire physique pleine), PerErrc::kTooManyFiles (dépassement de maxNumberOfFiles) ou PerErrc::kQuotaExceeded (dépassement de maximumAllowedSize) peuvent survenir [SWS_PER_00113] [SWS_PER_00337] [SWS_PER_00338].
  • Erreurs d’intégrité et de sécurité : en cas de défaillance de la couche de stockage physique, PerErrc::kPhysicalStorageFailure est signalé. Des structures de données corrompues, des validations ayant échoué ou des problèmes de cryptographie se traduisent par PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed ou PerErrc::kAuthenticationFailed [SWS_PER_00110] [SWS_PER_00112] [SWS_PER_00114] [SWS_PER_00337].
  • Données initiales manquantes (PerErrc::kInitValueNotAvailable) : échoue lors de la réinitialisation via ResetFile si aucune valeur initiale n’a été définie ni dans l’Application Design ni dans la configuration cible [SWS_PER_00338].

Ce guide est basé sur la spécification AUTOSAR Adaptive Platform version R25-11 et résume les exigences fonctionnelles applicables à ara::per::FileStorage.

Carte des membres

Diagramme de classes

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

G nara__per__FileStorage945 FileStorage + FileStorage() + operator=() + ~FileStorage() + DeleteFile() + FileExists() + GetAllFileNames() + GetCurrentFileSize() + GetFileInfo() + OpenFileReadOnly() + OpenFileReadWrite() + OpenFileWriteOnly() + RecoverFile() + ResetFile()

Vue détaillée

Sélectionnez une entrée dans le plan.

Constructeurs et destructeur

FileStorage fonction 3

The move constructor for FileStorage shall not be used.

Surcharges FileStorage 3
FileStorage (FileStorage &&fs)=delete; SWS_PER_00326
FileStorage (const FileStorage &)=delete; SWS_PER_00328
FileStorage ()=delete; SWS_PER_00460
~FileStorage fonction

Destructor for FileStorage.

~FileStorage () noexcept;

Méthodes

DeleteFile fonction

Deletes a file from this File Storage. This operation will fail with kResourceBusy when the file is currently open.

ara::core::Result< void > DeleteFile (ara::core::StringView fileName) noexcept;
FileExists fonction

Checks if a file exists in this File Storage. The result is only accurate if no file is added or deleted at the same time. E.g. when a file is removed in another thread directly after this function returned "true", the result is not valid anymore.

ara::core::Result< bool > FileExists (ara::core::StringView fileName) const noexcept;

Returns a list of all currently available file names of this File Storage. The list of file names is only accurate if no file is added or deleted at the same time.

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

Returns the space in bytes currently occupied by the content of a file of this File Storage. The returned size might be inaccurate if any of the instances of a file is invalid or if another operation on the file takes place at the same time.

ara::core::Result< std::uint64_t > GetCurrentFileSize (ara::core::StringView fileName) const noexcept;
GetFileInfo fonction

Returns additional information on a file of this File Storage. The returned FileInfo struct contains information about the times when the file was created, last modified, and last accessed, and about how and by whom the file was created and last modified. The modificationTime, accessTime, and fileModificationState returned in the FileInfo are only accurate if the file is currently not open.

ara::core::Result< FileInfo > GetFileInfo (ara::core::StringView file Name) const noexcept;
OpenFileReadOnly fonction 3

Opens a file of this File Storage for reading with a defined mode. If not otherwise specified by the provided mode, the file is opened with the seek position set to the beginning (corresponding to kAtTheBeginning). The file will be closed when the returned UniqueHandle goes out of scope.

Surcharges OpenFileReadOnly 3

Opens a file of this File Storage for reading and writing with a defined mode. If not otherwise specified by the provided mode, the file is opened with the seek position set to the beginning (corresponding to kAtTheBeginning). If the file does not exist, it is created. The file will be closed when the returned UniqueHandle goes out of scope.

Surcharges OpenFileReadWrite 3

Opens a file of this File Storage for writing with a defined mode. If not otherwise specified by the provided mode, the file is truncated (corresponding to k Truncate). If the file does not exist, it is created. The file will be closed when the returned UniqueHandle goes out of scope.

Surcharges OpenFileWriteOnly 3
RecoverFile fonction

Recovers a file of this File Storage. This method allows to recover a single file when the redundancy checks fail. It will fail with kResourceBusy when the file is currently open. This method does a best-effort recovery of the file. After recovery, the file might show outdated or initial content, or might be lost.

ara::core::Result< void > RecoverFile (ara::core::StringView fileName) noexcept;
ResetFile fonction

Resets a file of this File Storage to its initial content. ResetFile allows to reset a single file to its initial content. If the file is currently not available in the File Storage, it is re-created. Afterwards, the file will appear in both cases as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the file is currently open, and with kInitValueNotAvailable when neither Application Design nor Target Configuration define an initial content for the file.

ara::core::Result< void > ResetFile (ara::core::StringView fileName) noexcept;

Opérateurs

operator= fonction 2

The move assignment operator for FileStorage shall not be used.

Surcharges = 2
FileStorage & operator= (FileStorage &&fs)=delete; SWS_PER_00327
FileStorage & operator= (const FileStorage &)=delete; SWS_PER_00329

Documentation des méthodes

fonction DeleteFile [SWS_PER_00111] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > DeleteFile (ara::core::StringView fileName) noexcept;

Deletes a file from this File Storage. This operation will fail with kResourceBusy when the file is currently open.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 4416a2cc7c72 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode synchrone DeleteFile de la classe ara::per::FileStorage supprime un fichier du stockage de fichiers à l'aide de son nom (fileName) [SWS_PER_00111]. L'identifiant peut correspondre au PersistencyFile.fileName configuré [SWS_PER_00111]. L'appel est spécifié comme noexcept, est considéré comme sûr face aux exceptions ainsi que thread-safe, et renvoie le résultat via ara::core::Result<void> [SWS_PER_00111].

Avant l'appel, tous les accès actifs au fichier cible doivent être terminés. Si le fichier est actuellement ouvert, l'opération de suppression échoue avec l'erreur PerErrc::kResourceBusy [SWS_PER_00111]. Les applications doivent donc s'assurer que les instances de UniqueHandle créées auparavant via OpenFileReadWrite [SWS_PER_00113], OpenFileReadOnly [SWS_PER_00114] ou OpenFileWriteOnly [SWS_PER_00115] ont quitté leur portée, ce qui ferme le fichier. De même, une exécution parallèle de RecoverFile [SWS_PER_00337] ou ResetFile [SWS_PER_00338] pour le même nom de fichier conduit à PerErrc::kResourceBusy [SWS_PER_00111].

En cas d'erreur, le type Result renvoyé met à disposition des causes d'erreur spécifiques [SWS_PER_00111] :

  • PerErrc::kFileNotFound : le fichier indiqué n'existe pas dans le stockage de fichiers [SWS_PER_00111].
  • PerErrc::kIllegalWriteAccess : le File Storage est configuré en lecture seule [SWS_PER_00111].
  • PerErrc::kPhysicalStorageFailure : l'accès au support de stockage physique échoue (sans sémantique de rollback) [SWS_PER_00111].
  • PerErrc::kIntegrityCorrupted, PerErrc::kEncryptionFailed ou PerErrc::kAuthenticationFailed : erreur d'intégrité structurelle, de chiffrement/déchiffrement ou de vérification MAC (chacune avec sémantique de rollback) ainsi qu'erreurs spécifiques au fabricant [SWS_PER_00111].

Ce texte a été généré par une IA et sert de guide d'orientation. Seules les spécifications de la documentation AUTOSAR font foi.

Guide de l'implémenteur à venir (complexité I2)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
PerErrc::kIllegalWriteAccessrollback_semantics Returned if the File Storage is configured as read-only.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kResourceBusyrollback_semantics Returned if the file is open, or if RecoverFile or ResetFile with the same file name is currently being executed.
PerErrc::kFileNotFoundrollback_semantics Returned if the provided file does not exist in the File Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00111
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00111@rel:R25-11#51e7aa00
Content hash
51e7aa00
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00111
Status: valid/unmigrated Version: rel:R25-11#54be3f24 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_00111@rel:R25-11#54be3f24
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9014bbf32026-09-30
  • R19-11rel:R19-11#878a9ae32026-10-14
  • R20-11rel:R20-11#c8f140db2026-10-14
  • R21-11rel:R21-11#35984aa22026-10-14
  • R22-11rel:R22-11#86df5bb02026-10-14
  • R23-11rel:R23-11#a507e2692026-10-14
  • R24-11rel:R24-11#5c96fd1e2026-10-14
  • R25-11rel:R25-11#54be3f242026-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

fonction FileExists [SWS_PER_00112] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< bool > FileExists (ara::core::StringView fileName) const noexcept;

Checks if a file exists in this File Storage. The result is only accurate if no file is added or deleted at the same time. E.g. when a file is removed in another thread directly after this function returned "true", the result is not valid anymore.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : f0bea0a79212 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode synchrone FileExists de la classe ara::per::FileStorage vérifie si un fichier est présent dans la mémoire de fichiers concernée [SWS_PER_00112]. La fonction est déclarée comme noexcept et ne lève aucune exception C++ [SWS_PER_00112].

Utilisation

En tant que paramètre, fileName est transmis en tant que ara::core::StringView, ce qui peut correspondre à l'identifiant PersistencyFile.fileName d'un fichier configuré [SWS_PER_00112]. La valeur de retour ara::core::Result<bool> fournit true si le fichier a pu être localisé, et sinon false [SWS_PER_00112].

Gestion des erreurs

Si la vérification échoue, le Result renvoyé ne contient pas de valeur booléenne mais un code d'erreur [SWS_PER_00112]. Les causes d'erreur spécifiées sont :

  • PerErrc::kPhysicalStorageFailure en cas d'échec de l'accès à la mémoire physique [SWS_PER_00112],
  • PerErrc::kIntegrityCorrupted en cas d'intégrité structurelle corrompue des données [SWS_PER_00112],
  • PerErrc::kValidationFailed lorsque la validité des données stockées ne peut pas être garantie [SWS_PER_00112],
  • PerErrc::kEncryptionFailed en cas d'échec du déchiffrement [SWS_PER_00112],
  • PerErrc::kAuthenticationFailed en cas d'échec de la vérification du MAC [SWS_PER_00112] ainsi que d'éventuelles erreurs spécifiques au constructeur [SWS_PER_00112].

Concurrence et restrictions

La méthode est déclarée comme sûre pour les threads [SWS_PER_00112]. Toutefois, le résultat de vérification fourni n'est exact que tant qu'aucun fichier n'est ajouté ou supprimé en même temps dans la mémoire ; si par exemple un autre thread supprime un fichier directement après le renvoi de true, le résultat n'est déjà plus valide [SWS_PER_00112].

Cette note d’utilisation a été générée de manière automatisée sur la base d’AUTOSAR R25-11.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_PER_00112
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00112@rel:R25-11#121f57de
Content hash
121f57de
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00112
Status: valid/unmigrated Version: rel:R25-11#eff770fd 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_00112@rel:R25-11#eff770fd
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b7ca36222026-09-30
  • R19-11rel:R19-11#bb51dd332026-10-14
  • R20-11rel:R20-11#69021fcb2026-10-14
  • R21-11rel:R21-11#a1fece9f2026-10-14
  • R22-11rel:R22-11#2147fabd2026-10-14
  • R23-11rel:R23-11#cd2da2ba2026-10-14
  • R24-11rel:R24-11#421ba73d2026-10-14
  • R25-11rel:R25-11#eff770fd2026-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

fonction FileStorage [SWS_PER_00326] Upstream: RS_PER_00004, RS_AP_00120, RS_AP_00121, RS_AP_00129, RS_AP_00145, RS_AP_00159

FileStorage (FileStorage &&fs)=delete;

The move constructor for FileStorage shall not be used.

Header-Datei#include "ara/per/file_storage.h"
Scopeclass ara::per::FileStorage

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

Record
AUTOSAR/AP/record/SWS_PER_00326
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00326@rel:R25-11#24f11124
Content hash
24f11124
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00326
Status: valid/unmigrated Version: rel:R25-11#62da63ae 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_00326@rel:R25-11#62da63ae
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#201fb7f12026-09-30
  • R19-11rel:R19-11#ee041ade2026-10-14
  • R20-11rel:R20-11#b225c72d2026-10-14
  • R21-11rel:R21-11#805cfb8b2026-10-14
  • R22-11rel:R22-11#a9c3021b2026-10-14
  • R23-11rel:R23-11#4fc6a3d12026-10-14
  • R24-11rel:R24-11#62da63ae2026-10-14
  • R25-11rel:R25-11#62da63ae2026-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

fonction FileStorage [SWS_PER_00328] Upstream: RS_PER_00004, RS_AP_00120, RS_AP_00145

FileStorage (const FileStorage &)=delete;

The copy constructor for FileStorage shall not be used.

Header-Datei#include "ara/per/file_storage.h"
Scopeclass ara::per::FileStorage

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

Record
AUTOSAR/AP/record/SWS_PER_00328
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00328@rel:R25-11#e96104d6
Content hash
e96104d6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00328
Status: valid/unmigrated Version: rel:R25-11#457a8c69 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_00328@rel:R25-11#457a8c69
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#210f83712026-09-30
  • R19-11rel:R19-11#b53f0afb2026-10-14
  • R20-11rel:R20-11#4fbd234e2026-10-14
  • R21-11rel:R21-11#4fbd234e2026-10-14
  • R22-11rel:R22-11#3d9e304b2026-10-14
  • R23-11rel:R23-11#9edf14a62026-10-14
  • R24-11rel:R24-11#4f3e23582026-10-14
  • R25-11rel:R25-11#457a8c692026-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

fonction FileStorage [SWS_PER_00460] Upstream: RS_PER_00004, RS_AP_00120, RS_AP_00129, RS_AP_00146

FileStorage ()=delete;

The default constructor for FileStorage shall not be used.

Header-Datei#include "ara/per/file_storage.h"
Scopeclass ara::per::FileStorage

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

Record
AUTOSAR/AP/record/SWS_PER_00460
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00460@rel:R25-11#6cec57d7
Content hash
6cec57d7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00460
Status: valid/unmigrated Version: rel:R25-11#11aa6301 Versionshistorie & Revisions (1 transition, 6 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00460@rel:R25-11#11aa6301
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#9eb415912026-09-30
  • R21-11rel:R21-11#f93f78842026-10-14
  • R22-11rel:R22-11#1e2c76302026-10-14
  • R23-11rel:R23-11#dd525b8f2026-10-14
  • R24-11rel:R24-11#11aa63012026-10-14
  • R25-11rel:R25-11#11aa63012026-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

fonction GetAllFileNames [SWS_PER_00110] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00127, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

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

Returns a list of all currently available file names of this File Storage. The list of file names is only accurate if no file is added or deleted at the same time.

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

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_PER_00110
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00110@rel:R25-11#5909f290
Content hash
5909f290
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00110
Status: valid/unmigrated Version: rel:R25-11#2a355aef 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_00110@rel:R25-11#2a355aef
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2ea4c0b72026-09-30
  • R19-11rel:R19-11#2c8803ba2026-10-14
  • R20-11rel:R20-11#6c4ecd642026-10-14
  • R21-11rel:R21-11#7a8244992026-10-14
  • R22-11rel:R22-11#1e3bc0af2026-10-14
  • R23-11rel:R23-11#0cb5785b2026-10-14
  • R24-11rel:R24-11#2a355aef2026-10-14
  • R25-11rel:R25-11#2a355aef2026-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

fonction GetCurrentFileSize [SWS_PER_00407] Upstream: RS_PER_00017, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< std::uint64_t > GetCurrentFileSize (ara::core::StringView fileName) const noexcept;

Returns the space in bytes currently occupied by the content of a file of this File Storage. The returned size might be inaccurate if any of the instances of a file is invalid or if another operation on the file takes place at the same time.

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.

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::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kFileNotFoundrollback_semantics Returned if the provided file does not exist in the File Storage.

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

Record
AUTOSAR/AP/record/SWS_PER_00407
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00407@rel:R25-11#6114f219
Content hash
6114f219
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00407
Status: valid/unmigrated Version: rel:R25-11#179f149b 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_00407@rel:R25-11#179f149b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#071859e92026-09-30
  • R19-11rel:R19-11#033eba912026-10-14
  • R20-11rel:R20-11#3966ef4c2026-10-14
  • R21-11rel:R21-11#d10d2b0b2026-10-14
  • R22-11rel:R22-11#8dd5feab2026-10-14
  • R23-11rel:R23-11#9f29c68f2026-10-14
  • R24-11rel:R24-11#179f149b2026-10-14
  • R25-11rel:R25-11#179f149b2026-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

fonction GetFileInfo [SWS_PER_00438] Upstream: RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< FileInfo > GetFileInfo (ara::core::StringView file Name) const noexcept;

Returns additional information on a file of this File Storage. The returned FileInfo struct contains information about the times when the file was created, last modified, and last accessed, and about how and by whom the file was created and last modified. The modificationTime, accessTime, and fileModificationState returned in the FileInfo are only accurate if the file is currently not open.

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kFileNotFoundrollback_semantics Returned if the provided file does not exist in the File Storage.

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

Record
AUTOSAR/AP/record/SWS_PER_00438
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00438@rel:R25-11#81b1d8e8
Content hash
81b1d8e8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00438
Status: valid/unmigrated Version: rel:R25-11#ac6ae9db 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_00438@rel:R25-11#ac6ae9db
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#54615ca12026-09-30
  • R20-11rel:R20-11#3e42a8462026-10-14
  • R21-11rel:R21-11#2ca508bf2026-10-14
  • R22-11rel:R22-11#374465322026-10-14
  • R23-11rel:R23-11#57dca30b2026-10-14
  • R24-11rel:R24-11#87296ea62026-10-14
  • R25-11rel:R25-11#ac6ae9db2026-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

fonction OpenFileReadOnly [SWS_PER_00114] 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_00139, RS_AP_00144, RS_AP_00159

ara::core::Result< UniqueHandle< ReadAccessor > > OpenFileReadOnly (ara::core::StringView fileName, OpenMode mode) noexcept;

Opens a file of this File Storage for reading with a defined mode. If not otherwise specified by the provided mode, the file is opened with the seek position set to the beginning (corresponding to kAtTheBeginning). The file will be closed when the returned UniqueHandle goes out of scope.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : b7f6df93c4d9 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode OpenFileReadOnly de la classe ara::per::FileStorage (déclarée dans #include "ara/per/file_storage.h") ouvre un fichier persistant en lecture seule avec un mode d'accès spécifié [SWS_PER_00114]. Sauf indication contraire via le paramètre mode, la position du curseur de lecture est définie par défaut au début du fichier (kAtTheBeginning) [SWS_PER_00114]. L'exécution est synchrone et renvoie un ara::core::Result<UniqueHandle<ReadAccessor>>. Le handle utilise la sémantique RAII : dès que l'instance de UniqueHandle quitte sa portée de validité, le fichier est automatiquement fermé [SWS_PER_00114].

En matière de concurrence, la méthode est spécifiée comme thread-safe et exception safe (avec noexcept) [SWS_PER_00114]. Des restrictions d'appel fonctionnelles subsistent néanmoins : si le fichier cible est déjà ouvert ou si des opérations telles que DeleteFile, RecoverFile ou ResetFile sont exécutées simultanément avec le même nom de fichier, l'appel échoue avec PerErrc::kResourceBusy [SWS_PER_00114].

En cas d'erreur, le ara::core::Result renvoie des erreurs spécifiques au constructeur ou des codes d'erreur normalisés issus de PerErrc ou StorageFailure [SWS_PER_00114] :

  • PerErrc::kFileNotFound : le fichier indiqué n'existe pas dans le stockage de fichiers [SWS_PER_00114].
  • PerErrc::kInvalidOpenMode : le mode transmis contient une combinaison non valide d'indicateurs [SWS_PER_00114].
  • StorageFailure : l'accès à la mémoire physique a échoué [SWS_PER_00114].
  • PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kAuthenticationFailed ou PerErrc::kEncryptionFailed : intégrité structurelle endommagée, validation insuffisante, contrôle MAC incorrect ou échec du déchiffrement [SWS_PER_00114].

En interaction avec d'autres interfaces, FileStorage propose deux surcharges apparentées : une variante sans paramètre de mode, qui ouvre toujours au début du fichier [SWS_PER_00376], ainsi qu'une surcharge avec tampon (ara::core::Span<ara::core::Byte> buffer), par laquelle le ReadAccessor implémente une lecture par blocs afin d'accélérer de nombreux petits accès [SWS_PER_00430].

Cette note d'utilisation a été générée automatiquement sur la base de la spécification d'AUTOSAR Adaptive R25-11.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.
modeMode with which the file shall be opened.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
StorageFailureReturned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kResourceBusyrollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
PerErrc::kFileNotFoundrollback_semantics Returned if the provided file does not exist in the File Storage.
PerErrc::kInvalidOpenModerollback_semantics Returned if the passed mode contains an invalid combination of modes.
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_00114
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00114@rel:R25-11#9e776a16
Content hash
9e776a16
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00114
Status: valid/unmigrated Version: rel:R25-11#d387e566 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_00114@rel:R25-11#d387e566
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#56472e6d2026-09-30
  • R19-11rel:R19-11#68c3cec42026-10-14
  • R20-11rel:R20-11#70976e3f2026-10-14
  • R21-11rel:R21-11#2c5ff8412026-10-14
  • R22-11rel:R22-11#2b3b319d2026-10-14
  • R23-11rel:R23-11#e52382f02026-10-14
  • R24-11rel:R24-11#f80914872026-10-14
  • R25-11rel:R25-11#d387e5662026-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

fonction OpenFileReadOnly [SWS_PER_00376] 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_00139, RS_AP_00144, RS_AP_00159

ara::core::Result< UniqueHandle< ReadAccessor > > OpenFileReadOnly (ara::core::StringView fileName) noexcept;

Opens a file of this File Storage for reading. The file is opened with the seek position set to the beginning (corresponding to kAtThe Beginning). The file will be closed when the returned UniqueHandle goes out of scope.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 4286b0e81322 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode OpenFileReadOnly de la classe ara::per::FileStorage ouvre un fichier persisté en lecture seule [SWS_PER_00376]. L'appel s'effectue via le fichier d'en-tête ara/per/file_storage.h en passant le nom de fichier fileName. La position de lecture est alors initialement positionnée au début du fichier. La valeur de retour est un ara::core::Result qui, en cas de succès, fournit un UniqueHandle<ReadAccessor>. Le fichier ouvert est automatiquement fermé dès que ce handle quitte sa portée.

Gestion des erreurs

Si l'exécution échoue, le résultat contient un code d'erreur ou une erreur spécifique au constructeur [SWS_PER_00376] :

  • PerErrc::kFileNotFound : Le fichier spécifié n'existe pas dans l'espace de stockage.
  • PerErrc::kResourceBusy : Le fichier est déjà ouvert ou est traité simultanément par DeleteFile, RecoverFile ou ResetFile.
  • PerErrc::kPhysicalStorageFailure : L'accès au support de stockage physique a échoué.
  • PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed, PerErrc::kAuthenticationFailed : Erreur lors de l'intégrité structurelle, de la validation des données, du déchiffrement ou de la vérification du MAC.

Concurrence et interaction

La méthode est spécifiée comme thread-safe, exception safe ainsi que noexcept [SWS_PER_00376]. Des surcharges sont disponibles pour des exigences avancées : une variante pour l'indication explicite d'un OpenMode [SWS_PER_00114] ainsi qu'une signature avec un tampon utilisateur supplémentaire pour l'accélération par blocs des petits accès en lecture [SWS_PER_00430].

Cette note d'utilisation a été créée de manière automatisée à partir de la spécification AUTOSAR.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
StorageFailureReturned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kResourceBusyrollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
PerErrc::kFileNotFoundrollback_semantics Returned if the provided file does not exist in the File Storage.
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_00376
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00376@rel:R25-11#004cab49
Content hash
004cab49
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00376
Status: valid/unmigrated Version: rel:R25-11#c1cc1c73 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_00376@rel:R25-11#c1cc1c73
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f25323df2026-09-30
  • R19-11rel:R19-11#630d35ad2026-10-14
  • R20-11rel:R20-11#c212e2fc2026-10-14
  • R21-11rel:R21-11#d617d2d22026-10-14
  • R22-11rel:R22-11#88f516892026-10-14
  • R23-11rel:R23-11#eab160e12026-10-14
  • R24-11rel:R24-11#6b07bd902026-10-14
  • R25-11rel:R25-11#c1cc1c732026-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

fonction OpenFileReadOnly [SWS_PER_00430] 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_00139, RS_AP_00144, RS_AP_00159

ara::core::Result< UniqueHandle< ReadAccessor > > OpenFileReadOnly (ara::core::StringView fileName, OpenMode mode, ara::core::Span< ara::core::Byte > buffer) noexcept;

Opens a file of this File Storage for reading with a user provided buffer. If not otherwise specified by the provided mode, the file is opened with the seek position set to the beginning (corresponding to kAtTheBeginning). The provided buffer will be used by the ReadAccessor to implement block-wise reading to speed up multiple small accesses to the file. The file will be closed when the returned UniqueHandle goes out of scope.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : f3a0884b9d84 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode synchrone OpenFileReadOnly de la classe ara::per::FileStorage ouvre un fichier persisté pour un accès en lecture en utilisant un tampon fourni par l'appelant [SWS_PER_00430]. L'accès au fichier est initialisé à l'aide des paramètres fileName, mode ainsi que buffer (en tant que ara::core::Span<ara::core::Byte>) [SWS_PER_00430]. Sauf indication contraire via mode, la position de lecture se trouve par défaut au début du fichier (kAtTheBeginning) [SWS_PER_00430]. La zone mémoire transmise est utilisée par le ReadAccessor résultant pour accélérer les petits accès répétés en lecture via une lecture par blocs [SWS_PER_00430]. La ressource est protégée par RAII : dès que le UniqueHandle renvoyé quitte sa portée, le fichier est automatiquement fermé [SWS_PER_00430].

Concernant la concurrence, la fonction est spécifiée comme sûre pour les threads (thread-safe), sûre face aux exceptions (exception safe) et noexcept [SWS_PER_00430]. Si une erreur survient, le ara::core::Result fournit des erreurs spécifiques au constructeur ou des codes d'erreur standardisés issus de PerErrc [SWS_PER_00430] :

  • PerErrc::kResourceBusy : Le fichier est déjà ouvert ou est traité simultanément par DeleteFile, RecoverFile ou ResetFile [SWS_PER_00430].
  • PerErrc::kFileNotFound : le fichier indiqué n'existe pas dans le stockage de fichiers [SWS_PER_00430].
  • PerErrc::kInvalidOpenMode : Le mode transmis contient une combinaison d'options non valide [SWS_PER_00430].
  • Erreurs d'intégrité et de sécurité : PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed ou PerErrc::kAuthenticationFailed (échec de la vérification du MAC) ainsi que StorageFailure en cas d'erreurs d'accès à la mémoire physique [SWS_PER_00430].

En plus de cette variante avec tampon, les surcharges [SWS_PER_00114] (avec mode) et [SWS_PER_00376] (uniquement avec fileName) sont disponibles pour les cas d'utilisation sans tampon défini par l'utilisateur.

Cette note d'utilisation a été générée automatiquement sur la base de la spécification AUTOSAR R25-11.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.
modeMode with which the file shall be opened.
bufferMemory to be used for block-wise reading.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
StorageFailureReturned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kResourceBusyrollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
PerErrc::kFileNotFoundrollback_semantics Returned if the provided file does not exist in the File Storage.
PerErrc::kInvalidOpenModerollback_semantics Returned if the passed mode contains an invalid combination of modes.
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_00430
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00430@rel:R25-11#13cc9ab5
Content hash
13cc9ab5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00430
Status: valid/unmigrated Version: rel:R25-11#6f001bfd 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_00430@rel:R25-11#6f001bfd
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#d5ddc0d92026-09-30
  • R20-11rel:R20-11#a9e488522026-10-14
  • R21-11rel:R21-11#f7bf78f42026-10-14
  • R22-11rel:R22-11#668067d82026-10-14
  • R23-11rel:R23-11#bc8680862026-10-14
  • R24-11rel:R24-11#062cbdd82026-10-14
  • R25-11rel:R25-11#6f001bfd2026-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

fonction OpenFileReadWrite [SWS_PER_00113] 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_00139, RS_AP_00144, RS_AP_00159

ara::core::Result< UniqueHandle< ReadWriteAccessor > > OpenFileRead Write (ara::core::StringView fileName, OpenMode mode) noexcept;

Opens a file of this File Storage for reading and writing with a defined mode. If not otherwise specified by the provided mode, the file is opened with the seek position set to the beginning (corresponding to kAtTheBeginning). If the file does not exist, it is created. The file will be closed when the returned UniqueHandle goes out of scope.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : cf05039b8020 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode synchrone OpenFileReadWrite de la classe ara::per::FileStorage ouvre un fichier pour des accès en lecture et en écriture dans le mode spécifié mode [SWS_PER_00113]. Sauf indication contraire dans le mode, le pointeur de fichier est positionné par défaut au début (kAtTheBeginning). Si le fichier n’existe pas encore, il est automatiquement créé [SWS_PER_00113]. La fonction renvoie un ara::core::Result contenant un UniqueHandle<ReadWriteAccessor>, qui ferme automatiquement le fichier dès que le descripteur quitte sa portée de validité [SWS_PER_00113].

Concurrence et restrictions

L’appel est sûr pour les threads (thread-safe) et ne lève aucune exception (noexcept) [SWS_PER_00113]. Le fichier ne doit pas déjà être ouvert lors de l’appel. En outre, aucune exécution simultanée de DeleteFile, RecoverFile ou ResetFile avec le même nom de fichier ne doit avoir lieu, faute de quoi l’appel échoue avec PerErrc::kResourceBusy [SWS_PER_00113].

Gestion des erreurs

En cas d’erreur, le ara::core::Result contient des codes d’erreur spécifiques [SWS_PER_00113] :

  • PerErrc::kInvalidOpenMode : combinaison invalide d’indicateurs dans le mode transmis.
  • PerErrc::kResourceBusy : le fichier cible est déjà ouvert ou est occupé par des opérations administratives sur les fichiers.
  • Access : la mémoire est configurée en lecture seule ou en écriture unique (write-only-once) alors que la clé existe déjà.
  • PerErrc::kOutOfStorageSpace ou PerErrc::kTooManyFiles : espace de stockage physique insuffisant ou dépassement de maxNumberOfFiles lors d’une nouvelle création.
  • PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed, PerErrc::kAuthenticationFailed : erreurs d’accès matériel, structures de données corrompues ou échecs de validations cryptographiques.

Interaction

Une surcharge sans paramètre de mode est disponible en tant que variante simplifiée, qui ouvre par défaut les fichiers au début [SWS_PER_00375]. Afin d’optimiser les performances lors de nombreux accès de petite taille, il existe en outre une surcharge avec un tampon personnalisé (buffer) pour une lecture et une écriture par blocs [SWS_PER_00429].

Cette note d’utilisation a été générée par une IA sur la base de la spécification AUTOSAR Adaptive Release R25-11.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.
modeMode with which the file shall be opened.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
AccessReturned if the File Storage is configured as read-only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be 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 the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for a new file.
PerErrc::kInvalidOpenModerollback_semantics Returned if the passed mode contains an invalid combination of modes.
PerErrc::kTooManyFilesrollback_semantics Returned if the number of files would get larger than the configured maxNumberOfFiles when the file is created.
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_00113
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00113@rel:R25-11#3af793f1
Content hash
3af793f1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00113
Status: valid/unmigrated Version: rel:R25-11#64fa2a80 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_00113@rel:R25-11#64fa2a80
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b7812ac62026-09-30
  • R19-11rel:R19-11#29f193992026-10-14
  • R20-11rel:R20-11#705aebbc2026-10-14
  • R21-11rel:R21-11#3e1bef852026-10-14
  • R22-11rel:R22-11#8b90a8c62026-10-14
  • R23-11rel:R23-11#9d0c90192026-10-14
  • R24-11rel:R24-11#c88f05782026-10-14
  • R25-11rel:R25-11#64fa2a802026-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

fonction OpenFileReadWrite [SWS_PER_00375] 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_00139, RS_AP_00144, RS_AP_00159

ara::core::Result< UniqueHandle< ReadWriteAccessor > > OpenFileRead Write (ara::core::StringView fileName) noexcept;

Opens a file of this File Storage for reading and writing. The file is opened with the seek position set to the beginning (corresponding to kAtThe Beginning). If the file does not exist, it is created. The file will be closed when the returned UniqueHandle goes out of scope.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : e0c7dc90877b Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La fonction membre synchrone OpenFileReadWrite de la classe ara::per::FileStorage sert à ouvrir un fichier pour des accès combinés en lecture et écriture [SWS_PER_00375]. En guise de paramètre, le nom de fichier fileName est transmis sous forme de ara::core::StringView, qui peut correspondre à la modélisation PersistencyFile.fileName d'un fichier configuré [SWS_PER_00375]. Si le fichier indiqué n'existe pas encore, il est automatiquement créé [SWS_PER_00375]. Lors de l'ouverture, la position dans le fichier est immédiatement fixée au début (conformément à kAtTheBeginning) [SWS_PER_00375]. L'appelant reçoit un ara::core::Result<UniqueHandle<ReadWriteAccessor>> ; le fichier est automatiquement fermé dès que le UniqueHandle retourné quitte sa portée de validité [SWS_PER_00375].

En ce qui concerne la concurrence et le contexte d'exécution, la fonction est spécifiée comme étant thread-safe et exception safe [SWS_PER_00375]. Il convient toutefois de noter que les accès simultanés sont réglementés : si le fichier est déjà ouvert ou si une opération telle que DeleteFile, RecoverFile ou ResetFile est exécutée en même temps sur le même nom de fichier, l'appel échoue et renvoie le code d'erreur PerErrc::kResourceBusy [SWS_PER_00375].

En cas d'erreur, l'objet Result retourné encapsule des erreurs spécifiques de la persistance ou des erreurs spécifiques au constructeur [SWS_PER_00375] :

  • Erreurs de configuration et d'accès telles que Access en cas de mémoire protégée en écriture ou de données déjà existantes lors d'une configuration write-once [SWS_PER_00375].
  • Limites d'espace de stockage dues à PerErrc::kOutOfStorageSpace ou PerErrc::kTooManyFiles en cas de dépassement de la limite supérieure configurée pour le fichier [SWS_PER_00375].
  • Erreurs d'intégrité et de sécurité telles que PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed ou PerErrc::kAuthenticationFailed [SWS_PER_00375].

En interaction avec d'autres interfaces de FileStorage, AUTOSAR propose des surcharges alternatives : OpenFileReadWrite peut être appelé avec un OpenMode explicite [SWS_PER_00113] ou avec une zone de mémoire supplémentaire côté utilisateur buffer (ara::core::Span<ara::core::Byte>), permettant une mise en mémoire tampon par blocs afin d'accélérer les accès répétés de petite taille [SWS_PER_00429].

Ce texte a été généré par une IA et vérifié à l'aide de la spécification AUTOSAR.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
AccessReturned if the File Storage is configured as read-only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be 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 the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for a new file.
PerErrc::kTooManyFilesrollback_semantics Returned if the number of files would get larger than the configured maxNumberOfFiles when the file is created.
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_00375
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00375@rel:R25-11#27e1929b
Content hash
27e1929b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00375
Status: valid/unmigrated Version: rel:R25-11#f465ec05 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_00375@rel:R25-11#f465ec05
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ff96f9722026-09-30
  • R19-11rel:R19-11#cc81c63c2026-10-14
  • R20-11rel:R20-11#1cfd91622026-10-14
  • R21-11rel:R21-11#32976f732026-10-14
  • R22-11rel:R22-11#8a4213d62026-10-14
  • R23-11rel:R23-11#c423d7112026-10-14
  • R24-11rel:R24-11#0b6d7d9b2026-10-14
  • R25-11rel:R25-11#f465ec052026-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

fonction OpenFileReadWrite [SWS_PER_00429] 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_00139, RS_AP_00144, RS_AP_00159

ara::core::Result< UniqueHandle< ReadWriteAccessor > > OpenFileRead Write (ara::core::StringView fileName, OpenMode mode, ara::core::Span< ara::core::Byte > buffer) noexcept;

Opens a file of this File Storage for reading and writing with a user provided buffer. If not otherwise specified by the provided mode, the file is opened with the seek position set to the beginning (corresponding to kAtTheBeginning). The provided buffer will be used by the ReadWriteAccessor to implement block-wise reading and writing to speed up multiple small accesses to the file. If the file does not exist, it is created. The file will be closed when the returned UniqueHandle goes out of scope.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 06577277e905 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode OpenFileReadWrite de la classe ara::per::FileStorage ouvre un fichier de manière synchrone pour une lecture et une écriture combinées en fournissant un tampon défini par l'utilisateur [SWS_PER_00429]. La zone mémoire transmise buffer (en tant que ara::core::Span<ara::core::Byte>) est utilisée en interne par le ReadWriteAccessor pour des opérations de lecture et d'écriture par blocs, afin de traiter efficacement des séries de petits accès. Si le fichier spécifié n'existe pas encore, il est automatiquement créé ; la position dans le fichier est par défaut au début (kAtTheBeginning), sauf indication contraire dans le mode transmis [SWS_PER_00429]. Le fichier est fermé dès que le UniqueHandle renvoyé dans le ara::core::Result quitte sa portée. Interprétation : la mémoire sous-jacente du span de tampon transmis doit vraisemblablement rester valide pendant toute la durée de vie du UniqueHandle, car l'accesseur la référence pour les accès par blocs. Question Q-e0009b7de17e3597 (ouverte)

Gestion des erreurs et concurrence

La fonction est spécifiée comme noexcept, sûre face aux exceptions (exception safe) et sûre pour les threads [SWS_PER_00429]. En cas d'échec, le Result fournit des erreurs spécifiques au constructeur ou des codes d'erreur définis :

  • PerErrc::kResourceBusy : Le fichier est déjà ouvert ou est traité simultanément par DeleteFile, RecoverFile ou ResetFile avec le même nom [SWS_PER_00429].
  • Access : La zone de stockage est configurée en lecture seule ou définie en écriture unique (write-only-once) et déjà occupée [SWS_PER_00429].
  • PerErrc::kInvalidOpenMode : Le mode transmis contient une combinaison d'attributs non valide [SWS_PER_00429].
  • PerErrc::kOutOfStorageSpace ou PerErrc::kTooManyFiles : La mémoire physique est insuffisante pour une nouvelle création ou la limite configurée maxNumberOfFiles serait dépassée [SWS_PER_00429].
  • PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed et PerErrc::kAuthenticationFailed : Erreur lors de l'accès, du contrôle d'intégrité, de MAC ou de validation, ainsi que lors du déchiffrement [SWS_PER_00429].

Interaction

La méthode constitue une variante optimisée en termes de performances pour l'ouverture en lecture/écriture : alors que [SWS_PER_00113] ne traite que le nom de fichier et le mode, et que [SWS_PER_00375] ne traite exclusivement que le nom de fichier, [SWS_PER_00429] permet l'accélération ciblée de petits accès d'E/S via un tampon mémoire explicite.

Ce texte a été généré par une IA et repose sur les exigences de la spécification AUTOSAR.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.
modeMode with which the file shall be opened.
bufferMemory to be used for block-wise reading/writing.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
AccessReturned if the File Storage is configured as read-only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be 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 the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for a new file.
PerErrc::kInvalidOpenModerollback_semantics Returned if the passed mode contains an invalid combination of modes.
PerErrc::kTooManyFilesrollback_semantics Returned if the number of files would get larger than the configured maxNumberOfFiles when the file is created.
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_00429
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00429@rel:R25-11#1fc13ade
Content hash
1fc13ade
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00429
Status: valid/unmigrated Version: rel:R25-11#e9dd40b8 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_00429@rel:R25-11#e9dd40b8
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#380d9a532026-09-30
  • R20-11rel:R20-11#38b6d4692026-10-14
  • R21-11rel:R21-11#a276c7642026-10-14
  • R22-11rel:R22-11#359642092026-10-14
  • R23-11rel:R23-11#09bac95b2026-10-14
  • R24-11rel:R24-11#7891475a2026-10-14
  • R25-11rel:R25-11#e9dd40b82026-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

fonction OpenFileWriteOnly [SWS_PER_00115] 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_00139, RS_AP_00144, RS_AP_00159

ara::core::Result< UniqueHandle< WriteAccessor > > OpenFileWriteOnly (ara::core::StringView fileName, OpenMode mode) noexcept;

Opens a file of this File Storage for writing with a defined mode. If not otherwise specified by the provided mode, the file is truncated (corresponding to k Truncate). If the file does not exist, it is created. The file will be closed when the returned UniqueHandle goes out of scope.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : cf72b60c71fb Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode OpenFileWriteOnly de la classe ara::per::FileStorage ouvre un fichier de manière synchrone pour une écriture exclusive avec un mode d'accès défini [SWS_PER_00115]. Sauf indication contraire via le paramètre mode, le fichier est alors tronqué (conformément à kTruncate). Si le fichier n'existe pas encore, il est nouvellement créé. Un ara::core::Result<UniqueHandle<WriteAccessor>> sert de valeur de retour ; lors de la sortie de la portée du UniqueHandle, le fichier est automatiquement refermé [SWS_PER_00115].

Gestion des erreurs

En cas d'erreur, le Result renvoyé contient des codes d'erreur spécifiques [SWS_PER_00115] : Access indique que le stockage est protégé en écriture ou a été configuré comme Write-Once et que la clé existe déjà. PerErrc::kInvalidOpenMode signale des combinaisons de modes non valides et PerErrc::kOutOfStorageSpace un espace de stockage physique insuffisant. De plus, PerErrc::kTooManyFiles, PerErrc::kPhysicalStorageFailure ainsi que des erreurs d'intégrité et de sécurité telles que PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed ou PerErrc::kAuthenticationFailed peuvent survenir [SWS_PER_00115].

Concurrence et restrictions

La fonction est conçue pour être thread-safe et sûre vis-à-vis des exceptions (noexcept) [SWS_PER_00115]. Les accès parallèles au même fichier échouent avec le code d'erreur PerErrc::kResourceBusy si le fichier est déjà ouvert ou si des opérations telles que DeleteFile, RecoverFile ou ResetFile sont exécutées simultanément avec le même nom de fichier [SWS_PER_00115].

Interaction

En plus de cette fonction, l'interface met à disposition une surcharge simplifiée sans paramètre de mode qui opère par défaut avec kTruncate [SWS_PER_00377], ainsi qu'une surcharge avec tampon personnalisé afin de permettre une écriture par blocs pour accélérer de nombreux petits accès [SWS_PER_00431].

Cette note d'utilisation a été générée par une IA sur la base de la spécification.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.
modeMode with which the file shall be opened.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
AccessReturned if the File Storage is configured as read-only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be 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 the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for a new file.
PerErrc::kInvalidOpenModerollback_semantics Returned if the passed mode contains an invalid combination of modes.
PerErrc::kTooManyFilesrollback_semantics Returned if the number of files would get larger than the configured maxNumberOfFiles when the file is created.
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_00115
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00115@rel:R25-11#c28f06ea
Content hash
c28f06ea
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00115
Status: valid/unmigrated Version: rel:R25-11#8d570d7b 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_00115@rel:R25-11#8d570d7b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#947090352026-09-30
  • R19-11rel:R19-11#a8c3f2cb2026-10-14
  • R20-11rel:R20-11#a4a01e002026-10-14
  • R21-11rel:R21-11#9d4cb3182026-10-14
  • R22-11rel:R22-11#94711d402026-10-14
  • R23-11rel:R23-11#e0aa47d82026-10-14
  • R24-11rel:R24-11#6c8c32a92026-10-14
  • R25-11rel:R25-11#8d570d7b2026-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

fonction OpenFileWriteOnly [SWS_PER_00377] 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_00139, RS_AP_00144, RS_AP_00159

ara::core::Result< UniqueHandle< WriteAccessor > > OpenFileWriteOnly (ara::core::StringView fileName) noexcept;

Opens a file of this File Storage for writing. The file is truncated (corresponding to kTruncate). If the file does not exist, it is created. The file will be closed when the returned UniqueHandle goes out of scope.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : fa6d3b80cd05 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode synchrone OpenFileWriteOnly de la classe ara::per::FileStorage ouvre un fichier exclusivement en écriture conformément à [SWS_PER_00377]. Elle reçoit le nom du fichier cible via le paramètre fileName. Si le fichier n'existe pas, il est nouvellement créé ; un fichier déjà existant est tronqué (conformément à kTruncate) [SWS_PER_00377]. La valeur de retour est un ara::core::Result qui, en cas de succès, encapsule un ara::per::UniqueHandle<WriteAccessor>. Ce handle ferme automatiquement le fichier selon le patron RAII dès qu'il quitte sa portée [SWS_PER_00377].

Gestion des erreurs et concurrence

L'opération est déclarée comme noexcept, sûre face aux exceptions (exception safe) et sûre pour les threads (thread-safe) [SWS_PER_00377]. En cas d'erreur, le Result contient un code d'erreur spécifique issu de PerErrc ou une erreur spécifique au constructeur [SWS_PER_00377] :

  • PerErrc::kResourceBusy : Le fichier est déjà ouvert ou est traité simultanément par DeleteFile, RecoverFile ou ResetFile.
  • PerErrc::kOutOfStorageSpace et PerErrc::kTooManyFiles : La mémoire physique est insuffisante ou le nombre maximal de fichiers configurés (maxNumberOfFiles) est dépassé.
  • PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed ou PerErrc::kAuthenticationFailed : Erreur lors de l'accès matériel ainsi que lors des contrôles d'intégrité, de validation ou de déchiffrement.

Interaction

Alors que cette variante impose de manière fixe la troncature, la surcharge avec le paramètre OpenMode permet un mode d'ouverture différent [SWS_PER_00115]. Pour des opérations d'écriture optimisées par blocs comportant plusieurs petits accès, une surcharge supplémentaire avec tampon défini par l'utilisateur (ara::core::Span<ara::core::Byte>) est disponible [SWS_PER_00431].

Ce texte a été généré par une IA sur la base de la spécification AUTOSAR Adaptive R25-11.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
AccessReturned if the File Storage is configured as read-only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be 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 the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for a new file.
PerErrc::kTooManyFilesrollback_semantics Returned if the number of files would get larger than the configured maxNumberOfFiles when the file is created.
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_00377
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00377@rel:R25-11#4913cde6
Content hash
4913cde6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00377
Status: valid/unmigrated Version: rel:R25-11#b93b741b 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_00377@rel:R25-11#b93b741b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#425765882026-09-30
  • R19-11rel:R19-11#19dcafc12026-10-14
  • R20-11rel:R20-11#65cfdd922026-10-14
  • R21-11rel:R21-11#070ae0fe2026-10-14
  • R22-11rel:R22-11#8d2829d82026-10-14
  • R23-11rel:R23-11#f1d4f46e2026-10-14
  • R24-11rel:R24-11#06a2d0b72026-10-14
  • R25-11rel:R25-11#b93b741b2026-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

fonction OpenFileWriteOnly [SWS_PER_00431] 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_00139, RS_AP_00144, RS_AP_00159

ara::core::Result< UniqueHandle< WriteAccessor > > OpenFileWriteOnly (ara::core::StringView fileName, OpenMode mode, ara::core::Span< ara::core::Byte > buffer) noexcept;

Opens a file of this File Storage for writing with a user provided buffer. If not otherwise specified by the provided mode, the file is truncated (corresponding to k Truncate). The provided buffer will be used by the ReadWriteAccessor to implement block-wise writing to speed up multiple small accesses to the file. If the file does not exist, it is created. The file will be closed when the returned UniqueHandle goes out of scope.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 37dc6b2848d7 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode synchrone OpenFileWriteOnly de la classe ara::per::FileStorage ouvre un fichier exclusivement en écriture et renvoie un ara::core::Result<UniqueHandle<WriteAccessor>> en cas de succès [SWS_PER_00431]. Lorsque le UniqueHandle renvoyé quitte sa portée, le fichier ouvert est automatiquement fermé [SWS_PER_00431]. L'appel accepte, outre le nom de fichier fileName et le mode d'accès mode, un tampon côté utilisateur buffer (en tant que ara::core::Span<ara::core::Byte>), qui est utilisé pour l'écriture par blocs afin d'accélérer les petits accès répétés en écriture [SWS_PER_00431]. Sauf configuration contraire dans le mode, le fichier est tronqué lors de l'ouverture (conformément à kTruncate) ; s'il n'existe pas encore, il est nouvellement créé [SWS_PER_00431].

Concernant la concurrence et la sécurité, la méthode est spécifiée comme thread-safe et exception safe, et déclarée comme noexcept [SWS_PER_00431]. L'accès échoue toutefois si le fichier est déjà ouvert ou si des opérations d'administration telles que DeleteFile, RecoverFile ou ResetFile sont exécutées simultanément sur le même nom de fichier [SWS_PER_00431].

En cas d'erreur, un code d'erreur correspondant issu de PerErrc ou une erreur spécifique au constructeur est renvoyé dans le résultat [SWS_PER_00431] :

  • PerErrc::kResourceBusy : Le fichier est déjà ouvert ou est occupé par une autre opération de fichier [SWS_PER_00431].
  • PerErrc::kIllegalWriteAccess : Le stockage de fichiers (File Storage) est protégé en écriture ou configuré en write-only-once et le fichier existe déjà [SWS_PER_00431].
  • PerErrc::kInvalidOpenMode : La combinaison de modes transmise est non valide [SWS_PER_00431].
  • PerErrc::kOutOfStorageSpace ou PerErrc::kTooManyFiles : L'espace de stockage est insuffisant ou le nombre maximal de fichiers configurés est dépassé [SWS_PER_00431].
  • PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed ou PerErrc::kAuthenticationFailed : Erreur lors de l'accès physique, de l'intégrité, de la validation, du déchiffrement ou de l'authentification [SWS_PER_00431].

En interaction avec d'autres interfaces, la fonction étend de manière ciblée les méthodes de base [SWS_PER_00377] (uniquement fileName) et [SWS_PER_00115] (avec mode) avec la prise en charge de tampons pour des opérations d'écriture optimisées [SWS_PER_00431].

Cette note d'utilisation a été générée automatiquement sur la base de la spécification d'AUTOSAR R25-11.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.
modeMode with which the file shall be opened.
bufferMemory to be used for block-wise writing.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
PerErrc::kIllegalWriteAccessrollback_semantics Returned if the File Storage is configured as read-only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be 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 the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for a new file.
PerErrc::kInvalidOpenModerollback_semantics Returned if the passed mode contains an invalid combination of modes.
PerErrc::kTooManyFilesrollback_semantics Returned if the number of files would get larger than the configured maxNumberOfFiles when the file is created.
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_00431
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00431@rel:R25-11#82c6d36e
Content hash
82c6d36e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00431
Status: valid/unmigrated Version: rel:R25-11#3f1ccf51 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_00431@rel:R25-11#3f1ccf51
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#4a5239432026-09-30
  • R20-11rel:R20-11#cee86b4c2026-10-14
  • R21-11rel:R21-11#97f9954b2026-10-14
  • R22-11rel:R22-11#950e84fd2026-10-14
  • R23-11rel:R23-11#26aeb4402026-10-14
  • R24-11rel:R24-11#e7c640db2026-10-14
  • R25-11rel:R25-11#3f1ccf512026-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

fonction RecoverFile [SWS_PER_00337] Upstream: RS_PER_00001, RS_PER_00004, RS_PER_00009, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > RecoverFile (ara::core::StringView fileName) noexcept;

Recovers a file of this File Storage. This method allows to recover a single file when the redundancy checks fail. It will fail with kResourceBusy when the file is currently open. This method does a best-effort recovery of the file. After recovery, the file might show outdated or initial content, or might be lost.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 1adb8f07ad8e Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode synchrone RecoverFile de la classe ara::per::FileStorage effectue une restauration au mieux (best-effort) d'un fichier individuel lorsque les contrôles de redondance échouent [SWS_PER_00337]. L'identifiant du fichier concerné est transmis via le paramètre fileName sous la forme de ara::core::StringView. Après la restauration, le fichier peut présenter des versions obsolètes ou le contenu initial, ou, dans le pire des cas, être perdu [SWS_PER_00337].

Concurrence et interaction

L'opération est spécifiée comme thread-safe et sûre face aux exceptions [SWS_PER_00337]. Elle ne doit toutefois pas être exécutée sur des fichiers ouverts : avant l'appel, toutes les instances de UniqueHandle obtenues auparavant via des méthodes d'ouverture de fichier telles que [SWS_PER_00113], [SWS_PER_00114] ou [SWS_PER_00375] doivent être fermées [SWS_PER_00337]. Dans le cas contraire, l'appel échoue avec PerErrc::kResourceBusy. La même erreur est signalée si [SWS_PER_00111] (DeleteFile) ou [SWS_PER_00338] (ResetFile) est exécuté simultanément pour le même nom de fichier [SWS_PER_00337].

Gestion des erreurs

La fonction renvoie un ara::core::Result<void> [SWS_PER_00337]. Outre PerErrc::kResourceBusy, les erreurs standardisées suivantes peuvent survenir :

  • PerErrc::kFileNotFound : le fichier indiqué n'existe pas dans le stockage de fichiers [SWS_PER_00337].
  • PerErrc::kPhysicalStorageFailure : l'accès au support de stockage physique échoue [SWS_PER_00337].
  • PerErrc::kOutOfStorageSpace : l'espace de stockage physique disponible n'est pas suffisant pour le fichier restauré [SWS_PER_00337].
  • PerErrc::kQuotaExceeded : le fichier restauré dépasserait la limite maximumAllowedSize configurée [SWS_PER_00337].
  • PerErrc::kEncryptionFailed et PerErrc::kAuthenticationFailed : le déchiffrement cryptographique ou la validation MAC des données stockées a échoué [SWS_PER_00337].

Cette note d'utilisation a été générée automatiquement sur la base de la spécification AUTOSAR R25-11.

Guide de l'implémenteur à venir (complexité I2)

Header-Datei#include "ara/per/file_storage.h"
Scopeclass ara::per::FileStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kPhysical no_rollback_semantics

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.

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
StorageFailureReturned if access to the physical storage fails.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kResourceBusyrollback_semantics Returned if the file is open, or if DeleteFile or ResetFile with the same file name is currently being executed.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the recovered file.
PerErrc::kFileNotFoundrollback_semantics Returned if the provided file does not exist in the File Storage.
PerErrc::kQuotaExceededrollback_semantics Returned if the recovered file would exceed the configured maximumAllowedSize of the File Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00337
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00337@rel:R25-11#053bd0e2
Content hash
053bd0e2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00337
Status: valid/unmigrated Version: rel:R25-11#bc734b10 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_00337@rel:R25-11#bc734b10
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#197d86622026-09-30
  • R19-11rel:R19-11#c81267f62026-10-14
  • R20-11rel:R20-11#e1325f5e2026-10-14
  • R21-11rel:R21-11#7b0aeab52026-10-14
  • R22-11rel:R22-11#55f9192b2026-10-14
  • R23-11rel:R23-11#44af99602026-10-14
  • R24-11rel:R24-11#b7a26e732026-10-14
  • R25-11rel:R25-11#bc734b102026-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

fonction ResetFile [SWS_PER_00338] Upstream: RS_PER_00001, RS_PER_00004, RS_PER_00009, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > ResetFile (ara::core::StringView fileName) noexcept;

Resets a file of this File Storage to its initial content. ResetFile allows to reset a single file to its initial content. If the file is currently not available in the File Storage, it is re-created. Afterwards, the file will appear in both cases as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the file is currently open, and with kInitValueNotAvailable when neither Application Design nor Target Configuration define an initial content for the file.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 16bebc8c99d8 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode synchrone ResetFile de la classe ara::per::FileStorage réinitialise un fichier individuel à son état initial préconfiguré [SWS_PER_00338]. Si le fichier spécifié via fileName n'est pas encore présent dans le stockage, il est créé à nouveau [SWS_PER_00338]. Dans les deux cas, le fichier possède ensuite le même contenu qu'après une nouvelle installation à partir de l'actuelle Target Configuration [SWS_PER_00338] ; son état de modification est géré dans FileModificationState en tant que kModifiedDuringReset [SWS_PER_00436].

L'opération est thread-safe ainsi que sûre face aux exceptions et renvoie de manière synchrone un ara::core::Result<void> [SWS_PER_00338]. Elle échoue avec PerErrc::kResourceBusy si le fichier est actuellement ouvert – par exemple via [SWS_PER_00113] – ou si une exécution de [SWS_PER_00111] ou [SWS_PER_00337] avec le même nom de fichier a lieu simultanément [SWS_PER_00338].

De plus, l'interface définit des cas d'erreur spécifiques [SWS_PER_00338] :

  • PerErrc::kInitValueNotAvailable : Aucune valeur initiale n'est configurée, ni dans l'Application Design, ni dans la Target Configuration [SWS_PER_00338].
  • PerErrc::kQuotaExceeded ou PerErrc::kTooManyFiles : Le fichier restauré dépasserait la limite AllowedSize ou maxNumberOfFiles [SWS_PER_00338].
  • PerErrc::kOutOfStorageSpace ou StorageFailure : L'espace de stockage physique est insuffisant ou l'accès physique échoue [SWS_PER_00338].
  • PerErrc::kEncryptionFailed ou PerErrc::kAuthenticationFailed : Le chiffrement/déchiffrement ou la vérification du MAC des données stockées échoue [SWS_PER_00338].

Cette note d'utilisation a été générée par une IA et se base sur la spécification AUTOSAR Adaptive R25-11.

Guide de l'implémenteur à venir (complexité I2)

Header-Datei#include "ara/per/file_storage.h"
Scopeclass ara::per::FileStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kPhysical no_rollback_semantics

Parameter (in)

ParameterBeschreibung
fileNameFile name of the file. May correspond to the PersistencyFile.file Name of a configured file.

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
StorageFailureReturned if access to the physical storage fails.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kInitValueNotAvailablerollback_semantics Returned if no intitial value was configured for this file.
PerErrc::kResourceBusyrollback_semantics Returned if the file is open, or if DeleteFile or RecoverFile with the same file name is currently being executed.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the initial file.
PerErrc::kTooManyFilesrollback_semantics Returned if the number of files would get larger than the configured maxNumberOfFiles when the file is restored.
PerErrc::kQuotaExceededrollback_semantics Returned if the initial file would exceed the configured maximum AllowedSize of the File Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00338
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00338@rel:R25-11#4da7da86
Content hash
4da7da86
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00338
Status: valid/unmigrated Version: rel:R25-11#0e854863 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_00338@rel:R25-11#0e854863
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#e0bc7dbf2026-09-30
  • R19-11rel:R19-11#374792432026-10-14
  • R20-11rel:R20-11#447c2e0a2026-10-14
  • R21-11rel:R21-11#3249eca82026-10-14
  • R22-11rel:R22-11#5318b4ac2026-10-14
  • R23-11rel:R23-11#7d4afee22026-10-14
  • R24-11rel:R24-11#e91250742026-10-14
  • R25-11rel:R25-11#0e8548632026-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

fonction operator= [SWS_PER_00327] Upstream: RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00145, RS_AP_00159

FileStorage & operator= (FileStorage &&fs)=delete;

The move assignment operator for FileStorage shall not be used.

Header-Datei#include "ara/per/file_storage.h"
Scopeclass ara::per::FileStorage

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

Record
AUTOSAR/AP/record/SWS_PER_00327
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00327@rel:R25-11#dece5863
Content hash
dece5863
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00327
Status: valid/unmigrated Version: rel:R25-11#cfa00f65 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_00327@rel:R25-11#cfa00f65
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d0dd99c82026-09-30
  • R19-11rel:R19-11#c719ee8c2026-10-14
  • R20-11rel:R20-11#dbca66992026-10-14
  • R21-11rel:R21-11#b28a2eda2026-10-14
  • R22-11rel:R22-11#07630f652026-10-14
  • R23-11rel:R23-11#61a2cece2026-10-14
  • R24-11rel:R24-11#cfa00f652026-10-14
  • R25-11rel:R25-11#cfa00f652026-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

fonction operator= [SWS_PER_00329] Upstream: RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_AP_00145

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

The copy assignment operator for FileStorage shall not be used.

Header-Datei#include "ara/per/file_storage.h"
Scopeclass ara::per::FileStorage

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

Record
AUTOSAR/AP/record/SWS_PER_00329
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00329@rel:R25-11#d91de588
Content hash
d91de588
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00329
Status: valid/unmigrated Version: rel:R25-11#b7444c9a 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_00329@rel:R25-11#b7444c9a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#24fb36102026-09-30
  • R19-11rel:R19-11#08d210462026-10-14
  • R20-11rel:R20-11#b39d46862026-10-14
  • R21-11rel:R21-11#b39d46862026-10-14
  • R22-11rel:R22-11#8e424eeb2026-10-14
  • R23-11rel:R23-11#9211a8ba2026-10-14
  • R24-11rel:R24-11#b7444c9a2026-10-14
  • R25-11rel:R25-11#b7444c9a2026-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

fonction ~FileStorage [SWS_PER_00330] Upstream: RS_PER_00004, RS_AP_00120, RS_AP_00129, RS_AP_00134, RS_AP_00145, RS_AP_00159

~FileStorage () noexcept;

Destructor for FileStorage.

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

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

Record
AUTOSAR/AP/record/SWS_PER_00330
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00330@rel:R25-11#acade78d
Content hash
acade78d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00330
Status: valid/unmigrated Version: rel:R25-11#406daa83 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_00330@rel:R25-11#406daa83
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a52467262026-09-30
  • R19-11rel:R19-11#f78017fc2026-10-14
  • R20-11rel:R20-11#0c5e9d812026-10-14
  • R21-11rel:R21-11#0c5e9d812026-10-14
  • R22-11rel:R22-11#888777422026-10-14
  • R23-11rel:R23-11#83343bdb2026-10-14
  • R24-11rel:R24-11#406daa832026-10-14
  • R25-11rel:R25-11#406daa832026-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