GNU Radio's SATELLITES Package
include/satellites/encode_rs.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2018,2020,2024 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_ENCODE_RS_H
12#define INCLUDED_SATELLITES_ENCODE_RS_H
13
14#include <gnuradio/sync_block.h>
15#include <satellites/api.h>
16
17namespace gr {
18namespace satellites {
19
20/*!
21 * \brief Reed-Solomon encoder
22 * \ingroup satellites
23 *
24 */
25class SATELLITES_API encode_rs : virtual public gr::sync_block
26{
27public:
28 typedef std::shared_ptr<encode_rs> sptr;
29
30 /*!
31 * \brief Constructs a CCSDS Reed Solomon encoder using PDU IO.
32 *
33 * \param dual_basis Selects the dual or conventional basis.
34 * \param interleave Interleave depth.
35 */
36 static sptr make(bool dual_basis, int interleave = 1);
37
38 /*!
39 * \brief Constructs a CCSDS Reed Solomon encoder using vector stream IO.
40 *
41 * \param frame_size Input frame size.
42 * \param dual_basis Selects the dual or conventional basis.
43 * \param interleave Interleave depth.
44 */
45 static sptr make(int frame_size, bool dual_basis, int interleave = 1);
46
47 /*!
48 * \brief Constructs a generic Reed Solomon encoder using PDU IO.
49 *
50 * \param symsize Size of the finite field elements.
51 * \param gfpoly Polynomial defining the finite field.
52 * \param fcr First consecutive root of the Reed-Solomon generator polynomial.
53 * \param prim Primitive element used in the generator polynomial.
54 * \param nroots Number of roots of the generator polynomial.
55 * \param interleave Interleave depth.
56 */
57 static sptr
58 make(int symsize, int gfpoly, int fcr, int prim, int nroots, int interleave = 1);
59
60 /*!
61 * \brief Constructs a generic Reed Solomon encoder using vector stream IO.
62 *
63 * \param frame_size Input frame size.
64 * \param symsize Size of the finite field elements.
65 * \param gfpoly Polynomial defining the finite field.
66 * \param fcr First consecutive root of the Reed-Solomon generator polynomial.
67 * \param prim Primitive element used in the generator polynomial.
68 * \param nroots Number of roots of the generator polynomial.
69 * \param interleave Interleave depth.
70 */
71 static sptr make(int frame_size,
72 int symsize,
73 int gfpoly,
74 int fcr,
75 int prim,
76 int nroots,
77 int interleave);
78};
79
80} // namespace satellites
81} // namespace gr
82
83#endif /* INCLUDED_SATELLITES_ENCODE_RS_H */
#define SATELLITES_API
Definition: api.h:31
Reed-Solomon encoder.
Definition: include/satellites/encode_rs.h:26
std::shared_ptr< encode_rs > sptr
Definition: include/satellites/encode_rs.h:28
static sptr make(int frame_size, int symsize, int gfpoly, int fcr, int prim, int nroots, int interleave)
Constructs a generic Reed Solomon encoder using vector stream IO.
static sptr make(bool dual_basis, int interleave=1)
Constructs a CCSDS Reed Solomon encoder using PDU IO.
static sptr make(int symsize, int gfpoly, int fcr, int prim, int nroots, int interleave=1)
Constructs a generic Reed Solomon encoder using PDU IO.
static sptr make(int frame_size, bool dual_basis, int interleave=1)
Constructs a CCSDS Reed Solomon encoder using vector stream IO.
rs nroots
Definition: init_rs.h:80
rs fcr
Definition: init_rs.h:78
rs prim
Definition: init_rs.h:79
Definition: ax100_decode.h:17