DEENESPTFRRUARHIKOZHNL

class ara::diag::DataTransferWriteSession

[SWS_DM_01555] Upstream: RS_Diag_04135

class DataTransferWriteSession final {...};

Encapsulates all data transfer writing variants.

Header-Datei#include "ara/diag/data_transfer.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopenamespace ara::diag

User GuideAI-GENERATED

Encapsulates write diagnostic data transfers and coordinates processing via write handlers.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6f5de6951762 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Encapsulates write diagnostic data transfers and coordinates processing via write handlers.

The class ara::diag::DataTransferWriteSession encapsulates write diagnostic data transfers and coordinates forwarding to application-specific write handlers ([SWS_DM_01555]). For incoming UDS services such as TransferData (0x36) or RequestTransferExit (0x37), the diagnostic server instance calls the corresponding Write or Exit methods of the registered handlers ([SWS_DM_01317]). Because default and copy construction are deleted, the session exists as an exception-safe unique instance whose creation presumably takes place via template constructors. Question (open)

Context

The class ara::diag::DataTransferWriteSession encapsulates all variants of write data transfers within the functional cluster Adaptive Platform Diagnostics ([SWS_DM_01555]). It acts as a connecting element between the platform's diagnostic server instance and the application-specific implementations that perform the actual write transfer.

In the context of diagnostic services such as RequestFileTransfer (for example with operating mode ReplaceFile (0x03) according to [SWS_DM_01313]), the diagnostic server instance accepts transfer requests. If diagnostic requests of the UDS service TransferData (0x36) arrive subsequently, the server delegates them to the Write method of the handler class bound to the respective DataTransferWriteSession ([SWS_DM_01317]). After all data blocks have been transferred, the service RequestTransferExit (0x37) signals completion, whereupon the diagnostic server instance calls the Exit method of the registered handler ([SWS_DM_01318]).

diag-context Server Diagnoseserver-Instanz Session ara::diag::DataTransferWriteSession Server->Session kapselt Schreibvarianten [SWS_DM_01555] Handler Handler-Klasse (Schreib-Handler) Server->Handler invokes Write / Exit [SWS_DM_01317], [SWS_DM_01318] Session->Handler bindet Handler

Context diagram: Interaction between diagnostic server, DataTransferWriteSession, and application-specific handler class. Sources: [SWS_DM_01555], [SWS_DM_01317], [SWS_DM_01318].

Lifecycle

The lifecycle of a DataTransferWriteSession is subject to the specifications from the header file ara/diag/data_transfer.h ([SWS_DM_01339]). Default construction is explicitly deleted (DataTransferWriteSession() = delete, [SWS_DM_01339]). An instantiation therefore presumably takes place via template constructors through which specific handler classes are bound to the session object (AUTOSAR_AP_SWS_Diagnostics §8.10 “Context of RequestFileTransfer”). Question Q-4575aa1e5d0889b3 (open)

To enforce unique ownership, DataTransferWriteSession is neither copyable nor copy-assignable: both the copy constructor ([SWS_DM_01559]) and the copy assignment operator ([SWS_DM_01560]) are declared as delete. Instances consequently exist as exclusive single instances.

In contrast, the class supports full move semantics: the move constructor ([SWS_DM_01557]) and the move assignment operator ([SWS_DM_01558]) are declared as default implementations and specified as noexcept as well as exception-safe ("exception safe"). They allow the efficient transfer of session state between program contexts. Destruction takes place via the exception-safe default destructor (~DataTransferWriteSession() noexcept = default, [SWS_DM_01556]). Regarding concurrency, usage is likely to be primarily sequential within the executing server thread, since no synchronization mechanisms for concurrent accesses are documented. Question Q-2c2278884fa11b21 (open)

Usage Path

The regular flow of a write transfer proceeds in the following steps:

  1. Initialization: Upon receipt of a write request (for example RequestFileTransfer with kReplace according to [SWS_DM_01313]), a DataTransferWriteSession is established. Here, the application-specific handler for write operations is registered via template constructors (AUTOSAR_AP_SWS_Diagnostics §8.10 “Context of RequestFileTransfer”).
  2. Data block transfer: For each incoming request of the UDS service TransferData (0x36), the diagnostic server instance calls the Write method of the registered handler class ([SWS_DM_01317]). This step is repeated cyclically for all blocks of the transfer.
  3. Session termination: After the transfer is complete, the diagnostic server receives RequestTransferExit (0x37) and thereupon calls the Exit method of the handler class ([SWS_DM_01318]).
  4. Cleanup: After successful completion or in the event of premature cancellation, the session object is destroyed ([SWS_DM_01556]).
