famouso::mw::afp::frag::NoFECFragmenter< FCP > Class Template Reference
Fragmentation not supporting FEC. More...
#include <NoFECFragmenter.h>
Public Types | |
enum | { min_header_length = 1 + EventSeqPolicy::header_length } |
Minimum header length. More... | |
enum | { extension_header_length = EventSeqPolicy::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. | |
bool | error () |
Returns whether an error occured. | |
flen_t | get_fragment (uint8_t *fragment_data) |
Write next fragment to fragment_data buffer. | |
Protected Member Functions | |
fcount_t | get_next_header_shorten_fseq (fcount_t fseq) |
Returns next fseq number for which header length decrements. | |
flen_t | get_header (uint8_t *data, bool more_ext_hdr=false) |
Write current fragment's header into buffer. | |
Protected Attributes | |
flen_t | basic_header_length |
Current length of the AFP basic header. | |
flen_t | payload_length |
Current length of the payload. | |
const uint8_t * | remaining_data |
Data remaining to be fragmented. | |
elen_t | remaining_length |
Length of the data remaining to be fragmented (without FEC data fragments). | |
fcount_t | remaining_fragments |
Number of fragments still to be fetched via get_fragment(). | |
fcount_t | next_header_shorten_fseq |
Next fragement sequence number for decrementing header length. | |
bool | first_fragment |
Is next fragment is the first fragment? | |
EventSeqPolicy | event_seq |
Event sequence number generator (may do nothing). | |
bool | err |
Error indication. |
Detailed Description
template<class FCP>
class famouso::mw::afp::frag::NoFECFragmenter< FCP >
Fragmentation not supporting FEC.
All fragments will be of equal size (MTU), the last fragment may be smaller. Due to variable header length the payload is variable too.
Member Enumeration Documentation
Member Function Documentation
bool famouso::mw::afp::frag::NoFECFragmenter< FCP >::error | ( | ) | [inline] |
Returns whether an error occured.
Check this after construction.
References famouso::mw::afp::frag::NoFECFragmenter< FCP >::err.
flen_t famouso::mw::afp::frag::NoFECFragmenter< 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 in famouso::mw::afp::frag::FECFragmenter< FCP >.
References famouso::mw::afp::frag::NoFECFragmenter< FCP >::basic_header_length, FAMOUSO_ASSERT, famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_header(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_next_header_shorten_fseq(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::next_header_shorten_fseq, famouso::mw::afp::frag::NoFECFragmenter< FCP >::payload_length, 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.
Referenced by famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment().
flen_t famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_header | ( | uint8_t * | data, | |
bool | more_ext_hdr = false | |||
) | [inline, protected] |
Write current fragment's header into buffer.
- Parameters:
-
[in] data Data buffer [in] more_ext_hdr True, if a further extension header will be appended
- Returns:
- Header length
References famouso::mw::afp::frag::NoFECFragmenter< FCP >::basic_header_length, famouso::mw::afp::frag::NoFECFragmenter< FCP >::event_seq, FAMOUSO_ASSERT, famouso::mw::afp::frag::NoFECFragmenter< FCP >::first_fragment, and famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_fragments.
Referenced by famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_fragment(), and famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment().
fcount_t famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_next_header_shorten_fseq | ( | fcount_t | fseq | ) | [inline, protected] |
Returns next fseq number for which header length decrements.
- Parameters:
-
fseq Current fragment sequence number
Referenced by famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::init(), and famouso::mw::afp::frag::FECFragmenter< FCP >::init().
void famouso::mw::afp::frag::NoFECFragmenter< 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 in famouso::mw::afp::frag::FECFragmenter< FCP >.
References famouso::mw::afp::frag::NoFECFragmenter< FCP >::basic_header_length, famouso::mw::afp::frag::NoFECFragmenter< FCP >::err, famouso::mw::afp::frag::NoFECFragmenter< FCP >::extension_header_length, FAMOUSO_ASSERT, famouso::mw::afp::frag::NoFECFragmenter< FCP >::first_fragment, famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_next_header_shorten_fseq(), famouso::mw::afp::frag::NoFECFragmenter< 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::NoFECFragmenter< FCP >::remaining_data, famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_fragments, and famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_length.
Referenced by famouso::mw::afp::frag::FECFragmenter< FCP >::init().
Field Documentation
flen_t famouso::mw::afp::frag::NoFECFragmenter< FCP >::basic_header_length [protected] |
Current length of the AFP basic header.
Referenced by famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_header(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::init(), and famouso::mw::afp::frag::FECFragmenter< FCP >::init().
bool famouso::mw::afp::frag::NoFECFragmenter< FCP >::err [protected] |
Error indication.
Referenced by famouso::mw::afp::frag::NoFECFragmenter< FCP >::error(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::init(), and famouso::mw::afp::frag::FECFragmenter< FCP >::init().
EventSeqPolicy famouso::mw::afp::frag::NoFECFragmenter< FCP >::event_seq [protected] |
Event sequence number generator (may do nothing).
Referenced by famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_header().
bool famouso::mw::afp::frag::NoFECFragmenter< FCP >::first_fragment [protected] |
Is next fragment is the first fragment?
Referenced by famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_header(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::init(), and famouso::mw::afp::frag::FECFragmenter< FCP >::init().
fcount_t famouso::mw::afp::frag::NoFECFragmenter< FCP >::next_header_shorten_fseq [protected] |
Next fragement sequence number for decrementing header length.
Referenced by famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::init(), and famouso::mw::afp::frag::FECFragmenter< FCP >::init().
flen_t famouso::mw::afp::frag::NoFECFragmenter< FCP >::payload_length [protected] |
const uint8_t* famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_data [protected] |
Data remaining to be fragmented.
Referenced by famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::init(), and famouso::mw::afp::frag::FECFragmenter< FCP >::init().
fcount_t famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_fragments [protected] |
Number of fragments still to be fetched via get_fragment().
Referenced by famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_header(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::init(), and famouso::mw::afp::frag::FECFragmenter< FCP >::init().
elen_t famouso::mw::afp::frag::NoFECFragmenter< FCP >::remaining_length [protected] |
Length of the data remaining to be fragmented (without FEC data fragments).
Referenced by famouso::mw::afp::frag::NoFECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::FECFragmenter< FCP >::get_fragment(), famouso::mw::afp::frag::NoFECFragmenter< FCP >::init(), and famouso::mw::afp::frag::FECFragmenter< FCP >::init().
The documentation for this class was generated from the following file:
- include/mw/afp/frag/NoFECFragmenter.h