모듈 ara::per — Persistency
모듈 가이드AI 생성
구조화된 키-값 쌍과 파일을 영속적이고 트랜잭션 안전하며 하드웨어 추상화된 방식으로 보호합니다.
구조화된 키-값 쌍과 파일을 영속적이고 트랜잭션 안전하며 하드웨어 추상화된 방식으로 보호합니다.
Adaptive 모듈 Persistency(ara::per)는 구조화된 키-값 스토리지(KeyValueStorage)와 파일 기반 접근(FileStorage)을 모두 포함하는 비휘발성 데이터 관리를 위한 하드웨어 독립적 추상화 계층을 제공합니다(EXP_SWArchitecture 43쪽). 키-값 쌍의 수정 사항은 인메모리 버퍼링의 대상이 되며, 영구적으로 저장되기 위해서는 명시적인 동기화 호출(SyncToStorage)이 필요합니다([SWS_PER_00049]). 데이터 무결성 및 복구 메커니즘 외에도, 모듈은 소프트웨어 업데이트 시 업데이트 및 마이그레이션 프로세스를 제어합니다([SWS_PER_00357]).
기능 클러스터 Persistency(ara::per)는 AUTOSAR Adaptive Platform을 위한 비휘발성 데이터 관리의 표준화된 추상화 계층을 제공합니다(EXP_SWArchitecture 43쪽). 이는 두 가지 기본 접근 모델을 제공합니다: 구조화된 매개변수를 위한 키 기반 스토리지 KeyValueStorage 및 비구조화된 페이로드 데이터 스트림을 위한 파일 기반 스토리지 FileStorage입니다(SWS_Persistency 219쪽). Adaptive Applications뿐만 아니라 State Management, Diagnostic Management 또는 Update and Configuration Management와 같은 중앙 플랫폼 데몬도 이러한 인터페이스를 사용하여 물리적 파일 시스템이나 플래시 드라이버에 독립적으로 상태를 영속적으로 저장합니다(EXP_SWArchitecture 93쪽).
컨텍스트 다이어그램: 애플리케이션 및 플랫폼 컨슈머와 하위 운영체제를 포함하는 Adaptive Platform 내 클러스터 Persistency의 임베딩. 출처: EXP_SWArchitecture 93쪽, EXP_SWArchitecture 43쪽.
KeyValueStorage에서의 쓰기 작업은 엄격한 인메모리 트랜잭션 시맨틱을 따릅니다([SWS_PER_00046]). 키-값 쌍의 수정 사항은 우선 휘발성 버퍼에 유지되며 동기 호출 SyncToStorage을(를) 거쳐야 저장 매체에 영구적으로 기록되는([SWS_PER_00049]) 반면, DiscardPendingChanges은(는) 저장되지 않은 상태를 폐기합니다([SWS_PER_00365]). FileStorage에서는 UniqueHandle을(를) 통해서만 독점적으로 관리되는 특수화된 형식화된 접근자(ReadAccessor, WriteAccessor, ReadWriteAccessor)를 통해 접근이 이루어집니다([SWS_PER_00113], [SWS_PER_00114], [SWS_PER_00115]).
시퀀스 다이어그램: 인메모리 버퍼링 및 물리적 플러시가 포함된 키-값 스토리지의 쓰기 및 동기화 시퀀스. 출처: [SWS_PER_00046], [SWS_PER_00049], [SWS_PER_00365], EXP_SWArchitecture 230쪽.
또한 이 모듈은 수명 주기 및 결함 허용을 위한 포괄적인 메커니즘을 통합합니다: 런타임 중 구성 변경은 CheckForManifestUpdate 및 ReloadPersistencyManifest을(를) 통해 처리되고([SWS_PER_00576], [SWS_PER_00577]), 애플리케이션별 데이터 마이그레이션은 업데이트 콜백을 통해 수행됩니다([SWS_PER_00356], [SWS_PER_00357]). 매니페스트 기반 중복성 또는 무결성 검사가 실패하면 콜백이 손상 상태를 알리고([SWS_PER_00433]), 이후 손상된 데이터는 RecoverKeyValueStorage, RecoverFile 또는 리셋 작업을 통해 복구될 수 있습니다([SWS_PER_00333], [SWS_PER_00337], [SWS_PER_00334]).
ara::per의 시스템 경계 및 아키텍처 통합
기능 클러스터 Persistency(ara::per)는 AUTOSAR Adaptive Platform의 비휘발성 데이터 관리를 위한 표준화된 추상화 메커니즘을 제공합니다(EXP_SWArchitecture 43쪽). 이는 사용자 정의 애플리케이션 및 기능 플랫폼 서비스 모두를 운영체제별 파일 시스템, 파티션 구조 및 플래시 또는 NVRAM 드라이버로부터 분리합니다(EXP_SWArchitecture 93쪽). 제공되는 기능은 두 가지 독립된 기본 스토리지 패러다임으로 구성됩니다: KeyValueStorage을(를) 통한 키 기반 데이터 접근과 FileStorage을(를) 통한 계층적 파일 저장입니다(SWS_Persistency 219쪽). Diagnostic Management(EXP_SWArchitecture 176쪽), State Management(EXP_SWArchitecture 55쪽), Update and Configuration Management(SWS_UpdateAndConfigurationManagement 18쪽) 및 Remote Persistency(SWS_RemotePersistency 9쪽)와 같은 플랫폼 서비스는 이러한 인터페이스를 표준화된 포트 인터페이스로 사용합니다([SWS_PER_00052], [SWS_PER_00116]).
로컬 스토리지 추상화를 제공하는 것 외에도 ara::per은(는) 호스트 운영체제와의 인터페이스에서 암호화 프리미티브와 중복성 검사를 직접 통합합니다(EXP_SWArchitecture 230쪽). 영속 스토리지의 기능 구성은 AUTOSAR 매니페스트에서 선언적으로 모델링되며, 쿼터 사양, 무결성 해시, CRC 절차 및 암호화 경로를 구체적인 인스턴스에 바인딩합니다(SWS_Persistency 104쪽). 다른 기능 클러스터의 라이브러리 구성요소는 자체 대상 구성을 통해 Persistency를 직접 바인딩하는 반면, 데몬 프로세스는 일반 애플리케이션과 유사하게 인스턴스 지정자를 통해 스토리지 단위에 접근합니다(SWS_Persistency 35쪽).
컨텍스트 다이어그램: 애플리케이션 및 플랫폼 컨슈머와 하위 운영체제를 포함하는 Adaptive Platform 내 클러스터 Persistency의 임베딩. 출처: EXP_SWArchitecture 93쪽, EXP_SWArchitecture 43쪽.
키-값 스토리지: 인스턴스화, 트랜잭션 시맨틱 및 플러시 메커니즘
구조화된 매개변수에 대한 접근은 ara::core::InstanceSpecifier을(를) 지정하여 호출 ara::per::OpenKeyValueStorage을(를) 통해 열리는 클래스 ara::per::KeyValueStorage을(를) 통해 수행됩니다([SWS_PER_00052]). 반환된 SharedHandle<KeyValueStorage>은(는) 스토리지 영역을 타입 안전하게 캡슐화하며, 기본 컨테이너의 삭제된 이동 및 복사 생성자를 통해 제어되지 않은 복제를 방지합니다([SWS_PER_00322], [SWS_PER_00324], [SWS_PER_00367]). SetValue([SWS_PER_00046]) 및 GetValue([SWS_PER_00044], [SWS_PER_00332])을(를) 통해 키-값 쌍을 수정하거나 조회하며, 이때 KeyExists([SWS_PER_00043])은(는) 존재 여부 검사를 제공하고 GetAllKeys([SWS_PER_00042])은(는) 모든 활성 키의 전체 목록을 제공합니다.
쓰기 및 삭제 작업은 엄격한 인메모리 트랜잭션 시맨틱을 따릅니다: SetValue, RemoveKey([SWS_PER_00047]) 또는 RemoveAllKeys([SWS_PER_00048])에 의한 변경 사항은 프로세스의 휘발성 버퍼에 우선 유지됩니다(EXP_SWArchitecture 230쪽). SyncToStorage의 명시적 호출만이 보류 중인 모든 수정 사항을 원자적이고 영구적으로 물리적 저장 매체에 기록합니다([SWS_PER_00049]). 아직 기록되지 않은 트랜잭션 단계를 취소해야 하는 경우, DiscardPendingChanges은(는) 상태를 마지막 SyncToStorage 또는 오픈 시점의 상태로 되돌립니다([SWS_PER_00365]). 스토리지 요구량은 GetCurrentValueSize([SWS_PER_00554])을(를) 통해 개별 값별로 모니터링할 수 있으며, GetCurrentKeyValueStorageSize([SWS_PER_00405])을(를) 통해 중복성 및 메타데이터를 포함하여 집계 모니터링할 수도 있습니다(EXP_SWArchitecture 231쪽).
시퀀스 다이어그램: 인메모리 버퍼링 및 물리적 플러시가 포함된 키-값 스토리지의 쓰기 및 동기화 시퀀스. 출처: [SWS_PER_00046], [SWS_PER_00049], [SWS_PER_00365], EXP_SWArchitecture 230쪽.
파일 기반 스토리지 접근 및 타입화된 접근자 계층 구조
비구조화된 데이터 스트림, 바이너리 블록 또는 로그 파일의 경우 ara::per::OpenFileStorage을(를) 통해 초기화되는 클래스 ara::per::FileStorage이(가) 사용됩니다([SWS_PER_00116]). FileStorage 컨테이너 내에서는 GetAllFileNames을(를) 통해 기존 파일을 나열하고([SWS_PER_00110]), FileExists을(를) 통해 존재 여부를 확인하거나([SWS_PER_00112]), DeleteFile을(를) 통해 파일을 제거할 수 있습니다([SWS_PER_00111]). 크기 할당량은 GetCurrentFileSize([SWS_PER_00407]) 및 GetCurrentFileStorageSize([SWS_PER_00406])을(를) 통해 결정됩니다(EXP_SWArchitecture 231쪽).
파일 접근 자체는 특수화된 접근자 클래스를 통한 인터페이스 분리 원칙을 따릅니다(EXP_SWArchitecture 88쪽). 요청된 모드(OpenMode, [SWS_PER_00147], 비트 연산자 [SWS_PER_00144], [SWS_PER_00434]을(를) 통해 결합 가능)에 따라 팩토리 메서드는 독점적인 UniqueHandle 인스턴스를 생성합니다([SWS_PER_00371], [SWS_PER_00569]):
OpenFileReadOnly([SWS_PER_00114], [SWS_PER_00376], [SWS_PER_00430]):ReadText([SWS_PER_00165], [SWS_PER_00420]),ReadLine([SWS_PER_00119]),GetChar([SWS_PER_00168]),PeekChar([SWS_PER_00167]),ReadBinary([SWS_PER_00421], [SWS_PER_00422]),GetByte([SWS_PER_00419]) 및PeekByte([SWS_PER_00418])와 같은 읽기 작업을 위한UniqueHandle<ReadAccessor>을(를) 제공합니다.OpenFileWriteOnly([SWS_PER_00115], [SWS_PER_00377], [SWS_PER_00431]):WriteText([SWS_PER_00166]),WriteBinary([SWS_PER_00423]), 편의 스트림 연산자([SWS_PER_00125]),SetFileSize([SWS_PER_00428])을(를) 통한 파일 자르기 및SyncToFile([SWS_PER_00122])을(를) 통한 물리적 비우기를 수행하는 쓰기 작업을 위한UniqueHandle<WriteAccessor>을(를) 제공합니다.OpenFileReadWrite([SWS_PER_00113], [SWS_PER_00375], [SWS_PER_00429]): 단일UniqueHandle<ReadWriteAccessor>에 읽기 및 쓰기 기능을 결합합니다.
GetPosition([SWS_PER_00162]), SetPosition([SWS_PER_00163]), MovePosition 및 열거형 Origin([SWS_PER_00146], [SWS_PER_00164])을(를) 이용한 상대 탐색, GetSize([SWS_PER_00424]), 파일 끝 검사 IsEof([SWS_PER_00107])과 같은 공통 위치 및 크기 작업은 공통 기본 클래스 FileAccessor에 정의되어 있습니다. 타임스탬프 및 생성 원인과 같은 확장된 파일 메타데이터는 GetFileInfo 및 구조체 FileInfo을(를) 통해 읽어옵니다([SWS_PER_00435], [SWS_PER_00436], [SWS_PER_00438], [SWS_PER_00441], [SWS_PER_00442], [SWS_PER_00443], [SWS_PER_00444], [SWS_PER_00445]). 해석: 복사할 수 없는 접근자 인스턴스로의 엄격한 분리는 타입 안전성 외에도 주로 운영체제 수준에서 동시 쓰기 충돌을 결정론적으로 방지하는 역할을 할 것으로 보입니다. 질문 Q-a990a7aa44326447 (열림)
구조 다이어그램: 파일 접근 클래스 및 접근자 핸들의 인터페이스 및 클래스 계층 구조. 출처: [SWS_PER_00113], [SWS_PER_00114], [SWS_PER_00115], EXP_SWArchitecture 88쪽.
수명 주기 관리, 업데이트 시퀀스 및 매니페스트 동기화
Update and Configuration Management(UCM)에 의한 소프트웨어 업데이트 및 신규 설치를 위해 Persistency는 전용 수명 주기 작업을 제공합니다(EXP_SWArchitecture 92쪽). 애플리케이션의 런타임 중에 업데이트된 대상 구성이 배포되는 경우, 애플리케이션은 CheckForManifestUpdate을(를) 사용하여 구성 변경 사항이 존재하는지 확인할 수 있습니다([SWS_PER_00576]). ReloadPersistencyManifest을(를) 통해 ara::per은(는) 업데이트된 구성을 다시 읽어들이며, 변경된 스토리지 정의는 다음 닫기 및 다시 열기 후에 활성화됩니다([SWS_PER_00577]).
기존 애플리케이션 데이터를 마이그레이션하기 위해 RegisterApplicationDataUpdateCallback을(를) 통해 콜백 함수가 등록되며, 계약 버전 불일치로 인해 데이터 마이그레이션이 필요한 경우 ara::per에 의해 트리거됩니다([SWS_PER_00356]). 개별 요소의 세부 변경 사항은 RegisterDataUpdateIndication을(를) 통해 모니터링할 수 있습니다([SWS_PER_00578]). 영속성 업데이트의 전체 프로세스는 검증 단계 중에 UpdatePersistency에 의해 시작됩니다([SWS_PER_00357]). 업데이트가 성공한 후 CleanUpPersistency은(는) 오래된 백업 및 마이그레이션 데이터를 제거하고([SWS_PER_00567]), ResetPersistency은(는) 스토리지 영역을 완전히 비워 다음 열기 시 매니페스트로부터 처음부터 다시 생성되도록 합니다([SWS_PER_00358]).
시퀀스 다이어그램: 구성 확인, 콜백 마이그레이션 및 정리가 포함된 영속성 업데이트 시퀀스. 출처: [SWS_PER_00356], [SWS_PER_00357], [SWS_PER_00567], [SWS_PER_00576], [SWS_PER_00577], EXP_SWArchitecture 92쪽.
무결성 모니터링, 중복성 처리 및 복구
손상된 데이터 세트를 방지하기 위해 키-값 및 파일 스토리지는 구성 가능한 중복 복사본과 무결성 메커니즘(CRC, 해시, MAC 인증 및 암호화)을 지원합니다(SWS_Persistency 104쪽, EXP_SWArchitecture 230쪽). 내부 중복성 검사가 실패할 경우 안전 관련 애플리케이션에 RegisterRecoveryReportCallback을(를) 통해 알릴 수 있습니다([SWS_PER_00433]). 콜백은 RecoveryReportKind(예: kKeyValueStorageRecoveryFailed)과 함께 영향을 받는 인스턴스 및 키/파일명([SWS_PER_00432], EXP_SWArchitecture 91쪽)을 전달합니다.
손상된 데이터를 목표에 맞게 복구하기 위해 세분화된 복구 및 리셋 메서드를 제공합니다:
- 복구: 스토리지 레벨에서는
RecoverKeyValueStorage([SWS_PER_00333]) 및RecoverAllFiles([SWS_PER_00335])를 통해 닫힌 컨테이너를 복구할 수 있으며, 요소 레벨에서는RecoverKey([SWS_PER_00427]) 및RecoverFile([SWS_PER_00337])을 통해 손상된 개별 항목을 최선 노력(best-effort) 방식으로 복구합니다. - 공장 출하 값으로 리셋:
ResetKeyValueStorage([SWS_PER_00334]) 및ResetAllFiles([SWS_PER_00336])를 통해 컨테이너를 초기 출하 상태로 리셋할 수 있으며, 마찬가지로ResetKey([SWS_PER_00426]) 또는ResetFile([SWS_PER_00338])을 통해 개별 요소를 구성된 초기 상태로 되돌립니다.
액티비티 다이어그램: 중복 검사부터 콜백을 거쳐 복구 또는 리셋에 이르는 데이터 손상 시의 결정 경로. 출처: [SWS_PER_00333], [SWS_PER_00334], [SWS_PER_00432], [SWS_PER_00433].
오류가 발생한 경우의 동작
ara::per에서 오류 상태는 제어되지 않는 C++ 예외를 통해 전파되지 않고 반환 타입 ara::core::Result을 통해 결정론적으로 매핑됩니다([SWS_PER_00044], [SWS_PER_00113]). 이 모듈은 GetPerDomain([SWS_PER_00352])를 통해 자체 오류 도메인을 정의하며, 이는 Name([SWS_PER_00314]) 및 Message([SWS_PER_00315])을 통한 표준화된 오류 해결과 열거형 PerErrc 또는 타입 별칭 Errc([SWS_PER_00311], [SWS_PER_00411])를 갖춘 PerErrorDomain에 의해 구현됩니다. 예외가 활성화된 환경을 위해 PerException([SWS_PER_00355], [SWS_PER_00412]) 및 ThrowAsException([SWS_PER_00350])을 사용할 수 있으며, MakeErrorCode은 플랫폼 호환 오류 코드 생성을 캡슐화합니다([SWS_PER_00351]).
일반적인 오류 코드는 리소스 및 동시성 관련 충돌을 다룹니다. 해당 스토리지 요소가 이미 열려 있거나 UpdatePersistency와 같은 유지보수 작업에 의해 병렬로 수정되는 경우 OpenKeyValueStorage([SWS_PER_00052]), OpenFileStorage([SWS_PER_00116]), DeleteFile([SWS_PER_00111]) 또는 RecoverKeyValueStorage([SWS_PER_00333])과 같은 작업은 kResourceBusy로 실패합니다. 호환되지 않는 타입을 할당할 때 SetValue은 오류 kDataTypeMismatch([SWS_PER_00046])을 보고합니다. 물리적 하드웨어 오류(PerErrc::kPhysical)의 경우 롤백 시맨틱이 존재하는지(예: 포인터가 변경되지 않은 채 유지되는 [SWS_PER_00167], [SWS_PER_00168]와 같은 읽기 및 위치 작업), 아니면 롤백 보장 없이 데이터 손상이 발생할 수 있는지(예: [SWS_PER_00122], [SWS_PER_00166], [SWS_PER_00423]) 구분됩니다.
동기화 및 액세스 오류 진단을 위해 모듈은 표준화된 DLT 프로토콜 메시지를 생성합니다(SWS_Persistency 110쪽). 여기서 SyncToStorage(Message-ID 0x80008037), SyncToFile(0x80008036) 및 DiscardPendingChanges(0x80008038)와 같은 메시지는 영향을 받는 키 세트와 스토리지 할당을 상세히 기록하므로 불완전한 셧다운(예: ara::core::Deinitialize을 통한) 시에도 상태를 재구성할 수 있습니다(SWS_Persistency 110쪽).
더 자세한 증거
지속성 클러스터의 아키텍처 및 상호작용은 다음의 표준 요구사항 및 문서 위치를 기반으로 합니다:
- 아키텍처 인터페이스 및 클러스터 결합: 상위 플랫폼 데몬에
KeyValueStorage및FileStorage을 제공하는 것은 EXP_SWArchitecture 90쪽, EXP_SWArchitecture 87쪽, EXP_SWArchitecture 55쪽(State Management), EXP_SWArchitecture 145쪽(VUCM), EXP_SWArchitecture 176쪽(DM) 및 SWS_RemotePersistency 9쪽에 명시되어 있습니다. - 스토리지 계산 및 할당량(Quota) 제어: 컨테이너 및 파일 레벨에서 할당된 크기 결정은 [SWS_PER_00405], [SWS_PER_00406], [SWS_PER_00407] 및 EXP_SWArchitecture 231쪽과 EXP_SWArchitecture 231쪽의 관련 상호작용 시나리오를 기반으로 합니다.
- 트랜잭션 무결성 및 암호화 연동: 인메모리 관리를 통한 2단계 커밋 절차와 Cryptography 스택을 사용한 보호는 [SWS_PER_00049], [SWS_PER_00365] 및 EXP_SWArchitecture 230쪽를 기반으로 합니다.
- 업데이트 및 마이그레이션 프레임워크: 소프트웨어 업데이트 및 매니페스트 다시 로드의 조정은 [SWS_PER_00356], [SWS_PER_00357], [SWS_PER_00567], [SWS_PER_00576], [SWS_PER_00577] 및 EXP_SWArchitecture 92쪽를 통해 명세됩니다.
이 모듈 가이드는 AUTOSAR Adaptive 릴리스 R25-11의 사양을 기반으로 합니다. 진술 내용은 구속력 있는 SWS 요구사항 및 지정된 아키텍처 문서에만 의거합니다.
function: 116 class: 10 enumeration: 6 variable: 5 type alias: 2 struct: 1
클래스
FileAccessorFileInfoFileStorageKeyValueStoragePerErrorDomainPerExceptionReadAccessorReadWriteAccessorSharedHandleUniqueHandleWriteAccessor함수
CheckForManifestUpdateCleanUpPersistencyGetCurrentFileStorageSizeGetCurrentKeyValueStorageSizeGetPerDomainMakeErrorCodeOpenFileStorageOpenKeyValueStorageoperator|operator|=RecoverAllFilesRecoverKeyValueStorageRegisterApplicationDataUpdateCallbackRegisterDataUpdateIndicationRegisterRecoveryReportCallbackReloadPersistencyManifestResetAllFilesResetKeyValueStorageResetPersistencyUpdatePersistency열거형
FileCreationStateFileModificationStateOpenModeOriginPerErrcRecoveryReportKind주제 맵
ara::per
37이 릴리스에 대한 요소 데이터가 없습니다
ara::per
FileAccessor contains a common basis for ReadAccessor and WriteAccessor
기반 클래스 대상 ReadAccessor, WriteAccessor
This structure contains additional information on a file returned by GetFileInfo.
The File Storage contains a set of files identified by their file names.
The Key-Value Storage contains a set of keys with associated values.
Defines the error domain for Persistency.
상속 대상 ara::core::ErrorDomain
Exception type thrown by Persistency.
상속 대상 ara::core::Exception
ReadWriteAccessor is used to read and write file data
상속 대상 ReadAccessor, WriteAccessor
Handle to a ReadAccessor or ReadWriteAccessor
Checks for updates of the Persistency Target Configuration. This method can be used to detect configuration updates that are installed by UCM while the Adaptive Application that uses Persistency is running. To re-read the updated Target Configuration, the Adaptive Application needs to call ara::per:: ReloadPersistencyManifest.
ara::core::Result< bool > CheckForManifestUpdate () noexcept;Removes backup data and other unused data of all Persistency Key-Value Storages and File Storages.
ara::core::Result< void > CleanUpPersistency () noexcept;Returns the space in bytes currently occupied by a File Storage. The returned size includes all metadata and the space used for redundancy and backups. The returned size is only guaranteed to be accurate if the File Storage is not opened and no other operation on the File Storage takes place at the same time.
ara::core::Result< std::uint64_t > GetCurrentFileStorageSize (const ara::core::InstanceSpecifier &fs) noexcept;Returns the space in bytes currently occupied by a Key-Value Storage. The returned size includes all metadata and the space used for redundancy and backups. The returned size is only guaranteed to be accurate if the Key-Value Storage is not opened and no other operation on the Key-Value Storage takes place at the same time.
ara::core::Result< std::uint64_t > GetCurrentKeyValueStorageSize (const ara::core::InstanceSpecifier &kvs) noexcept;Returns the global PerErrorDomain object.
constexpr const ara::core::ErrorDomain & GetPerDomain () noexcept;Creates an error code.
constexpr ara::core::ErrorCode MakeErrorCode (PerErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept;Opens a File Storage. OpenFileStorage will fail with kResourceBusy when the File Storage is currently being modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles. Because multiple threads can access the same File Storage concurrently, the File Storage might not be closed when the SharedHandle returned by this function goes out of scope. It will only be closed when all SharedHandles that refer to the same File Storage went out of scope.
ara::core::Result< SharedHandle< FileStorage > > OpenFileStorage (const ara::core::InstanceSpecifier &fs) noexcept;Opens a Key-Value Storage. OpenKeyValueStorage will fail with kResourceBusy when the Key-Value Storage is currently being modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage. Because multiple threads can access the same Key-Value Storage concurrently, the Key-Value Storage might not be closed when the SharedHandle returned by this function goes out of scope. It will only be closed when all SharedHandles that refer to the same Key-Value Storage went out of scope.
ara::core::Result< SharedHandle< KeyValueStorage > > OpenKeyValue Storage (const ara::core::InstanceSpecifier &kvs) noexcept;Recovers a File Storage, including all files. RecoverAllFiles recovers a File Storage when the redundancy checks fail. It will fail with kResourceBusy when the File Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles. This method does a best-effort recovery of all files. After recovery, files might show outdated or initial content, or might be lost.
ara::core::Result< void > RecoverAllFiles (const ara::core::Instance Specifier &fs) noexcept;Recovers a Key-ValueStorage. RecoverKeyValueStorage allows to recover a Key-Value Storage when the redundancy checks fail. It will fail with kResourceBusy when the Key-Value Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage. This method does a best-effort recovery of all key-value pairs. After recovery, keys might show outdated or initial value, or might be lost.
ara::core::Result< void > RecoverKeyValueStorage (const ara::core::InstanceSpecifier &kvs) noexcept;Registers an application data update callback with Persistency. The provided callback function will be called by Persistency if an update of stored application data might be necessary. This decision is based on the contract versions. The contract version that last accessed Persistency is provided as an argument to the callback, as well as the ara::core::InstanceSpecifier referring to the updated Key- Value Storage or File Storage. Based on this information, the Adaptive Application can decide which updates are actually necessary, e.g. a migration from any older contract version could be supported, with different steps required for each of these. The provided function will be called from the context of ara::per::UpdatePersistency, ara::per::OpenKeyValueStorage, or ara::per::OpenFileStorage.
void RegisterApplicationDataUpdateCallback (std::function< void(const ara::core::InstanceSpecifier &storage, ara::core::String contract Version)> appDataUpdateCallback) noexcept;Registers a data update indication callback with Persistency. The provided callback function will be called by Persistency when an update of stored data happened. It will be called from the context of ara::per::UpdatePersistency, ara:: per::OpenKeyValueStorage, or ara::per::OpenFileStorage.
void RegisterDataUpdateIndication (std::function< void(const ara::core::InstanceSpecifier &updatedStorage, ara::core::StringView updatedElement)> dataUpdateIndication, ara::core::InstanceSpecifier monitoredStorage, ara::core::Vector< ara::core::String > monitored Elements) noexcept;Register a recovery reporting callback with Persistency. This callback can be used in safety-aware Adaptive Applications to detect actions of the Persistency that are related to the correctness of the persisted data and the reliability of the storage.
void RegisterRecoveryReportCallback (std::function< void(const ara::core::InstanceSpecifier &storage, ara::per::RecoveryReportKind recoveryReportKind, ara::core::Vector< ara::core::String > reported Elements, ara::core::Vector< std::uint8_t > reportedInstances)> recoveryReportCallback) noexcept;Re-reads the Target Configuration. This method can be used to prepare for updates of the Key-Value Storages and File Storages of Persistency after a new Target Configuration was installed by UCM while the Adaptive Application that uses Persistency is running. Storages are only updated after closing them, either when they are opened again or by an explicit call to ara:: per::UpdatePersistency.
ara::core::Result< void > ReloadPersistencyManifest () noexcept;Resets a File Storage, including all files. ResetAllFiles resets a File Storage to the initial state, containing only the files which were deployed from the Target Configuration, with their initial content. Afterwards, the File Storage will appear as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the File Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, ResetPersistency, RecoverAllFiles, or ResetAllFiles.
ara::core::Result< void > ResetAllFiles (const ara::core::Instance Specifier &fs) noexcept;Resets a Key-Value Storage to the initial state. ResetKeyValueStorage allows to reset a Key-Value Storage to the initial state, containing only key-value pairs which were deployed from the Target Configuration, with their initial values. Afterwards, the Key-Value Storage will appear as if it was newly installed from the current Target Configuration. It will fail with kResourceBusy when the Key-Value Storage is currently open, or when it is modified by a call from another thread to UpdatePersistency, CleanUpPersistency, Reset Persistency, RecoverKeyValueStorage, or ResetKeyValueStorage.
ara::core::Result< void > ResetKeyValueStorage (const ara::core::InstanceSpecifier &kvs) noexcept;Resets all Key-Value Storages and File Storages by entirely removing their content. The Key-Value Storages and File Storages will be re-created when ara::per:: OpenFileStorage or ara::per::OpenKeyValueStorage is called next time.
ara::core::Result< void > ResetPersistency () noexcept;Updates all Persistency Key-Value Storages and File Storages after a new Target Configuration was installed. This method can be used to update the persistent data of the Adaptive Application during verification phase.
ara::core::Result< void > UpdatePersistency () noexcept;This enumeration describes how and when a file was created.
enum class FileCreationState : std::uint32_t {...};This enumeration describes how and when a file was last modified.
enum class FileModificationState : std::uint32_t {...};This enumeration defines how a file shall be opened. The values can be combined (using | and |=) as long as they do not contradict each other.
enum class OpenMode : std::uint32_t {...};Specification of origin used in MovePosition.
enum class Origin : std::uint32_t {...};Defines the errors for Persistency. The enumeration values 0 - 255 are reserved for AUTOSAR assigned errors, the stack provider is free to define additional errors starting from 256.
enum class PerErrc : ara::core::ErrorDomain::CodeType {...};Defines the reported recovery actions.
enum class RecoveryReportKind : std::uint32_t {...};네임스페이스
- ara::per 11 Klassen, 20 freie Funktionen
모듈의 UML 클래스 다이어그램
Abgerundete Rahmen = Namespaces; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = modulfremde bzw. externe Basisklassen. Klicken öffnet die Klassenseite.
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문