Sequence of a write data transferDiagnoseserverDataTransferWriteSessionHandler-KlasseErzeugung / RegistrierungloopTransferData (0x36)Write() [SWS_DM_01317]Status / confirmationExit() on RequestTransferExit (0x37) [SWS_DM_01318]Exit confirmationDestruction (~DataTransferWriteSession) [SWS_DM_01556]

Sequence diagram: Typical flow of a write data transfer across the participating instances. Sources: [SWS_DM_01317], [SWS_DM_01318], [SWS_DM_01556].

Error Scenarios

Error handling and reliability in ara::diag::DataTransferWriteSession rely significantly on static type safety and exception safety:

  • Prevention of invalid object states: Deletion of the default constructor ([SWS_DM_01339]) prevents uninitialized session objects from existing without a bound handler. The prohibition of copy operations ([SWS_DM_01559], [SWS_DM_01560]) rules out inconsistent states due to multiple ownership already at compile time.
  • Exception safety during moving and destruction: Declaring the move constructor ([SWS_DM_01557]), move assignment ([SWS_DM_01558]), and destructor ([SWS_DM_01556]) as noexcept guarantees that no exceptions are thrown at runtime during resource transfers and session teardown.
  • Premature abort: If a transfer fails prematurely, the noexcept destructor ensures that the session object can also be cleaned up reliably during exception unwinding ([SWS_DM_01556]).

This guide is based on the specification documents of AUTOSAR Adaptive Platform Release R25-11.

Member map

Class diagram

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

G nara__diag__DataTransferWriteSession996 DataTransferWriteSession + DataTransferWriteSession() + ~DataTransferWriteSession() + operator=()

Detail view

Select an entry in the outline.

Constructors and destructor

No default construction allowed.

Overloads DataTransferWriteSession 3
DataTransferWriteSession ()=delete; SWS_DM_01339
DataTransferWriteSession (DataTransferWriteSession &&other) noexcept=default; SWS_DM_01557
DataTransferWriteSession (DataTransferWriteSession const &)=delete; SWS_DM_01559

Destructs an instance of this class.

~DataTransferWriteSession () noexcept=default;

Operators

operator= function 2

Move assigns an instance of this class.

Overloads = 2
auto operator= (DataTransferWriteSession &&other) & noexcept -> Data TransferWriteSession & =default; SWS_DM_01558
auto operator= (DataTransferWriteSession const &) -> DataTransferWrite Session &=delete; SWS_DM_01560

Method documentation

function DataTransferWriteSession [SWS_DM_01339] Upstream: RS_Diag_04135

DataTransferWriteSession ()=delete;

No default construction allowed.

Header-Datei#include "ara/diag/data_transfer.h"
Scopeclass ara::diag::DataTransferWriteSession

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

Record
AUTOSAR/AP/record/SWS_DM_01339
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01339@rel:R25-11#df974f04
Content hash
df974f04
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01339
Status: valid/unmigrated Version: rel:R25-11#bb684435 Versionshistorie & Revisions (1 transition, 5 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_01339@rel:R25-11#bb684435
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#df974f042026-09-30
  • R22-11rel:R22-11#05c5fa902026-10-14
  • R23-11rel:R23-11#d68056ea2026-10-14
  • R24-11rel:R24-11#bb6844352026-10-14
  • R25-11rel:R25-11#bb6844352026-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

function DataTransferWriteSession [SWS_DM_01557] Upstream: RS_Diag_04135

DataTransferWriteSession (DataTransferWriteSession &&other) noexcept=default;

Move constructs an instance of this class.

Header-Datei#include "ara/diag/data_transfer.h"
Scopeclass ara::diag::DataTransferWriteSession
Exception-Sicherheitexception safe

Parameter (out)

ParameterBeschreibung
otherThe other object

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

