メインコンテンツまでスキップ

ara::rds

Overview

The Raw Data Stream Functional Cluster carries opaque binary payloads over a network connection without serialization. This page specifies the public API of the ara::rds namespace — the client and server stream endpoints, the read result structure, and the associated error domain — organized by header file.

Library · Headers · Linking

  • Library: lib/libpara_rds.so
  • CMake: find_package(para-rds)para::rds
  • Standard headers: include/ara/rds/

1 Header: ara/rds/raw_data_stream.h

1.1 Class: RawDataStreamClient

Kind:class
Port Interfaces:RawDataStreamClientInterface
Header file:#include "ara/rds/raw_data_stream.h"
Forwarding header file:#include "ara/rds/rds_fwd.h"
Scope:namespace ara::rds
Symbol:RawDataStreamClient
Syntax:class RawDataStreamClient final {...};
Description:This class defines a RawDataStreamClient object for reading and writing binary data streams over a network connection. .

1.1.1 Public Member Functions

1.1.1.1 Special Member Functions
1.1.1.1.1 Copy Constructor
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:RawDataStreamClient (const RawDataStreamClient &)=delete;
Description:Copy constructor of the RawDataStreamClient - not allowed.
1.1.1.1.2 Move Constructor
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:RawDataStreamClient (RawDataStreamClient &&other) noexcept;
Parameters (in):otherThe RawDataStreamClient object to be moved.
Exception Safety:exception safe
Thread Safety:not thread-safe
Description:Move constructor of the RawDataStreamClient.
1.1.1.1.3 Copy Assignment Operator
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:ara::rds::RawDataStreamClient & operator= (const ara::rds::RawDataStreamClient &)=delete;
Description:Copy assignment operator of the RawDataStreamClient - not allowed.
1.1.1.1.4 Move Assignment Operator
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:ara::rds::RawDataStreamClient & operator= (ara::rds::RawDataStreamClient &&other) & noexcept;
Parameters (in):otherThe RawDataStreamClient object to be moved.
Return value:RawDataStreamClient &The moved RawDataStreamClient object
Exception Safety:exception safe
Thread Safety:not thread-safe
Description:Move assignment operator of the RawDataStreamClient.
1.1.1.1.5 Destructor
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:~RawDataStreamClient () noexcept;
Exception Safety:exception safe
Thread Safety:not thread-safe
Description:Destructor of the RawDataStreamClient that deletes the RawDataStreamClient instance.

If the connection is still open, the connection is closed and shut down (calling Shutdown()) before destroying the RawDataStreamClient object.
1.1.1.2 Member Functions
1.1.1.2.1 Connect()
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:ara::core::Result< void > Connect () noexcept;
Return value:ara::core::Result< void >void if successful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kConnectionRefusedrollback_semantics
The target address was not listening for connections or refused the connection request.
RdsErrc::kAddressNotAvailablerollback_semantics
The specified address is not available from the local machine.
RdsErrc::kStreamAlreadyConnectedrollback_semantics
The specified connection is already connected.
RdsErrc::kPeerUnreachablerollback_semantics
Network error. The peer is unreachable (POSIX ENETUNREACH).
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Sets up a unicast socket connection for the RawDataStream defined by the instance, and establishes a connection to the TCP server.

In the case of UDP, no connection is established.
1.1.1.2.2 Connect(std::chrono::milliseconds)
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:ara::core::Result< void > Connect (std::chrono::milliseconds timeout) noexcept;
Parameters (in):timeoutTimeout value for this operation.
Return value:ara::core::Result< void >void if successful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kConnectionRefusedrollback_semantics
The target address was not listening for connections or refused the connection request.
RdsErrc::kAddressNotAvailablerollback_semantics
The specified address is not available from the local machine.
RdsErrc::kCommunicationTimeoutrollback_semantics
The operation was not successful and timed out.
RdsErrc::kStreamAlreadyConnectedrollback_semantics
The specified connection is already connected.
RdsErrc::kPeerUnreachablerollback_semantics
Network error. The peer is unreachable (POSIX ENETUNREACH).
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Sets up a unicast socket connection for the RawDataStream defined by the instance, and establishes a connection to the TCP server within a provided timeout value.

