Permite el almacenamiento persistente y la gestión de datos de aplicación mediante almacenamiento clave-valor y de archivos.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 9cb072b2740aProcedenciaPreguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
Permite el almacenamiento persistente y la gestión de datos de aplicación mediante almacenamiento clave-valor y de archivos.
El espacio de nombres ara::per proporciona interfaces para el almacenamiento persistente de datos al permitir que las aplicaciones adaptativas accedan a áreas de almacenamiento basadas en archivos y en pares clave-valor mediante identificadores de instancia ([SWS_PER_00052], [SWS_PER_00116]). Las aplicaciones gestionan almacenamientos abiertos mediante identificadores compartidos (handles), realizan actualizaciones coordinadas en caso de modificaciones del manifiesto y pueden reparar datos inconsistentes a través de mecanismos de recuperación ([SWS_PER_00333], [SWS_PER_00357]). Mientras que los accesos al almacenamiento se producen de forma concurrente a través de handles, los procedimientos administrativos como actualizaciones o reinicios de almacenamiento exigen la ausencia de accesos concurrentes ([SWS_PER_00311]).
Contexto
El espacio de nombres ara::per proporciona las interfaces del grupo funcional de persistencia para la AUTOSAR Adaptive Platform. Su responsabilidad principal es el almacenamiento duradero y persistente en memoria de datos de aplicación a través de reinicios del sistema y ciclos de vida de los procesos. El módulo distingue dos paradigmas de almacenamiento fundamentales: KeyValueStorage para pares clave-valor estructurados y FileStorage para acceso al almacenamiento basado en archivos. Las aplicaciones adaptativas acceden a estos recursos a través de prototipos de puerto configurados mediante ara::core::InstanceSpecifier ([SWS_PER_00052], [SWS_PER_00116]).
Interlocutores de interacción importantes del espacio de nombres son el Update and Configuration Management (UCM), que puede proporcionar configuraciones de destino (Target Configuration) actualizadas durante el tiempo de ejecución ([SWS_PER_00576], [SWS_PER_00577]), así como el medio de almacenamiento físico, en el que ara::per garantiza la consistencia, la redundancia y la seguridad de los datos ([SWS_PER_00311]).
El acceso a los objetos de almacenamiento se regula mediante abstracciones de handle. La apertura de un almacenamiento a través de OpenKeyValueStorage o OpenFileStorage genera un SharedHandle ([SWS_PER_00052], [SWS_PER_00116]). Dado que varios subprocesos pueden acceder de forma concurrente al mismo almacenamiento, el recurso físico no se cierra necesariamente cuando un único SharedHandle sale de su ámbito; el cierre se efectúa solo cuando se han destruido todas las instancias referenciadoras de SharedHandle ([SWS_PER_00052], [SWS_PER_00116]).
Para los archivos dentro de un FileStorage, se realiza un seguimiento detallado de los estados de creación y modificación. La enumeración FileCreationState refleja si un archivo se creó durante la instalación (kCreatedDuringInstallation), durante una actualización (kCreatedDuringUpdate), mediante un reinicio (kCreatedDuringReset), a consecuencia de una recuperación (kCreatedDuringRecovery) o por la propia aplicación (kCreatedByApplication) ([SWS_PER_00435]). Análogamente, FileModificationState refleja cuándo y mediante qué proceso se modificó un archivo por última vez ([SWS_PER_00436]).
Para gestionar estados iniciales, el espacio de nombres proporciona funciones de reinicio: ResetKeyValueStorage ([SWS_PER_00334]) y ResetAllFiles ([SWS_PER_00336]) restablecen almacenamientos individuales a los valores definidos inicialmente en el manifiesto. Por el contrario, la operación global ResetPersistency ([SWS_PER_00358]) vacía completamente todos los almacenamientos clave-valor y de archivos; su regeneración tiene lugar en la siguiente llamada a OpenFileStorage o OpenKeyValueStorage.
Un flujo de aplicación típico abarca la comprobación de actualizaciones de configuración, la aplicación de migraciones de datos y el posterior acceso al almacenamiento:
Antes o durante el funcionamiento regular, la aplicación comprueba mediante CheckForManifestUpdate si el UCM ha instalado una nueva configuración de destino ([SWS_PER_00576]). Si es el caso, se lee el nuevo manifiesto a través de ReloadPersistencyManifest ([SWS_PER_00577]). Durante la fase de verificación posterior, la aplicación inicia UpdatePersistency ([SWS_PER_00357]). Con el fin de controlar migraciones de datos específicas de la versión, la aplicación registra previamente mediante RegisterApplicationDataUpdateCallback una función de retrollamada que es informada sobre versiones de contrato más antiguas y ejecuta pasos de migración propios de la aplicación ([SWS_PER_00356]). Adicionalmente, las modificaciones de elementos se pueden supervisar mediante RegisterDataUpdateIndication ([SWS_PER_00578]). Tras concluir la actualización, CleanUpPersistency elimina copias de seguridad obsoletas y elementos heredados redundantes ([SWS_PER_00567]).
Para el acceso regular, la aplicación abre el recurso de destino a través de OpenKeyValueStorage ([SWS_PER_00052]) o OpenFileStorage ([SWS_PER_00116]). Los accesos a archivos en FileStorage se controlan mediante máscaras de bits de la enumeración OpenMode (p. ej., kAtTheBeginning, kAtTheEnd, kTruncate, kAppend), las cuales se combinan mediante los operadores operator| ([SWS_PER_00144]) y operator|= ([SWS_PER_00434]) ([SWS_PER_00147]). Los posicionamientos se realizan de forma relativa a Origin (kBeginning, kCurrent, kEnd) ([SWS_PER_00146]). El tamaño de almacenamiento ocupado actualmente puede determinarse en tiempo de ejecución a través de GetCurrentKeyValueStorageSize ([SWS_PER_00405]) y GetCurrentFileStorageSize ([SWS_PER_00406]).
Los errores en el espacio de nombres se señalizan de manera estandarizada a través de la enumeración PerErrc ([SWS_PER_00311]) en combinación con PerErrorDomain ([SWS_PER_00352]) y MakeErrorCode ([SWS_PER_00351]). La clase declarada PerException presumiblemente sirve como tipo de excepción C++ para entornos en los que los errores no se tratan a través de ara::core::Result, sino mediante excepciones (interpretación). Pregunta Q-263982a4a4dae284 (abierta)
Los escenarios de error centrales comprenden:
Errores de configuración y de direccionamiento: Si el InstanceSpecifier proporcionado no se corresponde con ninguna interfaz de puerto configurada en el modelo, la apertura con PerErrc::kStorageNotFound falla ([SWS_PER_00052], [SWS_PER_00116], [SWS_PER_00311]). Los accesos a archivos que no existen generan PerErrc::kFileNotFound ([SWS_PER_00311]).
Pérdida de integridad y recuperación: En caso de daños estructurales (PerErrc::kIntegrityCorrupted) o comprobaciones de redundancia fallidas (PerErrc::kValidationFailed), ara::per permite una recuperación de máximo esfuerzo a través de RecoverKeyValueStorage ([SWS_PER_00333]) o RecoverAllFiles ([SWS_PER_00335]). A través de RegisterRecoveryReportCallback ([SWS_PER_00433]), las aplicaciones relevantes para la seguridad pueden registrar de forma automatizada medidas correctoras a partir de RecoveryReportKind (p. ej., kKeyValueStorageRecovered, kFileRecovered) ([SWS_PER_00432]).
Límites de almacenamiento y errores físicos: Si se superan cuotas o capacidades físicas, se notifican PerErrc::kOutOfStorageSpace, PerErrc::kQuotaExceeded o PerErrc::kTooManyFiles ([SWS_PER_00311]). Los errores de hardware o del sistema de archivos resultan en PerErrc::kPhysicalStorageFailure ([SWS_PER_00311]).
Seguridad y modos de acceso: Si fallan verificaciones o cálculos criptográficos, el módulo devuelve PerErrc::kEncryptionFailed o PerErrc::kAuthenticationFailed ([SWS_PER_00311]). Los intentos de escritura en áreas de almacenamiento protegidas contra escritura se rechazan con PerErrc::kIllegalWriteAccess ([SWS_PER_00311]).
Esta guía se basa exclusivamente en la especificación de AUTOSAR Adaptive R25-11.
KI-gestützte Gruppierung auf Basis der Records und Spezifikationsauszüge; keine Gliederung aus der AUTOSAR-Spezifikation.
Diagrama de clases
Abgerundete Rahmen = Namespace- bzw. Klassen-Scopes; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = namespace-fremde bzw. externe Basisklassen. Klicken öffnet die jeweilige Klassen- bzw. cppreference-Seite.
Returns the space in bytes currently occupied by a File Storage. The returned size includes all metadata and the space used for redundancy and backups. The returned size is only guaranteed to be accurate if the File Storage is not opened and no other operation on the File Storage takes place at the same time.
Returns the space in bytes currently occupied by a Key-Value Storage. The returned size includes all metadata and the space used for redundancy and backups. The returned size is only guaranteed to be accurate if the Key-Value Storage is not opened and no other operation on the Key-Value Storage takes place at the same time.
Opens a File Storage. OpenFileStorage will fail with kResourceBusy when the File Storage is currently being modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles. Because multiple threads can access the same File Storage concurrently, the File Storage might not be closed when the SharedHandle returned by this function goes out of scope. It will only be closed when all SharedHandles that refer to the same File Storage went out of scope.
Opens a Key-Value Storage. OpenKeyValueStorage will fail with kResourceBusy when the Key-Value Storage is currently being modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage. Because multiple threads can access the same Key-Value Storage concurrently, the Key-Value Storage might not be closed when the SharedHandle returned by this function goes out of scope. It will only be closed when all SharedHandles that refer to the same Key-Value Storage went out of scope.
Defines the errors for Persistency. The enumeration values 0 - 255 are reserved for AUTOSAR assigned errors, the stack provider is free to define additional errors starting from 256.
Recovers a File Storage, including all files. RecoverAllFiles recovers a File Storage when the redundancy checks fail. It will fail with kResourceBusy when the File Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles. This method does a best-effort recovery of all files. After recovery, files might show outdated or initial content, or might be lost.
Recovers a Key-ValueStorage. RecoverKeyValueStorage allows to recover a Key-Value Storage when the redundancy checks fail. It will fail with kResourceBusy when the Key-Value Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage. This method does a best-effort recovery of all key-value pairs. After recovery, keys might show outdated or initial value, or might be lost.
Register a recovery reporting callback with Persistency. This callback can be used in safety-aware Adaptive Applications to detect actions of the Persistency that are related to the correctness of the persisted data and the reliability of the storage.
Checks for updates of the Persistency Target Configuration. This method can be used to detect configuration updates that are installed by UCM while the Adaptive Application that uses Persistency is running. To re-read the updated Target Configuration, the Adaptive Application needs to call ara::per:: ReloadPersistencyManifest.
Registers an application data update callback with Persistency. The provided callback function will be called by Persistency if an update of stored application data might be necessary. This decision is based on the contract versions. The contract version that last accessed Persistency is provided as an argument to the callback, as well as the ara::core::InstanceSpecifier referring to the updated Key- Value Storage or File Storage. Based on this information, the Adaptive Application can decide which updates are actually necessary, e.g. a migration from any older contract version could be supported, with different steps required for each of these. The provided function will be called from the context of ara::per::UpdatePersistency, ara::per::OpenKeyValueStorage, or ara::per::OpenFileStorage.
Registers a data update indication callback with Persistency. The provided callback function will be called by Persistency when an update of stored data happened. It will be called from the context of ara::per::UpdatePersistency, ara:: per::OpenKeyValueStorage, or ara::per::OpenFileStorage.
Re-reads the Target Configuration. This method can be used to prepare for updates of the Key-Value Storages and File Storages of Persistency after a new Target Configuration was installed by UCM while the Adaptive Application that uses Persistency is running. Storages are only updated after closing them, either when they are opened again or by an explicit call to ara:: per::UpdatePersistency.
Resets a File Storage, including all files. ResetAllFiles resets a File Storage to the initial state, containing only the files which were deployed from the Target Configuration, with their initial content. Afterwards, the File Storage will appear as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the File Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles.
Resets a Key-Value Storage to the initial state. ResetKeyValueStorage allows to reset a Key-Value Storage to the initial state, containing only key-value pairs which were deployed from the Target Configuration, with their initial values. Afterwards, the Key-Value Storage will appear as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the Key-Value Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage.
Resets all Key-Value Storages and File Storages by entirely removing their content. The Key-Value Storages and File Storages will be re-created when ara::per:: OpenFileStorage or ara::per::OpenKeyValueStorage is called next time.
Updates all Persistency Key-Value Storages and File Storages after a new Target Configuration was installed. This method can be used to update the persistent data of the Adaptive Application during verification phase.
Defines the errors for Persistency. The enumeration values 0 - 255 are reserved for AUTOSAR assigned errors, the stack provider is free to define additional errors starting from 256.
=1 The requested Key-Value Storage or File Storage is not configured in the AUTOSAR model.
kKeyNotFound
=2 The provided key cannot be not found in the Key-Value Storage.
kIllegalWriteAccess
=3 The operation could not be performed because the accessed Key-Value Storage or File Storage is configured as read-only or write-only-once.
kPhysicalStorageFailure
=4 An error occurred when accessing the physical storage, e.g. because of a corrupted file system or corrupted hardware, or because of insufficient access rights.
kIntegrityCorrupted
=5 The structural integrity of the Key-Value Storage or File Storage could not be established. This can happen when the internal structure of a Key-Value Storage or the metadata of a File Storage is corrupted.
kValidationFailed
=6 The validation of redundancy measures failed for a single key-value pair, for the whole Key-Value Storage, for a single file, or for the whole File Storage.
kEncryptionFailed
=7 The encryption or decryption failed for a single key-value pair, for the whole Key-Value Storage, for a single file, or for the whole File Storage.
kDataTypeMismatch
=8 The provided data type does not match the stored data type.
kInitValueNotAvailable
=9 The operation could not be performed because no initial value is available.
kResourceBusy
= 10 The operation could not be performed because the resource is currently busy.
kOutOfStorageSpace
= 12 The physical storage space was exceeded.
kFileNotFound
= 13 The requested file name cannot be not found in the File Storage.
kInvalidPosition
= 15 SetPosition tried to move to a position that is not reachable (i.e. which is smaller than zero or greater than the current size of the file).
kEof
= 16 The Persistency user tried to read from the end of the file or from an empty file.
kInvalidOpenMode
= 17 Opening a file failed because the requested combination of Open Modes is invalid.
kInvalidSize
= 18 SetFileSize tried to set a new size that is bigger than the current file size.
kTooManyFiles
= 19 The maximum number of files was exceeded.
kQuotaExceeded
= 20 The allocated storage quota was exceeded.
kAuthenticationFailed
= 21 Calculating or checking of the MAC failed for a single key-value pair, for the whole Key-Value Storage, for a single file, or for the whole File Storage.
Request a governed re-review of this record. The record is not changed immediately.
=1 A Key-Value Storage was corrupted, an insufficient number of valid copies existed. storage contains the short-name path of the Key-Value Storage, reportedElements is empty, reportedInstances contains the indices of the affected Key-Value Storage copies.
kKeyValueStorageRecovered
=2 A Key-Value Storage was corrupted, but a sufficient number of valid copies existed. storage contains the short-name path of the Key-Value Storage, reportedElements is empty, reportedInstances contains the indices of the affected Key-Value Storage copies.
kKeyRecoveryFailed
=3 A set of key-value pairs was corrupted, an insufficient number of valid copies existed. storage contains the short-name path of the Key-Value Storage, reportedElements contains the list of affected keys, reportedInstances contains the indices of the affected Key-Value Storage or key-value pair copies. In general, the nth key in reportedElements corresponds to the nth index in reported Instances, i.e. a key may be reported several times if several copies are broken. In case only one key-value pair is affected, reported Elements may be provided containing just this key.
kKeyRecovered
=4 A set of key-value pairs was corrupted, but a sufficient number of valid copies existed. storage contains the short-name path of the Key-Value Storage, reportedElements contains the list of affected keys, reportedInstances contains the indices of the affected Key-Value Storage or key-value pair copies. In general, the nth key in reportedElements corresponds to the nth index in reported Instances, i.e. a key may be reported several times if several copies are broken. In case only one key-value pair is affected, reported Elements may be provided containing just this key.
kFileStorageRecoveryFailed
=5 A File Storage was corrupted, an insufficient number of valid copies existed. storage contains the short-name path of the File Storage, reportedElements is empty, reportedInstances contains the indices of the affected File Storage copies.
kFileStorageRecovered
=6 A File Storage was corrupted, but a sufficient number of valid copies existed. storage contains the short-name path of the File Storage, reportedElements is empty, reportedInstances contains the indices of the affected File Storage copies.
kFileRecoveryFailed
=7 A set of files was corrupted, an insufficient number of valid copies existed. storage contains the short-name path of the File Storage, reportedElements contains the list of affected file names, reported Instances contains the indices of the affected File Storage or file copies. In general, the nth file name in reportedElements corresponds to the nth index in reportedInstances, i.e. a file name may be reported several times if several copies are broken. In case only one file is affected, reportedElements may be provided containing just this file name.
kFileRecovered
=8 A set of files was corrupted, but a sufficient number of valid copies existed. storage contains the short-name path of the File Storage, reportedElements contains the list of affected file names, reported Instances contains the indices of the affected File Storage or file copies. In general, the nth file name in reportedElements corresponds to the nth index in reportedInstances, i.e. a file name may be reported several times if several copies are broken. In case only one file is affected, reportedElements may be provided containing just this file name.
Request a governed re-review of this record. The record is not changed immediately.
Checks for updates of the Persistency Target Configuration. This method can be used to detect configuration updates that are installed by UCM while the Adaptive Application that uses Persistency is running. To re-read the updated Target Configuration, the Adaptive Application needs to call ara::per:: ReloadPersistencyManifest.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: b1f49db8b33dProcedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
usar
La función síncrona CheckForManifestUpdate de la cabecera ara/per/update.h comprueba en el espacio de nombres ara::per si existen actualizaciones de la Persistency Target Configuration [SWS_PER_00576]. Sirve para detectar modificaciones de configuración introducidas por el Update and Configuration Management (UCM) mientras la aplicación adaptativa que utiliza Persistency ya está en ejecución [SWS_PER_00576]. La función no acepta parámetros y devuelve un ara::core::Result<bool>: true si la configuración se ha actualizado desde la última lectura, o false si ha permanecido inalterada [SWS_PER_00576].
Tratamiento de errores y concurrencia
La función está declarada como noexcept y es segura frente a excepciones (exception safe), pero no segura para hilos (not thread-safe) [SWS_PER_00576]. En caso de error, el resultado contiene errores específicos del fabricante o bien uno de los siguientes códigos de error [SWS_PER_00576]:
kPhysicalStorageFailure: Se produce si el acceso a la memoria física falla durante la comprobación [SWS_PER_00576].
kIntegrityCorrupted: Se produce si los datos almacenados no pueden leerse debido a que su integridad estructural está dañada [SWS_PER_00576].
Interacción
Si se detecta una actualización (valor de retorno true), la aplicación debe llamar a continuación a ara::per::ReloadPersistencyManifest para volver a leer efectivamente la Target Configuration modificada [SWS_PER_00576].
Este texto ha sido generado por una IA y sirve como guía orientativa basada en la especificación.
A Result containing true if the Target Configuration was updated or false if it is unchanged since the last time the Target Configuration was read. In case of an error, it contains any of the errors defined below, or a vendor specific error.
Fehler
Fehlercode
Beschreibung
kPhysicalStorage-Failure
rollback_semantics Returned if access to the physical storage fails during the checking operation.
kIntegrityCor-rupted
rollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
Request a governed re-review of this record. The record is not changed immediately.
Removes backup data and other unused data of all Persistency Key-Value Storages and File Storages.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: ce1bea3039deProcedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
usar
La función sincrónica CleanUpPersistency de ara/per/update.h sirve para eliminar datos de respaldo (Backup Data) y otros datos no utilizados en todos los almacenamientos clave-valor y de archivos de una instancia [SWS_PER_00567]. No recibe parámetros y devuelve el resultado a través del tipo de retorno ara::core::Result<void>[SWS_PER_00567].
Concurrencia y restricciones
La función no es segura para subprocesos (not thread-safe) y requiere acceso exclusivo a todos los recursos de almacenamiento [SWS_PER_00567]. Si todavía está abierto un ara::per::SharedHandle de un almacenamiento clave-valor o de archivos, la llamada falla con kResourceBusy[SWS_PER_00567]. Del mismo modo, las operaciones en paralelo como UpdatePersistency, ResetPersistency, RecoverKeyValueStorage, ResetKeyValueStorage, RecoverAllFiles o ResetAllFiles conducen al código de error kResourceBusy[SWS_PER_00567].
Para los errores ocurridos se aplica una semántica de reversión referida al almacenamiento [SWS_PER_00567]. Entre los posibles errores se encuentran, además de kResourceBusy:
kPhysicalStorageFailure en caso de errores de acceso al medio de almacenamiento físico [SWS_PER_00567],
kIntegrityCorrupted en caso de corrupción estructural de los datos almacenados [SWS_PER_00567],
kValidationFailed en caso de fallo en la comprobación de la validez de los datos [SWS_PER_00567],
kEncryptionFailed en caso de errores durante el cifrado o descifrado [SWS_PER_00567],
kAuthenticationFailed en caso de fallo en el cálculo o la verificación del MAC [SWS_PER_00567],
así como códigos de error específicos del fabricante [SWS_PER_00567].
Este texto fue generado por una IA a partir de la especificación.
Returns the space in bytes currently occupied by a File Storage. The returned size includes all metadata and the space used for redundancy and backups. The returned size is only guaranteed to be accurate if the File Storage is not opened and no other operation on the File Storage takes place at the same time.
Returns the space in bytes currently occupied by a Key-Value Storage. The returned size includes all metadata and the space used for redundancy and backups. The returned size is only guaranteed to be accurate if the Key-Value Storage is not opened and no other operation on the Key-Value Storage takes place at the same time.
Opens a File Storage. OpenFileStorage will fail with kResourceBusy when the File Storage is currently being modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles. Because multiple threads can access the same File Storage concurrently, the File Storage might not be closed when the SharedHandle returned by this function goes out of scope. It will only be closed when all SharedHandles that refer to the same File Storage went out of scope.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 14078ca86bfbProcedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función síncrona ara::per::OpenFileStorage abre un almacenamiento de archivos para datos persistentes y lo pone a disposición a través de un handle de acceso compartido [SWS_PER_00116]. Como parámetro espera una referencia a un ara::core::InstanceSpecifier, el cual indica la ruta shortName de un prototipo de puerto tipado mediante un PersistencyFileStorageInterface. El valor de retorno es un ara::core::Result<ara::core::SharedHandle<FileStorage>>[SWS_PER_00116].
En cuanto a la concurrencia, la función está especificada como thread-safe y exception-safe [SWS_PER_00116]. Dado que múltiples hilos pueden acceder en paralelo a la misma instancia de almacenamiento de archivos, el almacenamiento físico no se cierra necesariamente cuando un único SharedHandle sale de su ámbito de validez. El cierre solo se produce cuando todos los handles que lo referencian han salido de ámbito (out-of-scope) [SWS_PER_00116].
En caso de error, el Result contiene códigos de error de la enumeración PerErrc o errores específicos del fabricante [SWS_PER_00116]:
PerErrc::kResourceBusy: Se devuelve si al mismo tiempo se ejecutan operaciones administrativas como CleanUpPersistency, ResetPersistency, RecoverAllFiles o ResetAllFiles. Mientras UpdatePersistency está activo, este error se produce si la llamada se realiza fuera del callback registrado mediante RegisterApplicationDataUpdateCallback o con un identificador divergente [SWS_PER_00116], [SWS_PER_00356].
Errores de configuración y de acceso: kStorageNotFound en caso de instancia no configurada, kPhysicalStorageFailure en caso de errores del almacenamiento físico, así como kIntegrityCorrupted, kValidationFailed, kEncryptionFailed y kAuthenticationFailed en caso de problemas de integridad, verificación o descifrado [SWS_PER_00116].
Límites de capacidad en actualizaciones implícitas: kOutOfStorageSpace, kTooManyFiles o kQuotaExceeded[SWS_PER_00116].
En interacción con el módulo, un restablecimiento previo mediante ResetPersistency provoca que los almacenamientos de archivos eliminados se vuelvan a crear en la siguiente llamada a OpenFileStorage[SWS_PER_00358]. Si durante la apertura se actualizan datos, un callback de indicación registrado mediante RegisterDataUpdateIndication se invoca directamente en el contexto de OpenFileStorage[SWS_PER_00578].
Este texto ha sido generado por una IA a partir de la especificación AUTOSAR Adaptive R25-11.
rollback_semantics Returned if CleanUpPersistency, or ResetPersistency is currently being executed, or if RecoverAllFiles or ResetAllFiles is currently being executed for the same File Storage. Also, while Update Persistency is currently being executed, this error is returned when OpenFileStorage is called outside of the callback registered via RegisterApplicationDataUpdateCallback, or if the used Instance Specifier differs from the one provided by the callback.
no_rollback_semantics Returned if the available physical storage space is insufficient for the files that are added/updated during an implicit update of the File Storage.
rollback_semantics Returned if the files that are added/updated during an implicit update of the File Storage would exceed the configured maximum AllowedSize.
Opens a Key-Value Storage. OpenKeyValueStorage will fail with kResourceBusy when the Key-Value Storage is currently being modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage. Because multiple threads can access the same Key-Value Storage concurrently, the Key-Value Storage might not be closed when the SharedHandle returned by this function goes out of scope. It will only be closed when all SharedHandles that refer to the same Key-Value Storage went out of scope.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: d24427922381Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
Uso y ciclo de vida
La función síncrona OpenKeyValueStorage abre un almacenamiento de clave-valor y está especificada como thread-safe así como noexcept[SWS_PER_00052]. Como parámetro kvs se pasa un ara::core::InstanceSpecifier que referencia la ruta de un PortPrototype tipado mediante un PersistencyKeyValueStorageInterface. El retorno se produce como ara::core::Result<SharedHandle<KeyValueStorage>>. Dado que varios hilos pueden abrir simultáneamente el mismo almacenamiento, Persistency no cierra el almacenamiento físico hasta que todas las instancias de SharedHandle que lo referencian hayan salido de su ámbito de validez [SWS_PER_00052].
Tratamiento de errores y concurrencia
En caso de error, el Result proporciona códigos de error específicos del dominio de errores de Persistency [SWS_PER_00052]:
PerErrc::kStorageNotFound: El identificador no coincide con ninguna interfaz configurada del ejecutable.
PerErrc::kResourceBusy: Se produce si se ejecutan de forma concurrente CleanUpPersistency, ResetPersistency[SWS_PER_00358], RecoverKeyValueStorage o ResetKeyValueStorage para este almacenamiento. Durante UpdatePersistency, la llamada solo está permitida dentro del callback registrado mediante RegisterApplicationDataUpdateCallback con el identificador de instancia allí pasado [SWS_PER_00356].
PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed y PerErrc::kAuthenticationFailed en caso de defectos, errores de validación o criptográficos.
PerErrc::kOutOfStorageSpace y PerErrc::kQuotaExceeded en caso de espacio de almacenamiento insuficiente o exceso de cuota durante una actualización implícita.
Interacción
Si todos los datos se eliminaron previamente mediante ResetPersistency, el almacenamiento se vuelve a crear automáticamente en la siguiente llamada a OpenKeyValueStorage[SWS_PER_00358]. Tras la apertura, las modificaciones no guardadas pueden restablecerse al estado de la apertura mediante DiscardPendingChanges[SWS_PER_00365]. Además, la apertura puede desencadenar la ejecución de callbacks que se registraron mediante RegisterDataUpdateIndication[SWS_PER_00578].
Esta nota de uso ha sido generada automáticamente sobre la base de los requisitos de la especificación.
A Result containing a SharedHandle for the KeyValueStorage. In case of an error, it contains any of the errors defined below, or a vendor specific error.
Fehler
Fehlercode
Beschreibung
Found
Returned if the passed InstanceSpecifier does not match any PersistencyKeyValueStorageInterface configured for this Executable.
rollback_semantics Returned if CleanUpPersistency, or ResetPersistency is currently being executed, or if RecoverKeyValueStorage or ResetKeyValue Storage is currently being executed for the same Key-Value Storage. Also, while UpdatePersistency is currently being executed, this error is returned when OpenKeyValueStorage is called outside of the callback registered via RegisterApplicationDataUpdate Callback, or if the used InstanceSpecifier differs from the one provided by the callback.
no_rollback_semantics Returned if the available physical storage space is insufficient for the values that are added/updated during an implicit update of the Key-Value Storage.
rollback_semantics Returned if the values that are added/updated during an implicit update of the Key-Value Storage would exceed the configured maximumAllowedSize.
Recovers a File Storage, including all files. RecoverAllFiles recovers a File Storage when the redundancy checks fail. It will fail with kResourceBusy when the File Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles. This method does a best-effort recovery of all files. After recovery, files might show outdated or initial content, or might be lost.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: ca84cc440ba3Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función RecoverAllFiles lleva a cabo una restauración de un almacenamiento basado en archivos (File Storage), incluidos todos los archivos almacenados en él, cuando fallan las comprobaciones de redundancia [SWS_PER_00335]. La invocación se realiza de forma síncrona especificando el InstanceSpecifier para el prototipo de puerto configurado y devuelve un ara::core::Result<void>[SWS_PER_00335].
La restauración funciona según el principio de mejor esfuerzo (best effort): tras completarse, los archivos pueden presentar contenidos obsoletos, estar restablecidos a su estado inicial o perderse por completo [SWS_PER_00335]. Si falla el acceso al medio de almacenamiento (PerErrc::kPhysicalStorageFailure) o si el espacio de almacenamiento es insuficiente (PerErrc::kOutOfStorageSpace), no existe garantía de reversión (rollback) [SWS_PER_00335]. Si se produce un error en el cifrado (PerErrc::kEncryptionFailed), en la comprobación de integridad (PerErrc::kAuthenticationFailed) o en la limitación del tamaño de almacenamiento (PerErrc::kQuotaExceeded), se aplica la semántica de reversión [SWS_PER_00335]. Si el identificador no coincide con ninguna interfaz configurada, esto resulta en PerErrc::kStorageNotFound[SWS_PER_00335].
Aunque la función es segura para subprocesos, la ejecución falla con PerErrc::kResourceBusy mientras el almacenamiento esté abierto o exista un identificador compartido activo [SWS_PER_00335], [SWS_PER_00116]. Del mismo modo, las ejecuciones paralelas de ResetAllFiles[SWS_PER_00336] para el mismo almacenamiento, así como las operaciones de actualización global UpdatePersistency[SWS_PER_00357], ResetPersistency[SWS_PER_00358] y CleanUpPersistency[SWS_PER_00567], bloquean la llamada [SWS_PER_00335].
Esta nota de uso fue elaborada por una IA sobre la base de las especificaciones.
rollback_semantics Returned if UpdatePersistency, CleanUpPersistency, or Reset Persistency is currently being executed, or if ResetAllFiles is currently being executed for the same File Storage, or a Shared Handle of the same File Storage is currently in use.
Recovers a Key-ValueStorage. RecoverKeyValueStorage allows to recover a Key-Value Storage when the redundancy checks fail. It will fail with kResourceBusy when the Key-Value Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage. This method does a best-effort recovery of all key-value pairs. After recovery, keys might show outdated or initial value, or might be lost.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: ba269bfce693Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función síncrona RecoverKeyValueStorage en el espacio de nombres ara::per sirve para restaurar un almacenamiento de clave-valor tras fallos en las comprobaciones de redundancia ([SWS_PER_00333]). Como parámetro kvs se pasa un ara::core::InstanceSpecifier que referencia la ruta ShortName de un PortPrototype correspondiente ([SWS_PER_00333]). La restauración se lleva a cabo según el principio del mejor esfuerzo (best-effort); tras el proceso, las claves pueden presentar valores obsoletos o iniciales, o haberse perdido por completo ([SWS_PER_00333]).
Aunque la función está especificada como segura frente a hilos, la ejecución falla con el código de error PerErrc::kResourceBusy si el almacenamiento de clave-valor en cuestión está abierto —es decir, si existe al menos un SharedHandle activo ([SWS_PER_00052], [SWS_PER_00333])—. El mismo error se produce si otros hilos llaman simultáneamente a funciones modificadoras: UpdatePersistency ([SWS_PER_00357]), CleanUpPersistency ([SWS_PER_00567]), ResetPersistency ([SWS_PER_00358]) o ResetKeyValueStorage ([SWS_PER_00334]). Durante la restauración, una llamada a OpenKeyValueStorage con kResourceBusy también falla ([SWS_PER_00052]).
El resultado se devuelve de forma síncrona como ara::core::Result<void>. Además de PerErrc::kResourceBusy, se definen los siguientes errores específicos ([SWS_PER_00333]):
PerErrc::kStorageNotFound: el identificador pasado no coincide con ninguna interfaz configurada.
PerErrc::kPhysicalStorageFailure: el acceso al almacenamiento físico falla (sin semántica de reversión).
PerErrc::kOutOfStorageSpace: espacio de almacenamiento físico insuficiente para los datos restaurados (sin semántica de reversión).
PerErrc::kQuotaExceeded: superación de la longitud máxima configurada (maximumAllowedSize).
PerErrc::kEncryptionFailed y PerErrc::kAuthenticationFailed: error en el cifrado o en el cálculo de MAC.
Este texto fue elaborado por una IA a partir de la especificación de AUTOSAR.
rollback_semantics Returned if UpdatePersistency, CleanUpPersistency, or Reset Persistency is currently being executed, or if ResetKeyValue Storage is currently being executed for the same Key-Value Storage, or a SharedHandle of the same Key-Value Storage is currently in use.
Registers an application data update callback with Persistency. The provided callback function will be called by Persistency if an update of stored application data might be necessary. This decision is based on the contract versions. The contract version that last accessed Persistency is provided as an argument to the callback, as well as the ara::core::InstanceSpecifier referring to the updated Key- Value Storage or File Storage. Based on this information, the Adaptive Application can decide which updates are actually necessary, e.g. a migration from any older contract version could be supported, with different steps required for each of these. The provided function will be called from the context of ara::per::UpdatePersistency, ara::per::OpenKeyValueStorage, or ara::per::OpenFileStorage.
The callback function to be called by Persistency after an update of persistent data took place. The function will be called with the shortName path of an updated Key-Value Storage or File Storage, and with the contract version with which the Persistency was last accessed.
Rückgabewert
Typ
Beschreibung
None
Request a governed re-review of this record. The record is not changed immediately.
Registers a data update indication callback with Persistency. The provided callback function will be called by Persistency when an update of stored data happened. It will be called from the context of ara::per::UpdatePersistency, ara:: per::OpenKeyValueStorage, or ara::per::OpenFileStorage.
The callback function to be called by Persistency after an update of persistent data took place. The function will be called with the shortName path of an updated Key-Value Storage or File Storage, and with the the updated elements of the storage.
monitoredStorage
A Key-Value Storage or File Storage for which updates shall be reported.
monitoredElements
A set of elements for which updates shall be reported.
Rückgabewert
Typ
Beschreibung
None
Request a governed re-review of this record. The record is not changed immediately.
Register a recovery reporting callback with Persistency. This callback can be used in safety-aware Adaptive Applications to detect actions of the Persistency that are related to the correctness of the persisted data and the reliability of the storage.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 5828fc3d3f00ProcedenciaPreguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función RegisterRecoveryReportCallback en el espacio de nombres ara::per ([SWS_PER_00433]) sirve para registrar una rutina de retrollamada en el componente Persistency. Se utiliza en Adaptive Applications relacionadas con la seguridad para detectar medidas correctivas de Persistency relativas a la corrección de datos persistidos, así como a la fiabilidad del almacenamiento [SWS_PER_00433].
Parámetros y semántica de invocación
Como parámetro se pasa recoveryReportCallback, una std::function que es llamada por Persistency cuando se corrigen con éxito errores en los datos almacenados haciendo uso de la redundancia disponible [SWS_PER_00433]. A la retrollamada se le transmiten las siguientes informaciones de contexto [SWS_PER_00433]:
storage: La ruta (shortName) del Key-Value Storage o File Storage afectado como ara::core::InstanceSpecifier.
recoveryReportKind: El tipo de informe de recuperación (ara::per::RecoveryReportKind).
reportedElements: Un vector de identificadores de los elementos afectados (ara::core::Vector<ara::core::String>).
reportedInstances: Un vector de las instancias afectadas (ara::core::Vector<std::uint8_t>).
Tratamiento de errores y concurrencia
La función no devuelve ningún valor y está declarada como noexcept; se considera segura frente a excepciones (exception safe) [SWS_PER_00433]. No existen códigos de error propios [SWS_PER_00433]. En cuanto a la seguridad para subprocesos, la interfaz está clasificada como not thread-safe[SWS_PER_00433]. Por tanto, es probable que la llamada se realice típicamente en la fase de inicialización de la aplicación antes de iniciar accesos concurrentes al almacenamiento. Pregunta Q-e5b93ea58fb56a1c (abierta)
Esta nota de uso ha sido elaborada por una IA y se basa en las especificaciones de la plataforma AUTOSAR.
The callback function to be called by Persistency to report errors in the stored data that were corrected using the available redundancy. The function will be called with the shortName path of the affected Key-Value Storage or File Storage in storage and information on what has been corrected, placed in the parameters recoveryReport Kind, reportedElements, and reportedInstances.
Rückgabewert
Typ
Beschreibung
None
Request a governed re-review of this record. The record is not changed immediately.
Re-reads the Target Configuration. This method can be used to prepare for updates of the Key-Value Storages and File Storages of Persistency after a new Target Configuration was installed by UCM while the Adaptive Application that uses Persistency is running. Storages are only updated after closing them, either when they are opened again or by an explicit call to ara:: per::UpdatePersistency.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 19920ccb9cf9ProcedenciaPreguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función síncrona ReloadPersistencyManifest del espacio de nombres ara::per (declarada en #include "ara/per/update.h") vuelve a leer la configuración de destino (Target Configuration) de la persistencia [SWS_PER_00577]. Sirve para preparar actualizaciones de los Key-Value Storages y File Storages después de que el Update and Config Management (UCM) haya instalado una nueva configuración de destino durante el tiempo de ejecución de la Adaptive Application [SWS_PER_00577].
Normalmente, la aplicación comprueba previamente con CheckForManifestUpdate[SWS_PER_00576] si existe una actualización de configuración y, a continuación, llama a ReloadPersistencyManifest[SWS_PER_00576]. Sin embargo, la relectura aún no actualiza de inmediato los almacenamientos persistentes: los Storages solo se actualizan tras su cierre, ya sea al volver a abrirlos o mediante una llamada explícita a ara::per::UpdatePersistency[SWS_PER_00577]. Interpretación: Es de suponer que las áreas de almacenamiento ya abiertas no se cierren automáticamente mediante la llamada, por lo que la aplicación debe cerrarlas por sí misma o actualizarlas explícitamente. Pregunta Q-16f9dae418feb3fa (abierta)
La función no toma parámetros y devuelve un ara::core::Result<void>[SWS_PER_00577]. En caso de error, el resultado contiene errores específicos del fabricante o uno de los siguientes códigos de error con semántica de reversión (rollback) [SWS_PER_00577]:
kPhysicalStorageFailure: Se produce si falla el acceso al almacenamiento físico durante la operación de lectura [SWS_PER_00577].
kIntegrityCorrupted: Se produce si los datos almacenados no se pueden leer debido a una integridad estructural dañada [SWS_PER_00577].
En cuanto a la concurrencia, la función está especificada como no segura para subprocesos (not thread-safe), pero declarada como segura frente a excepciones (exception safe) y noexcept[SWS_PER_00577]. Por lo tanto, las llamadas paralelas deben sincronizarse del lado de la aplicación.
Esta nota de uso ha sido elaborada por una IA sobre la base de la especificación.
Resets a File Storage, including all files. ResetAllFiles resets a File Storage to the initial state, containing only the files which were deployed from the Target Configuration, with their initial content. Afterwards, the File Storage will appear as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the File Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: f645139d391cProcedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función ResetAllFiles restablece un File Storage de forma síncrona a su estado de entrega inicial conforme a la Target Configuration actual [SWS_PER_00336]. Tras una ejecución correcta, el almacenamiento contiene exclusivamente los archivos allí definidos con sus contenidos originales, como si hubiera sido instalado de nuevo [SWS_PER_00336].
Uso y concurrencia: a través del parámetro fs se pasa el identificador de instancia de un PortPrototype tipificado mediante PersistencyFileStorageInterface[SWS_PER_00336]. Aunque la función está especificada como thread-safe y exception safe, presupone un acceso exclusivo al almacenamiento: si el almacenamiento está actualmente abierto (por ejemplo, a través de un SharedHandle activo procedente de OpenFileStorage[SWS_PER_00116]) o se modifica de forma paralela mediante UpdatePersistency[SWS_PER_00357], CleanUpPersistency[SWS_PER_00567], ResetPersistency[SWS_PER_00358], RecoverAllFiles[SWS_PER_00335] o una llamada adicional a ResetAllFiles, la ejecución falla [SWS_PER_00336].
Tratamiento de errores: la función devuelve un ara::core::Result<void>[SWS_PER_00336]. Los posibles códigos de error de PerErrc son:
kResourceBusy: el almacenamiento de archivos está abierto o se está modificando en paralelo (semántica de reversión) [SWS_PER_00336].
kStorageNotFound: el identificador no coincide con ninguna interfaz configurada para el ejecutable [SWS_PER_00336].
kPhysicalStorageFailure o kOutOfStorageSpace: error físico de almacenamiento o espacio de almacenamiento insuficiente (sin semántica de reversión) [SWS_PER_00336].
kEncryptionFailed o kAuthenticationFailed: error durante el cifrado o el cálculo del MAC (semántica de reversión) [SWS_PER_00336].
Interacción: tras el restablecimiento, los archivos recuperados poseen en las consultas de estado el estado FileCreationState::kCreatedDuringReset[SWS_PER_00435] así como FileModificationState::kModifiedDuringReset[SWS_PER_00436].
Esta nota de uso fue generada por una IA a partir de la especificación AUTOSAR R25-11.
rollback_semantics Returned if UpdatePersistency, CleanUpPersistency, or Reset Persistency is currently being executed, or if RecoverAllFiles is currently being executed for the same File Storage, or a Shared Handle of the same File Storage is currently in use.
Resets a Key-Value Storage to the initial state. ResetKeyValueStorage allows to reset a Key-Value Storage to the initial state, containing only key-value pairs which were deployed from the Target Configuration, with their initial values. Afterwards, the Key-Value Storage will appear as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the Key-Value Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 48697319880fProcedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función síncrona ResetKeyValueStorage restablece un Key-Value Storage específico a su estado inicial [SWS_PER_00334]. Tras una ejecución correcta, el almacenamiento contiene exclusivamente aquellos pares clave-valor con sus valores iniciales que se proporcionaron a través de la Target Configuration; a partir de ese momento, el almacenamiento se comporta como si se hubiera instalado de nuevo a partir de la configuración actual [SWS_PER_00334]. Como parámetro se pasa la ruta de kvs como ara::core::InstanceSpecifier, la cual referencia el PortPrototype de una PersistencyKeyValueStorageInterface configurada [SWS_PER_00334].
La función está especificada como thread-safe y exception safe, pero está sujeta a estrictas condiciones de concurrencia relativas a almacenamientos abiertos y operaciones globales de persistencia [SWS_PER_00334]:
La llamada falla con PerErrc::kResourceBusy si el Key-Value Storage en cuestión está abierto actualmente (es decir, si todavía existe un SharedHandle, véase [SWS_PER_00052]) o si se ejecuta simultáneamente una restauración mediante RecoverKeyValueStorage[SWS_PER_00333] en el mismo almacenamiento [SWS_PER_00334].
Asimismo, conducen a kResourceBusy la ejecución paralela de las operaciones globales UpdatePersistency[SWS_PER_00357], CleanUpPersistency[SWS_PER_00567], ResetPersistency[SWS_PER_00358] o una llamada concurrente a ResetKeyValueStorage en otro hilo [SWS_PER_00334].
Como resultado, la función devuelve un ara::core::Result<void>[SWS_PER_00334]. En caso de error, además de kResourceBusy, se producen los siguientes códigos de error específicos: PerErrc::kStorageNotFound (InstanceSpecifier no válido), PerErrc::kPhysicalStorageFailure (error de acceso al medio de almacenamiento, sin semántica de reversión), PerErrc::kOutOfStorageSpace (espacio de almacenamiento insuficiente para valores iniciales, sin semántica de reversión), PerErrc::kEncryptionFailed (error de cifrado), así como PerErrc::kAuthenticationFailed (error en el cálculo de MAC) [SWS_PER_00334].
Esta nota de uso fue generada por una IA a partir de la especificación AUTOSAR R25-11.
rollback_semantics Returned if UpdatePersistency, CleanUpPersistency, or Reset Persistency is currently being executed, or if RecoverKeyValue Storage is currently being executed for the same Key-Value Storage, or a SharedHandle of the same Key-Value Storage is currently in use.
Resets all Key-Value Storages and File Storages by entirely removing their content. The Key-Value Storages and File Storages will be re-created when ara::per:: OpenFileStorage or ara::per::OpenKeyValueStorage is called next time.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: d1720067a24eProcedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
usar
La función síncrona ResetPersistency ([SWS_PER_00358]) de la cabecera ara/per/update.h sirve para el restablecimiento completo de todos los Key-Value Storages y File Storages de una aplicación. Al invocarla, se borran sin excepción todos los contenidos persistentes. Los almacenamientos en sí no se crean de nuevo de forma inmediata, sino únicamente al producirse la siguiente llamada a ara::per::OpenKeyValueStorage ([SWS_PER_00052]) o ara::per::OpenFileStorage ([SWS_PER_00116]). Los archivos que se proporcionan de nuevo tras el restablecimiento reciben el estado de creación FileCreationState::kCreatedDuringInstallation ([SWS_PER_00435]).
Manejo de errores
Como valor de retorno, la función proporciona un ara::core::Result<void> ([SWS_PER_00358]). Si el acceso al soporte de almacenamiento físico falla durante la operación, la función devuelve kPhysicalStorageFailure sin semántica de reversión (rollback). En caso de que haya recursos persistentes ocupados o se estén modificando en paralelo, la llamada se cancela con kResourceBusy y semántica activa de reversión ([SWS_PER_00358]). Además, pueden producirse errores específicos del fabricante.
Concurrencia y restricciones
La interfaz está declarada como exception safe, pero clasificada explícitamente como not thread-safe ([SWS_PER_00358]). Falla con kResourceBusy tan pronto como:
ya se estén ejecutando operaciones globales como UpdatePersistency ([SWS_PER_00357]) o CleanUpPersistency ([SWS_PER_00567]),
un almacenamiento individual se esté procesando en paralelo a través de RecoverKeyValueStorage, ResetKeyValueStorage, RecoverAllFiles ([SWS_PER_00335]) o ResetAllFiles ([SWS_PER_00336]),
o aún exista al menos un SharedHandle activo de un Key-Value Storage o File Storage ([SWS_PER_00358]).
Mientras ResetPersistency esté en ejecución, los intentos simultáneos de apertura mediante OpenKeyValueStorage ([SWS_PER_00052]) o OpenFileStorage ([SWS_PER_00116]) en otros hilos darán lugar igualmente a kResourceBusy.
Este texto ha sido elaborado por una IA. Las especificaciones de AUTOSAR son determinantes.
Updates all Persistency Key-Value Storages and File Storages after a new Target Configuration was installed. This method can be used to update the persistent data of the Adaptive Application during verification phase.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: a05074f12eedProcedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
usar
La función síncrona ara::per::UpdatePersistency ([SWS_PER_00357], encabezado ara/per/update.h) actualiza todos los Key-Value Storages y File Storages de una aplicación tras la instalación de una nueva configuración de destino. Sirve para actualizar los datos persistentes de una Adaptive Application durante la fase de verificación [SWS_PER_00357]. La función no toma parámetros de entrada y devuelve un ara::core::Result<void>[SWS_PER_00357].
Manejo de errores
En caso de error, el Result devuelto contiene un código de error específico o un error específico del fabricante [SWS_PER_00357]. Al respecto, se distingue entre operaciones con y sin semántica de rollback:
Semántica de rollback: En caso de kIntegrityCorrupted, kValidationFailed, kEncryptionFailed, kAuthenticationFailed, kTooManyFiles (superación de maxNumberOfFiles), kQuotaExceeded (superación de MaximumAllowedSize) así como kResourceBusy, se revierten los cambios realizados [SWS_PER_00357].
Sin semántica de rollback: En caso de errores de almacenamiento físico (kPhysicalStorageFailure) así como espacio de almacenamiento físico insuficiente (kOutOfStorageSpace), no se garantiza el rollback [SWS_PER_00357].
Concurrencia y restricciones
La función está especificada como segura ante excepciones (exception safe), pero expresamente como no segura para subprocesos (not thread-safe) [SWS_PER_00357]. Una llamada falla con kResourceBusy en cuanto un SharedHandle de un Key-Value Storage o File Storage sigue en uso o se ejecutan en paralelo funciones de mantenimiento como CleanUpPersistency[SWS_PER_00567], ResetPersistency[SWS_PER_00358], RecoverKeyValueStorage[SWS_PER_00333], ResetKeyValueStorage[SWS_PER_00334], RecoverAllFiles[SWS_PER_00335] o ResetAllFiles[SWS_PER_00336][SWS_PER_00357]. A la inversa, las llamadas simultáneas a OpenKeyValueStorage[SWS_PER_00052] y OpenFileStorage[SWS_PER_00116] desde otros hilos durante la actualización también fallan con kResourceBusy.
Interacción
Si UCM instaló una nueva configuración de destino durante el funcionamiento y esta se leyó de nuevo a través de ReloadPersistencyManifest[SWS_PER_00577], los almacenamientos cerrados se actualizan mediante UpdatePersistency. Si previamente se registraron callbacks a través de RegisterDataUpdateIndication[SWS_PER_00578] o RegisterApplicationDataUpdateCallback[SWS_PER_00356], su invocación se realiza de forma síncrona en el contexto de UpdatePersistency[SWS_PER_00578].
Esta nota de uso fue generada automáticamente sobre la base de la especificación AUTOSAR R25-11.
no_rollback_semantics Returned if the available physical storage space is insufficient for the update.
kTooManyFiles
rollback_semantics Returned if the files added during the update of any File Storage would exceed the configured PersistencyFileStorageInterface.maxNumberOfFiles.
kQuotaExceeded
rollback_semantics Returned if the update would exceed the configured PersistencyCommon.MaximumAllowedSize of any Key- Value Storage or File Storage.
kAuthentication-Failed
rollback_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.
gemini-3.8-flash-low· 2026-10-13 · Original en alemán