DEENESPTFRRUARHIKOZHNL

class ara::rds::ReadDataResult

Diese Seite wurde vollständig KI-generiert auf Basis von SWS Raw Data Stream (R25-11) — kein offizieller AUTOSAR-Text und keine automatisch extrahierte API-Seite wie die übrigen Module. Als Interpretation gekennzeichnete Aussagen sind Schlussfolgerungen aus den Quellen.

[SWS_RDS_11300] · Header ara/rds/raw_data_stream.h

struct ReadDataResult {...};

Result of a RawDataStream read operation.

Header-Datei#include "ara/rds/raw_data_stream.h"
Scopenamespace ara::rds

User GuideAI-GENERATED

Encapsulates read binary data and its byte count from a RawDataStream with exclusive buffer ownership.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 8e3411ab8137 Provenance Open questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Encapsulates read binary data and its byte count from a RawDataStream with exclusive buffer ownership.

Structure ara::rds::ReadDataResult encapsulates the result of a read operation from a raw data stream of the AUTOSAR Adaptive Platform (AUTOSAR_AP_SWS_RawDataStream, p. 1). It is created by methods ReadData and provides the read binary data in buffer data together with the actual byte count numberOfBytes [SWS_RDS_11301]. Because the buffer is managed as std::unique_ptr, the structure presumably transfers exclusive ownership to the caller and precludes copying. Question (open) Errors are reported via the enclosing ara::core::Result, which is why the result must be validated before accessing the data.

Context

Class ara::rds::ReadDataResult acts in module rds (RawDataStream) of the AUTOSAR Adaptive Platform as a structured result container for data retrievals from data streams (AUTOSAR_AP_SWS_RawDataStream, p. 1). Its primary responsibility is to pass the raw data bytes read from a raw data stream together with the actually transferred byte count to the calling application. Stream instances that offer read methods ReadData, as well as the respective application component that evaluates the data stream and further processes the data [SWS_RDS_10486], [SWS_RDS_11322], act as interaction partners in the system network.

Lifecycle

Instances of ara::rds::ReadDataResult arise in the context of synchronous or time-limited read operations. Creation is initiated when a caller invokes method ReadData(std::size_t maxLength) [SWS_RDS_10486], [SWS_RDS_11322] or the overload with timeout monitoring ReadData(std::size_t maxLength, std::chrono::milliseconds timeout) [SWS_RDS_11309], [SWS_RDS_11323].

Ownership and memory lifecycle are decisively determined by the contained data member data, which is declared as std::unique_ptr<ara::core::Byte[]> [SWS_RDS_11301]. According to common C++ interpretation, this means that ReadDataResult is presumably designed as a move-only type and thus cannot be copied, but only moved. Question Q-fe4b113c5852b5aa (open) Upon receiving the object, the calling program assumes sole ownership of the allocated data buffer. Destruction of the instance automatically leads to freeing the reserved heap memory of the byte array, unless the pointer was previously explicitly extracted from the object. Regarding concurrency, no internal synchronization exists; concurrent access to an instance from multiple threads without external locks is not thread-safe.

Usage Path

The regular flow for using ara::rds::ReadDataResult is divided into the following substeps:

  • Requesting the read operation: The application calls ReadData on the stream with the maximum requested amount of data maxLength [SWS_RDS_10486], [SWS_RDS_11322], optionally supplemented by a timeout value [SWS_RDS_11309], [SWS_RDS_11323].
  • Return of the result container: The stream reads the binary data from the channel and, upon success, returns a populated object of type ara::core::Result<ReadDataResult> (AUTOSAR_AP_SWS_RawDataStream, p. 1).
  • Size determination: The application reads field numberOfBytes from [SWS_RDS_11302]. Interpretation: This value is likely to indicate the amount of bytes actually provided in the buffer, which can be less than or equal to the requested maxLength. Question Q-12bde8c67452a632 (open)
  • Data processing: Buffer data is dereferenced [SWS_RDS_11301] in order to process the received bytes or transfer them into application-owned structures via move semantics.
Typical sequence of a read operation with ReadDataResultApplicationRawDataStreamReadData(maxLength)Read data and instantiate ReadDataResultara::core::Result<ReadDataResult>altErfolgreicher LesevorgangAccess to numberOfBytes and dataFehlerfallEvaluate error from Result

Sequence diagram: Typical sequence of a read operation with receipt and evaluation of ReadDataResult. Sources: [SWS_RDS_10486], [SWS_RDS_11301], [SWS_RDS_11302], AUTOSAR_AP_SWS_RawDataStream, p. 1

Error Scenarios

The methods for creating a ReadDataResult are declared with noexcept [SWS_RDS_10486], [SWS_RDS_11309], [SWS_RDS_11322], [SWS_RDS_11323], which is why no C++ exceptions are thrown in the event of an error. Instead, error handling is handled entirely via the return object ara::core::Result (AUTOSAR_AP_SWS_RawDataStream, p. 1).

Typical error scenarios include stream interruptions, invalid read requests, or the expiration of the waiting time for timed read calls [SWS_RDS_11309], [SWS_RDS_11323]. Interpretation: In such failures, ara::core::Result presumably does not contain a valid ReadDataResult object, but rather a corresponding error code. Question Q-f3f971c4789fe8e7 (open) For the application, as a precondition for accessing data [SWS_RDS_11301] and numberOfBytes [SWS_RDS_11302], this means always first checking the success state of the parent Result object to prevent access to uninitialized pointers or invalid memory areas.

This guide was generated by an AI based on the AUTOSAR AP R25-11 specification.

Constants

data variable

Data buffer returned by a read operation.

std::unique_ptr<ara::core::Byte[]> data;
numberOfBytes variable

Number of bytes in the returned data buffer.

std::size_t numberOfBytes;

Documentation of methods and types

variable data [SWS_RDS_11301]

std::unique_ptr<ara::core::Byte[]> data;

Data buffer returned by a read operation.

Header-Datei#include "ara/rds/raw_data_stream.h"
Scopeclass ara::rds::ReadDataResult

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

Record
AUTOSAR/AP/record/SWS_RDS_11301
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_RDS_11301@rel:R25-11#4fb66c88
Content hash
4fb66c88
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_RawDataStream.pdf#nameddest=SWS_RDS_11301
Status: valid/unmigrated Version: rel:R25-11#915a5dc4 Versionshistorie & Revisions (1 transition, 4 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_RDS_11301@rel:R25-11#915a5dc4
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#4fb66c882026-09-30
  • R23-11rel:R23-11#915a5dc42026-10-14
  • R24-11rel:R24-11#915a5dc42026-10-14
  • R25-11rel:R25-11#915a5dc42026-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 numberOfBytes [SWS_RDS_11302]

std::size_t numberOfBytes;

Number of bytes in the returned data buffer.

Header-Datei#include "ara/rds/raw_data_stream.h"
Scopeclass ara::rds::ReadDataResult

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

Record
AUTOSAR/AP/record/SWS_RDS_11302
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_RDS_11302@rel:R25-11#43b0e44a
Content hash
43b0e44a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_RawDataStream.pdf#nameddest=SWS_RDS_11302
Status: valid/unmigrated Version: rel:R25-11#5ef0f8da Versionshistorie & Revisions (1 transition, 4 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_RDS_11302@rel:R25-11#5ef0f8da
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#43b0e44a2026-09-30
  • R23-11rel:R23-11#5ef0f8da2026-10-14
  • R24-11rel:R24-11#5ef0f8da2026-10-14
  • R25-11rel:R25-11#5ef0f8da2026-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