Menu

famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP > Class Template Reference

Policy: Reconstruct event data from fragments that may arrive out of order. Does not support forward error correction. More...

#include <OutOfOrderEventDataReconstructor.h>

Inheritance diagram for famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >:
famouso::mw::afp::defrag::FECEventDataReconstructor< DCP >

Public Types

typedef NoFECHeaderSupport< DCP > FECHeaderPolicy

Public Member Functions

 OutOfOrderEventDataReconstructor (flen_t no_ext_mtu)
 Constructor.
 ~OutOfOrderEventDataReconstructor ()
 Destructor.
void put_fragment (const Headers< DCP > &header, const uint8_t *data, flen_t length)
 Process new fragment.
bool is_complete ()
 Returns whether the event already got reconstructed completely.
uint8_t * get_data ()
 Returns the defragmented data block.
elen_t get_length ()
 Returns the length of the event's data.
bool error ()
 Returns true if an error occured and event cannot be reconstructed for sure.

Protected Member Functions

void realloc_event_data (fcount_t new_fragment_count)
 Prepending realloc (add memory in front).

Protected Attributes

uint8_t * event_data
 Points to restored data block.
uint8_t * behind_event_data
 Points behind restored data block.
elen_t event_length
 Length of the currently restored data (sum of put fragment's length).
bool event_fragment_count_final
 false, if first fragment did not arrive (yet)
fcount_t event_fragment_count
 Count of fragments the event consists of.
fcount_t arrived_fragment_count
 Count of data chunks collected.
flen_t no_ext_mtu
 MTU minus extension header's length. Zero encodes error status of this object.

Detailed Description

template<class DCP>
class famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >

Policy: Reconstruct event data from fragments that may arrive out of order. Does not support forward error correction.

Using this policy automatically selects NoFECHeaderSupport as FEC header policy.

Alternative policies: InOrderEventDataReconstructor, FECEventDataReconstructor


Member Typedef Documentation


Constructor & Destructor Documentation

template<class DCP >
famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::OutOfOrderEventDataReconstructor ( flen_t  no_ext_mtu  )  [inline]

Constructor.

Parameters:
no_ext_mtu MTU minus extension header's length

Member Function Documentation

template<class DCP >
void famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::put_fragment ( const Headers< DCP > &  header,
const uint8_t *  data,
flen_t  length 
) [inline]

Process new fragment.

Parameters:
header AFP header of the fragment
data Payload data of the fragment
length Payload data length of the fragment

Reimplemented in famouso::mw::afp::defrag::FECEventDataReconstructor< DCP >.

References famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::arrived_fragment_count, famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::behind_event_data, famouso::mw::afp::defrag::Statistics< Tag >::event_complete(), famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::event_data, famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::event_fragment_count, famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::event_fragment_count_final, famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::event_length, FAMOUSO_ASSERT, famouso::mw::afp::defrag::Headers< DCP >::fec, famouso::mw::afp::defrag::Headers< DCP >::first_fragment, FOR_FAMOUSO_ASSERT_ONLY, famouso::mw::afp::defrag::Statistics< Tag >::fragment_used(), famouso::mw::afp::defrag::Statistics< Tag >::fragments_currently_expected_add(), famouso::mw::afp::defrag::Statistics< Tag >::fragments_currently_expected_sub(), famouso::mw::afp::defrag::Statistics< Tag >::fragments_expected(), famouso::mw::afp::defrag::Headers< DCP >::fseq, famouso::mw::afp::defrag::detail::VarHeaderLength< DCP >::get_basic_header_len(), famouso::mw::afp::defrag::detail::VarHeaderLength< DCP >::get_payload(), famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::is_complete(), famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::no_ext_mtu, and famouso::mw::afp::defrag::OutOfOrderEventDataReconstructor< DCP >::realloc_event_data().

Referenced by famouso::mw::afp::defrag::FECEventDataReconstructor< DCP >::put_fragment().


Field Documentation


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