DEENESPTFRRUARHIKOZHNL

struct ara::diag::DownloadService::OperationOutput

[SWS_DM_00785] Upstream: RS_Diag_04033

struct OperationOutput {...};

Response data of positive response message.

Header-Datei#include "ara/diag/download.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopeclass ara::diag::DownloadService

User GuideAI-GENERATED

Used to return payload of a positive diagnostic response without service ID during download operations.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c06f480862f4 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Used to return payload of a positive diagnostic response without service ID during download operations.

The data structure ara::diag::DownloadService::OperationOutput serves as a transport container for payload of positive diagnostic responses in download services ([SWS_DM_00785]). Here, the adaptive application populates field responseData with the result bytes and passes the structure to Diagnostic Management ([SWS_DM_00786]). An essential constraint is that responseData must strictly contain payload without service ID, and different contents are expected depending on the operation, such as DownloadData or RequestDownloadExit ([SWS_DM_00786]).

Context

Structure ara::diag::DownloadService::OperationOutput is a specialized data type of the diagnostics module within the AUTOSAR Adaptive Platform and is provided via header file ara/diag/download.h ([SWS_DM_00785]). Its primary role is to encapsulate payload of a positive diagnostic response message for download services (AUTOSAR_AP_SWS_Diagnostics §8.14.2 “Struct: OperationOutput”). Within the diagnostic architecture, the structure acts as a data transport container between the concrete service implementation in the adaptive application and the underlying diagnostic runtime environment (ara::diag), which in turn interacts with the external diagnostic client (tester) (AUTOSAR_AP_SWS_Diagnostics §7 “API Specification”).

The only included member is the public field responseData of type ara::core::Vector<std::uint8_t> ([SWS_DM_00786]). It transports the pure user and payload bytes that are to be sent back to the diagnostic tester upon successful processing of a download operation.

Lifecycle

As a pure data structure (struct), OperationOutput has no internal state machines or own methods ([SWS_DM_00785]). Its lifecycle is short-lived and directly tied to the synchronous or asynchronous processing of a single diagnostic request:

  • Creation: The structure is instantiated by the application as soon as a download operation has been completed successfully and response data is available. Creation is likely to take place typically on the stack or within a callback or future chain. Question (open)
  • Population and handover: The application populates vector responseData with the computed bytes ([SWS_DM_00786]). Upon returning to Diagnostic Management, responsibility for the data transfers to the platform.
  • Destruction: As soon as the platform layer has serialized the data and sent the UDS frame, the instance is released.

With regard to concurrency, it must be noted that OperationOutput, as a passive value object, is not thread-safe. If operations are processed in concurrent worker threads of the application, it must be ensured that no concurrent accesses to responseData take place before the object is passed to ara::diag.

Usage Path

Typical usage of OperationOutput occurs during the processing of diagnostic download requests. An external diagnostic tester sends a request to the vehicle, which is accepted by the platform and forwarded to the matching method of the DownloadService interface in the adaptive application (AUTOSAR_AP_SWS_Diagnostics §7 “API Specification”). After successful internal processing, the application creates an instance of OperationOutput and passes the response data.

Sequence of response data provision via OperationOutputDiagnostic clientara::diag (DCM)DownloadService (Anwendung)Download-Anfrage (UDS)Invocation of the download operationVerarbeitet DatenblockErzeugt OperationOutputPopulates responseData (without SID)Return OperationOutput {responseData}Adds SID / headerPositive UDS-Antwortnachricht

Sequence diagram: Interaction of diagnostic client, platform runtime, and application when providing positive response data via OperationOutput. Sources: [SWS_DM_00785], [SWS_DM_00786], AUTOSAR_AP_SWS_Diagnostics §8.14.2 “Struct: OperationOutput”.

When populating responseData, it must be observed that payload must be provided without the service ID (SID) ([SWS_DM_00786]). The platform independently adds the protocol-specific SID as well as any header information. In addition, the exact content structure depends on the invoked operation: for DownloadData or RequestDownloadExit, the semantic expectation regarding the start and structure of the response data in the vector differs ([SWS_DM_00786]).

Error Scenarios

Since OperationOutput is explicitly specified for positive response messages (AUTOSAR_AP_SWS_Diagnostics §8.14.2 “Struct: OperationOutput”), no fields for error codes or negative responses exist within the data structure. If an error occurs during execution of the download operation (e.g. invalid address ranges, incorrect block sequence, or aborted transfers), OperationOutput is presumably not evaluated; instead, the application signals the failure via error channels of the platform, whereupon a negative response code (NRC) is generated. Question (open)

An application-side error in the use of OperationOutput occurs if the service ID is inadvertently inserted into responseData. This contradicts specification [SWS_DM_00786] and is likely to result in erroneous frame formatting. Question (open) Likewise, an incorrect byte order or incomplete amount of data leads to protocol errors on the tester side, depending on the specific operation ([SWS_DM_00786]).

This guide is based on the AUTOSAR Adaptive Platform Release R25-11 specification and was created automatically.

UML class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__diag__DownloadService__OperationOutput45 «struct» OperationOutput + responseData

Constants

responseData variable

Content of positive response message (without SID) Depending on the operation (e.g.: DownloadData, RequestDownloadExit) the expectation, what responseData shall contain (where it starts in the positive response) might differ. See doc of corresponding operation.

Documentation of constants / variables

variable responseData [SWS_DM_00786] Upstream: RS_Diag_04033

ara::core::Vector<std::uint8_t> responseData;

Content of positive response message (without SID) Depending on the operation (e.g.: DownloadData, RequestDownloadExit) the expectation, what responseData shall contain (where it starts in the positive response) might differ. See doc of corresponding operation.

Header-Datei#include "ara/diag/download.h"
Scopestruct ara::diag::DownloadService::OperationOutput
SymbolresponseData
Typara::core::Vector< std::uint8_t >

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_00786
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00786@rel:R25-11#a830c82b
Content hash
a830c82b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00786
Status: valid/unmigrated Version: rel:R25-11#9ee381a9 Versionshistorie & Revisions (1 transition, 7 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_DM_00786@rel:R25-11#9ee381a9
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#a830c82b2026-09-30
  • R20-11rel:R20-11#5fbb8d5c2026-10-14
  • R21-11rel:R21-11#bfa9d5ae2026-10-14
  • R22-11rel:R22-11#ef7d58082026-10-14
  • R23-11rel:R23-11#0f456ef02026-10-14
  • R24-11rel:R24-11#0f456ef02026-10-14
  • R25-11rel:R25-11#9ee381a92026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill