फ़ंक्शन RegisterGetHandler [SWS_CM_00114] Upstream: RS_CM_00218, RS_AP_00114, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00138
void RegisterGetHandler (std::function< ara::core::Future< FieldType >()> handler) noexcept;
Register a callback function to be invoked when a Get() request is received. The method exists only if the offered service contains a Field and Field.hasGetter ==TRUE
उपयोग
विधि RegisterGetHandler को सर्वर साइड पर स्केलेटन के फ़ील्ड ऑब्जेक्ट पर कॉल किया जाता है ([SWS_CM_00114])। यह जेनरेट किए गए कोड में विशेष रूप से तभी मौजूद होता है जब संबंधित फ़ील्ड (Field.hasGetter == TRUE) (EXP ARAComAPI §5.4.8.1 “Registering Getters”) के लिए इंटरफ़ेस विवरण में एक गेटर कॉन्फ़िगर किया गया हो। std::function<ara::core::Future<FieldType>()> प्रकार का एक कॉलबैक handler पास किया जाता है, जिसे किसी प्रॉक्सी के आने वाले Get() अनुरोध पर बाइंडिंग कार्यान्वयन द्वारा कॉल किया जाता है।
ऐसे हैंडलर का पंजीकरण पूरी तरह से वैकल्पिक है (EXP ARAComAPI §5.4.8.1 “Registering Getters”)। आमतौर पर, सेवा कार्यान्वयन को गेटर हैंडलर की आवश्यकता नहीं होती है, क्योंकि Communication Management Update() के माध्यम से अंतिम सेट किए गए मान को कैश करता है और प्रॉक्सी अनुरोधों का स्वतंत्र रूप से उत्तर देता है। एक हैंडलर विशेष रूप से तब उपयोगी होता है जब फ़ील्ड मान का निर्धारण समय लेने वाला या कम्प्यूटेशनल रूप से गहन होता है और इसलिए केवल वास्तविक आवश्यकता पर Promise/Future पैटर्न के माध्यम से अतुल्यकालिक रूप से किया जाना चाहिए।
त्रुटि प्रबंधन और सीमा शर्तें
फ़ंक्शन का कोई रिटर्न मान नहीं है, इसे noexcept के रूप में घोषित किया गया है और यह अपवाद-सुरक्षित (exception safe) है ([SWS_CM_00114])। यदि पास किया गया कॉलेबल मौजूद नहीं है या null है, तो त्रुटि InvalidHandlerViolation उत्पन्न होती है ([SWS_CM_00114])।
इंटरैक्शन
RegisterSetHandler के विपरीत, जिसकी कॉल सेटर मौजूद होने पर अनिवार्य है (EXP ARAComAPI §5.4.8.2 “Registering Setters”), RegisterGetHandler पूरी तरह से वैकल्पिक रहता है। यदि हैंडलर को एक विशिष्ट निष्पादन संदर्भ में अतुल्यकालिक रूप से संसाधित किया जाना है, तो ExecutorT के साथ ओवरलोड किया गया टेम्पलेट फ़ंक्शन अतिरिक्त रूप से उपलब्ध है ([SWS_CM_11360])।
यह उपयोग नोट AUTOSAR R25-11 विनिर्देश के आधार पर एक AI द्वारा जनरेट किया गया था।
इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I2)
| Header-Datei | #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h" |
|---|---|
| Scope | class <SI-Namespace>::skeleton:: fields::<Field> |
| Exception-Sicherheit | exception safe |
| Verletzungen (Violations) | InvalidHandlerVio- Provided Callable handler does not exist or is null lation |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| handler | The callback function to be invoked to process the Field get request |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| None |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CM_00114- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CM_00114@rel:R25-11#56b4b72b- Content hash
56b4b72b- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00114
Status: valid/unmigrated
Version: rel:R25-11#c6386380
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_CM_00114@rel:R25-11#c6386380
Recorded Revisions (8):
- R25-11
rel:R25-11#417163c72026-09-30 - R19-11
rel:R19-11#f07f56a32026-10-14 - R20-11
rel:R20-11#cdd125c72026-10-14 - R21-11
rel:R21-11#cdd125c72026-10-14 - R22-11
rel:R22-11#6a153b112026-10-14 - R23-11
rel:R23-11#23956e7c2026-10-14 - R24-11
rel:R24-11#5d29d0102026-10-14 - R25-11
rel:R25-11#c63863802026-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 · जर्मन मूल