struct <SI-Namespace>::proxy::methods::<Method>::Output
struct Output {...};
Structure wrapping the out arguments for a method
| Header-Datei | #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h" |
|---|---|
| Forwarding-Header | #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy/<SiShortname>_proxy_fwd.h" |
| Scope | class <SI-Namespace>::proxy::methods::<Method> |
User GuideAI-GENERATED
Encapsulates, as a data structure, the output parameters of an asynchronously called service method for the receiving proxy.
Encapsulates, as a data structure, the output parameters of an asynchronously called service method for the receiving proxy.
The structure <SI-Namespace>::proxy::methods::<Method>::Output encapsulates the output arguments of a proxy service method of the AUTOSAR Adaptive Platform ([SWS_CM_99333]). In the success case, the caller receives the structure via a returned ara::core::Future after its resolution via get() or GetResult() (AUTOSAR_AP_SWS_CommunicationManagement §8.3.6 “Struct: Output”). If errors occur during processing, no Output object is created, but an error code is provided via the future context instead. By destroying the future object, the client can abort an ongoing method call prematurely.
Context
In Communication Management (com) of the AUTOSAR Adaptive Platform, the structure <SI-Namespace>::proxy::methods::<Method>::Output serves as a structured encapsulation for the output arguments of a service method ([SWS_CM_99333]). On the service consumer side (proxy), this class is generated in a typed manner to pass the result values, determined by the service provider and transmitted via the middleware, bundled to the client application. On the service provider side (skeleton), a corresponding data structure exists for providing the method return ([SWS_CM_99556]). Essential interaction partners are the calling client application, the proxy method instance, and the ara::core::Future returned by the call interface, which transports the Output object in the success case (AUTOSAR_AP_SWS_CommunicationManagement §8.3.6 “Struct: Output”).
Lifecycle
The lifecycle of an instance of Output is directly embedded in the asynchronous communication pattern of the Adaptive Platform. When executing a method call on the proxy, the runtime environment creates a ara::core::Future, which serves as a container for the subsequent Output object (AUTOSAR_AP_SWS_CommunicationManagement §8.3.6 “Struct: Output”). The actual result data is generated on the provider side: after completion of processing—either synchronously in the body of the service method or asynchronously in a separate thread—the output parameters are placed in the output structure and transferred via a Promise to the associated Future (ARAComAPI §6.19 “Returning Future with already set result”).
As soon as the result is ready, the client extracts the Output instance via get() or GetResult(). In doing so, ownership of the object transfers to the caller; from this point on, the further lifetime is presumably the responsibility of the calling application code. Question Q-27f51b3c9fb838ed (open) A relevant constraint for the lifecycle concerns premature cancellation: the destructor of the returned ara::core::Future object serves for the caller to cancel the request after issuing it ([SWS_CM_00194]). If the future is destroyed prematurely, this leads to the cancellation of the call, so that no delivery of the Output structure takes place.
Usage Path
The typical sequence for receiving the method output parameters comprises the following steps:
- Trigger call: The client calls the service method on the proxy and immediately receives a
ara::core::Future<Output>(AUTOSAR_AP_SWS_CommunicationManagement §8.3.6 “Struct: Output”). - Query result: The client synchronizes on the result or directly calls
get()orGetResult(). If the result was already set on the server side at thePromise, the call does not block, but immediately returns theOutputstructure (ARAComAPI §6.19 “Returning Future with already set result”). - Process values: The client reads the output values from the received structure. Interpretation: The structure
Outputis likely to provide all defined out and inout arguments of the method as freely accessible members. Question Q-3a292028627f3c64 (open)
Sequence diagram: Calling a proxy method and taking over the output structure via the future. Sources: [SWS_CM_99333], AUTOSAR_AP_SWS_CommunicationManagement §8.3.6 “Struct: Output”, ARAComAPI §6.19 “Returning Future with already set result”.
Error Scenarios
If an error occurs during the processing of the method, no regular Output object is returned. Communication Management handles this via specific error mechanisms:
- Checked application errors (Checked Errors): If a defined error occurs during the processing of the method call, the corresponding
ara::core::ErrorCodeis returned in the context of theget()orGetResult()call ([SWS_CM_10371]). - Infrastructure and transmission errors: If the call fails, the
ara::core::Futurecontains a corresponding error code such asara::core::FutureErrc(AUTOSAR_AP_SWS_CommunicationManagement §8.3.6 “Struct: Output”) or, on the provider side,ara::com::ComErrc(AUTOSAR_AP_SWS_CommunicationManagement §8.4 “Methods”). - Fire-and-forget methods: For methods without return values (fire and forget), no checked errors are reported back ([SWS_CM_90436]); for such methods, no
Outputstructure exists. - Call abort: Destroying the
Futureobject aborts the ongoing request and prevents the provision of aOutputresult ([SWS_CM_00194]).
This guide is based exclusively on the specifications of the Adaptive Release R25-11.
gemini-3.8-flash-low· 2026-10-13 · German original