functie 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.
De methode Allocate wordt op skeletonniveau voor een event aangeroepen ([SWS_CM_90438]; AUTOSAR_AP_EXP_ARAComAPI §5.4.1 “Skeleton Class API’s”) om geheugen voor de overdracht van eventgegevens te alloceren wanneer het Communication Management (ara::com) verantwoordelijk is voor het beheer van de gegevens ([SWS_CM_90438]). Ze levert een instantie van het type ara::com::SampleAllocateePtr<SampleType> op ([SWS_CM_90438]). Dit pointertype gedraagt zich conceptueel als een std::unique_ptr<T>, zodat op elk moment slechts één partij eigenaar van de pointer is (ARAComAPI §6 “Event Allocate/Send sample Binding implementer hint”).
Wat betreft foutafhandeling en uitzonderingsveiligheid is Allocate gespecificeerd als not exception safe ([SWS_CM_90438]). De specificatie definieert twee mogelijke overtredingen (violations):
SampleAllocationViolation: Er zijn onvoldoende geheugenbronnen beschikbaar om de gegevens te alloceren ([SWS_CM_90438]).AllocateUsageViolation: De allocatie vond ontoelaatbaarderwijs plaats via een door de gebruiker gedefinieerde allocator ([SWS_CM_90438]).
Het concept achter Allocate is primair gericht op de ondersteuning van zero-copy-mechanismen, met name bij op shared memory gebaseerd IPC-transport, waarbij een strikte synchronisatie tussen lezers en schrijvers wordt verondersteld (ARAComAPI §6 “Event Allocate/Send sample Binding implementer hint”). Implementeerders moeten er rekening mee houden dat serialisatievereisten zero-copy teniet kunnen doen indien gegevenstypen bij de deployment niet binair compatibel geconfigureerd zijn of detectielogica dit uitsluit (ARAComAPI §6 “Event Allocate/Send sample Binding implementer hint”).
In interactie met het verzenden van events wordt de via Allocate verkregen geheugenpointer doorgegeven aan Send(ara::com::SampleAllocateePtr<SampleType> data) ([SWS_CM_90437]). Na de aanroep van Send mag de servicetoepassing geen toegang meer hebben tot de gegevens zodra het Communication Management de gegevens naar alle abonnerende applicaties verzendt ([SWS_CM_90437]).
Deze tekst is opgesteld door een AI en is uitsluitend gebaseerd op de specificatiedocumenten van de AUTOSAR-release R25-11.
Implementer's Guide volgt (complexiteit 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#d42acc89- Content hash
d42acc89- 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 · Duits origineel