summaryrefslogtreecommitdiff
path: root/gr-fec/python/fec/bindings/tpc_common_python.cc
blob: 217b347a73ab1da6a5ef1083a5546987b284542c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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))

        ;
}