Menu

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

Reconstructs one event from fragments. More...

#include <Defragmenter.h>

Public Member Functions

 Defragmenter (flen_t max_chunk_length)
 Construct a new event to be defragmented.
void put_fragment (const Headers< DCP > &header, const uint8_t *data, flen_t length)
 Process a fragment known to be part of this event.
bool is_event_complete ()
 Returns whether the event already got reconstructed completely.
uint8_t * get_event_data ()
 Get data of the reconstructed event.
elen_t get_event_length ()
 Get length of the reconstructed event.
bool error ()
 True if the event cannot be reconstructed anymore for sure.

Detailed Description

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

Reconstructs one event from fragments.

Includes fragment duplicate checking (if configured by policy) and event data reconstruction.


Constructor & Destructor Documentation

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

Construct a new event to be defragmented.

Parameters:
max_chunk_length Maximum length of one fragments data

Member Function Documentation

template<class DCP>
bool famouso::mw::afp::defrag::Defragmenter< DCP >::error (  )  [inline]

True if the event cannot be reconstructed anymore for sure.

Referenced by famouso::mw::afp::DefragmentationProcessor< AFP_DefragConfig >::process_fragment().

template<class DCP>
uint8_t* famouso::mw::afp::defrag::Defragmenter< DCP >::get_event_data (  )  [inline]
template<class DCP>
elen_t famouso::mw::afp::defrag::Defragmenter< DCP >::get_event_length (  )  [inline]
template<class DCP>
bool famouso::mw::afp::defrag::Defragmenter< DCP >::is_event_complete (  )  [inline]
template<class DCP>
void famouso::mw::afp::defrag::Defragmenter< DCP >::put_fragment ( const Headers< DCP > &  header,
const uint8_t *  data,
flen_t  length 
) [inline]

Process a fragment known to be part of this event.

The fragment passed must be part of the event which is reconstructed by this instance. The demultiplexing policy should ensure that.

Includes duplicate checking if you do not use NoDuplicateChecking policy.

References famouso::mw::afp::defrag::Statistics< Tag >::fragment_duplicate().

Referenced by famouso::mw::afp::DefragmentationProcessor< AFP_DefragConfig >::process_fragment().


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