DEENESPTFRRUARHIKOZHNL

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

[SWS_PER_00595] Upstream: RS_PER_00004, RS_AP_00122, RS_AP_00146

class WriteAccessor final :              public virtual FileAccessor {...};

WriteAccessor is used to write file data. It provides the WriteBinary and WriteText methods featuring a Result for controlled, unformatted writing, and the operator<< method for simple formatted writing. It also provides SyncToFile() to flush the buffer of the operating system to the physical storage.

Header-Datei#include "ara/per/write_accessor.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per
Basisklasse(n)FileAccessor

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

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

बाइनरी और टेक्स्ट फ़ाइलों के बफ़र्ड लेखन और भौतिक मेमोरी में उनके सिंक्रोनाइज़ेशन के लिए कार्य करता है।

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

संदर्भ

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

जीवनचक्र

WriteAccessor का डिफ़ॉल्ट कंस्ट्रक्टर स्पष्ट रूप से हटा दिया गया है और इसका उपयोग नहीं किया जाना चाहिए [SWS_PER_00596]। (व्याख्या: WriteAccessor के इंस्टेंस संभवतः फ़ाइल स्टोरेज जैसी उच्च-स्तरीय पर्सिस्टेंस प्रबंधन इकाइयों के फ़ैक्टरी मेथड्स के माध्यम से निर्मित और प्रदान किए जाते हैं।) प्रश्न Q-af92be8494274611 (खुला)

