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

Encoded message wrapper. More...

#include <types.hpp>

Public Member Functions

 EncodedMessage ()=default
 Empty message with no format set.
 EncodedMessage (std::vector< uint8_t > buf, EncodingFormat fmt)
size_t size () const noexcept
bool empty () const noexcept
const uint8_t * data () const noexcept
uint8_t * data () noexcept

Public Attributes

std::vector< uint8_t > buffer
 Encoded data buffer.
EncodingFormat format
 Format used for encoding.

Detailed Description

Encoded message wrapper.

Unified wrapper for encoded data regardless of format used.

Definition at line 219 of file types.hpp.

Constructor & Destructor Documentation

◆ EncodedMessage() [1/2]

libe3::EncodedMessage::EncodedMessage ( )
default

Empty message with no format set.

◆ EncodedMessage() [2/2]

libe3::EncodedMessage::EncodedMessage ( std::vector< uint8_t > buf,
EncodingFormat fmt )
inline

Wrap an already encoded buffer.

Parameters
bufEncoded bytes, moved in
fmtFormat the bytes are in

Definition at line 228 of file types.hpp.

Member Function Documentation

◆ data() [1/2]

const uint8_t * libe3::EncodedMessage::data ( ) const
inlinenoexcept
Returns
Read-only pointer to the first encoded byte

Definition at line 236 of file types.hpp.

◆ data() [2/2]

uint8_t * libe3::EncodedMessage::data ( )
inlinenoexcept
Returns
Pointer to the first encoded byte

Definition at line 238 of file types.hpp.

◆ empty()

bool libe3::EncodedMessage::empty ( ) const
inlinenoexcept
Returns
True when there are no encoded bytes

Definition at line 234 of file types.hpp.

◆ size()

size_t libe3::EncodedMessage::size ( ) const
inlinenoexcept
Returns
Number of encoded bytes

Definition at line 232 of file types.hpp.

Member Data Documentation

◆ buffer

std::vector<uint8_t> libe3::EncodedMessage::buffer

Encoded data buffer.

Definition at line 220 of file types.hpp.

◆ format

EncodingFormat libe3::EncodedMessage::format

Format used for encoding.

Definition at line 221 of file types.hpp.


The documentation for this struct was generated from the following file: