DEENESPTFRRUARHIKOZHNL

clase 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

Guía del usuarioGENERADO POR IA

Gestiona archivos persistentes y los abre a través de identificadores basados en RAII para lectura y escritura por bloques.
GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 7736cf7ccbd1 Procedencia Preguntas abiertas (2)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

Gestiona archivos persistentes y los abre a través de identificadores basados en RAII para lectura y escritura por bloques.

La clase ara::per::FileStorage permite gestionar y abrir un conjunto de archivos persistentes configurados mediante nombres de archivo únicos [SWS_PER_00110]. El acceso real de lectura y escritura se realiza a través de descriptores de acceso gestionados por UniqueHandle, que cierran automáticamente el archivo al salir del ámbito [SWS_PER_00114]. Dado que los archivos ya abiertos están protegidos contra operaciones concurrentes de eliminación o restauración, tales accesos paralelos fallan con PerErrc::kResourceBusy [SWS_PER_00111].

Contexto

La clase ara::per::FileStorage encapsula el acceso a una colección configurada de archivos persistentes que se identifican mediante nombres de archivo únicos. Actúa como interfaz central para que las aplicaciones realicen operaciones sobre archivos, tales como listar los archivos existentes mediante GetAllFileNames [SWS_PER_00110], verificar la existencia mediante FileExists [SWS_PER_00112], así como consultar metadatos y tamaños de archivo a través de GetFileInfo [SWS_PER_00438] y GetCurrentFileSize [SWS_PER_00407]. El acceso directo de lectura o escritura a nivel de bytes no se realiza en la propia instancia de almacenamiento, sino mediante objetos accesores especiales proporcionados por los métodos de apertura como UniqueHandle [SWS_PER_00114] [SWS_PER_00113] [SWS_PER_00115].

Ciclo de vida

La instanciación de FileStorage está sujeta a restricciones estrictas: tanto el constructor por defecto [SWS_PER_00460] como los constructores de copia y movimiento [SWS_PER_00328] [SWS_PER_00326] y los operadores de asignación por copia y por movimiento [SWS_PER_00329] [SWS_PER_00327] están explícitamente eliminados. Por lo tanto, es de suponer que una instancia de FileStorage se abra y proporcione típicamente mediante funciones factoría del módulo de persistencia en la plataforma. Pregunta (abierta) El destructor ~FileStorage es seguro frente a excepciones (noexcept), pero está especificado explícitamente como no seguro para subprocesos [SWS_PER_00330], por lo que debe garantizarse que no se realicen llamadas concurrentes sobre el objeto durante la destrucción.

Durante el funcionamiento normal, las operaciones de archivo regulares como FileExists, DeleteFile o la apertura de archivos están diseñadas para ser seguras para subprocesos [SWS_PER_00111] [SWS_PER_00112] [SWS_PER_00114]. No obstante, debe tenerse en cuenta que los resultados de consultas de estado como GetAllFileNames [SWS_PER_00110] o FileExists [SWS_PER_00112] solo tienen validez precisa si no se añaden o eliminan archivos simultáneamente en otro hilo. Algo similar se aplica a GetFileInfo: las horas de modificación y acceso, así como el estado de edición, solo son fiablemente exactos mientras el archivo de destino no esté abierto [SWS_PER_00438].

Ruta de uso

Una ruta típica de uso comprende la verificación, la apertura selectiva, el procesamiento de datos a través del descriptor de acceso y la limpieza final:

  1. Comprobar el estado del archivo: antes de acceder, se puede determinar opcionalmente mediante FileExists si existe un archivo deseado [SWS_PER_00112], o consultar el inventario a través de GetAllFileNames [SWS_PER_00110].
  2. Abrir el archivo: según el modo de acceso previsto, la clase proporciona métodos dedicados. Para acceso exclusivo de lectura, se dispone de sobrecargas de OpenFileReadOnly [SWS_PER_00114] [SWS_PER_00376] [SWS_PER_00430]. Para acceso de lectura y escritura sirve OpenFileReadWrite [SWS_PER_00113] [SWS_PER_00375] [SWS_PER_00429], creándose automáticamente de nuevo si el archivo no existe. Para escritura pura existe OpenFileWriteOnly [SWS_PER_00115] [SWS_PER_00377] [SWS_PER_00431], que trunca el archivo por defecto (kTruncate) o lo crea de nuevo. Para mejorar el rendimiento en muchos accesos pequeños, las sobrecargas permiten pasar un búfer definido por el usuario para lectura o escritura por bloques [SWS_PER_00430] [SWS_PER_00429] [SWS_PER_00431].
  3. Cerrar el archivo y liberar recursos: el ara::core::Result devuelto por los métodos de apertura encapsula un UniqueHandle hacia el accesor correspondiente. El archivo se cierra automáticamente en cuanto este UniqueHandle sale de su ámbito [SWS_PER_00114] [SWS_PER_00113] [SWS_PER_00115]. Es de suponer que aquí también se retire la marca de ocupación relativa al archivo en FileStorage. Pregunta (abierta)
  4. Mantenimiento y limpieza: los archivos que ya no se necesitan se eliminan con DeleteFile [SWS_PER_00111]. En caso de violaciones de integridad, RecoverFile ofrece una restauración de datos redundantes basada en el mejor esfuerzo (best-effort) [SWS_PER_00337], mientras que ResetFile restablece un archivo a su contenido de despliegue inicial o lo crea de nuevo si falta [SWS_PER_00338].
