DEENESPTFRRUARHIKOZHNL

क्लास ara::per::FileAccessor

[SWS_PER_00588] Upstream: RS_PER_00004, RS_AP_00122, RS_AP_00146

class FileAccessor {...};

FileAccessor contains a common basis for ReadAccessor and WriteAccessor. It provides methods for checking and setting the current position in the file (GetPosition, Set Position, MovePosition, IsEof) and for checking the current size of the file (GetSize).

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

उपयोगकर्ता गाइडएआई जनित

विशिष्ट फ़ाइल एक्सेस के लिए फ़ाइल आकार क्वेरी और स्थिति नेविगेशन के लिए एक सामान्य बेस क्लास के रूप में कार्य करता है।
एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: e1768b56d42c उद्गम खुले प्रश्न (2)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

विशिष्ट फ़ाइल एक्सेस के लिए फ़ाइल आकार क्वेरी और स्थिति नेविगेशन के लिए एक सामान्य बेस क्लास के रूप में कार्य करता है।

क्लास ara::per::FileAccessor AUTOSAR पर्सिस्टेंस मॉड्यूल में क्रमबद्ध फ़ाइल एक्सेस ([SWS_PER_00424]) के स्थिति नेविगेशन और आकार सत्यापन के लिए एक सामान्य बेस क्लास के रूप में कार्य करती है। यह हटाए गए कन्स्ट्रक्टर्स ([SWS_PER_00589]) के माध्यम से प्रत्यक्ष इंस्टेंसिएशन और कॉपी संचालन को रोकती है। अमान्य स्थिति विनिर्देशों के मामले में, एक रोलबैक सिमेंटिक्स प्रभावी होता है, जो वर्तमान पॉइंटर स्थिति की सुरक्षा करता है। सभी ऑपरेशन अपवाद-सुरक्षित हैं, लेकिन समवर्ती उपयोग के मामले में बाहरी सिंक्रोनाइज़ेशन की आवश्यकता होती है।

संदर्भ

क्लास ara::per::FileAccessor AUTOSAR Adaptive Platform के पर्सिस्टेंस मॉड्यूल (ara::per) में ReadAccessor और WriteAccessor जैसे फ़ाइल एक्सेस ऑब्जेक्ट्स के लिए एक सामान्य अमूर्त बेस क्लास के रूप में कार्य करती है। इसकी केंद्रीय ज़िम्मेदारी फ़ाइल-संबंधित स्थिति प्रबंधन और आकार सत्यापन के लिए एक समान इंटरफ़ेस प्रदान करना है। क्लास एक खुली हुई फ़ाइल के भीतर रीड और राइट कर्सर के लिए एक नियंत्रण इंस्टेंस के रूप में कार्य करती है, लेकिन इसमें वास्तविक डेटा ट्रांसमिशन (जैसे बाइट्स को पढ़ना या लिखना) के लिए स्वयं कोई मेथड नहीं होते हैं। नेविगेशन या तो फ़ाइल की शुरुआत से पूर्ण रूप से या परिभाषित संदर्भ बिंदुओं के सापेक्ष होता है।

जीवनचक्र

क्लास ara::per::FileAccessor को सीधे इंस्टैंशिएट या स्वतंत्र रूप से कॉपी नहीं किया जा सकता है। डिफ़ॉल्ट कन्स्ट्रक्टर हटा दिया गया है ([SWS_PER_00589]), साथ ही कॉपी कन्स्ट्रक्टर ([SWS_PER_00592]) और कॉपी असाइनमेंट ऑपरेटर ([SWS_PER_00593]) भी। मूव सिमेंटिक्स भी स्पष्ट रूप से प्रतिबंधित हैं: मूव कन्स्ट्रक्टर ([SWS_PER_00590]) और मूव असाइनमेंट ऑपरेटर ([SWS_PER_00591]) दोनों हटा दिए गए हैं। इससे यह व्याख्या निकलती है कि इंस्टेंस केवल ठोस सबक्लासेस के संदर्भ में ही बनाए और प्रबंधित किए जाते हैं।