विनाश वर्चुअल डिस्ट्रक्टर ~WriteAccessor() [SWS_PER_00597] के माध्यम से होता है। क्लास और इसकी मेथड्स को अपवाद-सुरक्षित (\"exception safe\") के रूप में निर्दिष्ट किया गया है और noexcept के रूप में घोषित किया गया है। समवर्ती निष्पादन के संबंध में, WriteAccessor थ्रेड-सुरक्षित नहीं है (\"not thread-safe\") [SWS_PER_00597]; एक ही इंस्टेंस पर समानांतर एक्सेस को एप्लिकेशन द्वारा बाहरी रूप से सुरक्षित किया जाना चाहिए।

उपयोग पथ

नियमित प्रवाह में अनफ़ॉर्मेटेड या फ़ॉर्मेटेड मोड में डेटा लिखना, फ़ाइल आकार का वैकल्पिक समायोजन और अंतिम स्थायी संग्रहण शामिल है:

  • बाइनरी डेटा लिखना: WriteBinary() के माध्यम से फ़ाइल में एक बाइट रेंज (ara::core::Span<const ara::core::Byte>) लिखी जाती है [SWS_PER_00423]।
  • टेक्स्ट डेटा लिखना: WriteText() के माध्यम से ara::core::StringView का उपयोग करके स्ट्रिंग्स पास की जाती हैं [SWS_PER_00166]। इसके अतिरिक्त, गैर-महत्वपूर्ण उपयोग मामलों के लिए एक सुविधाजनक फ़ंक्शन के रूप में operator<< उपलब्ध है, जिसमें होने वाली त्रुटियों को चुपचाप अनदेखा कर दिया जाता है [SWS_PER_00125]।
  • पर्सिस्टेंस के लिए बाध्य करना: भौतिक संग्रहण का समय पर्सिस्टेंस कार्यान्वयन पर निर्भर करता है; SyncToFile() ऑपरेटिंग सिस्टम के बफ़र को अनिवार्य रूप से स्टोरेज माध्यम में फ़्लश करता है [SWS_PER_00122], [SWS_PER_00423], [SWS_PER_00166]।
  • फ़ाइल का आकार समायोजित करना: SetFileSize() से फ़ाइल को छोटा किया जा सकता है, जिससे अतिरिक्त सामग्री हटा दी जाती है; फ़ाइल स्थिति अपरिवर्तित रहती है या अंतिम मान्य स्थिति अथवा 0 पर सेट हो जाती है [SWS_PER_00428]।
फ़ाइल सामग्री लिखने और सिंक्रोनाइज़ करने का विशिष्ट प्रवाहएप्लिकेशनWriteAccessorSpeichermediumWriteBinary(b) / WriteText(s)ara::core::Result<void>SyncToFile()Betriebssystem-Puffer flashenस्थिति / पुष्टिara::core::Result<void>

अनुक्रम आरेख: भौतिक मेमोरी में बाद के सिंक्रोनाइज़ेशन के साथ राइट ऑपरेशन्स। स्रोत: [SWS_PER_00423], [SWS_PER_00166], [SWS_PER_00122]

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

मेथड्स WriteBinary(), WriteText(), SyncToFile() और SetFileSize() एक ara::core::Result<void> लौटाती हैं, जिसमें विफलता की स्थिति में विशिष्ट त्रुटि कोड होते हैं:

  • PerErrc::kPhysicalStorageFailure: भौतिक स्टोरेज माध्यम तक पहुंच विफल हो जाती है [SWS_PER_00423], [SWS_PER_00166], [SWS_PER_00122], [SWS_PER_00428]। फ़ाइल की स्थिति अज्ञात है और पूरी तरह से भ्रष्ट हो सकती है (कोई रोलबैक सिमेंटिक्स नहीं)।
  • PerErrc::kOutOfStorageSpace: अपर्याप्त भौतिक स्टोरेज स्थान [SWS_PER_00423], [SWS_PER_00166], [SWS_PER_00122]। लिखते समय, अतिरिक्त भाग को छोड़ दिया जाता है और स्थिति फ़ाइल के अंत में आ जाती है (कोई रोलबैक सिमेंटिक्स नहीं)।
  • PerErrc::kQuotaExceeded: फ़ाइल कॉन्फ़िगर किए गए अधिकतम आकार (AllowedSize) से अधिक हो जाएगी [SWS_PER_00423], [SWS_PER_00166], [SWS_PER_00122] (रोलबैक सिमेंटिक्स)।
  • PerErrc::kEncryptionFailed: एन्क्रिप्शन या डिक्रिप्शन विफल रहता है [SWS_PER_00423], [SWS_PER_00166], [SWS_PER_00122], [SWS_PER_00428]। यद्यपि बफ़र और स्थिति अपडेट हो जाते हैं, फ़ाइल को पर्सिस्ट नहीं किया जा सकता है और यह मेमोरी पर एक पुराने संस्करण को दर्शाती है (रोलबैक सिमेंटिक्स)।
  • PerErrc::kAuthenticationFailed: MAC की गणना या सत्यापन विफल रहता है [SWS_PER_00423], [SWS_PER_00166], [SWS_PER_00122], [SWS_PER_00428] (रोलबैक सिमेंटिक्स)।
  • PerErrc::kValidationFailed: संग्रहीत डेटा की वैधता की गारंटी नहीं दी जा सकती [SWS_PER_00423], [SWS_PER_00166], [SWS_PER_00428] (रोलबैक सिमेंटिक्स)।
  • PerErrc::kInvalidSize: SetFileSize() पर नया फ़ाइल आकार वर्तमान फ़ाइल आकार से बड़ा है [SWS_PER_00428] (रोलबैक सिमेंटिक्स)।

यह गाइड AUTOSAR विनिर्देश R25-11 के आधार पर एक AI द्वारा जनरेट किया गया था।

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

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

2

ऑपरेटर

1

क्लास आरेख

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

G nara__per__WriteAccessor940 WriteAccessor + WriteAccessor() + ~WriteAccessor() + SetFileSize() + SyncToFile() + WriteBinary() + WriteText() + operator<<() nara__per__FileAccessor932 FileAccessor nara__per__WriteAccessor940->nara__per__FileAccessor932 nara__per__ReadWriteAccessor483 ReadWriteAccessor nara__per__ReadWriteAccessor483->nara__per__WriteAccessor940

विवरण दृश्य

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

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

WriteAccessor फ़ंक्शन

The default constructor for WriteAccessor shall not be used.

WriteAccessor ()=delete;
~WriteAccessor फ़ंक्शन

Destructor for WriteAccessor.

~WriteAccessor () override noexcept;

मेथड

SetFileSize फ़ंक्शन

Reduces the size of the file to ’size’, effectively removing the current content of the file beyond this size. The current file position is unchanged if it is lower than ’size’, or set to the last valid position in the file otherwise. If ’size’ is 0, the current file position will also be set to 0.

ara::core::Result< void > SetFileSize (std::uint64_t size) noexcept;
SyncToFile फ़ंक्शन

Flushes the current file content to the physical storage.

ara::core::Result< void > SyncToFile () noexcept;
WriteBinary फ़ंक्शन

Writes the content of a Span of Byte to the file. The time when the content is persisted depends on the implementation of Persistency. SyncTo File can be used to force Persistency to persist the file content. In case of an error, the file content might be corrupted, and the current position might or might not have changed. The expected state of the file for each supported error can be expected to be as follows: • kPhysicalStorageFailure: The state of the file is unknown. It could have been entirely destroyed. • kEncryptionFailed: The content of the file and the current position will have been updated, but could not be persisted. The persisted file will reflect an older version of the file. • kOutOfStorageSpace: The content of the file will have been updated, but the part of the operation that exceeded the quota will have been discarded. The current position will be at the end of the file.

ara::core::Result< void > WriteBinary (ara::core::Span< const ara::core::Byte > b) noexcept;
WriteText फ़ंक्शन

Writes the content of a StringView to the file. The time when the content is persisted depends on the implementation of Persistency. SyncTo File can be used to force Persistency to persist the file content. In case of an error, the file content might be corrupted, and the current position might or might not have changed. The expected state of the file for each supported error can be expected to be as follows: • kPhysicalStorageFailure: The state of the file is unknown. It could have been entirely destroyed. • kEncryptionFailed: The content of the file and the current position will have been updated, but could not be persisted. The persisted file will reflect an older version of the file. • kOutOfStorageSpace: The content of the file will have been updated, but the part of the operation that exceeded the quota will have been discarded. The current position will be at the end of the file.

ara::core::Result< void > WriteText (ara::core::StringView s) noexcept;

ऑपरेटर

operator<< फ़ंक्शन

Writes the content of a StringView to the file. This operator is just a comfort feature for non-safety critical Persistency users. If an error occurs during this operation, it is silently ignored.

WriteAccessor & operator<< (ara::core::StringView s) noexcept;

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

फ़ंक्शन SetFileSize [SWS_PER_00428] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00128, RS_AP_00127, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > SetFileSize (std::uint64_t size) noexcept;

Reduces the size of the file to ’size’, effectively removing the current content of the file beyond this size. The current file position is unchanged if it is lower than ’size’, or set to the last valid position in the file otherwise. If ’size’ is 0, the current file position will also be set to 0.

Header-Datei#include "ara/per/write_accessor.h"
Scopeclass ara::per::WriteAccessor
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe PerErrc::kPhysical no_rollback_semantics

Parameter (in)

ParameterBeschreibung
sizeNew size 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
StorageFailureReturned if access to the physical storage fails.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kInvalidSizerollback_semantics Returned if the new size is larger than the current size.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00428
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00428@rel:R25-11#9836b31f
Content hash
9836b31f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00428
Status: valid/unmigrated Version: rel:R25-11#ec5f6be0 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_00428@rel:R25-11#ec5f6be0
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#d8a624272026-09-30
  • R20-11rel:R20-11#695302e62026-10-14
  • R21-11rel:R21-11#aae1c4ab2026-10-14
  • R22-11rel:R22-11#3b63355b2026-10-14
  • R23-11rel:R23-11#4766ec6f2026-10-14
  • R24-11rel:R24-11#e7961eae2026-10-14
  • R25-11rel:R25-11#ec5f6be02026-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

फ़ंक्शन SyncToFile [SWS_PER_00122] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00128, RS_AP_00127, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > SyncToFile () noexcept;

Flushes the current file content to the physical storage.

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

ara::per::WriteAccessor क्लास का सदस्य फ़ंक्शन SyncToFile (#include "ara/per/write_accessor.h" में परिभाषित) फ़ाइल की वर्तमान सामग्री को भौतिक स्टोरेज पर सिंक्रोनस रूप से स्थानांतरित करता है [SWS_PER_00122]। यह कॉल कोई पासिंग पैरामीटर स्वीकार नहीं करता है और एक ara::core::Result<void> लौटाता है, जो सफलता की स्थिति में खाली होता है या विफलता की स्थिति में Persistency मॉड्यूल के विशिष्ट त्रुटि कोड अथवा निर्माता-विशिष्ट त्रुटियाँ रखता है [SWS_PER_00122]।

निष्पादन के दौरान विभिन्न त्रुटि स्थितियाँ उत्पन्न हो सकती हैं, जिनमें से कुछ में रोलबैक सिमेंटिक्स होते हैं [SWS_PER_00122]:

  • StorageFailure: तब घटित होता है, जब स्टोरेज माध्यम तक भौतिक पहुँच विफल हो जाती है (कोई रोलबैक सिमेंटिक्स नहीं) [SWS_PER_00122]।
  • PerErrc::kOutOfStorageSpace: तब लौटाया जाता है, यदि संशोधित फ़ाइल के लिए भौतिक स्टोरेज स्थान अपर्याप्त हो (कोई रोलबैक सिमेंटिक्स नहीं) [SWS_PER_00122]।
  • PerErrc::kQuotaExceeded: तब रिपोर्ट किया जाता है, जब फ़ाइल File Storage के कॉन्फ़िगर किए गए अधिकतम आकार AllowedSize से अधिक हो जाती है (रोलबैक सिमेंटिक्स के साथ) [SWS_PER_00122]।
  • PerErrc::kEncryptionFailed: संग्रहीत डेटा का एन्क्रिप्शन विफल हो जाता है (रोलबैक सिमेंटिक्स के साथ) [SWS_PER_00122]।
  • PerErrc::kAuthenticationFailed: डेटा के लिए MAC की गणना विफल हो जाती है (रोलबैक सिमेंटिक्स के साथ) [SWS_PER_00122]।

निष्पादन सुरक्षा के संबंध में, यह मेथड noexcept के रूप में घोषित है और exception safe के रूप में निर्दिष्ट है [SWS_PER_00122]। चूँकि इसे स्पष्ट रूप से not thread-safe के रूप में वर्गीकृत किया गया है, इसलिए एक ही WriteAccessor-इंस्टेंस पर एक साथ होने वाले कॉलों को संभवतः कॉलर द्वारा सिंक्रोनाइज़ किया जाना चाहिए [SWS_PER_00122]। प्रश्न Q-e4b139f136cdcd31 (खुला)

यह उपयोग संबंधी निर्देश AUTOSAR R25-11 विनिर्देश के आधार पर स्वचालित रूप से जनरेट किया गया था।

Header-Datei#include "ara/per/write_accessor.h"
Scopeclass ara::per::WriteAccessor
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe PerErrc::kPhysical no_rollback_semantics

Rückgabewert

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

Fehler

FehlercodeBeschreibung
StorageFailureReturned if access to the physical storage fails.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption of stored data fails.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the changed file.
PerErrc::kQuotaExceededrollback_semantics Returned if the changed file would exceed the configured maximum AllowedSize of the File Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00122
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00122@rel:R25-11#381318dc
Content hash
381318dc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00122
Status: valid/unmigrated Version: rel:R25-11#3cd97c20 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_00122@rel:R25-11#3cd97c20
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#34b017482026-09-30
  • R19-11rel:R19-11#eb696f922026-10-14
  • R20-11rel:R20-11#a1c7cb002026-10-14
  • R21-11rel:R21-11#02cbbcfc2026-10-14
  • R22-11rel:R22-11#e11db5d22026-10-14
  • R23-11rel:R23-11#90ba1ab02026-10-14
  • R24-11rel:R24-11#3320747f2026-10-14
  • R25-11rel:R25-11#3cd97c202026-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

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

WriteAccessor ()=delete;

The default constructor for WriteAccessor shall not be used.

Header-Datei#include "ara/per/write_accessor.h"
Scopeclass ara::per::WriteAccessor

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

Record
AUTOSAR/AP/record/SWS_PER_00596
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00596@rel:R25-11#e9e91e88
Content hash
e9e91e88
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00596
Status: valid/unmigrated Version: rel:R25-11#e4de44c4 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_00596@rel:R25-11#e4de44c4
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

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

ara::core::Result< void > WriteBinary (ara::core::Span< const ara::core::Byte > b) noexcept;

Writes the content of a Span of Byte to the file. The time when the content is persisted depends on the implementation of Persistency. SyncTo File can be used to force Persistency to persist the file content. In case of an error, the file content might be corrupted, and the current position might or might not have changed. The expected state of the file for each supported error can be expected to be as follows: • kPhysicalStorageFailure: The state of the file is unknown. It could have been entirely destroyed. • kEncryptionFailed: The content of the file and the current position will have been updated, but could not be persisted. The persisted file will reflect an older version of the file. • kOutOfStorageSpace: The content of the file will have been updated, but the part of the operation that exceeded the quota will have been discarded. The current position will be at the end of the file.

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

ara::per::WriteAccessor क्लास का फ़ंक्शन WriteBinary किसी बाइट अनुक्रम (ara::core::Span<const ara::core::Byte>) की सामग्री को एक फ़ाइल [SWS_PER_00423] में लिखता है। स्टोरेज माध्यम पर वास्तविक पर्सिस्टेंस का समय Persistency के कार्यान्वयन पर निर्भर करता है; SyncToFile के माध्यम से सिंक्रोनस पर्सिस्टिंग को बाध्य किया जा सकता है [SWS_PER_00423]। फ़ंक्शन noexcept के रूप में घोषित है और इसे अपवाद-सुरक्षित माना जाता है [SWS_PER_00423]।

समवर्तीता के संदर्भ में, WriteBinary को गैर-थ्रेड-सुरक्षित (not thread-safe) के रूप में निर्दिष्ट किया गया है [SWS_PER_00423]। समान एक्सेसॉर पर समानांतर एक्सेस को एप्लिकेशन स्तर पर सिंक्रोनाइज़ किया जाना चाहिए।

त्रुटि की स्थिति में, ara::core::Result<void> में एक त्रुटि कोड लौटाया जाता है, जिससे फ़ाइल सामग्री दूषित हो सकती है और वर्तमान स्थिति बदल सकती है [SWS_PER_00423]:

  • PerErrc::kPhysicalStorageFailure: फ़ाइल की स्थिति अज्ञात है और पूरी तरह से नष्ट हो सकती है (कोई रोलबैक सिमेंटिक्स नहीं) [SWS_PER_00423]।
  • PerErrc::kOutOfStorageSpace: अपर्याप्त भौतिक स्टोरेज; कोटा से अधिक का डेटा छोड़ दिया जाता है और फ़ाइल की स्थिति अंत में होती है [SWS_PER_00423]।
  • PerErrc::kQuotaExceeded: लेखन प्रक्रिया कॉन्फ़िगर किए गए अधिकतम आकार AllowedSize से अधिक हो जाएगी [SWS_PER_00423]।
  • PerErrc::kEncryptionFailed: एन्क्रिप्शन विफल हो जाता है; फ़ाइल सामग्री और स्थिति अपडेट हो जाती हैं, लेकिन पर्सिस्ट नहीं की जातीं (पर्सिस्ट की गई फ़ाइल पिछला संस्करण बनाए रखती है) [SWS_PER_00423]।
  • PerErrc::kAuthenticationFailed अथवा PerErrc::kValidationFailed: MAC गणना/सत्यापन विफल हो जाता है या संग्रहीत डेटा की वैधता की गारंटी नहीं दी जा सकती [SWS_PER_00423]।

यह उपयोग निर्देश विनिर्देश तत्व [SWS_PER_00423] के आधार पर स्वचालित रूप से तैयार किया गया था।

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

Header-Datei#include "ara/per/write_accessor.h"
Scopeclass ara::per::WriteAccessor
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe PerErrc::kPhysical no_rollback_semantics

Parameter (in)

ParameterBeschreibung
bA Span of Byte containing the bytes to be written.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
StorageFailureReturned if access to the physical storage fails.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the changed file.
PerErrc::kQuotaExceededrollback_semantics Returned if the changed file would exceed the configured maximum AllowedSize of the File Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00423
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00423@rel:R25-11#ca6437a7
Content hash
ca6437a7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00423
Status: valid/unmigrated Version: rel:R25-11#6fdad6e9 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_00423@rel:R25-11#6fdad6e9
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#998ae4662026-09-30
  • R20-11rel:R20-11#e69bb1c32026-10-14
  • R21-11rel:R21-11#cbf9c5262026-10-14
  • R22-11rel:R22-11#1ed9b43a2026-10-14
  • R23-11rel:R23-11#a70520942026-10-14
  • R24-11rel:R24-11#7f59ce5a2026-10-14
  • R25-11rel:R25-11#6fdad6e92026-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

फ़ंक्शन WriteText [SWS_PER_00166] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00135, RS_AP_00136, RS_AP_00139, RS_AP_00159

ara::core::Result< void > WriteText (ara::core::StringView s) noexcept;

Writes the content of a StringView to the file. The time when the content is persisted depends on the implementation of Persistency. SyncTo File can be used to force Persistency to persist the file content. In case of an error, the file content might be corrupted, and the current position might or might not have changed. The expected state of the file for each supported error can be expected to be as follows: • kPhysicalStorageFailure: The state of the file is unknown. It could have been entirely destroyed. • kEncryptionFailed: The content of the file and the current position will have been updated, but could not be persisted. The persisted file will reflect an older version of the file. • kOutOfStorageSpace: The content of the file will have been updated, but the part of the operation that exceeded the quota will have been discarded. The current position will be at the end of the file.

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

उपयोग

ara::per::WriteAccessor इंटरफ़ेस का सिंक्रोनस मेथड WriteText एक ara::core::StringView की सामग्री को खुली हुई फ़ाइल [SWS_PER_00166] में लिखता है। फ़ंक्शन को अपवाद-सुरक्षित (exception safe) के रूप में निर्दिष्ट किया गया है और यह C++ अपवादों को थ्रो न करने (noexcept) की घोषणा करता है [SWS_PER_00166]। भौतिक स्टोरेज का सटीक समय Persistency कार्यान्वयन पर निर्भर करता है; स्टोरेज माध्यम पर तत्काल बैकअप को SyncToFile के माध्यम से बाध्य किया जा सकता है [SWS_PER_00166]।

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

रिटर्न मान के रूप में एक ara::core::Result<void> कार्य करता है, जो विफलता की स्थिति में PerErrc से त्रुटि कोड या निर्माता-विशिष्ट त्रुटियों की रिपोर्ट करता है [SWS_PER_00166]। यदि ऑपरेशन विफल हो जाता है, तो फ़ाइल सामग्री दूषित हो सकती है और लेखन स्थिति बदल सकती है [SWS_PER_00166]:

  • PerErrc::kPhysicalStorageFailure: भौतिक स्टोरेज एक्सेस विफल; फ़ाइल की स्थिति अज्ञात है या फ़ाइल नष्ट हो गई है [SWS_PER_00166]।
  • PerErrc::kEncryptionFailed: एन्क्रिप्शन विफल हो जाता है; मेमोरी में फ़ाइल सामग्री और स्थिति अपडेट हो जाती हैं, लेकिन उन्हें पर्सिस्ट नहीं किया जा सकता, जिससे पुराना पर्सिस्ट किया गया संस्करण बना रहता है [SWS_PER_00166]।
  • PerErrc::kOutOfStorageSpace: अपर्याप्त भौतिक स्टोरेज स्थान; कोटा से अधिक का डेटा छोड़ दिया जाता है और स्थिति फ़ाइल के अंत में होती है [SWS_PER_00166]।
  • PerErrc::kQuotaExceeded, PerErrc::kValidationFailed और PerErrc::kAuthenticationFailed: रोलबैक सिमेंटिक्स बनाए रखते हुए कोटा उल्लंघन (AllowedSize) के साथ-साथ सत्यापन या प्रमाणीकरण त्रुटियों की रिपोर्ट करते हैं [SWS_PER_00166]।

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

ऑपरेशन को नॉन-थ्रेड-सुरक्षित (not thread-safe) के रूप में वर्गीकृत किया गया है [SWS_PER_00166]। WriteAccessor के समान इंस्टेंस पर समानांतर एक्सेस के मामले में, कॉलर्स को संभवतः कॉलों को स्वतंत्र रूप से सिंक्रोनाइज़ करना होगा। प्रश्न Q-73a6dbdb7d3df643 (खुला)

यह उपयोग नोट AUTOSAR Adaptive Platform R25-11 विनिर्देश पर आधारित है।

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

Header-Datei#include "ara/per/write_accessor.h"
Scopeclass ara::per::WriteAccessor
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe PerErrc::kPhysical no_rollback_semantics

Parameter (in)

ParameterBeschreibung
sA StringView containing the characters to be written.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
StorageFailureReturned if access to the physical storage fails.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the changed file.
PerErrc::kQuotaExceededrollback_semantics Returned if the changed file would exceed the configured maximum AllowedSize of the File Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

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

Record
AUTOSAR/AP/record/SWS_PER_00166
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00166@rel:R25-11#2750608c
Content hash
2750608c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00166
Status: valid/unmigrated Version: rel:R25-11#4e3c0698 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_00166@rel:R25-11#4e3c0698
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d1e8d7c42026-09-30
  • R19-11rel:R19-11#b4195f8c2026-10-14
  • R20-11rel:R20-11#c28d17da2026-10-14
  • R21-11rel:R21-11#18edcb3e2026-10-14
  • R22-11rel:R22-11#c7bb41a02026-10-14
  • R23-11rel:R23-11#e3cd60ee2026-10-14
  • R24-11rel:R24-11#604776402026-10-14
  • R25-11rel:R25-11#4e3c06982026-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_00125] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00159

WriteAccessor & operator<< (ara::core::StringView s) noexcept;

Writes the content of a StringView to the file. This operator is just a comfort feature for non-safety critical Persistency users. If an error occurs during this operation, it is silently ignored.

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

Parameter (in)

ParameterBeschreibung
sThe StringView containing the characters to be written.

Rückgabewert

TypBeschreibung
WriteAccessor &The WriteAccessor object.

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

Record
AUTOSAR/AP/record/SWS_PER_00125
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00125@rel:R25-11#d9ce19da
Content hash
d9ce19da
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00125
Status: valid/unmigrated Version: rel:R25-11#916de40e 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_00125@rel:R25-11#916de40e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8b2877cf2026-09-30
  • R19-11rel:R19-11#400a0ec52026-10-14
  • R20-11rel:R20-11#fe7ae1572026-10-14
  • R21-11rel:R21-11#fe7ae1572026-10-14
  • R22-11rel:R22-11#7a940c0b2026-10-14
  • R23-11rel:R23-11#01a269a42026-10-14
  • R24-11rel:R24-11#d4351b602026-10-14
  • R25-11rel:R25-11#916de40e2026-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

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

~WriteAccessor () override noexcept;

Destructor for WriteAccessor.

Header-Datei#include "ara/per/write_accessor.h"
Scopeclass ara::per::WriteAccessor
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_00597
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00597@rel:R25-11#cbc01dc6
Content hash
cbc01dc6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00597
Status: valid/unmigrated Version: rel:R25-11#0c1fc20b 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_00597@rel:R25-11#0c1fc20b
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