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
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
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().
uint8_t* famouso::mw::afp::defrag::Defragmenter< DCP >::get_event_data | ( | ) | [inline] |
Get data of the reconstructed event.
- Precondition:
- is_event_complete() returns true
Referenced by famouso::mw::afp::DefragmentationProcessorKeepEventSupport< AFPDC >::kept_get_event_data(), and famouso::mw::afp::DefragmentationProcessor< AFP_DefragConfig >::process_fragment().
elen_t famouso::mw::afp::defrag::Defragmenter< DCP >::get_event_length | ( | ) | [inline] |
Get length of the reconstructed event.
- Precondition:
- is_event_complete() returns true
Referenced by famouso::mw::afp::DefragmentationProcessorKeepEventSupport< AFPDC >::kept_get_event_length(), and famouso::mw::afp::DefragmentationProcessor< AFP_DefragConfig >::process_fragment().
bool famouso::mw::afp::defrag::Defragmenter< DCP >::is_event_complete | ( | ) | [inline] |
Returns whether the event already got reconstructed completely.
Referenced by famouso::mw::afp::defrag::EventSeqDemux< DCP >::keep_defragmenter(), and famouso::mw::afp::DefragmentationProcessor< AFP_DefragConfig >::process_fragment().
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:
- include/mw/afp/defrag/Defragmenter.h