वर्चुअल डिस्ट्रक्टर ~FileAccessor() ([SWS_PER_00594]) एक सुरक्षित रिलीज़ सुनिश्चित करता है, जो बेस क्लास पॉइंटर्स के माध्यम से पॉलीमॉर्फिक विनाश की अनुमति देता है। संगामिति के संबंध में, सभी मेंबर फ़ंक्शंस को गैर-थ्रेड-सुरक्षित ([SWS_PER_00162], [SWS_PER_00424], [SWS_PER_00107], [SWS_PER_00163], [SWS_PER_00164]) के रूप में निर्दिष्ट किया गया है। परिणामस्वरूप, एक ही इंस्टेंस पर विभिन्न थ्रेड्स से समवर्ती एक्सेस को एप्लिकेशन द्वारा सिंक्रोनाइज़ किया जाना चाहिए।

उपयोग पथ

FileAccessor के विशिष्ट उपयोग में फ़ाइल आकार की क्वेरी करना, वर्तमान स्थिति का निर्धारण करना और रीड या राइट एक्सेस की तैयारी के लिए लक्षित स्थिति परिवर्तन शामिल हैं:

  • आकार क्वेरी: GetSize() के माध्यम से बाइट्स में वर्तमान फ़ाइल आकार का निर्धारण किया जाता है ([SWS_PER_00424])।
  • स्थिति क्वेरी: GetPosition() के साथ, एप्लिकेशन फ़ाइल की शुरुआत से वर्तमान बाइट ऑफ़सेट की क्वेरी करता है, जो ठीक फ़ाइल के अंत में भी स्थित हो सकता है ([SWS_PER_00162])।
  • पूर्ण पोज़िशनिंग: SetPosition() कर्सर को फ़ाइल की शुरुआत से एक पूर्ण ऑफ़सेट पर सेट करता है ([SWS_PER_00163])।
  • सापेक्ष विस्थापन: MovePosition() कर्सर को Origin::kBeginning, Origin::kCurrent या Origin::kEnd से एक हस्ताक्षरित (signed) ऑफ़सेट द्वारा विस्थापित करता है ([SWS_PER_00164])।
  • फ़ाइल-अंत जांच: मेथड IsEof() इंगित करता है कि क्या वर्तमान स्थिति फ़ाइल के अंत तक पहुँच गई है ([SWS_PER_00107])।
फ़ाइल स्थिति को नेविगेट और क्वेरी करनाएप्लिकेशनFileAccessorGetSize()फ़ाइल का आकार (Bytes)SetPosition(position)altposition <= फ़ाइल का आकारResult<void> (Erfolg)position > फ़ाइल का आकारPerErrc::kInvalidPosition के साथ ResultMovePosition(Origin::kCurrent, offset)Result<uint64_t> (neue Position)IsEof()bool (EOF-Status)

अनुक्रम आरेख: त्रुटि जांच सहित स्थिति प्रश्नों और नेविगेशन चरणों का विशिष्ट क्रम। स्रोत: [SWS_PER_00424], [SWS_PER_00162], [SWS_PER_00163], [SWS_PER_00164], [SWS_PER_00107]

त्रुटि परिदृश्य

FileAccessor के सभी ऑपरेशन अपवाद-सुरक्षित घोषित किए गए हैं (noexcept)। नेविगेशन कॉल्स के दौरान संभावित त्रुटि स्थितियां ara::core::Result के माध्यम से लौटाई जाती हैं:

यदि कोई एप्लिकेशन SetPosition() के माध्यम से फ़ाइल के अंत से परे किसी स्थिति पर जाने का प्रयास करता है, तो कॉल त्रुटि कोड PerErrc::kInvalidPosition के साथ विफल हो जाता है ([SWS_PER_00163])। यही बात MovePosition() पर भी लागू होती है, यदि परिकलित लक्ष्य स्थिति ऋणात्मक होगी या फ़ाइल के अंत के बाद स्थित होगी ([SWS_PER_00164])। दोनों विधियों के लिए एक सख्त रोलबैक सिमेंटिक्स अनिवार्य रूप से निर्धारित है: यदि कोई त्रुटि होती है, तो फ़ाइल की पूर्व मान्य स्थिति अपरिवर्तित रहती है ([SWS_PER_00163], [SWS_PER_00164])।

क्वेरी विधियां GetSize() ([SWS_PER_00424]), GetPosition() ([SWS_PER_00162]) और IsEof() ([SWS_PER_00107]) सीधे बेस डेटा प्रकार लौटाती हैं और कोई विशिष्ट त्रुटि कोड उत्पन्न नहीं करती हैं।

यह पाठ AUTOSAR विनिर्देश R25-11 के आधार पर एक AI द्वारा लिखा गया है। यह नेविगेशन एब्स्ट्रैक्शन का एक समग्र चित्र प्रदान करके मानक दस्तावेज़ीकरण का पूरक है।

सदस्य मानचित्र

कंस्ट्रक्टर और डिस्ट्रक्टर

2

ऑपरेटर

1

क्लास आरेख

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

G nara__per__FileAccessor932 FileAccessor + FileAccessor() + operator=() + ~FileAccessor() + GetPosition() + GetSize() + IsEof() + MovePosition() + SetPosition() nara__per__ReadAccessor956 ReadAccessor nara__per__ReadAccessor956->nara__per__FileAccessor932 nara__per__WriteAccessor940 WriteAccessor nara__per__WriteAccessor940->nara__per__FileAccessor932

विवरण दृश्य

रूपरेखा में कोई प्रविष्टि चुनें।

कंस्ट्रक्टर और डिस्ट्रक्टर

FileAccessor फ़ंक्शन 3

The default constructor for FileAccessor shall not be used.

ओवरलोड FileAccessor 3
FileAccessor ()=delete; SWS_PER_00589
FileAccessor (FileAccessor &&ra)=delete; SWS_PER_00590
FileAccessor (const FileAccessor &)=delete; SWS_PER_00592
~FileAccessor फ़ंक्शन

Destructor for FileAccessor.

virtual ~FileAccessor () noexcept;

मेथड

GetPosition फ़ंक्शन

Returns the current position relative to the beginning of the file. The returned position may be at the end of the file.

std::uint64_t GetPosition () const noexcept;
GetSize फ़ंक्शन

Returns the current size of a file in bytes.

std::uint64_t GetSize () const noexcept;
IsEof फ़ंक्शन

Checks if the current position is at end of file.

bool IsEof () const noexcept;
MovePosition फ़ंक्शन

Moves the current position in the file relative to the Origin. In case of an error, the current position is not changed.

ara::core::Result< std::uint64_t > MovePosition (Origin origin, std::int64_t offset) noexcept;
SetPosition फ़ंक्शन

Sets the current position relative to the beginning of the file. In case of an error, the current position is not changed.

ara::core::Result< void > SetPosition (std::uint64_t position) noexcept;

ऑपरेटर

operator= फ़ंक्शन 2

The move assignment operator for FileAccessor shall not be used.

ओवरलोड = 2
FileAccessor & operator= (FileAccessor &&ra)=delete; SWS_PER_00591
FileAccessor & operator= (const FileAccessor &)=delete; SWS_PER_00593

मेथड का प्रलेखन

फ़ंक्शन FileAccessor [SWS_PER_00589] Upstream: RS_PER_00004, RS_AP_00120, RS_AP_00129, RS_AP_00146

FileAccessor ()=delete;

The default constructor for FileAccessor shall not be used.

Header-Datei#include "ara/per/file_accessor.h"
Scopeclass ara::per::FileAccessor

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

