|
CCSDS 124.0-B-1 C++ 1.0.0
CCSDS 124.0-B-1 Lossless Compression
|
CCSDS 124.0-B-1 compressor with static memory allocation. More...
#include <compressor.hpp>
Public Member Functions | |
| Compressor (std::uint8_t robustness=0, int pt_limit=0, int ft_limit=0, int rt_limit=0) noexcept | |
| Construct compressor with configuration. | |
| void | set_initial_mask (const BitVector< N > &initial_mask) noexcept |
| Set the initial mask. | |
| void | reset () noexcept |
| Reset compressor to initial state. | |
| template<std::size_t OutputSize> | |
| Error | compress_packet (const BitVector< N > &input, BitBuffer< OutputSize > &output, const CompressParams *params=nullptr) noexcept |
| Compress a single input packet. | |
| std::size_t | time_index () const noexcept |
| Get current time index. | |
| std::uint8_t | robustness () const noexcept |
| Get robustness level. | |
| const BitVector< N > & | mask () const noexcept |
| Get current mask. | |
| CompressParams | compute_auto_params (std::size_t packet_index) noexcept |
| Compute parameters for automatic mode. | |
CCSDS 124.0-B-1 compressor with static memory allocation.
Template class that implements the CCSDS 124.0-B-1 compression algorithm. All memory is statically allocated based on template parameters.
| N | Packet length in bits (F) |
| MaxOutputBytes | Maximum output buffer size |
Definition at line 58 of file compressor.hpp.
|
inlineexplicitnoexcept |
Construct compressor with configuration.
| robustness | Base robustness level R_t (0-7) |
| pt_limit | New mask period (0 = manual control) |
| ft_limit | Send mask period (0 = manual control) |
| rt_limit | Uncompressed period (0 = manual control) |
Definition at line 68 of file compressor.hpp.
References ccsds124::Compressor< N, MaxOutputBytes >::reset().
|
inlinenoexcept |
Compress a single input packet.
| OutputSize | Output buffer size in bytes |
| input | Input packet I_t (must be length N) |
| output | Compressed output buffer |
| params | Compression parameters (nullptr = use automatic) |
Definition at line 134 of file compressor.hpp.
References ccsds124::BitBuffer< MaxBytes >::append_bit(), ccsds124::BitBuffer< MaxBytes >::append_bitvector(), ccsds124::BitBuffer< MaxBytes >::append_value(), ccsds124::bit_extract(), ccsds124::bit_extract_forward(), ccsds124::BitBuffer< MaxBytes >::clear(), ccsds124::compute_change(), ccsds124::count_encode(), ccsds124::MAX_HISTORY, ccsds124::MAX_VT_HISTORY, ccsds124::CompressParams::min_robustness, ccsds124::CompressParams::new_mask_flag, ccsds124::Ok, ccsds124::rle_encode(), ccsds124::CompressParams::send_mask_flag, ccsds124::CompressParams::uncompressed_flag, ccsds124::update_build(), and ccsds124::update_mask().
Referenced by ccsds124::compress().
|
inlinenoexcept |
Compute parameters for automatic mode.
| packet_index | Current packet index (0-based) |
Definition at line 351 of file compressor.hpp.
References ccsds124::CompressParams::min_robustness, ccsds124::CompressParams::new_mask_flag, ccsds124::CompressParams::send_mask_flag, and ccsds124::CompressParams::uncompressed_flag.
|
inlinenoexcept |
Get current mask.
Definition at line 341 of file compressor.hpp.
|
inlinenoexcept |
Reset compressor to initial state.
Resets time index to 0 and clears all history while preserving configuration.
Definition at line 96 of file compressor.hpp.
References ccsds124::MAX_HISTORY, and ccsds124::MAX_VT_HISTORY.
Referenced by ccsds124::Compressor< N, MaxOutputBytes >::Compressor().
|
inlinenoexcept |
Get robustness level.
Definition at line 334 of file compressor.hpp.
|
inlinenoexcept |
Set the initial mask.
| initial_mask | Initial mask M_0 |
Definition at line 85 of file compressor.hpp.
|
inlinenoexcept |
Get current time index.
Definition at line 327 of file compressor.hpp.