फ़ंक्शन Allocate [SWS_CM_90438] Upstream: RS_CM_00201, RS_AP_00114, RS_AP_00115, RS_AP_00120
ara::com::SampleAllocateePtr< SampleType > Allocate ();
Allocating data for event transfer when Communication Management is responsible for the data.
विधि Allocate को किसी ईवेंट के लिए स्केलेटन स्तर पर कॉल किया जाता है ([SWS_CM_90438]; AUTOSAR_AP_EXP_ARAComAPI §5.4.1 “Skeleton Class API’s”), ताकि ईवेंट डेटा के ट्रांसमिशन के लिए मेमोरी आवंटित की जा सके, जब Communication Management (ara::com) डेटा के प्रबंधन के लिए जिम्मेदार हो ([SWS_CM_90438])। यह ara::com::SampleAllocateePtr<SampleType> प्रकार का एक उदाहरण (instance) लौटाता है ([SWS_CM_90438])। यह पॉइंटर प्रकार वैचारिक रूप से एक std::unique_ptr<T> की तरह व्यवहार करता है, ताकि किसी भी समय केवल एक पक्ष पॉइंटर का स्वामी हो (ARAComAPI §6 “Event Allocate/Send sample Binding implementer hint”)।
त्रुटि प्रबंधन और अपवाद सुरक्षा के संबंध में, Allocate को not exception safe के रूप में निर्दिष्ट किया गया है ([SWS_CM_90438])। विनिर्देश दो संभावित उल्लंघनों (Violations) को परिभाषित करता है:
SampleAllocationViolation: डेटा आवंटित करने के लिए पर्याप्त मेमोरी संसाधन उपलब्ध नहीं हैं ([SWS_CM_90438])।AllocateUsageViolation: आवंटन अनपेक्षित रूप से एक कस्टम एलोकेटर के माध्यम से किया गया था ([SWS_CM_90438])।
Allocate के पीछे की अवधारणा का प्राथमिक उद्देश्य Zero-Copy तंत्र का समर्थन करना है, विशेष रूप से साझा-मेमोरी आधारित IPC परिवहन में, जिसके लिए पाठकों और लेखकों के बीच सख्त सिंक्रोनाइज़ेशन की आवश्यकता होती है (ARAComAPI §6 “Event Allocate/Send sample Binding implementer hint”)। कार्यान्वयनकर्ताओं को यह ध्यान रखना चाहिए कि सीरियलाइज़ेशन आवश्यकताएं Zero-Copy को निष्फल कर सकती हैं, यदि डिप्लॉयमेंट में डेटा प्रकार बाइनरी-संगत कॉन्फ़िगर नहीं किए गए हैं या कोई पहचान तर्क इसे रोकता है (ARAComAPI §6 “Event Allocate/Send sample Binding implementer hint”)।
ईवेंट भेजने के साथ परस्पर क्रिया में, Allocate के माध्यम से प्राप्त मेमोरी पॉइंटर को Send(ara::com::SampleAllocateePtr<SampleType> data) में पास किया जाता है ([SWS_CM_90437])। Send को कॉल करने के बाद, जैसे ही Communication Management सभी सब्सक्राइब करने वाले अनुप्रयोगों को डेटा भेजता है, सेवा अनुप्रयोग को डेटा तक नहीं पहुँचना चाहिए ([SWS_CM_90437])।
यह पाठ एक AI द्वारा तैयार किया गया था और पूरी तरह से AUTOSAR रिलीज़ R25-11 के विनिर्देश दस्तावेज़ों पर आधारित है।
इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I2)
| Header-Datei | #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h" |
|---|---|
| Scope | class <SI-Namespace>::skeleton:: events::<Event> |
| Exception-Sicherheit | not exception safe |
| Verletzungen (Violations) | SampleAllocation- Not enough memory resources can be allocated Violation AllocateUsageVio- The allocation was illegally done via custom allocator lation |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::com::Sample | A ara::com::SampleAllocateePtr to an event sample AllocateePtr< Sample Type > |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CM_90438- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CM_90438@rel:R25-11#578ec411- Content hash
578ec411- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_90438
Status: valid/unmigrated
Version: rel:R25-11#3059e6d8
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_90438@rel:R25-11#3059e6d8
Recorded Revisions (8):
- R25-11
rel:R25-11#b02a325f2026-09-30 - R19-11
rel:R19-11#b404edd72026-10-14 - R20-11
rel:R20-11#8f3783f62026-10-14 - R21-11
rel:R21-11#a234befb2026-10-14 - R22-11
rel:R22-11#340e44dd2026-10-14 - R23-11
rel:R23-11#340e44dd2026-10-14 - R24-11
rel:R24-11#2e4120f42026-10-14 - R25-11
rel:R25-11#3059e6d82026-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 · जर्मन मूल