GNU Radio's SATELLITES Package

decode_rs_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2016,2020 Daniel Estevez <daniel@destevez.net>
4 *
5 * This file is part of gr-satellites
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_SATELLITES_DECODE_RS_IMPL_H
12#define INCLUDED_SATELLITES_DECODE_RS_IMPL_H
13
14#include <satellites/decode_rs.h>
15
16#include <cstdint>
17#include <functional>
18#include <vector>
19
20 namespace gr {
21 namespace satellites {
22
23 class decode_rs_impl : public decode_rs
24{
25 private:
26 int d_interleave;
27 std::vector<uint8_t> d_rs_codeword;
28 std::vector<uint8_t> d_output_frame;
29 int d_nroots;
30 void* d_rs_p = NULL;
31
32 std::function<int(uint8_t*)> d_decode_rs;
33
34 constexpr static int d_ccsds_nn = 255;
35 constexpr static int d_ccsds_nroots = 32;
36
37 void check_interleave();
38 void set_message_ports();
39
40 public:
41 decode_rs_impl(bool dual_basis, int interleave = 1);
42 decode_rs_impl(
43 int symsize, int gfpoly, int fcr, int prim, int nroots, int interleave = 1);
44 ~decode_rs_impl();
45
46 // Where all the action really happens
47 void forecast(int noutput_items, gr_vector_int& ninput_items_required);
48
49 int general_work(int noutput_items,
50 gr_vector_int& ninput_items,
51 gr_vector_const_void_star& input_items,
52 gr_vector_void_star& output_items);
53
54 void msg_handler(pmt::pmt_t pmt_msg);
55};
56
57} // namespace satellites
58} // namespace gr
59
60#endif /* INCLUDED_SATELLITES_DECODE_RS_IMPL_H */
gr::satellites::decode_rs_impl::general_work
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
gr::satellites::decode_rs_impl::decode_rs_impl
decode_rs_impl(bool dual_basis, int interleave=1)
gr::satellites::decode_rs_impl::decode_rs_impl
decode_rs_impl(int symsize, int gfpoly, int fcr, int prim, int nroots, int interleave=1)
gr::satellites::decode_rs_impl::forecast
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
gr::satellites::decode_rs_impl::~decode_rs_impl
~decode_rs_impl()
gr::satellites::decode_rs_impl::msg_handler
void msg_handler(pmt::pmt_t pmt_msg)
gr::satellites::decode_rs
<+description of block+>
Definition include/satellites/decode_rs.h:26
decode_rs.h
nroots
rs nroots
Definition init_rs.h:80
fcr
rs fcr
Definition init_rs.h:78
prim
rs prim
Definition init_rs.h:79
NULL
#define NULL
Definition lib/libfec/decode_rs.h:63
gr::satellites
Definition ax100_decode.h:18
gr
Definition ax100_decode.h:17