फ़ंक्शन CompareKey [SWS_DM_00765] Upstream: RS_AP_00138, RS_Diag_04005, RS_Diag_04170, RS_AP_00119
virtual ara::core::Future< KeyCompareResultType > CompareKey (ara::core::Span< const std::uint8_t > key, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;
This method is called, when a diagnostic request has been finished, to notify about the outcome.
उपयोग
क्लास ara::diag::SecurityAccess [SWS_DM_00765] का प्योर वर्चुअल मेथड CompareKey UDS सेवा 0x27 (SecurityAccess) में क्लाइंट द्वारा प्रेषित की (key) को सत्यापित करने के लिए एप्लिकेशन पक्ष पर लागू किया जाता है SWS Diagnostics §7.3.2.8.9 “Service 0x27 – SecurityAccess”। GetSeed के साथ मिलकर, यह ISO 14229-1 के अनुसार स्टैटिक सीड-की तंत्र का आधार बनता है [SWS_DM_00863]।
फ़ंक्शन के पैरामीटर में निम्नलिखित शामिल हैं:
key: जांची जाने वाली की (key) डेटा पर एकara::core::Span<const std::uint8_t>। बफ़र तब तक मान्य रहता है जब तक संबंधित Promise पूरा नहीं हो जाता याcancellationHandlerके माध्यम से प्रोसेसिंग रद्द नहीं हो जाती [SWS_DM_00765]।metaInfo: आने वाले डायग्नोस्टिक अनुरोध की मेटा-जानकारी [SWS_DM_00765]।cancellationHandler:cancellationHandler.IsCanceledके माध्यम से निरस्तीकरण की जांच करने और बातचीत रद्द होने की स्थिति मेंcancellationHandler.SetNotifierके माध्यम से एक अधिसूचना फ़ंक्शन पंजीकृत करने की अनुमति देता है [SWS_DM_00765]।
सत्यापन परिणाम ara::core::Future<KeyCompareResultType> के माध्यम से एसिंक्रोनस रूप से प्रदान किया जाता है [SWS_DM_00765]।
त्रुटि प्रबंधन और परस्पर क्रिया
यदि की (key) तुलना विफल हो जाती है या प्रोसेसिंग के दौरान कोई त्रुटि उत्पन्न होती है, तो Future के माध्यम से ISO 14229-1 के अनुसार DiagUdsNrcErrc का उपयोग करके एक उपयुक्त Negative Response Code (NRC) पास किया जाना चाहिए [SWS_DM_00765]। यदि CompareKey के लिए अनुरोधित सब-फ़ंक्शन कॉन्फ़िगर नहीं है, तो अनुरोध का उत्तर NRC 0x12 (kSubFunctionNotSupported) के साथ दिया जाता है [SWS_DM_00363]। Diagnostic Server विफल प्रयासों की गणना करता है [SWS_DM_00270] और उनकी थ्रेशोल्ड मानों से तुलना करता है [SWS_DM_00271]।
यदि सुरक्षा एक्सेस सफलतापूर्वक अनलॉक हो जाता है, तो सर्वर आंतरिक रूप से सुरक्षा स्तर को अपडेट करता है [SWS_DM_00846], विफल प्रयास काउंटर को रीसेट करता है [SWS_DM_00270] और सुरक्षा घटना SEV_UDS_SECURITY_ACCESS_SUCCESSFUL की रिपोर्ट IdsM को करता है [SWS_DM_02019]।
समवर्तीता और प्रतिबंध
इंटरफ़ेस को noexcept के रूप में घोषित किया गया है और यह एक्सेप्शन-सुरक्षित (exception safe) है [SWS_DM_00765]। थ्रेड-सुरक्षा सशर्त (conditional) है: क्या कार्यान्वयन को थ्रेड-सुरक्षित होना चाहिए, यह SecurityAccess के कंस्ट्रक्टर में पास किए गए ConcurrencyType द्वारा निर्धारित किया जाता है [SWS_DM_00765]।
यह उपयोग नोट AUTOSAR विनिर्देश के आधार पर एक AI द्वारा जनरेट किया गया था।
इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I2)
| Header-Datei | #include "ara/diag/security_access.h" |
|---|---|
| Scope | class ara::diag::SecurityAccess |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | conditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| key | The key to be validated. Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler. |
| metaInfo | MetaInfo of the request. |
| cancellationHandler | This parameter is used to • Query the current cancellation status by calling cancellationHandler.IsCanceled. Returns TRUE in case, the current conversation has been cancelled and FALSE otherwise. • Register a notifier function by calling cancellationHandler.SetNotifier. The registered notifier is called if the current conversation is cancelled. |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Future< KeyCompareResultType > | Result of the key validation. |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| Please use an applicable NRC, as defined in ISO 14229-1, using DiagUdsNrcErrc. | |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_DM_00765- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_DM_00765@rel:R25-11#ed9e0e60- Content hash
ed9e0e60- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00765
Status: valid/unmigrated
Version: rel:R25-11#fcff65aa
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_00765@rel:R25-11#fcff65aa
Recorded Revisions (8):
- R25-11
rel:R25-11#d4d3823f2026-09-30 - R19-11
rel:R19-11#4bf18d9e2026-10-14 - R20-11
rel:R20-11#52ff58612026-10-14 - R21-11
rel:R21-11#42d7f4462026-10-14 - R22-11
rel:R22-11#94736e912026-10-14 - R23-11
rel:R23-11#cbc123ea2026-10-14 - R24-11
rel:R24-11#e09a76d52026-10-14 - R25-11
rel:R25-11#fcff65aa2026-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 · जर्मन मूल