Record
AUTOSAR/AP/record/SWS_PER_00589
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00589@rel:R25-11#9658e0d6
Content hash
9658e0d6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00589
Status: valid/unmigrated Version: rel:R25-11#f2d5e1fc Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00589@rel:R25-11#f2d5e1fc
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन FileAccessor [SWS_PER_00590] Upstream: RS_PER_00004, RS_AP_00120, RS_AP_00121, RS_AP_00129, RS_AP_00145, RS_AP_00159

FileAccessor (FileAccessor &&ra)=delete;

The move constructor for FileAccessor shall not be used.

Header-Datei#include "ara/per/file_accessor.h"
Scopeclass ara::per::FileAccessor

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

Record
AUTOSAR/AP/record/SWS_PER_00590
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00590@rel:R25-11#450fbeb2
Content hash
450fbeb2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00590
Status: valid/unmigrated Version: rel:R25-11#08b3d49a Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00590@rel:R25-11#08b3d49a
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन FileAccessor [SWS_PER_00592] Upstream: RS_PER_00004, RS_AP_00120, RS_AP_00145

FileAccessor (const FileAccessor &)=delete;

The copy constructor for FileAccessor shall not be used.

Header-Datei#include "ara/per/file_accessor.h"
Scopeclass ara::per::FileAccessor

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

Record
AUTOSAR/AP/record/SWS_PER_00592
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00592@rel:R25-11#0b50311d
Content hash
0b50311d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00592
Status: valid/unmigrated Version: rel:R25-11#d27604ed Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00592@rel:R25-11#d27604ed
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन GetPosition [SWS_PER_00162] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00159

std::uint64_t GetPosition () const noexcept;

Returns the current position relative to the beginning of the file. The returned position may be at the end of the file.

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

Rückgabewert

TypBeschreibung
std::uint64_tThe current position in the file in bytes from the beginning of the file.

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

Record
AUTOSAR/AP/record/SWS_PER_00162
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00162@rel:R25-11#fc3f31d8
Content hash
fc3f31d8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00162
Status: valid/unmigrated Version: rel:R25-11#f20dc3e3 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00162@rel:R25-11#f20dc3e3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#416e7a9c2026-09-30
  • R19-11rel:R19-11#ae38b90b2026-10-14
  • R20-11rel:R20-11#a53d148f2026-10-14
  • R21-11rel:R21-11#b0fecce62026-10-14
  • R22-11rel:R22-11#0f4d44d22026-10-14
  • R23-11rel:R23-11#912ecabe2026-10-14
  • R24-11rel:R24-11#eb8d26992026-10-14
  • R25-11rel:R25-11#f20dc3e32026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन GetSize [SWS_PER_00424] Upstream: RS_PER_00017, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00159

std::uint64_t GetSize () const noexcept;

Returns the current size of a file in bytes.

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

Rückgabewert

TypBeschreibung
std::uint64_tThe current size of the file in bytes.

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

Record
AUTOSAR/AP/record/SWS_PER_00424
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00424@rel:R25-11#b3f91408
Content hash
b3f91408
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00424
Status: valid/unmigrated Version: rel:R25-11#0403ec61 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00424@rel:R25-11#0403ec61
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#212e3e742026-09-30
  • R20-11rel:R20-11#4d8b55b62026-10-14
  • R21-11rel:R21-11#ea1c0d632026-10-14
  • R22-11rel:R22-11#20de23fe2026-10-14
  • R23-11rel:R23-11#ef0c633f2026-10-14
  • R24-11rel:R24-11#5d07b21d2026-10-14
  • R25-11rel:R25-11#0403ec612026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन IsEof [SWS_PER_00107] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00159

bool IsEof () const noexcept;

Checks if the current position is at end of file.

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

Rückgabewert

TypBeschreibung
boolTrue if the current position is at the end of the file, false otherwise.

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

