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.
Object for reading and writing binary data streams over a network connection.
Header-Datei
#include "ara/rds/raw_data_stream.h"
Scope
namespace ara::rds
User GuideAI-GENERATED
Enables sending and receiving binary data streams over a network connection at modeled ports.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: effb63ab8311ProvenanceOpen questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables sending and receiving binary data streams over a network connection at modeled ports.
The class ara::rds::RawDataStreamClient serves to read and write binary data streams over a network connection on the AUTOSAR Adaptive Platform AUTOSAR_AP_SWS_RawDataStream p. 1. Instances are created via the static factory method Create, whereupon the connection is established with Connect, data is exchanged using ReadData and WriteData, and the session is terminated via Shutdown[SWS_RDS_10482]. As a non-copyable, move-only type, the object is not thread-safe, which is why concurrent calls must be synchronized on the application side.
Context
The class ara::rds::RawDataStreamClient serves as an endpoint for sending and receiving binary data streams over a network connection according to the specification AUTOSAR_AP_SWS_RawDataStream p. 1. It encapsulates the communication connection of a modeled port that is identified and instantiated at runtime via an ara::core::InstanceSpecifier[SWS_RDS_10482]. Application software uses the interface to transmit unstructured payload data bidirectionally without having to resort to message-based service interfaces. The class acts as a client that actively establishes and controls a connection to a peer over the network.
Lifecycle
Creation of an instance takes place exclusively via the static factory method Create[SWS_RDS_10482]. This method is thread-safe and, on success, returns the operational client instance within a ara::core::Result. Regarding ownership, ara::rds::RawDataStreamClient is designed as a move-only type: the copy constructor [SWS_RDS_11303] and the copy assignment operator [SWS_RDS_11304] are explicitly deleted (=delete). A transfer of the resource is possible exclusively via move semantics via move constructor [SWS_RDS_11305] or move assignment [SWS_RDS_11306]. These move operations are specified as not thread-safe.
In its lifecycle, the object goes through several phases: After successful instantiation, the connection is in the disconnected state. By calling Connect without parameters [SWS_RDS_10484] or with a configurable time span [SWS_RDS_11307], the network connection is established and transitioned to the active state. Terminating the connection can be brought about explicitly via Shutdown, whereby the data stream is closed [SWS_RDS_10485]. If the instance is destroyed, the destructor ~RawDataStreamClient guarantees the automatic closing and shutdown of a still open connection [SWS_RDS_10483]. Neither the instance methods nor the destructor are thread-safe; accessing the same instance from different threads therefore requires external synchronization.
Typical usage is divided into the phases of initialization, connection establishment, payload data transmission, and connection termination:
Initialization: The application instantiates the client via Create with the desired ara::core::InstanceSpecifier[SWS_RDS_10482].
Connection establishment: Subsequently, calling Connect[SWS_RDS_10484] or Connect with timeout [SWS_RDS_11307] establishes the network connection to the peer.
Data transmission: In the connected state, data exchange takes place bidirectionally. To send data, WriteData is called, where the data is passed as std::unique_ptr<ara::core::Byte[]> together with the length specification [SWS_RDS_10487], optionally with a timeout [SWS_RDS_11310]. For receiving, ReadData is used specifying the maximum buffer size to be read [SWS_RDS_10486], optionally also with a timeout [SWS_RDS_11309]. Presumably, performing read and write operations requires a previously successfully established connection. Question (open)
Connection termination: After completion of the data exchange, the connection is terminated orderly using Shutdown[SWS_RDS_10485].
All methods of ara::rds::RawDataStreamClient use the standard type ara::core::Result for error and success reporting and are declared with noexcept, meaning that no C++ exceptions are thrown. During connection establishment via Connect, an error code of type RdsErrc is returned in case of an error [SWS_RDS_10484]. For the variants with a time limit—Connect[SWS_RDS_11307], ReadData[SWS_RDS_11309], and WriteData[SWS_RDS_11310]—the expiration of the specified time span (std::chrono::milliseconds) presumably leads to a corresponding timeout error in the Result object. Question Q-0ee603533c355c45 (open) Likewise, calling read or write methods without an active connection is likely to fail and report an error code from RdsErrc. Callers must therefore check the return value of each call for success before subsequent operations are executed.
This class guide summarizes the core aspects of ara::rds::RawDataStreamClient based on the AUTOSAR Adaptive Platform R25-11 specification.
gemini-3.8-flash-low· 2026-10-13 · German original