دالة Clear [SWS_DM_00671] Upstream: RS_AP_00119, RS_AP_00139, RS_Diag_04194
ara::core::Future< void > Clear (std::uint32_t dtcGroup) noexcept;
Method for Clearing a DTC or a group of DTCs.
تُستخدم الدالة Clear للفئة ara::diag::DTCInformation ([SWS_DM_00671]) لحذف DTC فردي أو مجموعة DTC في ذاكرة الأخطاء (AUTOSAR_AP_SWS_Diagnostics §7.3.2.8.6 «Service 0x14 – ClearDiagnosticInformation»). وتستقبل كمعلمة عبر dtcGroup معرّف المجموعة أو الـ DTC المراد حذفه، وتُرجع النتيجة بشكل غير متزامن كـ ara::core::Future<void> ([SWS_DM_00671]). وتخضع صلاحية حذف الـ DTCs الفردية أو المجموعات لمعلمات التكوين مثل clearDtcLimitation ([SWS_DM_00160]).
معالجة الأخطاء والدلالة
تم التصريح عن الدالة كـ noexcept وتُبلغ عن الأخطاء بشكل غير متزامن عبر Future بدلالة التراجع ([SWS_DM_00671]). رموز الأخطاء المحتملة من DiagErrc هي:
DiagErrc::kBusy: الواجهة مشغولة بالفعل بمعالجة أخرى.DiagErrc::kFailed: حدث خطأ معالجة عام أثناء التنفيذ.DiagErrc::kMemoryError: حدث خطأ في الذاكرة أثناء المعالجة.DiagErrc::kWrongDtc: تم تمرير رقم DTC غير صالح.DiagErrc::kServiceNotAvailable: الوظائف الأساسية لـ Diagnostic Manager غير متوفرة حاليًا.
التزامن والتمييز
الدالة آمنة من الاستثناءات (exception safe)، غير أنها مصنفة صراحة بأنها not thread-safe ([SWS_DM_00671]). ولذلك يجب على المتصل مزامنة الاستدعاءات المتوازية على النسخة نفسها، وإلا فهناك خطر حدوث DiagErrc::kBusy. تفسير: من المحتمل ألا يتم استيفاء ara::core::Future المرجع إلا بعد إخلاء ذاكرة الأخطاء المادية بالكامل، على نحو مماثل لتأكيد خدمة UDS ذات الرمز 0x14 ([SWS_DM_00162]). سؤال Q-b97545b6864b24aa (مفتوح)
من حيث الوظيفة، يجب تمييز هذه العملية عن دوال SOVD التي تحمل الاسم نفسه: فبينما يفرغ ara::diag::DiagnosticSovdContentElementDataView::Clear ([SWS_DM_02233]) حاويات البيانات بشكل متزامن وآمن للخيوط، تتحكم هذه الدالة في تسلسلات التشخيص في Diagnostic Management.
تم تنظيم ملاحظة الاستخدام هذه بواسطة ذكاء اصطناعي وتستند حصريًا إلى مقتطفات مواصفات AUTOSAR AP الإصدار R25-11.
دليل المنفِّذ قيد الإعداد (التعقيد I1)
| Header-Datei | #include "ara/diag/dtc_information.h" |
|---|---|
| Scope | class ara::diag::DTCInformation |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | not thread-safe DiagErrc::kBusy rollback_semantics |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| dtcGroup | DTC group to be cleared. |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Future< void > | void or errors |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| Interface is busy with processing. | |
| DiagErrc::kFailed | rollback_semantics Failed to process. |
| DiagErrc::kMemoryError | rollback_semantics A memory error occurred during processing. |
| DiagErrc::kWrongDtc | rollback_semantics A wrong DTC number was requested. |
| DiagErrc::kServiceNotAvailable | rollback_semantics The call cannot be executed, because essential DM functionality is currently not available. |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_DM_00671- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_DM_00671@rel:R25-11#82c87b28- Content hash
82c87b28- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00671
Status: valid/unmigrated
Version: rel:R25-11#5f2d812c
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_DM_00671@rel:R25-11#5f2d812c
Recorded Revisions (8):
- R25-11
rel:R25-11#eeae02f92026-09-30 - R19-11
rel:R19-11#51e8d4512026-10-14 - R20-11
rel:R20-11#a949cf792026-10-14 - R21-11
rel:R21-11#a949cf792026-10-14 - R22-11
rel:R22-11#a1f423932026-10-14 - R23-11
rel:R23-11#cc3a92472026-10-14 - R24-11
rel:R24-11#ee42b6492026-10-14 - R25-11
rel:R25-11#5f2d812c2026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · الأصل الألماني