Record
AUTOSAR/AP/record/SWS_PER_00107
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00107@rel:R25-11#5341329c
Content hash
5341329c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00107
Status: valid/unmigrated Version: rel:R25-11#1ea53dae Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00107@rel:R25-11#1ea53dae
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a72969de2026-09-30
  • R19-11rel:R19-11#a79d80012026-10-14
  • R20-11rel:R20-11#6fb143982026-10-14
  • R21-11rel:R21-11#6fb143982026-10-14
  • R22-11rel:R22-11#a37547212026-10-14
  • R23-11rel:R23-11#a3e1b2842026-10-14
  • R24-11rel:R24-11#b7d2c0c02026-10-14
  • R25-11rel:R25-11#1ea53dae2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन MovePosition [SWS_PER_00164] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< std::uint64_t > MovePosition (Origin origin, std::int64_t offset) noexcept;

Moves the current position in the file relative to the Origin. In case of an error, the current position is not changed.

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 436bd0736ae4 उद्गम
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

ara::per::FileAccessor क्लास का सिंक्रोनस मेथड MovePosition वर्तमान फ़ाइल स्थिति को एक परिभाषित संदर्भ बिंदु के सापेक्ष विस्थापित करता है [SWS_PER_00164]। यह फ़ंक्शन noexcept के रूप में घोषित है [SWS_PER_00164]। पैरामीटर के रूप में यह Origin प्रकार का प्रारंभिक बिंदु origin और हस्ताक्षरित बाइट ऑफ़सेट offset लेता है [SWS_PER_00164]। सफल निष्पादन पर, मेथड फ़ाइल की शुरुआत से परिणामी निरपेक्ष बाइट स्थिति युक्त एक ara::core::Result लौटाता है [SWS_PER_00164]।

परस्पर क्रिया और पैरामीटर मान

संदर्भ बिंदु origin को इनमिरेशन Origin द्वारा निर्धारित किया जाता है [SWS_PER_00146]:

  • Origin::kBeginning: फ़ाइल की शुरुआत से विस्थापन; offset यहाँ धनात्मक हो सकता है [SWS_PER_00164], [SWS_PER_00146]।
  • Origin::kCurrent: वर्तमान फ़ाइल स्थिति से विस्थापन; offset धनात्मक या ऋणात्मक हो सकता है, जहाँ शून्य का मान स्थिति को नहीं बदलता है [SWS_PER_00164], [SWS_PER_00146]।
  • Origin::kEnd: फ़ाइल के अंत के सापेक्ष विस्थापन; offset ऋणात्मक हो सकता है, जबकि शून्य का ऑफ़सेट स्थिति को ठीक फ़ाइल के अंत पर सेट करता है [SWS_PER_00164], [SWS_PER_00146]।

त्रुटि प्रबंधन

त्रुटि की स्थिति में, पिछली फ़ाइल स्थिति को रोलबैक सिमेंटिक्स द्वारा परिवर्तित नहीं किया जाता है [SWS_PER_00164]। यदि परिकलित लक्ष्य बिंदु शून्य से कम मान देता है या यह फ़ाइल के अंत से परे स्थित है, तो त्रुटि कोड PerErrc::kInvalidPosition लौटाया जाता है [SWS_PER_00164]। इसके अतिरिक्त, परिणाम में निर्माता-विशिष्ट त्रुटियाँ शामिल हो सकती हैं [SWS_PER_00164]।

समवर्तीता और प्रतिबंध

मेथड को exception safe के रूप में निर्दिष्ट किया गया है [SWS_PER_00164]। चूँकि कार्यान्वयन को not thread-safe के रूप में वर्गीकृत किया गया है, इसलिए FileAccessor के समान इंस्टेंस पर समानांतर एक्सेस को कॉलर की ओर से सिंक्रोनाइज़ किया जाना चाहिए [SWS_PER_00164]।

यह टेक्स्ट एक AI सिस्टम द्वारा तैयार किया गया था और autodocs द्वारा क्यूरेट किया गया था।

इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I1)

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

Parameter (in)

ParameterBeschreibung
originStarting point from which to move ’offset’ bytes.
offsetOffset in bytes relative to ’origin’. Can be positive in case of k Beginning and kCurrent and negative in case of kCurrent and k End. In case of kCurrent, an offset of zero will not change the current position. In case of kEnd, an offset of zero will set the position to the end of the file.

