function 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
use
The method RegisterGetHandler is called server-side on the field object of a skeleton ([SWS_CM_00114]). It exists in the generated code exclusively if a getter was configured for the respective field in the interface description (Field.hasGetter == TRUE) (EXP ARAComAPI §5.4.8.1 “Registering Getters”). A callback handler of type std::function<ara::core::Future<FieldType>()> is passed, which is called by the binding implementation upon an incoming Get() request from a proxy.
Registering such a handler is entirely optional (EXP ARAComAPI §5.4.8.1 “Registering Getters”). Typically, the service implementation does not require a getter handler because Communication Management caches the value most recently set via Update() and answers proxy requests autonomously. A handler is particularly useful when determining the field value is time-consuming or computationally intensive and should therefore only occur asynchronously via the promise/future pattern when actually required.
Error Handling and Boundary Conditions
The function has no return value, is declared as noexcept, and is exception-safe (exception safe) ([SWS_CM_00114]). If the passed callable does not exist or is null, the error InvalidHandlerViolation occurs ([SWS_CM_00114]).
Interaction
In contrast to RegisterSetHandler, whose invocation is mandatory when a setter is present (EXP ARAComAPI §5.4.8.2 “Registering Setters”), RegisterGetHandler remains purely optional. If the handler is to be processed asynchronously in a specific execution context, the overloaded template function with ExecutorT is additionally available ([SWS_CM_11360]).
This usage note was generated by an AI based on the AUTOSAR R25-11 specification.
Implementer's Guide to follow (complexity 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#417163c7- Content hash
417163c7- 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 · German original