/*
 * 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_encode.h>
// pydoc.h is automatically generated in the build directory
#include <srs3_encode_pydoc.h>

void bind_srs3_encode(py::module& m)
{
    using srs3_encode = ::gr::satlab::srs3_encode;

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

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

        .def("set_preamble",
            &srs3_encode::set_preamble,
            py::arg("bytes"),
            D(srs3_encode, set_preamble)
        )

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

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

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

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

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