kodo: add decoding status layers based on bitmaps

An on-the-fly decoder tracks seen and decoded symbols. This information
would be nice to have available at the encoder also. To allow for easy
extraction and insertion of such information, this patch adds two layers
(encoder_status_vector and decoder_status_vector) that can replace the
two current status layers: symbol_decoding_status_tracker and
symbol_decoding_status_counter.

The new layers use boost::dynamic_bitset to track symbols, and since
this container already provides count-information, there is no need to
use a counter layer.

To exploit the benefit of using bitsets, the user can copy out the
current (seen|decoded) bitset from the decoder by using
get_decoder_status(uint8_t *). To insert the information in the encoder,
simply use set_decoded_istatus(uint8_t *).

Signed-off-by: Martin Hundebøll <m.hundeboll@gmail.com>
Signed-off-to: Steinwurf ApS
Adding comments and playing with API names
kodo: add layer to allow decoded-aware encoding

This patch adds a generator layer that enables the encoder to exploit
status information from the decoder to only include innovative symbols
in encoded packets.

The layer uses the encoder_status_vector layer to check if status
information from the decoder has been added, and if so, calls the new
generate_status_vector_aware() function in the uniform_generator layer.

Signed-off-by: Martin Hundebøll <m.hundeboll@gmail.com>
Signed-off-to: Steinwurf ApS

NB: When only one new packet is added to an encoder that uses binary
field size, there is a 50% risk that the next non-systematic packet
will be the null-vector, so use with care.
kodo: add decoding status layer based on bitmaps

An on-the-fly decoder tracks seen and decoded symbols. This information
would be nice to have available at the encoder also. To allow for easy
extraction and insertion of such information, this patch adds a new layer
(symbol_decoding_status_bitset) that can replace the two current status
layers: symbol_decoding_status_tracker and symbol_decoding_status_counter.

The new layer uses boost::dynamic_bitset to track symbols, and since
this container already provides count-information, there is no need to
use a counter layer.

To exploit the benefit of using bitsets, the user can copy out the
current (seen|decoded) bitset from the decoder by using get_seen_symbols()
and/or get_decoded_symbols(). To insert the information in the encoder,
simply use set_decoded_symbols() and/or set_seen_symbols().

Signed-off-by: Martin Hundebøll <m.hundeboll@gmail.com>
Signed-off-to: Steinwurf ApS
kodo: make systematic encoder storage aware

If a user chooses to add symbols to an on-the-fly encoder in a
non-chronological order, the systematic encoder will fail, as it uses an
incremental counter to select the next symbol to encode (systematically).

This patch adds a storage tracker layer that maintains a bitmap of
available symbols, and a systematic encoder layer that uses the former
to choose the next symbol to encode.

Signed-off-by: Martin Hundebøll <m.hundeboll@gmail.com>
Signed-off-to: SteinWurf ApS <contact@steinwurf.com>
kodo: add layer to use systematic for last needed symbol

If one is using status vectors to update decoder status at the encoder,
situations might occur, where the encoder tries to encoder over a single
symbol. (E.g. when encoder knows that the decoder was partial complete
and only one new symbol is added.) In this case, the encoder should use
systematic encoding, as it has no other packets to include.

This patch adds a layer to intersect the encoding process, detect
when the above situation occurs, and then use systematic encoding.

The layer relies on the two previous added layers to detect when
systematic should be used: encoder_status_vector
and storage_status vector.

Signed-off-by: Martin Hundebøll <m.hundeboll@gmail.com>
Signed-off-to: SteinWurf ApS <contact@steinwurf.com>
Using the status API naming scheme
- Renamed the decoder_status_vector and encoder_status_vector to pivot_status_writer and pivot_status_reader.
- Modified the pivot_status_reader and pivot_status_writer to only capture pivot information.
- Added the pivot_status_bitset containing commen code from the pivot_status_writer and pivot_status_reader.
Trying to split the systematic phase detection into a seperate layer
Fix bug not calling the correct SuperCoder layer due to injected layer. Reported-by Martin Hundebøll <mhu@es.aau.dk>
Merge branch 'master' into decoding-status-bitmap
Minor edits
Working on implementing the basic systematic phase detection
Working on the systematic aware phase
Adding unit tests for the new systematic functionality
Merge branch 'master' into decoding-status-bitmap
Starting to update the systematic encoder
Cleaning up the systematic encoder and integrating the storage aware systematic phase
Seperating the systematic API, improving the generic API and adding unit tests
Working on the failing unit tests for the systematic encoder