Serves to accommodate and return payload data for positive responses of generic routine services.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d9df3888892fProvenanceOpen questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Serves to accommodate and return payload data for positive responses of generic routine services.
The structure ara::diag::GenericRoutine::OperationOutput serves as a return structure for positive response messages of generic routine services in AUTOSAR Adaptive [SWS_DM_00633]. After successful execution of a routine, the application instantiates the structure and populates the member responseData with the payload data of the result SWS Diagnostics p. 80. An essential constraint is that the vector responseData contains exclusively the pure result data and that the RoutineIdentifier must explicitly not be contained [SWS_DM_00633].
Context
In the Diagnostics module of AUTOSAR Adaptive, the structure ara::diag::GenericRoutine::OperationOutput serves as a dedicated data container for positive response messages of generic routine services [SWS_DM_00633]. It is available via the header ara/diag/generic_routine.h[SWS_DM_00633] and encapsulates the payload data that an adaptive diagnostic application returns to Diagnostic Management (ara::diag) after successful execution of a routine. Three entities are primarily involved in the interaction: the external diagnostic tester as the sender of routine requests, the platform framework ara::diag for protocol handling, and the application-specific implementation of GenericRoutine, which executes the business logic and provides the result SWS Diagnostics p. 80. The core task of OperationOutput is to provide the pure output data of the routine in a structured manner, where the RoutineIdentifier is explicitly not part of this data structure [SWS_DM_00633].
Lifecycle
As a lightweight data structure (struct), OperationOutput possesses a simple value lifecycle. Instantiation is performed on demand by the adaptive diagnostic application as soon as a command directed to the routine (for example, start, stop, or request results) could be completed positively. The only data element is responseData of type ara::core::Vector<std::uint8_t>[SWS_DM_00633]. The application allocates the vector, populates it with the application-specific return data, and passes the finished structure to the diagnostic subsystem. The return to the diagnostic framework is likely to take place asynchronously via Result or Future types of ara::core (Interpretation: asynchronous interface convention of the Adaptive Platform). Question Q-e672dfb8b9ff416a (open) After handover, responsibility for serialization transfers to ara::diag. As soon as the data has been transmitted or taken over into internal buffers, the structure is destroyed again upon leaving the respective scope. Regarding concurrency, it should be noted that OperationOutput is created for the context of a single operation execution; shared, unprotected access across multiple threads does not regularly take place.
Usage Path
The regular sequence for using OperationOutput comprises several consecutive phases:
Request reception: A diagnostic client sends a UDS RoutineControl request that is forwarded by the diagnostic layer to the responsible GenericRoutine instance SWS Diagnostics p. 84.
Execution: The adaptive application executes the requested routine and processes the input parameters.
Result generation: After successful execution, the application creates an instance of OperationOutput and populates responseData with the resulting byte values [SWS_DM_00633].
Response handover: The structure is returned to ara::diag as a positive operation result.
Response transmission: Diagnostic Management presumably handles the automatic prepending of the RoutineIdentifier before the responseData field when assembling the UDS response (Interpretation: protocol header completion by the daemon) and sends the complete packet to the client [SWS_DM_00633]. Question Q-ccdd2867b87d00d1 (open)
Sequence diagram: Typical sequence of data provision via OperationOutput upon successful routine execution. Sources: [SWS_DM_00633], SWS Diagnostics p. 80.
Error Scenarios
If an error occurs during execution of the routine or if the passed input data is invalid, the usage path of OperationOutput is aborted. In the event of an error, the application is likely to transmit an error code to Diagnostic Management instead of OperationOutput, thereby triggering a negative UDS response (Interpretation: error path via Result/Error domain). Question (open) Thus, an essential precondition for using OperationOutput is that the routine operation has been completed entirely and without errors. As a postcondition, the application guarantees that responseData contains exclusively the pure payload data of the positive response message and that no protocol prefixes such as the RoutineIdentifier are included [SWS_DM_00633]. If a routine was indeed successfully completed but produces no additional return data, the vector responseData remains empty SWS Diagnostics p. 70.
This guide is based on the AUTOSAR Adaptive specification for the module Diagnostics (R25-11). Explanations are based on the specification excerpt and are subject to the documented framework of assumptions.
UML class diagram
Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
gemini-3.8-flash-low· 2026-10-13 · German original