/*
 * Copyright 2021 Free Software Foundation, Inc.
 *
 * This file is part of GNU Radio
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 */

#include <pybind11/complex.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

namespace py = pybind11;

#include <gnuradio/satlab/srs3_decode.h>
// pydoc.h is automatically generated in the build directory
#include <srs3_decode_pydoc.h>

void bind_srs3_decode(py::module& m)
{
    using srs3_decode = ::gr::satlab::srs3_decode;

    py::class_<srs3_decode,
               gr::block,
               gr::basic_block,
               std::shared_ptr<srs3_decode>>(m, "srs3_decode", D(srs3_decode))

        .def(py::init(&srs3_decode::make),
            py::arg("size"),
            py::arg("crc"),
            py::arg("cc"),
            py::arg("rand"),
            py::arg("rs"),
            py::arg("v1compat"),
            D(srs3_decode, make)
        )

        .def("set_size",
            &srs3_decode::set_size,
            py::arg("bytes"),
            D(srs3_decode, set_size)
        )

        .def("set_crc",
            &srs3_decode::set_crc,
            py::arg("crc"),
            D(srs3_decode, set_crc)
        )

        .def("set_cc",
            &srs3_decode::set_cc,
            py::arg("cc"),
            D(srs3_decode, set_cc)
        )

        .def("set_rand",
            &srs3_decode::set_rand,
            py::arg("rand"),
            D(srs3_decode, set_rand)
        )

        .def("set_rs",
            &srs3_decode::set_rs,
            py::arg("rs"),
            D(srs3_decode, set_rs)
        )

        .def("set_v1compat",
            &srs3_decode::set_v1compat,
            py::arg("v1compat"),
            D(srs3_decode, set_v1compat)
        );
}
