diff --git a/CMakeLists.txt b/CMakeLists.txt index 86b11fb5..72175417 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") # Make sure our local CMake Modules path comes first list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) # Find gnuradio to get access to the cmake modules -find_package(Gnuradio REQUIRED) +find_package(Gnuradio "3.10" REQUIRED) # Set the version information here set(VERSION_MAJOR 1) @@ -74,7 +74,7 @@ if(NOT CMAKE_MODULES_DIR) set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake) endif(NOT CMAKE_MODULES_DIR) -set(GR_INCLUDE_DIR include/radar) +set(GR_INCLUDE_DIR include/gnuradio/radar) set(GR_CMAKE_DIR ${CMAKE_MODULES_DIR}/gnuradio-radar) set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME}) set(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}) @@ -132,7 +132,7 @@ add_custom_target(uninstall ######################################################################## # Add subdirectories ######################################################################## -add_subdirectory(include/radar) +add_subdirectory(include/gnuradio/radar) add_subdirectory(lib) add_subdirectory(apps) add_subdirectory(docs) diff --git a/README.md b/README.md index 8805d2ae..9b3af93e 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ For full documentation build the toolbox and open `build/docs/doxygen/html/index **Development platform** -GNU Radio maint-3.8 +GNU Radio maint-3.10 UHD 3.15 -Ubuntu 18.04 +Ubuntu 22.04 **Dependencies** Qt 5.10.1 diff --git a/cmake/Modules/gnuradio-radarConfig.cmake b/cmake/Modules/gnuradio-radarConfig.cmake index ab0f4354..6c3d2e7a 100644 --- a/cmake/Modules/gnuradio-radarConfig.cmake +++ b/cmake/Modules/gnuradio-radarConfig.cmake @@ -1,9 +1,10 @@ -INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(PC_RADAR radar) +find_package(PkgConfig) + +PKG_CHECK_MODULES(PC_GR_RADAR gnuradio-radar) FIND_PATH( - RADAR_INCLUDE_DIRS - NAMES radar/api.h + GR_RADAR_INCLUDE_DIRS + NAMES gnuradio/radar/api.h HINTS $ENV{RADAR_DIR}/include ${PC_RADAR_INCLUDEDIR} PATHS ${CMAKE_INSTALL_PREFIX}/include @@ -12,7 +13,7 @@ FIND_PATH( ) FIND_LIBRARY( - RADAR_LIBRARIES + GR_RADAR_LIBRARIES NAMES gnuradio-radar HINTS $ENV{RADAR_DIR}/lib ${PC_RADAR_LIBDIR} @@ -24,8 +25,8 @@ FIND_LIBRARY( /usr/lib64 ) -include("${CMAKE_CURRENT_LIST_DIR}/radarTarget.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/gnuradio-radarTarget.cmake") INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(RADAR DEFAULT_MSG RADAR_LIBRARIES RADAR_INCLUDE_DIRS) -MARK_AS_ADVANCED(RADAR_LIBRARIES RADAR_INCLUDE_DIRS) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GR_RADAR DEFAULT_MSG GR_RADAR_LIBRARIES GR_RADAR_INCLUDE_DIRS) +MARK_AS_ADVANCED(GR_RADAR_LIBRARIES GR_RADAR_INCLUDE_DIRS) diff --git a/examples/tests/test_find_max_peak_c.py b/examples/tests/test_find_max_peak_c.py new file mode 100755 index 00000000..bd803cab --- /dev/null +++ b/examples/tests/test_find_max_peak_c.py @@ -0,0 +1,193 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# +# SPDX-License-Identifier: GPL-3.0 +# +# GNU Radio Python Flow Graph +# Title: Test Find Max Peak C +# GNU Radio version: 3.10.1.1 + +from packaging.version import Version as StrictVersion + +if __name__ == '__main__': + import ctypes + import sys + if sys.platform.startswith('linux'): + try: + x11 = ctypes.cdll.LoadLibrary('libX11.so') + x11.XInitThreads() + except: + print("Warning: failed to XInitThreads()") + +from PyQt5 import Qt +from gnuradio import qtgui +from gnuradio.filter import firdes +import sip +from gnuradio import analog +from gnuradio import blocks +from gnuradio import gr +from gnuradio.fft import window +import sys +import signal +from argparse import ArgumentParser +from gnuradio.eng_arg import eng_float, intx +from gnuradio import eng_notation +from gnuradio import radar +from gnuradio.qtgui import Range, RangeWidget +from PyQt5 import QtCore + + + +from gnuradio import qtgui + +class test_find_max_peak_c(gr.top_block, Qt.QWidget): + + def __init__(self): + gr.top_block.__init__(self, "Test Find Max Peak C", catch_exceptions=True) + Qt.QWidget.__init__(self) + self.setWindowTitle("Test Find Max Peak C") + qtgui.util.check_set_qss() + try: + self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) + except: + pass + self.top_scroll_layout = Qt.QVBoxLayout() + self.setLayout(self.top_scroll_layout) + self.top_scroll = Qt.QScrollArea() + self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) + self.top_scroll_layout.addWidget(self.top_scroll) + self.top_scroll.setWidgetResizable(True) + self.top_widget = Qt.QWidget() + self.top_scroll.setWidget(self.top_widget) + self.top_layout = Qt.QVBoxLayout(self.top_widget) + self.top_grid_layout = Qt.QGridLayout() + self.top_layout.addLayout(self.top_grid_layout) + + self.settings = Qt.QSettings("GNU Radio", "test_find_max_peak_c") + + try: + if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"): + self.restoreGeometry(self.settings.value("geometry").toByteArray()) + else: + self.restoreGeometry(self.settings.value("geometry")) + except: + pass + + ################################################## + # Variables + ################################################## + self.threshold = threshold = -120 + self.samp_rate = samp_rate = 32000 + self.packet_len = packet_len = 2048 + + ################################################## + # Blocks + ################################################## + self._threshold_range = Range(-200, 100, 1, -120, 200) + self._threshold_win = RangeWidget(self._threshold_range, self.set_threshold, "'threshold'", "counter_slider", float, QtCore.Qt.Horizontal) + self.top_layout.addWidget(self._threshold_win) + self.radar_ts_fft_cc_0 = radar.ts_fft_cc(packet_len, "packet_len") + self.radar_ts_fft_cc_0.set_min_output_buffer(4096) + self.radar_print_results_0 = radar.print_results(False, "") + self.radar_find_max_peak_c_0 = radar.find_max_peak_c(samp_rate, threshold, 0, [], False, "packet_len") + self.qtgui_sink_x_0 = qtgui.sink_c( + packet_len, #fftsize + window.WIN_BLACKMAN_hARRIS, #wintype + 0, #fc + samp_rate, #bw + 'QT GUI Plot', #name + True, #plotfreq + True, #plotwaterfall + True, #plottime + True, #plotconst + None # parent + ) + self.qtgui_sink_x_0.set_update_time(1.0/10) + self._qtgui_sink_x_0_win = sip.wrapinstance(self.qtgui_sink_x_0.qwidget(), Qt.QWidget) + + self.qtgui_sink_x_0.enable_rf_freq(False) + + self.top_layout.addWidget(self._qtgui_sink_x_0_win) + self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*1, samp_rate,True) + self.blocks_throttle_0.set_min_output_buffer(4096) + self.blocks_stream_to_tagged_stream_0 = blocks.stream_to_tagged_stream(gr.sizeof_gr_complex, 1, packet_len, "packet_len") + self.analog_sig_source_x_0 = analog.sig_source_c(samp_rate, analog.GR_COS_WAVE, 5000, 1, 0, 0) + + + ################################################## + # Connections + ################################################## + self.msg_connect((self.radar_find_max_peak_c_0, 'Msg out'), (self.radar_print_results_0, 'Msg in')) + self.connect((self.analog_sig_source_x_0, 0), (self.blocks_throttle_0, 0)) + self.connect((self.blocks_stream_to_tagged_stream_0, 0), (self.qtgui_sink_x_0, 0)) + self.connect((self.blocks_stream_to_tagged_stream_0, 0), (self.radar_ts_fft_cc_0, 0)) + self.connect((self.blocks_throttle_0, 0), (self.blocks_stream_to_tagged_stream_0, 0)) + self.connect((self.radar_ts_fft_cc_0, 0), (self.radar_find_max_peak_c_0, 0)) + + + def closeEvent(self, event): + self.settings = Qt.QSettings("GNU Radio", "test_find_max_peak_c") + self.settings.setValue("geometry", self.saveGeometry()) + self.stop() + self.wait() + + event.accept() + + def get_threshold(self): + return self.threshold + + def set_threshold(self, threshold): + self.threshold = threshold + self.radar_find_max_peak_c_0.set_threshold(self.threshold) + + def get_samp_rate(self): + return self.samp_rate + + def set_samp_rate(self, samp_rate): + self.samp_rate = samp_rate + self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate) + self.blocks_throttle_0.set_sample_rate(self.samp_rate) + self.qtgui_sink_x_0.set_frequency_range(0, self.samp_rate) + + def get_packet_len(self): + return self.packet_len + + def set_packet_len(self, packet_len): + self.packet_len = packet_len + self.blocks_stream_to_tagged_stream_0.set_packet_len(self.packet_len) + self.blocks_stream_to_tagged_stream_0.set_packet_len_pmt(self.packet_len) + + + + +def main(top_block_cls=test_find_max_peak_c, options=None): + + if StrictVersion("4.5.0") <= StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"): + style = gr.prefs().get_string('qtgui', 'style', 'raster') + Qt.QApplication.setGraphicsSystem(style) + qapp = Qt.QApplication(sys.argv) + + tb = top_block_cls() + + tb.start() + + tb.show() + + def sig_handler(sig=None, frame=None): + tb.stop() + tb.wait() + + Qt.QApplication.quit() + + signal.signal(signal.SIGINT, sig_handler) + signal.signal(signal.SIGTERM, sig_handler) + + timer = Qt.QTimer() + timer.start(500) + timer.timeout.connect(lambda: None) + + qapp.exec_() + +if __name__ == '__main__': + main() diff --git a/include/radar/CMakeLists.txt b/include/gnuradio/radar/CMakeLists.txt similarity index 96% rename from include/radar/CMakeLists.txt rename to include/gnuradio/radar/CMakeLists.txt index 0385c145..2aa90e16 100644 --- a/include/radar/CMakeLists.txt +++ b/include/gnuradio/radar/CMakeLists.txt @@ -52,6 +52,5 @@ install(FILES os_cfar_2d_vc.h estimator_ofdm.h estimator_rcs.h - trigger_command.h - DESTINATION include/radar + trigger_command.h DESTINATION include/gnuradio/radar ) diff --git a/include/radar/api.h b/include/gnuradio/radar/api.h similarity index 100% rename from include/radar/api.h rename to include/gnuradio/radar/api.h diff --git a/include/radar/crop_matrix_vcvc.h b/include/gnuradio/radar/crop_matrix_vcvc.h similarity index 100% rename from include/radar/crop_matrix_vcvc.h rename to include/gnuradio/radar/crop_matrix_vcvc.h diff --git a/include/radar/estimator_cw.h b/include/gnuradio/radar/estimator_cw.h similarity index 100% rename from include/radar/estimator_cw.h rename to include/gnuradio/radar/estimator_cw.h diff --git a/include/radar/estimator_fmcw.h b/include/gnuradio/radar/estimator_fmcw.h similarity index 100% rename from include/radar/estimator_fmcw.h rename to include/gnuradio/radar/estimator_fmcw.h diff --git a/include/radar/estimator_fsk.h b/include/gnuradio/radar/estimator_fsk.h similarity index 100% rename from include/radar/estimator_fsk.h rename to include/gnuradio/radar/estimator_fsk.h diff --git a/include/radar/estimator_ofdm.h b/include/gnuradio/radar/estimator_ofdm.h similarity index 100% rename from include/radar/estimator_ofdm.h rename to include/gnuradio/radar/estimator_ofdm.h diff --git a/include/radar/estimator_rcs.h b/include/gnuradio/radar/estimator_rcs.h similarity index 100% rename from include/radar/estimator_rcs.h rename to include/gnuradio/radar/estimator_rcs.h diff --git a/include/radar/estimator_sync_pulse_c.h b/include/gnuradio/radar/estimator_sync_pulse_c.h similarity index 100% rename from include/radar/estimator_sync_pulse_c.h rename to include/gnuradio/radar/estimator_sync_pulse_c.h diff --git a/include/radar/find_max_peak_c.h b/include/gnuradio/radar/find_max_peak_c.h similarity index 100% rename from include/radar/find_max_peak_c.h rename to include/gnuradio/radar/find_max_peak_c.h diff --git a/include/radar/msg_gate.h b/include/gnuradio/radar/msg_gate.h similarity index 100% rename from include/radar/msg_gate.h rename to include/gnuradio/radar/msg_gate.h diff --git a/include/radar/msg_manipulator.h b/include/gnuradio/radar/msg_manipulator.h similarity index 100% rename from include/radar/msg_manipulator.h rename to include/gnuradio/radar/msg_manipulator.h diff --git a/include/radar/ofdm_cyclic_prefix_remover_cvc.h b/include/gnuradio/radar/ofdm_cyclic_prefix_remover_cvc.h similarity index 100% rename from include/radar/ofdm_cyclic_prefix_remover_cvc.h rename to include/gnuradio/radar/ofdm_cyclic_prefix_remover_cvc.h diff --git a/include/radar/ofdm_divide_vcvc.h b/include/gnuradio/radar/ofdm_divide_vcvc.h similarity index 100% rename from include/radar/ofdm_divide_vcvc.h rename to include/gnuradio/radar/ofdm_divide_vcvc.h diff --git a/include/radar/os_cfar_2d_vc.h b/include/gnuradio/radar/os_cfar_2d_vc.h similarity index 100% rename from include/radar/os_cfar_2d_vc.h rename to include/gnuradio/radar/os_cfar_2d_vc.h diff --git a/include/radar/os_cfar_c.h b/include/gnuradio/radar/os_cfar_c.h similarity index 100% rename from include/radar/os_cfar_c.h rename to include/gnuradio/radar/os_cfar_c.h diff --git a/include/radar/print_results.h b/include/gnuradio/radar/print_results.h similarity index 100% rename from include/radar/print_results.h rename to include/gnuradio/radar/print_results.h diff --git a/include/radar/qtgui_scatter_plot.h b/include/gnuradio/radar/qtgui_scatter_plot.h similarity index 100% rename from include/radar/qtgui_scatter_plot.h rename to include/gnuradio/radar/qtgui_scatter_plot.h diff --git a/include/radar/qtgui_spectrogram_plot.h b/include/gnuradio/radar/qtgui_spectrogram_plot.h similarity index 100% rename from include/radar/qtgui_spectrogram_plot.h rename to include/gnuradio/radar/qtgui_spectrogram_plot.h diff --git a/include/radar/qtgui_time_plot.h b/include/gnuradio/radar/qtgui_time_plot.h similarity index 100% rename from include/radar/qtgui_time_plot.h rename to include/gnuradio/radar/qtgui_time_plot.h diff --git a/include/radar/signal_generator_cw_c.h b/include/gnuradio/radar/signal_generator_cw_c.h similarity index 100% rename from include/radar/signal_generator_cw_c.h rename to include/gnuradio/radar/signal_generator_cw_c.h diff --git a/include/radar/signal_generator_fmcw_c.h b/include/gnuradio/radar/signal_generator_fmcw_c.h similarity index 100% rename from include/radar/signal_generator_fmcw_c.h rename to include/gnuradio/radar/signal_generator_fmcw_c.h diff --git a/include/radar/signal_generator_fsk_c.h b/include/gnuradio/radar/signal_generator_fsk_c.h similarity index 100% rename from include/radar/signal_generator_fsk_c.h rename to include/gnuradio/radar/signal_generator_fsk_c.h diff --git a/include/radar/signal_generator_sync_pulse_c.h b/include/gnuradio/radar/signal_generator_sync_pulse_c.h similarity index 100% rename from include/radar/signal_generator_sync_pulse_c.h rename to include/gnuradio/radar/signal_generator_sync_pulse_c.h diff --git a/include/radar/split_cc.h b/include/gnuradio/radar/split_cc.h similarity index 100% rename from include/radar/split_cc.h rename to include/gnuradio/radar/split_cc.h diff --git a/include/radar/split_fsk_cc.h b/include/gnuradio/radar/split_fsk_cc.h similarity index 100% rename from include/radar/split_fsk_cc.h rename to include/gnuradio/radar/split_fsk_cc.h diff --git a/include/radar/static_target_simulator_cc.h b/include/gnuradio/radar/static_target_simulator_cc.h similarity index 100% rename from include/radar/static_target_simulator_cc.h rename to include/gnuradio/radar/static_target_simulator_cc.h diff --git a/include/radar/tracking_singletarget.h b/include/gnuradio/radar/tracking_singletarget.h similarity index 100% rename from include/radar/tracking_singletarget.h rename to include/gnuradio/radar/tracking_singletarget.h diff --git a/include/radar/transpose_matrix_vcvc.h b/include/gnuradio/radar/transpose_matrix_vcvc.h similarity index 100% rename from include/radar/transpose_matrix_vcvc.h rename to include/gnuradio/radar/transpose_matrix_vcvc.h diff --git a/include/radar/trigger_command.h b/include/gnuradio/radar/trigger_command.h similarity index 100% rename from include/radar/trigger_command.h rename to include/gnuradio/radar/trigger_command.h diff --git a/include/radar/ts_fft_cc.h b/include/gnuradio/radar/ts_fft_cc.h similarity index 100% rename from include/radar/ts_fft_cc.h rename to include/gnuradio/radar/ts_fft_cc.h diff --git a/include/radar/usrp_echotimer_cc.h b/include/gnuradio/radar/usrp_echotimer_cc.h similarity index 100% rename from include/radar/usrp_echotimer_cc.h rename to include/gnuradio/radar/usrp_echotimer_cc.h diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index d85b5590..cdbeaddb 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -25,7 +25,8 @@ set(QTGUI_MOC_HEADERS scatter_plot.h time_plot.h spectrogram_plot.h) -QT5_WRAP_CPP(QTGUI_MOC_OUTFILES ${QTGUI_MOC_HEADERS}) + +qt5_wrap_cpp(QTGUI_MOC_OUTFILES ${QTGUI_MOC_HEADERS}) ######################################################################## # Setup library @@ -77,7 +78,7 @@ endif(NOT radar_sources) add_library(gnuradio-radar SHARED ${radar_sources}) target_link_libraries(gnuradio-radar PUBLIC - gnuradio::gnuradio-runtime ${QT_LIBRARIES} fftw3f::fftw3f UHD::UHD qwt::qwt + gnuradio::gnuradio-runtime ${QT_LIBRARIES} fftw3f::fftw3f UHD::UHD qwt::qwt Qt5::Widgets ) target_include_directories(gnuradio-radar PUBLIC $ @@ -95,7 +96,7 @@ endif(APPLE) # Install built library files ######################################################################## include(GrMiscUtils) -GR_LIBRARY_FOO(gnuradio-radar) +GR_LIBRARY_FOO(gnuradio-radar Qwt Qt5Widgets) ######################################################################## # Print summary diff --git a/lib/scatter_plot.h b/lib/scatter_plot.h index a0c1e25f..d35d19a2 100644 --- a/lib/scatter_plot.h +++ b/lib/scatter_plot.h @@ -27,6 +27,7 @@ #include #include #include +#include namespace gr { namespace radar { diff --git a/python/radar/CMakeLists.txt b/python/radar/CMakeLists.txt index de4dede2..7459a05c 100644 --- a/python/radar/CMakeLists.txt +++ b/python/radar/CMakeLists.txt @@ -31,7 +31,7 @@ GR_PYTHON_INSTALL( include(GrTest) set(GR_TEST_TARGET_DEPS gnuradio-radar) -set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}) +#set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}) # Create a package directory that tests can import. It includes everything # from `python/`. diff --git a/python/radar/__init__.py b/python/radar/__init__.py index 57e4216c..5b9ac5fd 100644 --- a/python/radar/__init__.py +++ b/python/radar/__init__.py @@ -27,9 +27,8 @@ # import pybind11 generated symbols into the radar namespace try: # this might fail if the module is python-only - from .bindings.radar_python import * -except ModuleNotFoundError: from .radar_python import * +except ModuleNotFoundError: pass # import any pure python here diff --git a/python/radar/bindings/CMakeLists.txt b/python/radar/bindings/CMakeLists.txt index 686b3fcb..919fa4ae 100644 --- a/python/radar/bindings/CMakeLists.txt +++ b/python/radar/bindings/CMakeLists.txt @@ -1,3 +1,11 @@ +######################################################################## +# Check if there is C++ code at all +######################################################################## +if(NOT radar_sources) + MESSAGE(STATUS "No C++ sources... skipping python bindings") + return() +endif(NOT radar_sources) + ######################################################################## # Check for pygccxml ######################################################################## diff --git a/python/radar/bindings/bind_oot_file.py b/python/radar/bindings/bind_oot_file.py new file mode 100644 index 00000000..5bc3ff63 --- /dev/null +++ b/python/radar/bindings/bind_oot_file.py @@ -0,0 +1,58 @@ +import warnings +import argparse +import os +from gnuradio.bindtool import BindingGenerator +import pathlib +import sys +import tempfile + +parser = argparse.ArgumentParser(description='Bind a GR Out of Tree Block') +parser.add_argument('--module', type=str, + help='Name of gr module containing file to bind (e.g. fft digital analog)') + +parser.add_argument('--output_dir', default=tempfile.gettempdir(), + help='Output directory of generated bindings') +parser.add_argument('--prefix', help='Prefix of Installed GNU Radio') +parser.add_argument('--src', help='Directory of gnuradio source tree', + default=os.path.dirname(os.path.abspath(__file__)) + '/../../..') + +parser.add_argument( + '--filename', help="File to be parsed") + +parser.add_argument( + '--defines', help='Set additional defines for precompiler', default=(), nargs='*') +parser.add_argument( + '--include', help='Additional Include Dirs, separated', default=(), nargs='*') + +parser.add_argument( + '--status', help='Location of output file for general status (used during cmake)', default=None +) +parser.add_argument( + '--flag_automatic', default='0' +) +parser.add_argument( + '--flag_pygccxml', default='0' +) + +args = parser.parse_args() + +prefix = args.prefix +output_dir = args.output_dir +defines = tuple(','.join(args.defines).split(',')) +includes = ','.join(args.include) +name = args.module + +namespace = ['gr', name] +prefix_include_root = name + + +with warnings.catch_warnings(): + warnings.filterwarnings("ignore", category=DeprecationWarning) + + bg = BindingGenerator(prefix, namespace, + prefix_include_root, output_dir, define_symbols=defines, addl_includes=includes, + catch_exceptions=False, write_json_output=False, status_output=args.status, + flag_automatic=True if args.flag_automatic.lower() in [ + '1', 'true'] else False, + flag_pygccxml=True if args.flag_pygccxml.lower() in ['1', 'true'] else False) + bg.gen_file_binding(args.filename) diff --git a/python/radar/bindings/python_bindings.cc b/python/radar/bindings/python_bindings.cc index 62ee3fc1..2d2e89c5 100644 --- a/python/radar/bindings/python_bindings.cc +++ b/python/radar/bindings/python_bindings.cc @@ -15,36 +15,44 @@ namespace py = pybind11; -void bind_crop_matrix_vcvc(py::module&); -void bind_estimator_cw(py::module&); -void bind_estimator_fmcw(py::module&); -void bind_estimator_fsk(py::module&); -void bind_estimator_ofdm(py::module&); -void bind_estimator_rcs(py::module&); -void bind_estimator_sync_pulse_c(py::module&); -void bind_find_max_peak_c(py::module&); -void bind_msg_gate(py::module&); -void bind_msg_manipulator(py::module&); -void bind_ofdm_cyclic_prefix_remover_cvc(py::module&); -void bind_ofdm_divide_vcvc(py::module&); -void bind_os_cfar_2d_vc(py::module&); -void bind_os_cfar_c(py::module&); -void bind_print_results(py::module&); -void bind_qtgui_scatter_plot(py::module&); -void bind_qtgui_spectrogram_plot(py::module&); -void bind_qtgui_time_plot(py::module&); -void bind_signal_generator_cw_c(py::module&); -void bind_signal_generator_fmcw_c(py::module&); -void bind_signal_generator_fsk_c(py::module&); -void bind_signal_generator_sync_pulse_c(py::module&); -void bind_split_cc(py::module&); -void bind_split_fsk_cc(py::module&); -void bind_static_target_simulator_cc(py::module&); -void bind_tracking_singletarget(py::module&); -void bind_transpose_matrix_vcvc(py::module&); -void bind_trigger_command(py::module&); -void bind_ts_fft_cc(py::module&); -void bind_usrp_echotimer_cc(py::module&); +// Headers for binding functions +/**************************************/ +// The following comment block is used for +// gr_modtool to insert function prototypes +// Please do not delete +/**************************************/ +// BINDING_FUNCTION_PROTOTYPES( +void bind_crop_matrix_vcvc(py::module& m); +void bind_estimator_cw(py::module& m); +void bind_estimator_fmcw(py::module& m); +void bind_estimator_fsk(py::module& m); +void bind_estimator_ofdm(py::module& m); +void bind_estimator_rcs(py::module& m); +void bind_estimator_sync_pulse_c(py::module& m); +void bind_find_max_peak_c(py::module& m); +void bind_msg_gate(py::module& m); +void bind_msg_manipulator(py::module& m); +void bind_ofdm_cyclic_prefix_remover_cvc(py::module& m); +void bind_ofdm_divide_vcvc(py::module& m); +void bind_os_cfar_2d_vc(py::module& m); +void bind_os_cfar_c(py::module& m); +void bind_print_results(py::module& m); +void bind_qtgui_scatter_plot(py::module& m); +void bind_qtgui_spectrogram_plot(py::module& m); +void bind_qtgui_time_plot(py::module& m); +void bind_signal_generator_cw_c(py::module& m); +void bind_signal_generator_fmcw_c(py::module& m); +void bind_signal_generator_fsk_c(py::module& m); +void bind_signal_generator_sync_pulse_c(py::module& m); +void bind_split_cc(py::module& m); +void bind_split_fsk_cc(py::module& m); +void bind_static_target_simulator_cc(py::module& m); +void bind_tracking_singletarget(py::module& m); +void bind_transpose_matrix_vcvc(py::module& m); +void bind_trigger_command(py::module& m); +void bind_ts_fft_cc(py::module& m); +void bind_usrp_echotimer_cc(py::module& m); +// ) END BINDING_FUNCTION_PROTOTYPES // We need this hack because import_array() returns NULL // for newer Python versions.