famouso::mw::afp::frag::FECFragmenter< FCP > Class Template Reference
Fragmentation supporting generation of forward error correction redundancy. More...
#include <FECFragmenter.h>
Public Types | |
enum | { min_header_length = Base::min_header_length + FEC::header_length } |
Minimum header length. More... | |
enum | { extension_header_length = Base::extension_header_length + FEC::header_length } |
Extension header's length. More... | |
Public Member Functions | |
void | init (const uint8_t *event_data, elen_t event_length, flen_t mtu) |
Init a new fragmenter for an event. | |
flen_t | get_fragment (uint8_t *fragment_data) |
Write next fragment to fragment_data buffer. | |
Protected Attributes | |
FEC | fec |
FEC redundancy generator. | |
bool | redundancy |
Will this event contain FEC redundancy? |
Detailed Description
template<class FCP>
class famouso::mw::afp::frag::FECFragmenter< FCP >
Fragmentation supporting generation of forward error correction redundancy.
For all fragments the payload length is constant (the last non-redundancy fragment may be smaller), because the used FEC algorithm needs equal block size. As the header length may vary between fragments, the full MTU is not used in many cases.
Member Enumeration Documentation
Member Function Documentation
flen_t famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment | ( | uint8_t * | fragment_data | ) | [inline] |
Write next fragment to fragment_data buffer.
- Parameters:
-
[in] fragment_data Output buffer for fragment (at least mtu Bytes)
- Returns:
- Length of data put into fragment buffer
Reimplemented from famouso::mw::afp::frag::NoFECFragmenter< FCP >.
References famouso::mw::afp::frag::NoFECFragmenter< FCP >::basic_header_length, FAMOUSO_ASSERT, famouso::mw::afp::frag::FECFragmenter< FCP >::fec, famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::UseFEC< FCP >::get_header(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_header(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_next_header_shorten_fseq(), famouso::mw::afp::frag::UseFEC< FCP >::get_red_fragment(), famouso::mw::afp::frag::UseFEC< FCP >::header_length, famouso::mw::afp::frag::NoFECFragmenter< FCP >::next_header_shorten_fseq, famouso::mw::afp::frag::NoFECFragmenter< FCP >::payload_length, famouso::mw::afp::frag::UseFEC< FCP >::put_nonred_fragment(), famouso::mw::afp::frag::UseFEC< FCP >::put_smaller_nonred_fragment(), famouso::mw::afp::frag::FECFragmenter< FCP >::redundancy, famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_data, famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_fragments, and famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_length.
void famouso::mw::afp::frag::FECFragmenter< FCP >::init | ( | const uint8_t * | event_data, | |
elen_t | event_length, | |||
flen_t | mtu | |||
) | [inline] |
Init a new fragmenter for an event.
- Parameters:
-
[in] event_data Buffer containing the data to be fragmented [in] event_length Length of event_data buffer [in] mtu Maximum length of constructed fragments (header + payload)
Reimplemented from famouso::mw::afp::frag::NoFECFragmenter< FCP >.
References famouso::mw::afp::frag::NoFECFragmenter< FCP >::basic_header_length, famouso::mw::afp::frag::NoFECFragmenter< FCP >::err, famouso::mw::afp::frag::FECFragmenter< FCP >::extension_header_length, FAMOUSO_ASSERT, famouso::mw::afp::frag::FECFragmenter< FCP >::fec, famouso::mw::afp::frag::NoFECFragmenter< FCP >::first_fragment, famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_next_header_shorten_fseq(), famouso::mw::afp::frag::UseFEC< FCP >::init(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::init(), famouso::mw::afp::frag::UseFEC< FCP >::k2n(), famouso::mw::afp::frag::FECFragmenter< FCP >::min_header_length, famouso::mw::afp::frag::NoFECFragmenter< FCP >::next_header_shorten_fseq, famouso::mw::afp::frag::NoFECFragmenter< FCP >::payload_length, famouso::mw::afp::frag::FECFragmenter< FCP >::redundancy, famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_data, famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_fragments, and famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_length.
Field Documentation
FEC famouso::mw::afp::frag::FECFragmenter< FCP >::fec [protected] |
FEC redundancy generator.
Referenced by famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment(), and famouso::mw::afp::frag::FECFragmenter< FCP >::init().
bool famouso::mw::afp::frag::FECFragmenter< FCP >::redundancy [protected] |
Will this event contain FEC redundancy?
Referenced by famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment(), and famouso::mw::afp::frag::FECFragmenter< FCP >::init().
The documentation for this class was generated from the following file:
- include/mw/afp/frag/FECFragmenter.h