영구 파일을 관리하고 블록 단위 읽기 및 쓰기를 위해 RAII 기반 핸들을 통해 파일을 엽니다.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 7736cf7ccbd1출처열린 질문 (2)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
영구 파일을 관리하고 블록 단위 읽기 및 쓰기를 위해 RAII 기반 핸들을 통해 파일을 엽니다.
클래스 ara::per::FileStorage는 고유한 파일 이름을 통해 구성된 영구 파일 집합을 관리하고 열 수 있도록 합니다 [SWS_PER_00110]. 실제 읽기 및 쓰기 액세스는 범위를 벗어날 때 파일을 자동으로 다시 닫는 UniqueHandle 가이드 접근자를 통해 수행됩니다 [SWS_PER_00114]. 이미 열려 있는 파일은 동시 삭제 또는 복구 작업으로부터 보호되므로 이러한 병렬 액세스는 PerErrc::kResourceBusy와 함께 실패합니다 [SWS_PER_00111].
컨텍스트
클래스 ara::per::FileStorage는 고유한 파일 이름으로 식별되는 영구 파일의 구성된 컬렉션에 대한 액세스를 캡슐화합니다. 이는 애플리케이션이 GetAllFileNames[SWS_PER_00110]를 통해 기존 파일을 나열하고, FileExists[SWS_PER_00112]를 사용하여 존재 여부를 확인하며, GetFileInfo[SWS_PER_00438] 및 GetCurrentFileSize[SWS_PER_00407]를 통해 메타데이터와 파일 크기를 쿼리하는 등의 파일 작업을 수행하기 위한 중앙 인터페이스 역할을 합니다. 바이트 수준에서의 직접적인 읽기 또는 쓰기 액세스는 스토리지 인스턴스 자체에서 수행되지 않고, 열기 메서드에 의해 UniqueHandle로 제공되는 특수 접근자 객체를 통해 중재됩니다 [SWS_PER_00114][SWS_PER_00113][SWS_PER_00115].
실행 중에는 FileExists, DeleteFile 또는 파일 열기와 같은 일반적인 파일 작업이 스레드 안전하게 설계되어 있습니다 [SWS_PER_00111][SWS_PER_00112][SWS_PER_00114]. 그러나 GetAllFileNames[SWS_PER_00110] 또는 FileExists[SWS_PER_00112]와 같은 상태 쿼리 결과는 다른 스레드에서 파일이 동시에 추가되거나 삭제되지 않는 경우에만 정확한 유효성을 갖는다는 점에 유의해야 합니다. GetFileInfo의 경우도 마찬가지입니다. 대상 파일이 열려 있지 않은 경우에만 수정 및 액세스 시간과 처리 상태가 신뢰할 수 있을 만큼 정확합니다 [SWS_PER_00438].
사용 경로
일반적인 사용 경로에는 확인, 대상 열기, 접근자 핸들을 통한 데이터 처리 및 최종 정리가 포함됩니다:
파일 상태 확인: 액세스하기 전에 선택적으로 FileExists를 통해 원하는 파일이 존재하는지 확인하거나 [SWS_PER_00112], GetAllFileNames를 통해 인벤토리를 쿼리할 수 있습니다 [SWS_PER_00110].
파일 닫기 및 리소스 해제: 열기 메서드에서 반환된 ara::core::Result는 각 접근자에 대한 UniqueHandle를 캡슐화합니다. 이 UniqueHandle가 범위를 벗어나는 즉시 파일이 자동으로 닫힙니다 [SWS_PER_00114][SWS_PER_00113][SWS_PER_00115]. 이 과정에서 FileStorage의 파일 관련 사용 중 표시도 해제될 것으로 추정됩니다. 질문 (열림)
유지 관리 및 정리: 더 이상 필요하지 않은 파일은 DeleteFile로 삭제됩니다 [SWS_PER_00111]. 무결성 위반 시 RecoverFile는 중복 데이터의 최선형 복구를 제공하는 반면 [SWS_PER_00337], ResetFile는 파일을 초기 배포 콘텐츠로 재설정하거나 누락된 경우 새로 생성합니다 [SWS_PER_00338].
저장 한도 및 할당량: 새로 생성하거나 확장할 때 PerErrc::kOutOfStorageSpace(물리적 메모리 가득 참), PerErrc::kTooManyFiles(maxNumberOfFiles 초과) 또는 PerErrc::kQuotaExceeded(maximumAllowedSize 초과)가 발생할 수 있습니다 [SWS_PER_00113][SWS_PER_00337][SWS_PER_00338].
무결성 및 보안 오류: 물리적 스토리지 계층에 오류가 발생하면 PerErrc::kPhysicalStorageFailure가 보고됩니다. 손상된 데이터 구조, 유효성 검사 실패 또는 암호화 문제로 인해 PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed 또는 PerErrc::kAuthenticationFailed가 발생합니다 [SWS_PER_00110][SWS_PER_00112][SWS_PER_00114][SWS_PER_00337].
누락된 초기 데이터(PerErrc::kInitValueNotAvailable): Application Design이나 대상 구성 모두에 초기값이 저장되지 않은 경우 ResetFile를 통한 재설정 시 실패합니다 [SWS_PER_00338].
이 가이드는 AUTOSAR Adaptive Platform 릴리스 R25-11 사양을 기반으로 하며 ara::per::FileStorage에 대한 기능적 요구사항을 요약합니다.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Deletes a file from this File Storage. This operation will fail with kResourceBusy when the file is currently open.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 4416a2cc7c72출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
ara::per::FileStorage 클래스의 동기 메서드 DeleteFile은 파일 스토리지에서 파일의 이름(fileName)을 기반으로 파일을 삭제합니다 [SWS_PER_00111]. 식별자는 구성된 PersistencyFile.fileName에 해당할 수 있습니다 [SWS_PER_00111]. 호출은 noexcept(으)로 지정되어 있으며, 예외 안전 및 스레드 안전한 것으로 간주되고 결과를 ara::core::Result<void>을 통해 다시 보고합니다 [SWS_PER_00111].
호출 전에 대상 파일에 대한 모든 활성 접근이 종료되어야 합니다. 파일이 현재 열려 있는 경우 삭제 작업은 PerErrc::kResourceBusy 오류와 함께 실패합니다 [SWS_PER_00111]. 따라서 애플리케이션은 이전에 OpenFileReadWrite[SWS_PER_00113], OpenFileReadOnly[SWS_PER_00114] 또는 OpenFileWriteOnly[SWS_PER_00115]을 통해 생성된 UniqueHandle 인스턴스가 유효 범위를 벗어나 파일이 닫히도록 보장해야 합니다. 마찬가지로 동일한 파일 이름에 대해 RecoverFile[SWS_PER_00337] 또는 ResetFile[SWS_PER_00338]이(가) 병렬로 실행되면 PerErrc::kResourceBusy[SWS_PER_00111](으)로 이어집니다.
PerErrc::kFileNotFound: 지정된 파일이 파일 스토리지에 존재하지 않습니다 [SWS_PER_00111].
PerErrc::kIllegalWriteAccess: File Storage가 읽기 전용으로 구성되어 있습니다 [SWS_PER_00111].
PerErrc::kPhysicalStorageFailure: 물리적 저장 매체에 대한 접근이 실패했습니다(롤백 시맨틱 없음) [SWS_PER_00111].
PerErrc::kIntegrityCorrupted, PerErrc::kEncryptionFailed 또는 PerErrc::kAuthenticationFailed: 구조적 무결성, 암호화/복호화 또는 MAC 검증 오류(각각 롤백 시맨틱 포함) 및 제조업체별 오류 [SWS_PER_00111].
이 텍스트는 AI에 의해 생성되었으며 참고용으로 제공됩니다. 구속력 있는 것은 오직 AUTOSAR 문서의 명세뿐입니다.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: f0bea0a79212출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
ara::per::FileStorage 클래스의 동기식 메서드 FileExists은(는) 해당 파일 스토리지에 파일이 존재하는지 확인합니다 [SWS_PER_00112]. 이 함수는 noexcept(으)로 선언되어 있으며 C++ 예외를 발생시키지 않습니다 [SWS_PER_00112].
사용
매개변수로 fileName이(가) ara::core::StringView(으)로 전달되며, 이는 구성된 파일의 식별자 PersistencyFile.fileName에 해당할 수 있습니다 [SWS_PER_00112]. 반환값 ara::core::Result<bool>은(는) 파일을 찾은 경우 true을(를) 반환하고, 그렇지 않은 경우 false을(를) 반환합니다 [SWS_PER_00112].
오류 처리
확인에 실패하면 반환된 Result에는 불리언 값이 포함되지 않고 오류 코드가 포함됩니다 [SWS_PER_00112]. 명시된 오류 원인은 다음과 같습니다:
물리적 스토리지 접근 실패 시 PerErrc::kPhysicalStorageFailure[SWS_PER_00112],
데이터의 구조적 무결성이 손상된 경우 PerErrc::kIntegrityCorrupted[SWS_PER_00112],
저장된 데이터의 유효성을 보장할 수 없는 경우 PerErrc::kValidationFailed[SWS_PER_00112],
이 메서드는 스레드 안전한 것으로 선언되어 있습니다 [SWS_PER_00112]. 그러나 반환된 확인 결과는 동시에 스토리지에서 파일이 추가되거나 삭제되지 않는 동안에만 정확합니다. 예를 들어 다른 스레드가 true의 반환 직후 파일을 제거하면 그 결과는 이미 더 이상 유효하지 않습니다 [SWS_PER_00112].
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.
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.
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.
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.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: b7f6df93c4d9출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
ara::per::FileStorage 클래스의 메서드 OpenFileReadOnly(#include "ara/per/file_storage.h"에 선언됨)은(는) 지속형 파일을 지정된 액세스 모드로 읽기 전용으로 엽니다 [SWS_PER_00114]. 매개변수 mode을(를) 통해 다르게 지정되지 않은 경우, 읽기 포인터 위치는 기본적으로 파일 시작 부분(kAtTheBeginning)(으)로 설정됩니다 [SWS_PER_00114]. 실행은 동기적으로 수행되며 ara::core::Result<UniqueHandle<ReadAccessor>>을(를) 반환합니다. 핸들은 RAII 시맨틱을 사용합니다. UniqueHandle 인스턴스가 유효 범위를 벗어나는 즉시 파일이 자동으로 닫힙니다 [SWS_PER_00114].
동시성과 관련하여 이 메서드는 thread-safe 및 exception safe(noexcept 포함)로 명시되어 있습니다 [SWS_PER_00114]. 그럼에도 불구하고 기능적 호출 제한이 존재합니다. 대상 파일이 이미 열려 있거나 동일한 파일 이름으로 DeleteFile, RecoverFile 또는 ResetFile과(와) 같은 연산이 동시에 실행 중인 경우 호출은 PerErrc::kResourceBusy(으)로 실패합니다 [SWS_PER_00114].
오류 발생 시 ara::core::Result은(는) 제조업체별 오류 또는 PerErrc 또는 StorageFailure의 표준화된 오류 코드를 반환합니다 [SWS_PER_00114]:
PerErrc::kFileNotFound: 지정된 파일이 파일 스토리지에 존재하지 않습니다 [SWS_PER_00114].
PerErrc::kInvalidOpenMode: 전달된 모드에 잘못된 플래그 조합이 포함되어 있습니다 [SWS_PER_00114].
PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kAuthenticationFailed 또는 PerErrc::kEncryptionFailed: 구조적 무결성 손상, 유효성 검사 불충분, MAC 검증 실패 또는 복호화 실패 [SWS_PER_00114].
다른 인터페이스와의 상호 작용에서 FileStorage은(는) 관련된 두 가지 오버로드를 제공합니다. 항상 파일 시작 부분에서 여는 모드 매개변수가 없는 변형 [SWS_PER_00376], 그리고 많은 작은 액세스를 가속화하기 위해 ReadAccessor이(가) 블록 단위 읽기를 구현하는 버퍼(ara::core::Span<ara::core::Byte> buffer)를 사용하는 오버로드입니다 [SWS_PER_00430].
이 사용 지침은 AUTOSAR Adaptive R25-11 명세를 바탕으로 자동 생성되었습니다.
rollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 4286b0e81322출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용
ara::per::FileStorage 클래스의 OpenFileReadOnly 메서드는 영구 저장된 파일을 읽기 전용으로 엽니다 [SWS_PER_00376]. 호출은 파일 이름 fileName을(를) 전달하여 헤더 파일 ara/per/file_storage.h을 통해 수행됩니다. 이때 읽기 위치는 파일 시작 부분으로 초기 설정됩니다. 반환값으로는 ara::core::Result이(가) 사용되며, 성공 시 UniqueHandle<ReadAccessor>을(를) 제공합니다. 열린 파일은 이 핸들이 유효 범위를 벗어나는 즉시 자동으로 닫힙니다.
PerErrc::kResourceBusy: 파일이 이미 열려 있거나 DeleteFile, RecoverFile 또는 ResetFile에 의해 동시에 처리되고 있습니다.
PerErrc::kPhysicalStorageFailure: 물리적 저장 매체에 대한 접근이 실패했습니다.
PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed, PerErrc::kAuthenticationFailed: 구조적 무결성, 데이터 유효성 검사, 복호화 또는 MAC 검사 오류입니다.
동시성 및 상호 작용
이 메서드는 thread-safe, exception safe 및 noexcept(으)로 명시되어 있습니다 [SWS_PER_00376]. 확장된 요구사항을 위해 오버로드가 제공됩니다: OpenMode을(를) 명시적으로 지정하기 위한 변형 [SWS_PER_00114] 및 더 작은 읽기 접근을 블록 단위로 가속화하기 위한 추가 사용자 버퍼가 있는 시그니처 [SWS_PER_00430].
rollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: f3a0884b9d84출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
ara::per::FileStorage 클래스의 동기 메서드 OpenFileReadOnly은 호출자가 제공한 버퍼 [SWS_PER_00430]를 사용하여 영속화된 파일을 읽기 접근용으로 엽니다. fileName, mode 및 buffer(ara::core::Span<ara::core::Byte> 형태) 매개변수를 기반으로 파일 접근이 초기화됩니다 [SWS_PER_00430]. mode을 통해 달리 지정되지 않는 한, 읽기 위치는 기본적으로 파일 시작 위치(kAtTheBeginning)에 설정됩니다 [SWS_PER_00430]. 전달된 메모리 영역은 결과로 생성된 ReadAccessor에서 사용되어 블록 단위 읽기를 통해 반복적인 소규모 읽기 접근을 가속화합니다 [SWS_PER_00430]. 이 리소스는 RAII를 통해 보호됩니다. 반환된 UniqueHandle이 유효 범위를 벗어나는 즉시 파일이 자동으로 닫힙니다 [SWS_PER_00430].
동시성과 관련하여 이 함수는 스레드 안전(thread-safe), 예외 안전(exception safe) 및 noexcept로 명세되어 있습니다 [SWS_PER_00430]. 오류가 발생하면 ara::core::Result는 PerErrc[SWS_PER_00430]의 표준화된 오류 코드 또는 제조사별 오류를 제공합니다:
PerErrc::kResourceBusy: 파일이 이미 열려 있거나 DeleteFile, RecoverFile 또는 ResetFile에 의해 동시에 처리되고 있습니다 [SWS_PER_00430].
PerErrc::kFileNotFound: 지정된 파일이 파일 스토리지에 존재하지 않습니다 [SWS_PER_00430].
PerErrc::kInvalidOpenMode: 전달된 모드에 유효하지 않은 옵션 조합이 포함되어 있습니다 [SWS_PER_00430].
무결성 및 보안 오류: PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed 또는 PerErrc::kAuthenticationFailed(MAC 검사 실패) 및 물리적 메모리 접근 오류 시 StorageFailure[SWS_PER_00430].
rollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: cf05039b8020출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용
클래스 ara::per::FileStorage의 동기 메서드 OpenFileReadWrite은 지정된 모드로 읽기 및 쓰기 액세스를 위해 파일을 엽니다 mode[SWS_PER_00113]. 모드에서 별도로 지정하지 않는 한 파일 포인터는 기본적으로 시작 위치로 설정됩니다(kAtTheBeginning). 파일이 아직 존재하지 않는 경우 자동으로 생성됩니다 [SWS_PER_00113]. 이 함수는 핸들이 유효 범위를 벗어나는 즉시 파일을 자동으로 닫는 UniqueHandle<ReadWriteAccessor>을 포함하는 ara::core::Result을 반환합니다 [SWS_PER_00113].
동시성 및 제약사항
호출은 스레드 안전(thread-safe)하며 예외를 던지지 않습니다(noexcept) [SWS_PER_00113]. 호출 시 파일이 이미 열려 있어서는 안 됩니다. 또한 동일한 파일 이름을 사용하는 DeleteFile, RecoverFile 또는 ResetFile의 동시 실행이 발생해서는 안 되며, 그렇지 않으면 호출이 PerErrc::kResourceBusy로 실패합니다 [SWS_PER_00113].
PerErrc::kResourceBusy: 대상 파일이 이미 열려 있거나 관리 파일 작업에 의해 점유되어 있습니다.
Access: 스토리지가 읽기 전용으로 구성되어 있거나 이미 존재하는 키에 대해 write-only-once로 구성되어 있습니다.
PerErrc::kOutOfStorageSpace 또는 PerErrc::kTooManyFiles: 물리적 스토리지 공간이 부족하거나 새로 생성할 때 maxNumberOfFiles를 초과했습니다.
PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed, PerErrc::kAuthenticationFailed: 하드웨어 액세스 오류, 손상된 데이터 구조 또는 실패한 암호화 유효성 검사.
상호 작용
간소화된 변형으로 기본적으로 파일을 시작 위치에서 여는 모드 매개변수가 없는 오버로드가 제공됩니다 [SWS_PER_00375]. 다수의 작은 액세스 시 성능 최적화를 위해 블록 단위 읽기 및 쓰기를 위한 사용자 정의 버퍼(buffer)를 갖춘 오버로드도 존재합니다 [SWS_PER_00429].
이 사용 지침은 AUTOSAR Adaptive 릴리스 R25-11 사양을 기반으로 AI에 의해 생성되었습니다.
rollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: e0c7dc90877b출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
ara::per::FileStorage 클래스의 동기 멤버 함수 OpenFileReadWrite은 결합된 읽기 및 쓰기 접근을 위해 파일을 여는 역할을 합니다[SWS_PER_00375]. 매개변수로는 구성된 파일의 모델링 PersistencyFile.fileName에 대응할 수 있는 파일 이름 fileName이 ara::core::StringView로 전달됩니다[SWS_PER_00375]. 지정된 파일이 아직 존재하지 않는 경우 자동으로 새로 생성됩니다[SWS_PER_00375]. 열릴 때 파일 위치는 즉시 시작 부분으로 설정됩니다(kAtTheBeginning에 해당)[SWS_PER_00375]. 호출자는 ara::core::Result<UniqueHandle<ReadWriteAccessor>>을 수신하며, 반환된 UniqueHandle이 유효 범위를 벗어나는 즉시 파일이 자동으로 닫힙니다[SWS_PER_00375].
동시성 및 실행 컨텍스트 측면에서 이 함수는 thread-safe 및 exception safe로 지정되어 있습니다[SWS_PER_00375]. 그러나 동시 접근이 규제된다는 점에 유의해야 합니다. 파일이 이미 열려 있거나 동일한 파일 이름에 대해 DeleteFile, RecoverFile 또는 ResetFile와 같은 작업이 동시에 실행되는 경우, 호출은 실패하고 오류 코드 PerErrc::kResourceBusy을 반환합니다[SWS_PER_00375].
오류가 발생할 경우 반환된 Result 객체는 특정 지속성 오류 또는 제조업체별 오류를 캡슐화합니다[SWS_PER_00375]:
읽기 전용 스토리지 또는 Write-Once 구성 시 이미 존재하는 데이터에 대한 Access과 같은 구성 및 접근 오류[SWS_PER_00375].
구성된 파일 상한을 초과할 때 발생하는 PerErrc::kOutOfStorageSpace 또는 PerErrc::kTooManyFiles에 의한 저장 공간 한계[SWS_PER_00375].
PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed 또는 PerErrc::kAuthenticationFailed와 같은 무결성 및 보안 오류[SWS_PER_00375].
FileStorage의 다른 인터페이스와의 상호 작용에서 AUTOSAR는 대안적인 오버로드를 제공합니다. OpenFileReadWrite은 명시적인 OpenMode와 함께 호출되거나[SWS_PER_00113], 반복적인 소규모 접근을 가속화하기 위해 블록 단위 버퍼링을 가능하게 하는 추가적인 사용자 측 메모리 영역 buffer(ara::core::Span<ara::core::Byte>)와 함께 호출될 수 있습니다[SWS_PER_00429].
rollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 06577277e905출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용
ara::per::FileStorage 클래스의 OpenFileReadWrite 메서드는 사용자 정의 버퍼 [SWS_PER_00429]를 제공하여 읽기 및 쓰기 겸용으로 파일을 동기적으로 엽니다. 전달된 메모리 영역 buffer(ara::core::Span<ara::core::Byte> 형태)은 내부적으로 ReadWriteAccessor에 의해 블록 단위 읽기 및 쓰기 작업에 사용되어 소규모 연속 접근을 고성능으로 처리합니다. 지정된 파일이 아직 존재하지 않으면 자동으로 새로 생성되며, 전달된 mode에 달리 지정되어 있지 않는 한([SWS_PER_00429]) 파일 위치는 기본적으로 시작 위치(kAtTheBeginning)에 놓입니다. 파일은 ara::core::Result에서 반환된 UniqueHandle이 자신의 유효 범위를 벗어나는 즉시 닫힙니다. 해석: 전달된 버퍼 span의 기반 메모리는 accessor가 블록 접근을 위해 이를 참조하므로 UniqueHandle의 전체 수명 동안 유효하게 유지되어야 할 것으로 보입니다. 질문 Q-e0009b7de17e3597 (열림)
오류 처리 및 동시성
이 함수는 noexcept, 예외 안전(exception safe) 및 스레드 안전으로 명세되어 있습니다 [SWS_PER_00429]. 실패 시 Result는 제조사별 오류 또는 정의된 오류 코드를 반환합니다:
PerErrc::kResourceBusy: 파일이 이미 열려 있거나 동일한 이름으로 DeleteFile, RecoverFile 또는 ResetFile에 의해 동시에 처리되고 있습니다 [SWS_PER_00429].
Access: 메모리 영역이 read-only로 구성되어 있거나 write-only-once로 설정되어 이미 점유되어 있습니다 [SWS_PER_00429].
PerErrc::kInvalidOpenMode: 전달된 mode에 유효하지 않은 특성 조합이 포함되어 있습니다 [SWS_PER_00429].
PerErrc::kOutOfStorageSpace 또는 PerErrc::kTooManyFiles: 신규 생성을 위한 물리적 메모리가 부족하거나 구성된 제한 maxNumberOfFiles를 초과하게 됩니다 [SWS_PER_00429].
PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed 및 PerErrc::kAuthenticationFailed: 접근, 무결성 검사, MAC 검사, 유효성 검증 또는 복호화 중 오류입니다 [SWS_PER_00429].
rollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: cf72b60c71fb출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용
ara::per::FileStorage 클래스의 메서드 OpenFileWriteOnly은 정의된 접근 모드로 배타적 쓰기를 위해 파일을 동기식으로 엽니다[SWS_PER_00115]. 매개변수 mode을 통해 달리 지정되지 않는 한, 파일은 잘립니다(kTruncate에 해당). 파일이 아직 존재하지 않는 경우 새로 생성됩니다. 반환값으로는 ara::core::Result<UniqueHandle<WriteAccessor>>가 사용되며, UniqueHandle의 유효 범위를 벗어날 때 파일이 자동으로 다시 닫힙니다[SWS_PER_00115].
오류 처리
오류가 발생할 경우 반환된 Result에는 특정 오류 코드가 포함됩니다[SWS_PER_00115]: Access는 스토리지가 읽기 전용이거나 Write-Once로 구성되었으며 키가 이미 존재함을 나타냅니다. PerErrc::kInvalidOpenMode은 유효하지 않은 모드 조합을 보고하고 PerErrc::kOutOfStorageSpace는 물리적 저장 공간 부족을 보고합니다. 또한 PerErrc::kTooManyFiles, PerErrc::kPhysicalStorageFailure 및 무결성 및 보안 오류인 PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed 또는 PerErrc::kAuthenticationFailed이 발생할 수 있습니다[SWS_PER_00115].
동시성 및 제약사항
이 함수는 스레드 안전 및 예외 안전(noexcept)으로 설계되었습니다[SWS_PER_00115]. 동일한 파일에 대한 병렬 접근은 파일이 이미 열려 있거나 동일한 파일 이름으로 DeleteFile, RecoverFile 또는 ResetFile와 같은 작업이 동시에 실행되는 경우 오류 코드 PerErrc::kResourceBusy와 함께 실패합니다[SWS_PER_00115].
상호 작용
이 함수 외에도 인터페이스는 기본적으로 kTruncate으로 작동하는 모드 매개변수가 없는 단순화된 오버로드[SWS_PER_00377]와, 다수의 소규모 접근을 가속화하기 위해 블록 단위 쓰기를 가능하게 하는 사용자 정의 버퍼를 갖춘 오버로드[SWS_PER_00431]를 제공합니다.
rollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: fa6d3b80cd05출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용
ara::per::FileStorage 클래스의 동기 메서드 OpenFileWriteOnly은 [SWS_PER_00377]에 따라 쓰기 전용으로 파일을 엽니다. 파라미터 fileName을 통해 대상 파일의 이름을 전달받습니다. 파일이 존재하지 않는 경우 새로 생성되며, 이미 존재하는 파일은 잘립니다(kTruncate에 해당) [SWS_PER_00377]. 반환값으로는 ara::core::Result이(가) 사용되며, 성공 시 ara::per::UniqueHandle<WriteAccessor>을(를) 캡슐화합니다. 이 핸들은 유효 범위를 벗어나는 즉시 RAII 패턴에 따라 파일을 자동으로 닫습니다 [SWS_PER_00377].
오류 처리 및 동시성
이 연산은 noexcept(으)로 선언되어 있으며 예외 안전 및 스레드 안전합니다 [SWS_PER_00377]. 오류 발생 시 Result에는 PerErrc의 구체적인 오류 코드 또는 제조업체별 오류가 포함됩니다 [SWS_PER_00377]:
PerErrc::kResourceBusy: 파일이 이미 열려 있거나 DeleteFile, RecoverFile 또는 ResetFile에 의해 동시에 처리되고 있습니다.
PerErrc::kOutOfStorageSpace 및 PerErrc::kTooManyFiles: 물리적 스토리지가 부족하거나 구성된 최대 파일 수(maxNumberOfFiles)를 초과합니다.
PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed 또는 PerErrc::kAuthenticationFailed: 하드웨어 접근 오류 및 무결성, 유효성 검사 또는 복호화 검사 오류입니다.
상호 작용
이 변형은 자르기(truncate)를 고정적으로 지정하는 반면, 파라미터 OpenMode이 있는 오버로드는 다른 열기 방식을 허용합니다 [SWS_PER_00115]. 여러 작은 접근을 수반하는 최적화된 블록 단위 쓰기 작업을 위해 사용자 정의 버퍼(ara::core::Span<ara::core::Byte>)가 있는 추가 오버로드가 제공됩니다 [SWS_PER_00431].
이 텍스트는 AUTOSAR Adaptive R25-11 명세를 기반으로 AI에 의해 생성되었습니다.
rollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 37dc6b2848d7출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
ara::per::FileStorage 클래스의 동기 메서드 OpenFileWriteOnly은 독점적 쓰기를 위해 파일을 열고 성공 시 ara::core::Result<UniqueHandle<WriteAccessor>>를 반환합니다 [SWS_PER_00431]. 반환된 UniqueHandle의 유효 범위를 벗어날 때 열린 파일은 자동으로 닫힙니다 [SWS_PER_00431]. 호출 시 파일 이름 fileName 및 접근 모드 mode 외에도 사용자 측 버퍼 buffer(ara::core::Span<ara::core::Byte> 형태)을 전달받으며, 이는 반복적인 소규모 쓰기 접근을 가속화하기 위한 블록 단위 쓰기에 사용됩니다 [SWS_PER_00431]. 모드에서 달리 구성되지 않은 경우 파일은 열릴 때 잘립니다(kTruncate에 해당). 아직 존재하지 않는 경우 새로 생성됩니다 [SWS_PER_00431].
동시성 및 안전성과 관련하여 이 메서드는 thread-safe 및 exception safe로 명세되어 있으며 noexcept로 선언되어 있습니다 [SWS_PER_00431]. 그러나 파일이 이미 열려 있거나 동일한 파일 이름에 대해 DeleteFile, RecoverFile 또는 ResetFile과 같은 관리 작업이 동시에 실행되는 경우 접근이 실패합니다 [SWS_PER_00431].
오류 발생 시 PerErrc의 해당 오류 코드 또는 제조사별 오류가 결과로 반환됩니다 [SWS_PER_00431]:
PerErrc::kResourceBusy: 파일이 이미 열려 있거나 다른 파일 작업에 의해 점유되어 있습니다 [SWS_PER_00431].
PerErrc::kIllegalWriteAccess: File Storage가 쓰기 방지되어 있거나 write-only-once로 구성되어 있으며 파일이 이미 존재합니다 [SWS_PER_00431].
PerErrc::kInvalidOpenMode: 전달된 모드 조합이 유효하지 않습니다 [SWS_PER_00431].
PerErrc::kOutOfStorageSpace 또는 PerErrc::kTooManyFiles: 저장 공간이 부족하거나 구성된 최대 파일 수를 초과합니다 [SWS_PER_00431].
PerErrc::kPhysicalStorageFailure, PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed 또는 PerErrc::kAuthenticationFailed: 물리적 접근, 무결성, 유효성 검증, 복호화 또는 인증 오류입니다 [SWS_PER_00431].
rollback_semantics Returned if the file is already open, or if DeleteFile, RecoverFile, or ResetFile with the same file name is currently being executed.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 1adb8f07ad8e출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용
ara::per::FileStorage 클래스의 동기 메서드 RecoverFile은 중복성 검사가 실패할 때 단일 파일에 대한 최선 노력 복구를 수행합니다 [SWS_PER_00337]. 해당 파일의 식별자는 파라미터 fileName을 통해 ara::core::StringView(으)로 전달됩니다. 복구 후 파일은 오래된 상태나 초기 내용을 가질 수 있으며, 최악의 경우 손실될 수도 있습니다 [SWS_PER_00337].
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 16bebc8c99d8출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
ara::per::FileStorage 클래스의 동기 메서드 ResetFile은 단일 파일을 사전 구성된 초기 상태로 재설정합니다 [SWS_PER_00338]. fileName을 통해 지정된 파일이 스토리지에 아직 존재하지 않는 경우 새로 생성됩니다 [SWS_PER_00338]. 두 경우 모두 파일은 이후 현재 Target Configuration에서 새로 설치한 후와 동일한 콘텐츠를 가집니다 [SWS_PER_00338]. 해당 변경 상태는 FileModificationState에서 kModifiedDuringReset(으)로 관리됩니다 [SWS_PER_00436].
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문