Ruta de uso típica para FileStorageAplicaciónstorage: FileStoragehandle: UniqueHandleUse Case: 1. Comprobación previaFileExists(fileName)Result<bool> (true)Use Case: 2. Abrir archivoOpenFileReadOnly(fileName, mode, buffer)Result<UniqueHandle<ReadAccessor>>Use Case: 3. Dateiinhalt lesenLectura por bloques a través de un descriptor de accesoGelesene Byte-DatenUse Case: 4. Cierre al finalizar el ámbitoUniqueHandle sale del ámbitoEl destructor cierra el archivoUse Case: 5. BereinigungDeleteFile(fileName)Result<void>

Diagrama de secuencia: flujo típico desde la comprobación y apertura de un archivo mediante el procesamiento con búfer hasta el cierre automático por el ámbito del identificador. Fuentes: [SWS_PER_00112], [SWS_PER_00430], [SWS_PER_00114], [SWS_PER_00111].

Escenarios de error

Los métodos de FileStorage señalizan errores mediante ara::core::Result utilizando la enumeración de errores PerErrc. Entre las situaciones de error más importantes se encuentran:

  • Conflictos de recursos (PerErrc::kResourceBusy): un archivo no se puede abrir, eliminar, restaurar ni restablecer si ya está abierto o si se está ejecutando en paralelo un DeleteFile, RecoverFile o ResetFile sobre el mismo nombre de archivo [SWS_PER_00111] [SWS_PER_00114] [SWS_PER_00113] [SWS_PER_00337] [SWS_PER_00338].
  • Archivos no encontrados (PerErrc::kFileNotFound): ocurre cuando se intenta abrir en modo de solo lectura [SWS_PER_00114], eliminar [SWS_PER_00111], consultar [SWS_PER_00407] [SWS_PER_00438] o restaurar [SWS_PER_00337] un archivo inexistente.
  • Violaciones de acceso y permisos: las aperturas de escritura o los procesos de eliminación fallan con PerErrc::kIllegalWriteAccess si el almacenamiento está configurado como de solo lectura (read-only) [SWS_PER_00111] [SWS_PER_00113] [SWS_PER_00115]. Las combinaciones de modo no válidas se rechazan con PerErrc::kInvalidOpenMode [SWS_PER_00114] [SWS_PER_00113].
  • Límites de almacenamiento y cuotas: al crear o aumentar de tamaño pueden producirse PerErrc::kOutOfStorageSpace (almacenamiento físico lleno), PerErrc::kTooManyFiles (superación de maxNumberOfFiles) o PerErrc::kQuotaExceeded (exceso de maximumAllowedSize) [SWS_PER_00113] [SWS_PER_00337] [SWS_PER_00338].
  • Errores de integridad y de seguridad: en caso de fallos en la capa de almacenamiento físico se notifica PerErrc::kPhysicalStorageFailure. Las estructuras de datos dañadas, las validaciones fallidas o los problemas criptográficos resultan en PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed o PerErrc::kAuthenticationFailed [SWS_PER_00110] [SWS_PER_00112] [SWS_PER_00114] [SWS_PER_00337].
  • Datos iniciales faltantes (PerErrc::kInitValueNotAvailable): falla al restablecer mediante ResetFile si no se han definido valores iniciales ni en el Application Design ni en la configuración de destino [SWS_PER_00338].

Esta guía se basa en la especificación AUTOSAR Adaptive Platform Release R25-11 y resume los requisitos funcionales de ara::per::FileStorage.

Mapa de miembros

Diagrama de clases

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()

Vista de detalle

Selecciona una entrada en el índice.

Constructores y destructor

FileStorage función 3

The move constructor for FileStorage shall not be used.

Sobrecargas FileStorage 3
FileStorage (FileStorage &&fs)=delete; SWS_PER_00326
FileStorage (const FileStorage &)=delete; SWS_PER_00328
FileStorage ()=delete; SWS_PER_00460
~FileStorage función

Destructor for FileStorage.

~FileStorage () noexcept;

Métodos

DeleteFile función

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 función

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 función

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 función 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.

Sobrecargas 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.

Sobrecargas 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.

Sobrecargas OpenFileWriteOnly 3
RecoverFile función

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 función

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;

Operadores

operator= función 2

The move assignment operator for FileStorage shall not be used.

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

