Menu

famouso::mw::afp::defrag::detail::VarHeaderLength< DCP > Class Template Reference

#include <VarHeaderLength.h>

Public Types

typedef
ExpandedRangeTypeSelector
< elen_t >::type 
eelen_t
 Return type of get_payload().

Static Public Member Functions

static eelen_t get_payload (fcount_t frag_count, flen_t no_ext_mtu)
 Returns maximum payload of an event.
static flen_t get_basic_header_len (fcount_t fseq)
 Returns the basic header length for a given fragment sequence number.

template<class DCP>
class famouso::mw::afp::defrag::detail::VarHeaderLength< DCP >


Member Typedef Documentation

template<class DCP >
typedef ExpandedRangeTypeSelector<elen_t>::type famouso::mw::afp::defrag::detail::VarHeaderLength< DCP >::eelen_t

Return type of get_payload().


Member Function Documentation

template<class DCP >
static flen_t famouso::mw::afp::defrag::detail::VarHeaderLength< DCP >::get_basic_header_len ( fcount_t  fseq  )  [inline, static]

Returns the basic header length for a given fragment sequence number.

Parameters:
fseq Fragment sequence number
Returns:
Basic header length

Assumes variable basic header length. Chooses minimal header length sufficient to encode fseq.

Referenced by famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::put_fragment(), famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::put_fragment(), and famouso::mw::afp::defrag::FECEventDataReconstructor< DCP >::put_fragment().

template<class DCP >
static eelen_t famouso::mw::afp::defrag::detail::VarHeaderLength< DCP >::get_payload ( fcount_t  frag_count,
flen_t  no_ext_mtu 
) [inline, static]

Returns maximum payload of an event.

Parameters:
frag_count Count of fragments the event consists of
no_ext_mtu MTU minus extension header's length
Returns:
Maximum payload of an event with given parameters (may exceed the range of elen_t)

This function assumes variable basic header length, constant extension header length and variable payload per fragment (the full MTU is used except for the last fragment).

References FAMOUSO_ASSERT.

Referenced by famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::put_fragment(), famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::put_fragment(), and famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::realloc_event_data().


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