diff options
Diffstat (limited to 'gr-fec')
136 files changed, 4700 insertions, 305 deletions
diff --git a/gr-fec/CMakeLists.txt b/gr-fec/CMakeLists.txt index 6b29853f8f..7e3dd90fd0 100644 --- a/gr-fec/CMakeLists.txt +++ b/gr-fec/CMakeLists.txt @@ -36,7 +36,6 @@ if(ENABLE_GR_FEC) add_subdirectory(include/gnuradio/fec) add_subdirectory(lib) if(ENABLE_PYTHON) - add_subdirectory(swig) add_subdirectory(python/fec) add_subdirectory(python/fec/LDPC) endif(ENABLE_PYTHON) diff --git a/gr-fec/grc/variable_ccsds_encoder_def_list.block.yml b/gr-fec/grc/variable_ccsds_encoder_def_list.block.yml index 3b5a076ed0..c28e8a1e44 100644 --- a/gr-fec/grc/variable_ccsds_encoder_def_list.block.yml +++ b/gr-fec/grc/variable_ccsds_encoder_def_list.block.yml @@ -28,7 +28,7 @@ parameters: default: '0' - id: mode label: Streaming Behavior - dtype: int + dtype: raw options: ['fec.CC_STREAMING', 'fec.CC_TERMINATED', 'fec.CC_TAILBITING', 'fec.CC_TRUNCATED'] option_labels: [Streaming, Terminated, Tailbiting, Truncated] value: ${ fec.ccsds_encoder_make(framebits, state_start, mode) } diff --git a/gr-fec/grc/variable_polar_code_configurator.block.yml b/gr-fec/grc/variable_polar_code_configurator.block.yml index fb2d8abee3..d7271f654e 100644 --- a/gr-fec/grc/variable_polar_code_configurator.block.yml +++ b/gr-fec/grc/variable_polar_code_configurator.block.yml @@ -5,7 +5,7 @@ flags: [ show_id ] parameters: - id: channel label: Channel - dtype: string + dtype: raw default: polar.CHANNEL_TYPE_BEC options: [polar.CHANNEL_TYPE_BEC, polar.CHANNEL_TYPE_AWGN] option_labels: [BEC, AWGN] diff --git a/gr-fec/include/gnuradio/fec/alist.h b/gr-fec/include/gnuradio/fec/alist.h index 71dc50ebe4..381c82b0af 100644 --- a/gr-fec/include/gnuradio/fec/alist.h +++ b/gr-fec/include/gnuradio/fec/alist.h @@ -75,7 +75,7 @@ public: void print_mlist_i(int i); //! Returns the corresponding H matrix - std::vector<std::vector<char>> get_matrix(); + std::vector<std::vector<uint8_t>> get_matrix(); protected: //! A variable indicating if data has been read from alist-file diff --git a/gr-fec/include/gnuradio/fec/awgn_bp.h b/gr-fec/include/gnuradio/fec/awgn_bp.h index e24a55879c..078baa700b 100644 --- a/gr-fec/include/gnuradio/fec/awgn_bp.h +++ b/gr-fec/include/gnuradio/fec/awgn_bp.h @@ -74,7 +74,7 @@ public: void update_vars(); //! Returns the current estimate - std::vector<char> get_estimate(); + std::vector<uint8_t> get_estimate(); //! Computes initial estimate based on the vector rx_word void compute_init_estimate(std::vector<float> rx_word); @@ -83,16 +83,16 @@ public: void decision(); //! Returns the syndrome for the current estimate - std::vector<char> get_syndrome(); + std::vector<uint8_t> get_syndrome(); //! Returns the syndrome for the input codeword - std::vector<char> get_syndrome(const std::vector<char> codeword); + std::vector<uint8_t> get_syndrome(const std::vector<uint8_t> codeword); //! Checks if the current estimate is a codeword bool is_codeword(); //! Checks if the input is a codeword - bool is_codeword(const std::vector<char> codeword); + bool is_codeword(const std::vector<uint8_t> codeword); //! Sets the variable K void set_K(int k); @@ -113,7 +113,7 @@ public: * \param niterations The number of message passing iterations * done to decode this codeword. */ - std::vector<char> decode(std::vector<float> rx_word, int* niterations); + std::vector<uint8_t> decode(std::vector<float> rx_word, int* niterations); private: //! The number of check nodes in the tanner-graph @@ -159,6 +159,6 @@ private: std::vector<int> num_mlist; //! The array for holding estimate computed on BP decoding - std::vector<char> estimate; + std::vector<uint8_t> estimate; }; #endif // ifndef AWGN_BP_H diff --git a/gr-fec/include/gnuradio/fec/cldpc.h b/gr-fec/include/gnuradio/fec/cldpc.h index 76d4bc325e..30cc7fbbda 100644 --- a/gr-fec/include/gnuradio/fec/cldpc.h +++ b/gr-fec/include/gnuradio/fec/cldpc.h @@ -48,7 +48,7 @@ public: section A.1 of the reference given below. - "Modern Coding Theory", T Richardson and R Urbanke. */ - std::vector<char> encode(std::vector<char> dataword); + std::vector<uint8_t> encode(std::vector<uint8_t> dataword); //! Returns the dimension of the code int dimension(); @@ -66,16 +66,16 @@ public: int get_N(); //! Returns the syndrome for a given vector "in" - std::vector<char> syndrome(const std::vector<char> in); + std::vector<uint8_t> syndrome(const std::vector<uint8_t> in); //! Returns true if "in" is a codeword, else false - bool is_codeword(const std::vector<char> in); + bool is_codeword(const std::vector<uint8_t> in); //! Set the variable _list void set_alist(const alist _list); //! Obtain systematic bits from "in" - std::vector<char> get_systematic_bits(std::vector<char> in); + std::vector<uint8_t> get_systematic_bits(std::vector<uint8_t> in); private: //! The parity check matrix diff --git a/gr-fec/include/gnuradio/fec/depuncture_bb.h b/gr-fec/include/gnuradio/fec/depuncture_bb.h index 8157487a04..3005a3e588 100644 --- a/gr-fec/include/gnuradio/fec/depuncture_bb.h +++ b/gr-fec/include/gnuradio/fec/depuncture_bb.h @@ -89,7 +89,7 @@ public: * \param delay Delayed the puncturing pattern by shifting it * \param symbol The symbol to reinsert into the stream (def=127) */ - static sptr make(int puncsize, int puncpat, int delay = 0, char symbol = 127); + static sptr make(int puncsize, int puncpat, int delay = 0, uint8_t symbol = 127); }; } /* namespace fec */ diff --git a/gr-fec/include/gnuradio/fec/gf2mat.h b/gr-fec/include/gnuradio/fec/gf2mat.h index 343b2ac5c3..a239b0e44e 100644 --- a/gr-fec/include/gnuradio/fec/gf2mat.h +++ b/gr-fec/include/gnuradio/fec/gf2mat.h @@ -17,7 +17,7 @@ class GF2Mat { //! The matrix H - std::vector<std::vector<char>> H; + std::vector<std::vector<uint8_t>> H; //! Number of rows in H int M; @@ -36,7 +36,7 @@ public: GF2Mat(alist _list); //! Initializes the class from a 2-D vector X - GF2Mat(std::vector<std::vector<char>> X); + GF2Mat(std::vector<std::vector<uint8_t>> X); //! Returns the variable M int get_M(); @@ -78,7 +78,7 @@ public: void add_rows(int i, int j); //! Returns the variable H - std::vector<std::vector<char>> get_H(); + std::vector<std::vector<uint8_t>> get_H(); /*! * \brief Obtains an equivalent representation of H for encoding diff --git a/gr-fec/include/gnuradio/fec/gf2vec.h b/gr-fec/include/gnuradio/fec/gf2vec.h index cb9aa4c5c8..fc0740051b 100644 --- a/gr-fec/include/gnuradio/fec/gf2vec.h +++ b/gr-fec/include/gnuradio/fec/gf2vec.h @@ -11,13 +11,14 @@ #ifndef GF2VEC_H #define GF2VEC_H +#include <stdint.h> #include <vector> class GF2Vec { private: //! The vector vec - std::vector<char> vec; + std::vector<uint8_t> vec; //! Resize the vector void resize(int size); @@ -30,16 +31,16 @@ public: GF2Vec(int size); //! Returns the vector - std::vector<char> get_vec(); + std::vector<uint8_t> get_vec(); //! Returns the size of the vector int size(); //! Resets the vector with the given input - void set_vec(const std::vector<char>); + void set_vec(const std::vector<uint8_t>); //! Access the ith element - char& operator[](int i); + uint8_t& operator[](int i); //! Overloading the operator '=' void operator=(GF2Vec x); @@ -51,7 +52,7 @@ public: friend GF2Vec operator+(GF2Vec a, GF2Vec b); //! Overloading the operator '*' - friend char operator*(GF2Vec a, GF2Vec b); + friend uint8_t operator*(GF2Vec a, GF2Vec b); //! Prints the vector void print_vec(); diff --git a/gr-fec/include/gnuradio/fec/polar_common.h b/gr-fec/include/gnuradio/fec/polar_common.h index eab11f3e7b..102e47e2c5 100644 --- a/gr-fec/include/gnuradio/fec/polar_common.h +++ b/gr-fec/include/gnuradio/fec/polar_common.h @@ -15,6 +15,7 @@ #include <vector> #include <gnuradio/fec/api.h> +#include <stdint.h> #include <vector> // Forward declaration for those objects. SWIG doesn't like them to be #include'd. @@ -62,7 +63,7 @@ public: polar_common(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values); + std::vector<uint8_t> frozen_bit_values); ~polar_common(); protected: @@ -78,7 +79,7 @@ protected: const unsigned int num_bytes) const; std::vector<int> d_frozen_bit_positions; - std::vector<char> d_frozen_bit_values; + std::vector<uint8_t> d_frozen_bit_values; std::vector<int> d_info_bit_positions; std::vector<int> d_info_bit_positions_reversed; void setup_info_bit_positions_reversed(); diff --git a/gr-fec/include/gnuradio/fec/polar_decoder_common.h b/gr-fec/include/gnuradio/fec/polar_decoder_common.h index 8c6b596a22..9d410dbc3d 100644 --- a/gr-fec/include/gnuradio/fec/polar_decoder_common.h +++ b/gr-fec/include/gnuradio/fec/polar_decoder_common.h @@ -43,7 +43,7 @@ public: polar_decoder_common(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values); + std::vector<uint8_t> frozen_bit_values); ~polar_decoder_common(); // FECAPI diff --git a/gr-fec/include/gnuradio/fec/polar_decoder_sc.h b/gr-fec/include/gnuradio/fec/polar_decoder_sc.h index fa6fa9539f..23886dc2f7 100644 --- a/gr-fec/include/gnuradio/fec/polar_decoder_sc.h +++ b/gr-fec/include/gnuradio/fec/polar_decoder_sc.h @@ -47,7 +47,7 @@ public: static generic_decoder::sptr make(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values); + std::vector<uint8_t> frozen_bit_values); ~polar_decoder_sc(); // FECAPI @@ -57,7 +57,7 @@ private: polar_decoder_sc(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values); + std::vector<uint8_t> frozen_bit_values); float* d_llr_vec; unsigned char* d_u_hat_vec; diff --git a/gr-fec/include/gnuradio/fec/polar_decoder_sc_list.h b/gr-fec/include/gnuradio/fec/polar_decoder_sc_list.h index f66f818ad5..28a223821e 100644 --- a/gr-fec/include/gnuradio/fec/polar_decoder_sc_list.h +++ b/gr-fec/include/gnuradio/fec/polar_decoder_sc_list.h @@ -56,7 +56,7 @@ public: int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values); + std::vector<uint8_t> frozen_bit_values); ~polar_decoder_sc_list(); // FECAPI @@ -67,7 +67,7 @@ private: int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values); + std::vector<uint8_t> frozen_bit_values); polar::scl_list* d_scl; diff --git a/gr-fec/include/gnuradio/fec/polar_encoder.h b/gr-fec/include/gnuradio/fec/polar_encoder.h index 2a7d056c77..c76a495050 100644 --- a/gr-fec/include/gnuradio/fec/polar_encoder.h +++ b/gr-fec/include/gnuradio/fec/polar_encoder.h @@ -53,7 +53,7 @@ public: static generic_encoder::sptr make(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values, + std::vector<uint8_t> frozen_bit_values, bool is_packed = false); ~polar_encoder(); @@ -70,7 +70,7 @@ private: polar_encoder(int block_size, int num_info_bits, std::vector<int>& frozen_bit_positions, - std::vector<char>& frozen_bit_values, + std::vector<uint8_t>& frozen_bit_values, bool is_packed); bool d_is_packed; diff --git a/gr-fec/lib/alist.cc b/gr-fec/lib/alist.cc index 9cedf42e99..b0a6ba34b3 100644 --- a/gr-fec/lib/alist.cc +++ b/gr-fec/lib/alist.cc @@ -12,9 +12,9 @@ alist::alist(const char* fname) : data_ok(false) { read(fname); } -std::vector<std::vector<char>> alist::get_matrix() +std::vector<std::vector<uint8_t>> alist::get_matrix() { - std::vector<std::vector<char>> mat; + std::vector<std::vector<uint8_t>> mat; mat.resize(M); for (int i = 0; i < M; i++) { mat[i].resize(N); diff --git a/gr-fec/lib/async_decoder_impl.cc b/gr-fec/lib/async_decoder_impl.cc index 8848964f49..7188c23cc4 100644 --- a/gr-fec/lib/async_decoder_impl.cc +++ b/gr-fec/lib/async_decoder_impl.cc @@ -52,11 +52,10 @@ async_decoder_impl::async_decoder_impl(generic_decoder::sptr my_decoder, if (d_packed) { d_pack = new blocks::kernel::pack_k_bits(8); - set_msg_handler(d_in_port, - boost::bind(&async_decoder_impl::decode_packed, this, _1)); + set_msg_handler(d_in_port, [this](pmt::pmt_t msg) { this->decode_packed(msg); }); } else { set_msg_handler(d_in_port, - boost::bind(&async_decoder_impl::decode_unpacked, this, _1)); + [this](pmt::pmt_t msg) { this->decode_unpacked(msg); }); } // The maximum frame size is set by the initial frame size of the decoder. diff --git a/gr-fec/lib/async_encoder_impl.cc b/gr-fec/lib/async_encoder_impl.cc index 8cb0992d5d..e8d24ad331 100644 --- a/gr-fec/lib/async_encoder_impl.cc +++ b/gr-fec/lib/async_encoder_impl.cc @@ -51,8 +51,7 @@ async_encoder_impl::async_encoder_impl(generic_encoder::sptr my_encoder, message_port_register_out(d_out_port); if (d_packed) { - set_msg_handler(d_in_port, - boost::bind(&async_encoder_impl::encode_packed, this, _1)); + set_msg_handler(d_in_port, [this](pmt::pmt_t msg) { this->encode_packed(msg); }); d_unpack = new blocks::kernel::unpack_k_bits(8); @@ -62,7 +61,7 @@ async_encoder_impl::async_encoder_impl(generic_encoder::sptr my_encoder, } else { set_msg_handler(d_in_port, - boost::bind(&async_encoder_impl::encode_unpacked, this, _1)); + [this](pmt::pmt_t msg) { this->encode_unpacked(msg); }); } if (d_packed || (strncmp(d_encoder->get_input_conversion(), "pack", 4) == 0)) { diff --git a/gr-fec/lib/awgn_bp.cc b/gr-fec/lib/awgn_bp.cc index 5d6d3bb6f8..43b73cf875 100644 --- a/gr-fec/lib/awgn_bp.cc +++ b/gr-fec/lib/awgn_bp.cc @@ -134,7 +134,7 @@ void awgn_bp::update_vars() } } -std::vector<char> awgn_bp::get_estimate() { return estimate; } +std::vector<uint8_t> awgn_bp::get_estimate() { return estimate; } void awgn_bp::compute_init_estimate(std::vector<float> rx_word) { @@ -160,9 +160,9 @@ void awgn_bp::set_K(int k) { K = k; } int awgn_bp::get_K() { return K; } -std::vector<char> awgn_bp::get_syndrome(std::vector<char> codeword) +std::vector<uint8_t> awgn_bp::get_syndrome(std::vector<uint8_t> codeword) { - std::vector<char> synd; + std::vector<uint8_t> synd; synd.resize(N - K); GF2Vec in_bvec; in_bvec.set_vec(codeword); @@ -172,9 +172,9 @@ std::vector<char> awgn_bp::get_syndrome(std::vector<char> codeword) return synd; } -std::vector<char> awgn_bp::get_syndrome() +std::vector<uint8_t> awgn_bp::get_syndrome() { - std::vector<char> synd; + std::vector<uint8_t> synd; synd.resize(N - K); GF2Vec in_bvec; in_bvec.set_vec(estimate); @@ -184,9 +184,9 @@ std::vector<char> awgn_bp::get_syndrome() return synd; } -bool awgn_bp::is_codeword(std::vector<char> codeword) +bool awgn_bp::is_codeword(std::vector<uint8_t> codeword) { - std::vector<char> synd; + std::vector<uint8_t> synd; synd = get_syndrome(codeword); bool is_code; is_code = true; @@ -200,7 +200,7 @@ bool awgn_bp::is_codeword(std::vector<char> codeword) bool awgn_bp::is_codeword() { - std::vector<char> synd; + std::vector<uint8_t> synd; synd = get_syndrome(); bool is_code; is_code = true; @@ -216,7 +216,7 @@ void awgn_bp::set_max_iterations(int k) { max_iterations = k; } int awgn_bp::get_max_iterations() { return max_iterations; } -std::vector<char> awgn_bp::decode(std::vector<float> rx_word, int* niteration) +std::vector<uint8_t> awgn_bp::decode(std::vector<float> rx_word, int* niteration) { *niteration = 0; compute_init_estimate(rx_word); diff --git a/gr-fec/lib/cldpc.cc b/gr-fec/lib/cldpc.cc index f4fb9f28a5..8a21d33c78 100644 --- a/gr-fec/lib/cldpc.cc +++ b/gr-fec/lib/cldpc.cc @@ -38,9 +38,9 @@ void cldpc::set_alist(const alist _list) K = N - rank_H; } -std::vector<char> cldpc::get_systematic_bits(std::vector<char> in) +std::vector<uint8_t> cldpc::get_systematic_bits(std::vector<uint8_t> in) { - std::vector<char> data; + std::vector<uint8_t> data; data.resize(K); int index; for (size_t i = 0; i < K; i++) { @@ -58,9 +58,9 @@ void cldpc::print_permute() std::cout << "\n"; } -std::vector<char> cldpc::syndrome(const std::vector<char> in) +std::vector<uint8_t> cldpc::syndrome(const std::vector<uint8_t> in) { - std::vector<char> synd; + std::vector<uint8_t> synd; synd.resize(rank_H); GF2Vec in_bvec; in_bvec.set_vec(in); @@ -70,9 +70,9 @@ std::vector<char> cldpc::syndrome(const std::vector<char> in) return synd; } -bool cldpc::is_codeword(const std::vector<char> in) +bool cldpc::is_codeword(const std::vector<uint8_t> in) { - std::vector<char> synd; + std::vector<uint8_t> synd; synd = syndrome(in); bool is_code; is_code = true; @@ -84,7 +84,7 @@ bool cldpc::is_codeword(const std::vector<char> in) return is_code; } -std::vector<char> cldpc::encode(std::vector<char> dataword) +std::vector<uint8_t> cldpc::encode(std::vector<uint8_t> dataword) { if (dataword.size() == K) { GF2Vec x(N); @@ -103,7 +103,7 @@ std::vector<char> cldpc::encode(std::vector<char> dataword) return y.get_vec(); } else { throw std::runtime_error("bad vector length!"); - return std::vector<char>(); + return std::vector<uint8_t>(); } } diff --git a/gr-fec/lib/depuncture_bb_impl.cc b/gr-fec/lib/depuncture_bb_impl.cc index d282170040..d5a765f2a2 100644 --- a/gr-fec/lib/depuncture_bb_impl.cc +++ b/gr-fec/lib/depuncture_bb_impl.cc @@ -23,13 +23,17 @@ namespace gr { namespace fec { -depuncture_bb::sptr depuncture_bb::make(int puncsize, int puncpat, int delay, char symbol) +depuncture_bb::sptr +depuncture_bb::make(int puncsize, int puncpat, int delay, uint8_t symbol) { return gnuradio::get_initial_sptr( new depuncture_bb_impl(puncsize, puncpat, delay, symbol)); } -depuncture_bb_impl::depuncture_bb_impl(int puncsize, int puncpat, int delay, char symbol) +depuncture_bb_impl::depuncture_bb_impl(int puncsize, + int puncpat, + int delay, + uint8_t symbol) : block("depuncture_bb", io_signature::make(1, 1, sizeof(unsigned char)), io_signature::make(1, 1, sizeof(unsigned char))), @@ -62,7 +66,7 @@ depuncture_bb_impl::depuncture_bb_impl(int puncsize, int puncpat, int delay, cha set_fixed_rate(true); set_relative_rate((uint64_t)d_puncsize, (uint64_t)(d_puncsize - d_puncholes)); set_output_multiple(d_puncsize); - // set_msg_handler(boost::bind(&depuncture_bb_impl::catch_msg, this, _1)); + // set_msg_handler(<portname>, [this](pmt::pmt_t msg) { this->catch_msg(msg); }); } depuncture_bb_impl::~depuncture_bb_impl() {} diff --git a/gr-fec/lib/depuncture_bb_impl.h b/gr-fec/lib/depuncture_bb_impl.h index 9be680eb36..4a7c1f0422 100644 --- a/gr-fec/lib/depuncture_bb_impl.h +++ b/gr-fec/lib/depuncture_bb_impl.h @@ -26,7 +26,7 @@ private: char d_sym; public: - depuncture_bb_impl(int puncsize, int puncpat, int delay = 0, char symbol = 127); + depuncture_bb_impl(int puncsize, int puncpat, int delay = 0, uint8_t symbol = 127); ~depuncture_bb_impl(); int general_work(int noutput_items, diff --git a/gr-fec/lib/gf2mat.cc b/gr-fec/lib/gf2mat.cc index a41f42b486..d07c6e2f3d 100644 --- a/gr-fec/lib/gf2mat.cc +++ b/gr-fec/lib/gf2mat.cc @@ -24,7 +24,7 @@ GF2Mat::GF2Mat(int m, int n) } } -GF2Mat::GF2Mat(std::vector<std::vector<char>> X) +GF2Mat::GF2Mat(std::vector<std::vector<uint8_t>> X) { M = X.size(); N = X[0].size(); @@ -179,4 +179,4 @@ GF2Mat GF2Mat::get_G(std::vector<int>& permute, int& rank) return G; } -std::vector<std::vector<char>> GF2Mat::get_H() { return H; } +std::vector<std::vector<uint8_t>> GF2Mat::get_H() { return H; } diff --git a/gr-fec/lib/gf2vec.cc b/gr-fec/lib/gf2vec.cc index 9f0153f6c8..0c12271b03 100644 --- a/gr-fec/lib/gf2vec.cc +++ b/gr-fec/lib/gf2vec.cc @@ -13,13 +13,13 @@ GF2Vec::GF2Vec(int size) { vec.resize(size); } -void GF2Vec::set_vec(const std::vector<char> in) { vec = in; } +void GF2Vec::set_vec(const std::vector<uint8_t> in) { vec = in; } -std::vector<char> GF2Vec::get_vec() { return vec; } +std::vector<uint8_t> GF2Vec::get_vec() { return vec; } int GF2Vec::size() { return vec.size(); } -char& GF2Vec::operator[](int i) { return vec[i]; } +uint8_t& GF2Vec::operator[](int i) { return vec[i]; } GF2Vec operator+(GF2Vec a, GF2Vec b) { @@ -40,7 +40,7 @@ GF2Vec GF2Vec::sub_vector(int from, int to) return x; } -char operator*(GF2Vec a, GF2Vec b) +uint8_t operator*(GF2Vec a, GF2Vec b) { char sum; sum = char(0); diff --git a/gr-fec/lib/ldpc_decoder.cc b/gr-fec/lib/ldpc_decoder.cc index 166e374d1d..2daa93aad3 100644 --- a/gr-fec/lib/ldpc_decoder.cc +++ b/gr-fec/lib/ldpc_decoder.cc @@ -84,8 +84,8 @@ void ldpc_decoder::generic_work(void* inBuffer, void* outBuffer) } int n_iterations = 0; - std::vector<char> estimate(d_spa.decode(rx, &n_iterations)); - std::vector<char> data(d_code.get_systematic_bits(estimate)); + std::vector<uint8_t> estimate(d_spa.decode(rx, &n_iterations)); + std::vector<uint8_t> data(d_code.get_systematic_bits(estimate)); memcpy(&out[j], &data[0], d_code.dimension()); d_iterations = n_iterations; diff --git a/gr-fec/lib/ldpc_encoder_impl.cc b/gr-fec/lib/ldpc_encoder_impl.cc index 9ed72259e6..103cf38379 100644 --- a/gr-fec/lib/ldpc_encoder_impl.cc +++ b/gr-fec/lib/ldpc_encoder_impl.cc @@ -46,9 +46,9 @@ void ldpc_encoder_impl::generic_work(void* inBuffer, void* outBuffer) { const unsigned char* in = (const unsigned char*)inBuffer; unsigned char* out = (unsigned char*)outBuffer; - std::vector<char> inbuf(inputSize); + std::vector<uint8_t> inbuf(inputSize); memcpy(&inbuf[0], in, inputSize); - std::vector<char> coded(d_code.encode(inbuf)); + std::vector<uint8_t> coded(d_code.encode(inbuf)); memcpy(&out[0], &coded[0], coded.size()); } diff --git a/gr-fec/lib/polar_common.cc b/gr-fec/lib/polar_common.cc index 589c7a5f8f..be765671b7 100644 --- a/gr-fec/lib/polar_common.cc +++ b/gr-fec/lib/polar_common.cc @@ -31,7 +31,7 @@ namespace code { polar_common::polar_common(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values) + std::vector<uint8_t> frozen_bit_values) : d_frozen_bit_positions(frozen_bit_positions), d_frozen_bit_values(frozen_bit_values), d_block_size(block_size), diff --git a/gr-fec/lib/polar_decoder_common.cc b/gr-fec/lib/polar_decoder_common.cc index 4a59cbfe3f..392451737e 100644 --- a/gr-fec/lib/polar_decoder_common.cc +++ b/gr-fec/lib/polar_decoder_common.cc @@ -27,7 +27,7 @@ const float polar_decoder_common::D_LLR_FACTOR = -2.19722458f; polar_decoder_common::polar_decoder_common(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values) + std::vector<uint8_t> frozen_bit_values) : polar_common(block_size, num_info_bits, frozen_bit_positions, frozen_bit_values), d_frozen_bit_counter(0) { diff --git a/gr-fec/lib/polar_decoder_sc.cc b/gr-fec/lib/polar_decoder_sc.cc index 29493d4760..9d694bf3bb 100644 --- a/gr-fec/lib/polar_decoder_sc.cc +++ b/gr-fec/lib/polar_decoder_sc.cc @@ -26,7 +26,7 @@ namespace code { generic_decoder::sptr polar_decoder_sc::make(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values) + std::vector<uint8_t> frozen_bit_values) { return generic_decoder::sptr(new polar_decoder_sc( block_size, num_info_bits, frozen_bit_positions, frozen_bit_values)); @@ -35,7 +35,7 @@ generic_decoder::sptr polar_decoder_sc::make(int block_size, polar_decoder_sc::polar_decoder_sc(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values) + std::vector<uint8_t> frozen_bit_values) : polar_decoder_common( block_size, num_info_bits, frozen_bit_positions, frozen_bit_values) { diff --git a/gr-fec/lib/polar_decoder_sc_list.cc b/gr-fec/lib/polar_decoder_sc_list.cc index 9067fdba67..7f537cde18 100644 --- a/gr-fec/lib/polar_decoder_sc_list.cc +++ b/gr-fec/lib/polar_decoder_sc_list.cc @@ -28,7 +28,7 @@ generic_decoder::sptr polar_decoder_sc_list::make(int max_list_size, int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values) + std::vector<uint8_t> frozen_bit_values) { return generic_decoder::sptr(new polar_decoder_sc_list(max_list_size, block_size, @@ -41,7 +41,7 @@ polar_decoder_sc_list::polar_decoder_sc_list(int max_list_size, int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values) + std::vector<uint8_t> frozen_bit_values) : polar_decoder_common( block_size, num_info_bits, frozen_bit_positions, frozen_bit_values) { diff --git a/gr-fec/lib/polar_decoder_sc_systematic.cc b/gr-fec/lib/polar_decoder_sc_systematic.cc index e743edabb2..20fbad2d38 100644 --- a/gr-fec/lib/polar_decoder_sc_systematic.cc +++ b/gr-fec/lib/polar_decoder_sc_systematic.cc @@ -30,7 +30,7 @@ generic_decoder::sptr polar_decoder_sc_systematic::make( polar_decoder_sc_systematic::polar_decoder_sc_systematic( int block_size, int num_info_bits, std::vector<int> frozen_bit_positions) : polar_decoder_common( - block_size, num_info_bits, frozen_bit_positions, std::vector<char>()) + block_size, num_info_bits, frozen_bit_positions, std::vector<uint8_t>()) { d_llr_vec = (float*)volk_malloc(sizeof(float) * block_size * (block_power() + 1), volk_get_alignment()); diff --git a/gr-fec/lib/polar_encoder.cc b/gr-fec/lib/polar_encoder.cc index ad35c0cc37..568a0b8e5e 100644 --- a/gr-fec/lib/polar_encoder.cc +++ b/gr-fec/lib/polar_encoder.cc @@ -28,7 +28,7 @@ namespace code { generic_encoder::sptr polar_encoder::make(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions, - std::vector<char> frozen_bit_values, + std::vector<uint8_t> frozen_bit_values, bool is_packed) { return generic_encoder::sptr(new polar_encoder( @@ -38,7 +38,7 @@ generic_encoder::sptr polar_encoder::make(int block_size, polar_encoder::polar_encoder(int block_size, int num_info_bits, std::vector<int>& frozen_bit_positions, - std::vector<char>& frozen_bit_values, + std::vector<uint8_t>& frozen_bit_values, bool is_packed) : polar_common(block_size, num_info_bits, frozen_bit_positions, frozen_bit_values), d_is_packed(is_packed) diff --git a/gr-fec/lib/polar_encoder_systematic.cc b/gr-fec/lib/polar_encoder_systematic.cc index 1bff485504..b77f5e0730 100644 --- a/gr-fec/lib/polar_encoder_systematic.cc +++ b/gr-fec/lib/polar_encoder_systematic.cc @@ -30,7 +30,8 @@ generic_encoder::sptr polar_encoder_systematic::make( polar_encoder_systematic::polar_encoder_systematic(int block_size, int num_info_bits, std::vector<int> frozen_bit_positions) - : polar_common(block_size, num_info_bits, frozen_bit_positions, std::vector<char>()) + : polar_common( + block_size, num_info_bits, frozen_bit_positions, std::vector<uint8_t>()) { d_volk_syst_intermediate = (unsigned char*)volk_malloc( sizeof(unsigned char) * block_size, volk_get_alignment()); diff --git a/gr-fec/lib/puncture_bb_impl.cc b/gr-fec/lib/puncture_bb_impl.cc index 54271b66f4..49f1bcfb55 100644 --- a/gr-fec/lib/puncture_bb_impl.cc +++ b/gr-fec/lib/puncture_bb_impl.cc @@ -60,7 +60,7 @@ puncture_bb_impl::puncture_bb_impl(int puncsize, int puncpat, int delay) set_fixed_rate(true); set_relative_rate((uint64_t)(d_puncsize - d_puncholes), (uint64_t)d_puncsize); set_output_multiple(d_puncsize - d_puncholes); - // set_msg_handler(boost::bind(&puncture_bb_impl::catch_msg, this, _1)); + // set_msg_handler(<portname>, [this](pmt::pmt_t msg) { this->catch_msg(msg); }); } puncture_bb_impl::~puncture_bb_impl() {} diff --git a/gr-fec/lib/puncture_ff_impl.cc b/gr-fec/lib/puncture_ff_impl.cc index a8f6c69b21..4b8c74f014 100644 --- a/gr-fec/lib/puncture_ff_impl.cc +++ b/gr-fec/lib/puncture_ff_impl.cc @@ -60,7 +60,7 @@ puncture_ff_impl::puncture_ff_impl(int puncsize, int puncpat, int delay) set_fixed_rate(true); set_relative_rate((uint64_t)(d_puncsize - d_puncholes), (uint64_t)d_puncsize); set_output_multiple(d_puncsize - d_puncholes); - // set_msg_handler(boost::bind(&puncture_ff_impl::catch_msg, this, _1)); + // set_msg_handler(<portname>, [this](pmt::pmt_t msg) { this->catch_msg(msg); }); } puncture_ff_impl::~puncture_ff_impl() {} diff --git a/gr-fec/python/fec/CMakeLists.txt b/gr-fec/python/fec/CMakeLists.txt index 011d1b4d9e..0f051979ed 100644 --- a/gr-fec/python/fec/CMakeLists.txt +++ b/gr-fec/python/fec/CMakeLists.txt @@ -34,16 +34,9 @@ add_subdirectory(polar) if(ENABLE_TESTING) list(APPEND GR_TEST_PYTHON_DIRS - ${CMAKE_BINARY_DIR}/gnuradio-runtime/swig ${CMAKE_BINARY_DIR}/gnuradio-runtime/python ${CMAKE_BINARY_DIR}/gr-fec/python - ${CMAKE_BINARY_DIR}/gr-fec/swig ${CMAKE_BINARY_DIR}/gr-blocks/python - ${CMAKE_BINARY_DIR}/gr-blocks/swig - ${CMAKE_BINARY_DIR}/gr-fft/swig - ${CMAKE_BINARY_DIR}/gr-analog/swig - ${CMAKE_BINARY_DIR}/gr-digital/swig - ${CMAKE_BINARY_DIR}/gr-filter/swig ) list(APPEND GR_TEST_TARGET_DEPS gnuradio-fec) @@ -65,3 +58,5 @@ foreach(py_qa_test_file ${py_qa_test_files}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) + +add_subdirectory(bindings) diff --git a/gr-fec/python/fec/__init__.py b/gr-fec/python/fec/__init__.py index eda8316a0d..e3126bda1c 100644 --- a/gr-fec/python/fec/__init__.py +++ b/gr-fec/python/fec/__init__.py @@ -15,12 +15,68 @@ from __future__ import absolute_import from __future__ import unicode_literals try: - from .fec_swig import * + from .fec_python import * except ImportError: import os dirname, filename = os.path.split(os.path.abspath(__file__)) - __path__.append(os.path.join(dirname, "..", "..", "swig")) - from .fec_swig import * + __path__.append(os.path.join(dirname, "bindings")) + from .fec_python import * + +# Pybind cannot bind constructors to make functions that return a different type +# Remap make functions to __init__ here + +cc_encoder = code.cc_encoder +cc_encoder.__init__ = code.cc_encoder.make +cc_encoder_make = code.cc_encoder.make + +cc_decoder = code.cc_decoder +cc_decoder.__init__ = code.cc_decoder.make +cc_decoder_make = code.cc_decoder.make + +dummy_encoder = code.dummy_encoder +dummy_encoder.__init__ = code.dummy_encoder.make +dummy_encoder_make = code.dummy_encoder.make + +dummy_decoder = code.dummy_decoder +dummy_decoder.__init__ = code.dummy_decoder.make +dummy_decoder_make = code.dummy_decoder.make + +repetition_encoder = code.repetition_encoder +repetition_encoder.__init__ = code.repetition_encoder.make +repetition_encoder_make = code.repetition_encoder.make + +repetition_decoder = code.repetition_decoder +repetition_decoder.__init__ = code.repetition_decoder.make +repetition_decoder_make = code.repetition_decoder.make + +polar_encoder = code.polar_encoder +polar_encoder.__init__ = code.polar_encoder.make +polar_encoder_make = code.polar_encoder.make + +polar_encoder_systematic = code.polar_encoder_systematic +polar_encoder_systematic.__init__ = code.polar_encoder_systematic.make +polar_encoder_systematic_make = code.polar_encoder_systematic.make + +ccsds_encoder = code.ccsds_encoder +ccsds_encoder.__init__ = code.ccsds_encoder.make +ccsds_encoder_make = code.ccsds_encoder.make + +ldpc_encoder_make = ldpc_encoder.make +ldpc_decoder_make = ldpc_decoder.make +tpc_encoder_make = tpc_encoder.make +tpc_decoder_make = tpc_decoder.make + +ldpc_H_matrix = code.ldpc_H_matrix +ldpc_G_matrix = code.ldpc_G_matrix +ldpc_par_mtrx_encoder = code.ldpc_par_mtrx_encoder +ldpc_par_mtrx_encoder_make = ldpc_par_mtrx_encoder.make +ldpc_par_mtrx_encoder_make_H = ldpc_par_mtrx_encoder.make_H +ldpc_gen_mtrx_encoder = code.ldpc_gen_mtrx_encoder +ldpc_gen_mtrx_encoder_make = code.ldpc_gen_mtrx_encoder.make +ldpc_bit_flip_decoder = code.ldpc_bit_flip_decoder +polar_decoder_sc = code.polar_decoder_sc +polar_decoder_sc_list = code.polar_decoder_sc_list +polar_decoder_sc_systematic = code.polar_decoder_sc_systematic from .bitflip import * from .extended_encoder import extended_encoder diff --git a/gr-fec/python/fec/bindings/CMakeLists.txt b/gr-fec/python/fec/bindings/CMakeLists.txt new file mode 100644 index 0000000000..59ee087f8e --- /dev/null +++ b/gr-fec/python/fec/bindings/CMakeLists.txt @@ -0,0 +1,66 @@ +include(GrPybind) + +######################################################################## +# Python Bindings +######################################################################## + +list(APPEND fec_python_files + #alist_python.cc + async_decoder_python.cc + async_encoder_python.cc + #awgn_bp_python.cc + ber_bf_python.cc + cc_common_python.cc + cc_decoder_python.cc + cc_encoder_python.cc + ccsds_encoder_python.cc + #cldpc_python.cc + conv_bit_corr_bb_python.cc + decode_ccsds_27_fb_python.cc + decoder_python.cc + depuncture_bb_python.cc + dummy_decoder_python.cc + dummy_encoder_python.cc + encode_ccsds_27_bb_python.cc + encoder_python.cc + fec_mtrx_python.cc + generic_decoder_python.cc + generic_encoder_python.cc + #gf2mat_python.cc + #gf2vec_python.cc + ldpc_G_matrix_python.cc + ldpc_H_matrix_python.cc + ldpc_bit_flip_decoder_python.cc + ldpc_decoder_python.cc + ldpc_encoder_python.cc + ldpc_gen_mtrx_encoder_python.cc + ldpc_par_mtrx_encoder_python.cc + #maxstar_python.cc + polar_common_python.cc + polar_decoder_common_python.cc + polar_decoder_sc_python.cc + polar_decoder_sc_list_python.cc + polar_decoder_sc_systematic_python.cc + polar_encoder_python.cc + polar_encoder_systematic_python.cc + puncture_bb_python.cc + puncture_ff_python.cc + repetition_decoder_python.cc + repetition_encoder_python.cc + #rs_python.cc + tagged_decoder_python.cc + tagged_encoder_python.cc + # tpc_common_python.cc + tpc_decoder_python.cc + tpc_encoder_python.cc + # #viterbi_python.cc + python_bindings.cc) + +GR_PYBIND_MAKE_CHECK_HASH(fec + ../../.. + gr::fec + "${fec_python_files}") + +target_link_libraries(fec_python PUBLIC gnuradio-runtime gnuradio-blocks gsl::gsl) + +install(TARGETS fec_python DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec COMPONENT pythonapi) diff --git a/gr-fec/python/fec/bindings/async_decoder_python.cc b/gr-fec/python/fec/bindings/async_decoder_python.cc new file mode 100644 index 0000000000..097107a6e5 --- /dev/null +++ b/gr-fec/python/fec/bindings/async_decoder_python.cc @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(async_decoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(eab0904367aa137aac061f53c1218b6f) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/async_decoder.h> +// pydoc.h is automatically generated in the build directory +#include <async_decoder_pydoc.h> + +void bind_async_decoder(py::module& m) +{ + + using async_decoder = ::gr::fec::async_decoder; + + + py::class_<async_decoder, gr::block, gr::basic_block, std::shared_ptr<async_decoder>>( + m, "async_decoder", D(async_decoder)) + + .def(py::init(&async_decoder::make), + py::arg("my_decoder"), + py::arg("packed") = false, + py::arg("rev_pack") = true, + py::arg("mtu") = 1500, + D(async_decoder, make)) + + + .def("general_work", + &async_decoder::general_work, + py::arg("noutput_items"), + py::arg("ninput_items"), + py::arg("input_items"), + py::arg("output_items"), + D(async_decoder, general_work)) + + ; +} diff --git a/gr-fec/python/fec/bindings/async_encoder_python.cc b/gr-fec/python/fec/bindings/async_encoder_python.cc new file mode 100644 index 0000000000..7358d5d56b --- /dev/null +++ b/gr-fec/python/fec/bindings/async_encoder_python.cc @@ -0,0 +1,57 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(async_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(4619b7694ffb443bd5a5f19f90e32663) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/async_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <async_encoder_pydoc.h> + +void bind_async_encoder(py::module& m) +{ + + using async_encoder = ::gr::fec::async_encoder; + + + py::class_<async_encoder, gr::block, gr::basic_block, std::shared_ptr<async_encoder>>( + m, "async_encoder", D(async_encoder)) + + .def(py::init(&async_encoder::make), + py::arg("my_encoder"), + py::arg("packed") = false, + py::arg("rev_unpack") = true, + py::arg("rev_pack") = true, + py::arg("mtu") = 1500, + D(async_encoder, make)) + + + .def("general_work", + &async_encoder::general_work, + py::arg("noutput_items"), + py::arg("ninput_items"), + py::arg("input_items"), + py::arg("output_items"), + D(async_encoder, general_work)) + + ; +} diff --git a/gr-fec/python/fec/bindings/ber_bf_python.cc b/gr-fec/python/fec/bindings/ber_bf_python.cc new file mode 100644 index 0000000000..174f611826 --- /dev/null +++ b/gr-fec/python/fec/bindings/ber_bf_python.cc @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(ber_bf.h) */ +/* BINDTOOL_HEADER_FILE_HASH(27d0919e38e71f62e240868a34735740) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/ber_bf.h> +// pydoc.h is automatically generated in the build directory +#include <ber_bf_pydoc.h> + +void bind_ber_bf(py::module& m) +{ + + using ber_bf = ::gr::fec::ber_bf; + + + py::class_<ber_bf, gr::block, gr::basic_block, std::shared_ptr<ber_bf>>( + m, "ber_bf", D(ber_bf)) + + .def(py::init(&ber_bf::make), + py::arg("test_mode") = false, + py::arg("berminerrors") = 100, + py::arg("ber_limit") = -7., + D(ber_bf, make)) + + + .def("total_errors", &ber_bf::total_errors, D(ber_bf, total_errors)) + + + ; +} diff --git a/gr-fec/python/fec/bindings/cc_common_python.cc b/gr-fec/python/fec/bindings/cc_common_python.cc new file mode 100644 index 0000000000..ca96af99f5 --- /dev/null +++ b/gr-fec/python/fec/bindings/cc_common_python.cc @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/* This file is automatically generated using bindtool */ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/cc_common.h> +// pydoc.h is automatically generated in the build directory +#include <cc_decoder_pydoc.h> + +void bind_cc_common(py::module& m) +{ + py::enum_<::_cc_mode_t>(m, "_cc_mode_t") + .value("CC_STREAMING", ::CC_STREAMING) // 0 + .value("CC_TERMINATED", ::CC_TERMINATED) // 1 + .value("CC_TRUNCATED", ::CC_TRUNCATED) // 2 + .value("CC_TAILBITING", ::CC_TAILBITING) // 3 + .export_values(); +} diff --git a/gr-fec/python/fec/bindings/cc_decoder_python.cc b/gr-fec/python/fec/bindings/cc_decoder_python.cc new file mode 100644 index 0000000000..48182f4660 --- /dev/null +++ b/gr-fec/python/fec/bindings/cc_decoder_python.cc @@ -0,0 +1,65 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(cc_decoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(0df9f2fcff3527df78c5f9207a61f587) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/cc_decoder.h> +// pydoc.h is automatically generated in the build directory +#include <cc_decoder_pydoc.h> + +void bind_cc_decoder(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using cc_decoder = ::gr::fec::code::cc_decoder; + + + py::class_<cc_decoder, gr::fec::generic_decoder, std::shared_ptr<cc_decoder>>( + m_code, "cc_decoder", D(code, cc_decoder)) + + // unable to use init because incompatible pointer type is returned + .def_static("make", + &cc_decoder::make, + py::arg("frame_size"), + py::arg("k"), + py::arg("rate"), + py::arg("polys"), + py::arg("start_state") = 0, + py::arg("end_state") = -1, + py::arg("mode") = ::_cc_mode_t::CC_STREAMING, + py::arg("padded") = false, + D(code, cc_decoder, make)) + + + .def("set_frame_size", + &cc_decoder::set_frame_size, + py::arg("frame_size"), + D(code, cc_decoder, set_frame_size)) + + + .def("rate", &cc_decoder::rate, D(code, cc_decoder, rate)) + + ; +} diff --git a/gr-fec/python/fec/bindings/cc_encoder_python.cc b/gr-fec/python/fec/bindings/cc_encoder_python.cc new file mode 100644 index 0000000000..cc2d5a23f1 --- /dev/null +++ b/gr-fec/python/fec/bindings/cc_encoder_python.cc @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(cc_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(0012480be9e18c56f608155020854004) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/cc_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <cc_encoder_pydoc.h> + +void bind_cc_encoder(py::module& m) +{ + py::module m_code = m.def_submodule("code"); + + using cc_encoder = ::gr::fec::code::cc_encoder; + + py::class_<cc_encoder, gr::fec::generic_encoder, std::shared_ptr<cc_encoder>>( + m_code, "cc_encoder", D(code, cc_encoder)) + + .def_static("make", + &cc_encoder::make, + py::arg("frame_size"), + py::arg("k"), + py::arg("rate"), + py::arg("polys"), + py::arg("start_state") = 0, + py::arg("mode") = ::_cc_mode_t::CC_STREAMING, + py::arg("padded") = false, + D(code, cc_encoder, make)) + + .def("set_frame_size", + &cc_encoder::set_frame_size, + py::arg("frame_size"), + D(code, cc_encoder, set_frame_size)) + + .def("rate", &cc_encoder::rate, D(code, cc_encoder, rate)) + + ; +} diff --git a/gr-fec/python/fec/bindings/ccsds_encoder_python.cc b/gr-fec/python/fec/bindings/ccsds_encoder_python.cc new file mode 100644 index 0000000000..1fcd2afbdd --- /dev/null +++ b/gr-fec/python/fec/bindings/ccsds_encoder_python.cc @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(ccsds_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(8b96a214e173c2cd31a24fdbdb9a90e0) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/ccsds_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <ccsds_encoder_pydoc.h> + +void bind_ccsds_encoder(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using ccsds_encoder = ::gr::fec::code::ccsds_encoder; + + + py::class_<ccsds_encoder, gr::fec::generic_encoder, std::shared_ptr<ccsds_encoder>>( + m_code, "ccsds_encoder", D(code, ccsds_encoder)) + + .def_static("make", + &ccsds_encoder::make, + py::arg("frame_size"), + py::arg("start_state") = 0, + py::arg("mode") = ::_cc_mode_t::CC_STREAMING, + D(code, ccsds_encoder, make)) + + + .def("set_frame_size", + &ccsds_encoder::set_frame_size, + py::arg("frame_size"), + D(code, ccsds_encoder, set_frame_size)) + + + .def("rate", &ccsds_encoder::rate, D(code, ccsds_encoder, rate)) + + ; +} diff --git a/gr-fec/python/fec/bindings/conv_bit_corr_bb_python.cc b/gr-fec/python/fec/bindings/conv_bit_corr_bb_python.cc new file mode 100644 index 0000000000..449268d778 --- /dev/null +++ b/gr-fec/python/fec/bindings/conv_bit_corr_bb_python.cc @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(conv_bit_corr_bb.h) */ +/* BINDTOOL_HEADER_FILE_HASH(103ae2f5c917b8a5598d732c1630f55c) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/conv_bit_corr_bb.h> +// pydoc.h is automatically generated in the build directory +#include <conv_bit_corr_bb_pydoc.h> + +void bind_conv_bit_corr_bb(py::module& m) +{ + + using conv_bit_corr_bb = ::gr::fec::conv_bit_corr_bb; + + + py::class_<conv_bit_corr_bb, + gr::block, + gr::basic_block, + std::shared_ptr<conv_bit_corr_bb>>( + m, "conv_bit_corr_bb", D(conv_bit_corr_bb)) + + .def(py::init(&conv_bit_corr_bb::make), + py::arg("correlator"), + py::arg("corr_sym"), + py::arg("corr_len"), + py::arg("cut"), + py::arg("flush"), + py::arg("thresh"), + D(conv_bit_corr_bb, make)) + + + .def("data_garble_rate", + &conv_bit_corr_bb::data_garble_rate, + py::arg("taps"), + py::arg("syn_density"), + D(conv_bit_corr_bb, data_garble_rate)) + + ; +} diff --git a/gr-fec/python/fec/bindings/decode_ccsds_27_fb_python.cc b/gr-fec/python/fec/bindings/decode_ccsds_27_fb_python.cc new file mode 100644 index 0000000000..ecafabc6ee --- /dev/null +++ b/gr-fec/python/fec/bindings/decode_ccsds_27_fb_python.cc @@ -0,0 +1,48 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(decode_ccsds_27_fb.h) */ +/* BINDTOOL_HEADER_FILE_HASH(dd6c1aedf09ee458ddfb8d457055086d) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/decode_ccsds_27_fb.h> +// pydoc.h is automatically generated in the build directory +#include <decode_ccsds_27_fb_pydoc.h> + +void bind_decode_ccsds_27_fb(py::module& m) +{ + + using decode_ccsds_27_fb = ::gr::fec::decode_ccsds_27_fb; + + + py::class_<decode_ccsds_27_fb, + gr::sync_decimator, + gr::sync_block, + gr::block, + gr::basic_block, + std::shared_ptr<decode_ccsds_27_fb>>( + m, "decode_ccsds_27_fb", D(decode_ccsds_27_fb)) + + .def(py::init(&decode_ccsds_27_fb::make), D(decode_ccsds_27_fb, make)) + + + ; +} diff --git a/gr-fec/python/fec/bindings/decoder_python.cc b/gr-fec/python/fec/bindings/decoder_python.cc new file mode 100644 index 0000000000..891b356139 --- /dev/null +++ b/gr-fec/python/fec/bindings/decoder_python.cc @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(decoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(09cb78629601b2a97652f01d2b624ddf) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/decoder.h> +// pydoc.h is automatically generated in the build directory +#include <decoder_pydoc.h> + +void bind_decoder(py::module& m) +{ + + using decoder = ::gr::fec::decoder; + + + py::class_<decoder, gr::block, gr::basic_block, std::shared_ptr<decoder>>( + m, "decoder", D(decoder)) + + .def(py::init(&decoder::make), + py::arg("my_decoder"), + py::arg("input_item_size"), + py::arg("output_item_size"), + D(decoder, make)) + + + .def("general_work", + &decoder::general_work, + py::arg("noutput_items"), + py::arg("ninput_items"), + py::arg("input_items"), + py::arg("output_items"), + D(decoder, general_work)) + + + .def("fixed_rate_ninput_to_noutput", + &decoder::fixed_rate_ninput_to_noutput, + py::arg("ninput"), + D(decoder, fixed_rate_ninput_to_noutput)) + + + .def("fixed_rate_noutput_to_ninput", + &decoder::fixed_rate_noutput_to_ninput, + py::arg("noutput"), + D(decoder, fixed_rate_noutput_to_ninput)) + + + .def("forecast", + &decoder::forecast, + py::arg("noutput_items"), + py::arg("ninput_items_required"), + D(decoder, forecast)) + + ; +} diff --git a/gr-fec/python/fec/bindings/depuncture_bb_python.cc b/gr-fec/python/fec/bindings/depuncture_bb_python.cc new file mode 100644 index 0000000000..cd7c2b2134 --- /dev/null +++ b/gr-fec/python/fec/bindings/depuncture_bb_python.cc @@ -0,0 +1,48 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(depuncture_bb.h) */ +/* BINDTOOL_HEADER_FILE_HASH(a1711f618d99f02ec85fdf11f19e512c) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/depuncture_bb.h> +// pydoc.h is automatically generated in the build directory +#include <depuncture_bb_pydoc.h> + +void bind_depuncture_bb(py::module& m) +{ + + using depuncture_bb = ::gr::fec::depuncture_bb; + + + py::class_<depuncture_bb, gr::block, gr::basic_block, std::shared_ptr<depuncture_bb>>( + m, "depuncture_bb", D(depuncture_bb)) + + .def(py::init(&depuncture_bb::make), + py::arg("puncsize"), + py::arg("puncpat"), + py::arg("delay") = 0, + py::arg("symbol") = 127, + D(depuncture_bb, make)) + + + ; +} diff --git a/gr-fec/python/fec/bindings/docstrings/async_decoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/async_decoder_pydoc_template.h new file mode 100644 index 0000000000..b720583c19 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/async_decoder_pydoc_template.h @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_async_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_async_decoder_async_decoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_async_decoder_async_decoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_async_decoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_async_decoder_general_work = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/async_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/async_encoder_pydoc_template.h new file mode 100644 index 0000000000..6e7691095b --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/async_encoder_pydoc_template.h @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_async_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_async_encoder_async_encoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_async_encoder_async_encoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_async_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_async_encoder_general_work = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/ber_bf_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/ber_bf_pydoc_template.h new file mode 100644 index 0000000000..5b19061de4 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/ber_bf_pydoc_template.h @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_ber_bf = R"doc()doc"; + + +static const char* __doc_gr_fec_ber_bf_ber_bf_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_ber_bf_ber_bf_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_ber_bf_total_errors = R"doc()doc"; + + +static const char* __doc_gr_fec_ber_bf_make = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/cc_decoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/cc_decoder_pydoc_template.h new file mode 100644 index 0000000000..645e2e7433 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/cc_decoder_pydoc_template.h @@ -0,0 +1,33 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_cc_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_cc_decoder_cc_decoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_cc_decoder_cc_decoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_cc_decoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_cc_decoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_cc_decoder_rate = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/cc_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/cc_encoder_pydoc_template.h new file mode 100644 index 0000000000..08575ff4d5 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/cc_encoder_pydoc_template.h @@ -0,0 +1,33 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_cc_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_cc_encoder_cc_encoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_cc_encoder_cc_encoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_cc_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_cc_encoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_cc_encoder_rate = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/ccsds_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/ccsds_encoder_pydoc_template.h new file mode 100644 index 0000000000..93e1616c49 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/ccsds_encoder_pydoc_template.h @@ -0,0 +1,33 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_ccsds_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ccsds_encoder_ccsds_encoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ccsds_encoder_ccsds_encoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ccsds_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ccsds_encoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ccsds_encoder_rate = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/conv_bit_corr_bb_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/conv_bit_corr_bb_pydoc_template.h new file mode 100644 index 0000000000..39cd93f173 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/conv_bit_corr_bb_pydoc_template.h @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_conv_bit_corr_bb = R"doc()doc"; + + +static const char* __doc_gr_fec_conv_bit_corr_bb_conv_bit_corr_bb_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_conv_bit_corr_bb_conv_bit_corr_bb_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_conv_bit_corr_bb_make = R"doc()doc"; + + +static const char* __doc_gr_fec_conv_bit_corr_bb_data_garble_rate = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/decode_ccsds_27_fb_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/decode_ccsds_27_fb_pydoc_template.h new file mode 100644 index 0000000000..68364c8319 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/decode_ccsds_27_fb_pydoc_template.h @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_decode_ccsds_27_fb = R"doc()doc"; + + +static const char* __doc_gr_fec_decode_ccsds_27_fb_decode_ccsds_27_fb = R"doc()doc"; + + +static const char* __doc_gr_fec_decode_ccsds_27_fb_make = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/decoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/decoder_pydoc_template.h new file mode 100644 index 0000000000..85afe6ec0a --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/decoder_pydoc_template.h @@ -0,0 +1,39 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_decoder_decoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_decoder_decoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_decoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_decoder_general_work = R"doc()doc"; + + +static const char* __doc_gr_fec_decoder_fixed_rate_ninput_to_noutput = R"doc()doc"; + + +static const char* __doc_gr_fec_decoder_fixed_rate_noutput_to_ninput = R"doc()doc"; + + +static const char* __doc_gr_fec_decoder_forecast = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/depuncture_bb_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/depuncture_bb_pydoc_template.h new file mode 100644 index 0000000000..1daaa58cb7 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/depuncture_bb_pydoc_template.h @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_depuncture_bb = R"doc()doc"; + + +static const char* __doc_gr_fec_depuncture_bb_depuncture_bb = R"doc()doc"; + + +static const char* __doc_gr_fec_depuncture_bb_make = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/dummy_decoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/dummy_decoder_pydoc_template.h new file mode 100644 index 0000000000..bb91d435ac --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/dummy_decoder_pydoc_template.h @@ -0,0 +1,33 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_dummy_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_dummy_decoder_dummy_decoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_dummy_decoder_dummy_decoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_dummy_decoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_dummy_decoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_dummy_decoder_rate = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/dummy_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/dummy_encoder_pydoc_template.h new file mode 100644 index 0000000000..699b523c2a --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/dummy_encoder_pydoc_template.h @@ -0,0 +1,33 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_dummy_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_dummy_encoder_dummy_encoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_dummy_encoder_dummy_encoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_dummy_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_dummy_encoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_dummy_encoder_rate = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/encode_ccsds_27_bb_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/encode_ccsds_27_bb_pydoc_template.h new file mode 100644 index 0000000000..b3ff539b06 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/encode_ccsds_27_bb_pydoc_template.h @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_encode_ccsds_27_bb = R"doc()doc"; + + +static const char* __doc_gr_fec_encode_ccsds_27_bb_encode_ccsds_27_bb = R"doc()doc"; + + +static const char* __doc_gr_fec_encode_ccsds_27_bb_make = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/encoder_pydoc_template.h new file mode 100644 index 0000000000..1dc398f134 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/encoder_pydoc_template.h @@ -0,0 +1,39 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_encoder_encoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_encoder_encoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_encoder_general_work = R"doc()doc"; + + +static const char* __doc_gr_fec_encoder_fixed_rate_ninput_to_noutput = R"doc()doc"; + + +static const char* __doc_gr_fec_encoder_fixed_rate_noutput_to_ninput = R"doc()doc"; + + +static const char* __doc_gr_fec_encoder_forecast = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/fec_mtrx_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/fec_mtrx_pydoc_template.h new file mode 100644 index 0000000000..0b35a054af --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/fec_mtrx_pydoc_template.h @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_block_data = R"doc()doc"; + + +static const char* __doc_gr_fec_code_matrix = R"doc()doc"; + + +static const char* __doc_gr_fec_code_fec_mtrx = R"doc()doc"; + + +static const char* __doc_gr_fec_code_fec_mtrx_fec_mtrx = R"doc()doc"; + + +static const char* __doc_gr_fec_code_fec_mtrx_encode = R"doc()doc"; + + +static const char* __doc_gr_fec_code_fec_mtrx_decode = R"doc()doc"; + + +static const char* __doc_gr_fec_code_fec_mtrx_n = R"doc()doc"; + + +static const char* __doc_gr_fec_code_fec_mtrx_k = R"doc()doc"; + + +static const char* __doc_gr_fec_code_matrix_free = R"doc()doc"; + + +static const char* __doc_gr_fec_code_read_matrix_from_file = R"doc()doc"; + + +static const char* __doc_gr_fec_code_write_matrix_to_file = R"doc()doc"; + + +static const char* __doc_gr_fec_code_generate_G_transpose = R"doc()doc"; + + +static const char* __doc_gr_fec_code_generate_G = R"doc()doc"; + + +static const char* __doc_gr_fec_code_generate_H = R"doc()doc"; + + +static const char* __doc_gr_fec_code_print_matrix = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/generic_decoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/generic_decoder_pydoc_template.h new file mode 100644 index 0000000000..ed0658783d --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/generic_decoder_pydoc_template.h @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_generic_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_generic_decoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_generic_decoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_generic_decoder_2 = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_generic_work = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_unique_id = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_alias = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_rate = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_get_input_size = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_get_output_size = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_get_history = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_get_shift = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_get_input_item_size = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_get_output_item_size = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_get_input_conversion = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_get_output_conversion = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_decoder_get_iterations = R"doc()doc"; + + +static const char* __doc_gr_fec_get_decoder_output_size = R"doc()doc"; + + +static const char* __doc_gr_fec_get_decoder_input_size = R"doc()doc"; + + +static const char* __doc_gr_fec_get_shift = R"doc()doc"; + + +static const char* __doc_gr_fec_get_history = R"doc()doc"; + + +static const char* __doc_gr_fec_get_decoder_input_item_size = R"doc()doc"; + + +static const char* __doc_gr_fec_get_decoder_output_item_size = R"doc()doc"; + + +static const char* __doc_gr_fec_get_decoder_input_conversion = R"doc()doc"; + + +static const char* __doc_gr_fec_get_decoder_output_conversion = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/generic_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/generic_encoder_pydoc_template.h new file mode 100644 index 0000000000..36057f6c93 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/generic_encoder_pydoc_template.h @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_generic_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_generic_encoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_generic_encoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_generic_encoder_2 = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_generic_work = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_unique_id = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_alias = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_rate = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_get_input_size = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_get_output_size = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_get_input_conversion = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_get_output_conversion = R"doc()doc"; + + +static const char* __doc_gr_fec_generic_encoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_get_encoder_output_size = R"doc()doc"; + + +static const char* __doc_gr_fec_get_encoder_input_size = R"doc()doc"; + + +static const char* __doc_gr_fec_get_encoder_input_conversion = R"doc()doc"; + + +static const char* __doc_gr_fec_get_encoder_output_conversion = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/ldpc_G_matrix_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/ldpc_G_matrix_pydoc_template.h new file mode 100644 index 0000000000..5bb3172fff --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/ldpc_G_matrix_pydoc_template.h @@ -0,0 +1,36 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_ldpc_G_matrix = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_G_matrix_ldpc_G_matrix_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_G_matrix_ldpc_G_matrix_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_G_matrix_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_G_matrix_encode = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_G_matrix_decode = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_G_matrix_get_base_sptr = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/ldpc_H_matrix_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/ldpc_H_matrix_pydoc_template.h new file mode 100644 index 0000000000..b74068acfe --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/ldpc_H_matrix_pydoc_template.h @@ -0,0 +1,42 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_ldpc_H_matrix = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_H_matrix_ldpc_H_matrix_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_H_matrix_ldpc_H_matrix_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_H_matrix_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_H_matrix_encode = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_H_matrix_decode = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_H_matrix_n = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_H_matrix_k = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_H_matrix_get_base_sptr = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/ldpc_bit_flip_decoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/ldpc_bit_flip_decoder_pydoc_template.h new file mode 100644 index 0000000000..66314bc79e --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/ldpc_bit_flip_decoder_pydoc_template.h @@ -0,0 +1,35 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_ldpc_bit_flip_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_bit_flip_decoder_ldpc_bit_flip_decoder_0 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_bit_flip_decoder_ldpc_bit_flip_decoder_1 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_bit_flip_decoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_bit_flip_decoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_bit_flip_decoder_rate = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/ldpc_decoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/ldpc_decoder_pydoc_template.h new file mode 100644 index 0000000000..05f07725c5 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/ldpc_decoder_pydoc_template.h @@ -0,0 +1,45 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_ldpc_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_decoder_ldpc_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_decoder_rate = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_decoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_decoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_decoder_get_output_size = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_decoder_get_input_size = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_decoder_get_input_item_size = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_decoder_get_output_item_size = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_decoder_get_iterations = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/ldpc_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/ldpc_encoder_pydoc_template.h new file mode 100644 index 0000000000..9aff7d372b --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/ldpc_encoder_pydoc_template.h @@ -0,0 +1,39 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_ldpc_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_encoder_ldpc_encoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_encoder_ldpc_encoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_encoder_rate = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_encoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_encoder_get_output_size = R"doc()doc"; + + +static const char* __doc_gr_fec_ldpc_encoder_get_input_size = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/ldpc_gen_mtrx_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/ldpc_gen_mtrx_encoder_pydoc_template.h new file mode 100644 index 0000000000..efc24b4553 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/ldpc_gen_mtrx_encoder_pydoc_template.h @@ -0,0 +1,35 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_ldpc_gen_mtrx_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_gen_mtrx_encoder_ldpc_gen_mtrx_encoder_0 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_gen_mtrx_encoder_ldpc_gen_mtrx_encoder_1 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_gen_mtrx_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_gen_mtrx_encoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_gen_mtrx_encoder_rate = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/ldpc_par_mtrx_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/ldpc_par_mtrx_encoder_pydoc_template.h new file mode 100644 index 0000000000..5b57ccc64f --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/ldpc_par_mtrx_encoder_pydoc_template.h @@ -0,0 +1,44 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_ldpc_par_mtrx_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_par_mtrx_encoder_ldpc_par_mtrx_encoder_0 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_par_mtrx_encoder_ldpc_par_mtrx_encoder_1 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_par_mtrx_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_par_mtrx_encoder_make_H = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_par_mtrx_encoder_rate = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_par_mtrx_encoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_par_mtrx_encoder_get_output_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_ldpc_par_mtrx_encoder_get_input_size = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/polar_common_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/polar_common_pydoc_template.h new file mode 100644 index 0000000000..7061e88837 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/polar_common_pydoc_template.h @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_polar_common = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_common_polar_common_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_common_polar_common_1 = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/polar_decoder_common_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/polar_decoder_common_pydoc_template.h new file mode 100644 index 0000000000..b281c60814 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/polar_decoder_common_pydoc_template.h @@ -0,0 +1,38 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_polar_decoder_common = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_common_polar_decoder_common_0 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_common_polar_decoder_common_1 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_common_rate = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_common_get_input_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_common_get_output_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_common_set_frame_size = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/polar_decoder_sc_list_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/polar_decoder_sc_list_pydoc_template.h new file mode 100644 index 0000000000..2029115dcf --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/polar_decoder_sc_list_pydoc_template.h @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_polar_decoder_sc_list = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_sc_list_polar_decoder_sc_list = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_sc_list_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_sc_list_generic_work = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/polar_decoder_sc_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/polar_decoder_sc_pydoc_template.h new file mode 100644 index 0000000000..7f0498a9b9 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/polar_decoder_sc_pydoc_template.h @@ -0,0 +1,27 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_polar_decoder_sc = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_sc_polar_decoder_sc = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_sc_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_sc_generic_work = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/polar_decoder_sc_systematic_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/polar_decoder_sc_systematic_pydoc_template.h new file mode 100644 index 0000000000..06a25bdf8d --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/polar_decoder_sc_systematic_pydoc_template.h @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_polar_decoder_sc_systematic = R"doc()doc"; + + +static const char* + __doc_gr_fec_code_polar_decoder_sc_systematic_polar_decoder_sc_systematic = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_sc_systematic_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_decoder_sc_systematic_generic_work = + R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/polar_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/polar_encoder_pydoc_template.h new file mode 100644 index 0000000000..cafe23b322 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/polar_encoder_pydoc_template.h @@ -0,0 +1,45 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_polar_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_polar_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_generic_work = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_rate = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_get_input_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_get_output_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_get_input_conversion = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_get_output_conversion = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/polar_encoder_systematic_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/polar_encoder_systematic_pydoc_template.h new file mode 100644 index 0000000000..298dc4e806 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/polar_encoder_systematic_pydoc_template.h @@ -0,0 +1,43 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_polar_encoder_systematic = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_systematic_polar_encoder_systematic = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_systematic_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_systematic_generic_work = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_systematic_rate = R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_systematic_get_input_size = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_systematic_get_output_size = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_polar_encoder_systematic_set_frame_size = + R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/puncture_bb_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/puncture_bb_pydoc_template.h new file mode 100644 index 0000000000..4dcb6bcdbf --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/puncture_bb_pydoc_template.h @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_puncture_bb = R"doc()doc"; + + +static const char* __doc_gr_fec_puncture_bb_puncture_bb = R"doc()doc"; + + +static const char* __doc_gr_fec_puncture_bb_make = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/puncture_ff_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/puncture_ff_pydoc_template.h new file mode 100644 index 0000000000..790e1f8625 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/puncture_ff_pydoc_template.h @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_puncture_ff = R"doc()doc"; + + +static const char* __doc_gr_fec_puncture_ff_puncture_ff = R"doc()doc"; + + +static const char* __doc_gr_fec_puncture_ff_make = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/repetition_decoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/repetition_decoder_pydoc_template.h new file mode 100644 index 0000000000..d033a6be66 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/repetition_decoder_pydoc_template.h @@ -0,0 +1,35 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_repetition_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_repetition_decoder_repetition_decoder_0 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_repetition_decoder_repetition_decoder_1 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_repetition_decoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_repetition_decoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_repetition_decoder_rate = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/repetition_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/repetition_encoder_pydoc_template.h new file mode 100644 index 0000000000..613f03da06 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/repetition_encoder_pydoc_template.h @@ -0,0 +1,35 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_code_repetition_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_code_repetition_encoder_repetition_encoder_0 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_repetition_encoder_repetition_encoder_1 = + R"doc()doc"; + + +static const char* __doc_gr_fec_code_repetition_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_code_repetition_encoder_set_frame_size = R"doc()doc"; + + +static const char* __doc_gr_fec_code_repetition_encoder_rate = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/tagged_decoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/tagged_decoder_pydoc_template.h new file mode 100644 index 0000000000..f957469ad6 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/tagged_decoder_pydoc_template.h @@ -0,0 +1,34 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_tagged_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_tagged_decoder_tagged_decoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_tagged_decoder_tagged_decoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_tagged_decoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_tagged_decoder_work = R"doc()doc"; + + +static const char* __doc_gr_fec_tagged_decoder_calculate_output_stream_length = + R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/tagged_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/tagged_encoder_pydoc_template.h new file mode 100644 index 0000000000..e0fabbd171 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/tagged_encoder_pydoc_template.h @@ -0,0 +1,34 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_tagged_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_tagged_encoder_tagged_encoder_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_tagged_encoder_tagged_encoder_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_tagged_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_tagged_encoder_work = R"doc()doc"; + + +static const char* __doc_gr_fec_tagged_encoder_calculate_output_stream_length = + R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/tpc_common_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/tpc_common_pydoc_template.h new file mode 100644 index 0000000000..a1e1bdd3a4 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/tpc_common_pydoc_template.h @@ -0,0 +1,40 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_tpc_common = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_common_tpc_common_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_common_tpc_common_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_common_parity_counter = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_common_rsc_enc_bit = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_common_precomputeStateTransitionMatrix_RSCPoly = + R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_common_rsc_tail = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_common_itob = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/tpc_decoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/tpc_decoder_pydoc_template.h new file mode 100644 index 0000000000..21c27ee8cb --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/tpc_decoder_pydoc_template.h @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_tpc_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_decoder_tpc_decoder = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_decoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_decoder_rate = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_decoder_set_frame_size = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/tpc_encoder_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/tpc_encoder_pydoc_template.h new file mode 100644 index 0000000000..5608bc2555 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/tpc_encoder_pydoc_template.h @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_tpc_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_encoder_tpc_encoder = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_encoder_make = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_encoder_rate = R"doc()doc"; + + +static const char* __doc_gr_fec_tpc_encoder_set_frame_size = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/docstrings/viterbi_pydoc_template.h b/gr-fec/python/fec/bindings/docstrings/viterbi_pydoc_template.h new file mode 100644 index 0000000000..d58776ee29 --- /dev/null +++ b/gr-fec/python/fec/bindings/docstrings/viterbi_pydoc_template.h @@ -0,0 +1,39 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, fec, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_fec_viterbi_state = R"doc()doc"; + + +static const char* __doc_gr_fec_viterbi_state_viterbi_state_0 = R"doc()doc"; + + +static const char* __doc_gr_fec_viterbi_state_viterbi_state_1 = R"doc()doc"; + + +static const char* __doc_gr_fec_gen_met = R"doc()doc"; + + +static const char* __doc_gr_fec_encode = R"doc()doc"; + + +static const char* __doc_gr_fec_viterbi_chunks_init = R"doc()doc"; + + +static const char* __doc_gr_fec_viterbi_butterfly2 = R"doc()doc"; + + +static const char* __doc_gr_fec_viterbi_get_output = R"doc()doc"; diff --git a/gr-fec/python/fec/bindings/dummy_decoder_python.cc b/gr-fec/python/fec/bindings/dummy_decoder_python.cc new file mode 100644 index 0000000000..7b336109c7 --- /dev/null +++ b/gr-fec/python/fec/bindings/dummy_decoder_python.cc @@ -0,0 +1,57 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(dummy_decoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(3f6bcfd3e993bd11983358acedffb1bd) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/dummy_decoder.h> +// pydoc.h is automatically generated in the build directory +#include <dummy_decoder_pydoc.h> + +void bind_dummy_decoder(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using dummy_decoder = ::gr::fec::code::dummy_decoder; + + + py::class_<dummy_decoder, gr::fec::generic_decoder, std::shared_ptr<dummy_decoder>>( + m_code, "dummy_decoder", D(code, dummy_decoder)) + + .def_static("make", + &dummy_decoder::make, + py::arg("frame_size"), + D(code, dummy_decoder, make)) + + + .def("set_frame_size", + &dummy_decoder::set_frame_size, + py::arg("frame_size"), + D(code, dummy_decoder, set_frame_size)) + + + .def("rate", &dummy_decoder::rate, D(code, dummy_decoder, rate)) + + ; +} diff --git a/gr-fec/python/fec/bindings/dummy_encoder_python.cc b/gr-fec/python/fec/bindings/dummy_encoder_python.cc new file mode 100644 index 0000000000..3670ce48ee --- /dev/null +++ b/gr-fec/python/fec/bindings/dummy_encoder_python.cc @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(dummy_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(5ccd687908a5e9a614a13c9713941024) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/dummy_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <dummy_encoder_pydoc.h> + +void bind_dummy_encoder(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using dummy_encoder = ::gr::fec::code::dummy_encoder; + + + py::class_<dummy_encoder, gr::fec::generic_encoder, std::shared_ptr<dummy_encoder>>( + m_code, "dummy_encoder", D(code, dummy_encoder)) + + .def_static("make", + &dummy_encoder::make, + py::arg("frame_size"), + py::arg("pack") = false, + py::arg("packed_bits") = false, + D(code, dummy_encoder, make)) + + + .def("set_frame_size", + &dummy_encoder::set_frame_size, + py::arg("frame_size"), + D(code, dummy_encoder, set_frame_size)) + + + .def("rate", &dummy_encoder::rate, D(code, dummy_encoder, rate)) + + ; +} diff --git a/gr-fec/python/fec/bindings/encode_ccsds_27_bb_python.cc b/gr-fec/python/fec/bindings/encode_ccsds_27_bb_python.cc new file mode 100644 index 0000000000..708cc5d241 --- /dev/null +++ b/gr-fec/python/fec/bindings/encode_ccsds_27_bb_python.cc @@ -0,0 +1,48 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(encode_ccsds_27_bb.h) */ +/* BINDTOOL_HEADER_FILE_HASH(80958c26294b511baa284af535cd1e7e) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/encode_ccsds_27_bb.h> +// pydoc.h is automatically generated in the build directory +#include <encode_ccsds_27_bb_pydoc.h> + +void bind_encode_ccsds_27_bb(py::module& m) +{ + + using encode_ccsds_27_bb = ::gr::fec::encode_ccsds_27_bb; + + + py::class_<encode_ccsds_27_bb, + gr::sync_interpolator, + gr::sync_block, + gr::block, + gr::basic_block, + std::shared_ptr<encode_ccsds_27_bb>>( + m, "encode_ccsds_27_bb", D(encode_ccsds_27_bb)) + + .def(py::init(&encode_ccsds_27_bb::make), D(encode_ccsds_27_bb, make)) + + + ; +} diff --git a/gr-fec/python/fec/bindings/encoder_python.cc b/gr-fec/python/fec/bindings/encoder_python.cc new file mode 100644 index 0000000000..413341d6a5 --- /dev/null +++ b/gr-fec/python/fec/bindings/encoder_python.cc @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(6c945b377b873e84738f7ccd83fee16c) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/encoder.h> +// pydoc.h is automatically generated in the build directory +#include <encoder_pydoc.h> + +void bind_encoder(py::module& m) +{ + + using encoder = ::gr::fec::encoder; + + + py::class_<encoder, gr::block, gr::basic_block, std::shared_ptr<encoder>>( + m, "encoder", D(encoder)) + + .def(py::init(&encoder::make), + py::arg("my_encoder"), + py::arg("input_item_size"), + py::arg("output_item_size"), + D(encoder, make)) + + + .def("general_work", + &encoder::general_work, + py::arg("noutput_items"), + py::arg("ninput_items"), + py::arg("input_items"), + py::arg("output_items"), + D(encoder, general_work)) + + + .def("fixed_rate_ninput_to_noutput", + &encoder::fixed_rate_ninput_to_noutput, + py::arg("ninput"), + D(encoder, fixed_rate_ninput_to_noutput)) + + + .def("fixed_rate_noutput_to_ninput", + &encoder::fixed_rate_noutput_to_ninput, + py::arg("noutput"), + D(encoder, fixed_rate_noutput_to_ninput)) + + + .def("forecast", + &encoder::forecast, + py::arg("noutput_items"), + py::arg("ninput_items_required"), + D(encoder, forecast)) + + ; +} diff --git a/gr-fec/python/fec/bindings/fec_mtrx_python.cc b/gr-fec/python/fec/bindings/fec_mtrx_python.cc new file mode 100644 index 0000000000..b7a7a6b7cd --- /dev/null +++ b/gr-fec/python/fec/bindings/fec_mtrx_python.cc @@ -0,0 +1,124 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(fec_mtrx.h) */ +/* BINDTOOL_HEADER_FILE_HASH(80c2f34bc9bdb9ac03abdf0c26b3d024) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/fec_mtrx.h> +// pydoc.h is automatically generated in the build directory +#include <fec_mtrx_pydoc.h> + +void bind_fec_mtrx(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using block_data = ::gr::fec::code::block_data; + using matrix = ::gr::fec::code::matrix; + using fec_mtrx = ::gr::fec::code::fec_mtrx; + + + py::class_<block_data, std::shared_ptr<block_data>>( + m_code, "block_data", D(code, block_data)) + + + ; + + py::class_<matrix, std::shared_ptr<matrix>>(m_code, "matrix", D(code, matrix)) + + + ; + + + py::class_<fec_mtrx, std::shared_ptr<fec_mtrx>>(m_code, "fec_mtrx", D(code, fec_mtrx)) + + // .def(py::init<gr::fec::code::fec_mtrx const&>(), + // py::arg("arg0"), + // D(code, fec_mtrx, fec_mtrx)) + + + .def("encode", + &fec_mtrx::encode, + py::arg("outbuffer"), + py::arg("inbuffer"), + D(code, fec_mtrx, encode)) + + + .def("decode", + &fec_mtrx::decode, + py::arg("outbuffer"), + py::arg("inbuffer"), + py::arg("frame_size"), + py::arg("max_iterations"), + D(code, fec_mtrx, decode)) + + + .def("n", &fec_mtrx::n, D(code, fec_mtrx, n)) + + + .def("k", &fec_mtrx::k, D(code, fec_mtrx, k)) + + ; + + + m_code.def( + "matrix_free", &::gr::fec::code::matrix_free, py::arg("x"), D(code, matrix_free)); + + + m_code.def("read_matrix_from_file", + &::gr::fec::code::read_matrix_from_file, + py::arg("filename"), + D(code, read_matrix_from_file)); + + + m_code.def("write_matrix_to_file", + &::gr::fec::code::write_matrix_to_file, + py::arg("filename"), + py::arg("M"), + D(code, write_matrix_to_file)); + + + m_code.def("generate_G_transpose", + &::gr::fec::code::generate_G_transpose, + py::arg("H_obj"), + D(code, generate_G_transpose)); + + + m_code.def("generate_G", + &::gr::fec::code::generate_G, + py::arg("H_obj"), + D(code, generate_G)); + + + m_code.def("generate_H", + &::gr::fec::code::generate_H, + py::arg("G_obj"), + D(code, generate_H)); + + + m_code.def("print_matrix", + &::gr::fec::code::print_matrix, + py::arg("M"), + py::arg("numpy") = false, + D(code, print_matrix)); +} diff --git a/gr-fec/python/fec/bindings/generic_decoder_python.cc b/gr-fec/python/fec/bindings/generic_decoder_python.cc new file mode 100644 index 0000000000..e77ce5f1d5 --- /dev/null +++ b/gr-fec/python/fec/bindings/generic_decoder_python.cc @@ -0,0 +1,154 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(generic_decoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(2ec1a34c9249874acbe730fd27adc535) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/generic_decoder.h> +// pydoc.h is automatically generated in the build directory +#include <generic_decoder_pydoc.h> + +void bind_generic_decoder(py::module& m) +{ + + using generic_decoder = ::gr::fec::generic_decoder; + + + py::class_<generic_decoder, std::shared_ptr<generic_decoder>>( + m, "generic_decoder", D(generic_decoder)) + + // .def(py::init<>(),D(generic_decoder,generic_decoder,0)) + // .def(py::init<std::string>(), py::arg("name"), + // D(generic_decoder,generic_decoder,1) + // ) + // .def(py::init<gr::fec::generic_decoder const &>(), py::arg("arg0"), + // D(generic_decoder,generic_decoder,2) + // ) + + + .def("generic_work", + &generic_decoder::generic_work, + py::arg("inbuffer"), + py::arg("outbuffer"), + D(generic_decoder, generic_work)) + + + .def("unique_id", &generic_decoder::unique_id, D(generic_decoder, unique_id)) + + + .def("alias", &generic_decoder::alias, D(generic_decoder, alias)) + + + .def("rate", &generic_decoder::rate, D(generic_decoder, rate)) + + + .def("get_input_size", + &generic_decoder::get_input_size, + D(generic_decoder, get_input_size)) + + + .def("get_output_size", + &generic_decoder::get_output_size, + D(generic_decoder, get_output_size)) + + + .def( + "get_history", &generic_decoder::get_history, D(generic_decoder, get_history)) + + + .def("get_shift", &generic_decoder::get_shift, D(generic_decoder, get_shift)) + + + .def("get_input_item_size", + &generic_decoder::get_input_item_size, + D(generic_decoder, get_input_item_size)) + + + .def("get_output_item_size", + &generic_decoder::get_output_item_size, + D(generic_decoder, get_output_item_size)) + + + .def("get_input_conversion", + &generic_decoder::get_input_conversion, + D(generic_decoder, get_input_conversion)) + + + .def("get_output_conversion", + &generic_decoder::get_output_conversion, + D(generic_decoder, get_output_conversion)) + + + .def("set_frame_size", + &generic_decoder::set_frame_size, + py::arg("frame_size"), + D(generic_decoder, set_frame_size)) + + + .def("get_iterations", + &generic_decoder::get_iterations, + D(generic_decoder, get_iterations)) + + ; + + + m.def("get_decoder_output_size", + &::gr::fec::get_decoder_output_size, + py::arg("my_decoder"), + D(get_decoder_output_size)); + + + m.def("get_decoder_input_size", + &::gr::fec::get_decoder_input_size, + py::arg("my_decoder"), + D(get_decoder_input_size)); + + + m.def("get_shift", &::gr::fec::get_shift, py::arg("my_decoder"), D(get_shift)); + + + m.def("get_history", &::gr::fec::get_history, py::arg("my_decoder"), D(get_history)); + + + m.def("get_decoder_input_item_size", + &::gr::fec::get_decoder_input_item_size, + py::arg("my_decoder"), + D(get_decoder_input_item_size)); + + + m.def("get_decoder_output_item_size", + &::gr::fec::get_decoder_output_item_size, + py::arg("my_decoder"), + D(get_decoder_output_item_size)); + + + m.def("get_decoder_input_conversion", + &::gr::fec::get_decoder_input_conversion, + py::arg("my_decoder"), + D(get_decoder_input_conversion)); + + + m.def("get_decoder_output_conversion", + &::gr::fec::get_decoder_output_conversion, + py::arg("my_decoder"), + D(get_decoder_output_conversion)); +} diff --git a/gr-fec/python/fec/bindings/generic_encoder_python.cc b/gr-fec/python/fec/bindings/generic_encoder_python.cc new file mode 100644 index 0000000000..1f2ef4e656 --- /dev/null +++ b/gr-fec/python/fec/bindings/generic_encoder_python.cc @@ -0,0 +1,114 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(generic_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(063421e47a4e75e4a2e1aa1e4f86016a) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/generic_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <generic_encoder_pydoc.h> + +void bind_generic_encoder(py::module& m) +{ + + using generic_encoder = ::gr::fec::generic_encoder; + + + py::class_<generic_encoder, std::shared_ptr<generic_encoder>>( + m, "generic_encoder", D(generic_encoder)) + + // .def(py::init<>(),D(generic_encoder,generic_encoder,0)) + // .def(py::init<std::string>(), py::arg("name"), + // D(generic_encoder,generic_encoder,1) + // ) + // .def(py::init<gr::fec::generic_encoder const &>(), py::arg("arg0"), + // D(generic_encoder,generic_encoder,2) + // ) + + + .def("generic_work", + &generic_encoder::generic_work, + py::arg("in_buffer"), + py::arg("out_buffer"), + D(generic_encoder, generic_work)) + + + .def("unique_id", &generic_encoder::unique_id, D(generic_encoder, unique_id)) + + + .def("alias", &generic_encoder::alias, D(generic_encoder, alias)) + + + .def("rate", &generic_encoder::rate, D(generic_encoder, rate)) + + + .def("get_input_size", + &generic_encoder::get_input_size, + D(generic_encoder, get_input_size)) + + + .def("get_output_size", + &generic_encoder::get_output_size, + D(generic_encoder, get_output_size)) + + + .def("get_input_conversion", + &generic_encoder::get_input_conversion, + D(generic_encoder, get_input_conversion)) + + + .def("get_output_conversion", + &generic_encoder::get_output_conversion, + D(generic_encoder, get_output_conversion)) + + + .def("set_frame_size", + &generic_encoder::set_frame_size, + py::arg("frame_size"), + D(generic_encoder, set_frame_size)) + + ; + + + m.def("get_encoder_output_size", + &::gr::fec::get_encoder_output_size, + py::arg("my_encoder"), + D(get_encoder_output_size)); + + + m.def("get_encoder_input_size", + &::gr::fec::get_encoder_input_size, + py::arg("my_encoder"), + D(get_encoder_input_size)); + + + m.def("get_encoder_input_conversion", + &::gr::fec::get_encoder_input_conversion, + py::arg("my_encoder"), + D(get_encoder_input_conversion)); + + + m.def("get_encoder_output_conversion", + &::gr::fec::get_encoder_output_conversion, + py::arg("my_encoder"), + D(get_encoder_output_conversion)); +} diff --git a/gr-fec/python/fec/bindings/ldpc_G_matrix_python.cc b/gr-fec/python/fec/bindings/ldpc_G_matrix_python.cc new file mode 100644 index 0000000000..edda371cd2 --- /dev/null +++ b/gr-fec/python/fec/bindings/ldpc_G_matrix_python.cc @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(ldpc_G_matrix.h) */ +/* BINDTOOL_HEADER_FILE_HASH(e7cba655800bc51dc4ee066fbd16f621) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/ldpc_G_matrix.h> +// pydoc.h is automatically generated in the build directory +#include <ldpc_G_matrix_pydoc.h> + +void bind_ldpc_G_matrix(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using ldpc_G_matrix = ::gr::fec::code::ldpc_G_matrix; + + + py::class_<ldpc_G_matrix, gr::fec::code::fec_mtrx, std::shared_ptr<ldpc_G_matrix>>( + m_code, "ldpc_G_matrix", D(code, ldpc_G_matrix)) + + .def(py::init(&ldpc_G_matrix::make), + py::arg("filename"), + D(code, ldpc_G_matrix, make)) + + + .def("encode", + &ldpc_G_matrix::encode, + py::arg("outbuffer"), + py::arg("inbuffer"), + D(code, ldpc_G_matrix, encode)) + + + .def("decode", + &ldpc_G_matrix::decode, + py::arg("outbuffer"), + py::arg("inbuffer"), + py::arg("frame_size"), + py::arg("max_iterations"), + D(code, ldpc_G_matrix, decode)) + + + .def("get_base_sptr", + &ldpc_G_matrix::get_base_sptr, + D(code, ldpc_G_matrix, get_base_sptr)) + + ; +} diff --git a/gr-fec/python/fec/bindings/ldpc_H_matrix_python.cc b/gr-fec/python/fec/bindings/ldpc_H_matrix_python.cc new file mode 100644 index 0000000000..7c57b980c5 --- /dev/null +++ b/gr-fec/python/fec/bindings/ldpc_H_matrix_python.cc @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(ldpc_H_matrix.h) */ +/* BINDTOOL_HEADER_FILE_HASH(68956287d34e6a1208c0d84fda0d8af4) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/ldpc_H_matrix.h> +// pydoc.h is automatically generated in the build directory +#include <ldpc_H_matrix_pydoc.h> + +void bind_ldpc_H_matrix(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using ldpc_H_matrix = ::gr::fec::code::ldpc_H_matrix; + + + py::class_<ldpc_H_matrix, gr::fec::code::fec_mtrx, std::shared_ptr<ldpc_H_matrix>>( + m_code, "ldpc_H_matrix", D(code, ldpc_H_matrix)) + + .def(py::init(&ldpc_H_matrix::make), + py::arg("filename"), + py::arg("gap"), + D(code, ldpc_H_matrix, make)) + + + .def("encode", + &ldpc_H_matrix::encode, + py::arg("outbuffer"), + py::arg("inbuffer"), + D(code, ldpc_H_matrix, encode)) + + + .def("decode", + &ldpc_H_matrix::decode, + py::arg("outbuffer"), + py::arg("inbuffer"), + py::arg("frame_size"), + py::arg("max_iterations"), + D(code, ldpc_H_matrix, decode)) + + + .def("n", &ldpc_H_matrix::n, D(code, ldpc_H_matrix, n)) + + + .def("k", &ldpc_H_matrix::k, D(code, ldpc_H_matrix, k)) + + + .def("get_base_sptr", + &ldpc_H_matrix::get_base_sptr, + D(code, ldpc_H_matrix, get_base_sptr)) + + ; +} diff --git a/gr-fec/python/fec/bindings/ldpc_bit_flip_decoder_python.cc b/gr-fec/python/fec/bindings/ldpc_bit_flip_decoder_python.cc new file mode 100644 index 0000000000..0b9810b8f8 --- /dev/null +++ b/gr-fec/python/fec/bindings/ldpc_bit_flip_decoder_python.cc @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(ldpc_bit_flip_decoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(45f30034a4c62fb253e8977e1a40bafa) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/ldpc_bit_flip_decoder.h> +// pydoc.h is automatically generated in the build directory +#include <ldpc_bit_flip_decoder_pydoc.h> + +void bind_ldpc_bit_flip_decoder(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using ldpc_bit_flip_decoder = ::gr::fec::code::ldpc_bit_flip_decoder; + + + py::class_<ldpc_bit_flip_decoder, + gr::fec::generic_decoder, + std::shared_ptr<ldpc_bit_flip_decoder>>( + m_code, "ldpc_bit_flip_decoder", D(code, ldpc_bit_flip_decoder)) + + .def_static("make", + &ldpc_bit_flip_decoder::make, + py::arg("mtrx_obj"), + py::arg("max_iter") = 100, + D(code, ldpc_bit_flip_decoder, make)) + + + .def("set_frame_size", + &ldpc_bit_flip_decoder::set_frame_size, + py::arg("frame_size"), + D(code, ldpc_bit_flip_decoder, set_frame_size)) + + + .def("rate", &ldpc_bit_flip_decoder::rate, D(code, ldpc_bit_flip_decoder, rate)) + + ; +} diff --git a/gr-fec/python/fec/bindings/ldpc_decoder_python.cc b/gr-fec/python/fec/bindings/ldpc_decoder_python.cc new file mode 100644 index 0000000000..e9947c5a8f --- /dev/null +++ b/gr-fec/python/fec/bindings/ldpc_decoder_python.cc @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(ldpc_decoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(678aa5afbcf6e4560a04f60042fa034b) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/ldpc_decoder.h> +// pydoc.h is automatically generated in the build directory +#include <ldpc_decoder_pydoc.h> + +void bind_ldpc_decoder(py::module& m) +{ + + using ldpc_decoder = ::gr::fec::ldpc_decoder; + + + py::class_<ldpc_decoder, gr::fec::generic_decoder, std::shared_ptr<ldpc_decoder>>( + m, "ldpc_decoder", D(ldpc_decoder)) + + .def_static("make", + &ldpc_decoder::make, + py::arg("alist_file"), + py::arg("sigma") = 0.5, + py::arg("max_iterations") = 50, + D(ldpc_decoder, make)) + + + .def("rate", &ldpc_decoder::rate, D(ldpc_decoder, rate)) + + + .def("set_frame_size", + &ldpc_decoder::set_frame_size, + py::arg("frame_size"), + D(ldpc_decoder, set_frame_size)) + + + .def("get_output_size", + &ldpc_decoder::get_output_size, + D(ldpc_decoder, get_output_size)) + + + .def("get_input_size", + &ldpc_decoder::get_input_size, + D(ldpc_decoder, get_input_size)) + + + .def("get_input_item_size", + &ldpc_decoder::get_input_item_size, + D(ldpc_decoder, get_input_item_size)) + + + .def("get_output_item_size", + &ldpc_decoder::get_output_item_size, + D(ldpc_decoder, get_output_item_size)) + + + .def("get_iterations", + &ldpc_decoder::get_iterations, + D(ldpc_decoder, get_iterations)) + + ; +} diff --git a/gr-fec/python/fec/bindings/ldpc_encoder_python.cc b/gr-fec/python/fec/bindings/ldpc_encoder_python.cc new file mode 100644 index 0000000000..339de76ce7 --- /dev/null +++ b/gr-fec/python/fec/bindings/ldpc_encoder_python.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(ldpc_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(2a8955403d92a13f31d333377b0d3099) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/ldpc_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <ldpc_encoder_pydoc.h> + +void bind_ldpc_encoder(py::module& m) +{ + + using ldpc_encoder = ::gr::fec::ldpc_encoder; + + + py::class_<ldpc_encoder, gr::fec::generic_encoder, std::shared_ptr<ldpc_encoder>>( + m, "ldpc_encoder", D(ldpc_encoder)) + + .def_static( + "make", &ldpc_encoder::make, py::arg("alist_file"), D(ldpc_encoder, make)) + + + .def("rate", &ldpc_encoder::rate, D(ldpc_encoder, rate)) + + + .def("set_frame_size", + &ldpc_encoder::set_frame_size, + py::arg("frame_size"), + D(ldpc_encoder, set_frame_size)) + + + .def("get_output_size", + &ldpc_encoder::get_output_size, + D(ldpc_encoder, get_output_size)) + + + .def("get_input_size", + &ldpc_encoder::get_input_size, + D(ldpc_encoder, get_input_size)) + + ; +} diff --git a/gr-fec/python/fec/bindings/ldpc_gen_mtrx_encoder_python.cc b/gr-fec/python/fec/bindings/ldpc_gen_mtrx_encoder_python.cc new file mode 100644 index 0000000000..7cafd92a11 --- /dev/null +++ b/gr-fec/python/fec/bindings/ldpc_gen_mtrx_encoder_python.cc @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(ldpc_gen_mtrx_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(9098a1e7d9b9af930a68831223e6a648) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/ldpc_gen_mtrx_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <ldpc_gen_mtrx_encoder_pydoc.h> + +void bind_ldpc_gen_mtrx_encoder(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using ldpc_gen_mtrx_encoder = ::gr::fec::code::ldpc_gen_mtrx_encoder; + + + py::class_<ldpc_gen_mtrx_encoder, + gr::fec::generic_encoder, + std::shared_ptr<ldpc_gen_mtrx_encoder>>( + m_code, "ldpc_gen_mtrx_encoder", D(code, ldpc_gen_mtrx_encoder)) + + .def_static("make", + &ldpc_gen_mtrx_encoder::make, + py::arg("G_obj"), + D(code, ldpc_gen_mtrx_encoder, make)) + + + .def("set_frame_size", + &ldpc_gen_mtrx_encoder::set_frame_size, + py::arg("frame_size"), + D(code, ldpc_gen_mtrx_encoder, set_frame_size)) + + + .def("rate", &ldpc_gen_mtrx_encoder::rate, D(code, ldpc_gen_mtrx_encoder, rate)) + + ; +} diff --git a/gr-fec/python/fec/bindings/ldpc_par_mtrx_encoder_python.cc b/gr-fec/python/fec/bindings/ldpc_par_mtrx_encoder_python.cc new file mode 100644 index 0000000000..945b18561f --- /dev/null +++ b/gr-fec/python/fec/bindings/ldpc_par_mtrx_encoder_python.cc @@ -0,0 +1,76 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(ldpc_par_mtrx_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(506554f986bfc2af2eec08101311ab7c) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/ldpc_par_mtrx_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <ldpc_par_mtrx_encoder_pydoc.h> + +void bind_ldpc_par_mtrx_encoder(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using ldpc_par_mtrx_encoder = ::gr::fec::code::ldpc_par_mtrx_encoder; + + + py::class_<ldpc_par_mtrx_encoder, + gr::fec::generic_encoder, + std::shared_ptr<ldpc_par_mtrx_encoder>>( + m_code, "ldpc_par_mtrx_encoder", D(code, ldpc_par_mtrx_encoder)) + + .def_static("make", + &ldpc_par_mtrx_encoder::make, + py::arg("alist_file"), + py::arg("gap") = 0, + D(code, ldpc_par_mtrx_encoder, make)) + + + .def_static("make_H", + &ldpc_par_mtrx_encoder::make_H, + py::arg("H_obj"), + D(code, ldpc_par_mtrx_encoder, make_H)) + + + .def("rate", &ldpc_par_mtrx_encoder::rate, D(code, ldpc_par_mtrx_encoder, rate)) + + + .def("set_frame_size", + &ldpc_par_mtrx_encoder::set_frame_size, + py::arg("frame_size"), + D(code, ldpc_par_mtrx_encoder, set_frame_size)) + + + .def("get_output_size", + &ldpc_par_mtrx_encoder::get_output_size, + D(code, ldpc_par_mtrx_encoder, get_output_size)) + + + .def("get_input_size", + &ldpc_par_mtrx_encoder::get_input_size, + D(code, ldpc_par_mtrx_encoder, get_input_size)) + + ; +} diff --git a/gr-fec/python/fec/bindings/polar_common_python.cc b/gr-fec/python/fec/bindings/polar_common_python.cc new file mode 100644 index 0000000000..126fe1b052 --- /dev/null +++ b/gr-fec/python/fec/bindings/polar_common_python.cc @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(polar_common.h) */ +/* BINDTOOL_HEADER_FILE_HASH(e827b945763fbaf669a3842ab4ded054) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/polar_common.h> +// pydoc.h is automatically generated in the build directory +#include <polar_common_pydoc.h> + +void bind_polar_common(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using polar_common = ::gr::fec::code::polar_common; + + + py::class_<polar_common, std::shared_ptr<polar_common>>( + m_code, "polar_common", D(code, polar_common)) + + .def(py::init<int, + int, + std::vector<int, std::allocator<int>>, + std::vector<uint8_t, std::allocator<uint8_t>>>(), + py::arg("block_size"), + py::arg("num_info_bits"), + py::arg("frozen_bit_positions"), + py::arg("frozen_bit_values"), + D(code, polar_common, polar_common, 0)) + .def(py::init<gr::fec::code::polar_common const&>(), + py::arg("arg0"), + D(code, polar_common, polar_common, 1)) + + ; +} diff --git a/gr-fec/python/fec/bindings/polar_decoder_common_python.cc b/gr-fec/python/fec/bindings/polar_decoder_common_python.cc new file mode 100644 index 0000000000..fc7e310bf0 --- /dev/null +++ b/gr-fec/python/fec/bindings/polar_decoder_common_python.cc @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(polar_decoder_common.h) */ +/* BINDTOOL_HEADER_FILE_HASH(3cb45d2c3d75379eaeb53fd705a4c822) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/polar_decoder_common.h> +// pydoc.h is automatically generated in the build directory +#include <polar_decoder_common_pydoc.h> + +void bind_polar_decoder_common(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using polar_decoder_common = ::gr::fec::code::polar_decoder_common; + + + py::class_<polar_decoder_common, + gr::fec::generic_decoder, + std::shared_ptr<polar_decoder_common>>( + m_code, "polar_decoder_common", D(code, polar_decoder_common)) + + // .def(py::init<int,int,std::vector<int, std::allocator<int> >,std::vector<char, + // std::allocator<char> >>(), py::arg("block_size"), + // py::arg("num_info_bits"), + // py::arg("frozen_bit_positions"), + // py::arg("frozen_bit_values"), + // D(code,polar_decoder_common,polar_decoder_common,0) + // ) + // .def(py::init<gr::fec::code::polar_decoder_common const &>(), py::arg("arg0"), + // D(code,polar_decoder_common,polar_decoder_common,1) + // ) + + + .def("rate", &polar_decoder_common::rate, D(code, polar_decoder_common, rate)) + + + .def("get_input_size", + &polar_decoder_common::get_input_size, + D(code, polar_decoder_common, get_input_size)) + + + .def("get_output_size", + &polar_decoder_common::get_output_size, + D(code, polar_decoder_common, get_output_size)) + + + .def("set_frame_size", + &polar_decoder_common::set_frame_size, + py::arg("frame_size"), + D(code, polar_decoder_common, set_frame_size)) + + ; +} diff --git a/gr-fec/python/fec/bindings/polar_decoder_sc_list_python.cc b/gr-fec/python/fec/bindings/polar_decoder_sc_list_python.cc new file mode 100644 index 0000000000..628d7f1e4d --- /dev/null +++ b/gr-fec/python/fec/bindings/polar_decoder_sc_list_python.cc @@ -0,0 +1,67 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(polar_decoder_sc_list.h) */ +/* BINDTOOL_HEADER_FILE_HASH(e25b758ec27e35ca596bffa7c9a7d420) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/polar_decoder_sc_list.h> +// pydoc.h is automatically generated in the build directory +#include <polar_decoder_sc_list_pydoc.h> + +void bind_polar_decoder_sc_list(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using polar_decoder_sc_list = ::gr::fec::code::polar_decoder_sc_list; + + + py::class_<polar_decoder_sc_list, + gr::fec::code::polar_decoder_common, + std::shared_ptr<polar_decoder_sc_list>>( + m_code, "polar_decoder_sc_list", D(code, polar_decoder_sc_list)) + + .def_static("make", + &polar_decoder_sc_list::make, + py::arg("max_list_size"), + py::arg("block_size"), + py::arg("num_info_bits"), + py::arg("frozen_bit_positions"), + py::arg("frozen_bit_values"), + D(code, polar_decoder_sc_list, make)) + + + .def("generic_work", + &polar_decoder_sc_list::generic_work, + py::arg("in_buffer"), + py::arg("out_buffer"), + D(code, polar_decoder_sc_list, generic_work)) + + ; + + + py::module m_code_polar = m_code.def_submodule("polar"); + + + py::module m_polar = m.def_submodule("polar"); +} diff --git a/gr-fec/python/fec/bindings/polar_decoder_sc_python.cc b/gr-fec/python/fec/bindings/polar_decoder_sc_python.cc new file mode 100644 index 0000000000..88a5c4a35f --- /dev/null +++ b/gr-fec/python/fec/bindings/polar_decoder_sc_python.cc @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(polar_decoder_sc.h) */ +/* BINDTOOL_HEADER_FILE_HASH(4f87bd7af297a4f14cb8cc3e99af54df) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/polar_decoder_sc.h> +// pydoc.h is automatically generated in the build directory +#include <polar_decoder_sc_pydoc.h> + +void bind_polar_decoder_sc(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using polar_decoder_sc = ::gr::fec::code::polar_decoder_sc; + + + py::class_<polar_decoder_sc, + gr::fec::code::polar_decoder_common, + std::shared_ptr<polar_decoder_sc>>( + m_code, "polar_decoder_sc", D(code, polar_decoder_sc)) + + .def_static("make", + &polar_decoder_sc::make, + py::arg("block_size"), + py::arg("num_info_bits"), + py::arg("frozen_bit_positions"), + py::arg("frozen_bit_values"), + D(code, polar_decoder_sc, make)) + + + .def("generic_work", + &polar_decoder_sc::generic_work, + py::arg("in_buffer"), + py::arg("out_buffer"), + D(code, polar_decoder_sc, generic_work)) + + ; +} diff --git a/gr-fec/python/fec/bindings/polar_decoder_sc_systematic_python.cc b/gr-fec/python/fec/bindings/polar_decoder_sc_systematic_python.cc new file mode 100644 index 0000000000..026b456b0e --- /dev/null +++ b/gr-fec/python/fec/bindings/polar_decoder_sc_systematic_python.cc @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(polar_decoder_sc_systematic.h) */ +/* BINDTOOL_HEADER_FILE_HASH(309212b7e2e5619a81028e00aec2914b) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/polar_decoder_sc_systematic.h> +// pydoc.h is automatically generated in the build directory +#include <polar_decoder_sc_systematic_pydoc.h> + +void bind_polar_decoder_sc_systematic(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using polar_decoder_sc_systematic = ::gr::fec::code::polar_decoder_sc_systematic; + + + py::class_<polar_decoder_sc_systematic, + gr::fec::code::polar_decoder_common, + std::shared_ptr<polar_decoder_sc_systematic>>( + m_code, "polar_decoder_sc_systematic", D(code, polar_decoder_sc_systematic)) + + .def_static("make", + &polar_decoder_sc_systematic::make, + py::arg("block_size"), + py::arg("num_info_bits"), + py::arg("frozen_bit_positions"), + D(code, polar_decoder_sc_systematic, make)) + + + .def("generic_work", + &polar_decoder_sc_systematic::generic_work, + py::arg("in_buffer"), + py::arg("out_buffer"), + D(code, polar_decoder_sc_systematic, generic_work)) + + ; +} diff --git a/gr-fec/python/fec/bindings/polar_encoder_python.cc b/gr-fec/python/fec/bindings/polar_encoder_python.cc new file mode 100644 index 0000000000..74450346ce --- /dev/null +++ b/gr-fec/python/fec/bindings/polar_encoder_python.cc @@ -0,0 +1,88 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(polar_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(58ba51702adfdf1118d059d3f9880beb) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/polar_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <polar_encoder_pydoc.h> + +void bind_polar_encoder(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using polar_encoder = ::gr::fec::code::polar_encoder; + + + py::class_<polar_encoder, gr::fec::generic_encoder, std::shared_ptr<polar_encoder>>( + m_code, "polar_encoder", D(code, polar_encoder)) + + .def_static("make", + &polar_encoder::make, + py::arg("block_size"), + py::arg("num_info_bits"), + py::arg("frozen_bit_positions"), + py::arg("frozen_bit_values"), + py::arg("is_packed") = false, + D(code, polar_encoder, make)) + + + .def("generic_work", + &polar_encoder::generic_work, + py::arg("in_buffer"), + py::arg("out_buffer"), + D(code, polar_encoder, generic_work)) + + + .def("rate", &polar_encoder::rate, D(code, polar_encoder, rate)) + + + .def("get_input_size", + &polar_encoder::get_input_size, + D(code, polar_encoder, get_input_size)) + + + .def("get_output_size", + &polar_encoder::get_output_size, + D(code, polar_encoder, get_output_size)) + + + .def("set_frame_size", + &polar_encoder::set_frame_size, + py::arg("frame_size"), + D(code, polar_encoder, set_frame_size)) + + + .def("get_input_conversion", + &polar_encoder::get_input_conversion, + D(code, polar_encoder, get_input_conversion)) + + + .def("get_output_conversion", + &polar_encoder::get_output_conversion, + D(code, polar_encoder, get_output_conversion)) + + ; +} diff --git a/gr-fec/python/fec/bindings/polar_encoder_systematic_python.cc b/gr-fec/python/fec/bindings/polar_encoder_systematic_python.cc new file mode 100644 index 0000000000..1e884df436 --- /dev/null +++ b/gr-fec/python/fec/bindings/polar_encoder_systematic_python.cc @@ -0,0 +1,80 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(polar_encoder_systematic.h) */ +/* BINDTOOL_HEADER_FILE_HASH(3030c93396c633b5f7fdba0b4d888e9e) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/polar_encoder_systematic.h> +// pydoc.h is automatically generated in the build directory +#include <polar_encoder_systematic_pydoc.h> + +void bind_polar_encoder_systematic(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using polar_encoder_systematic = ::gr::fec::code::polar_encoder_systematic; + + + py::class_<polar_encoder_systematic, + gr::fec::generic_encoder, + std::shared_ptr<polar_encoder_systematic>>( + m_code, "polar_encoder_systematic", D(code, polar_encoder_systematic)) + + .def_static("make", + &polar_encoder_systematic::make, + py::arg("block_size"), + py::arg("num_info_bits"), + py::arg("frozen_bit_positions"), + D(code, polar_encoder_systematic, make)) + + + .def("generic_work", + &polar_encoder_systematic::generic_work, + py::arg("in_buffer"), + py::arg("out_buffer"), + D(code, polar_encoder_systematic, generic_work)) + + + .def("rate", + &polar_encoder_systematic::rate, + D(code, polar_encoder_systematic, rate)) + + + .def("get_input_size", + &polar_encoder_systematic::get_input_size, + D(code, polar_encoder_systematic, get_input_size)) + + + .def("get_output_size", + &polar_encoder_systematic::get_output_size, + D(code, polar_encoder_systematic, get_output_size)) + + + .def("set_frame_size", + &polar_encoder_systematic::set_frame_size, + py::arg("frame_size"), + D(code, polar_encoder_systematic, set_frame_size)) + + ; +} diff --git a/gr-fec/python/fec/bindings/puncture_bb_python.cc b/gr-fec/python/fec/bindings/puncture_bb_python.cc new file mode 100644 index 0000000000..90f0e0a5de --- /dev/null +++ b/gr-fec/python/fec/bindings/puncture_bb_python.cc @@ -0,0 +1,47 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(puncture_bb.h) */ +/* BINDTOOL_HEADER_FILE_HASH(bbbb2852e32a96045648407807f60dc9) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/puncture_bb.h> +// pydoc.h is automatically generated in the build directory +#include <puncture_bb_pydoc.h> + +void bind_puncture_bb(py::module& m) +{ + + using puncture_bb = ::gr::fec::puncture_bb; + + + py::class_<puncture_bb, gr::block, gr::basic_block, std::shared_ptr<puncture_bb>>( + m, "puncture_bb", D(puncture_bb)) + + .def(py::init(&puncture_bb::make), + py::arg("puncsize"), + py::arg("puncpat"), + py::arg("delay") = 0, + D(puncture_bb, make)) + + + ; +} diff --git a/gr-fec/python/fec/bindings/puncture_ff_python.cc b/gr-fec/python/fec/bindings/puncture_ff_python.cc new file mode 100644 index 0000000000..9d5c9d71c5 --- /dev/null +++ b/gr-fec/python/fec/bindings/puncture_ff_python.cc @@ -0,0 +1,47 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(puncture_ff.h) */ +/* BINDTOOL_HEADER_FILE_HASH(fe9165c64fe2337dab002c2078c2f3b3) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/puncture_ff.h> +// pydoc.h is automatically generated in the build directory +#include <puncture_ff_pydoc.h> + +void bind_puncture_ff(py::module& m) +{ + + using puncture_ff = ::gr::fec::puncture_ff; + + + py::class_<puncture_ff, gr::block, gr::basic_block, std::shared_ptr<puncture_ff>>( + m, "puncture_ff", D(puncture_ff)) + + .def(py::init(&puncture_ff::make), + py::arg("puncsize"), + py::arg("puncpat"), + py::arg("delay"), + D(puncture_ff, make)) + + + ; +} diff --git a/gr-fec/python/fec/bindings/python_bindings.cc b/gr-fec/python/fec/bindings/python_bindings.cc new file mode 100644 index 0000000000..808bc32e43 --- /dev/null +++ b/gr-fec/python/fec/bindings/python_bindings.cc @@ -0,0 +1,136 @@ + +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +#include <pybind11/pybind11.h> + +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include <numpy/arrayobject.h> + +namespace py = pybind11; + +// void bind_alist(py::module&); +void bind_async_decoder(py::module&); +void bind_async_encoder(py::module&); +// void bind_awgn_bp(py::module&); +void bind_ber_bf(py::module&); +void bind_cc_common(py::module&); +void bind_cc_decoder(py::module&); +void bind_cc_encoder(py::module&); +void bind_ccsds_encoder(py::module&); +void bind_cldpc(py::module&); +void bind_conv_bit_corr_bb(py::module&); +void bind_decode_ccsds_27_fb(py::module&); +void bind_decoder(py::module&); +void bind_depuncture_bb(py::module&); +void bind_dummy_decoder(py::module&); +void bind_dummy_encoder(py::module&); +void bind_encode_ccsds_27_bb(py::module&); +void bind_encoder(py::module&); +void bind_fec_mtrx(py::module&); +void bind_generic_decoder(py::module&); +void bind_generic_encoder(py::module&); +void bind_gf2mat(py::module&); +void bind_gf2vec(py::module&); +void bind_ldpc_G_matrix(py::module&); +void bind_ldpc_H_matrix(py::module&); +void bind_ldpc_bit_flip_decoder(py::module&); +void bind_ldpc_decoder(py::module&); +void bind_ldpc_encoder(py::module&); +void bind_ldpc_gen_mtrx_encoder(py::module&); +void bind_ldpc_par_mtrx_encoder(py::module&); +void bind_maxstar(py::module&); +void bind_polar_common(py::module&); +void bind_polar_decoder_common(py::module&); +void bind_polar_decoder_sc(py::module&); +void bind_polar_decoder_sc_list(py::module&); +void bind_polar_decoder_sc_systematic(py::module&); +void bind_polar_encoder(py::module&); +void bind_polar_encoder_systematic(py::module&); +void bind_puncture_bb(py::module&); +void bind_puncture_ff(py::module&); +void bind_repetition_decoder(py::module&); +void bind_repetition_encoder(py::module&); +void bind_rs(py::module&); +void bind_tagged_decoder(py::module&); +void bind_tagged_encoder(py::module&); +// void bind_tpc_common(py::module&); +void bind_tpc_decoder(py::module&); +void bind_tpc_encoder(py::module&); +// void bind_viterbi(py::module&); + +// We need this hack because import_array() returns NULL +// for newer Python versions. +// This function is also necessary because it ensures access to the C API +// and removes a warning. +void* init_numpy() +{ + import_array(); + return NULL; +} + +PYBIND11_MODULE(fec_python, m) +{ + // Initialize the numpy C API + // (otherwise we will see segmentation faults) + init_numpy(); + + // Allow access to base block methods + py::module::import("gnuradio.gr"); + + bind_generic_decoder(m); + bind_generic_encoder(m); + // bind_alist(m); + bind_async_decoder(m); + bind_async_encoder(m); + // bind_awgn_bp(m); + bind_ber_bf(m); + bind_cc_common(m); + bind_cc_decoder(m); + bind_cc_encoder(m); + bind_decoder(m); + bind_encoder(m); + bind_ccsds_encoder(m); + // bind_cldpc(m); + bind_conv_bit_corr_bb(m); + bind_decode_ccsds_27_fb(m); + bind_depuncture_bb(m); + bind_dummy_decoder(m); + bind_dummy_encoder(m); + bind_encode_ccsds_27_bb(m); + bind_fec_mtrx(m); + // bind_gf2mat(m); + // bind_gf2vec(m); + bind_ldpc_G_matrix(m); + bind_ldpc_H_matrix(m); + bind_ldpc_bit_flip_decoder(m); + bind_ldpc_decoder(m); + bind_ldpc_encoder(m); + bind_ldpc_gen_mtrx_encoder(m); + bind_ldpc_par_mtrx_encoder(m); + // bind_maxstar(m); + bind_polar_common(m); + bind_polar_decoder_common(m); + bind_polar_decoder_sc(m); + bind_polar_decoder_sc_list(m); + bind_polar_decoder_sc_systematic(m); + bind_polar_encoder(m); + bind_polar_encoder_systematic(m); + bind_puncture_bb(m); + bind_puncture_ff(m); + bind_repetition_decoder(m); + bind_repetition_encoder(m); + // bind_rs(m); + bind_tagged_decoder(m); + bind_tagged_encoder(m); + // bind_tpc_common(m); + bind_tpc_decoder(m); + bind_tpc_encoder(m); + // bind_viterbi(m); +} diff --git a/gr-fec/python/fec/bindings/repetition_decoder_python.cc b/gr-fec/python/fec/bindings/repetition_decoder_python.cc new file mode 100644 index 0000000000..5819ca7ef6 --- /dev/null +++ b/gr-fec/python/fec/bindings/repetition_decoder_python.cc @@ -0,0 +1,61 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(repetition_decoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(bc890e953aca88be1a02e8bbd3b7f645) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/repetition_decoder.h> +// pydoc.h is automatically generated in the build directory +#include <repetition_decoder_pydoc.h> + +void bind_repetition_decoder(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using repetition_decoder = ::gr::fec::code::repetition_decoder; + + + py::class_<repetition_decoder, + gr::fec::generic_decoder, + std::shared_ptr<repetition_decoder>>( + m_code, "repetition_decoder", D(code, repetition_decoder)) + + .def_static("make", + &repetition_decoder::make, + py::arg("frame_size"), + py::arg("rep"), + py::arg("ap_prob") = 0.5, + D(code, repetition_decoder, make)) + + + .def("set_frame_size", + &repetition_decoder::set_frame_size, + py::arg("frame_size"), + D(code, repetition_decoder, set_frame_size)) + + + .def("rate", &repetition_decoder::rate, D(code, repetition_decoder, rate)) + + ; +} diff --git a/gr-fec/python/fec/bindings/repetition_encoder_python.cc b/gr-fec/python/fec/bindings/repetition_encoder_python.cc new file mode 100644 index 0000000000..b4ac9d2438 --- /dev/null +++ b/gr-fec/python/fec/bindings/repetition_encoder_python.cc @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(repetition_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(bcca138b453439e3857756e517b8ac54) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/repetition_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <repetition_encoder_pydoc.h> + +void bind_repetition_encoder(py::module& m) +{ + + + py::module m_code = m.def_submodule("code"); + + using repetition_encoder = ::gr::fec::code::repetition_encoder; + + + py::class_<repetition_encoder, + gr::fec::generic_encoder, + std::shared_ptr<repetition_encoder>>( + m_code, "repetition_encoder", D(code, repetition_encoder)) + + .def_static("make", + &repetition_encoder::make, + py::arg("frame_size"), + py::arg("rep"), + D(code, repetition_encoder, make)) + + + .def("set_frame_size", + &repetition_encoder::set_frame_size, + py::arg("frame_size"), + D(code, repetition_encoder, set_frame_size)) + + + .def("rate", &repetition_encoder::rate, D(code, repetition_encoder, rate)) + + ; +} diff --git a/gr-fec/python/fec/bindings/tagged_decoder_python.cc b/gr-fec/python/fec/bindings/tagged_decoder_python.cc new file mode 100644 index 0000000000..0e534c8096 --- /dev/null +++ b/gr-fec/python/fec/bindings/tagged_decoder_python.cc @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(tagged_decoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(995bbdbf3a532c232a7ad22cccb489ce) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/tagged_decoder.h> +// pydoc.h is automatically generated in the build directory +#include <tagged_decoder_pydoc.h> + +void bind_tagged_decoder(py::module& m) +{ + + using tagged_decoder = ::gr::fec::tagged_decoder; + + + py::class_<tagged_decoder, + gr::tagged_stream_block, + gr::block, + gr::basic_block, + std::shared_ptr<tagged_decoder>>(m, "tagged_decoder", D(tagged_decoder)) + + .def(py::init(&tagged_decoder::make), + py::arg("my_decoder"), + py::arg("input_item_size"), + py::arg("output_item_size"), + py::arg("lengthtagname") = "packet_len", + py::arg("mtu") = 1500, + D(tagged_decoder, make)) + + + .def("work", + &tagged_decoder::work, + py::arg("noutput_items"), + py::arg("ninput_items"), + py::arg("input_items"), + py::arg("output_items"), + D(tagged_decoder, work)) + + + .def("calculate_output_stream_length", + &tagged_decoder::calculate_output_stream_length, + py::arg("ninput_items"), + D(tagged_decoder, calculate_output_stream_length)) + + ; +} diff --git a/gr-fec/python/fec/bindings/tagged_encoder_python.cc b/gr-fec/python/fec/bindings/tagged_encoder_python.cc new file mode 100644 index 0000000000..640ecd75cd --- /dev/null +++ b/gr-fec/python/fec/bindings/tagged_encoder_python.cc @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(tagged_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(efb74440db18056807cd2a299f2b371e) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/tagged_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <tagged_encoder_pydoc.h> + +void bind_tagged_encoder(py::module& m) +{ + + using tagged_encoder = ::gr::fec::tagged_encoder; + + + py::class_<tagged_encoder, + gr::tagged_stream_block, + gr::block, + gr::basic_block, + std::shared_ptr<tagged_encoder>>(m, "tagged_encoder", D(tagged_encoder)) + + .def(py::init(&tagged_encoder::make), + py::arg("my_encoder"), + py::arg("input_item_size"), + py::arg("output_item_size"), + py::arg("lengthtagname") = "packet_len", + py::arg("mtu") = 1500, + D(tagged_encoder, make)) + + + .def("work", + &tagged_encoder::work, + py::arg("noutput_items"), + py::arg("ninput_items"), + py::arg("input_items"), + py::arg("output_items"), + D(tagged_encoder, work)) + + + .def("calculate_output_stream_length", + &tagged_encoder::calculate_output_stream_length, + py::arg("ninput_items"), + D(tagged_encoder, calculate_output_stream_length)) + + ; +} diff --git a/gr-fec/python/fec/bindings/tpc_common_python.cc b/gr-fec/python/fec/bindings/tpc_common_python.cc new file mode 100644 index 0000000000..217b347a73 --- /dev/null +++ b/gr-fec/python/fec/bindings/tpc_common_python.cc @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(tpc_common.h) */ +/* BINDTOOL_HEADER_FILE_HASH(3a3451c1e4e60a8034a77714e4b18b2c) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/tpc_common.h> +// pydoc.h is automatically generated in the build directory +#include <tpc_common_pydoc.h> + +void bind_tpc_common(py::module& m) +{ + + using tpc_common = ::gr::fec::tpc_common; + + + py::class_<tpc_common, std::shared_ptr<tpc_common>>(m, "tpc_common", D(tpc_common)) + + .def_static("parity_counter", + &tpc_common::parity_counter, + py::arg("symbol"), + py::arg("length"), + D(tpc_common, parity_counter)) + + + .def_static("rsc_enc_bit", + &tpc_common::rsc_enc_bit, + py::arg("input"), + py::arg("state_in"), + py::arg("g"), + py::arg("KK"), + py::arg("nn"), + py::arg("output"), + py::arg("nextStates"), + D(tpc_common, rsc_enc_bit)) + + + .def_static("precomputeStateTransitionMatrix_RSCPoly", + &tpc_common::precomputeStateTransitionMatrix_RSCPoly, + py::arg("numStates"), + py::arg("g"), + py::arg("KK"), + py::arg("nn"), + py::arg("output"), + py::arg("nextStates"), + D(tpc_common, precomputeStateTransitionMatrix_RSCPoly)) + + + .def_static("rsc_tail", + &tpc_common::rsc_tail, + py::arg("tail_p"), + py::arg("g"), + py::arg("max_states"), + py::arg("mm"), + D(tpc_common, rsc_tail)) + + + .def_static("itob", + &tpc_common::itob, + py::arg("binVec"), + py::arg("symbol"), + py::arg("length"), + D(tpc_common, itob)) + + ; +} diff --git a/gr-fec/python/fec/bindings/tpc_decoder_python.cc b/gr-fec/python/fec/bindings/tpc_decoder_python.cc new file mode 100644 index 0000000000..2f1685b4c9 --- /dev/null +++ b/gr-fec/python/fec/bindings/tpc_decoder_python.cc @@ -0,0 +1,61 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(tpc_decoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(15e46489e5823132246e657353addb1f) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/tpc_decoder.h> +// pydoc.h is automatically generated in the build directory +#include <tpc_decoder_pydoc.h> + +void bind_tpc_decoder(py::module& m) +{ + + using tpc_decoder = ::gr::fec::tpc_decoder; + + + py::class_<tpc_decoder, gr::fec::generic_decoder, std::shared_ptr<tpc_decoder>>( + m, "tpc_decoder", D(tpc_decoder)) + + .def_static("make", + &tpc_decoder::make, + py::arg("row_poly"), + py::arg("col_poly"), + py::arg("krow"), + py::arg("kcol"), + py::arg("bval"), + py::arg("qval"), + py::arg("max_iter"), + py::arg("decoder_type"), + D(tpc_decoder, make)) + + + .def("rate", &tpc_decoder::rate, D(tpc_decoder, rate)) + + + .def("set_frame_size", + &tpc_decoder::set_frame_size, + py::arg("frame_size"), + D(tpc_decoder, set_frame_size)) + + ; +} diff --git a/gr-fec/python/fec/bindings/tpc_encoder_python.cc b/gr-fec/python/fec/bindings/tpc_encoder_python.cc new file mode 100644 index 0000000000..9cd52917dc --- /dev/null +++ b/gr-fec/python/fec/bindings/tpc_encoder_python.cc @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(tpc_encoder.h) */ +/* BINDTOOL_HEADER_FILE_HASH(f2c134d3fe403847a57d5f1a843c569a) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/tpc_encoder.h> +// pydoc.h is automatically generated in the build directory +#include <tpc_encoder_pydoc.h> + +void bind_tpc_encoder(py::module& m) +{ + + using tpc_encoder = ::gr::fec::tpc_encoder; + + + py::class_<tpc_encoder, gr::fec::generic_encoder, std::shared_ptr<tpc_encoder>>( + m, "tpc_encoder", D(tpc_encoder)) + + .def_static("make", + &tpc_encoder::make, + py::arg("row_poly"), + py::arg("col_poly"), + py::arg("krow"), + py::arg("kcol"), + py::arg("bval"), + py::arg("qval"), + D(tpc_encoder, make)) + + + .def("rate", &tpc_encoder::rate, D(tpc_encoder, rate)) + + + .def("set_frame_size", + &tpc_encoder::set_frame_size, + py::arg("arg0"), + D(tpc_encoder, set_frame_size)) + + ; +} diff --git a/gr-fec/python/fec/bindings/viterbi_python.cc b/gr-fec/python/fec/bindings/viterbi_python.cc new file mode 100644 index 0000000000..2af977c66e --- /dev/null +++ b/gr-fec/python/fec/bindings/viterbi_python.cc @@ -0,0 +1,86 @@ +/* + * Copyright 2020 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(viterbi.h) */ +/* BINDTOOL_HEADER_FILE_HASH(a5060a599e0f982494808b0c16b9175b) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/fec/viterbi.h> +// pydoc.h is automatically generated in the build directory +#include <viterbi_pydoc.h> + +void bind_viterbi(py::module& m) +{ + + using viterbi_state = ::gr::fec::viterbi_state; + + + py::class_<viterbi_state, std::shared_ptr<viterbi_state>>( + m, "viterbi_state", D(viterbi_state)) + + .def(py::init<>(), D(viterbi_state, viterbi_state, 0)) + .def(py::init<gr::fec::viterbi_state const&>(), + py::arg("arg0"), + D(viterbi_state, viterbi_state, 1)) + + ; + + + m.def("gen_met", + &::gr::fec::gen_met, + py::arg("mettab"), + py::arg("amp"), + py::arg("esn0"), + py::arg("bias"), + py::arg("scale"), + D(gen_met)); + + + m.def("encode", + &::gr::fec::encode, + py::arg("symbols"), + py::arg("data"), + py::arg("nbytes"), + py::arg("encstate"), + D(encode)); + + + m.def("viterbi_chunks_init", + &::gr::fec::viterbi_chunks_init, + py::arg("state"), + D(viterbi_chunks_init)); + + + m.def("viterbi_butterfly2", + &::gr::fec::viterbi_butterfly2, + py::arg("symbols"), + py::arg("mettab"), + py::arg("state0"), + py::arg("state1"), + D(viterbi_butterfly2)); + + + m.def("viterbi_get_output", + &::gr::fec::viterbi_get_output, + py::arg("state"), + py::arg("outbuf"), + D(viterbi_get_output)); +} diff --git a/gr-fec/python/fec/capillary_threaded_decoder.py b/gr-fec/python/fec/capillary_threaded_decoder.py index 93a53161eb..4878021282 100644 --- a/gr-fec/python/fec/capillary_threaded_decoder.py +++ b/gr-fec/python/fec/capillary_threaded_decoder.py @@ -14,7 +14,7 @@ from __future__ import unicode_literals import math from gnuradio import gr, blocks -from . import fec_swig as fec +from . import fec_python as fec class capillary_threaded_decoder(gr.hier_block2): diff --git a/gr-fec/python/fec/capillary_threaded_encoder.py b/gr-fec/python/fec/capillary_threaded_encoder.py index 95d9f32531..4b67280574 100644 --- a/gr-fec/python/fec/capillary_threaded_encoder.py +++ b/gr-fec/python/fec/capillary_threaded_encoder.py @@ -14,7 +14,7 @@ from __future__ import unicode_literals import math from gnuradio import gr, blocks -from . import fec_swig as fec +from . import fec_python as fec class capillary_threaded_encoder(gr.hier_block2): diff --git a/gr-fec/python/fec/extended_async_encoder.py b/gr-fec/python/fec/extended_async_encoder.py index 9766c661ed..6390d135e2 100644 --- a/gr-fec/python/fec/extended_async_encoder.py +++ b/gr-fec/python/fec/extended_async_encoder.py @@ -16,7 +16,7 @@ import weakref from gnuradio import gr -from . import fec_swig as fec +from . import fec_python as fec from .bitflip import read_bitlist diff --git a/gr-fec/python/fec/extended_decoder.py b/gr-fec/python/fec/extended_decoder.py index 60dd3def3e..9dc8a926ef 100644 --- a/gr-fec/python/fec/extended_decoder.py +++ b/gr-fec/python/fec/extended_decoder.py @@ -15,7 +15,7 @@ from __future__ import unicode_literals from gnuradio import gr, blocks, digital -from . import fec_swig as fec +from . import fec_python as fec from .bitflip import * from .threaded_decoder import threaded_decoder diff --git a/gr-fec/python/fec/extended_encoder.py b/gr-fec/python/fec/extended_encoder.py index 575e6cd438..447a8b3a69 100644 --- a/gr-fec/python/fec/extended_encoder.py +++ b/gr-fec/python/fec/extended_encoder.py @@ -13,7 +13,7 @@ from __future__ import unicode_literals from gnuradio import gr, blocks -from . import fec_swig as fec +from . import fec_python as fec from .threaded_encoder import threaded_encoder from .capillary_threaded_encoder import capillary_threaded_encoder from .bitflip import read_bitlist diff --git a/gr-fec/python/fec/extended_tagged_decoder.py b/gr-fec/python/fec/extended_tagged_decoder.py index 34c65c70cb..a98b76c8c5 100644 --- a/gr-fec/python/fec/extended_tagged_decoder.py +++ b/gr-fec/python/fec/extended_tagged_decoder.py @@ -15,7 +15,7 @@ from __future__ import unicode_literals from gnuradio import gr, blocks, digital -from . import fec_swig as fec +from . import fec_python as fec from .bitflip import * diff --git a/gr-fec/python/fec/extended_tagged_encoder.py b/gr-fec/python/fec/extended_tagged_encoder.py index 385eb1b402..3a43c28adc 100644 --- a/gr-fec/python/fec/extended_tagged_encoder.py +++ b/gr-fec/python/fec/extended_tagged_encoder.py @@ -14,7 +14,7 @@ from __future__ import unicode_literals from gnuradio import gr, blocks -from . import fec_swig as fec +from . import fec_python as fec from .bitflip import read_bitlist diff --git a/gr-fec/python/fec/qa_fecapi_dummy.py b/gr-fec/python/fec/qa_fecapi_dummy.py index df579f53b4..59c6e9732d 100644 --- a/gr-fec/python/fec/qa_fecapi_dummy.py +++ b/gr-fec/python/fec/qa_fecapi_dummy.py @@ -14,8 +14,8 @@ import numpy as np from gnuradio import gr, gr_unittest, blocks from gnuradio import fec -from fec import extended_encoder -from fec import extended_decoder +from gnuradio.fec import extended_encoder +from gnuradio.fec import extended_decoder from _qa_helper import _qa_helper @@ -218,12 +218,12 @@ class test_fecapi_dummy(gr_unittest.TestCase): r2 = snk2.data() r3 = snk3.data() - data = tuple(data) - packed_data = tuple(packed_data) - self.assertTupleEqual(packed_data, r0) - self.assertTupleEqual(data, r1) - self.assertTupleEqual(packed_data, r2) - self.assertTupleEqual(data, r3) + data = list(data) + packed_data = list(packed_data) + self.assertListEqual(packed_data, r0) + self.assertListEqual(data, r1) + self.assertListEqual(packed_data, r2) + self.assertListEqual(data, r3) if __name__ == '__main__': diff --git a/gr-fec/python/fec/qa_fecapi_ldpc.py b/gr-fec/python/fec/qa_fecapi_ldpc.py index d4d209aede..3a702cc609 100644 --- a/gr-fec/python/fec/qa_fecapi_ldpc.py +++ b/gr-fec/python/fec/qa_fecapi_ldpc.py @@ -15,8 +15,8 @@ import os from gnuradio import gr, gr_unittest from gnuradio import fec -from fec import extended_encoder -from fec import extended_decoder +from gnuradio.fec import extended_encoder +from gnuradio.fec import extended_decoder from _qa_helper import _qa_helper diff --git a/gr-fec/python/fec/qa_polar_decoder_sc.py b/gr-fec/python/fec/qa_polar_decoder_sc.py index 83943138f8..850fcb182d 100644 --- a/gr-fec/python/fec/qa_polar_decoder_sc.py +++ b/gr-fec/python/fec/qa_polar_decoder_sc.py @@ -17,9 +17,9 @@ import numpy as np from gnuradio import gr, gr_unittest, blocks from gnuradio import fec -from fec import extended_decoder -from fec.polar.encoder import PolarEncoder -from fec.polar import channel_construction as cc +from gnuradio.fec import extended_decoder +from gnuradio.fec.polar.encoder import PolarEncoder +from gnuradio.fec.polar import channel_construction as cc # import os # print('PID:', os.getpid()) diff --git a/gr-fec/python/fec/threaded_decoder.py b/gr-fec/python/fec/threaded_decoder.py index 76e49aa3a6..750128c0da 100644 --- a/gr-fec/python/fec/threaded_decoder.py +++ b/gr-fec/python/fec/threaded_decoder.py @@ -10,7 +10,7 @@ from __future__ import unicode_literals from gnuradio import gr, blocks -from . import fec_swig as fec +from . import fec_python as fec class threaded_decoder(gr.hier_block2): diff --git a/gr-fec/python/fec/threaded_encoder.py b/gr-fec/python/fec/threaded_encoder.py index a874b9851f..37cc8981b6 100644 --- a/gr-fec/python/fec/threaded_encoder.py +++ b/gr-fec/python/fec/threaded_encoder.py @@ -11,7 +11,7 @@ from __future__ import unicode_literals from gnuradio import gr, blocks -from . import fec_swig as fec +from . import fec_python as fec class threaded_encoder(gr.hier_block2): diff --git a/gr-fec/swig/CMakeLists.txt b/gr-fec/swig/CMakeLists.txt deleted file mode 100644 index 18dc652a6f..0000000000 --- a/gr-fec/swig/CMakeLists.txt +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2012,2019 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -######################################################################## -# Setup swig generation -######################################################################## -include(GrPython) -include(GrSwig) - -set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:runtime_swig,INCLUDE_DIRECTORIES>) -set(GR_SWIG_TARGET_DEPS runtime_swig) - -if(GSL_FOUND) - list(APPEND GR_SWIG_FLAGS "-DGSL_FOUND") -endif(GSL_FOUND) - -set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/fec_swig_doc.i) -set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/gnuradio/fec) -set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc) -set(GR_SWIG_LIBRARIES gnuradio-fec ${GSL_LDFLAGS}) - -GR_SWIG_MAKE(fec_swig fec_swig.i) - -GR_SWIG_INSTALL( - TARGETS fec_swig - DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec -) - -install( - FILES - fec_swig.i - ${CMAKE_CURRENT_BINARY_DIR}/fec_swig_doc.i - DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig -) diff --git a/gr-fec/swig/fec_swig.i b/gr-fec/swig/fec_swig.i deleted file mode 100644 index 1d195ca280..0000000000 --- a/gr-fec/swig/fec_swig.i +++ /dev/null @@ -1,130 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2012,2014 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -#define FEC_API - -%include "gnuradio.i" - -//load generated python docstrings -%include "fec_swig_doc.i" - -%include "gnuradio/fec/cc_common.h" - -%nodefaultctor gr::fec::generic_encoder; -%template(generic_encoder_sptr) std::shared_ptr<gr::fec::generic_encoder>; - -%nodefaultctor gr::fec::generic_decoder; -%template(generic_decoder_sptr) std::shared_ptr<gr::fec::generic_decoder>; - -%{ -#include "gnuradio/fec/generic_decoder.h" -#include "gnuradio/fec/generic_encoder.h" -#include "gnuradio/fec/decoder.h" -#include "gnuradio/fec/encoder.h" -#include "gnuradio/fec/tagged_decoder.h" -#include "gnuradio/fec/tagged_encoder.h" -#include "gnuradio/fec/async_decoder.h" -#include "gnuradio/fec/async_encoder.h" -#include "gnuradio/fec/cc_decoder.h" -#include "gnuradio/fec/cc_encoder.h" -#include "gnuradio/fec/ccsds_encoder.h" -#include "gnuradio/fec/dummy_decoder.h" -#include "gnuradio/fec/dummy_encoder.h" -#include "gnuradio/fec/repetition_decoder.h" -#include "gnuradio/fec/repetition_encoder.h" -#include "gnuradio/fec/decode_ccsds_27_fb.h" -#include "gnuradio/fec/encode_ccsds_27_bb.h" -#include "gnuradio/fec/ber_bf.h" -#include "gnuradio/fec/conv_bit_corr_bb.h" -#include "gnuradio/fec/puncture_bb.h" -#include "gnuradio/fec/puncture_ff.h" -#include "gnuradio/fec/depuncture_bb.h" -#include "gnuradio/fec/ldpc_encoder.h" -#include "gnuradio/fec/ldpc_decoder.h" -#include "gnuradio/fec/tpc_encoder.h" -#include "gnuradio/fec/tpc_decoder.h" -#include "gnuradio/fec/polar_encoder.h" -#include "gnuradio/fec/polar_decoder_sc.h" -#include "gnuradio/fec/polar_common.h" -#include "gnuradio/fec/polar_decoder_sc_list.h" -#include "gnuradio/fec/polar_decoder_common.h" -#include "gnuradio/fec/polar_encoder_systematic.h" -#include "gnuradio/fec/polar_decoder_sc_systematic.h" -%} - -%include "gnuradio/fec/generic_decoder.h" -%include "gnuradio/fec/generic_encoder.h" -%include "gnuradio/fec/decoder.h" -%include "gnuradio/fec/encoder.h" -%include "gnuradio/fec/tagged_decoder.h" -%include "gnuradio/fec/tagged_encoder.h" -%include "gnuradio/fec/async_decoder.h" -%include "gnuradio/fec/async_encoder.h" -%include "gnuradio/fec/cc_decoder.h" -%include "gnuradio/fec/cc_encoder.h" -%include "gnuradio/fec/ccsds_encoder.h" -%include "gnuradio/fec/dummy_decoder.h" -%include "gnuradio/fec/dummy_encoder.h" -%include "gnuradio/fec/repetition_decoder.h" -%include "gnuradio/fec/repetition_encoder.h" -%include "gnuradio/fec/decode_ccsds_27_fb.h" -%include "gnuradio/fec/encode_ccsds_27_bb.h" -%include "gnuradio/fec/ber_bf.h" -%include "gnuradio/fec/conv_bit_corr_bb.h" -%include "gnuradio/fec/puncture_bb.h" -%include "gnuradio/fec/puncture_ff.h" -%include "gnuradio/fec/depuncture_bb.h" -%include "gnuradio/fec/tpc_encoder.h" -%include "gnuradio/fec/tpc_decoder.h" -%include "gnuradio/fec/polar_encoder.h" -%include "gnuradio/fec/polar_decoder_sc.h" -%include "gnuradio/fec/polar_common.h" -%include "gnuradio/fec/polar_decoder_sc_list.h" -%include "gnuradio/fec/polar_decoder_common.h" -%include "gnuradio/fec/polar_encoder_systematic.h" -%include "gnuradio/fec/polar_decoder_sc_systematic.h" -%include "gnuradio/fec/ldpc_encoder.h" - - -#ifdef GSL_FOUND -%{ -#include "gnuradio/fec/fec_mtrx.h" -#include "gnuradio/fec/ldpc_H_matrix.h" -#include "gnuradio/fec/ldpc_G_matrix.h" -#include "gnuradio/fec/ldpc_gen_mtrx_encoder.h" -#include "gnuradio/fec/ldpc_par_mtrx_encoder.h" -#include "gnuradio/fec/ldpc_bit_flip_decoder.h" -#include "gnuradio/fec/ldpc_decoder.h" -%} - -%include "gnuradio/fec/fec_mtrx.h" -%include "gnuradio/fec/ldpc_H_matrix.h" -%include "gnuradio/fec/ldpc_G_matrix.h" -%include "gnuradio/fec/ldpc_gen_mtrx_encoder.h" -%include "gnuradio/fec/ldpc_par_mtrx_encoder.h" -%include "gnuradio/fec/ldpc_bit_flip_decoder.h" -%include "gnuradio/fec/ldpc_decoder.h" - -%include "ldpc.i" -#endif /* GSL_FOUND */ - -GR_SWIG_BLOCK_MAGIC2(fec, decoder); -GR_SWIG_BLOCK_MAGIC2(fec, encoder); -GR_SWIG_BLOCK_MAGIC2(fec, tagged_decoder); -GR_SWIG_BLOCK_MAGIC2(fec, tagged_encoder); -GR_SWIG_BLOCK_MAGIC2(fec, async_decoder); -GR_SWIG_BLOCK_MAGIC2(fec, async_encoder); -GR_SWIG_BLOCK_MAGIC2(fec, decode_ccsds_27_fb); -GR_SWIG_BLOCK_MAGIC2(fec, encode_ccsds_27_bb); -GR_SWIG_BLOCK_MAGIC2(fec, ber_bf); -GR_SWIG_BLOCK_MAGIC2(fec, conv_bit_corr_bb); -GR_SWIG_BLOCK_MAGIC2(fec, puncture_bb); -GR_SWIG_BLOCK_MAGIC2(fec, puncture_ff); -GR_SWIG_BLOCK_MAGIC2(fec, depuncture_bb); diff --git a/gr-fec/swig/ldpc.i b/gr-fec/swig/ldpc.i deleted file mode 100644 index e7f6eafaf0..0000000000 --- a/gr-fec/swig/ldpc.i +++ /dev/null @@ -1,22 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2015 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -%template(matrix_sptr) std::shared_ptr<gr::fec::code::matrix>; -%template(fec_mtrx_sptr) std::shared_ptr<gr::fec::code::fec_mtrx>; - -%template(ldpc_H_matrix_sptr) std::shared_ptr<gr::fec::code::ldpc_H_matrix>; -%pythoncode %{ - ldpc_H_matrix = ldpc_H_matrix.make; -%} - -%template(ldpc_G_matrix_sptr) std::shared_ptr<gr::fec::code::ldpc_G_matrix>; -%pythoncode %{ - ldpc_G_matrix = ldpc_G_matrix.make; -%} |