/*
 * 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(viterbi.h)                                        */
/* BINDTOOL_HEADER_FILE_HASH(cb83a3ff6b09e10063c4bda89c143a43)                     */
/***********************************************************************************/

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

namespace py = pybind11;

#include <gnuradio/fec/viterbi.h>
// pydoc.h is automatically generated in the build directory
#include <viterbi_pydoc.h>

void bind_viterbi(py::module& m)
{

    using viterbi_state = ::gr::fec::viterbi_state;


    py::class_<viterbi_state, std::shared_ptr<viterbi_state>>(
        m, "viterbi_state", D(viterbi_state))

        .def(py::init<>(), D(viterbi_state, viterbi_state, 0))
        .def(py::init<gr::fec::viterbi_state const&>(),
             py::arg("arg0"),
             D(viterbi_state, viterbi_state, 1))

        ;


    m.def("gen_met",
          &::gr::fec::gen_met,
          py::arg("mettab"),
          py::arg("amp"),
          py::arg("esn0"),
          py::arg("bias"),
          py::arg("scale"),
          D(gen_met));


    m.def("encode",
          &::gr::fec::encode,
          py::arg("symbols"),
          py::arg("data"),
          py::arg("nbytes"),
          py::arg("encstate"),
          D(encode));


    m.def("viterbi_chunks_init",
          &::gr::fec::viterbi_chunks_init,
          py::arg("state"),
          D(viterbi_chunks_init));


    m.def("viterbi_butterfly2",
          &::gr::fec::viterbi_butterfly2,
          py::arg("symbols"),
          py::arg("mettab"),
          py::arg("state0"),
          py::arg("state1"),
          D(viterbi_butterfly2));


    m.def("viterbi_get_output",
          &::gr::fec::viterbi_get_output,
          py::arg("state"),
          py::arg("outbuf"),
          D(viterbi_get_output));
}