Documentación de los métodos

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 4416a2cc7c72 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método síncrono DeleteFile de la clase ara::per::FileStorage elimina un archivo del almacenamiento de archivos [SWS_PER_00111] en función de su nombre (fileName). El identificador puede corresponder al PersistencyFile.fileName configurado [SWS_PER_00111]. La llamada está especificada como noexcept, se considera segura frente a excepciones y segura para hilos, y notifica el resultado mediante ara::core::Result<void> [SWS_PER_00111].

Antes de la llamada, deben haber finalizado todos los accesos activos al archivo de destino. Si el archivo está abierto en ese momento, la operación de eliminación falla con el error PerErrc::kResourceBusy [SWS_PER_00111]. Por lo tanto, las aplicaciones deben asegurarse de que las instancias de UniqueHandle creadas previamente mediante OpenFileReadWrite [SWS_PER_00113], OpenFileReadOnly [SWS_PER_00114] o OpenFileWriteOnly [SWS_PER_00115] hayan salido de su ámbito de validez, cerrando así el archivo. Asimismo, una ejecución paralela de RecoverFile [SWS_PER_00337] o ResetFile [SWS_PER_00338] para el mismo nombre de archivo conduce a PerErrc::kResourceBusy [SWS_PER_00111].

En caso de error, el tipo Result devuelto proporciona causas de error específicas [SWS_PER_00111]:

  • PerErrc::kFileNotFound: El archivo especificado no existe en el almacenamiento de archivos [SWS_PER_00111].
  • PerErrc::kIllegalWriteAccess: El File Storage está configurado como de solo lectura [SWS_PER_00111].
  • PerErrc::kPhysicalStorageFailure: Falla el acceso al medio de almacenamiento físico (sin semántica de reversión) [SWS_PER_00111].
  • PerErrc::kIntegrityCorrupted, PerErrc::kEncryptionFailed o PerErrc::kAuthenticationFailed: Errores en la integridad estructural, en el cifrado/descifrado o en la verificación MAC (en cada caso con semántica de reversión), así como errores específicos del fabricante [SWS_PER_00111].

Este texto ha sido generado por una IA y sirve como guía orientativa. Tienen carácter vinculante exclusivamente las especificaciones de la documentación de AUTOSAR.

