1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/*
* 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(fmcomms2_sink.h) */
/* BINDTOOL_HEADER_FILE_HASH(0cc01ab33946f58b5c4056a61d6043c4) */
/***********************************************************************************/
#include <pybind11/complex.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
namespace py = pybind11;
#include <gnuradio/iio/fmcomms2_sink.h>
// pydoc.h is automatically generated in the build directory
#include <fmcomms2_sink_pydoc.h>
template <typename T>
void bind_fmcomms2_sink_template(py::module& m, const char* classname)
{
using fmcomms2_sink = gr::iio::fmcomms2_sink<T>;
py::class_<fmcomms2_sink,
gr::sync_block,
gr::block,
gr::basic_block,
std::shared_ptr<fmcomms2_sink>>(m, classname, D(fmcomms2_sink))
.def(py::init(&fmcomms2_sink::make),
py::arg("uri"),
py::arg("ch_en"),
py::arg("buffer_size"),
py::arg("cyclic"),
D(fmcomms2_sink, make))
.def("set_bandwidth", &fmcomms2_sink::set_bandwidth, py::arg("longbandwidth"))
.def("set_frequency", &fmcomms2_sink::set_frequency, py::arg("longfrequency"))
.def("set_samplerate", &fmcomms2_sink::set_samplerate, py::arg("samplerate"))
.def("set_attenuation",
&fmcomms2_sink::set_attenuation,
py::arg("chan"),
py::arg("attenuation"))
.def("set_filter_params",
&fmcomms2_sink::set_filter_params,
py::arg("filter_source"),
py::arg("filter_filename") = "",
py::arg("fpass") = 0.0,
py::arg("fstop") = 0.0)
.def("set_len_tag_key",
&fmcomms2_sink::set_len_tag_key,
py::arg("len_tag_key") = "");
}
void bind_fmcomms2_sink(py::module& m)
{
bind_fmcomms2_sink_template<int16_t>(m, "fmcomms2_sink_s");
bind_fmcomms2_sink_template<std::complex<int16_t>>(m, "fmcomms2_sink_sc16");
bind_fmcomms2_sink_template<gr_complex>(m, "fmcomms2_sink_fc32");
}
|