Generic E3AP PDU structure.
More...
#include <types.hpp>
|
| | Pdu () |
| | SetupRequest-typed PDU with a default-constructed message and a fresh timestamp.
|
| | Pdu (PduType t) |
| template<typename T> |
| | Pdu (PduType t, T &&data) |
| template<typename T> |
| T * | get_if () noexcept |
| | Get PDU data with type checking.
|
| template<typename T> |
| const T * | get_if () const noexcept |
| | Get PDU data with type checking.
|
Generic E3AP PDU structure.
Definition at line 448 of file types.hpp.
◆ Pdu() [1/3]
SetupRequest-typed PDU with a default-constructed message and a fresh timestamp.
Definition at line 469 of file types.hpp.
◆ Pdu() [2/3]
PDU of type t with a default-constructed message and a fresh timestamp.
- Parameters
-
Definition at line 473 of file types.hpp.
◆ Pdu() [3/3]
template<typename T>
| libe3::Pdu::Pdu |
( |
PduType | t, |
|
|
T && | data ) |
|
inline |
PDU of type t that holds data, with a fresh timestamp.
- Parameters
-
| t | PDU type; it must match the type of data |
| data | The message |
Definition at line 479 of file types.hpp.
◆ get_if() [1/2]
template<typename T>
| const T * libe3::Pdu::get_if |
( |
| ) |
const |
|
inlinenoexcept |
Get PDU data with type checking.
- Template Parameters
-
| T | Message type to look for |
- Returns
- The message, or nullptr when the PDU holds another type
Definition at line 498 of file types.hpp.
◆ get_if() [2/2]
template<typename T>
| T * libe3::Pdu::get_if |
( |
| ) |
|
|
inlinenoexcept |
Get PDU data with type checking.
- Template Parameters
-
| T | Message type to look for |
- Returns
- The message, or nullptr when the PDU holds another type
Definition at line 488 of file types.hpp.
◆ choice
The message itself.
Definition at line 450 of file types.hpp.
◆ enqueue_seq
| uint64_t libe3::Pdu::enqueue_seq {0} |
Set by queue_outbound; keys the [latrec] L-stage records.
Definition at line 452 of file types.hpp.
◆ message_id
| uint32_t libe3::Pdu::message_id {0} |
Unique message identifier.
Definition at line 451 of file types.hpp.
◆ timestamp
| uint64_t libe3::Pdu::timestamp {0} |
Producer timestamp, in nanoseconds since the Unix epoch.
Stamped from the realtime clock (see now_realtime_ns) when the PDU is constructed, so a caller gets one for free. Zero means "no producer
reference": every encoding transmits it as an absent field and decodes an absent field back to zero, so the clock read is opt-out and a PDU without a timestamp is a normal message rather than a malformed one.
- Warning
- Realtime, not monotonic. Never subtract it from a monotonic reading.
Definition at line 466 of file types.hpp.
◆ type
The documentation for this struct was generated from the following file: