Encapsulates common header fields such as timestamps and sequence numbers for IEEE 1722 AVTPDU streams as optional values.
Context
The class ara::rds::IEEE1722DatagramAVTPDUCommonStreamHeaderFields provides within the Raw Data Stream module (rds) of the AUTOSAR Adaptive Platform the common representation of stream header fields for IEEE 1722 AVTPDU datagrams SWS RawDataStream p. 1. It is included via the header #include "ara/rds/raw_data_stream_IEEE1722.h" and forms the standardized foundation for processing Audio/Video Transport Protocol Data Units (AVTPDU) via Ethernet-based data streams. All protocol variables defined in the specification are provided with the access modifier protected ([SWS_RDS_90235], [SWS_RDS_90236], [SWS_RDS_90237], [SWS_RDS_90238], [SWS_RDS_90239], [SWS_RDS_90240], [SWS_RDS_90241]). Interpretation: This suggests that the class is designed as an inheritance base for specialized datagram types and is unlikely to be intended for direct use as a standalone object in application code. Question Q-11a6ac64bcd3c7d8 (open)
The class bundles protocol attributes of the IEEE 1722 AVTP stream. These include sequence number sequenceNum [SWS_RDS_90240] for tracking packet order, timestamp avtp_timestamp of type ara::tsync::Timestamp [SWS_RDS_90237] for chronological categorization in the synchronized network, and the time uncertainty flag tu [SWS_RDS_90241]. Additional header fields such as MAC address, identifier, and flags complete the protocol frame ([SWS_RDS_90235], [SWS_RDS_90236], [SWS_RDS_90238], [SWS_RDS_90239]). The consistent encapsulation of each data field in an ara::core::Optional accounts for the fact that not all fields must always be populated, depending on the AVTPDU format variant.
Lifecycle
Instantiation and lifetime of the common header fields are tied directly to the respective derived datagram class. Because the members are declared protected, they are typically allocated in the constructor of a specialized subclass as soon as an AVTPDU stream is received or assembled for transmission SWS RawDataStream p. 1.
For proper destruction, the class declares a virtual destructor with the identifier ~IEEE1722DatagramAVTPDUCommonStreamHeaderFields() noexcept [SWS_RDS_90242]. Virtuality ensures that when a datagram is deleted via a base class pointer, complete destructor invocation of the derived instance occurs. The qualification as noexcept guarantees that no exceptions are thrown during destruction.
Regarding concurrency, the class provides no synchronization mechanisms. Interpretation: Thread-safe access to the protected members during parallel processing presumably must be ensured by higher-level mechanisms of the using layers. Question (open)
Usage Path
In practice, usage typically follows this sequence:
- Creation and population: A derived datagram class instantiates the header structure. When sending, it populates the required
ara::core::Optional fields, for example sequence number sequenceNum [SWS_RDS_90240] and AVTP timestamp avtp_timestamp [SWS_RDS_90237].
- Processing in the receive path: Incoming raw data is deserialized and assigned to the attributes. The evaluation logic checks for the presence of optional values and, for example, processes timing via synchronization timestamp [SWS_RDS_90237] or discards duplicate packets based on
sequenceNum [SWS_RDS_90240].
- Release: After stream processing, the instance is cleaned up via the destructor [SWS_RDS_90242].
Error Scenarios
No specific error codes or exception types are defined for the class in the specification. Possible error states are limited to handling optional data fields and interface conditions:
Since all fields are encapsulated as ara::core::Optional ([SWS_RDS_90235], [SWS_RDS_90236], [SWS_RDS_90237], [SWS_RDS_90238], [SWS_RDS_90239], [SWS_RDS_90240], [SWS_RDS_90241]), it must be ensured before accessing their value that the field is validly populated. Unchecked direct access to an empty optional object leads to erroneous behavior.
The destructor is declared as noexcept [SWS_RDS_90242]. Any errors occurring during resource cleanup in derived structures must therefore not be propagated as exceptions, but must be handled internally.
This guide is based on the AUTOSAR Adaptive R25-11 specification.
gemini-3.8-flash-low· 2026-10-13 · German original