libe3 0.2.5
C++ library for E3AP RAN vendor integration
Loading...
Searching...
No Matches
libe3::Pdu Struct Reference

Generic E3AP PDU structure. More...

#include <types.hpp>

Public Member Functions

 Pdu ()
 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

Public Attributes

PduType type {PduType::SETUP_REQUEST}
PduChoice choice
uint32_t message_id {0}
 Unique message identifier.
uint64_t enqueue_seq {0}
 Set by queue_outbound; keys the [latrec] L-stage records.
uint64_t timestamp {0}
 Producer timestamp, in nanoseconds since the Unix epoch.

Detailed Description

Generic E3AP PDU structure.

Definition at line 345 of file types.hpp.

Constructor & Destructor Documentation

◆ Pdu() [1/3]

libe3::Pdu::Pdu ( )
inline

Definition at line 365 of file types.hpp.

◆ Pdu() [2/3]

libe3::Pdu::Pdu ( PduType t)
inlineexplicit

Definition at line 367 of file types.hpp.

◆ Pdu() [3/3]

template<typename T>
libe3::Pdu::Pdu ( PduType t,
T && data )
inline

Definition at line 370 of file types.hpp.

Member Function Documentation

◆ get_if() [1/2]

template<typename T>
const T * libe3::Pdu::get_if ( ) const
inlinenoexcept

Definition at line 382 of file types.hpp.

◆ get_if() [2/2]

template<typename T>
T * libe3::Pdu::get_if ( )
inlinenoexcept

Get PDU data with type checking.

Definition at line 377 of file types.hpp.

Member Data Documentation

◆ choice

PduChoice libe3::Pdu::choice

Definition at line 347 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 349 of file types.hpp.

◆ message_id

uint32_t libe3::Pdu::message_id {0}

Unique message identifier.

Definition at line 348 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 363 of file types.hpp.

◆ type

PduType libe3::Pdu::type {PduType::SETUP_REQUEST}

Definition at line 346 of file types.hpp.


The documentation for this struct was generated from the following file:
  • /home/runner/work/libe3/libe3/include/libe3/types.hpp