E2SAR 0.3.0
Loading...
Searching...
No Matches
e2sar::LBHdrV3 Struct Reference

#include <e2sarHeaders.hpp>

Public Member Functions

void set (u_int16_t slt, u_int16_t prt, EventNum_t tk)
 
u_int8_t get_version () const
 
bool check_version () const
 
u_int8_t get_nextProto () const
 
u_int16_t get_slotSelect () const
 
u_int16_t get_portSelect () const
 
EventNum_t get_tick () const
 
const boost::tuple< u_int8_t, u_int8_t, u_int16_t, u_int16_t, EventNum_t > get_Fields () const
 

Data Fields

const char preamble [2] {'L', 'B'}
 
u_int8_t version {lbhdrVersion3}
 
u_int8_t nextProto {rehdrVersion}
 
u_int16_t slotSelect {0}
 
u_int16_t portSelect {0}
 
EventNum_t tick {0L}
 

Detailed Description

The Load Balancer Header v2. You should always use the provided methods to set and interrogate fields as the structure maintains Big-Endian order internally.

Member Function Documentation

◆ check_version()

bool e2sar::LBHdrV3::check_version ( ) const
inline

check version 2

◆ get_Fields()

const boost::tuple< u_int8_t, u_int8_t, u_int16_t, u_int16_t, EventNum_t > e2sar::LBHdrV3::get_Fields ( ) const
inline

Convenience method to get all fields (in host byte order where appropriate). Best way to use it is

u_int8_t version; u_int8_t nextProto; u_int16_t slotSelect; u_int16_t portSelect; EventNum_t tick;

boost::tie(version, nextProto, entropy, eventNum) = lbhdr.get_Fields();

◆ get_nextProto()

u_int8_t e2sar::LBHdrV3::get_nextProto ( ) const
inline

get next protocol field

◆ get_portSelect()

u_int16_t e2sar::LBHdrV3::get_portSelect ( ) const
inline

get port select in host byte order

◆ get_slotSelect()

u_int16_t e2sar::LBHdrV3::get_slotSelect ( ) const
inline

get slot select in host byte order

◆ get_tick()

EventNum_t e2sar::LBHdrV3::get_tick ( ) const
inline

get tick in host byte order

◆ get_version()

u_int8_t e2sar::LBHdrV3::get_version ( ) const
inline

get version

◆ set()

void e2sar::LBHdrV3::set ( u_int16_t slt,
u_int16_t prt,
EventNum_t tk )
inline

Set all fields to network/big-endian byte order values


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