In the case of UDP, no connection is established.
1.1.1.2.3 ReadData(std::size_t, std::chrono::milliseconds)
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:ara::core::Result< ara::rds::ReadDataResult > ReadData (std::size_t maxLength, std::chrono::milliseconds timeout) noexcept;
Parameters (in):maxLengthThe requested maximum number of bytes to read from the stream.
timeoutTimeout value for this operation.
Return value:ara::core::Result< ReadDataResult >a struct of type ReadDataResult if successful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kStreamNotConnectedrollback_semantics
Trying to use a raw data stream without an established connection.
RdsErrc::kCommunicationTimeoutrollback_semantics
The operation was not successful and timed out.
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Requests to read a number of bytes of data from the socket connection for the RawDataStream defined by the instance. A timeout value is provided for non-blocking operation.
1.1.1.2.4 ReadData(std::size_t)
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:ara::core::Result< ara::rds::ReadDataResult > ReadData (std::size_t maxLength) noexcept;
Parameters (in):maxLengthThe requested maximum number of bytes to read from the stream.
Return value:ara::core::Result< ReadDataResult >a struct of type ReadDataResult if succesful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kStreamNotConnectedrollback_semantics
Trying to use a raw data stream without an established connection.
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Requests to read a number of bytes of data from the socket connection for the RawDataStream defined by the instance.
1.1.1.2.5 Shutdown
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:ara::core::Result< void > Shutdown () noexcept;
Return value:ara::core::Result< void >void if successful, otherwise an error code indicating the error
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kStreamNotConnectedrollback_semantics
Trying to use a raw data stream without an established connection.
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Closes the socket connection for the RawDataStream defined by the instance. Both the receiving and the sending part of the socket connection is shut down.
1.1.1.2.6 WriteData(std::unique_ptr<ara::core::Byte[]>, std::size_t)
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:ara::core::Result< std::size_t > WriteData (std::unique_ptr< ara::core::Byte[]> data, std::size_t maxLength) noexcept;
Parameters (in):datastd::unique pointer to the byte array to send.
maxLengthThe requested maximum number of bytes to write to the stream.
Return value:ara::core::Result< std::size_t >the actual number of bytes written if succesful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kStreamNotConnectedrollback_semantics
Trying to use a raw data stream without an established connection.
RdsErrc::kConnectionClosedByPeerrollback_semantics
Network error. The established connection has been shut down during writing (POSIX EPIPE).
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Requests to write of a number of bytes to the the socket connection for the RawDataStream defined by the instance (for 1:1 use cases).
1.1.1.2.7 WriteData(std::unique_ptr<ara::core::Byte[]>, std::size_t, std::chrono::milliseconds)
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:ara::core::Result< std::size_t > WriteData (std::unique_ptr< ara::core::Byte[]> data, std::size_t maxLength, std::chrono::milliseconds timeout) noexcept;
Parameters (in):datastd::unique pointer to the byte array to send.
maxLengthThe requested maximum number of bytes to write to the stream.
timeoutTimeout value for this operation.
Return value:ara::core::Result< std::size_t >the actual number of bytes written if succesful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kStreamNotConnectedrollback_semantics
Trying to use a raw data stream without an established connection.
RdsErrc::kCommunicationTimeoutrollback_semantics
The operation was not successful and timed out.
RdsErrc::kConnectionClosedByPeerrollback_semantics
Network error. The established connection has been shut down during writing (POSIX EPIPE).
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Requests to write a number of bytes to the the socket connection for the RawDataStream defined by the instance. A timeout value is provided for non-blocking operation.
1.1.1.3 Named Constructors
1.1.1.3.1 Create
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamClient
Syntax:static ara::core::Result< ara::rds::RawDataStreamClient > Create (const ara::core::InstanceSpecifier &instance) noexcept;
Parameters (in):instanceThe instance specifier for the instance.
Return value:ara::core::Result< RawDataStreamClient >ara::core::Result<RawDataStreamClient> The RawDataStreamClient object if succesful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:thread-safe
Violations:InstanceSpecifierMappingIntegrityViolationInstanceSpecifier either cannot be resolved in the model in the context of the executable, or it refers to a model element other than a PortPrototype.
PortInterfaceMappingViolationA PortPrototype that is referenced by a RawDataStreamMapping needs to be typed by a RawDataStreamClientInterface
ProcessMappingViolationThe type of mapping does not match the expected type of PortInterface
InstanceSpecifierAlreadyInUseViolationThe constructor was called with an Instance Specifier already in use in this process
Errors:RdsErrc::kConnectionCreationFailedrollback_semantics
Permission to create a connection is denied. (POSIX EACCES)
RdsErrc::kAddressNotAvailablerollback_semantics
The specified address is not available from the local machine.
Description:Named exception-less constructor that takes an instance Specifier qualifying the wanted network binding and parameters for the instance.

1.2 Class: RawDataStreamServer

Kind:class
Port Interfaces:RawDataStreamServerInterface
Header file:#include "ara/rds/raw_data_stream.h"
Forwarding header file:#include "ara/rds/rds_fwd.h"
Scope:namespace ara::rds
Symbol:RawDataStreamServer
Syntax:class RawDataStreamServer final {...};
Description:This class defines a RawDataStreamServer object for reading and writing binary data streams over a network connection. .

1.2.1 Public Member Functions

1.2.1.1 Special Member Functions
1.2.1.1.1 Move Constructor
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:RawDataStreamServer (RawDataStreamServer &&other) noexcept;
Parameters (in):otherThe RawDataStreamServer object to be moved.
Exception Safety:exception safe
Thread Safety:not thread-safe
Description:Move constructor of the RawDataStreamServer.
1.2.1.1.2 Copy Constructor
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:RawDataStreamServer (const RawDataStreamServer &)=delete;
Description:Copy constructor of the RawDataStreamServer - not allowed.
1.2.1.1.3 Move Assignment Operator
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:ara::rds::RawDataStreamServer & operator= (ara::rds::RawDataStreamServer &&other) & noexcept;
Parameters (in):otherThe RawDataStreamServer object to be moved.
Return value:RawDataStreamServer &The moved RawDataStreamServer object
Exception Safety:exception safe
Thread Safety:not thread-safe
Description:Move assignment operator of the RawDataStreamServer.
1.2.1.1.4 Copy Assignment Operator
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:ara::rds::RawDataStreamServer & operator= (const ara::rds::RawDataStreamServer &)=delete;
Description:Copy assignment operator of the RawDataStreamServer - not allowed.
1.2.1.1.5 Destructor
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:~RawDataStreamServer () noexcept;
Exception Safety:exception safe
Thread Safety:not thread-safe
Description:Destructor of the RawDataStreamServer that deletes the RawDataStreamServer instance.

If the connection is still open, the connection is closed and shut down (calling Shutdown()) before destroying the RawDataStreamClient object.
1.2.1.2 Member Functions
1.2.1.2.1 ReadData(std::size_t, std::chrono::milliseconds)
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:ara::core::Result< ara::rds::ReadDataResult > ReadData (std::size_t maxLength, std::chrono::milliseconds timeout) noexcept;
Parameters (in):maxLengthThe requested maximum number of bytes to read from the stream.
timeoutParameter to assign a timeout for this operation.
Return value:ara::core::Result< ReadDataResult >a struct of type ReadDataResult.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kStreamNotConnectedrollback_semantics
Trying to use a raw data stream without an established connection.
RdsErrc::kCommunicationTimeoutrollback_semantics
The operation was not successful and timed out.
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Requests to read a number of bytes of data from the unicast socket connection for the RawDataStream defined by the instance. A timeout value is provided for non-blocking operation.
1.2.1.2.2 ReadData(std::size_t)
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:ara::core::Result< ara::rds::ReadDataResult > ReadData (std::size_t maxLength) noexcept;
Parameters (in):maxLengthThe requested maximum number of bytes to read from the stream.
Return value:ara::core::Result< ReadDataResult >a struct of type ReadDataResult if successful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kStreamNotConnectedrollback_semantics
Trying to use a raw data stream without an established connection.
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Requests to read a number of bytes of data from the Unicast socket connection for the RawDataStream defined by the instance.
1.2.1.2.3 Shutdown
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:ara::core::Result< void > Shutdown () noexcept;
Return value:ara::core::Result< void >void if successful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kStreamNotConnectedrollback_semantics
Trying to use a raw data stream without an established connection.
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Closes the socket connection for the RawDataStream defined by the instance. Both the receiving and the sending part of the socket connection is shut down.
1.2.1.2.4 WaitForConnection(std::chrono::milliseconds)
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:ara::core::Result< void > WaitForConnection (std::chrono::milliseconds timeout) noexcept;
Parameters (in):timeoutTimeout value for this operation.
Return value:ara::core::Result< void >void if successful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kCommunicationTimeoutrollback_semantics
The operation was not successful and timed out.
RdsErrc::kConnectionAbortedrollback_semantics
Network error. The incoming connection was aborted (POSIX ECONNABORTED).
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Enables the RawDataStreamServer instance for incoming TCP connections. For UDP connections the operation returns with no action. A timeout value is provided for non-blocking operation.
1.2.1.2.5 WaitForConnection()
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:ara::core::Result< void > WaitForConnection () noexcept;
Return value:ara::core::Result< void >void if successful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kConnectionAbortedrollback_semantics
Network error. The incoming connection was aborted (POSIX ECONNABORTED).
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Enables the RawDataStreamServer instance for incoming TCP connections. For UDP connections the operation returns with no action.
1.2.1.2.6 WriteData(std::unique_ptr<ara::core::Byte[]>, std::size_t)
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:ara::core::Result< std::size_t > WriteData (std::unique_ptr< ara::core::Byte[]> data, std::size_t maxLength) noexcept;
Parameters (in):datastd::unique pointer to the byte array to send.
maxLengthThe requested maximum number of bytes to write to the stream.
Return value:ara::core::Result< std::size_t >the actual number of bytes written if succesful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kStreamNotConnectedrollback_semantics
Trying to use a raw data stream without an established connection.
RdsErrc::kConnectionClosedByPeerrollback_semantics
Network error. The established connection has been shut down during writing (POSIX EPIPE).
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Requests to write a number of bytes to the the socket connection for the RawDataStream defined by the instance.
1.2.1.2.7 WriteData(std::unique_ptr<ara::core::Byte[]>, std::size_t, std::chrono::milliseconds)
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:ara::core::Result< std::size_t > WriteData (std::unique_ptr< ara::core::Byte[]> data, std::size_t maxLength, std::chrono::milliseconds timeout) noexcept;
Parameters (in):datastd::unique pointer to the byte array to send.
maxLengthThe requested maximum number of bytes to write to the stream.
timeoutParameter to assign a timeout for this operation.
Return value:ara::core::Result< std::size_t >the actual number of bytes written if succesful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:not thread-safe
Errors:RdsErrc::kStreamNotConnectedrollback_semantics
Trying to use a raw data stream without an established connection.
RdsErrc::kCommunicationTimeoutrollback_semantics
The operation was not successful and timed out.
RdsErrc::kConnectionClosedByPeerrollback_semantics
Network error. The established connection has been shut down during writing (POSIX EPIPE).
RdsErrc::kInterruptedBySignalno_rollback_semantics
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
Description:Requests to write a number of bytes to the the socket connection for the RawDataStream defined by the instance. A timeout value is provided for non-blocking operation.
1.2.1.3 Named Constructors
1.2.1.3.1 Create
Kind:function
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::RawDataStreamServer
Syntax:static ara::core::Result< ara::rds::RawDataStreamServer > Create (const ara::core::InstanceSpecifier &instance) noexcept;
Parameters (in):instanceThe instance specifier for the instance.
Return value:ara::core::Result< RawDataStreamServer >ara::core::Result<RawDataStreamServer> The RawDataStreamServer object if succesful, otherwise an error code indicating the error.
Exception Safety:exception safe
Thread Safety:thread-safe
Violations:InstanceSpecifierMappingIntegrityViolationInstanceSpecifier either cannot be resolved in the model in the context of the executable, or it refers to a model element other than a PortPrototype.
PortInterfaceMappingViolationA PortPrototype that is referenced by a RawDataStreamMapping needs to be typed by a RawDataStreamServerInterface
ProcessMappingViolationThe type of mapping does not match the expected type of PortInterface
InstanceSpecifierAlreadyInUseViolationThe constructor was called with an Instance Specifier already in use in this process
Errors:RdsErrc::kConnectionCreationFailedrollback_semantics
Permission to create a connection is denied. (POSIX EACCES)
RdsErrc::kAddressNotAvailablerollback_semantics
The specified address is not available from the local machine.
RdsErrc::kStreamAlreadyConnectedrollback_semantics
The specified connection is already connected.
Description:Named exception-less constructor that takes an instance Specifier qualifying the wanted network credentials (UDP or TCP) for the instance. A socket is created and bound to the address and port specified in the local credentials.

1.3 Struct: ReadDataResult

Kind:struct
Header file:#include "ara/rds/raw_data_stream.h"
Forwarding header file:#include "ara/rds/rds_fwd.h"
Scope:namespace ara::rds
Symbol:ReadDataResult
Syntax:struct ReadDataResult {...};
Description:The ReadDataResult struct used as return value from ReadData().

1.3.1 Public Member Variables

1.3.1.1 data
Kind:variable
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::ReadDataResult
Symbol:data
Type:std::unique_ptr< ara::core::Byte[]>
Syntax:std::unique_ptr<ara::core::Byte[]> data;
Description:std::unique pointer to the read data.
1.3.1.2 numberOfBytes
Kind:variable
Header file:#include "ara/rds/raw_data_stream.h"
Scope:ara::rds::ReadDataResult
Symbol:numberOfBytes
Type:std::size_t
Syntax:std::size_t numberOfBytes;
Description:The actual number of bytes read from the stream.

2 Header: ara/rds/rds_error_domain.h

2.1 Non-Member Types

2.1.1 Enumeration: RdsErrc

Kind:enumeration
Header file:#include "ara/rds/rds_error_domain.h"
Forwarding header file:#include "ara/rds/rds_fwd.h"
Scope:namespace ara::rds
Symbol:RdsErrc
Underlying type:ara::core::ErrorDomain::CodeType
Syntax:enum class RdsErrc : ara::core::ErrorDomain::CodeType {...};
Values:kStreamNotConnected= 1
Trying to use a raw data stream without an established connection.
kCommunicationTimeout= 2
The operation was not successful and timed out.
kConnectionRefused= 3
The target address was not listening for connections or refused the connection request.
kAddressNotAvailable= 4
The specified address is not available from the local machine.
kStreamAlreadyConnected= 5
The specified connection is already connected.
kConnectionClosedByPeer= 6
Network error. The established connection has been shut down during writing (POSIX EPIPE).
kPeerUnreachable= 7
Network error. The peer is unreachable (POSIX ENETUNREACH).
kConnectionAborted= 8
Network error. The incoming connection was aborted (POSIX ECONNABORTED).
kInterruptedBySignal= 9
The operation was interrupted by a system signal (POSIX_EINTR). Usually a retry of the operation works, but resources may have been put into an unknown state, which means that retrying might lead to unexpected behavior.
kConnectionCreationFailed= 10
Permission to create a connection is denied. (POSIX EACCES)
kStreamHeaderFieldValueInvalid= 13
Detected an invalid stream header field value(e.g. unkown IEEE1722 stream id).
kStreamHeaderFieldValueMissing= 14
Decected an missing stream header field (e.g. missing IEEE1722 mac address part of stream id).
Description:The RdsErrc enumeration defines the error codes for the RdsErrorDomain.

2.2 Non-Member Functions

2.2.1 Other

2.2.1.1 GetRdsErrorDomain
Kind:function
Header file:#include "ara/rds/rds_error_domain.h"
Scope:namespace ara::rds
Syntax:constexpr ara::core::ErrorDomain & GetRdsErrorDomain () noexcept;
Return value:ara::core::ErrorDomain &A reference to the global ara::rds::RdsErrorDomain object.
Exception Safety:exception safe
Thread Safety:thread-safe
Description:Returns a reference to the global ara::rds::RdsErrorDomain object.
2.2.1.2 MakeErrorCode
Kind:function
Header file:#include "ara/rds/rds_error_domain.h"
Scope:namespace ara::rds
Syntax:constexpr ara::core::ErrorCode MakeErrorCode (ara::rds::RdsErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept;
Parameters (in):codeError code number.
dataVendor defined data associated with the error.
Return value:ara::core::ErrorCodeAn ara::core::ErrorCode object.
Exception Safety:exception safe
Thread Safety:thread-safe
Description:Creates an instance of ara::core::ErrorCode.

2.3 Class: RdsErrorDomain

Kind:class
Header file:#include "ara/rds/rds_error_domain.h"
Forwarding header file:#include "ara/rds/rds_fwd.h"
Scope:namespace ara::rds
Symbol:RdsErrorDomain
Base class:ara::core::ErrorDomain
Syntax:class RdsErrorDomain final : public ara::core::ErrorDomain {...};
Description:Defines a class representing the Raw Data Streams error domain.

2.3.1 Public Member Types

2.3.1.1 Type Alias: Errc
Kind:type alias
Header file:#include "ara/rds/rds_error_domain.h"
Scope:ara::rds::RdsErrorDomain
Symbol:Errc
Syntax:using Errc = RdsErrc;
Description:Alias for the error code value enumeration.
2.3.1.2 Type Alias: Exception
Kind:type alias
Header file:#include "ara/rds/rds_error_domain.h"
Scope:ara::rds::RdsErrorDomain
Symbol:Exception
Syntax:using Exception = RdsException;
Description:Alias for the exception base class.

2.3.2 Public Member Functions

2.3.2.1 Special Member Functions
2.3.2.1.1 Default Constructor
Kind:function
Header file:#include "ara/rds/rds_error_domain.h"
Scope:ara::rds::RdsErrorDomain
Syntax:constexpr RdsErrorDomain () noexcept;
Exception Safety:exception safe
Thread Safety:thread-safe
Description:Constructs a new RdsErrorDomain object.
2.3.2.2 Member Functions
2.3.2.2.1 Message
Kind:function
Header file:#include "ara/rds/rds_error_domain.h"
Scope:ara::rds::RdsErrorDomain
Syntax:const char * Message (CodeType errorCode) const noexcept override;
Parameters (in):errorCodeThe error code number.
Return value:const char *The message associated with the error code.
Exception Safety:exception safe
Thread Safety:thread-safe
Description:Returns the message associated with errorCode.
2.3.2.2.2 Name
Kind:function
Header file:#include "ara/rds/rds_error_domain.h"
Scope:ara::rds::RdsErrorDomain
Syntax:const char * Name () const noexcept override;
Return value:const char *As per ara::rds::RdsErrorDomain in SWS_CORE_90023
Exception Safety:exception safe
Thread Safety:thread-safe
Description:Returns a string constant associated with RdsErrorDomain.
2.3.2.2.3 ThrowAsException
Kind:function
Header file:#include "ara/rds/rds_error_domain.h"
Scope:ara::rds::RdsErrorDomain
Syntax:void ThrowAsException (const ara::core::ErrorCode &errorCode) const noexcept(false) override;
Parameters (in):errorCodeThe error to throw.
Return value:None
Exception Safety:not exception safe
Thread Safety:thread-safe
Description:Creates a new instance of RdsException from errorCode and throws it as a C++ exception. As per SWS_CORE_10304, this function does not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain.

2.4 Class: RdsException

Kind:class
Header file:#include "ara/rds/rds_error_domain.h"
Forwarding header file:#include "ara/rds/rds_fwd.h"
Scope:namespace ara::rds
Symbol:RdsException
Base class:ara::core::Exception
Syntax:class RdsException : public ara::core::Exception {...};
Description:Defines a class for exceptions to be thrown by the Raw Data Streams.

2.4.1 Public Member Functions

2.4.1.1 Constructors
2.4.1.1.1 RdsException
Kind:function
Header file:#include "ara/rds/rds_error_domain.h"
Scope:ara::rds::RdsException
Syntax:explicit RdsException (ara::core::ErrorCode errorCode) noexcept;
Parameters (in):errorCodeThe error code.
Exception Safety:exception safe
Thread Safety:thread-safe
Description:Constructs a new RdsException object containing an error code.

See also

  • Instance specifier resolution and the runtime model: PARA Overview
  • Raw data stream configuration: RawDataStreamMapping, Service Instance configuration