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 هي فئة نهائية لوحدة الاستمرارية (per) الخاصة بـ AUTOSAR Adaptive Platform وتشتق افتراضياً من 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]. وتكون حالة الملف غير معروفة وقد تتلف بالكامل (دون دلالات التراجع rollback).
  • PerErrc::kOutOfStorageSpace: مساحة تخزين فعلية غير كافية [SWS_PER_00423]، [SWS_PER_00166]، [SWS_PER_00122]. عند الكتابة، يتم تجاهل الجزء الزائد ويستقر الموضع عند نهاية الملف (دون دلالات التراجع rollback).
  • PerErrc::kQuotaExceeded: سيتجاوز الملف الحد الأقصى للحجم الذي تم تكوينه (AllowedSize) [SWS_PER_00423]، [SWS_PER_00166]، [SWS_PER_00122] (دلالات التراجع rollback).
  • PerErrc::kEncryptionFailed: يفشل التشفير أو فك التشفير [SWS_PER_00423]، [SWS_PER_00166]، [SWS_PER_00122]، [SWS_PER_00428]. يتم بالفعل تحديث المخزن المؤقت والموضع، ولكن يتعذر الحفاظ على استمرارية الملف ويعكس إصداراً أقدم على وحدة التخزين (دلالات التراجع rollback).
  • PerErrc::kAuthenticationFailed: يفشل حساب MAC أو التحقق منه [SWS_PER_00423]، [SWS_PER_00166]، [SWS_PER_00122]، [SWS_PER_00428] (دلالات التراجع rollback).
  • PerErrc::kValidationFailed: لا يمكن ضمان صلاحية البيانات المخزنة [SWS_PER_00423]، [SWS_PER_00166]، [SWS_PER_00428] (دلالات التراجع rollback).
  • PerErrc::kInvalidSize: حجم الملف الجديد عند SetFileSize() أكبر من حجم الملف الحالي [SWS_PER_00428] (دلالات التراجع rollback).

تم إنشاء هذا الدليل بواسطة ذكاء اصطناعي بناءً على مواصفة AUTOSAR R25-11.

خريطة الأعضاء

المُنشئات والمُتلف

2

الدوال الأعضاء

4

المعاملات

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;

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#46e4778f
Content hash
46e4778f
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 · الأصل الألماني

تنقل الدالة العضو SyncToFile للفئة ara::per::WriteAccessor (المعرّفة في #include "ara/per/write_accessor.h") محتوى الملف الحالي بشكل متزامن إلى وحدة التخزين الفعلية [SWS_PER_00122]. لا يقبل الاستدعاء أي معلمات تمرير ويُرجع ara::core::Result<void>، والذي يكون فارغاً في حالة النجاح أو يحتوي على رموز أخطاء محددة لوحدة Persistency أو أخطاء خاصة بالشركة المصنعة في حالة حدوث خطأ [SWS_PER_00122].

عند التنفيذ، يمكن أن تحدث حالات خطأ مختلفة، والتي يتمتع بعضها بدلالات التراجع (rollback) [SWS_PER_00122]:

  • StorageFailure: يحدث عندما يفشل الوصول الفعلي إلى وسيط التخزين (بدون دلالات تراجع) [SWS_PER_00122].
  • PerErrc::kOutOfStorageSpace: يتم إرجاعه إذا كانت مساحة التخزين الفعلية غير كافية للملف المُعدّل (بدون دلالات تراجع) [SWS_PER_00122].
  • PerErrc::kQuotaExceeded: يتم الإبلاغ عنه عندما يتجاوز الملف الحجم الأقصى المكوّن AllowedSize لـ File Storage (مع دلالات تراجع) [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#b4a9323c
Content hash
b4a9323c
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#98e8206c
Content hash
98e8206c
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 · الأصل الألماني

تكتب الدالة WriteBinary للفئة ara::per::WriteAccessor محتوى تسلسل بايتات (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#58c09be8
Content hash
58c09be8
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 · الأصل الألماني

الاستخدام

تكتب الدالة المتزامنة WriteText للواجهة ara::per::WriteAccessor محتوى 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#19563485
Content hash
19563485
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#e07fb6c4
Content hash
e07fb6c4
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#ddff1d3c
Content hash
ddff1d3c
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