Rückgabewert

TypBeschreibung
ara::core::Result<std::uint64_t >A Result containing the new position in bytes from the beginning of the file. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
PerErrc::kInvalidPositionrollback_semantics Returned if the resulting position is lower than zero or beyond the end of the file.

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

Record
AUTOSAR/AP/record/SWS_PER_00164
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00164@rel:R25-11#9297dec2
Content hash
9297dec2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00164
Status: valid/unmigrated Version: rel:R25-11#ccd6513c Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00164@rel:R25-11#ccd6513c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#66a724ef2026-09-30
  • R19-11rel:R19-11#73c3e07f2026-10-14
  • R20-11rel:R20-11#4c68dcef2026-10-14
  • R21-11rel:R21-11#824627d92026-10-14
  • R22-11rel:R22-11#838d6e5d2026-10-14
  • R23-11rel:R23-11#129626382026-10-14
  • R24-11rel:R24-11#8245580d2026-10-14
  • R25-11rel:R25-11#ccd6513c2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन SetPosition [SWS_PER_00163] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > SetPosition (std::uint64_t position) noexcept;

Sets the current position relative to the beginning of the file. In case of an error, the current position is not changed.

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

Parameter (in)

ParameterBeschreibung
positionCurrent position in the file in bytes from the beginning of the file.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
PerErrc::kInvalidPositionrollback_semantics Returned if the given position is beyond the end of the file.

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

Record
AUTOSAR/AP/record/SWS_PER_00163
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00163@rel:R25-11#a0be851a
Content hash
a0be851a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00163
Status: valid/unmigrated Version: rel:R25-11#70153a82 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00163@rel:R25-11#70153a82
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#758322e02026-09-30
  • R19-11rel:R19-11#1942368c2026-10-14
  • R20-11rel:R20-11#84c129222026-10-14
  • R21-11rel:R21-11#3b14f9b62026-10-14
  • R22-11rel:R22-11#932ec6d22026-10-14
  • R23-11rel:R23-11#f53627272026-10-14
  • R24-11rel:R24-11#b6f855cb2026-10-14
  • R25-11rel:R25-11#70153a822026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन operator= [SWS_PER_00591] Upstream: RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00145, RS_AP_00159

FileAccessor & operator= (FileAccessor &&ra)=delete;

The move assignment operator for FileAccessor shall not be used.

Header-Datei#include "ara/per/file_accessor.h"
Scopeclass ara::per::FileAccessor

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

Record
AUTOSAR/AP/record/SWS_PER_00591
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00591@rel:R25-11#7e044982
Content hash
7e044982
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00591
Status: valid/unmigrated Version: rel:R25-11#74c045de Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00591@rel:R25-11#74c045de
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन operator= [SWS_PER_00593] Upstream: RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_AP_00145

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

The copy assignment operator for FileAccessor shall not be used.

Header-Datei#include "ara/per/file_accessor.h"
Scopeclass ara::per::FileAccessor

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

Record
AUTOSAR/AP/record/SWS_PER_00593
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00593@rel:R25-11#9a753b34
Content hash
9a753b34
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00593
Status: valid/unmigrated Version: rel:R25-11#01ebcde1 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00593@rel:R25-11#01ebcde1
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन ~FileAccessor [SWS_PER_00594] Upstream: RS_PER_00004, RS_AP_00120, RS_AP_00129, RS_AP_00134, RS_AP_00145, RS_AP_00159

virtual ~FileAccessor () noexcept;

Destructor for FileAccessor.

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

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

Record
AUTOSAR/AP/record/SWS_PER_00594
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00594@rel:R25-11#f3f4d5a5
Content hash
f3f4d5a5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00594
Status: valid/unmigrated Version: rel:R25-11#f4cbf0b1 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00594@rel:R25-11#f4cbf0b1
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill