famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP > Class Template Reference
Policy: Reconstruct event data from fragments arriving in order. Does not support forward error correction. More...
#include <InOrderEventDataReconstructor.h>
Public Types | |
typedef NoFECHeaderSupport< DCP > | FECHeaderPolicy |
Public Member Functions | |
InOrderEventDataReconstructor (flen_t no_ext_mtu) | |
Constructor. | |
~InOrderEventDataReconstructor () | |
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. |
Detailed Description
template<class DCP>
class famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >
Policy: Reconstruct event data from fragments arriving in order. Does not support forward error correction.
Using this policy automatically selects NoFECHeaderSupport as FEC header policy.
Alternative policies: OutOfOrderEventDataReconstructor, FECEventDataReconstructor
Member Typedef Documentation
typedef NoFECHeaderSupport<DCP> famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::FECHeaderPolicy |
Constructor & Destructor Documentation
famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::InOrderEventDataReconstructor | ( | flen_t | no_ext_mtu | ) | [inline] |
Constructor.
- Parameters:
-
no_ext_mtu MTU minus extension header's length
famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::~InOrderEventDataReconstructor | ( | ) | [inline] |
Member Function Documentation
bool famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::error | ( | ) | [inline] |
Returns true if an error occured and event cannot be reconstructed for sure.
Referenced by famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::get_data().
uint8_t* famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::get_data | ( | ) | [inline] |
Returns the defragmented data block.
- Precondition:
- is_complete() returns true
References famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::error().
Referenced by famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::is_complete().
elen_t famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::get_length | ( | ) | [inline] |
Returns the length of the event's data.
- Precondition:
- is_complete() returns true
References FAMOUSO_ASSERT, and famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::is_complete().
bool famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::is_complete | ( | ) | [inline] |
Returns whether the event already got reconstructed completely.
References famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::get_data().
Referenced by famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::get_length(), famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::put_fragment(), and famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::~InOrderEventDataReconstructor().
void famouso::mw::afp::defrag::InOrderEventDataReconstructor< 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
References famouso::mw::afp::defrag::Statistics< Tag >::event_complete(), 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(), and famouso::mw::afp::defrag::InOrderEventDataReconstructor< DCP >::is_complete().
The documentation for this class was generated from the following file:
- include/mw/afp/defrag/InOrderEventDataReconstructor.h