DEENESPTFRRUARHIKOZHNL

struct ara::diag::FileTransferService::FileSizes

[SWS_DM_01321] Upstream: RS_Diag_04135

struct FileSizes {...};

Definition of total file sizes.

Header-Datei#include "ara/diag/file_transfer.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopeclass ara::diag::FileTransferService

User GuideAI-GENERATED

Serves to encapsulate compressed and uncompressed file sizes in bytes for file transfer services.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: a9f49ae913f1 Provenance Open questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves to encapsulate compressed and uncompressed file sizes in bytes for file transfer services.

The struct ara::diag::FileTransferService::FileSizes serves as a standardized value object for encapsulating file size specifications within the diagnostic module of the AUTOSAR Adaptive Platform [SWS_DM_01321]. It bundles the uncompressed and compressed byte size of a file into two public 64-bit integer variables for preparing and monitoring transfer operations [SWS_DM_01322]. As a passive record, the struct possesses neither methods of its own nor internal error handling, so plausibility checking of the passed values as well as thread safety must be ensured by the calling components.

Context

The struct ara::diag::FileTransferService::FileSizes is an integral part of the diagnostic module (diag) in the AUTOSAR Adaptive Platform [SWS_DM_01321]. Within the namespace of the higher-level service ara::diag::FileTransferService, it defines a compact data model for representing complete file size specifications AUTOSAR_AP_SWS_Diagnostics §8.18.2 “Struct: FileSizes”. The type is declared via the header file ara/diag/file_transfer.h [SWS_DM_01322]. Its primary responsibility is to bundle the size information relevant to file transfer operations into a uniform data structure, so that interacting platform and application components can exchange file sizes consistently AUTOSAR_AP_SWS_Diagnostics p. 1126.

Functionally, the data structure captures two distinct size specifications: the total uncompressed size of a file via the member uncompressed_size [SWS_DM_01322] as well as the total compressed size via the member compressed_size [SWS_DM_01323]. Both values are maintained as unsigned 64-bit integers (std::uint64_t) in units of bytes. Thereby, FileSizes acts as a semantic information carrier between diagnostic clients, Diagnostic Management, and the concrete service providers that handle file transfers on the Adaptive Platform.

Lifecycle

The struct ara::diag::FileTransferService::FileSizes is modeled as a pure record (value object) without its own virtual methods or complex inheritance hierarchies AUTOSAR_AP_SWS_Diagnostics §8.18.2.1 “Public Member Variables”. Creation typically occurs directly on the call stack or as a member of a higher-level data structure. Since only standard integer types are contained, the struct is likely copyable as well as movable by default and does not require dynamic memory management on the heap. Question Q-f9c6e76fc8c62463 (open)

Ownership depends on the respective usage context: If an instance is created by a diagnostic application, ownership remains with that application or is transferred via pass-by-value to called interface functions. The destruction of the instance is trivial and takes place automatically upon leaving scope without additional cleanup logic. Since the type provides no internal synchronization mechanisms, coordinated and thread-safe usage under concurrent access to the same instance is presumably entirely the responsibility of the participating diagnostic or application components. Question Q-d2e83f9098c7f8c8 (open)

Usage Path

Typical usage of the struct is divided into the phases of initialization, parameter population, and passing to transfer routines of FileTransferService [SWS_DM_01321]. In a typical use case, a sending component determines the actual file dimensions on the file system or in memory prior to starting a file transfer. It then instantiates FileSizes and assigns the measured byte values to the two public variables:

  • uncompressed_size: Specifies the absolute size of the original file in bytes [SWS_DM_01322].
  • compressed_size: Specifies the compressed size of the data stream to be transferred in bytes [SWS_DM_01323].

If a file is transferred without prior compression, compressed_size and uncompressed_size presumably carry identical values. Question Q-1edcb924fd5932ee (open) After initialization, the struct is passed to the corresponding file transfer methods so that peers can pre-allocate the memory requirement and precisely monitor the transfer progress AUTOSAR_AP_SWS_Diagnostics p. 77.

Error Scenarios

In the specification of ara::diag::FileTransferService::FileSizes, no dedicated diagnostic error codes, return values, or exceptions are defined AUTOSAR_AP_SWS_Diagnostics §8.18.2 “Struct: FileSizes”. As a passive data type, the struct itself triggers no error messages and does not validate the entered values at runtime.

Error potentials arise primarily from incorrect preconditions and postconditions during parameter population. The type std::uint64_t allows values up to $2^{64}-1$ bytes to be represented [SWS_DM_01322], [SWS_DM_01323]. If a component passes implausible sizes—for example, a value of zero bytes for existing files or a compressed size that drastically exceeds the uncompressed size without plausible explanation—this must be intercepted by the upstream or downstream processing logic of FileTransferService. An overflow of the available destination memory also constitutes an overarching error scenario that must be recognized prior to starting the data transfer on the basis of the byte values transmitted in FileSizes.

This class guide is based on the specification AUTOSAR Adaptive Platform R25-11 (module diag) and was created for autodocs.

UML class diagram

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

G nara__diag__FileTransferService__FileSizes857 «struct» FileSizes + compressed_size + uncompressed_size

Constants

Specifies the compressed file size in bytes.

std::uint64_t compressed_size;

Specifies the uncompressed file size in bytes.

std::uint64_t uncompressed_size;

Documentation of constants / variables

variable compressed_size [SWS_DM_01323] Upstream: RS_Diag_04135

std::uint64_t compressed_size;

Specifies the compressed file size in bytes.

Header-Datei#include "ara/diag/file_transfer.h"
Scopestruct ara::diag::FileTransferService::FileSizes
Symbolcompressed_size
Typstd::uint64_t

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

Record
AUTOSAR/AP/record/SWS_DM_01323
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01323@rel:R25-11#e096074a
Content hash
e096074a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01323
Status: valid/unmigrated Version: rel:R25-11#6febc963 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_01323@rel:R25-11#6febc963
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#e096074a2026-09-30
  • R22-11rel:R22-11#4f01daa22026-10-14
  • R23-11rel:R23-11#7011a9a42026-10-14
  • R24-11rel:R24-11#7011a9a42026-10-14
  • R25-11rel:R25-11#6febc9632026-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

variable uncompressed_size [SWS_DM_01322] Upstream: RS_Diag_04135

std::uint64_t uncompressed_size;

Specifies the uncompressed file size in bytes.

Header-Datei#include "ara/diag/file_transfer.h"
Scopestruct ara::diag::FileTransferService::FileSizes
Symboluncompressed_size
Typstd::uint64_t

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

Record
AUTOSAR/AP/record/SWS_DM_01322
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01322@rel:R25-11#e266e40a
Content hash
e266e40a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01322
Status: valid/unmigrated Version: rel:R25-11#803a2562 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_01322@rel:R25-11#803a2562
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#e266e40a2026-09-30
  • R22-11rel:R22-11#3c01ce6e2026-10-14
  • R23-11rel:R23-11#e0a2616f2026-10-14
  • R24-11rel:R24-11#e0a2616f2026-10-14
  • R25-11rel:R25-11#803a25622026-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