Files
gr-ieee802-11/python/bindings/mapper_python.cc
T
2023-09-17 17:55:12 +02:00

82 lines
2.2 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(mapper.h) */
/* BINDTOOL_HEADER_FILE_HASH(71fee88c2602a7b34f8996a1ff163569) */
/***********************************************************************************/
#include <pybind11/complex.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
namespace py = pybind11;
#include <ieee802_11/mapper.h>
// pydoc.h is automatically generated in the build directory
#include <mapper_pydoc.h>
void bind_mapper(py::module& m)
{
using mapper = ::gr::ieee802_11::mapper;
py::class_<mapper, gr::block, gr::basic_block,
std::shared_ptr<mapper>>(m, "mapper", D(mapper))
.def(py::init(&mapper::make),
py::arg("mcs"),
py::arg("debug") = false,
D(mapper,make)
)
.def("set_encoding",&mapper::set_encoding,
py::arg("mcs"),
D(mapper,set_encoding)
)
;
py::enum_<::gr::ieee802_11::Encoding>(m,"Encoding")
.value("BPSK_1_2", ::gr::ieee802_11::BPSK_1_2) // 0
.value("BPSK_3_4", ::gr::ieee802_11::BPSK_3_4) // 1
.value("QPSK_1_2", ::gr::ieee802_11::QPSK_1_2) // 2
.value("QPSK_3_4", ::gr::ieee802_11::QPSK_3_4) // 3
.value("QAM16_1_2", ::gr::ieee802_11::QAM16_1_2) // 4
.value("QAM16_3_4", ::gr::ieee802_11::QAM16_3_4) // 5
.value("QAM64_2_3", ::gr::ieee802_11::QAM64_2_3) // 6
.value("QAM64_3_4", ::gr::ieee802_11::QAM64_3_4) // 7
.export_values()
;
py::implicitly_convertible<int, ::gr::ieee802_11::Encoding>();
}