Record
AUTOSAR/AP/record/SWS_DM_01557
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01557@rel:R25-11#c6845d2b
Content hash
c6845d2b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01557
Status: valid/unmigrated Version: rel:R25-11#c06644f6 Versionshistorie & Revisions (1 transition, 5 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_01557@rel:R25-11#c06644f6
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#c6845d2b2026-09-30
  • R22-11rel:R22-11#561cac2d2026-10-14
  • R23-11rel:R23-11#e94010d52026-10-14
  • R24-11rel:R24-11#d442d2622026-10-14
  • R25-11rel:R25-11#c06644f62026-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

function DataTransferWriteSession [SWS_DM_01559] Upstream: RS_Diag_04135

DataTransferWriteSession (DataTransferWriteSession const &)=delete;

DataTransferWriteSession shall be a single not copy-able instance.

Header-Datei#include "ara/diag/data_transfer.h"
Scopeclass ara::diag::DataTransferWriteSession

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

Record
AUTOSAR/AP/record/SWS_DM_01559
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01559@rel:R25-11#b426deb1
Content hash
b426deb1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01559
Status: valid/unmigrated Version: rel:R25-11#2bc05d20 Versionshistorie & Revisions (1 transition, 5 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_01559@rel:R25-11#2bc05d20
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#b426deb12026-09-30
  • R22-11rel:R22-11#0786de092026-10-14
  • R23-11rel:R23-11#fedcdb6a2026-10-14
  • R24-11rel:R24-11#6b2b05782026-10-14
  • R25-11rel:R25-11#2bc05d202026-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

function operator= [SWS_DM_01558] Upstream: RS_Diag_04135

auto operator= (DataTransferWriteSession &&other) & noexcept -> Data TransferWriteSession & =default;

Move assigns an instance of this class.

Header-Datei#include "ara/diag/data_transfer.h"
Scopeclass ara::diag::DataTransferWriteSession
Exception-Sicherheitexception safe

Parameter (out)

ParameterBeschreibung
otherThe other object

Rückgabewert

TypBeschreibung
DataTransferWriteSessionReference to self

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

Record
AUTOSAR/AP/record/SWS_DM_01558
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01558@rel:R25-11#f08e3256
Content hash
f08e3256
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01558
Status: valid/unmigrated Version: rel:R25-11#98b7f297 Versionshistorie & Revisions (1 transition, 5 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_01558@rel:R25-11#98b7f297
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#f08e32562026-09-30
  • R22-11rel:R22-11#9dc2babb2026-10-14
  • R23-11rel:R23-11#40e5e8552026-10-14
  • R24-11rel:R24-11#a9c2662c2026-10-14
  • R25-11rel:R25-11#98b7f2972026-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

function operator= [SWS_DM_01560] Upstream: RS_Diag_04135

auto operator= (DataTransferWriteSession const &) -> DataTransferWrite Session &=delete;

DataTransferWriteSession shall be a single not assignable instance.

Header-Datei#include "ara/diag/data_transfer.h"
Scopeclass ara::diag::DataTransferWriteSession

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

Record
AUTOSAR/AP/record/SWS_DM_01560
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01560@rel:R25-11#e3c6cc16
Content hash
e3c6cc16
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01560
Status: valid/unmigrated Version: rel:R25-11#dcf22359 Versionshistorie & Revisions (1 transition, 5 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_01560@rel:R25-11#dcf22359
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#e3c6cc162026-09-30
  • R22-11rel:R22-11#56026dd62026-10-14
  • R23-11rel:R23-11#3b74c86b2026-10-14
  • R24-11rel:R24-11#dcf223592026-10-14
  • R25-11rel:R25-11#dcf223592026-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

function ~DataTransferWriteSession [SWS_DM_01556] Upstream: RS_Diag_04135

~DataTransferWriteSession () noexcept=default;

Destructs an instance of this class.

Header-Datei#include "ara/diag/data_transfer.h"
Scopeclass ara::diag::DataTransferWriteSession
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_DM_01556
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01556@rel:R25-11#4df3679e
Content hash
4df3679e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01556
Status: valid/unmigrated Version: rel:R25-11#cfbf332f Versionshistorie & Revisions (1 transition, 5 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_01556@rel:R25-11#cfbf332f
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#4df3679e2026-09-30
  • R22-11rel:R22-11#abce2ef62026-10-14
  • R23-11rel:R23-11#c58302302026-10-14
  • R24-11rel:R24-11#9b7407d22026-10-14
  • R25-11rel:R25-11#cfbf332f2026-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