gr-lora/python/bindings/decoder_python.cc

82 wiersze
2.0 KiB
C++

/*
* Copyright 2021 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(decoder.h) */
/* BINDTOOL_HEADER_FILE_HASH(b2b8270ca781d7bb005a951719babe12) */
/***********************************************************************************/
#include <pybind11/complex.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
namespace py = pybind11;
#include <lora/decoder.h>
// pydoc.h is automatically generated in the build directory
#include <decoder_pydoc.h>
void bind_decoder(py::module& m)
{
using decoder = ::gr::lora::decoder;
py::class_<decoder, gr::sync_block, gr::block, gr::basic_block,
std::shared_ptr<decoder>>(m, "decoder", D(decoder))
.def(py::init(&decoder::make),
py::arg("samp_rate"),
py::arg("bandwidth"),
py::arg("sf"),
py::arg("implicit"),
py::arg("cr"),
py::arg("crc"),
py::arg("reduced_rate"),
py::arg("disable_drift_correction"),
D(decoder,make)
)
.def("set_sf",&decoder::set_sf,
py::arg("sf"),
D(decoder,set_sf)
)
.def("set_samp_rate",&decoder::set_samp_rate,
py::arg("samp_rate"),
D(decoder,set_samp_rate)
)
;
}