Guía del implementador pendiente (complejidad 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#be0bc09c
Content hash
be0bc09c
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: f0bea0a79212 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método síncrono FileExists de la clase ara::per::FileStorage comprueba si un archivo existe en el almacenamiento de archivos correspondiente [SWS_PER_00112]. La función está declarada como noexcept y no lanza excepciones de C++ [SWS_PER_00112].

usar

Como parámetro se pasa fileName como ara::core::StringView, lo que puede corresponder al identificador PersistencyFile.fileName de un archivo configurado [SWS_PER_00112]. El valor de retorno ara::core::Result<bool> devuelve true si el archivo pudo localizarse y, en caso contrario, false [SWS_PER_00112].

Manejo de errores

Si la comprobación falla, el Result devuelto no contiene un valor booleano, sino un código de error [SWS_PER_00112]. Las causas de error especificadas son:

  • PerErrc::kPhysicalStorageFailure al fallar el acceso al almacenamiento físico [SWS_PER_00112],
  • PerErrc::kIntegrityCorrupted en caso de integridad estructural dañada de los datos [SWS_PER_00112],
  • PerErrc::kValidationFailed cuando no se puede garantizar la validez de los datos almacenados [SWS_PER_00112],
  • PerErrc::kEncryptionFailed en caso de fallo en el descifrado [SWS_PER_00112],
  • PerErrc::kAuthenticationFailed al fallar la comprobación del MAC [SWS_PER_00112], así como posibles errores específicos del fabricante [SWS_PER_00112].

Concurrencia y restricciones

El método está declarado como seguro para subprocesos [SWS_PER_00112]. No obstante, el resultado de comprobación entregado solo es exacto mientras no se añadan ni eliminen archivos en el almacenamiento simultáneamente; por ejemplo, si otro subproceso elimina un archivo directamente tras la devolución de true, el resultado ya no es válido [SWS_PER_00112].

Esta nota de uso se generó de forma automatizada sobre la base de AUTOSAR R25-11.

Guía del implementador pendiente (complejidad 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#f94580f8
Content hash
f94580f8
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

función 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#b3811c40
Content hash
b3811c40
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

función 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#5839e7b2
Content hash
5839e7b2
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

función 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#7d91c766
Content hash
7d91c766
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

función 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#923a8408
Content hash
923a8408
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

función 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#ae333c9d
Content hash
ae333c9d
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

función 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#0b918014
Content hash
0b918014
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: b7f6df93c4d9 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método OpenFileReadOnly de la clase ara::per::FileStorage (declarado en #include "ara/per/file_storage.h") abre un archivo persistido como de solo lectura con un modo de acceso especificado [SWS_PER_00114]. A menos que se especifique lo contrario mediante el parámetro mode, la posición del puntero de lectura se establece por defecto al inicio del archivo (kAtTheBeginning) [SWS_PER_00114]. La ejecución se realiza de forma síncrona y devuelve un ara::core::Result<UniqueHandle<ReadAccessor>>. El manipulador utiliza semántica RAII: en cuanto la instancia de UniqueHandle abandona su ámbito de validez, el archivo se cierra automáticamente [SWS_PER_00114].

En cuanto a la concurrencia, el método está especificado como thread-safe y exception safe (con noexcept) [SWS_PER_00114]. No obstante, existen restricciones de invocación funcionales: si el archivo de destino ya está abierto o se ejecutan al mismo tiempo operaciones como DeleteFile, RecoverFile o ResetFile con el mismo nombre de archivo, la invocación falla con PerErrc::kResourceBusy [SWS_PER_00114].

En caso de error, el ara::core::Result devuelve errores específicos del fabricante o códigos de error estandarizados de PerErrc o bien StorageFailure [SWS_PER_00114]:

  • PerErrc::kFileNotFound: El archivo especificado no existe en el almacenamiento de archivos [SWS_PER_00114].
  • PerErrc::kInvalidOpenMode: El modo transferido contiene una combinación no válida de indicadores (flags) [SWS_PER_00114].
  • StorageFailure: El acceso al almacenamiento físico ha fallado [SWS_PER_00114].
  • PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kAuthenticationFailed o PerErrc::kEncryptionFailed: Integridad estructural dañada, validación insuficiente, comprobación MAC defectuosa o descifrado fallido [SWS_PER_00114].

En interacción con otras interfaces, FileStorage ofrece dos sobrecargas relacionadas: una variante sin parámetro de modo, que abre siempre al inicio del archivo [SWS_PER_00376], así como una sobrecarga con búfer (ara::core::Span<ara::core::Byte> buffer), a través de la cual el ReadAccessor implementa lectura por bloques para acelerar múltiples accesos pequeños [SWS_PER_00430].

Esta nota de uso se ha generado automáticamente sobre la base de la especificación de AUTOSAR Adaptive R25-11.

Guía del implementador pendiente (complejidad 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#526fa02e
Content hash
526fa02e
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 4286b0e81322 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método OpenFileReadOnly de la clase ara::per::FileStorage abre un archivo persistido en modo de solo lectura [SWS_PER_00376]. La llamada se realiza a través del archivo de cabecera ara/per/file_storage.h pasando el nombre de archivo fileName. En este proceso, la posición de lectura se establece inicialmente al principio del archivo. Como valor de retorno sirve un ara::core::Result, que en caso de éxito proporciona un UniqueHandle<ReadAccessor>. El archivo abierto se cierra automáticamente en cuanto este manejador sale de su ámbito de validez.

Manejo de errores

Si la ejecución falla, el resultado contiene un código de error o un error específico del fabricante [SWS_PER_00376]:

  • PerErrc::kFileNotFound: El archivo especificado no existe en el almacenamiento.
  • PerErrc::kResourceBusy: El archivo ya está abierto o se procesa simultáneamente mediante DeleteFile, RecoverFile o ResetFile.
  • PerErrc::kPhysicalStorageFailure: El acceso al medio de almacenamiento físico ha fallado.
  • PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed, PerErrc::kAuthenticationFailed: Errores en la integridad de la estructura, validación de datos, descifrado o comprobación MAC.

Concurrencia e interacción

El método está especificado como thread-safe, exception safe y noexcept [SWS_PER_00376]. Para requisitos avanzados, se encuentran disponibles sobrecargas: una variante para la especificación explícita de un OpenMode [SWS_PER_00114], así como una signatura con un búfer de usuario adicional para la aceleración por bloques de accesos de lectura más pequeños [SWS_PER_00430].

Esta nota de uso se ha elaborado de manera automatizada a partir de la especificación de AUTOSAR.

Guía del implementador pendiente (complejidad 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#0439467a
Content hash
0439467a
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: f3a0884b9d84 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método síncrono OpenFileReadOnly de la clase ara::per::FileStorage abre un archivo persistido para acceso de lectura utilizando un búfer proporcionado por la entidad emisora de la llamada [SWS_PER_00430]. El acceso al archivo se inicializa a partir de los parámetros fileName, mode y buffer (como ara::core::Span<ara::core::Byte>) [SWS_PER_00430]. A menos que se indique lo contrario mediante mode, la posición de lectura se encuentra por defecto al principio del archivo (kAtTheBeginning) [SWS_PER_00430]. La región de memoria pasada es utilizada por el ReadAccessor resultante para acelerar accesos de lectura pequeños repetidos mediante lectura por bloques [SWS_PER_00430]. El recurso está protegido mediante RAII: en cuanto el UniqueHandle devuelto sale del ámbito de validez, el archivo se cierra automáticamente [SWS_PER_00430].

En cuanto a la concurrencia, la función está especificada como segura para hilos (thread-safe), segura frente a excepciones (exception safe) y noexcept [SWS_PER_00430]. Si se produce un error, el ara::core::Result proporciona errores específicos del fabricante o códigos de error estandarizados procedentes de PerErrc [SWS_PER_00430]:

  • PerErrc::kResourceBusy: El archivo ya está abierto o se procesa simultáneamente mediante DeleteFile, RecoverFile o ResetFile [SWS_PER_00430].
  • PerErrc::kFileNotFound: El archivo especificado no existe en el almacenamiento de archivos [SWS_PER_00430].
  • PerErrc::kInvalidOpenMode: El modo pasado contiene una combinación de opciones no válida [SWS_PER_00430].
  • Errores de integridad y de seguridad: PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed o PerErrc::kAuthenticationFailed (fallo de la comprobación MAC), así como StorageFailure en caso de errores de acceso a la memoria física [SWS_PER_00430].

Junto a esta variante con búfer, para casos de uso sin búfer definido por el usuario se encuentran disponibles las sobrecargas [SWS_PER_00114] (con mode) y [SWS_PER_00376] (solo con fileName).

Esta nota de uso se generó automáticamente a partir de la especificación AUTOSAR R25-11.

Guía del implementador pendiente (complejidad 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#c5dfe2f4
Content hash
c5dfe2f4
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: cf05039b8020 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método síncrono OpenFileReadWrite de la clase ara::per::FileStorage abre un archivo para accesos de lectura y escritura en el modo especificado mode [SWS_PER_00113]. A menos que se especifique lo contrario en el modo, el puntero del archivo se sitúa por defecto al principio (kAtTheBeginning). Si el archivo aún no existe, se crea automáticamente [SWS_PER_00113]. La función devuelve un ara::core::Result con un UniqueHandle<ReadWriteAccessor>, el cual cierra automáticamente el archivo en cuanto el handle sale de su ámbito de validez [SWS_PER_00113].

Concurrencia y restricciones

La llamada es segura para subprocesos (thread-safe) y no lanza excepciones (noexcept) [SWS_PER_00113]. El archivo no debe estar ya abierto en el momento de la llamada. Además, no debe tener lugar ninguna ejecución simultánea de DeleteFile, RecoverFile o ResetFile con el mismo nombre de archivo, ya que de lo contrario la llamada fallará con PerErrc::kResourceBusy [SWS_PER_00113].

Manejo de errores

En caso de error, el ara::core::Result contiene códigos de error específicos [SWS_PER_00113]:

  • PerErrc::kInvalidOpenMode: Combinación no válida de flags en el mode pasado.
  • PerErrc::kResourceBusy: El archivo de destino ya está abierto o está ocupado por operaciones administrativas de archivos.
  • Access: El almacenamiento está configurado como read-only o como write-only-once en caso de una clave ya existente.
  • PerErrc::kOutOfStorageSpace o PerErrc::kTooManyFiles: Espacio de almacenamiento físico insuficiente o superación de maxNumberOfFiles al crearlo de nuevo.
  • PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed, PerErrc::kAuthenticationFailed: Errores de acceso al hardware, estructuras de datos corruptas o validaciones criptográficas fallidas.

Interacción

Como variante simplificada, está disponible una sobrecarga sin parámetro de modo, la cual abre los archivos por defecto al principio [SWS_PER_00375]. Para la optimización del rendimiento en caso de numerosos accesos pequeños, existe además una sobrecarga con búfer definido por el usuario (buffer) para lectura y escritura por bloques [SWS_PER_00429].

Esta nota de uso ha sido generada por una IA a partir de la especificación AUTOSAR Adaptive Release R25-11.

Guía del implementador pendiente (complejidad 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#67397d5d
Content hash
67397d5d
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: e0c7dc90877b Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

La función miembro síncrona OpenFileReadWrite de la clase ara::per::FileStorage sirve para abrir un archivo para accesos combinados de lectura y escritura [SWS_PER_00375]. Como parámetro se pasa el nombre de archivo fileName como ara::core::StringView, el cual puede corresponder al modelado PersistencyFile.fileName de un archivo configurado [SWS_PER_00375]. Si el archivo especificado aún no existe, se crea automáticamente de nuevo [SWS_PER_00375]. Al abrirse, la posición del archivo se sitúa inmediatamente al principio (conforme a kAtTheBeginning) [SWS_PER_00375]. El llamador recibe un ara::core::Result<UniqueHandle<ReadWriteAccessor>>; el archivo se cierra automáticamente en cuanto el UniqueHandle devuelto sale de su ámbito de validez [SWS_PER_00375].

En cuanto a concurrencia y contexto de ejecución, la función está especificada como thread-safe y exception safe [SWS_PER_00375]. No obstante, debe tenerse en cuenta que los accesos simultáneos están reglamentados: si el archivo ya está abierto o si se ejecuta simultáneamente una operación como DeleteFile, RecoverFile o ResetFile sobre el mismo nombre de archivo, la llamada falla y devuelve el código de error PerErrc::kResourceBusy [SWS_PER_00375].

En caso de error, el objeto Result devuelto encapsula errores específicos de la persistencia o errores específicos del fabricante [SWS_PER_00375]:

  • errores de configuración y de acceso como Access en caso de almacenamiento protegido contra escritura o de datos ya existentes con configuración Write-Once [SWS_PER_00375].
  • límites de espacio de almacenamiento debidos a PerErrc::kOutOfStorageSpace o PerErrc::kTooManyFiles en caso de superación del límite superior configurado para el archivo [SWS_PER_00375].
  • errores de integridad y de seguridad tales como PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed o PerErrc::kAuthenticationFailed [SWS_PER_00375].

En combinación con otras interfaces de FileStorage, AUTOSAR ofrece sobrecargas alternativas: OpenFileReadWrite puede invocarse con OpenMode explícito [SWS_PER_00113] o con un área de memoria adicional por parte del usuario buffer (ara::core::Span<ara::core::Byte>), que permite una amortiguación por bloques para acelerar accesos pequeños y repetidos [SWS_PER_00429].

Este texto fue generado por una IA y revisado a partir de la especificación de AUTOSAR.

Guía del implementador pendiente (complejidad 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#a1a928d2
Content hash
a1a928d2
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 06577277e905 Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método OpenFileReadWrite de la clase ara::per::FileStorage abre un archivo de forma síncrona para lectura y escritura combinadas proporcionando un búfer definido por el usuario [SWS_PER_00429]. La región de memoria pasada buffer (como ara::core::Span<ara::core::Byte>) es utilizada internamente por el ReadWriteAccessor para operaciones de lectura y escritura por bloques, con el fin de procesar series de accesos pequeños con alto rendimiento. Si el archivo especificado aún no existe, se crea de nuevo automáticamente; la posición del archivo se encuentra por defecto al principio (kAtTheBeginning), siempre que no se indique lo contrario en el mode pasado [SWS_PER_00429]. El archivo se cierra en cuanto el UniqueHandle devuelto en el ara::core::Result sale de su ámbito de validez. Interpretación: presumiblemente, la memoria subyacente del span de búfer pasado debe permanecer válida durante toda la vida útil del UniqueHandle, ya que el descriptor de acceso la referencia para accesos por bloques. Pregunta Q-e0009b7de17e3597 (abierta)

Tratamiento de errores y concurrencia

La función está especificada como noexcept, segura frente a excepciones (exception safe) y segura para hilos [SWS_PER_00429]. En caso de fallos, el Result proporciona errores específicos del fabricante o códigos de error definidos:

  • PerErrc::kResourceBusy: El archivo ya está abierto o se procesa simultáneamente mediante DeleteFile, RecoverFile o ResetFile con el mismo nombre [SWS_PER_00429].
  • Access: La región de memoria está configurada como read-only o definida como write-only-once y ya ocupada [SWS_PER_00429].
  • PerErrc::kInvalidOpenMode: El mode pasado contiene una combinación de características no válida [SWS_PER_00429].
  • PerErrc::kOutOfStorageSpace o PerErrc::kTooManyFiles: La memoria física no es suficiente para una nueva creación o se superaría el límite configurado maxNumberOfFiles [SWS_PER_00429].
  • PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed y PerErrc::kAuthenticationFailed: Errores durante el acceso, durante la comprobación de integridad, MAC o validación, así como durante el descifrado [SWS_PER_00429].

Interacción

El método representa una variante optimizada en rendimiento de la apertura de lectura/escritura: mientras que [SWS_PER_00113] solo procesa el nombre de archivo y el modo y [SWS_PER_00375] exclusivamente el nombre de archivo, [SWS_PER_00429] permite la aceleración específica de accesos de E/S pequeños mediante un búfer de memoria explícito.

Este texto ha sido generado por una IA y se basa en las prescripciones de la especificación AUTOSAR.

Guía del implementador pendiente (complejidad 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#31d794e3
Content hash
31d794e3
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: cf72b60c71fb Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método OpenFileWriteOnly de la clase ara::per::FileStorage abre un archivo de forma síncrona para escritura exclusiva con un modo de acceso definido [SWS_PER_00115]. A menos que se indique lo contrario a través del parámetro mode, el archivo se trunca durante el proceso (conforme a kTruncate). Si el archivo aún no existe, se crea de nuevo. Como valor devuelto se utiliza un ara::core::Result<UniqueHandle<WriteAccessor>>; al salir del ámbito de validez del UniqueHandle, el archivo se vuelve a cerrar automáticamente [SWS_PER_00115].

Manejo de errores

En caso de error, el Result devuelto contiene códigos de error específicos [SWS_PER_00115]: Access indica que el almacenamiento es de solo lectura o que se ha configurado como Write-Once y la clave ya existe. PerErrc::kInvalidOpenMode notifica combinaciones de modo no válidas y PerErrc::kOutOfStorageSpace, espacio de almacenamiento físico insuficiente. Además, pueden producirse PerErrc::kTooManyFiles, PerErrc::kPhysicalStorageFailure, así como errores de integridad y de seguridad tales como PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed o PerErrc::kAuthenticationFailed [SWS_PER_00115].

Concurrencia y restricciones

La función está concebida como segura frente a hilos y segura frente a excepciones (noexcept) [SWS_PER_00115]. Los accesos paralelos al mismo archivo fallan con el código de error PerErrc::kResourceBusy si el archivo ya está abierto o si se ejecutan simultáneamente operaciones como DeleteFile, RecoverFile o ResetFile con el mismo nombre de archivo [SWS_PER_00115].

Interacción

Junto a esta función, la interfaz proporciona una sobrecarga simplificada sin parámetro de modo que opera por defecto con kTruncate [SWS_PER_00377], así como una sobrecarga con búfer definido por el usuario para permitir la escritura por bloques a fin de acelerar numerosos accesos pequeños [SWS_PER_00431].

Esta nota de uso ha sido generada por una IA sobre la base de la especificación.

Guía del implementador pendiente (complejidad 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#3e2c3799
Content hash
3e2c3799
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: fa6d3b80cd05 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método síncrono OpenFileWriteOnly de la clase ara::per::FileStorage abre un archivo exclusivamente para escritura según [SWS_PER_00377]. Toma a través del parámetro fileName el nombre del archivo de destino. En caso de que el archivo no exista, se crea de nuevo; un archivo ya existente se trunca (conforme a kTruncate) [SWS_PER_00377]. Como valor de retorno sirve un ara::core::Result, que en caso de éxito encapsula un ara::per::UniqueHandle<WriteAccessor>. Este manejador cierra el archivo automáticamente según el patrón RAII en cuanto sale del ámbito de validez [SWS_PER_00377].

Tratamiento de errores y concurrencia

La operación está declarada como noexcept, es segura frente a excepciones y segura para hilos [SWS_PER_00377]. En caso de error, el Result contiene un código de error específico de PerErrc o un error específico del fabricante [SWS_PER_00377]:

  • PerErrc::kResourceBusy: El archivo ya está abierto o se está procesando simultáneamente mediante DeleteFile, RecoverFile o ResetFile.
  • PerErrc::kOutOfStorageSpace y PerErrc::kTooManyFiles: La memoria física no es suficiente o se supera el número máximo de archivos configurados (maxNumberOfFiles).
  • PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed o PerErrc::kAuthenticationFailed: Errores en el acceso al hardware, así como en las comprobaciones de integridad, validación o descifrado.

Interacción

Mientras que esta variante predetermina de forma fija el truncamiento, la sobrecarga con el parámetro OpenMode permite un modo de apertura divergente [SWS_PER_00115]. Para operaciones de escritura optimizadas por bloques con múltiples accesos pequeños, se encuentra a disposición otra sobrecarga con búfer definido por el usuario (ara::core::Span<ara::core::Byte>) [SWS_PER_00431].

Este texto ha sido generado por una IA a partir de la especificación AUTOSAR Adaptive R25-11.

Guía del implementador pendiente (complejidad 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#91b37a5b
Content hash
91b37a5b
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 37dc6b2848d7 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método síncrono OpenFileWriteOnly de la clase ara::per::FileStorage abre un archivo exclusivamente para escritura y, en caso de éxito, devuelve un ara::core::Result<UniqueHandle<WriteAccessor>> [SWS_PER_00431]. Al salir del ámbito de validez del UniqueHandle devuelto, el archivo abierto se cierra automáticamente [SWS_PER_00431]. La llamada toma, además del nombre de archivo fileName y del modo de acceso mode, un búfer por parte del usuario buffer (como ara::core::Span<ara::core::Byte>) que se utiliza para escritura por bloques a fin de acelerar accesos de escritura pequeños repetidos [SWS_PER_00431]. Si no se configura de forma divergente en el modo, el archivo se trunca al abrirse (conforme a kTruncate); si aún no existe, se crea de nuevo [SWS_PER_00431].

En cuanto a concurrencia y seguridad, el método está especificado como thread-safe y exception safe, y declarado como noexcept [SWS_PER_00431]. Sin embargo, el acceso falla si el archivo ya está abierto o si se ejecutan simultáneamente operaciones de administración como DeleteFile, RecoverFile o ResetFile sobre el mismo nombre de archivo [SWS_PER_00431].

En caso de error, se devuelve en el resultado el código de error correspondiente procedente de PerErrc o un error específico del fabricante [SWS_PER_00431]:

  • PerErrc::kResourceBusy: El archivo ya está abierto o está ocupado por otra operación de archivo [SWS_PER_00431].
  • PerErrc::kIllegalWriteAccess: El File Storage está protegido contra escritura o configurado como write-only-once y el archivo ya existe [SWS_PER_00431].
  • PerErrc::kInvalidOpenMode: La combinación de modos transferida no es válida [SWS_PER_00431].
  • PerErrc::kOutOfStorageSpace o PerErrc::kTooManyFiles: El espacio de almacenamiento es insuficiente o se supera el número máximo de archivos configurados [SWS_PER_00431].
  • PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed o PerErrc::kAuthenticationFailed: Error en el acceso físico, la integridad, la validación, el descifrado o la autenticación [SWS_PER_00431].

En interacción con otras interfaces, la función amplía de forma específica los métodos básicos [SWS_PER_00377] (solo fileName) y [SWS_PER_00115] (con mode) con soporte de búfer para operaciones de escritura optimizadas [SWS_PER_00431].

Esta nota de uso se ha generado automáticamente a partir de la especificación de AUTOSAR R25-11.

Guía del implementador pendiente (complejidad 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#27258a38
Content hash
27258a38
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 1adb8f07ad8e Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método síncrono RecoverFile de la clase ara::per::FileStorage lleva a cabo una restauración de mejor esfuerzo (best effort) de un archivo individual cuando fallan las comprobaciones de redundancia [SWS_PER_00337]. El identificador del archivo afectado se pasa mediante el parámetro fileName como ara::core::StringView. Tras la restauración, el archivo puede presentar estados obsoletos o el contenido inicial, o bien, en el peor de los casos, haberse perdido [SWS_PER_00337].

Concurrencia e interacción

La operación está especificada como segura para hilos y segura frente a excepciones [SWS_PER_00337]. No obstante, no debe ejecutarse sobre archivos abiertos: antes de la llamada, deben estar cerradas todas las instancias de UniqueHandle obtenidas previamente mediante métodos de apertura de archivos como [SWS_PER_00113], [SWS_PER_00114] o [SWS_PER_00375] [SWS_PER_00337]. De lo contrario, la llamada falla con PerErrc::kResourceBusy. Se notifica el mismo error si se ejecuta simultáneamente [SWS_PER_00111] (DeleteFile) o [SWS_PER_00338] (ResetFile) para el mismo nombre de archivo [SWS_PER_00337].

Manejo de errores

La función devuelve un ara::core::Result<void> [SWS_PER_00337]. Además de PerErrc::kResourceBusy, pueden producirse los siguientes errores estandarizados:

  • PerErrc::kFileNotFound: El archivo especificado no existe en el almacenamiento de archivos [SWS_PER_00337].
  • PerErrc::kPhysicalStorageFailure: Falla el acceso al medio de almacenamiento físico [SWS_PER_00337].
  • PerErrc::kOutOfStorageSpace: El espacio de almacenamiento físico disponible no es suficiente para el archivo restaurado [SWS_PER_00337].
  • PerErrc::kQuotaExceeded: El archivo restaurado superaría el límite configurado maximumAllowedSize [SWS_PER_00337].
  • PerErrc::kEncryptionFailed y PerErrc::kAuthenticationFailed: Ha fallado el descifrado criptográfico o la validación MAC de los datos almacenados [SWS_PER_00337].

Esta nota de uso se generó automáticamente a partir de la especificación AUTOSAR R25-11.

Guía del implementador pendiente (complejidad 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#a05f9631
Content hash
a05f9631
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 16bebc8c99d8 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método síncrono ResetFile de la clase ara::per::FileStorage restablece un archivo individual a su estado inicial preconfigurado [SWS_PER_00338]. Si el archivo especificado a través de fileName aún no existe en el almacenamiento, se crea de nuevo [SWS_PER_00338]. En ambos casos, el archivo pasa a tener el mismo contenido que tras una nueva instalación a partir de la Target Configuration actual [SWS_PER_00338]; su estado de modificación se gestiona en FileModificationState como kModifiedDuringReset [SWS_PER_00436].

La operación es segura para hilos y segura frente a excepciones, y devuelve de forma síncrona un ara::core::Result<void> [SWS_PER_00338]. Falla con PerErrc::kResourceBusy si el archivo está abierto en ese momento —por ejemplo a través de [SWS_PER_00113]— o si se produce simultáneamente una ejecución de [SWS_PER_00111] o [SWS_PER_00337] con el mismo nombre de archivo [SWS_PER_00338].

Asimismo, la interfaz define casos de error específicos [SWS_PER_00338]:

  • PerErrc::kInitValueNotAvailable: No se ha configurado ningún valor inicial ni en el Application Design ni en la Target Configuration [SWS_PER_00338].
  • PerErrc::kQuotaExceeded o PerErrc::kTooManyFiles: El archivo restaurado superaría el límite AllowedSize o maxNumberOfFiles [SWS_PER_00338].
  • PerErrc::kOutOfStorageSpace o StorageFailure: El espacio de almacenamiento físico no es suficiente o el acceso físico falla [SWS_PER_00338].
  • PerErrc::kEncryptionFailed o PerErrc::kAuthenticationFailed: Falla el cifrado o descifrado, o la comprobación MAC de los datos almacenados [SWS_PER_00338].

Esta nota de uso fue creada por una IA y se basa en la especificación AUTOSAR Adaptive R25-11.

Guía del implementador pendiente (complejidad 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#b0c92986
Content hash
b0c92986
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

función 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#2fa17aa1
Content hash
2fa17aa1
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

función 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#bc40b200
Content hash
bc40b200
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

función ~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#b482e0b8
Content hash
b482e0b8
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