From e6b1c71c220a58d721cee0389e93dd8b071fde0e Mon Sep 17 00:00:00 2001 From: Ron Economos Date: Sat, 4 Jul 2020 00:56:43 -0700 Subject: [PATCH] Update for GNU Radio 3.8 --- CMakeLists.txt | 148 +- README | 5 +- apps/CMakeLists.txt | 3 +- apps/dvbs2_rxip.grc | 2226 +++------- apps/dvbs2_txip.grc | 3944 ++++------------- cmake/Modules/CMakeParseArgumentsCopy.cmake | 2 +- cmake/Modules/FindCppUnit.cmake | 39 - cmake/Modules/FindGnuradioRuntime.cmake | 36 - cmake/Modules/GrMiscUtils.cmake | 528 --- cmake/Modules/GrPlatform.cmake | 62 - cmake/Modules/GrPython.cmake | 241 - cmake/Modules/GrSwig.cmake | 251 -- cmake/Modules/GrTest.cmake | 143 - cmake/Modules/UseSWIG.cmake | 304 -- cmake/Modules/dvbgseConfig.cmake | 5 +- .../Modules/targetConfig.cmake.in | 40 +- docs/CMakeLists.txt | 3 +- docs/doxygen/CMakeLists.txt | 3 +- docs/doxygen/Doxyfile.in | 10 +- docs/doxygen/Doxyfile.swig_doc.in | 8 +- docs/doxygen/doxyxml/__init__.py | 6 +- docs/doxygen/doxyxml/base.py | 21 +- docs/doxygen/doxyxml/doxyindex.py | 11 +- docs/doxygen/doxyxml/generated/__init__.py | 1 + docs/doxygen/doxyxml/generated/compound.py | 8 +- .../doxyxml/generated/compoundsuper.py | 40 +- docs/doxygen/doxyxml/generated/index.py | 6 +- docs/doxygen/doxyxml/generated/indexsuper.py | 21 +- docs/doxygen/doxyxml/text.py | 8 +- docs/doxygen/swig_doc.py | 26 +- grc/CMakeLists.txt | 7 +- grc/dvbgse_bbheader_sink.block.yml | 122 + grc/dvbgse_bbheader_sink.xml | 515 --- grc/dvbgse_bbheader_source.block.yml | 175 + grc/dvbgse_bbheader_source.xml | 629 --- include/dvbgse/CMakeLists.txt | 4 +- include/dvbgse/api.h | 7 +- lib/CMakeLists.txt | 65 +- lib/qa_bbheader_sink.cc | 38 + lib/qa_bbheader_source.cc | 38 + lib/qa_dvbgse.cc | 36 - lib/qa_dvbgse.h | 38 - lib/test_dvbgse.cc | 48 - python/CMakeLists.txt | 3 +- python/__init__.py | 7 +- python/build_utils.py | 226 - python/qa_bbheader_sink.py | 26 +- python/qa_bbheader_source.py | 26 +- swig/CMakeLists.txt | 15 +- swig/dvbgse_swig.i | 3 +- 50 files changed, 1966 insertions(+), 8211 deletions(-) delete mode 100644 cmake/Modules/FindCppUnit.cmake delete mode 100644 cmake/Modules/FindGnuradioRuntime.cmake delete mode 100644 cmake/Modules/GrMiscUtils.cmake delete mode 100644 cmake/Modules/GrPlatform.cmake delete mode 100644 cmake/Modules/GrPython.cmake delete mode 100644 cmake/Modules/GrSwig.cmake delete mode 100644 cmake/Modules/GrTest.cmake delete mode 100644 cmake/Modules/UseSWIG.cmake rename python/build_utils_codes.py => cmake/Modules/targetConfig.cmake.in (52%) create mode 100644 grc/dvbgse_bbheader_sink.block.yml delete mode 100644 grc/dvbgse_bbheader_sink.xml create mode 100644 grc/dvbgse_bbheader_source.block.yml delete mode 100644 grc/dvbgse_bbheader_source.xml create mode 100644 lib/qa_bbheader_sink.cc create mode 100644 lib/qa_bbheader_source.cc delete mode 100644 lib/qa_dvbgse.cc delete mode 100644 lib/qa_dvbgse.h delete mode 100644 lib/test_dvbgse.cc delete mode 100644 python/build_utils.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 16b09e4..6d061b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ -# Copyright 2011,2012,2014,2016 Free Software Foundation, Inc. +# Copyright 2011,2012,2014,2016,2018 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,94 +21,85 @@ ######################################################################## # Project setup ######################################################################## -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.8) project(gr-dvbgse CXX C) enable_testing() -#install to PyBOMBS target prefix if defined +# Install to PyBOMBS target prefix if defined if(DEFINED ENV{PYBOMBS_PREFIX}) set(CMAKE_INSTALL_PREFIX $ENV{PYBOMBS_PREFIX}) message(STATUS "PyBOMBS installed GNU Radio. Setting CMAKE_INSTALL_PREFIX to $ENV{PYBOMBS_PREFIX}") endif() -#select the release build type by default to get optimization flags +# Select the release build type by default to get optimization flags if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") message(STATUS "Build type not specified: defaulting to release.") endif(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") -#make sure our local CMake Modules path comes first +# Make sure our local CMake Modules path comes first list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) # Set the version information here -set(VERSION_INFO_MAJOR_VERSION 1) -set(VERSION_INFO_API_COMPAT 0) -set(VERSION_INFO_MINOR_VERSION 0) -set(VERSION_INFO_MAINT_VERSION git) +set(VERSION_MAJOR 1) +set(VERSION_API 0) +set(VERSION_ABI 0) +set(VERSION_PATCH git) -# Set cmake policies. -# This will suppress developer warnings during the cmake process that can occur -# if a newer cmake version than the minimum is used. +cmake_policy(SET CMP0011 NEW) -if(POLICY CMP0026) - cmake_policy(SET CMP0026 OLD) -endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() -if(POLICY CMP0045) - cmake_policy(SET CMP0045 OLD) -endif() -if(POLICY CMP0046) - cmake_policy(SET CMP0046 OLD) -endif() +# Enable generation of compile_commands.json for code completion engines +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) ######################################################################## # Compiler specific setup ######################################################################## -if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) +if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR + CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + AND NOT WIN32) #http://gcc.gnu.org/wiki/Visibility add_definitions(-fvisibility=hidden) endif() -######################################################################## -# Find boost -######################################################################## -if(UNIX AND EXISTS "/usr/lib64") - list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix -endif(UNIX AND EXISTS "/usr/lib64") -set(Boost_ADDITIONAL_VERSIONS - "1.35.0" "1.35" "1.36.0" "1.36" "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39" - "1.40.0" "1.40" "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" - "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49" - "1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54" - "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59" - "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64" - "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69" -) -find_package(Boost "1.35" COMPONENTS filesystem system) - -if(NOT Boost_FOUND) - message(FATAL_ERROR "Boost required to compile dvbgse") -endif() +IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + SET(CMAKE_CXX_STANDARD 11) +ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + SET(CMAKE_CXX_STANDARD 11) +ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + SET(CMAKE_CXX_STANDARD 11) +ELSE() + message(WARNING "C++ standard could not be set because compiler is not GNU, Clang or MSVC.") +ENDIF() + +IF(CMAKE_C_COMPILER_ID STREQUAL "GNU") + SET(CMAKE_C_STANDARD 11) +ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Clang") + SET(CMAKE_C_STANDARD 11) +ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "MSVC") + SET(CMAKE_C_STANDARD 11) +ELSE() + message(WARNING "C standard could not be set because compiler is not GNU, Clang or MSVC.") +ENDIF() ######################################################################## # Install directories ######################################################################## +find_package(Gnuradio "3.8" REQUIRED) +include(GrVersion) + include(GrPlatform) #define LIB_SUFFIX -set(GR_RUNTIME_DIR bin) -set(GR_LIBRARY_DIR lib${LIB_SUFFIX}) + +if(NOT CMAKE_MODULES_DIR) + set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake) +endif(NOT CMAKE_MODULES_DIR) + set(GR_INCLUDE_DIR include/dvbgse) -set(GR_DATA_DIR share) +set(GR_CMAKE_DIR ${CMAKE_MODULES_DIR}/dvbgse) set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME}) -set(GR_DOC_DIR ${GR_DATA_DIR}/doc) set(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}) -set(GR_CONF_DIR etc) set(GR_PKG_CONF_DIR ${GR_CONF_DIR}/${CMAKE_PROJECT_NAME}/conf.d) -set(GR_LIBEXEC_DIR libexec) set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME}) -set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks) ######################################################################## # On Apple only, set install name and use rpath correctly, if not already set @@ -132,22 +124,9 @@ endif(APPLE) ######################################################################## # Find gnuradio build dependencies ######################################################################## -find_package(CppUnit) find_package(Doxygen) find_package(Pcap) -# Search for GNU Radio and its components and versions. Add any -# components required to the list of GR_REQUIRED_COMPONENTS (in all -# caps such as FILTER or FFT) and change the version to the minimum -# API compatible version required. -set(GR_REQUIRED_COMPONENTS RUNTIME) -find_package(Gnuradio "3.7.2" REQUIRED) -list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) -include(GrVersion) - -if(NOT CPPUNIT_FOUND) - message(FATAL_ERROR "CppUnit required to compile dvbgse") -endif() if(NOT PCAP_FOUND) message(FATAL_ERROR "Pcap required to compile dvbgse") endif() @@ -156,34 +135,11 @@ endif() # Setup doxygen option ######################################################################## if(DOXYGEN_FOUND) - option(ENABLE_DOXYGEN "Build docs using Doxygen" ON) + option(ENABLE_DOXYGEN "Build docs using Doxygen" ON) else(DOXYGEN_FOUND) - option(ENABLE_DOXYGEN "Build docs using Doxygen" OFF) + option(ENABLE_DOXYGEN "Build docs using Doxygen" OFF) endif(DOXYGEN_FOUND) -######################################################################## -# Setup the include and linker paths -######################################################################## -include_directories( - ${CMAKE_SOURCE_DIR}/lib - ${CMAKE_SOURCE_DIR}/include - ${CMAKE_BINARY_DIR}/lib - ${CMAKE_BINARY_DIR}/include - ${Boost_INCLUDE_DIRS} - ${CPPUNIT_INCLUDE_DIRS} - ${GNURADIO_ALL_INCLUDE_DIRS} -) - -link_directories( - ${Boost_LIBRARY_DIRS} - ${CPPUNIT_LIBRARY_DIRS} - ${GNURADIO_RUNTIME_LIBRARY_DIRS} -) - -# Set component parameters -set(GR_DVBGSE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "" FORCE) -set(GR_DVBGSE_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/swig CACHE INTERNAL "" FORCE) - ######################################################################## # Create uninstall target ######################################################################## @@ -194,25 +150,23 @@ configure_file( add_custom_target(uninstall ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake -) + ) + ######################################################################## # Add subdirectories ######################################################################## add_subdirectory(include/dvbgse) add_subdirectory(lib) +add_subdirectory(apps) +add_subdirectory(docs) add_subdirectory(swig) add_subdirectory(python) add_subdirectory(grc) -add_subdirectory(apps) -add_subdirectory(docs) ######################################################################## # Install cmake search helper for this library ######################################################################## -if(NOT CMAKE_MODULES_DIR) - set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake) -endif(NOT CMAKE_MODULES_DIR) install(FILES cmake/Modules/dvbgseConfig.cmake DESTINATION ${CMAKE_MODULES_DIR}/dvbgse diff --git a/README b/README index ced795c..8204e12 100644 --- a/README +++ b/README @@ -42,9 +42,10 @@ Usage: Because the Pcap library is used to capture raw packets, the capabilities of the Python interpreter need to be increased. This only needs to be -done once. +done once. Note that the specific version of Python 3 on your computer +needs to be specified (for example, python3.8 for Ubuntu 20.04). -sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/python2.7 +sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/python3.x CAUTION: This allows any Python program to open network interfaces. diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index c837d77..28ae4f5 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright 2011 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/apps/dvbs2_rxip.grc b/apps/dvbs2_rxip.grc index 99f299c..60c0eee 100644 --- a/apps/dvbs2_rxip.grc +++ b/apps/dvbs2_rxip.grc @@ -1,1651 +1,575 @@ - - - - Wed Sep 3 03:03:39 2014 - - options - - author - - - - window_size - 1280, 1024 - - - category - Custom - - - comment - - - - description - - - - _enabled - True - - - _coordinate - (8, 12) - - - _rotation - 0 - - - generate_options - qt_gui - - - hier_block_src_path - .: - - - id - dvbs2_rxip - - - max_nouts - 0 - - - qt_qss_theme - - - - realtime_scheduling - - - - run_command - {python} -u {filename} - - - run_options - prompt - - - run - True - - - sizing_mode - fixed - - - thread_safe_setters - - - - title - - - - placement - (0,0) - - - - variable_qtgui_range - - comment - - - - value - 0.2 - - - _enabled - True - - - _coordinate - (8, 208) - - - gui_hint - - - - _rotation - 0 - - - id - noise_power - - - label - - - - min_len - 200 - - - orient - Qt.Horizontal - - - start - 0 - - - step - 0.005 - - - stop - 1.2 - - - rangeType - float - - - widget - counter_slider - - - - variable - - comment - - - - _enabled - True - - - _coordinate - (8, 76) - - - _rotation - 0 - - - id - samp_rate - - - value - symbol_rate * 2 - - - - variable - - comment - - - - _enabled - True - - - _coordinate - (8, 140) - - - _rotation - 0 - - - id - symbol_rate - - - value - 6000000 - - - - analog_fastnoise_source_x - - amp - noise_power - - - alias - - - - comment - - - - affinity - - - - _enabled - True - - - _coordinate - (224, 176) - - - _rotation - 0 - - - id - analog_fastnoise_source_x_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - noise_type - analog.GR_GAUSSIAN - - - type - complex - - - seed - 0 - - - samples - 8192 - - - - blocks_add_xx - - alias - - - - comment - - - - affinity - - - - _enabled - True - - - _coordinate - (528, 288) - - - _rotation - 0 - - - id - blocks_add_xx_0 - - - type - complex - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - num_inputs - 2 - - - vlen - 1 - - - - blocks_file_sink - - append - False - - - alias - - - - comment - - - - affinity - - - - _enabled - 0 - - - file - decoded.bin - - - _coordinate - (1016, 548) - - - _rotation - 0 - - - id - blocks_file_sink_0 - - - type - byte - - - unbuffered - False - - - vlen - 1 - - - - blocks_pack_k_bits_bb - - alias - - - - comment - - - - affinity - - - - _enabled - 0 - - - _coordinate - (808, 564) - - - _rotation - 0 - - - id - blocks_pack_k_bits_bb_0 - - - k - 8 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - - blocks_throttle - - alias - - - - comment - - - - affinity - - - - _enabled - 1 - - - _coordinate - (744, 300) - - - _rotation - 0 - - - id - blocks_throttle_0_0 - - - ignoretag - True - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - samples_per_second - samp_rate - - - type - complex - - - vlen - 1 - - - - dtv_dvb_bbscrambler_bb - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C2_3 - - - rate4 - C1_5_MEDIUM - - - rate5 - C1_4 - - - comment - - - - affinity - - - - _enabled - True - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (536, 36) - - - _rotation - 0 - - - id - dtv_dvb_bbscrambler_bb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - standard - STANDARD_DVBS2 - - - - dtv_dvb_bch_bb - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C2_3 - - - rate4 - C1_5_MEDIUM - - - rate5 - C1_4 - - - comment - - - - affinity - - - - _enabled - True - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (848, 36) - - - _rotation - 0 - - - id - dtv_dvb_bch_bb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - standard - STANDARD_DVBS2 - - - - dtv_dvb_ldpc_bb - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C2_3 - - - rate4 - C1_5_MEDIUM - - - rate5 - C1_4 - - - comment - - - - constellation - MOD_OTHER - - - affinity - - - - _enabled - True - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (1064, 32) - - - _rotation - 0 - - - id - dtv_dvb_ldpc_bb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - standard - STANDARD_DVBS2 - - - - dtv_dvbs2_interleaver_bb - - alias - - - - rate1 - C2_3 - - - rate2 - C1_5_MEDIUM - - - rate3 - C1_4 - - - comment - - - - constellation - MOD_8PSK - - - affinity - - - - _enabled - True - - - framesize - FECFRAME_SHORT - - - _coordinate - (560, 124) - - - _rotation - 180 - - - id - dtv_dvbs2_interleaver_bb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - - dtv_dvbs2_modulator_bc - - interpolation - INTERPOLATION_OFF - - - alias - - - - rate1 - C2_3 - - - rate2 - C1_5_MEDIUM - - - rate3 - C1_4 - - - comment - - - - constellation - MOD_8PSK - - - affinity - - - - _enabled - True - - - framesize - FECFRAME_SHORT - - - _coordinate - (224, 296) - - - _rotation - 0 - - - id - dtv_dvbs2_modulator_bc_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - - dvbgse_bbheader_sink - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C2_3 - - - rate4 - C1_5_MEDIUM - - - rate5 - C1_4 - - - comment - - - - affinity - - - - _enabled - 1 - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (1016, 464) - - - _rotation - 0 - - - id - dvbgse_bbheader_sink_0 - - - mac_address - 02:00:48:55:4c:55 - - - standard - STANDARD_DVBS2 - - - - dvbgse_bbheader_source - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C2_3 - - - rate4 - C1_5_MEDIUM - - - rate5 - C1_4 - - - comment - - - - affinity - - - - dst_address - - - - _enabled - True - - - fecblocks - 168 - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (208, 8) - - - _rotation - 0 - - - id - dvbgse_bbheader_source_0 - - - inband - INBAND_OFF - - - mac_address - 02:00:48:55:4c:55 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - ping_reply - PING_REPLY_ON - - - rolloff - RO_0_20 - - - src_address - - - - standard - STANDARD_DVBS2 - - - tsrate - 4000000 - - - ipaddr_spoof - IPADDR_SPOOF_OFF - - - - dvbs2rx_bbdescrambler_bb - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C2_3 - - - rate4 - C1_5_MEDIUM - - - rate5 - C1_4 - - - comment - - - - affinity - - - - _enabled - True - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (504, 468) - - - _rotation - 0 - - - id - dvbs2rx_bbdescrambler_bb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - standard - STANDARD_DVBS2 - - - - dvbs2rx_bch_decoder_bb - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C2_3 - - - rate4 - C1_5_MEDIUM - - - rate5 - C1_4 - - - comment - - - - affinity - - - - _enabled - True - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (224, 464) - - - _rotation - 0 - - - id - dvbs2rx_bch_decoder_bb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - outputmode - OM_MESSAGE - - - standard - STANDARD_DVBS2 - - - - dvbs2rx_ldpc_decoder_cb - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C2_3 - - - rate4 - C1_5_MEDIUM - - - rate5 - C1_4 - - - comment - - - - constellation1 - MOD_QPSK - - - constellation2 - MOD_8PSK - - - affinity - - - - _enabled - True - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (1008, 264) - - - _rotation - 0 - - - id - dvbs2rx_ldpc_decoder_cb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - outputmode - OM_MESSAGE - - - infomode - INFO_OFF - - - standard - STANDARD_DVBS2 - - - - qtgui_const_sink_x - - autoscale - False - - - axislabels - True - - - alias - - - - comment - - - - affinity - - - - _enabled - True - - - _coordinate - (744, 196) - - - gui_hint - - - - _rotation - 0 - - - grid - False - - - id - qtgui_const_sink_x_0 - - - legend - True - - - alpha1 - 1.0 - - - color1 - "blue" - - - label1 - - - - marker1 - 0 - - - style1 - 0 - - - width1 - 1 - - - alpha10 - 1.0 - - - color10 - "red" - - - label10 - - - - marker10 - 0 - - - style10 - 0 - - - width10 - 1 - - - alpha2 - 1.0 - - - color2 - "red" - - - label2 - - - - marker2 - 0 - - - style2 - 0 - - - width2 - 1 - - - alpha3 - 1.0 - - - color3 - "red" - - - label3 - - - - marker3 - 0 - - - style3 - 0 - - - width3 - 1 - - - alpha4 - 1.0 - - - color4 - "red" - - - label4 - - - - marker4 - 0 - - - style4 - 0 - - - width4 - 1 - - - alpha5 - 1.0 - - - color5 - "red" - - - label5 - - - - marker5 - 0 - - - style5 - 0 - - - width5 - 1 - - - alpha6 - 1.0 - - - color6 - "red" - - - label6 - - - - marker6 - 0 - - - style6 - 0 - - - width6 - 1 - - - alpha7 - 1.0 - - - color7 - "red" - - - label7 - - - - marker7 - 0 - - - style7 - 0 - - - width7 - 1 - - - alpha8 - 1.0 - - - color8 - "red" - - - label8 - - - - marker8 - 0 - - - style8 - 0 - - - width8 - 1 - - - alpha9 - 1.0 - - - color9 - "red" - - - label9 - - - - marker9 - 0 - - - style9 - 0 - - - width9 - 1 - - - name - "" - - - nconnections - 1 - - - size - 1024 - - - tr_chan - 0 - - - tr_level - 0.0 - - - tr_mode - qtgui.TRIG_MODE_FREE - - - tr_slope - qtgui.TRIG_SLOPE_POS - - - tr_tag - "" - - - type - complex - - - update_time - 0.10 - - - xmax - 2 - - - xmin - -2 - - - ymax - 2 - - - ymin - -2 - - - - analog_fastnoise_source_x_0 - blocks_add_xx_0 - 0 - 0 - - - blocks_add_xx_0 - blocks_throttle_0_0 - 0 - 0 - - - blocks_add_xx_0 - qtgui_const_sink_x_0 - 0 - 0 - - - blocks_pack_k_bits_bb_0 - blocks_file_sink_0 - 0 - 0 - - - blocks_throttle_0_0 - dvbs2rx_ldpc_decoder_cb_0 - 0 - 0 - - - dtv_dvb_bbscrambler_bb_0 - dtv_dvb_bch_bb_0 - 0 - 0 - - - dtv_dvb_bch_bb_0 - dtv_dvb_ldpc_bb_0 - 0 - 0 - - - dtv_dvb_ldpc_bb_0 - dtv_dvbs2_interleaver_bb_0 - 0 - 0 - - - dtv_dvbs2_interleaver_bb_0 - dtv_dvbs2_modulator_bc_0 - 0 - 0 - - - dtv_dvbs2_modulator_bc_0 - blocks_add_xx_0 - 0 - 1 - - - dvbgse_bbheader_source_0 - dtv_dvb_bbscrambler_bb_0 - 0 - 0 - - - dvbs2rx_bbdescrambler_bb_0 - blocks_pack_k_bits_bb_0 - 0 - 0 - - - dvbs2rx_bbdescrambler_bb_0 - dvbgse_bbheader_sink_0 - 0 - 0 - - - dvbs2rx_bch_decoder_bb_0 - dvbs2rx_bbdescrambler_bb_0 - 0 - 0 - - - dvbs2rx_ldpc_decoder_cb_0 - dvbs2rx_bch_decoder_bb_0 - 0 - 0 - - +options: + parameters: + author: '' + category: Custom + cmake_opt: '' + comment: '' + copyright: '' + description: '' + gen_cmake: 'On' + gen_linking: dynamic + generate_options: qt_gui + hier_block_src_path: '.:' + id: dvbs2_rxip + max_nouts: '0' + output_language: python + placement: (0,0) + qt_qss_theme: '' + realtime_scheduling: '' + run: 'True' + run_command: '{python} -u {filename}' + run_options: prompt + sizing_mode: fixed + thread_safe_setters: '' + title: '' + window_size: 1280, 1024 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 12] + rotation: 0 + state: enabled + +blocks: +- name: noise_power + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: '' + label: '' + min_len: '200' + orient: Qt.Horizontal + rangeType: float + start: '0' + step: '0.005' + stop: '1.2' + value: '0.2' + widget: counter_slider + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 208] + rotation: 0 + state: enabled +- name: samp_rate + id: variable + parameters: + comment: '' + value: symbol_rate * 2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 76] + rotation: 0 + state: enabled +- name: symbol_rate + id: variable + parameters: + comment: '' + value: '6000000' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 140] + rotation: 0 + state: enabled +- name: analog_fastnoise_source_x_0 + id: analog_fastnoise_source_x + parameters: + affinity: '' + alias: '' + amp: noise_power + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + noise_type: analog.GR_GAUSSIAN + samples: '8192' + seed: '0' + type: complex + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [224, 164.0] + rotation: 0 + state: enabled +- name: blocks_add_xx_0 + id: blocks_add_xx + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + num_inputs: '2' + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [528, 256.0] + rotation: 0 + state: enabled +- name: blocks_file_sink_0 + id: blocks_file_sink + parameters: + affinity: '' + alias: '' + append: 'False' + comment: '' + file: decoded.bin + type: byte + unbuffered: 'False' + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1024, 524.0] + rotation: 0 + state: disabled +- name: blocks_pack_k_bits_bb_0 + id: blocks_pack_k_bits_bb + parameters: + affinity: '' + alias: '' + comment: '' + k: '8' + maxoutbuf: '0' + minoutbuf: '0' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [808, 540.0] + rotation: 0 + state: disabled +- name: blocks_throttle_0_0 + id: blocks_throttle + parameters: + affinity: '' + alias: '' + comment: '' + ignoretag: 'True' + maxoutbuf: '0' + minoutbuf: '0' + samples_per_second: samp_rate + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [768, 268.0] + rotation: 0 + state: enabled +- name: dtv_dvb_bbscrambler_bb_0 + id: dtv_dvb_bbscrambler_bb + parameters: + affinity: '' + alias: '' + comment: '' + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + maxoutbuf: '0' + minoutbuf: '0' + rate1: C1_2 + rate2: C1_3 + rate3: C2_3 + rate4: C1_5_MEDIUM + rate5: C1_4 + standard: STANDARD_DVBS2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [528, 44.0] + rotation: 0 + state: enabled +- name: dtv_dvb_bch_bb_0 + id: dtv_dvb_bch_bb + parameters: + affinity: '' + alias: '' + comment: '' + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + maxoutbuf: '0' + minoutbuf: '0' + rate1: C1_2 + rate2: C1_3 + rate3: C2_3 + rate4: C1_5_MEDIUM + rate5: C1_4 + standard: STANDARD_DVBS2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [776, 44.0] + rotation: 0 + state: enabled +- name: dtv_dvb_ldpc_bb_0 + id: dtv_dvb_ldpc_bb + parameters: + affinity: '' + alias: '' + comment: '' + constellation: MOD_OTHER + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + maxoutbuf: '0' + minoutbuf: '0' + rate1: C1_2 + rate2: C1_3 + rate3: C2_3 + rate4: C1_5_MEDIUM + rate5: C1_4 + standard: STANDARD_DVBS2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1064, 36.0] + rotation: 0 + state: enabled +- name: dtv_dvbs2_interleaver_bb_0 + id: dtv_dvbs2_interleaver_bb + parameters: + affinity: '' + alias: '' + comment: '' + constellation: MOD_8PSK + framesize: FECFRAME_SHORT + maxoutbuf: '0' + minoutbuf: '0' + rate1: C2_3 + rate2: C1_5_MEDIUM + rate3: C1_4 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1064, 132.0] + rotation: 180 + state: enabled +- name: dtv_dvbs2_modulator_bc_0 + id: dtv_dvbs2_modulator_bc + parameters: + affinity: '' + alias: '' + comment: '' + constellation: MOD_8PSK + framesize: FECFRAME_SHORT + interpolation: INTERPOLATION_OFF + maxoutbuf: '0' + minoutbuf: '0' + rate1: C2_3 + rate2: C1_5_MEDIUM + rate3: C1_4 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [224, 308.0] + rotation: 0 + state: enabled +- name: dvbgse_bbheader_sink_0 + id: dvbgse_bbheader_sink + parameters: + affinity: '' + alias: '' + comment: '' + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + mac_address: 02:00:48:55:4c:55 + rate1: C1_2 + rate2: C1_3 + rate3: C2_3 + rate4: C1_5_MEDIUM + rate5: C1_4 + standard: STANDARD_DVBS2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1024, 420.0] + rotation: 0 + state: enabled +- name: dvbgse_bbheader_source_0 + id: dvbgse_bbheader_source + parameters: + affinity: '' + alias: '' + comment: '' + dst_address: '' + fecblocks: '168' + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + inband: INBAND_OFF + ipaddr_spoof: IPADDR_SPOOF_OFF + mac_address: 02:00:48:55:4c:55 + maxoutbuf: '0' + minoutbuf: '0' + ping_reply: PING_REPLY_ON + rate1: C1_2 + rate2: C1_3 + rate3: C2_3 + rate4: C1_5_MEDIUM + rate5: C1_4 + rolloff: RO_0_20 + src_address: '' + standard: STANDARD_DVBS2 + tsrate: '4000000' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [208, 12.0] + rotation: 0 + state: enabled +- name: dvbs2rx_bbdescrambler_bb_0 + id: dvbs2rx_bbdescrambler_bb + parameters: + affinity: '' + alias: '' + comment: '' + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + maxoutbuf: '0' + minoutbuf: '0' + rate1: C1_2 + rate2: C1_3 + rate3: C2_3 + rate4: C1_5_MEDIUM + rate5: C1_4 + standard: STANDARD_DVBS2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [528, 428.0] + rotation: 0 + state: enabled +- name: dvbs2rx_bch_decoder_bb_0 + id: dvbs2rx_bch_decoder_bb + parameters: + affinity: '' + alias: '' + comment: '' + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + maxoutbuf: '0' + minoutbuf: '0' + outputmode: OM_MESSAGE + rate1: C1_2 + rate2: C1_3 + rate3: C2_3 + rate4: C1_5_MEDIUM + rate5: C1_4 + standard: STANDARD_DVBS2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [224, 420.0] + rotation: 0 + state: enabled +- name: dvbs2rx_ldpc_decoder_cb_0 + id: dvbs2rx_ldpc_decoder_cb + parameters: + affinity: '' + alias: '' + comment: '' + constellation1: MOD_QPSK + constellation2: MOD_8PSK + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + infomode: INFO_OFF + maxoutbuf: '0' + minoutbuf: '0' + outputmode: OM_MESSAGE + rate1: C1_2 + rate2: C1_3 + rate3: C2_3 + rate4: C1_5_MEDIUM + rate5: C1_4 + standard: STANDARD_DVBS2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1048, 228.0] + rotation: 0 + state: enabled +- name: qtgui_const_sink_x_0 + id: qtgui_const_sink_x + parameters: + affinity: '' + alias: '' + alpha1: '1.0' + alpha10: '1.0' + alpha2: '1.0' + alpha3: '1.0' + alpha4: '1.0' + alpha5: '1.0' + alpha6: '1.0' + alpha7: '1.0' + alpha8: '1.0' + alpha9: '1.0' + autoscale: 'False' + axislabels: 'True' + color1: '"blue"' + color10: '"red"' + color2: '"red"' + color3: '"red"' + color4: '"red"' + color5: '"red"' + color6: '"red"' + color7: '"red"' + color8: '"red"' + color9: '"red"' + comment: '' + grid: 'False' + gui_hint: '' + label1: '' + label10: '' + label2: '' + label3: '' + label4: '' + label5: '' + label6: '' + label7: '' + label8: '' + label9: '' + legend: 'True' + marker1: '0' + marker10: '0' + marker2: '0' + marker3: '0' + marker4: '0' + marker5: '0' + marker6: '0' + marker7: '0' + marker8: '0' + marker9: '0' + name: '""' + nconnections: '1' + size: '1024' + style1: '0' + style10: '0' + style2: '0' + style3: '0' + style4: '0' + style5: '0' + style6: '0' + style7: '0' + style8: '0' + style9: '0' + tr_chan: '0' + tr_level: '0.0' + tr_mode: qtgui.TRIG_MODE_FREE + tr_slope: qtgui.TRIG_SLOPE_POS + tr_tag: '""' + type: complex + update_time: '0.10' + width1: '1' + width10: '1' + width2: '1' + width3: '1' + width4: '1' + width5: '1' + width6: '1' + width7: '1' + width8: '1' + width9: '1' + xmax: '2' + xmin: '-2' + ymax: '2' + ymin: '-2' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [664, 172.0] + rotation: 0 + state: enabled +- name: virtual_sink_0 + id: virtual_sink + parameters: + alias: '' + comment: '' + stream_id: int-mod + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [872, 148.0] + rotation: 180 + state: true +- name: virtual_sink_1 + id: virtual_sink + parameters: + alias: '' + comment: '' + stream_id: '' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1112, 356.0] + rotation: 180 + state: true +- name: virtual_source_0 + id: virtual_source + parameters: + alias: '' + comment: '' + stream_id: int-mod + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [224, 260.0] + rotation: 180 + state: true +- name: virtual_source_1 + id: virtual_source + parameters: + alias: '' + comment: '' + stream_id: '' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [32, 444.0] + rotation: 0 + state: true + +connections: +- [analog_fastnoise_source_x_0, '0', blocks_add_xx_0, '0'] +- [blocks_add_xx_0, '0', blocks_throttle_0_0, '0'] +- [blocks_add_xx_0, '0', qtgui_const_sink_x_0, '0'] +- [blocks_pack_k_bits_bb_0, '0', blocks_file_sink_0, '0'] +- [blocks_throttle_0_0, '0', dvbs2rx_ldpc_decoder_cb_0, '0'] +- [dtv_dvb_bbscrambler_bb_0, '0', dtv_dvb_bch_bb_0, '0'] +- [dtv_dvb_bch_bb_0, '0', dtv_dvb_ldpc_bb_0, '0'] +- [dtv_dvb_ldpc_bb_0, '0', dtv_dvbs2_interleaver_bb_0, '0'] +- [dtv_dvbs2_interleaver_bb_0, '0', virtual_sink_0, '0'] +- [dtv_dvbs2_modulator_bc_0, '0', blocks_add_xx_0, '1'] +- [dvbgse_bbheader_source_0, '0', dtv_dvb_bbscrambler_bb_0, '0'] +- [dvbs2rx_bbdescrambler_bb_0, '0', blocks_pack_k_bits_bb_0, '0'] +- [dvbs2rx_bbdescrambler_bb_0, '0', dvbgse_bbheader_sink_0, '0'] +- [dvbs2rx_bch_decoder_bb_0, '0', dvbs2rx_bbdescrambler_bb_0, '0'] +- [dvbs2rx_ldpc_decoder_cb_0, '0', virtual_sink_1, '0'] +- [virtual_source_0, '0', dtv_dvbs2_modulator_bc_0, '0'] +- [virtual_source_1, '0', dvbs2rx_bch_decoder_bb_0, '0'] + +metadata: + file_format: 1 diff --git a/apps/dvbs2_txip.grc b/apps/dvbs2_txip.grc index be87de4..854c692 100644 --- a/apps/dvbs2_txip.grc +++ b/apps/dvbs2_txip.grc @@ -1,3177 +1,767 @@ - - - - Wed Sep 3 03:03:39 2014 - - options - - author - - - - window_size - 1280, 1024 - - - category - Custom - - - comment - - - - description - - - - _enabled - True - - - _coordinate - (8, 11) - - - _rotation - 0 - - - generate_options - qt_gui - - - hier_block_src_path - .: - - - id - dvbs2_tx - - - max_nouts - 0 - - - qt_qss_theme - - - - realtime_scheduling - - - - run_command - {python} -u {filename} - - - run_options - prompt - - - run - True - - - thread_safe_setters - - - - title - - - - - variable - - comment - - - - _enabled - True - - - _coordinate - (8, 203) - - - _rotation - 0 - - - id - center_freq - - - value - 1280e6 - - - - variable - - comment - - - - _enabled - True - - - _coordinate - (8, 267) - - - _rotation - 0 - - - id - rolloff - - - value - 0.2 - - - - variable - - comment - - - - _enabled - True - - - _coordinate - (8, 75) - - - _rotation - 0 - - - id - samp_rate - - - value - symbol_rate * 2 - - - - variable - - comment - - - - _enabled - True - - - _coordinate - (8, 139) - - - _rotation - 0 - - - id - symbol_rate - - - value - 6000000 - - - - variable - - comment - - - - _enabled - True - - - _coordinate - (8, 331) - - - _rotation - 0 - - - id - taps - - - value - 200 - - - - variable_qtgui_range - - comment - - - - value - 40 - - - _enabled - True - - - _coordinate - (240, 480) - - - gui_hint - - - - _rotation - 0 - - - id - tx_gain - - - label - - - - min_len - 200 - - - orient - Qt.Horizontal - - - start - 0 - - - step - 1 - - - stop - 89 - - - rangeType - float - - - widget - counter_slider - - - - variable_qtgui_range - - comment - - - - value - -8 - - - _enabled - True - - - _coordinate - (8, 480) - - - gui_hint - - - - _rotation - 0 - - - id - vga1_gain - - - label - - - - min_len - 200 - - - orient - Qt.Horizontal - - - start - -35 - - - step - 1 - - - stop - -4 - - - rangeType - int - - - widget - counter_slider - - - - variable_qtgui_range - - comment - - - - value - 10 - - - _enabled - True - - - _coordinate - (120, 480) - - - gui_hint - - - - _rotation - 0 - - - id - vga2_gain - - - label - - - - min_len - 200 - - - orient - Qt.Horizontal - - - start - 0 - - - step - 1 - - - stop - 25 - - - rangeType - int - - - widget - counter_slider - - - - dtv_dvb_bbscrambler_bb - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C5_6 - - - rate4 - C1_5_MEDIUM - - - rate5 - C5_6 - - - comment - - - - affinity - - - - _enabled - True - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (584, 36) - - - _rotation - 0 - - - id - dtv_dvb_bbscrambler_bb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - standard - STANDARD_DVBS2 - - - - dtv_dvb_bch_bb - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C5_6 - - - rate4 - C1_5_MEDIUM - - - rate5 - C5_6 - - - comment - - - - affinity - - - - _enabled - True - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (832, 36) - - - _rotation - 0 - - - id - dtv_dvb_bch_bb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - standard - STANDARD_DVBS2 - - - - dtv_dvb_ldpc_bb - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C5_6 - - - rate4 - C1_5_MEDIUM - - - rate5 - C5_6 - - - comment - - - - constellation - MOD_OTHER - - - affinity - - - - _enabled - True - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (1064, 32) - - - _rotation - 0 - - - id - dtv_dvb_ldpc_bb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - standard - STANDARD_DVBS2 - - - - dtv_dvbs2_interleaver_bb - - alias - - - - rate1 - C5_6 - - - rate2 - C1_5_MEDIUM - - - rate3 - C5_6 - - - comment - - - - constellation - MOD_8PSK - - - affinity - - - - _enabled - True - - - framesize - FECFRAME_SHORT - - - _coordinate - (184, 180) - - - _rotation - 0 - - - id - dtv_dvbs2_interleaver_bb_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - - dtv_dvbs2_modulator_bc - - interpolation - INTERPOLATION_OFF - - - alias - - - - rate1 - C5_6 - - - rate2 - C1_5_MEDIUM - - - rate3 - C5_6 - - - comment - - - - constellation - MOD_8PSK - - - affinity - - - - _enabled - True - - - framesize - FECFRAME_SHORT - - - _coordinate - (448, 176) - - - _rotation - 0 - - - id - dtv_dvbs2_modulator_bc_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - - dtv_dvbs2_physical_cc - - alias - - - - rate1 - C5_6 - - - rate2 - C1_5_MEDIUM - - - rate3 - C5_6 - - - comment - - - - constellation - MOD_8PSK - - - affinity - - - - _enabled - True - - - framesize - FECFRAME_SHORT - - - _coordinate - (184, 320) - - - _rotation - 0 - - - goldcode - 0 - - - id - dtv_dvbs2_physical_cc_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - pilots - PILOTS_ON - - - - dvbgse_bbheader_source - - alias - - - - rate1 - C1_2 - - - rate2 - C1_3 - - - rate3 - C5_6 - - - rate4 - C1_5_MEDIUM - - - rate5 - C5_6 - - - comment - - - - affinity - - - - dst_address - 10.0.1.190 - - - _enabled - True - - - fecblocks - 168 - - - framesize1 - FECFRAME_NORMAL - - - framesize2 - FECFRAME_SHORT - - - _coordinate - (288, 8) - - - _rotation - 0 - - - id - dvbgse_bbheader_source_0 - - - inband - INBAND_OFF - - - mac_address - 02:00:48:55:4c:4b - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - ping_reply - PING_REPLY_ON - - - rolloff - RO_0_20 - - - src_address - 44.0.0.3 - - - standard - STANDARD_DVBS2 - - - tsrate - 4000000 - - - ipaddr_spoof - IPADDR_SPOOF_OFF - - - - fft_filter_xxx - - alias - - - - comment - - - - affinity - - - - decim - 1 - - - _enabled - True - - - _coordinate - (464, 332) - - - _rotation - 0 - - - id - fft_filter_xxx_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - nthreads - 1 - - - samp_delay - 0 - - - taps - firdes.root_raised_cosine(1.0, samp_rate, samp_rate/2, rolloff, taps) - - - type - ccc - - - - osmosdr_sink - - alias - - - - ant0 - - - - bb_gain0 - vga1_gain - - - bw0 - 6000000 - - - corr0 - 0 - - - freq0 - center_freq - - - if_gain0 - 0 - - - gain0 - vga2_gain - - - ant10 - - - - bb_gain10 - 20 - - - bw10 - 0 - - - corr10 - 0 - - - freq10 - 100e6 - - - if_gain10 - 20 - - - gain10 - 10 - - - ant11 - - - - bb_gain11 - 20 - - - bw11 - 0 - - - corr11 - 0 - - - freq11 - 100e6 - - - if_gain11 - 20 - - - gain11 - 10 - - - ant12 - - - - bb_gain12 - 20 - - - bw12 - 0 - - - corr12 - 0 - - - freq12 - 100e6 - - - if_gain12 - 20 - - - gain12 - 10 - - - ant13 - - - - bb_gain13 - 20 - - - bw13 - 0 - - - corr13 - 0 - - - freq13 - 100e6 - - - if_gain13 - 20 - - - gain13 - 10 - - - ant14 - - - - bb_gain14 - 20 - - - bw14 - 0 - - - corr14 - 0 - - - freq14 - 100e6 - - - if_gain14 - 20 - - - gain14 - 10 - - - ant15 - - - - bb_gain15 - 20 - - - bw15 - 0 - - - corr15 - 0 - - - freq15 - 100e6 - - - if_gain15 - 20 - - - gain15 - 10 - - - ant16 - - - - bb_gain16 - 20 - - - bw16 - 0 - - - corr16 - 0 - - - freq16 - 100e6 - - - if_gain16 - 20 - - - gain16 - 10 - - - ant17 - - - - bb_gain17 - 20 - - - bw17 - 0 - - - corr17 - 0 - - - freq17 - 100e6 - - - if_gain17 - 20 - - - gain17 - 10 - - - ant18 - - - - bb_gain18 - 20 - - - bw18 - 0 - - - corr18 - 0 - - - freq18 - 100e6 - - - if_gain18 - 20 - - - gain18 - 10 - - - ant19 - - - - bb_gain19 - 20 - - - bw19 - 0 - - - corr19 - 0 - - - freq19 - 100e6 - - - if_gain19 - 20 - - - gain19 - 10 - - - ant1 - - - - bb_gain1 - 20 - - - bw1 - 0 - - - corr1 - 0 - - - freq1 - 100e6 - - - if_gain1 - 20 - - - gain1 - 10 - - - ant20 - - - - bb_gain20 - 20 - - - bw20 - 0 - - - corr20 - 0 - - - freq20 - 100e6 - - - if_gain20 - 20 - - - gain20 - 10 - - - ant21 - - - - bb_gain21 - 20 - - - bw21 - 0 - - - corr21 - 0 - - - freq21 - 100e6 - - - if_gain21 - 20 - - - gain21 - 10 - - - ant22 - - - - bb_gain22 - 20 - - - bw22 - 0 - - - corr22 - 0 - - - freq22 - 100e6 - - - if_gain22 - 20 - - - gain22 - 10 - - - ant23 - - - - bb_gain23 - 20 - - - bw23 - 0 - - - corr23 - 0 - - - freq23 - 100e6 - - - if_gain23 - 20 - - - gain23 - 10 - - - ant24 - - - - bb_gain24 - 20 - - - bw24 - 0 - - - corr24 - 0 - - - freq24 - 100e6 - - - if_gain24 - 20 - - - gain24 - 10 - - - ant25 - - - - bb_gain25 - 20 - - - bw25 - 0 - - - corr25 - 0 - - - freq25 - 100e6 - - - if_gain25 - 20 - - - gain25 - 10 - - - ant26 - - - - bb_gain26 - 20 - - - bw26 - 0 - - - corr26 - 0 - - - freq26 - 100e6 - - - if_gain26 - 20 - - - gain26 - 10 - - - ant27 - - - - bb_gain27 - 20 - - - bw27 - 0 - - - corr27 - 0 - - - freq27 - 100e6 - - - if_gain27 - 20 - - - gain27 - 10 - - - ant28 - - - - bb_gain28 - 20 - - - bw28 - 0 - - - corr28 - 0 - - - freq28 - 100e6 - - - if_gain28 - 20 - - - gain28 - 10 - - - ant29 - - - - bb_gain29 - 20 - - - bw29 - 0 - - - corr29 - 0 - - - freq29 - 100e6 - - - if_gain29 - 20 - - - gain29 - 10 - - - ant2 - - - - bb_gain2 - 20 - - - bw2 - 0 - - - corr2 - 0 - - - freq2 - 100e6 - - - if_gain2 - 20 - - - gain2 - 10 - - - ant30 - - - - bb_gain30 - 20 - - - bw30 - 0 - - - corr30 - 0 - - - freq30 - 100e6 - - - if_gain30 - 20 - - - gain30 - 10 - - - ant31 - - - - bb_gain31 - 20 - - - bw31 - 0 - - - corr31 - 0 - - - freq31 - 100e6 - - - if_gain31 - 20 - - - gain31 - 10 - - - ant3 - - - - bb_gain3 - 20 - - - bw3 - 0 - - - corr3 - 0 - - - freq3 - 100e6 - - - if_gain3 - 20 - - - gain3 - 10 - - - ant4 - - - - bb_gain4 - 20 - - - bw4 - 0 - - - corr4 - 0 - - - freq4 - 100e6 - - - if_gain4 - 20 - - - gain4 - 10 - - - ant5 - - - - bb_gain5 - 20 - - - bw5 - 0 - - - corr5 - 0 - - - freq5 - 100e6 - - - if_gain5 - 20 - - - gain5 - 10 - - - ant6 - - - - bb_gain6 - 20 - - - bw6 - 0 - - - corr6 - 0 - - - freq6 - 100e6 - - - if_gain6 - 20 - - - gain6 - 10 - - - ant7 - - - - bb_gain7 - 20 - - - bw7 - 0 - - - corr7 - 0 - - - freq7 - 100e6 - - - if_gain7 - 20 - - - gain7 - 10 - - - ant8 - - - - bb_gain8 - 20 - - - bw8 - 0 - - - corr8 - 0 - - - freq8 - 100e6 - - - if_gain8 - 20 - - - gain8 - 10 - - - ant9 - - - - bb_gain9 - 20 - - - bw9 - 0 - - - corr9 - 0 - - - freq9 - 100e6 - - - if_gain9 - 20 - - - gain9 - 10 - - - comment - - - - affinity - - - - args - bladerf=0,buffers=128,buflen=32768 - - - _enabled - 0 - - - _coordinate - (1040, 228) - - - _rotation - 0 - - - id - osmosdr_sink_0 - - - type - fc32 - - - clock_source0 - - - - time_source0 - - - - clock_source1 - - - - time_source1 - - - - clock_source2 - - - - time_source2 - - - - clock_source3 - - - - time_source3 - - - - clock_source4 - - - - time_source4 - - - - clock_source5 - - - - time_source5 - - - - clock_source6 - - - - time_source6 - - - - clock_source7 - - - - time_source7 - - - - nchan - 1 - - - num_mboards - 1 - - - sample_rate - samp_rate - - - sync - - - - - qtgui_freq_sink_x - - autoscale - False - - - average - 0.2 - - - axislabels - True - - - bw - samp_rate - - - alias - - - - fc - center_freq - - - comment - - - - ctrlpanel - False - - - affinity - - - - _enabled - True - - - fftsize - 1024 - - - _coordinate - (776, 204) - - - gui_hint - - - - _rotation - 0 - - - grid - True - - - id - qtgui_freq_sink_x_0 - - - legend - True - - - alpha1 - 1.0 - - - color1 - "blue" - - - label1 - - - - width1 - 1 - - - alpha10 - 1.0 - - - color10 - "dark blue" - - - label10 - - - - width10 - 1 - - - alpha2 - 1.0 - - - color2 - "red" - - - label2 - - - - width2 - 1 - - - alpha3 - 1.0 - - - color3 - "green" - - - label3 - - - - width3 - 1 - - - alpha4 - 1.0 - - - color4 - "black" - - - label4 - - - - width4 - 1 - - - alpha5 - 1.0 - - - color5 - "cyan" - - - label5 - - - - width5 - 1 - - - alpha6 - 1.0 - - - color6 - "magenta" - - - label6 - - - - width6 - 1 - - - alpha7 - 1.0 - - - color7 - "yellow" - - - label7 - - - - width7 - 1 - - - alpha8 - 1.0 - - - color8 - "dark red" - - - label8 - - - - width8 - 1 - - - alpha9 - 1.0 - - - color9 - "dark green" - - - label9 - - - - width9 - 1 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - name - "" - - - nconnections - 1 - - - showports - True - - - freqhalf - True - - - tr_chan - 0 - - - tr_level - 0.0 - - - tr_mode - qtgui.TRIG_MODE_FREE - - - tr_tag - "" - - - type - complex - - - update_time - 0.10 - - - wintype - firdes.WIN_BLACKMAN_hARRIS - - - label - Relative Gain - - - ymax - 10 - - - ymin - -140 - - - units - dB - - - - uhd_usrp_sink - - alias - - - - ant0 - - - - bw0 - 0 - - - center_freq0 - uhd.tune_request(center_freq, ((symbol_rate * (1 + rolloff)) / 2 ) + 1e5) - - - norm_gain0 - False - - - gain0 - tx_gain - - - ant10 - - - - bw10 - 0 - - - center_freq10 - 0 - - - norm_gain10 - False - - - gain10 - 0 - - - ant11 - - - - bw11 - 0 - - - center_freq11 - 0 - - - norm_gain11 - False - - - gain11 - 0 - - - ant12 - - - - bw12 - 0 - - - center_freq12 - 0 - - - norm_gain12 - False - - - gain12 - 0 - - - ant13 - - - - bw13 - 0 - - - center_freq13 - 0 - - - norm_gain13 - False - - - gain13 - 0 - - - ant14 - - - - bw14 - 0 - - - center_freq14 - 0 - - - norm_gain14 - False - - - gain14 - 0 - - - ant15 - - - - bw15 - 0 - - - center_freq15 - 0 - - - norm_gain15 - False - - - gain15 - 0 - - - ant16 - - - - bw16 - 0 - - - center_freq16 - 0 - - - norm_gain16 - False - - - gain16 - 0 - - - ant17 - - - - bw17 - 0 - - - center_freq17 - 0 - - - norm_gain17 - False - - - gain17 - 0 - - - ant18 - - - - bw18 - 0 - - - center_freq18 - 0 - - - norm_gain18 - False - - - gain18 - 0 - - - ant19 - - - - bw19 - 0 - - - center_freq19 - 0 - - - norm_gain19 - False - - - gain19 - 0 - - - ant1 - - - - bw1 - 0 - - - center_freq1 - 0 - - - norm_gain1 - False - - - gain1 - 0 - - - ant20 - - - - bw20 - 0 - - - center_freq20 - 0 - - - norm_gain20 - False - - - gain20 - 0 - - - ant21 - - - - bw21 - 0 - - - center_freq21 - 0 - - - norm_gain21 - False - - - gain21 - 0 - - - ant22 - - - - bw22 - 0 - - - center_freq22 - 0 - - - norm_gain22 - False - - - gain22 - 0 - - - ant23 - - - - bw23 - 0 - - - center_freq23 - 0 - - - norm_gain23 - False - - - gain23 - 0 - - - ant24 - - - - bw24 - 0 - - - center_freq24 - 0 - - - norm_gain24 - False - - - gain24 - 0 - - - ant25 - - - - bw25 - 0 - - - center_freq25 - 0 - - - norm_gain25 - False - - - gain25 - 0 - - - ant26 - - - - bw26 - 0 - - - center_freq26 - 0 - - - norm_gain26 - False - - - gain26 - 0 - - - ant27 - - - - bw27 - 0 - - - center_freq27 - 0 - - - norm_gain27 - False - - - gain27 - 0 - - - ant28 - - - - bw28 - 0 - - - center_freq28 - 0 - - - norm_gain28 - False - - - gain28 - 0 - - - ant29 - - - - bw29 - 0 - - - center_freq29 - 0 - - - norm_gain29 - False - - - gain29 - 0 - - - ant2 - - - - bw2 - 0 - - - center_freq2 - 0 - - - norm_gain2 - False - - - gain2 - 0 - - - ant30 - - - - bw30 - 0 - - - center_freq30 - 0 - - - norm_gain30 - False - - - gain30 - 0 - - - ant31 - - - - bw31 - 0 - - - center_freq31 - 0 - - - norm_gain31 - False - - - gain31 - 0 - - - ant3 - - - - bw3 - 0 - - - center_freq3 - 0 - - - norm_gain3 - False - - - gain3 - 0 - - - ant4 - - - - bw4 - 0 - - - center_freq4 - 0 - - - norm_gain4 - False - - - gain4 - 0 - - - ant5 - - - - bw5 - 0 - - - center_freq5 - 0 - - - norm_gain5 - False - - - gain5 - 0 - - - ant6 - - - - bw6 - 0 - - - center_freq6 - 0 - - - norm_gain6 - False - - - gain6 - 0 - - - ant7 - - - - bw7 - 0 - - - center_freq7 - 0 - - - norm_gain7 - False - - - gain7 - 0 - - - ant8 - - - - bw8 - 0 - - - center_freq8 - 0 - - - norm_gain8 - False - - - gain8 - 0 - - - ant9 - - - - bw9 - 0 - - - center_freq9 - 0 - - - norm_gain9 - False - - - gain9 - 0 - - - clock_rate - 0.0 - - - comment - - - - affinity - - - - dev_addr - "send_frame_size=16384,num_send_frames=128,master_clock_rate=" + str(samp_rate*2) - - - dev_args - "" - - - _enabled - 1 - - - _coordinate - (1048, 408) - - - _rotation - 0 - - - id - uhd_usrp_sink_0_0 - - - type - fc32 - - - clock_source0 - - - - sd_spec0 - - - - time_source0 - - - - clock_source1 - - - - sd_spec1 - - - - time_source1 - - - - clock_source2 - - - - sd_spec2 - - - - time_source2 - - - - clock_source3 - - - - sd_spec3 - - - - time_source3 - - - - clock_source4 - - - - sd_spec4 - - - - time_source4 - - - - clock_source5 - - - - sd_spec5 - - - - time_source5 - - - - clock_source6 - - - - sd_spec6 - - - - time_source6 - - - - clock_source7 - - - - sd_spec7 - - - - time_source7 - - - - nchan - 1 - - - num_mboards - 1 - - - samp_rate - samp_rate - - - hide_cmd_port - False - - - hide_lo_controls - True - - - stream_args - - - - stream_chans - [] - - - sync - - - - len_tag_name - - - - otw - - - - - dtv_dvb_bbscrambler_bb_0 - dtv_dvb_bch_bb_0 - 0 - 0 - - - dtv_dvb_bch_bb_0 - dtv_dvb_ldpc_bb_0 - 0 - 0 - - - dtv_dvb_ldpc_bb_0 - dtv_dvbs2_interleaver_bb_0 - 0 - 0 - - - dtv_dvbs2_interleaver_bb_0 - dtv_dvbs2_modulator_bc_0 - 0 - 0 - - - dtv_dvbs2_modulator_bc_0 - dtv_dvbs2_physical_cc_0 - 0 - 0 - - - dtv_dvbs2_physical_cc_0 - fft_filter_xxx_0 - 0 - 0 - - - dvbgse_bbheader_source_0 - dtv_dvb_bbscrambler_bb_0 - 0 - 0 - - - fft_filter_xxx_0 - osmosdr_sink_0 - 0 - 0 - - - fft_filter_xxx_0 - qtgui_freq_sink_x_0 - 0 - 0 - - - fft_filter_xxx_0 - uhd_usrp_sink_0_0 - 0 - 0 - - +options: + parameters: + author: '' + category: Custom + cmake_opt: '' + comment: '' + copyright: '' + description: '' + gen_cmake: 'On' + gen_linking: dynamic + generate_options: qt_gui + hier_block_src_path: '.:' + id: dvbs2_tx + max_nouts: '0' + output_language: python + placement: (0,0) + qt_qss_theme: '' + realtime_scheduling: '' + run: 'True' + run_command: '{python} -u {filename}' + run_options: prompt + sizing_mode: fixed + thread_safe_setters: '' + title: '' + window_size: 1280, 1024 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 11] + rotation: 0 + state: enabled + +blocks: +- name: center_freq + id: variable + parameters: + comment: '' + value: 1280e6 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 203] + rotation: 0 + state: enabled +- name: rolloff + id: variable + parameters: + comment: '' + value: '0.2' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 267] + rotation: 0 + state: enabled +- name: samp_rate + id: variable + parameters: + comment: '' + value: symbol_rate * 2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 75] + rotation: 0 + state: enabled +- name: symbol_rate + id: variable + parameters: + comment: '' + value: '6000000' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 139] + rotation: 0 + state: enabled +- name: taps + id: variable + parameters: + comment: '' + value: '200' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 331] + rotation: 0 + state: enabled +- name: tx_gain + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: '' + label: '' + min_len: '200' + orient: Qt.Horizontal + rangeType: float + start: '0' + step: '1' + stop: '89' + value: '40' + widget: counter_slider + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [240, 480] + rotation: 0 + state: enabled +- name: vga1_gain + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: '' + label: '' + min_len: '200' + orient: Qt.Horizontal + rangeType: int + start: '-35' + step: '1' + stop: '-4' + value: '-8' + widget: counter_slider + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 480] + rotation: 0 + state: enabled +- name: vga2_gain + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: '' + label: '' + min_len: '200' + orient: Qt.Horizontal + rangeType: int + start: '0' + step: '1' + stop: '25' + value: '10' + widget: counter_slider + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [120, 480] + rotation: 0 + state: enabled +- name: dtv_dvb_bbscrambler_bb_0 + id: dtv_dvb_bbscrambler_bb + parameters: + affinity: '' + alias: '' + comment: '' + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + maxoutbuf: '0' + minoutbuf: '0' + rate1: C1_2 + rate2: C1_3 + rate3: C5_6 + rate4: C1_5_MEDIUM + rate5: C5_6 + standard: STANDARD_DVBS2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [504, 44.0] + rotation: 0 + state: enabled +- name: dtv_dvb_bch_bb_0 + id: dtv_dvb_bch_bb + parameters: + affinity: '' + alias: '' + comment: '' + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + maxoutbuf: '0' + minoutbuf: '0' + rate1: C1_2 + rate2: C1_3 + rate3: C5_6 + rate4: C1_5_MEDIUM + rate5: C5_6 + standard: STANDARD_DVBS2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [784, 44.0] + rotation: 0 + state: enabled +- name: dtv_dvb_ldpc_bb_0 + id: dtv_dvb_ldpc_bb + parameters: + affinity: '' + alias: '' + comment: '' + constellation: MOD_OTHER + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + maxoutbuf: '0' + minoutbuf: '0' + rate1: C1_2 + rate2: C1_3 + rate3: C5_6 + rate4: C1_5_MEDIUM + rate5: C5_6 + standard: STANDARD_DVBS2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1040, 36.0] + rotation: 0 + state: enabled +- name: dtv_dvbs2_interleaver_bb_0 + id: dtv_dvbs2_interleaver_bb + parameters: + affinity: '' + alias: '' + comment: '' + constellation: MOD_8PSK + framesize: FECFRAME_SHORT + maxoutbuf: '0' + minoutbuf: '0' + rate1: C5_6 + rate2: C1_5_MEDIUM + rate3: C5_6 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [208, 220.0] + rotation: 0 + state: enabled +- name: dtv_dvbs2_modulator_bc_0 + id: dtv_dvbs2_modulator_bc + parameters: + affinity: '' + alias: '' + comment: '' + constellation: MOD_8PSK + framesize: FECFRAME_SHORT + interpolation: INTERPOLATION_OFF + maxoutbuf: '0' + minoutbuf: '0' + rate1: C5_6 + rate2: C1_5_MEDIUM + rate3: C5_6 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [512, 212.0] + rotation: 0 + state: enabled +- name: dtv_dvbs2_physical_cc_0 + id: dtv_dvbs2_physical_cc + parameters: + affinity: '' + alias: '' + comment: '' + constellation: MOD_8PSK + framesize: FECFRAME_SHORT + goldcode: '0' + maxoutbuf: '0' + minoutbuf: '0' + pilots: PILOTS_ON + rate1: C5_6 + rate2: C1_5_MEDIUM + rate3: C5_6 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [792, 204.0] + rotation: 0 + state: enabled +- name: dvbgse_bbheader_source_0 + id: dvbgse_bbheader_source + parameters: + affinity: '' + alias: '' + comment: '' + dst_address: 10.0.1.190 + fecblocks: '168' + framesize1: FECFRAME_NORMAL + framesize2: FECFRAME_SHORT + inband: INBAND_OFF + ipaddr_spoof: IPADDR_SPOOF_OFF + mac_address: 02:00:48:55:4c:4b + maxoutbuf: '0' + minoutbuf: '0' + ping_reply: PING_REPLY_ON + rate1: C1_2 + rate2: C1_3 + rate3: C5_6 + rate4: C1_5_MEDIUM + rate5: C5_6 + rolloff: RO_0_20 + src_address: 44.0.0.3 + standard: STANDARD_DVBS2 + tsrate: '4000000' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [208, 12.0] + rotation: 0 + state: enabled +- name: fft_filter_xxx_0 + id: fft_filter_xxx + parameters: + affinity: '' + alias: '' + comment: '' + decim: '1' + maxoutbuf: '0' + minoutbuf: '0' + nthreads: '1' + samp_delay: '0' + taps: firdes.root_raised_cosine(1.0, samp_rate, samp_rate/2, rolloff, taps) + type: ccc + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [640, 380.0] + rotation: 0 + state: enabled +- name: qtgui_freq_sink_x_0 + id: qtgui_freq_sink_x + parameters: + affinity: '' + alias: '' + alpha1: '1.0' + alpha10: '1.0' + alpha2: '1.0' + alpha3: '1.0' + alpha4: '1.0' + alpha5: '1.0' + alpha6: '1.0' + alpha7: '1.0' + alpha8: '1.0' + alpha9: '1.0' + autoscale: 'False' + average: '0.2' + axislabels: 'True' + bw: samp_rate + color1: '"blue"' + color10: '"dark blue"' + color2: '"red"' + color3: '"green"' + color4: '"black"' + color5: '"cyan"' + color6: '"magenta"' + color7: '"yellow"' + color8: '"dark red"' + color9: '"dark green"' + comment: '' + ctrlpanel: 'False' + fc: center_freq + fftsize: '1024' + freqhalf: 'True' + grid: 'True' + gui_hint: '' + label: Relative Gain + label1: '' + label10: '' + label2: '' + label3: '' + label4: '' + label5: '' + label6: '' + label7: '' + label8: '' + label9: '' + legend: 'True' + maxoutbuf: '0' + minoutbuf: '0' + name: '""' + nconnections: '1' + showports: 'True' + tr_chan: '0' + tr_level: '0.0' + tr_mode: qtgui.TRIG_MODE_FREE + tr_tag: '""' + type: complex + units: dB + update_time: '0.10' + width1: '1' + width10: '1' + width2: '1' + width3: '1' + width4: '1' + width5: '1' + width6: '1' + width7: '1' + width8: '1' + width9: '1' + wintype: firdes.WIN_BLACKMAN_hARRIS + ymax: '10' + ymin: '-140' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1048, 320.0] + rotation: 0 + state: enabled +- name: uhd_usrp_sink_0_0 + id: uhd_usrp_sink + parameters: + affinity: '' + alias: '' + ant0: '' + ant1: '' + ant10: '' + ant11: '' + ant12: '' + ant13: '' + ant14: '' + ant15: '' + ant16: '' + ant17: '' + ant18: '' + ant19: '' + ant2: '' + ant20: '' + ant21: '' + ant22: '' + ant23: '' + ant24: '' + ant25: '' + ant26: '' + ant27: '' + ant28: '' + ant29: '' + ant3: '' + ant30: '' + ant31: '' + ant4: '' + ant5: '' + ant6: '' + ant7: '' + ant8: '' + ant9: '' + bw0: '0' + bw1: '0' + bw10: '0' + bw11: '0' + bw12: '0' + bw13: '0' + bw14: '0' + bw15: '0' + bw16: '0' + bw17: '0' + bw18: '0' + bw19: '0' + bw2: '0' + bw20: '0' + bw21: '0' + bw22: '0' + bw23: '0' + bw24: '0' + bw25: '0' + bw26: '0' + bw27: '0' + bw28: '0' + bw29: '0' + bw3: '0' + bw30: '0' + bw31: '0' + bw4: '0' + bw5: '0' + bw6: '0' + bw7: '0' + bw8: '0' + bw9: '0' + center_freq0: uhd.tune_request(center_freq, ((symbol_rate * (1 + rolloff)) / 2 + ) + 1e5) + center_freq1: '0' + center_freq10: '0' + center_freq11: '0' + center_freq12: '0' + center_freq13: '0' + center_freq14: '0' + center_freq15: '0' + center_freq16: '0' + center_freq17: '0' + center_freq18: '0' + center_freq19: '0' + center_freq2: '0' + center_freq20: '0' + center_freq21: '0' + center_freq22: '0' + center_freq23: '0' + center_freq24: '0' + center_freq25: '0' + center_freq26: '0' + center_freq27: '0' + center_freq28: '0' + center_freq29: '0' + center_freq3: '0' + center_freq30: '0' + center_freq31: '0' + center_freq4: '0' + center_freq5: '0' + center_freq6: '0' + center_freq7: '0' + center_freq8: '0' + center_freq9: '0' + clock_rate: '0.0' + clock_source0: '' + clock_source1: '' + clock_source2: '' + clock_source3: '' + clock_source4: '' + clock_source5: '' + clock_source6: '' + clock_source7: '' + comment: '' + dev_addr: '"send_frame_size=16384,num_send_frames=128,master_clock_rate=" + str(samp_rate*2)' + dev_args: '""' + gain0: tx_gain + gain1: '0' + gain10: '0' + gain11: '0' + gain12: '0' + gain13: '0' + gain14: '0' + gain15: '0' + gain16: '0' + gain17: '0' + gain18: '0' + gain19: '0' + gain2: '0' + gain20: '0' + gain21: '0' + gain22: '0' + gain23: '0' + gain24: '0' + gain25: '0' + gain26: '0' + gain27: '0' + gain28: '0' + gain29: '0' + gain3: '0' + gain30: '0' + gain31: '0' + gain4: '0' + gain5: '0' + gain6: '0' + gain7: '0' + gain8: '0' + gain9: '0' + len_tag_name: '' + lo_export0: 'False' + lo_export1: 'False' + lo_export10: 'False' + lo_export11: 'False' + lo_export12: 'False' + lo_export13: 'False' + lo_export14: 'False' + lo_export15: 'False' + lo_export16: 'False' + lo_export17: 'False' + lo_export18: 'False' + lo_export19: 'False' + lo_export2: 'False' + lo_export20: 'False' + lo_export21: 'False' + lo_export22: 'False' + lo_export23: 'False' + lo_export24: 'False' + lo_export25: 'False' + lo_export26: 'False' + lo_export27: 'False' + lo_export28: 'False' + lo_export29: 'False' + lo_export3: 'False' + lo_export30: 'False' + lo_export31: 'False' + lo_export4: 'False' + lo_export5: 'False' + lo_export6: 'False' + lo_export7: 'False' + lo_export8: 'False' + lo_export9: 'False' + lo_source0: internal + lo_source1: internal + lo_source10: internal + lo_source11: internal + lo_source12: internal + lo_source13: internal + lo_source14: internal + lo_source15: internal + lo_source16: internal + lo_source17: internal + lo_source18: internal + lo_source19: internal + lo_source2: internal + lo_source20: internal + lo_source21: internal + lo_source22: internal + lo_source23: internal + lo_source24: internal + lo_source25: internal + lo_source26: internal + lo_source27: internal + lo_source28: internal + lo_source29: internal + lo_source3: internal + lo_source30: internal + lo_source31: internal + lo_source4: internal + lo_source5: internal + lo_source6: internal + lo_source7: internal + lo_source8: internal + lo_source9: internal + maxoutbuf: '0' + minoutbuf: '0' + nchan: '1' + norm_gain0: 'False' + norm_gain1: 'False' + norm_gain10: 'False' + norm_gain11: 'False' + norm_gain12: 'False' + norm_gain13: 'False' + norm_gain14: 'False' + norm_gain15: 'False' + norm_gain16: 'False' + norm_gain17: 'False' + norm_gain18: 'False' + norm_gain19: 'False' + norm_gain2: 'False' + norm_gain20: 'False' + norm_gain21: 'False' + norm_gain22: 'False' + norm_gain23: 'False' + norm_gain24: 'False' + norm_gain25: 'False' + norm_gain26: 'False' + norm_gain27: 'False' + norm_gain28: 'False' + norm_gain29: 'False' + norm_gain3: 'False' + norm_gain30: 'False' + norm_gain31: 'False' + norm_gain4: 'False' + norm_gain5: 'False' + norm_gain6: 'False' + norm_gain7: 'False' + norm_gain8: 'False' + norm_gain9: 'False' + num_mboards: '1' + otw: '' + samp_rate: samp_rate + sd_spec0: '' + sd_spec1: '' + sd_spec2: '' + sd_spec3: '' + sd_spec4: '' + sd_spec5: '' + sd_spec6: '' + sd_spec7: '' + show_lo_controls: 'False' + stream_args: '' + stream_chans: '[]' + sync: sync + time_source0: '' + time_source1: '' + time_source2: '' + time_source3: '' + time_source4: '' + time_source5: '' + time_source6: '' + time_source7: '' + type: fc32 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1048, 428.0] + rotation: 0 + state: enabled +- name: virtual_sink_0 + id: virtual_sink + parameters: + alias: '' + comment: '' + stream_id: ldpc-int + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1064, 132.0] + rotation: 180 + state: true +- name: virtual_sink_1 + id: virtual_sink + parameters: + alias: '' + comment: '' + stream_id: framer-rrc + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1064, 236.0] + rotation: 0 + state: true +- name: virtual_source_0 + id: virtual_source + parameters: + alias: '' + comment: '' + stream_id: ldpc-int + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [208, 172.0] + rotation: 180 + state: true +- name: virtual_source_1 + id: virtual_source + parameters: + alias: '' + comment: '' + stream_id: framer-rrc + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [304, 396.0] + rotation: 0 + state: true + +connections: +- [dtv_dvb_bbscrambler_bb_0, '0', dtv_dvb_bch_bb_0, '0'] +- [dtv_dvb_bch_bb_0, '0', dtv_dvb_ldpc_bb_0, '0'] +- [dtv_dvb_ldpc_bb_0, '0', virtual_sink_0, '0'] +- [dtv_dvbs2_interleaver_bb_0, '0', dtv_dvbs2_modulator_bc_0, '0'] +- [dtv_dvbs2_modulator_bc_0, '0', dtv_dvbs2_physical_cc_0, '0'] +- [dtv_dvbs2_physical_cc_0, '0', virtual_sink_1, '0'] +- [dvbgse_bbheader_source_0, '0', dtv_dvb_bbscrambler_bb_0, '0'] +- [fft_filter_xxx_0, '0', qtgui_freq_sink_x_0, '0'] +- [fft_filter_xxx_0, '0', uhd_usrp_sink_0_0, '0'] +- [virtual_source_0, '0', dtv_dvbs2_interleaver_bb_0, '0'] +- [virtual_source_1, '0', fft_filter_xxx_0, '0'] + +metadata: + file_format: 1 diff --git a/cmake/Modules/CMakeParseArgumentsCopy.cmake b/cmake/Modules/CMakeParseArgumentsCopy.cmake index 7ce4c49..66016cb 100644 --- a/cmake/Modules/CMakeParseArgumentsCopy.cmake +++ b/cmake/Modules/CMakeParseArgumentsCopy.cmake @@ -58,7 +58,7 @@ # the new option. # E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in # MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would -# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. +# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefore. #============================================================================= # Copyright 2010 Alexander Neundorf diff --git a/cmake/Modules/FindCppUnit.cmake b/cmake/Modules/FindCppUnit.cmake deleted file mode 100644 index f93ade3..0000000 --- a/cmake/Modules/FindCppUnit.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# http://www.cmake.org/pipermail/cmake/2006-October/011446.html -# Modified to use pkg config and use standard var names - -# -# Find the CppUnit includes and library -# -# This module defines -# CPPUNIT_INCLUDE_DIR, where to find tiff.h, etc. -# CPPUNIT_LIBRARIES, the libraries to link against to use CppUnit. -# CPPUNIT_FOUND, If false, do not try to use CppUnit. - -INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(PC_CPPUNIT "cppunit") - -FIND_PATH(CPPUNIT_INCLUDE_DIRS - NAMES cppunit/TestCase.h - HINTS ${PC_CPPUNIT_INCLUDE_DIR} - ${CMAKE_INSTALL_PREFIX}/include - PATHS - /usr/local/include - /usr/include -) - -FIND_LIBRARY(CPPUNIT_LIBRARIES - NAMES cppunit - HINTS ${PC_CPPUNIT_LIBDIR} - ${CMAKE_INSTALL_PREFIX}/lib - ${CMAKE_INSTALL_PREFIX}/lib64 - PATHS - ${CPPUNIT_INCLUDE_DIRS}/../lib - /usr/local/lib - /usr/lib -) - -LIST(APPEND CPPUNIT_LIBRARIES ${CMAKE_DL_LIBS}) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS) -MARK_AS_ADVANCED(CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS) diff --git a/cmake/Modules/FindGnuradioRuntime.cmake b/cmake/Modules/FindGnuradioRuntime.cmake deleted file mode 100644 index afed684..0000000 --- a/cmake/Modules/FindGnuradioRuntime.cmake +++ /dev/null @@ -1,36 +0,0 @@ -INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(PC_GNURADIO_RUNTIME gnuradio-runtime) - -if(PC_GNURADIO_RUNTIME_FOUND) - # look for include files - FIND_PATH( - GNURADIO_RUNTIME_INCLUDE_DIRS - NAMES gnuradio/top_block.h - HINTS $ENV{GNURADIO_RUNTIME_DIR}/include - ${PC_GNURADIO_RUNTIME_INCLUDE_DIRS} - ${CMAKE_INSTALL_PREFIX}/include - PATHS /usr/local/include - /usr/include - ) - - # look for libs - FIND_LIBRARY( - GNURADIO_RUNTIME_LIBRARIES - NAMES gnuradio-runtime - HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib - ${PC_GNURADIO_RUNTIME_LIBDIR} - ${CMAKE_INSTALL_PREFIX}/lib/ - ${CMAKE_INSTALL_PREFIX}/lib64/ - PATHS /usr/local/lib - /usr/local/lib64 - /usr/lib - /usr/lib64 - ) - - set(GNURADIO_RUNTIME_FOUND ${PC_GNURADIO_RUNTIME_FOUND}) -endif(PC_GNURADIO_RUNTIME_FOUND) - -INCLUDE(FindPackageHandleStandardArgs) -# do not check GNURADIO_RUNTIME_INCLUDE_DIRS, is not set when default include path us used. -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_RUNTIME DEFAULT_MSG GNURADIO_RUNTIME_LIBRARIES) -MARK_AS_ADVANCED(GNURADIO_RUNTIME_LIBRARIES GNURADIO_RUNTIME_INCLUDE_DIRS) diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake deleted file mode 100644 index 5bad57c..0000000 --- a/cmake/Modules/GrMiscUtils.cmake +++ /dev/null @@ -1,528 +0,0 @@ -# Copyright 2010-2011,2014 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - -if(DEFINED __INCLUDED_GR_MISC_UTILS_CMAKE) - return() -endif() -set(__INCLUDED_GR_MISC_UTILS_CMAKE TRUE) - -######################################################################## -# Set global variable macro. -# Used for subdirectories to export settings. -# Example: include and library paths. -######################################################################## -function(GR_SET_GLOBAL var) - set(${var} ${ARGN} CACHE INTERNAL "" FORCE) -endfunction(GR_SET_GLOBAL) - -######################################################################## -# Set the pre-processor definition if the condition is true. -# - def the pre-processor definition to set and condition name -######################################################################## -function(GR_ADD_COND_DEF def) - if(${def}) - add_definitions(-D${def}) - endif(${def}) -endfunction(GR_ADD_COND_DEF) - -######################################################################## -# Check for a header and conditionally set a compile define. -# - hdr the relative path to the header file -# - def the pre-processor definition to set -######################################################################## -function(GR_CHECK_HDR_N_DEF hdr def) - include(CheckIncludeFileCXX) - CHECK_INCLUDE_FILE_CXX(${hdr} ${def}) - GR_ADD_COND_DEF(${def}) -endfunction(GR_CHECK_HDR_N_DEF) - -######################################################################## -# Include subdirectory macro. -# Sets the CMake directory variables, -# includes the subdirectory CMakeLists.txt, -# resets the CMake directory variables. -# -# This macro includes subdirectories rather than adding them -# so that the subdirectory can affect variables in the level above. -# This provides a work-around for the lack of convenience libraries. -# This way a subdirectory can append to the list of library sources. -######################################################################## -macro(GR_INCLUDE_SUBDIRECTORY subdir) - #insert the current directories on the front of the list - list(INSERT _cmake_source_dirs 0 ${CMAKE_CURRENT_SOURCE_DIR}) - list(INSERT _cmake_binary_dirs 0 ${CMAKE_CURRENT_BINARY_DIR}) - - #set the current directories to the names of the subdirs - set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}) - set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${subdir}) - - #include the subdirectory CMakeLists to run it - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt) - - #reset the value of the current directories - list(GET _cmake_source_dirs 0 CMAKE_CURRENT_SOURCE_DIR) - list(GET _cmake_binary_dirs 0 CMAKE_CURRENT_BINARY_DIR) - - #pop the subdir names of the front of the list - list(REMOVE_AT _cmake_source_dirs 0) - list(REMOVE_AT _cmake_binary_dirs 0) -endmacro(GR_INCLUDE_SUBDIRECTORY) - -######################################################################## -# Check if a compiler flag works and conditionally set a compile define. -# - flag the compiler flag to check for -# - have the variable to set with result -######################################################################## -macro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE flag have) - include(CheckCXXCompilerFlag) - CHECK_CXX_COMPILER_FLAG(${flag} ${have}) - if(${have}) - if(${CMAKE_VERSION} VERSION_GREATER "2.8.4") - STRING(FIND "${CMAKE_CXX_FLAGS}" "${flag}" flag_dup) - if(${flag_dup} EQUAL -1) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}") - endif(${flag_dup} EQUAL -1) - endif(${CMAKE_VERSION} VERSION_GREATER "2.8.4") - endif(${have}) -endmacro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE) - -######################################################################## -# Generates the .la libtool file -# This appears to generate libtool files that cannot be used by auto*. -# Usage GR_LIBTOOL(TARGET [target] DESTINATION [dest]) -# Notice: there is not COMPONENT option, these will not get distributed. -######################################################################## -function(GR_LIBTOOL) - if(NOT DEFINED GENERATE_LIBTOOL) - set(GENERATE_LIBTOOL OFF) #disabled by default - endif() - - if(GENERATE_LIBTOOL) - include(CMakeParseArgumentsCopy) - CMAKE_PARSE_ARGUMENTS(GR_LIBTOOL "" "TARGET;DESTINATION" "" ${ARGN}) - - find_program(LIBTOOL libtool) - if(LIBTOOL) - include(CMakeMacroLibtoolFile) - CREATE_LIBTOOL_FILE(${GR_LIBTOOL_TARGET} /${GR_LIBTOOL_DESTINATION}) - endif(LIBTOOL) - endif(GENERATE_LIBTOOL) - -endfunction(GR_LIBTOOL) - -######################################################################## -# Do standard things to the library target -# - set target properties -# - make install rules -# Also handle gnuradio custom naming conventions w/ extras mode. -######################################################################## -function(GR_LIBRARY_FOO target) - #parse the arguments for component names - include(CMakeParseArgumentsCopy) - CMAKE_PARSE_ARGUMENTS(GR_LIBRARY "" "RUNTIME_COMPONENT;DEVEL_COMPONENT" "" ${ARGN}) - - #set additional target properties - set_target_properties(${target} PROPERTIES SOVERSION ${LIBVER}) - - #install the generated files like so... - install(TARGETS ${target} - LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .so/.dylib file - ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_DEVEL_COMPONENT} # .lib file - RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .dll file - ) - - #extras mode enabled automatically on linux - if(NOT DEFINED LIBRARY_EXTRAS) - set(LIBRARY_EXTRAS ${LINUX}) - endif() - - #special extras mode to enable alternative naming conventions - if(LIBRARY_EXTRAS) - - #create .la file before changing props - GR_LIBTOOL(TARGET ${target} DESTINATION ${GR_LIBRARY_DIR}) - - #give the library a special name with ultra-zero soversion - set_target_properties(${target} PROPERTIES OUTPUT_NAME ${target}-${LIBVER} SOVERSION "0.0.0") - set(target_name lib${target}-${LIBVER}.so.0.0.0) - - #custom command to generate symlinks - add_custom_command( - TARGET ${target} - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so - COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0 - COMMAND ${CMAKE_COMMAND} -E touch ${target_name} #so the symlinks point to something valid so cmake 2.6 will install - ) - - #and install the extra symlinks - install( - FILES - ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so - ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0 - DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} - ) - - endif(LIBRARY_EXTRAS) -endfunction(GR_LIBRARY_FOO) - -######################################################################## -# Create a dummy custom command that depends on other targets. -# Usage: -# GR_GEN_TARGET_DEPS(unique_name target_deps ...) -# ADD_CUSTOM_COMMAND( ${target_deps}) -# -# Custom command cant depend on targets, but can depend on executables, -# and executables can depend on targets. So this is the process: -######################################################################## -function(GR_GEN_TARGET_DEPS name var) - file( - WRITE ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp.in - "int main(void){return 0;}\n" - ) - execute_process( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp.in - ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp - ) - add_executable(${name} ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp) - if(ARGN) - add_dependencies(${name} ${ARGN}) - endif(ARGN) - - if(CMAKE_CROSSCOMPILING) - set(${var} "DEPENDS;${name}" PARENT_SCOPE) #cant call command when cross - else() - set(${var} "DEPENDS;${name};COMMAND;${name}" PARENT_SCOPE) - endif() -endfunction(GR_GEN_TARGET_DEPS) - -######################################################################## -# Control use of gr_logger -# Usage: -# GR_LOGGING() -# -# Will set ENABLE_GR_LOG to 1 by default. -# Can manually set with -DENABLE_GR_LOG=0|1 -######################################################################## -function(GR_LOGGING) - find_package(Log4cpp) - - OPTION(ENABLE_GR_LOG "Use gr_logger" ON) - if(ENABLE_GR_LOG) - # If gr_logger is enabled, make it usable - add_definitions( -DENABLE_GR_LOG ) - - # also test LOG4CPP; if we have it, use this version of the logger - # otherwise, default to the stdout/stderr model. - if(LOG4CPP_FOUND) - SET(HAVE_LOG4CPP True CACHE INTERNAL "" FORCE) - add_definitions( -DHAVE_LOG4CPP ) - else(not LOG4CPP_FOUND) - SET(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE) - SET(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE) - SET(LOG4CPP_LIBRARY_DIRS "" CACHE INTERNAL "" FORCE) - SET(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE) - endif(LOG4CPP_FOUND) - - SET(ENABLE_GR_LOG ${ENABLE_GR_LOG} CACHE INTERNAL "" FORCE) - - else(ENABLE_GR_LOG) - SET(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE) - SET(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE) - SET(LOG4CPP_LIBRARY_DIRS "" CACHE INTERNAL "" FORCE) - SET(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE) - endif(ENABLE_GR_LOG) - - message(STATUS "ENABLE_GR_LOG set to ${ENABLE_GR_LOG}.") - message(STATUS "HAVE_LOG4CPP set to ${HAVE_LOG4CPP}.") - message(STATUS "LOG4CPP_LIBRARIES set to ${LOG4CPP_LIBRARIES}.") - -endfunction(GR_LOGGING) - -######################################################################## -# Run GRCC to compile .grc files into .py files. -# -# Usage: GRCC(filename, directory) -# - filenames: List of file name of .grc file -# - directory: directory of built .py file - usually in -# ${CMAKE_CURRENT_BINARY_DIR} -# - Sets PYFILES: output converted GRC file names to Python files. -######################################################################## -function(GRCC) - # Extract directory from list of args, remove it for the list of filenames. - list(GET ARGV -1 directory) - list(REMOVE_AT ARGV -1) - set(filenames ${ARGV}) - file(MAKE_DIRECTORY ${directory}) - - SET(GRCC_COMMAND ${CMAKE_SOURCE_DIR}/gr-utils/python/grcc) - - # GRCC uses some stuff in grc and gnuradio-runtime, so we force - # the known paths here - list(APPEND PYTHONPATHS - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/gnuradio-runtime/python - ${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/swig - ${CMAKE_BINARY_DIR}/gnuradio-runtime/lib/swig - ) - - if(WIN32) - #SWIG generates the python library files into a subdirectory. - #Therefore, we must append this subdirectory into PYTHONPATH. - #Only do this for the python directories matching the following: - foreach(pydir ${PYTHONPATHS}) - get_filename_component(name ${pydir} NAME) - if(name MATCHES "^(swig|lib|src)$") - list(APPEND PYTHONPATHS ${pydir}/${CMAKE_BUILD_TYPE}) - endif() - endforeach(pydir) - endif(WIN32) - - file(TO_NATIVE_PATH "${PYTHONPATHS}" pypath) - - if(UNIX) - list(APPEND pypath "$PYTHONPATH") - string(REPLACE ";" ":" pypath "${pypath}") - set(ENV{PYTHONPATH} ${pypath}) - endif(UNIX) - - if(WIN32) - list(APPEND pypath "%PYTHONPATH%") - string(REPLACE ";" "\\;" pypath "${pypath}") - #list(APPEND environs "PYTHONPATH=${pypath}") - set(ENV{PYTHONPATH} ${pypath}) - endif(WIN32) - - foreach(f ${filenames}) - execute_process( - COMMAND ${GRCC_COMMAND} -d ${directory} ${f} - ) - string(REPLACE ".grc" ".py" pyfile "${f}") - string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" pyfile "${pyfile}") - list(APPEND pyfiles ${pyfile}) - endforeach(f) - - set(PYFILES ${pyfiles} PARENT_SCOPE) -endfunction(GRCC) - -######################################################################## -# Check if HAVE_PTHREAD_SETSCHEDPARAM and HAVE_SCHED_SETSCHEDULER -# should be defined -######################################################################## -macro(GR_CHECK_LINUX_SCHED_AVAIL) -set(CMAKE_REQUIRED_LIBRARIES -lpthread) - CHECK_CXX_SOURCE_COMPILES(" - #include - int main(){ - pthread_t pthread; - pthread_setschedparam(pthread, 0, 0); - return 0; - } " HAVE_PTHREAD_SETSCHEDPARAM - ) - GR_ADD_COND_DEF(HAVE_PTHREAD_SETSCHEDPARAM) - - CHECK_CXX_SOURCE_COMPILES(" - #include - int main(){ - pid_t pid; - sched_setscheduler(pid, 0, 0); - return 0; - } " HAVE_SCHED_SETSCHEDULER - ) - GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER) -endmacro(GR_CHECK_LINUX_SCHED_AVAIL) - -######################################################################## -# Macros to generate source and header files from template -######################################################################## -macro(GR_EXPAND_X_H component root) - - include(GrPython) - - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py -"#!${PYTHON_EXECUTABLE} - -import sys, os, re -sys.path.append('${GR_RUNTIME_PYTHONPATH}') -sys.path.append('${CMAKE_SOURCE_DIR}/python') -os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}' -os.chdir('${CMAKE_CURRENT_BINARY_DIR}') - -if __name__ == '__main__': - import build_utils - root, inp = sys.argv[1:3] - for sig in sys.argv[3:]: - name = re.sub ('X+', sig, root) - d = build_utils.standard_dict2(name, sig, '${component}') - build_utils.expand_template(d, inp) -") - - #make a list of all the generated headers - unset(expanded_files_h) - foreach(sig ${ARGN}) - string(REGEX REPLACE "X+" ${sig} name ${root}) - list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h) - endforeach(sig) - unset(name) - - #create a command to generate the headers - add_custom_command( - OUTPUT ${expanded_files_h} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t - COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} - ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py - ${root} ${root}.h.t ${ARGN} - ) - - #install rules for the generated headers - list(APPEND generated_includes ${expanded_files_h}) - -endmacro(GR_EXPAND_X_H) - -macro(GR_EXPAND_X_CC_H component root) - - include(GrPython) - - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py -"#!${PYTHON_EXECUTABLE} - -import sys, os, re -sys.path.append('${GR_RUNTIME_PYTHONPATH}') -sys.path.append('${CMAKE_SOURCE_DIR}/python') -os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}' -os.chdir('${CMAKE_CURRENT_BINARY_DIR}') - -if __name__ == '__main__': - import build_utils - root, inp = sys.argv[1:3] - for sig in sys.argv[3:]: - name = re.sub ('X+', sig, root) - d = build_utils.standard_impl_dict2(name, sig, '${component}') - build_utils.expand_template(d, inp) -") - - #make a list of all the generated files - unset(expanded_files_cc) - unset(expanded_files_h) - foreach(sig ${ARGN}) - string(REGEX REPLACE "X+" ${sig} name ${root}) - list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc) - list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h) - endforeach(sig) - unset(name) - - #create a command to generate the source files - add_custom_command( - OUTPUT ${expanded_files_cc} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t - COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} - ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py - ${root} ${root}.cc.t ${ARGN} - ) - - #create a command to generate the header files - add_custom_command( - OUTPUT ${expanded_files_h} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t - COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} - ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py - ${root} ${root}.h.t ${ARGN} - ) - - #make source files depends on headers to force generation - set_source_files_properties(${expanded_files_cc} - PROPERTIES OBJECT_DEPENDS "${expanded_files_h}" - ) - - #install rules for the generated files - list(APPEND generated_sources ${expanded_files_cc}) - list(APPEND generated_headers ${expanded_files_h}) - -endmacro(GR_EXPAND_X_CC_H) - -macro(GR_EXPAND_X_CC_H_IMPL component root) - - include(GrPython) - - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py -"#!${PYTHON_EXECUTABLE} - -import sys, os, re -sys.path.append('${GR_RUNTIME_PYTHONPATH}') -sys.path.append('${CMAKE_SOURCE_DIR}/python') -os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}' -os.chdir('${CMAKE_CURRENT_BINARY_DIR}') - -if __name__ == '__main__': - import build_utils - root, inp = sys.argv[1:3] - for sig in sys.argv[3:]: - name = re.sub ('X+', sig, root) - d = build_utils.standard_dict(name, sig, '${component}') - build_utils.expand_template(d, inp, '_impl') -") - - #make a list of all the generated files - unset(expanded_files_cc_impl) - unset(expanded_files_h_impl) - unset(expanded_files_h) - foreach(sig ${ARGN}) - string(REGEX REPLACE "X+" ${sig} name ${root}) - list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc) - list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h) - list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/${component}/${name}.h) - endforeach(sig) - unset(name) - - #create a command to generate the _impl.cc files - add_custom_command( - OUTPUT ${expanded_files_cc_impl} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t - COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} - ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py - ${root} ${root}_impl.cc.t ${ARGN} - ) - - #create a command to generate the _impl.h files - add_custom_command( - OUTPUT ${expanded_files_h_impl} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t - COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} - ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py - ${root} ${root}_impl.h.t ${ARGN} - ) - - #make _impl.cc source files depend on _impl.h to force generation - set_source_files_properties(${expanded_files_cc_impl} - PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}" - ) - - #make _impl.h source files depend on headers to force generation - set_source_files_properties(${expanded_files_h_impl} - PROPERTIES OBJECT_DEPENDS "${expanded_files_h}" - ) - - #install rules for the generated files - list(APPEND generated_sources ${expanded_files_cc_impl}) - list(APPEND generated_headers ${expanded_files_h_impl}) - -endmacro(GR_EXPAND_X_CC_H_IMPL) diff --git a/cmake/Modules/GrPlatform.cmake b/cmake/Modules/GrPlatform.cmake deleted file mode 100644 index 00a53d0..0000000 --- a/cmake/Modules/GrPlatform.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - -if(DEFINED __INCLUDED_GR_PLATFORM_CMAKE) - return() -endif() -set(__INCLUDED_GR_PLATFORM_CMAKE TRUE) - -######################################################################## -# Setup additional defines for OS types -######################################################################## -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(LINUX TRUE) -endif() - -if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/debian_version") - set(DEBIAN TRUE) -endif() - -if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/redhat-release") - set(REDHAT TRUE) -endif() - -if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/slackware-version") - set(SLACKWARE TRUE) -endif() - -######################################################################## -# when the library suffix should be 64 (applies to redhat linux family) -######################################################################## -if (REDHAT OR SLACKWARE) - set(LIB64_CONVENTION TRUE) -endif() - -if(NOT DEFINED LIB_SUFFIX AND LIB64_CONVENTION AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$") - set(LIB_SUFFIX 64) -endif() - -######################################################################## -# Detect /lib versus /lib64 -######################################################################## -if (CMAKE_INSTALL_LIBDIR MATCHES lib64) - set(LIB_SUFFIX 64) -endif() - -set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix") diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake deleted file mode 100644 index 06e061e..0000000 --- a/cmake/Modules/GrPython.cmake +++ /dev/null @@ -1,241 +0,0 @@ -# Copyright 2010-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - -if(DEFINED __INCLUDED_GR_PYTHON_CMAKE) - return() -endif() -set(__INCLUDED_GR_PYTHON_CMAKE TRUE) - -######################################################################## -# Setup the python interpreter: -# This allows the user to specify a specific interpreter, -# or finds the interpreter via the built-in cmake module. -######################################################################## -#this allows the user to override PYTHON_EXECUTABLE -if(PYTHON_EXECUTABLE) - - set(PYTHONINTERP_FOUND TRUE) - -#otherwise if not set, try to automatically find it -else(PYTHON_EXECUTABLE) - - #use the built-in find script - find_package(PythonInterp 2) - - #and if that fails use the find program routine - if(NOT PYTHONINTERP_FOUND) - find_program(PYTHON_EXECUTABLE NAMES python python2 python2.7 python2.6 python2.5) - if(PYTHON_EXECUTABLE) - set(PYTHONINTERP_FOUND TRUE) - endif(PYTHON_EXECUTABLE) - endif(NOT PYTHONINTERP_FOUND) - -endif(PYTHON_EXECUTABLE) - -if (CMAKE_CROSSCOMPILING) - set(QA_PYTHON_EXECUTABLE "/usr/bin/python") -else (CMAKE_CROSSCOMPILING) - set(QA_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) -endif(CMAKE_CROSSCOMPILING) - -#make the path to the executable appear in the cmake gui -set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter") -set(QA_PYTHON_EXECUTABLE ${QA_PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter for QA tests") - -#make sure we can use -B with python (introduced in 2.6) -if(PYTHON_EXECUTABLE) - execute_process( - COMMAND ${PYTHON_EXECUTABLE} -B -c "" - OUTPUT_QUIET ERROR_QUIET - RESULT_VARIABLE PYTHON_HAS_DASH_B_RESULT - ) - if(PYTHON_HAS_DASH_B_RESULT EQUAL 0) - set(PYTHON_DASH_B "-B") - endif() -endif(PYTHON_EXECUTABLE) - -######################################################################## -# Check for the existence of a python module: -# - desc a string description of the check -# - mod the name of the module to import -# - cmd an additional command to run -# - have the result variable to set -######################################################################## -macro(GR_PYTHON_CHECK_MODULE desc mod cmd have) - message(STATUS "") - message(STATUS "Python checking for ${desc}") - execute_process( - COMMAND ${PYTHON_EXECUTABLE} -c " -######################################### -try: - import ${mod} - assert ${cmd} -except ImportError, AssertionError: exit(-1) -except: pass -#########################################" - RESULT_VARIABLE ${have} - ) - if(${have} EQUAL 0) - message(STATUS "Python checking for ${desc} - found") - set(${have} TRUE) - else(${have} EQUAL 0) - message(STATUS "Python checking for ${desc} - not found") - set(${have} FALSE) - endif(${have} EQUAL 0) -endmacro(GR_PYTHON_CHECK_MODULE) - -######################################################################## -# Sets the python installation directory GR_PYTHON_DIR -######################################################################## -if(NOT DEFINED GR_PYTHON_DIR) -execute_process(COMMAND ${PYTHON_EXECUTABLE} -c " -from distutils import sysconfig -print sysconfig.get_python_lib(plat_specific=True, prefix='') -" OUTPUT_VARIABLE GR_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE -) -endif() -file(TO_CMAKE_PATH ${GR_PYTHON_DIR} GR_PYTHON_DIR) - -######################################################################## -# Create an always-built target with a unique name -# Usage: GR_UNIQUE_TARGET( ) -######################################################################## -function(GR_UNIQUE_TARGET desc) - file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) - execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib -unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5] -print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))" - OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE) - add_custom_target(${_target} ALL DEPENDS ${ARGN}) -endfunction(GR_UNIQUE_TARGET) - -######################################################################## -# Install python sources (also builds and installs byte-compiled python) -######################################################################## -function(GR_PYTHON_INSTALL) - include(CMakeParseArgumentsCopy) - CMAKE_PARSE_ARGUMENTS(GR_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN}) - - #################################################################### - if(GR_PYTHON_INSTALL_FILES) - #################################################################### - install(${ARGN}) #installs regular python files - - #create a list of all generated files - unset(pysrcfiles) - unset(pycfiles) - unset(pyofiles) - foreach(pyfile ${GR_PYTHON_INSTALL_FILES}) - get_filename_component(pyfile ${pyfile} ABSOLUTE) - list(APPEND pysrcfiles ${pyfile}) - - #determine if this file is in the source or binary directory - file(RELATIVE_PATH source_rel_path ${CMAKE_CURRENT_SOURCE_DIR} ${pyfile}) - string(LENGTH "${source_rel_path}" source_rel_path_len) - file(RELATIVE_PATH binary_rel_path ${CMAKE_CURRENT_BINARY_DIR} ${pyfile}) - string(LENGTH "${binary_rel_path}" binary_rel_path_len) - - #and set the generated path appropriately - if(${source_rel_path_len} GREATER ${binary_rel_path_len}) - set(pygenfile ${CMAKE_CURRENT_BINARY_DIR}/${binary_rel_path}) - else() - set(pygenfile ${CMAKE_CURRENT_BINARY_DIR}/${source_rel_path}) - endif() - list(APPEND pycfiles ${pygenfile}c) - list(APPEND pyofiles ${pygenfile}o) - - #ensure generation path exists - get_filename_component(pygen_path ${pygenfile} PATH) - file(MAKE_DIRECTORY ${pygen_path}) - - endforeach(pyfile) - - #the command to generate the pyc files - add_custom_command( - DEPENDS ${pysrcfiles} OUTPUT ${pycfiles} - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/python_compile_helper.py ${pysrcfiles} ${pycfiles} - ) - - #the command to generate the pyo files - add_custom_command( - DEPENDS ${pysrcfiles} OUTPUT ${pyofiles} - COMMAND ${PYTHON_EXECUTABLE} -O ${CMAKE_BINARY_DIR}/python_compile_helper.py ${pysrcfiles} ${pyofiles} - ) - - #create install rule and add generated files to target list - set(python_install_gen_targets ${pycfiles} ${pyofiles}) - install(FILES ${python_install_gen_targets} - DESTINATION ${GR_PYTHON_INSTALL_DESTINATION} - COMPONENT ${GR_PYTHON_INSTALL_COMPONENT} - ) - - #################################################################### - elseif(GR_PYTHON_INSTALL_PROGRAMS) - #################################################################### - file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} pyexe_native) - - if (CMAKE_CROSSCOMPILING) - set(pyexe_native "/usr/bin/env python") - endif() - - foreach(pyfile ${GR_PYTHON_INSTALL_PROGRAMS}) - get_filename_component(pyfile_name ${pyfile} NAME) - get_filename_component(pyfile ${pyfile} ABSOLUTE) - string(REPLACE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" pyexefile "${pyfile}.exe") - list(APPEND python_install_gen_targets ${pyexefile}) - - get_filename_component(pyexefile_path ${pyexefile} PATH) - file(MAKE_DIRECTORY ${pyexefile_path}) - - add_custom_command( - OUTPUT ${pyexefile} DEPENDS ${pyfile} - COMMAND ${PYTHON_EXECUTABLE} -c - "import re; R=re.compile('^\#!.*$\\n',flags=re.MULTILINE); open('${pyexefile}','w').write('\#!${pyexe_native}\\n'+R.sub('',open('${pyfile}','r').read()))" - COMMENT "Shebangin ${pyfile_name}" - VERBATIM - ) - - #on windows, python files need an extension to execute - get_filename_component(pyfile_ext ${pyfile} EXT) - if(WIN32 AND NOT pyfile_ext) - set(pyfile_name "${pyfile_name}.py") - endif() - - install(PROGRAMS ${pyexefile} RENAME ${pyfile_name} - DESTINATION ${GR_PYTHON_INSTALL_DESTINATION} - COMPONENT ${GR_PYTHON_INSTALL_COMPONENT} - ) - endforeach(pyfile) - - endif() - - GR_UNIQUE_TARGET("pygen" ${python_install_gen_targets}) - -endfunction(GR_PYTHON_INSTALL) - -######################################################################## -# Write the python helper script that generates byte code files -######################################################################## -file(WRITE ${CMAKE_BINARY_DIR}/python_compile_helper.py " -import sys, py_compile -files = sys.argv[1:] -srcs, gens = files[:len(files)/2], files[len(files)/2:] -for src, gen in zip(srcs, gens): - py_compile.compile(file=src, cfile=gen, doraise=True) -") diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake deleted file mode 100644 index abf4dc4..0000000 --- a/cmake/Modules/GrSwig.cmake +++ /dev/null @@ -1,251 +0,0 @@ -# Copyright 2010-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - -if(DEFINED __INCLUDED_GR_SWIG_CMAKE) - return() -endif() -set(__INCLUDED_GR_SWIG_CMAKE TRUE) - -include(GrPython) - -######################################################################## -# Builds a swig documentation file to be generated into python docstrings -# Usage: GR_SWIG_MAKE_DOCS(output_file input_path input_path....) -# -# Set the following variable to specify extra dependent targets: -# - GR_SWIG_DOCS_SOURCE_DEPS -# - GR_SWIG_DOCS_TARGET_DEPS -######################################################################## -function(GR_SWIG_MAKE_DOCS output_file) - if(ENABLE_DOXYGEN) - - #setup the input files variable list, quote formated - set(input_files) - unset(INPUT_PATHS) - foreach(input_path ${ARGN}) - if(IS_DIRECTORY ${input_path}) #when input path is a directory - file(GLOB input_path_h_files ${input_path}/*.h) - else() #otherwise its just a file, no glob - set(input_path_h_files ${input_path}) - endif() - list(APPEND input_files ${input_path_h_files}) - set(INPUT_PATHS "${INPUT_PATHS} \"${input_path}\"") - endforeach(input_path) - - #determine the output directory - get_filename_component(name ${output_file} NAME_WE) - get_filename_component(OUTPUT_DIRECTORY ${output_file} PATH) - set(OUTPUT_DIRECTORY ${OUTPUT_DIRECTORY}/${name}_swig_docs) - make_directory(${OUTPUT_DIRECTORY}) - - #generate the Doxyfile used by doxygen - configure_file( - ${CMAKE_SOURCE_DIR}/docs/doxygen/Doxyfile.swig_doc.in - ${OUTPUT_DIRECTORY}/Doxyfile - @ONLY) - - #Create a dummy custom command that depends on other targets - include(GrMiscUtils) - GR_GEN_TARGET_DEPS(_${name}_tag tag_deps ${GR_SWIG_DOCS_TARGET_DEPS}) - - #call doxygen on the Doxyfile + input headers - add_custom_command( - OUTPUT ${OUTPUT_DIRECTORY}/xml/index.xml - DEPENDS ${input_files} ${GR_SWIG_DOCS_SOURCE_DEPS} ${tag_deps} - COMMAND ${DOXYGEN_EXECUTABLE} ${OUTPUT_DIRECTORY}/Doxyfile - COMMENT "Generating doxygen xml for ${name} docs" - ) - - #call the swig_doc script on the xml files - add_custom_command( - OUTPUT ${output_file} - DEPENDS ${input_files} ${stamp-file} ${OUTPUT_DIRECTORY}/xml/index.xml - COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} - ${CMAKE_SOURCE_DIR}/docs/doxygen/swig_doc.py - ${OUTPUT_DIRECTORY}/xml - ${output_file} - COMMENT "Generating python docstrings for ${name}" - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/docs/doxygen - ) - - else(ENABLE_DOXYGEN) - file(WRITE ${output_file} "\n") #no doxygen -> empty file - endif(ENABLE_DOXYGEN) -endfunction(GR_SWIG_MAKE_DOCS) - -######################################################################## -# Build a swig target for the common gnuradio use case. Usage: -# GR_SWIG_MAKE(target ifile ifile ifile...) -# -# Set the following variables before calling: -# - GR_SWIG_FLAGS -# - GR_SWIG_INCLUDE_DIRS -# - GR_SWIG_LIBRARIES -# - GR_SWIG_SOURCE_DEPS -# - GR_SWIG_TARGET_DEPS -# - GR_SWIG_DOC_FILE -# - GR_SWIG_DOC_DIRS -######################################################################## -macro(GR_SWIG_MAKE name) - set(ifiles ${ARGN}) - - # Shimming this in here to take care of a SWIG bug with handling - # vector and vector (on 32-bit machines) and - # vector (on 64-bit machines). Use this to test - # the size of size_t, then set SIZE_T_32 if it's a 32-bit machine - # or not if it's 64-bit. The logic in gr_type.i handles the rest. - INCLUDE(CheckTypeSize) - CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T) - CHECK_TYPE_SIZE("unsigned int" SIZEOF_UINT) - if(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT}) - list(APPEND GR_SWIG_FLAGS -DSIZE_T_32) - endif(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT}) - - #do swig doc generation if specified - if(GR_SWIG_DOC_FILE) - set(GR_SWIG_DOCS_SOURCE_DEPS ${GR_SWIG_SOURCE_DEPS}) - list(APPEND GR_SWIG_DOCS_TARGET_DEPS ${GR_SWIG_TARGET_DEPS}) - GR_SWIG_MAKE_DOCS(${GR_SWIG_DOC_FILE} ${GR_SWIG_DOC_DIRS}) - add_custom_target(${name}_swig_doc DEPENDS ${GR_SWIG_DOC_FILE}) - list(APPEND GR_SWIG_TARGET_DEPS ${name}_swig_doc ${GR_RUNTIME_SWIG_DOC_FILE}) - endif() - - #append additional include directories - find_package(PythonLibs 2) - list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH}) #deprecated name (now dirs) - list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS}) - - #prepend local swig directories - list(INSERT GR_SWIG_INCLUDE_DIRS 0 ${CMAKE_CURRENT_SOURCE_DIR}) - list(INSERT GR_SWIG_INCLUDE_DIRS 0 ${CMAKE_CURRENT_BINARY_DIR}) - - #determine include dependencies for swig file - execute_process( - COMMAND ${PYTHON_EXECUTABLE} - ${CMAKE_BINARY_DIR}/get_swig_deps.py - "${ifiles}" "${GR_SWIG_INCLUDE_DIRS}" - OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_VARIABLE SWIG_MODULE_${name}_EXTRA_DEPS - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - - #Create a dummy custom command that depends on other targets - include(GrMiscUtils) - GR_GEN_TARGET_DEPS(_${name}_swig_tag tag_deps ${GR_SWIG_TARGET_DEPS}) - set(tag_file ${CMAKE_CURRENT_BINARY_DIR}/${name}.tag) - add_custom_command( - OUTPUT ${tag_file} - DEPENDS ${GR_SWIG_SOURCE_DEPS} ${tag_deps} - COMMAND ${CMAKE_COMMAND} -E touch ${tag_file} - ) - - #append the specified include directories - include_directories(${GR_SWIG_INCLUDE_DIRS}) - list(APPEND SWIG_MODULE_${name}_EXTRA_DEPS ${tag_file}) - - #setup the swig flags with flags and include directories - set(CMAKE_SWIG_FLAGS -fvirtual -modern -keyword -w511 -module ${name} ${GR_SWIG_FLAGS}) - foreach(dir ${GR_SWIG_INCLUDE_DIRS}) - list(APPEND CMAKE_SWIG_FLAGS "-I${dir}") - endforeach(dir) - - #set the C++ property on the swig .i file so it builds - set_source_files_properties(${ifiles} PROPERTIES CPLUSPLUS ON) - - #setup the actual swig library target to be built - include(UseSWIG) - SWIG_ADD_MODULE(${name} python ${ifiles}) - SWIG_LINK_LIBRARIES(${name} ${PYTHON_LIBRARIES} ${GR_SWIG_LIBRARIES}) - if(${name} STREQUAL "runtime_swig") - SET_TARGET_PROPERTIES(${SWIG_MODULE_runtime_swig_REAL_NAME} PROPERTIES DEFINE_SYMBOL "gnuradio_runtime_EXPORTS") - endif(${name} STREQUAL "runtime_swig") - -endmacro(GR_SWIG_MAKE) - -######################################################################## -# Install swig targets generated by GR_SWIG_MAKE. Usage: -# GR_SWIG_INSTALL( -# TARGETS target target target... -# [DESTINATION destination] -# [COMPONENT component] -# ) -######################################################################## -macro(GR_SWIG_INSTALL) - - include(CMakeParseArgumentsCopy) - CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION;COMPONENT" "TARGETS" ${ARGN}) - - foreach(name ${GR_SWIG_INSTALL_TARGETS}) - install(TARGETS ${SWIG_MODULE_${name}_REAL_NAME} - DESTINATION ${GR_SWIG_INSTALL_DESTINATION} - COMPONENT ${GR_SWIG_INSTALL_COMPONENT} - ) - - include(GrPython) - GR_PYTHON_INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.py - DESTINATION ${GR_SWIG_INSTALL_DESTINATION} - COMPONENT ${GR_SWIG_INSTALL_COMPONENT} - ) - - GR_LIBTOOL( - TARGET ${SWIG_MODULE_${name}_REAL_NAME} - DESTINATION ${GR_SWIG_INSTALL_DESTINATION} - ) - - endforeach(name) - -endmacro(GR_SWIG_INSTALL) - -######################################################################## -# Generate a python file that can determine swig dependencies. -# Used by the make macro above to determine extra dependencies. -# When you build C++, CMake figures out the header dependencies. -# This code essentially performs that logic for swig includes. -######################################################################## -file(WRITE ${CMAKE_BINARY_DIR}/get_swig_deps.py " - -import os, sys, re - -i_include_matcher = re.compile('%(include|import)\\s*[<|\"](.*)[>|\"]') -h_include_matcher = re.compile('#(include)\\s*[<|\"](.*)[>|\"]') -include_dirs = sys.argv[2].split(';') - -def get_swig_incs(file_path): - if file_path.endswith('.i'): matcher = i_include_matcher - else: matcher = h_include_matcher - file_contents = open(file_path, 'r').read() - return matcher.findall(file_contents, re.MULTILINE) - -def get_swig_deps(file_path, level): - deps = [file_path] - if level == 0: return deps - for keyword, inc_file in get_swig_incs(file_path): - for inc_dir in include_dirs: - inc_path = os.path.join(inc_dir, inc_file) - if not os.path.exists(inc_path): continue - deps.extend(get_swig_deps(inc_path, level-1)) - break #found, we dont search in lower prio inc dirs - return deps - -if __name__ == '__main__': - ifiles = sys.argv[1].split(';') - deps = sum([get_swig_deps(ifile, 3) for ifile in ifiles], []) - #sys.stderr.write(';'.join(set(deps)) + '\\n\\n') - print(';'.join(set(deps))) -") diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake deleted file mode 100644 index 62caab4..0000000 --- a/cmake/Modules/GrTest.cmake +++ /dev/null @@ -1,143 +0,0 @@ -# Copyright 2010-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - -if(DEFINED __INCLUDED_GR_TEST_CMAKE) - return() -endif() -set(__INCLUDED_GR_TEST_CMAKE TRUE) - -######################################################################## -# Add a unit test and setup the environment for a unit test. -# Takes the same arguments as the ADD_TEST function. -# -# Before calling set the following variables: -# GR_TEST_TARGET_DEPS - built targets for the library path -# GR_TEST_LIBRARY_DIRS - directories for the library path -# GR_TEST_PYTHON_DIRS - directories for the python path -# GR_TEST_ENVIRONS - other environment key/value pairs -######################################################################## -function(GR_ADD_TEST test_name) - - #Ensure that the build exe also appears in the PATH. - list(APPEND GR_TEST_TARGET_DEPS ${ARGN}) - - #In the land of windows, all libraries must be in the PATH. - #Since the dependent libraries are not yet installed, - #we must manually set them in the PATH to run tests. - #The following appends the path of a target dependency. - foreach(target ${GR_TEST_TARGET_DEPS}) - get_target_property(location ${target} LOCATION) - if(location) - get_filename_component(path ${location} PATH) - string(REGEX REPLACE "\\$\\(.*\\)" ${CMAKE_BUILD_TYPE} path ${path}) - list(APPEND GR_TEST_LIBRARY_DIRS ${path}) - endif(location) - endforeach(target) - - if(WIN32) - #SWIG generates the python library files into a subdirectory. - #Therefore, we must append this subdirectory into PYTHONPATH. - #Only do this for the python directories matching the following: - foreach(pydir ${GR_TEST_PYTHON_DIRS}) - get_filename_component(name ${pydir} NAME) - if(name MATCHES "^(swig|lib|src)$") - list(APPEND GR_TEST_PYTHON_DIRS ${pydir}/${CMAKE_BUILD_TYPE}) - endif() - endforeach(pydir) - endif(WIN32) - - file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} srcdir) - file(TO_NATIVE_PATH "${GR_TEST_LIBRARY_DIRS}" libpath) #ok to use on dir list? - file(TO_NATIVE_PATH "${GR_TEST_PYTHON_DIRS}" pypath) #ok to use on dir list? - - set(environs "VOLK_GENERIC=1" "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}") - list(APPEND environs ${GR_TEST_ENVIRONS}) - - #http://www.cmake.org/pipermail/cmake/2009-May/029464.html - #Replaced this add test + set environs code with the shell script generation. - #Its nicer to be able to manually run the shell script to diagnose problems. - #ADD_TEST(${ARGV}) - #SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "${environs}") - - if(UNIX) - set(LD_PATH_VAR "LD_LIBRARY_PATH") - if(APPLE) - set(LD_PATH_VAR "DYLD_LIBRARY_PATH") - endif() - - set(binpath "${CMAKE_CURRENT_BINARY_DIR}:$PATH") - list(APPEND libpath "$${LD_PATH_VAR}") - list(APPEND pypath "$PYTHONPATH") - - #replace list separator with the path separator - string(REPLACE ";" ":" libpath "${libpath}") - string(REPLACE ";" ":" pypath "${pypath}") - list(APPEND environs "PATH=${binpath}" "${LD_PATH_VAR}=${libpath}" "PYTHONPATH=${pypath}") - - #generate a bat file that sets the environment and runs the test - if (CMAKE_CROSSCOMPILING) - set(SHELL "/bin/sh") - else(CMAKE_CROSSCOMPILING) - find_program(SHELL sh) - endif(CMAKE_CROSSCOMPILING) - set(sh_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.sh) - file(WRITE ${sh_file} "#!${SHELL}\n") - #each line sets an environment variable - foreach(environ ${environs}) - file(APPEND ${sh_file} "export ${environ}\n") - endforeach(environ) - #load the command to run with its arguments - foreach(arg ${ARGN}) - file(APPEND ${sh_file} "${arg} ") - endforeach(arg) - file(APPEND ${sh_file} "\n") - - #make the shell file executable - execute_process(COMMAND chmod +x ${sh_file}) - - add_test(${test_name} ${SHELL} ${sh_file}) - - endif(UNIX) - - if(WIN32) - list(APPEND libpath ${DLL_PATHS} "%PATH%") - list(APPEND pypath "%PYTHONPATH%") - - #replace list separator with the path separator (escaped) - string(REPLACE ";" "\\;" libpath "${libpath}") - string(REPLACE ";" "\\;" pypath "${pypath}") - list(APPEND environs "PATH=${libpath}" "PYTHONPATH=${pypath}") - - #generate a bat file that sets the environment and runs the test - set(bat_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.bat) - file(WRITE ${bat_file} "@echo off\n") - #each line sets an environment variable - foreach(environ ${environs}) - file(APPEND ${bat_file} "SET ${environ}\n") - endforeach(environ) - #load the command to run with its arguments - foreach(arg ${ARGN}) - file(APPEND ${bat_file} "${arg} ") - endforeach(arg) - file(APPEND ${bat_file} "\n") - - add_test(${test_name} ${bat_file}) - endif(WIN32) - -endfunction(GR_ADD_TEST) diff --git a/cmake/Modules/UseSWIG.cmake b/cmake/Modules/UseSWIG.cmake deleted file mode 100644 index c0f1728..0000000 --- a/cmake/Modules/UseSWIG.cmake +++ /dev/null @@ -1,304 +0,0 @@ -# - SWIG module for CMake -# Defines the following macros: -# SWIG_ADD_MODULE(name language [ files ]) -# - Define swig module with given name and specified language -# SWIG_LINK_LIBRARIES(name [ libraries ]) -# - Link libraries to swig module -# All other macros are for internal use only. -# To get the actual name of the swig module, -# use: ${SWIG_MODULE_${name}_REAL_NAME}. -# Set Source files properties such as CPLUSPLUS and SWIG_FLAGS to specify -# special behavior of SWIG. Also global CMAKE_SWIG_FLAGS can be used to add -# special flags to all swig calls. -# Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify -# where to write all the swig generated module (swig -outdir option) -# The name-specific variable SWIG_MODULE__EXTRA_DEPS may be used -# to specify extra dependencies for the generated modules. -# If the source file generated by swig need some special flag you can use -# set_source_files_properties( ${swig_generated_file_fullname} -# PROPERTIES COMPILE_FLAGS "-bla") - - -#============================================================================= -# Copyright 2004-2009 Kitware, Inc. -# Copyright 2009 Mathieu Malaterre -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -set(SWIG_CXX_EXTENSION "cxx") -set(SWIG_EXTRA_LIBRARIES "") - -set(SWIG_PYTHON_EXTRA_FILE_EXTENSION "py") - -# -# For given swig module initialize variables associated with it -# -macro(SWIG_MODULE_INITIALIZE name language) - string(TOUPPER "${language}" swig_uppercase_language) - string(TOLOWER "${language}" swig_lowercase_language) - set(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}") - set(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_language}") - - set(SWIG_MODULE_${name}_REAL_NAME "${name}") - if("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "UNKNOWN") - message(FATAL_ERROR "SWIG Error: Language \"${language}\" not found") - elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PYTHON") - # when swig is used without the -interface it will produce in the module.py - # a 'import _modulename' statement, which implies having a corresponding - # _modulename.so (*NIX), _modulename.pyd (Win32). - set(SWIG_MODULE_${name}_REAL_NAME "_${name}") - elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL") - set(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow") - endif() -endmacro() - -# -# For a given language, input file, and output file, determine extra files that -# will be generated. This is internal swig macro. -# - -macro(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile) - set(${outfiles} "") - get_source_file_property(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename - ${infile} SWIG_MODULE_NAME) - if(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND") - get_filename_component(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename "${infile}" NAME_WE) - endif() - foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSION}) - set(${outfiles} ${${outfiles}} - "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}") - endforeach() -endmacro() - -# -# Take swig (*.i) file and add proper custom commands for it -# -macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) - set(swig_full_infile ${infile}) - get_filename_component(swig_source_file_path "${infile}" PATH) - get_filename_component(swig_source_file_name_we "${infile}" NAME_WE) - get_source_file_property(swig_source_file_generated ${infile} GENERATED) - get_source_file_property(swig_source_file_cplusplus ${infile} CPLUSPLUS) - get_source_file_property(swig_source_file_flags ${infile} SWIG_FLAGS) - if("${swig_source_file_flags}" STREQUAL "NOTFOUND") - set(swig_source_file_flags "") - endif() - set(swig_source_file_fullname "${infile}") - if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}") - string(REGEX REPLACE - "^${CMAKE_CURRENT_SOURCE_DIR}" "" - swig_source_file_relative_path - "${swig_source_file_path}") - else() - if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}") - string(REGEX REPLACE - "^${CMAKE_CURRENT_BINARY_DIR}" "" - swig_source_file_relative_path - "${swig_source_file_path}") - set(swig_source_file_generated 1) - else() - set(swig_source_file_relative_path "${swig_source_file_path}") - if(swig_source_file_generated) - set(swig_source_file_fullname "${CMAKE_CURRENT_BINARY_DIR}/${infile}") - else() - set(swig_source_file_fullname "${CMAKE_CURRENT_SOURCE_DIR}/${infile}") - endif() - endif() - endif() - - set(swig_generated_file_fullname - "${CMAKE_CURRENT_BINARY_DIR}") - if(swig_source_file_relative_path) - set(swig_generated_file_fullname - "${swig_generated_file_fullname}/${swig_source_file_relative_path}") - endif() - # If CMAKE_SWIG_OUTDIR was specified then pass it to -outdir - if(CMAKE_SWIG_OUTDIR) - set(swig_outdir ${CMAKE_SWIG_OUTDIR}) - else() - set(swig_outdir ${CMAKE_CURRENT_BINARY_DIR}) - endif() - SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE} - swig_extra_generated_files - "${swig_outdir}" - "${infile}") - set(swig_generated_file_fullname - "${swig_generated_file_fullname}/${swig_source_file_name_we}") - # add the language into the name of the file (i.e. TCL_wrap) - # this allows for the same .i file to be wrapped into different languages - set(swig_generated_file_fullname - "${swig_generated_file_fullname}${SWIG_MODULE_${name}_LANGUAGE}_wrap") - - if(swig_source_file_cplusplus) - set(swig_generated_file_fullname - "${swig_generated_file_fullname}.${SWIG_CXX_EXTENSION}") - else() - set(swig_generated_file_fullname - "${swig_generated_file_fullname}.c") - endif() - - # Shut up some warnings from poor SWIG code generation that we - # can do nothing about, when this flag is available - include(CheckCXXCompilerFlag) - check_cxx_compiler_flag("-Wno-unused-but-set-variable" HAVE_WNO_UNUSED_BUT_SET_VARIABLE) - if(HAVE_WNO_UNUSED_BUT_SET_VARIABLE) - set_source_files_properties(${swig_generated_file_fullname} - PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable") - endif(HAVE_WNO_UNUSED_BUT_SET_VARIABLE) - - get_directory_property(cmake_include_directories INCLUDE_DIRECTORIES) - set(swig_include_dirs) - foreach(it ${cmake_include_directories}) - set(swig_include_dirs ${swig_include_dirs} "-I${it}") - endforeach() - - set(swig_special_flags) - # default is c, so add c++ flag if it is c++ - if(swig_source_file_cplusplus) - set(swig_special_flags ${swig_special_flags} "-c++") - endif() - set(swig_extra_flags) - if(SWIG_MODULE_${name}_EXTRA_FLAGS) - set(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS}) - endif() - - # hack to work around CMake bug in add_custom_command with multiple OUTPUT files - - file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) - execute_process( - COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib -unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5] -print(re.sub('\\W', '_', '${name} ${reldir} ' + unique))" - OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - file( - WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp.in - "int main(void){return 0;}\n" - ) - - # create dummy dependencies - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp.in - ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp - DEPENDS "${swig_source_file_fullname}" ${SWIG_MODULE_${name}_EXTRA_DEPS} - COMMENT "" - ) - - # create the dummy target - add_executable(${_target} ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp) - - # add a custom command to the dummy target - add_custom_command( - TARGET ${_target} - # Let's create the ${swig_outdir} at execution time, in case dir contains $(OutDir) - COMMAND ${CMAKE_COMMAND} -E make_directory ${swig_outdir} - COMMAND "${SWIG_EXECUTABLE}" - ARGS "-${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}" - ${swig_source_file_flags} - ${CMAKE_SWIG_FLAGS} - -outdir ${swig_outdir} - ${swig_special_flags} - ${swig_extra_flags} - ${swig_include_dirs} - -o "${swig_generated_file_fullname}" - "${swig_source_file_fullname}" - COMMENT "Swig source" - ) - - #add dummy independent dependencies from the _target to each file - #that will be generated by the SWIG command above - - set(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files}) - - foreach(swig_gen_file ${${outfiles}}) - add_custom_command( - OUTPUT ${swig_gen_file} - COMMAND "" - DEPENDS ${_target} - COMMENT "" - ) - endforeach() - - set_source_files_properties( - ${outfiles} PROPERTIES GENERATED 1 - ) - -endmacro() - -# -# Create Swig module -# -macro(SWIG_ADD_MODULE name language) - SWIG_MODULE_INITIALIZE(${name} ${language}) - set(swig_dot_i_sources) - set(swig_other_sources) - foreach(it ${ARGN}) - if(${it} MATCHES ".*\\.i$") - set(swig_dot_i_sources ${swig_dot_i_sources} "${it}") - else() - set(swig_other_sources ${swig_other_sources} "${it}") - endif() - endforeach() - - set(swig_generated_sources) - foreach(it ${swig_dot_i_sources}) - SWIG_ADD_SOURCE_TO_MODULE(${name} swig_generated_source ${it}) - set(swig_generated_sources ${swig_generated_sources} "${swig_generated_source}") - endforeach() - get_directory_property(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES) - set_directory_properties(PROPERTIES - ADDITIONAL_MAKE_CLEAN_FILES "${swig_extra_clean_files};${swig_generated_sources}") - add_library(${SWIG_MODULE_${name}_REAL_NAME} - MODULE - ${swig_generated_sources} - ${swig_other_sources}) - string(TOLOWER "${language}" swig_lowercase_language) - if ("${swig_lowercase_language}" STREQUAL "java") - if (APPLE) - # In java you want: - # System.loadLibrary("LIBRARY"); - # then JNI will look for a library whose name is platform dependent, namely - # MacOS : libLIBRARY.jnilib - # Windows: LIBRARY.dll - # Linux : libLIBRARY.so - set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".jnilib") - endif () - endif () - if ("${swig_lowercase_language}" STREQUAL "python") - # this is only needed for the python case where a _modulename.so is generated - set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "") - # Python extension modules on Windows must have the extension ".pyd" - # instead of ".dll" as of Python 2.5. Older python versions do support - # this suffix. - # http://docs.python.org/whatsnew/ports.html#SECTION0001510000000000000000 - # - # Windows: .dll is no longer supported as a filename extension for extension modules. - # .pyd is now the only filename extension that will be searched for. - # - if(WIN32 AND NOT CYGWIN) - set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd") - endif() - endif () -endmacro() - -# -# Like TARGET_LINK_LIBRARIES but for swig modules -# -macro(SWIG_LINK_LIBRARIES name) - if(SWIG_MODULE_${name}_REAL_NAME) - target_link_libraries(${SWIG_MODULE_${name}_REAL_NAME} ${ARGN}) - else() - message(SEND_ERROR "Cannot find Swig library \"${name}\".") - endif() -endmacro() diff --git a/cmake/Modules/dvbgseConfig.cmake b/cmake/Modules/dvbgseConfig.cmake index 7355064..0ccdb7b 100644 --- a/cmake/Modules/dvbgseConfig.cmake +++ b/cmake/Modules/dvbgseConfig.cmake @@ -22,9 +22,10 @@ FIND_LIBRARY( /usr/local/lib64 /usr/lib /usr/lib64 -) + ) + +include("${CMAKE_CURRENT_LIST_DIR}/dvbgseTarget.cmake") INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(DVBGSE DEFAULT_MSG DVBGSE_LIBRARIES DVBGSE_INCLUDE_DIRS) MARK_AS_ADVANCED(DVBGSE_LIBRARIES DVBGSE_INCLUDE_DIRS) - diff --git a/python/build_utils_codes.py b/cmake/Modules/targetConfig.cmake.in similarity index 52% rename from python/build_utils_codes.py rename to cmake/Modules/targetConfig.cmake.in index 9ea96ba..79e4a28 100644 --- a/python/build_utils_codes.py +++ b/cmake/Modules/targetConfig.cmake.in @@ -1,5 +1,4 @@ -# -# Copyright 2004 Free Software Foundation, Inc. +# Copyright 2018 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -17,36 +16,11 @@ # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# - -def i_code (code3): - return code3[0] - -def o_code (code3): - if len (code3) >= 2: - return code3[1] - else: - return code3[0] - -def tap_code (code3): - if len (code3) >= 3: - return code3[2] - else: - return code3[0] - -def i_type (code3): - return char_to_type[i_code (code3)] - -def o_type (code3): - return char_to_type[o_code (code3)] - -def tap_type (code3): - return char_to_type[tap_code (code3)] +include(CMakeFindDependencyMacro) -char_to_type = {} -char_to_type['s'] = 'short' -char_to_type['i'] = 'int' -char_to_type['f'] = 'float' -char_to_type['c'] = 'gr_complex' -char_to_type['b'] = 'unsigned char' +set(target_deps "@TARGET_DEPENDENCIES@") +foreach(dep IN LISTS target_deps) + find_dependency(${dep}) +endforeach() +include("${CMAKE_CURRENT_LIST_DIR}/@TARGET@Targets.cmake") diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index f16fbf6..ea43d85 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright 2011 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt index 1b44799..275d063 100644 --- a/docs/doxygen/CMakeLists.txt +++ b/docs/doxygen/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright 2011 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in index cfae3de..d2a6ce8 100644 --- a/docs/doxygen/Doxyfile.in +++ b/docs/doxygen/Doxyfile.in @@ -654,8 +654,8 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @top_srcdir@ \ - @top_builddir@ +INPUT = "@top_srcdir@" \ + "@top_builddir@" # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -790,7 +790,7 @@ INPUT_FILTER = # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. -FILTER_PATTERNS = *.py=@top_srcdir@/doc/doxygen/other/doxypy.py +FILTER_PATTERNS = *.py="@top_srcdir@"/doc/doxygen/other/doxypy.py # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source @@ -945,7 +945,7 @@ HTML_STYLESHEET = # user-defined cascading style sheet that is included after the standard # style sheets created by doxygen. Using this option one can overrule # certain style aspects. This is preferred over using HTML_STYLESHEET -# since it does not replace the standard style sheet and is therefor more +# since it does not replace the standard style sheet and is therefore more # robust against future updates. Doxygen will copy the style sheet file to # the output directory. @@ -989,7 +989,7 @@ HTML_COLORSTYLE_GAMMA = 80 # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. -HTML_TIMESTAMP = YES +HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the diff --git a/docs/doxygen/Doxyfile.swig_doc.in b/docs/doxygen/Doxyfile.swig_doc.in index 19e17dc..cbe06d6 100644 --- a/docs/doxygen/Doxyfile.swig_doc.in +++ b/docs/doxygen/Doxyfile.swig_doc.in @@ -54,7 +54,7 @@ PROJECT_LOGO = # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@ +OUTPUT_DIRECTORY = "@OUTPUT_DIRECTORY@" # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -121,7 +121,7 @@ INLINE_INHERITED_MEMB = NO # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. -FULL_PATH_NAMES = YES +FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is @@ -913,7 +913,7 @@ HTML_STYLESHEET = # user-defined cascading style sheet that is included after the standard # style sheets created by doxygen. Using this option one can overrule # certain style aspects. This is preferred over using HTML_STYLESHEET -# since it does not replace the standard style sheet and is therefor more +# since it does not replace the standard style sheet and is therefore more # robust against future updates. Doxygen will copy the style sheet file to # the output directory. @@ -957,7 +957,7 @@ HTML_COLORSTYLE_GAMMA = 80 # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. -HTML_TIMESTAMP = YES +HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the diff --git a/docs/doxygen/doxyxml/__init__.py b/docs/doxygen/doxyxml/__init__.py index 5cd0b3c..553777d 100644 --- a/docs/doxygen/doxyxml/__init__.py +++ b/docs/doxygen/doxyxml/__init__.py @@ -1,7 +1,8 @@ # # Copyright 2010 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -63,8 +64,9 @@ u'Outputs the vital aadvark statistics.' """ +from __future__ import unicode_literals -from doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther +from .doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther def _test(): import os diff --git a/docs/doxygen/doxyxml/base.py b/docs/doxygen/doxyxml/base.py index e8f026a..e7f14ff 100644 --- a/docs/doxygen/doxyxml/base.py +++ b/docs/doxygen/doxyxml/base.py @@ -1,7 +1,8 @@ # # Copyright 2010 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,24 +25,26 @@ Classes based upon this are used to make more user-friendly interfaces to the doxygen xml docs than the generated classes provide. """ +from __future__ import print_function +from __future__ import unicode_literals import os import pdb from xml.parsers.expat import ExpatError -from generated import compound +from .generated import compound class Base(object): - class Duplicate(StandardError): + class Duplicate(Exception): pass - class NoSuchMember(StandardError): + class NoSuchMember(Exception): pass - class ParsingError(StandardError): + class ParsingError(Exception): pass def __init__(self, parse_data, top=None): @@ -94,7 +97,7 @@ def get_cls(self, mem): for cls in self.mem_classes: if cls.can_parse(mem): return cls - raise StandardError(("Did not find a class for object '%s'." \ + raise Exception(("Did not find a class for object '%s'." \ % (mem.get_name()))) def convert_mem(self, mem): @@ -102,11 +105,11 @@ def convert_mem(self, mem): cls = self.get_cls(mem) converted = cls.from_parse_data(mem, self.top) if converted is None: - raise StandardError('No class matched this object.') + raise Exception('No class matched this object.') self.add_ref(converted) return converted - except StandardError, e: - print e + except Exception as e: + print(e) @classmethod def includes(cls, inst): diff --git a/docs/doxygen/doxyxml/doxyindex.py b/docs/doxygen/doxyxml/doxyindex.py index 78e8153..670f4e8 100644 --- a/docs/doxygen/doxyxml/doxyindex.py +++ b/docs/doxygen/doxyxml/doxyindex.py @@ -1,7 +1,8 @@ # # Copyright 2010 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,12 +23,14 @@ Classes providing more user-friendly interfaces to the doxygen xml docs than the generated classes provide. """ +from __future__ import absolute_import +from __future__ import unicode_literals import os -from generated import index -from base import Base -from text import description +from .generated import index +from .base import Base +from .text import description class DoxyIndex(Base): """ diff --git a/docs/doxygen/doxyxml/generated/__init__.py b/docs/doxygen/doxyxml/generated/__init__.py index 3982397..23095c1 100644 --- a/docs/doxygen/doxyxml/generated/__init__.py +++ b/docs/doxygen/doxyxml/generated/__init__.py @@ -5,3 +5,4 @@ resultant classes are not very friendly to navigate so the rest of the doxyxml module processes them further. """ +from __future__ import unicode_literals diff --git a/docs/doxygen/doxyxml/generated/compound.py b/docs/doxygen/doxyxml/generated/compound.py index 1522ac2..acfa0dd 100644 --- a/docs/doxygen/doxyxml/generated/compound.py +++ b/docs/doxygen/doxyxml/generated/compound.py @@ -3,15 +3,17 @@ """ Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ +from __future__ import absolute_import +from __future__ import unicode_literals + -from string import lower as str_lower from xml.dom import minidom from xml.dom import Node import sys -import compoundsuper as supermod -from compoundsuper import MixedContainer +from . import compoundsuper as supermod +from .compoundsuper import MixedContainer class DoxygenTypeSub(supermod.DoxygenType): diff --git a/docs/doxygen/doxyxml/generated/compoundsuper.py b/docs/doxygen/doxyxml/generated/compoundsuper.py index 6255dda..6e984e1 100644 --- a/docs/doxygen/doxyxml/generated/compoundsuper.py +++ b/docs/doxygen/doxyxml/generated/compoundsuper.py @@ -4,12 +4,17 @@ # Generated Thu Jun 11 18:44:25 2009 by generateDS.py. # +from __future__ import print_function +from __future__ import unicode_literals + import sys -import getopt -from string import lower as str_lower + from xml.dom import minidom from xml.dom import Node +import six + + # # User methods # @@ -19,9 +24,9 @@ try: from generatedssuper import GeneratedsSuper -except ImportError, exp: +except ImportError as exp: - class GeneratedsSuper: + class GeneratedsSuper(object): def format_string(self, input_data, input_name=''): return input_data def format_integer(self, input_data, input_name=''): @@ -64,7 +69,7 @@ def showIndent(outfile, level): outfile.write(' ') def quote_xml(inStr): - s1 = (isinstance(inStr, basestring) and inStr or + s1 = (isinstance(inStr, six.string_types) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') @@ -72,7 +77,7 @@ def quote_xml(inStr): return s1 def quote_attrib(inStr): - s1 = (isinstance(inStr, basestring) and inStr or + s1 = (isinstance(inStr, six.string_types) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') @@ -102,7 +107,7 @@ def quote_python(inStr): return '"""%s"""' % s1 -class MixedContainer: +class MixedContainer(object): # Constants for category: CategoryNone = 0 CategoryText = 1 @@ -4221,7 +4226,7 @@ def buildAttributes(self, attrs): if attrs.get('lineno'): try: self.lineno = int(attrs.get('lineno').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (lineno): %s' % exp) if attrs.get('refkind'): self.refkind = attrs.get('refkind').value @@ -4504,12 +4509,12 @@ def buildAttributes(self, attrs): if attrs.get('endline'): try: self.endline = int(attrs.get('endline').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (endline): %s' % exp) if attrs.get('startline'): try: self.startline = int(attrs.get('startline').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (startline): %s' % exp) if attrs.get('refid'): self.refid = attrs.get('refid').value @@ -4627,17 +4632,17 @@ def buildAttributes(self, attrs): if attrs.get('bodystart'): try: self.bodystart = int(attrs.get('bodystart').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (bodystart): %s' % exp) if attrs.get('line'): try: self.line = int(attrs.get('line').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (line): %s' % exp) if attrs.get('bodyend'): try: self.bodyend = int(attrs.get('bodyend').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (bodyend): %s' % exp) if attrs.get('bodyfile'): self.bodyfile = attrs.get('bodyfile').value @@ -6778,12 +6783,12 @@ def buildAttributes(self, attrs): if attrs.get('rows'): try: self.rows = int(attrs.get('rows').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (rows): %s' % exp) if attrs.get('cols'): try: self.cols = int(attrs.get('cols').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (cols): %s' % exp) def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ @@ -7108,7 +7113,7 @@ def buildAttributes(self, attrs): if attrs.get('level'): try: self.level = int(attrs.get('level').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (level): %s' % exp) def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: @@ -8283,7 +8288,7 @@ def buildChildren(self, child_, nodeName_): """ def usage(): - print USAGE_TEXT + print(USAGE_TEXT) sys.exit(1) @@ -8339,4 +8344,3 @@ def main(): main() #import pdb #pdb.run('main()') - diff --git a/docs/doxygen/doxyxml/generated/index.py b/docs/doxygen/doxyxml/generated/index.py index 7a70e14..0c63512 100644 --- a/docs/doxygen/doxyxml/generated/index.py +++ b/docs/doxygen/doxyxml/generated/index.py @@ -3,14 +3,16 @@ """ Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ +from __future__ import absolute_import +from __future__ import unicode_literals from xml.dom import minidom import os import sys -import compound +from . import compound -import indexsuper as supermod +from . import indexsuper as supermod class DoxygenTypeSub(supermod.DoxygenType): def __init__(self, version=None, compound=None): diff --git a/docs/doxygen/doxyxml/generated/indexsuper.py b/docs/doxygen/doxyxml/generated/indexsuper.py index a991530..11312db 100644 --- a/docs/doxygen/doxyxml/generated/indexsuper.py +++ b/docs/doxygen/doxyxml/generated/indexsuper.py @@ -4,12 +4,16 @@ # Generated Thu Jun 11 18:43:54 2009 by generateDS.py. # +from __future__ import print_function +from __future__ import unicode_literals + import sys -import getopt -from string import lower as str_lower + from xml.dom import minidom from xml.dom import Node +import six + # # User methods # @@ -19,9 +23,9 @@ try: from generatedssuper import GeneratedsSuper -except ImportError, exp: +except ImportError as exp: - class GeneratedsSuper: + class GeneratedsSuper(object): def format_string(self, input_data, input_name=''): return input_data def format_integer(self, input_data, input_name=''): @@ -64,7 +68,7 @@ def showIndent(outfile, level): outfile.write(' ') def quote_xml(inStr): - s1 = (isinstance(inStr, basestring) and inStr or + s1 = (isinstance(inStr, six.string_types) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') @@ -72,7 +76,7 @@ def quote_xml(inStr): return s1 def quote_attrib(inStr): - s1 = (isinstance(inStr, basestring) and inStr or + s1 = (isinstance(inStr, six.string_types) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') @@ -102,7 +106,7 @@ def quote_python(inStr): return '"""%s"""' % s1 -class MixedContainer: +class MixedContainer(object): # Constants for category: CategoryNone = 0 CategoryText = 1 @@ -462,7 +466,7 @@ def buildChildren(self, child_, nodeName_): """ def usage(): - print USAGE_TEXT + print(USAGE_TEXT) sys.exit(1) @@ -520,4 +524,3 @@ def main(): main() #import pdb #pdb.run('main()') - diff --git a/docs/doxygen/doxyxml/text.py b/docs/doxygen/doxyxml/text.py index 629edd1..145652e 100644 --- a/docs/doxygen/doxyxml/text.py +++ b/docs/doxygen/doxyxml/text.py @@ -1,7 +1,8 @@ # # Copyright 2010 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,12 +22,13 @@ """ Utilities for extracting text from generated classes. """ +from __future__ import unicode_literals def is_string(txt): if isinstance(txt, str): return True try: - if isinstance(txt, unicode): + if isinstance(txt, str): return True except NameError: pass @@ -49,7 +51,7 @@ def description_bit(obj): elif is_string(obj): return obj else: - raise StandardError('Expecting a string or something with content, content_ or value attribute') + raise Exception('Expecting a string or something with content, content_ or value attribute') # If this bit is a paragraph then add one some line breaks. if hasattr(obj, 'name') and obj.name == 'para': result += "\n\n" diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py index d3536db..3ea5730 100644 --- a/docs/doxygen/swig_doc.py +++ b/docs/doxygen/swig_doc.py @@ -1,7 +1,8 @@ # # Copyright 2010-2012 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,6 +27,7 @@ python docstrings. """ +from __future__ import unicode_literals import sys, time @@ -79,13 +81,15 @@ def includes(cls, item): def utoascii(text): """ - Convert unicode text into ascii and escape quotes. + Convert unicode text into ascii and escape quotes and backslashes. """ if text is None: return '' out = text.encode('ascii', 'replace') - out = out.replace('"', '\\"') - return out + # swig will require us to replace blackslash with 4 backslashes + out = out.replace(b'\\', b'\\\\\\\\') + out = out.replace(b'"', b'\\"').decode('ascii') + return str(out) def combine_descriptions(obj): @@ -135,7 +139,7 @@ def make_entry(obj, name=None, templ="{description}", description=None, params=[ return entry_templ.format( name=name, docstring=docstring, - ) + ) def make_func_entry(func, name=None, description=None, params=None): @@ -226,12 +230,12 @@ def make_block2_entry(di, block): # the make function. output = [] output.append(make_class_entry( - block, description=description, - ignored_methods=['make'], params=make_func.params)) + block, description=description, + ignored_methods=['make'], params=make_func.params)) makename = block.name() + '::make' output.append(make_func_entry( - make_func, name=makename, description=description, - params=make_func.params)) + make_func, name=makename, description=description, + params=make_func.params)) return "\n\n".join(output) def make_swig_interface_file(di, swigdocfilename, custom_output=None): @@ -301,7 +305,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): output = "\n\n".join(output) - swig_doc = file(swigdocfilename, 'w') + swig_doc = open(swigdocfilename, 'w') swig_doc.write(output) swig_doc.close() @@ -309,7 +313,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): # Parse command line options and set up doxyxml. err_msg = "Execute using: python swig_doc.py xml_path outputfilename" if len(sys.argv) != 3: - raise StandardError(err_msg) + raise Exception(err_msg) xml_path = sys.argv[1] swigdocfilename = sys.argv[2] di = DoxyIndex(xml_path) diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index 950fcec..374632a 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright 2011 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,6 +19,6 @@ # Boston, MA 02110-1301, USA. install(FILES - dvbgse_bbheader_source.xml - dvbgse_bbheader_sink.xml DESTINATION share/gnuradio/grc/blocks + dvbgse_bbheader_source.block.yml + dvbgse_bbheader_sink.block.yml DESTINATION share/gnuradio/grc/blocks ) diff --git a/grc/dvbgse_bbheader_sink.block.yml b/grc/dvbgse_bbheader_sink.block.yml new file mode 100644 index 0000000..ce5f3ff --- /dev/null +++ b/grc/dvbgse_bbheader_sink.block.yml @@ -0,0 +1,122 @@ +# auto-generated by grc.converter + +id: dvbgse_bbheader_sink +label: IP Packet Sink +category: '[Core]/Digital Television/DVB-GSE' + +parameters: +- id: standard + label: Standard + dtype: enum + options: [STANDARD_DVBS2, STANDARD_DVBT2] + option_labels: [DVB-S2, DVB-T2] + option_attributes: + hide_dvbs2: [none, all] + hide_dvbt2: [all, none] + val: [dvbgse.STANDARD_DVBS2, dvbgse.STANDARD_DVBT2] +- id: framesize1 + label: FECFRAME size + dtype: enum + options: [FECFRAME_NORMAL, FECFRAME_SHORT] + option_labels: [Normal, Short] + option_attributes: + hide_medium: [all, all] + hide_normal: [none, all] + hide_short: [all, none] + val: [dvbgse.FECFRAME_NORMAL, dvbgse.FECFRAME_SHORT] + hide: ${ standard.hide_dvbt2 } +- id: framesize2 + label: FECFRAME size + dtype: enum + options: [FECFRAME_NORMAL, FECFRAME_MEDIUM, FECFRAME_SHORT] + option_labels: [Normal, Medium, Short] + option_attributes: + hide_medium: [all, none, all] + hide_normal: [none, all, all] + hide_short: [all, all, none] + val: [dvbgse.FECFRAME_NORMAL, dvbgse.FECFRAME_MEDIUM, dvbgse.FECFRAME_SHORT] + hide: ${ standard.hide_dvbs2 } +- id: rate1 + label: Code rate + dtype: enum + options: [C1_2, C3_5, C2_3, C3_4, C4_5, C5_6] + option_labels: [1/2, 3/5, 2/3, 3/4, 4/5, 5/6] + option_attributes: + val: [dvbgse.C1_2, dvbgse.C3_5, dvbgse.C2_3, dvbgse.C3_4, dvbgse.C4_5, dvbgse.C5_6] + hide: ${ (framesize1.hide_normal if str(standard) == 'STANDARD_DVBT2' else 'all') + } +- id: rate2 + label: Code rate + dtype: enum + options: [C1_3, C2_5, C1_2, C3_5, C2_3, C3_4, C4_5, C5_6] + option_labels: [1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6] + option_attributes: + val: [dvbgse.C1_3, dvbgse.C2_5, dvbgse.C1_2, dvbgse.C3_5, dvbgse.C2_3, dvbgse.C3_4, + dvbgse.C4_5, dvbgse.C5_6] + hide: ${ (framesize1.hide_short if str(standard) == 'STANDARD_DVBT2' else 'all') + } +- id: rate3 + label: Code rate + dtype: enum + options: [C1_4, C1_3, C2_5, C1_2, C3_5, C2_3, C3_4, C4_5, C5_6, C8_9, C9_10, C2_9_VLSNR, + C13_45, C9_20, C90_180, C96_180, C11_20, C100_180, C104_180, C26_45, C18_30, + C28_45, C23_36, C116_180, C20_30, C124_180, C25_36, C128_180, C13_18, C132_180, + C22_30, C135_180, C140_180, C7_9, C154_180] + option_labels: [1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 8/9, 9/10, 2/9 VL-SNR, + 13/45, 9/20, 90/180, 96/180, 11/20, 100/180, 104/180, 26/45, 18/30, 28/45, + 23/36, 116/180, 20/30, 124/180, 25/36, 128/180, 13/18, 132/180, 22/30, 135/180, + 140/180, 7/9, 154/180] + option_attributes: + val: [dvbgse.C1_4, dvbgse.C1_3, dvbgse.C2_5, dvbgse.C1_2, dvbgse.C3_5, dvbgse.C2_3, + dvbgse.C3_4, dvbgse.C4_5, dvbgse.C5_6, dvbgse.C8_9, dvbgse.C9_10, dvbgse.C2_9_VLSNR, + dvbgse.C13_45, dvbgse.C9_20, dvbgse.C90_180, dvbgse.C96_180, dvbgse.C11_20, + dvbgse.C100_180, dvbgse.C104_180, dvbgse.C26_45, dvbgse.C18_30, dvbgse.C28_45, + dvbgse.C23_36, dvbgse.C116_180, dvbgse.C20_30, dvbgse.C124_180, dvbgse.C25_36, + dvbgse.C128_180, dvbgse.C13_18, dvbgse.C132_180, dvbgse.C22_30, dvbgse.C135_180, + dvbgse.C140_180, dvbgse.C7_9, dvbgse.C154_180] + hide: ${ (framesize2.hide_normal if str(standard) == 'STANDARD_DVBS2' else 'all') + } +- id: rate4 + label: Code rate + dtype: enum + options: [C1_5_MEDIUM, C11_45_MEDIUM, C1_3_MEDIUM] + option_labels: [1/5, 11/45, 1/3] + option_attributes: + val: [dvbgse.C1_5_MEDIUM, dvbgse.C11_45_MEDIUM, dvbgse.C1_3_MEDIUM] + hide: ${ (framesize2.hide_medium if str(standard) == 'STANDARD_DVBS2' else 'all') + } +- id: rate5 + label: Code rate + dtype: enum + options: [C1_4, C1_3, C2_5, C1_2, C3_5, C2_3, C3_4, C4_5, C5_6, C8_9, C11_45, + C4_15, C14_45, C7_15, C8_15, C26_45, C32_45, C1_5_VLSNR_SF2, C11_45_VLSNR_SF2, + C1_5_VLSNR, C4_15_VLSNR, C1_3_VLSNR] + option_labels: [1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 8/9, 11/45, 4/15, + 14/45, 7/15, 8/15, 26/45, 32/45, 1/5 VL-SNR SF2, 11/45 VL-SNR SF2, 1/5 VL-SNR, + 4/15 VL-SNR, 1/3 VL-SNR] + option_attributes: + val: [dvbgse.C1_4, dvbgse.C1_3, dvbgse.C2_5, dvbgse.C1_2, dvbgse.C3_5, dvbgse.C2_3, + dvbgse.C3_4, dvbgse.C4_5, dvbgse.C5_6, dvbgse.C8_9, dvbgse.C11_45, dvbgse.C4_15, + dvbgse.C14_45, dvbgse.C7_15, dvbgse.C8_15, dvbgse.C26_45, dvbgse.C32_45, + dvbgse.C1_5_VLSNR_SF2, dvbgse.C11_45_VLSNR_SF2, dvbgse.C1_5_VLSNR, dvbgse.C4_15_VLSNR, + dvbgse.C1_3_VLSNR] + hide: ${ (framesize2.hide_short if str(standard) == 'STANDARD_DVBS2' else 'all') + } +- id: mac_address + label: MAC Address + dtype: string + +inputs: +- domain: stream + dtype: byte + +templates: + imports: import dvbgse + make: "dvbgse.bbheader_sink(${standard.val}, \n% if str(standard) == 'STANDARD_DVBT2':\n\ + ${framesize1.val}, \n% else:\n${framesize2.val}, \n% endif\n% if str(standard)\ + \ == 'STANDARD_DVBT2':\n% if str(framesize1) == 'FECFRAME_NORMAL':\n${rate1.val},\ + \ \n% else:\n${rate2.val}, \n% endif\n% else:\n% if str(framesize2) == 'FECFRAME_NORMAL':\n\ + ${rate3.val}, \n% elif str(framesize2) == 'FECFRAME_MEDIUM':\n${rate4.val},\ + \ \n% else:\n${rate5.val}, \n% endif\n% endif\n${mac_address})" + +file_format: 1 diff --git a/grc/dvbgse_bbheader_sink.xml b/grc/dvbgse_bbheader_sink.xml deleted file mode 100644 index 7853814..0000000 --- a/grc/dvbgse_bbheader_sink.xml +++ /dev/null @@ -1,515 +0,0 @@ - - - - IP Packet Sink - dvbgse_bbheader_sink - [Core]/Digital Television/DVB-GSE - import dvbgse - dvbgse.bbheader_sink($standard.val, #slurp) -#if str($standard) == 'STANDARD_DVBT2' -$framesize1.val, #slurp -#else -$framesize2.val, #slurp -#end if -#if str($standard) == 'STANDARD_DVBT2' -#if str($framesize1) == 'FECFRAME_NORMAL' -$rate1.val, #slurp -#else -$rate2.val, #slurp -#end if -#else -#if str($framesize2) == 'FECFRAME_NORMAL' -$rate3.val, #slurp -#else if str($framesize2) == 'FECFRAME_MEDIUM' -$rate4.val, #slurp -#else -$rate5.val, #slurp -#end if -#end if -$mac_address) - - Standard - standard - enum - - - - - FECFRAME size - framesize1 - enum - $standard.hide_dvbt2 - - - - - FECFRAME size - framesize2 - enum - $standard.hide_dvbs2 - - - - - - Code rate - rate1 - enum - #if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_normal else 'all' - - - - - - - - - Code rate - rate2 - enum - #if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_short else 'all' - - - - - - - - - - - Code rate - rate3 - enum - #if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_normal else 'all' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code rate - rate4 - enum - #if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_medium else 'all' - - - - - - Code rate - rate5 - enum - #if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_short else 'all' - - - - - - - - - - - - - - - - - - - - - - - - - MAC Address - mac_address - - string - - - in - byte - - diff --git a/grc/dvbgse_bbheader_source.block.yml b/grc/dvbgse_bbheader_source.block.yml new file mode 100644 index 0000000..58d97fd --- /dev/null +++ b/grc/dvbgse_bbheader_source.block.yml @@ -0,0 +1,175 @@ +# auto-generated by grc.converter + +id: dvbgse_bbheader_source +label: IP Packet Source +category: '[Core]/Digital Television/DVB-GSE' + +parameters: +- id: standard + label: Standard + dtype: enum + options: [STANDARD_DVBS2, STANDARD_DVBT2] + option_labels: [DVB-S2, DVB-T2] + option_attributes: + hide_dvbs2: [none, all] + hide_dvbt2: [all, none] + val: [dvbgse.STANDARD_DVBS2, dvbgse.STANDARD_DVBT2] +- id: framesize1 + label: FECFRAME size + dtype: enum + options: [FECFRAME_NORMAL, FECFRAME_SHORT] + option_labels: [Normal, Short] + option_attributes: + hide_medium: [all, all] + hide_normal: [none, all] + hide_short: [all, none] + val: [dvbgse.FECFRAME_NORMAL, dvbgse.FECFRAME_SHORT] + hide: ${ standard.hide_dvbt2 } +- id: framesize2 + label: FECFRAME size + dtype: enum + options: [FECFRAME_NORMAL, FECFRAME_MEDIUM, FECFRAME_SHORT] + option_labels: [Normal, Medium, Short] + option_attributes: + hide_medium: [all, none, all] + hide_normal: [none, all, all] + hide_short: [all, all, none] + val: [dvbgse.FECFRAME_NORMAL, dvbgse.FECFRAME_MEDIUM, dvbgse.FECFRAME_SHORT] + hide: ${ standard.hide_dvbs2 } +- id: rate1 + label: Code rate + dtype: enum + options: [C1_2, C3_5, C2_3, C3_4, C4_5, C5_6] + option_labels: [1/2, 3/5, 2/3, 3/4, 4/5, 5/6] + option_attributes: + val: [dvbgse.C1_2, dvbgse.C3_5, dvbgse.C2_3, dvbgse.C3_4, dvbgse.C4_5, dvbgse.C5_6] + hide: ${ (framesize1.hide_normal if str(standard) == 'STANDARD_DVBT2' else 'all') + } +- id: rate2 + label: Code rate + dtype: enum + options: [C1_3, C2_5, C1_2, C3_5, C2_3, C3_4, C4_5, C5_6] + option_labels: [1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6] + option_attributes: + val: [dvbgse.C1_3, dvbgse.C2_5, dvbgse.C1_2, dvbgse.C3_5, dvbgse.C2_3, dvbgse.C3_4, + dvbgse.C4_5, dvbgse.C5_6] + hide: ${ (framesize1.hide_short if str(standard) == 'STANDARD_DVBT2' else 'all') + } +- id: rate3 + label: Code rate + dtype: enum + options: [C1_4, C1_3, C2_5, C1_2, C3_5, C2_3, C3_4, C4_5, C5_6, C8_9, C9_10, C2_9_VLSNR, + C13_45, C9_20, C90_180, C96_180, C11_20, C100_180, C104_180, C26_45, C18_30, + C28_45, C23_36, C116_180, C20_30, C124_180, C25_36, C128_180, C13_18, C132_180, + C22_30, C135_180, C140_180, C7_9, C154_180] + option_labels: [1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 8/9, 9/10, 2/9 VL-SNR, + 13/45, 9/20, 90/180, 96/180, 11/20, 100/180, 104/180, 26/45, 18/30, 28/45, + 23/36, 116/180, 20/30, 124/180, 25/36, 128/180, 13/18, 132/180, 22/30, 135/180, + 140/180, 7/9, 154/180] + option_attributes: + val: [dvbgse.C1_4, dvbgse.C1_3, dvbgse.C2_5, dvbgse.C1_2, dvbgse.C3_5, dvbgse.C2_3, + dvbgse.C3_4, dvbgse.C4_5, dvbgse.C5_6, dvbgse.C8_9, dvbgse.C9_10, dvbgse.C2_9_VLSNR, + dvbgse.C13_45, dvbgse.C9_20, dvbgse.C90_180, dvbgse.C96_180, dvbgse.C11_20, + dvbgse.C100_180, dvbgse.C104_180, dvbgse.C26_45, dvbgse.C18_30, dvbgse.C28_45, + dvbgse.C23_36, dvbgse.C116_180, dvbgse.C20_30, dvbgse.C124_180, dvbgse.C25_36, + dvbgse.C128_180, dvbgse.C13_18, dvbgse.C132_180, dvbgse.C22_30, dvbgse.C135_180, + dvbgse.C140_180, dvbgse.C7_9, dvbgse.C154_180] + hide: ${ (framesize2.hide_normal if str(standard) == 'STANDARD_DVBS2' else 'all') + } +- id: rate4 + label: Code rate + dtype: enum + options: [C1_5_MEDIUM, C11_45_MEDIUM, C1_3_MEDIUM] + option_labels: [1/5, 11/45, 1/3] + option_attributes: + val: [dvbgse.C1_5_MEDIUM, dvbgse.C11_45_MEDIUM, dvbgse.C1_3_MEDIUM] + hide: ${ (framesize2.hide_medium if str(standard) == 'STANDARD_DVBS2' else 'all') + } +- id: rate5 + label: Code rate + dtype: enum + options: [C1_4, C1_3, C2_5, C1_2, C3_5, C2_3, C3_4, C4_5, C5_6, C8_9, C11_45, + C4_15, C14_45, C7_15, C8_15, C26_45, C32_45, C1_5_VLSNR_SF2, C11_45_VLSNR_SF2, + C1_5_VLSNR, C4_15_VLSNR, C1_3_VLSNR] + option_labels: [1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 8/9, 11/45, 4/15, + 14/45, 7/15, 8/15, 26/45, 32/45, 1/5 VL-SNR SF2, 11/45 VL-SNR SF2, 1/5 VL-SNR, + 4/15 VL-SNR, 1/3 VL-SNR] + option_attributes: + val: [dvbgse.C1_4, dvbgse.C1_3, dvbgse.C2_5, dvbgse.C1_2, dvbgse.C3_5, dvbgse.C2_3, + dvbgse.C3_4, dvbgse.C4_5, dvbgse.C5_6, dvbgse.C8_9, dvbgse.C11_45, dvbgse.C4_15, + dvbgse.C14_45, dvbgse.C7_15, dvbgse.C8_15, dvbgse.C26_45, dvbgse.C32_45, + dvbgse.C1_5_VLSNR_SF2, dvbgse.C11_45_VLSNR_SF2, dvbgse.C1_5_VLSNR, dvbgse.C4_15_VLSNR, + dvbgse.C1_3_VLSNR] + hide: ${ (framesize2.hide_short if str(standard) == 'STANDARD_DVBS2' else 'all') + } +- id: rolloff + label: Rolloff factor + dtype: enum + options: [RO_0_35, RO_0_25, RO_0_20, RO_0_15, RO_0_10, RO_0_05] + option_labels: ['0.35', '0.25', '0.20', '0.15', '0.10', '0.05'] + option_attributes: + val: [dvbgse.RO_0_35, dvbgse.RO_0_25, dvbgse.RO_0_20, dvbgse.RO_0_15, dvbgse.RO_0_10, + dvbgse.RO_0_05] + hide: ${ standard.hide_dvbs2 } +- id: inband + label: In-band Signalling + dtype: enum + options: [INBAND_OFF, INBAND_ON] + option_labels: ['Off', Type B] + option_attributes: + hide_rate: [all, none] + val: [dvbgse.INBAND_OFF, dvbgse.INBAND_ON] + hide: ${ standard.hide_dvbt2 } +- id: fecblocks + label: FEC blocks per frame + dtype: int + default: '168' + hide: ${ inband.hide_rate } +- id: tsrate + label: Transport Stream Rate + dtype: int + default: '4000000' + hide: ${ inband.hide_rate } +- id: mac_address + label: MAC Address + dtype: string +- id: ping_reply + label: Ping Reply + dtype: enum + options: [PING_REPLY_OFF, PING_REPLY_ON] + option_labels: ['Off', 'On'] + option_attributes: + val: [dvbgse.PING_REPLY_OFF, dvbgse.PING_REPLY_ON] +- id: ipaddr_spoof + label: UDP IP Address Spoofing + dtype: enum + options: [IPADDR_SPOOF_OFF, IPADDR_SPOOF_ON] + option_labels: ['Off', 'On'] + option_attributes: + hide_ipaddr: [all, none] + val: [dvbgse.IPADDR_SPOOF_OFF, dvbgse.IPADDR_SPOOF_ON] +- id: src_address + label: Source IP Address + dtype: string + hide: ${ ipaddr_spoof.hide_ipaddr } +- id: dst_address + label: Destination IP Address + dtype: string + hide: ${ ipaddr_spoof.hide_ipaddr } + +outputs: +- domain: stream + dtype: byte + +templates: + imports: import dvbgse + make: "dvbgse.bbheader_source(${standard.val}, \n% if str(standard) == 'STANDARD_DVBT2':\n\ + ${framesize1.val}, \n% else:\n${framesize2.val}, \n% endif\n% if str(standard)\ + \ == 'STANDARD_DVBT2':\n% if str(framesize1) == 'FECFRAME_NORMAL':\n${rate1.val},\ + \ \n% else:\n${rate2.val}, \n% endif\n% else:\n% if str(framesize2) == 'FECFRAME_NORMAL':\n\ + ${rate3.val}, \n% elif str(framesize2) == 'FECFRAME_MEDIUM':\n${rate4.val},\ + \ \n% else:\n${rate5.val}, \n% endif\n% endif\n${rolloff.val}, ${inband.val},\ + \ ${fecblocks}, ${tsrate}, ${mac_address}, ${ping_reply.val}, ${ipaddr_spoof.val},\ + \ ${src_address}, ${dst_address})" + +file_format: 1 diff --git a/grc/dvbgse_bbheader_source.xml b/grc/dvbgse_bbheader_source.xml deleted file mode 100644 index ba2f4ad..0000000 --- a/grc/dvbgse_bbheader_source.xml +++ /dev/null @@ -1,629 +0,0 @@ - - - - IP Packet Source - dvbgse_bbheader_source - [Core]/Digital Television/DVB-GSE - import dvbgse - dvbgse.bbheader_source($standard.val, #slurp) -#if str($standard) == 'STANDARD_DVBT2' -$framesize1.val, #slurp -#else -$framesize2.val, #slurp -#end if -#if str($standard) == 'STANDARD_DVBT2' -#if str($framesize1) == 'FECFRAME_NORMAL' -$rate1.val, #slurp -#else -$rate2.val, #slurp -#end if -#else -#if str($framesize2) == 'FECFRAME_NORMAL' -$rate3.val, #slurp -#else if str($framesize2) == 'FECFRAME_MEDIUM' -$rate4.val, #slurp -#else -$rate5.val, #slurp -#end if -#end if -$rolloff.val, $inband.val, $fecblocks, $tsrate, $mac_address, $ping_reply.val, $ipaddr_spoof.val, $src_address, $dst_address) - - Standard - standard - enum - - - - - FECFRAME size - framesize1 - enum - $standard.hide_dvbt2 - - - - - FECFRAME size - framesize2 - enum - $standard.hide_dvbs2 - - - - - - Code rate - rate1 - enum - #if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_normal else 'all' - - - - - - - - - Code rate - rate2 - enum - #if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_short else 'all' - - - - - - - - - - - Code rate - rate3 - enum - #if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_normal else 'all' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code rate - rate4 - enum - #if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_medium else 'all' - - - - - - Code rate - rate5 - enum - #if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_short else 'all' - - - - - - - - - - - - - - - - - - - - - - - - - Rolloff factor - rolloff - enum - $standard.hide_dvbs2 - - - - - - - - - In-band Signalling - inband - enum - $standard.hide_dvbt2 - - - - - FEC blocks per frame - fecblocks - 168 - int - $inband.hide_rate - - - Transport Stream Rate - tsrate - 4000000 - int - $inband.hide_rate - - - MAC Address - mac_address - - string - - - Ping Reply - ping_reply - enum - - - - - UDP IP Address Spoofing - ipaddr_spoof - enum - - - - - Source IP Address - src_address - - string - $ipaddr_spoof.hide_ipaddr - - - Destination IP Address - dst_address - - string - $ipaddr_spoof.hide_ipaddr - - - out - byte - - diff --git a/include/dvbgse/CMakeLists.txt b/include/dvbgse/CMakeLists.txt index cff4550..b5c735b 100644 --- a/include/dvbgse/CMakeLists.txt +++ b/include/dvbgse/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright 2011,2012 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,7 +23,6 @@ ######################################################################## install(FILES api.h - dvb_config.h bbheader_source.h bbheader_sink.h DESTINATION include/dvbgse ) diff --git a/include/dvbgse/api.h b/include/dvbgse/api.h index c9af383..accb6de 100644 --- a/include/dvbgse/api.h +++ b/include/dvbgse/api.h @@ -1,7 +1,8 @@ /* * Copyright 2011 Free Software Foundation, Inc. * - * This file is part of GNU Radio + * This file was generated by gr_modtool, a tool from the GNU Radio framework + * This file is a part of gr-dvbgse * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,9 +26,9 @@ #include #ifdef gnuradio_dvbgse_EXPORTS -# define DVBGSE_API __GR_ATTR_EXPORT +#define DVBGSE_API __GR_ATTR_EXPORT #else -# define DVBGSE_API __GR_ATTR_IMPORT +#define DVBGSE_API __GR_ATTR_IMPORT #endif #endif /* INCLUDED_DVBGSE_API_H */ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index fcd3ba6..3cec429 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,6 +1,7 @@ -# Copyright 2011,2012,2016 Free Software Foundation, Inc. +# Copyright 2011,2012,2016,2018,2019 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,9 +23,6 @@ ######################################################################## include(GrPlatform) #define LIB_SUFFIX -include_directories(${Boost_INCLUDE_DIR}) -link_directories(${Boost_LIBRARY_DIRS}) - list(APPEND dvbgse_sources bbheader_source_impl.cc bbheader_sink_impl.cc @@ -32,12 +30,16 @@ list(APPEND dvbgse_sources set(dvbgse_sources "${dvbgse_sources}" PARENT_SCOPE) if(NOT dvbgse_sources) - MESSAGE(STATUS "No C++ sources... skipping lib/") - return() + MESSAGE(STATUS "No C++ sources... skipping lib/") + return() endif(NOT dvbgse_sources) add_library(gnuradio-dvbgse SHARED ${dvbgse_sources}) -target_link_libraries(gnuradio-dvbgse ${Boost_LIBRARIES} ${GNURADIO_ALL_LIBRARIES} ${PCAP_LIBRARIES}) +target_link_libraries(gnuradio-dvbgse gnuradio::gnuradio-runtime ${PCAP_LIBRARIES}) +target_include_directories(gnuradio-dvbgse + PUBLIC $ + PUBLIC $ + ) set_target_properties(gnuradio-dvbgse PROPERTIES DEFINE_SYMBOL "gnuradio_dvbgse_EXPORTS") if(APPLE) @@ -46,41 +48,40 @@ if(APPLE) ) endif(APPLE) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") - ######################################################################## # Install built library files ######################################################################## include(GrMiscUtils) -GR_LIBRARY_FOO(gnuradio-dvbgse RUNTIME_COMPONENT "dvbgse_runtime" DEVEL_COMPONENT "dvbgse_devel") +GR_LIBRARY_FOO(gnuradio-dvbgse) + +######################################################################## +# Print summary +######################################################################## +message(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}") +message(STATUS "Building for version: ${VERSION} / ${LIBVER}") ######################################################################## # Build and register unit test ######################################################################## include(GrTest) -include_directories(${CPPUNIT_INCLUDE_DIRS}) - +# If your unit tests require special include paths, add them here +#include_directories() +# List all files that contain Boost.UTF unit tests here list(APPEND test_dvbgse_sources - ${CMAKE_CURRENT_SOURCE_DIR}/test_dvbgse.cc - ${CMAKE_CURRENT_SOURCE_DIR}/qa_dvbgse.cc +qa_bbheader_sink.cc +qa_bbheader_source.cc ) +# Anything we need to link to for the unit tests go here +list(APPEND GR_TEST_TARGET_DEPS gnuradio-dvbgse) -add_executable(test-dvbgse ${test_dvbgse_sources}) - -target_link_libraries( - test-dvbgse - ${GNURADIO_RUNTIME_LIBRARIES} - ${Boost_LIBRARIES} - ${CPPUNIT_LIBRARIES} - gnuradio-dvbgse -) - -GR_ADD_TEST(test_dvbgse test-dvbgse) - -######################################################################## -# Print summary -######################################################################## -message(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}") -message(STATUS "Building for version: ${VERSION} / ${LIBVER}") +if(NOT test_dvbgse_sources) + MESSAGE(STATUS "No C++ unit tests... skipping") + return() +endif(NOT test_dvbgse_sources) +foreach(qa_file ${test_dvbgse_sources}) + GR_ADD_CPP_TEST("dvbgse_${qa_file}" + ${CMAKE_CURRENT_SOURCE_DIR}/${qa_file} + ) +endforeach(qa_file) diff --git a/lib/qa_bbheader_sink.cc b/lib/qa_bbheader_sink.cc new file mode 100644 index 0000000..ea80995 --- /dev/null +++ b/lib/qa_bbheader_sink.cc @@ -0,0 +1,38 @@ +/* -*- c++ -*- */ +/* + * Copyright 2020 Ron Economos. + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +namespace gr { + namespace dvbgse { + + BOOST_AUTO_TEST_CASE(test_bbheader_sink_t1) + { + // Put test here + } + + } /* namespace dvbgse */ +} /* namespace gr */ diff --git a/lib/qa_bbheader_source.cc b/lib/qa_bbheader_source.cc new file mode 100644 index 0000000..151a914 --- /dev/null +++ b/lib/qa_bbheader_source.cc @@ -0,0 +1,38 @@ +/* -*- c++ -*- */ +/* + * Copyright 2020 Ron Economos. + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +namespace gr { + namespace dvbgse { + + BOOST_AUTO_TEST_CASE(test_bbheader_source_t1) + { + // Put test here + } + + } /* namespace dvbgse */ +} /* namespace gr */ diff --git a/lib/qa_dvbgse.cc b/lib/qa_dvbgse.cc deleted file mode 100644 index 7d62e87..0000000 --- a/lib/qa_dvbgse.cc +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2012 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/* - * This class gathers together all the test cases for the gr-filter - * directory into a single test suite. As you create new test cases, - * add them here. - */ - -#include "qa_dvbgse.h" - -CppUnit::TestSuite * -qa_dvbgse::suite() -{ - CppUnit::TestSuite *s = new CppUnit::TestSuite("dvbgse"); - - return s; -} diff --git a/lib/qa_dvbgse.h b/lib/qa_dvbgse.h deleted file mode 100644 index ae35efb..0000000 --- a/lib/qa_dvbgse.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2012 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _QA_DVBGSE_H_ -#define _QA_DVBGSE_H_ - -#include -#include - -//! collect all the tests for the gr-filter directory - -class __GR_ATTR_EXPORT qa_dvbgse -{ - public: - //! return suite of tests for all of gr-filter directory - static CppUnit::TestSuite *suite(); -}; - -#endif /* _QA_DVBGSE_H_ */ diff --git a/lib/test_dvbgse.cc b/lib/test_dvbgse.cc deleted file mode 100644 index 7d7518e..0000000 --- a/lib/test_dvbgse.cc +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2012 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -#include -#include "qa_dvbgse.h" -#include -#include - -int -main (int argc, char **argv) -{ - CppUnit::TextTestRunner runner; - std::ofstream xmlfile(get_unittest_path("dvbgse.xml").c_str()); - CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile); - - runner.addTest(qa_dvbgse::suite()); - runner.setOutputter(xmlout); - - bool was_successful = runner.run("", false); - - return was_successful ? 0 : 1; -} diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index f703892..813bb40 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright 2011 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/python/__init__.py b/python/__init__.py index b7ae1b3..e23704a 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -22,13 +22,14 @@ This is the GNU Radio DVBGSE module. Place your Python package description here (python/__init__.py). ''' +from __future__ import unicode_literals # import swig generated symbols into the dvbgse namespace try: - # this might fail if the module is python-only - from dvbgse_swig import * + # this might fail if the module is python-only + from .dvbgse_swig import * except ImportError: - pass + pass # import any pure python here # diff --git a/python/build_utils.py b/python/build_utils.py deleted file mode 100644 index cf58a97..0000000 --- a/python/build_utils.py +++ /dev/null @@ -1,226 +0,0 @@ -# -# Copyright 2004,2009,2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -"""Misc utilities used at build time -""" - -import re, os, os.path -from build_utils_codes import * - - -# set srcdir to the directory that contains Makefile.am -try: - srcdir = os.environ['srcdir'] -except KeyError, e: - srcdir = "." -srcdir = srcdir + '/' - -# set do_makefile to either true or false dependeing on the environment -try: - if os.environ['do_makefile'] == '0': - do_makefile = False - else: - do_makefile = True -except KeyError, e: - do_makefile = False - -# set do_sources to either true or false dependeing on the environment -try: - if os.environ['do_sources'] == '0': - do_sources = False - else: - do_sources = True -except KeyError, e: - do_sources = True - -name_dict = {} - -def log_output_name (name): - (base, ext) = os.path.splitext (name) - ext = ext[1:] # drop the leading '.' - - entry = name_dict.setdefault (ext, []) - entry.append (name) - -def open_and_log_name (name, dir): - global do_sources - if do_sources: - f = open (name, dir) - else: - f = None - log_output_name (name) - return f - -def expand_template (d, template_filename, extra = ""): - '''Given a dictionary D and a TEMPLATE_FILENAME, expand template into output file - ''' - global do_sources - output_extension = extract_extension (template_filename) - template = open_src (template_filename, 'r') - output_name = d['NAME'] + extra + '.' + output_extension - log_output_name (output_name) - if do_sources: - output = open (output_name, 'w') - do_substitution (d, template, output) - output.close () - template.close () - -def output_glue (dirname): - output_makefile_fragment () - output_ifile_include (dirname) - -def output_makefile_fragment (): - global do_makefile - if not do_makefile: - return -# overwrite the source, which must be writable; this should have been -# checked for beforehand in the top-level Makefile.gen.gen . - f = open (os.path.join (os.environ.get('gendir', os.environ.get('srcdir', '.')), 'Makefile.gen'), 'w') - f.write ('#\n# This file is machine generated. All edits will be overwritten\n#\n') - output_subfrag (f, 'h') - output_subfrag (f, 'i') - output_subfrag (f, 'cc') - f.close () - -def output_ifile_include (dirname): - global do_sources - if do_sources: - f = open ('%s_generated.i' % (dirname,), 'w') - f.write ('//\n// This file is machine generated. All edits will be overwritten\n//\n') - files = name_dict.setdefault ('i', []) - files.sort () - f.write ('%{\n') - for file in files: - f.write ('#include <%s>\n' % (file[0:-1] + 'h',)) - f.write ('%}\n\n') - for file in files: - f.write ('%%include <%s>\n' % (file,)) - -def output_subfrag (f, ext): - files = name_dict.setdefault (ext, []) - files.sort () - f.write ("GENERATED_%s =" % (ext.upper ())) - for file in files: - f.write (" \\\n\t%s" % (file,)) - f.write ("\n\n") - -def extract_extension (template_name): - # template name is something like: GrFIRfilterXXX.h.t - # we return everything between the penultimate . and .t - mo = re.search (r'\.([a-z]+)\.t$', template_name) - if not mo: - raise ValueError, "Incorrectly formed template_name '%s'" % (template_name,) - return mo.group (1) - -def open_src (name, mode): - global srcdir - return open (os.path.join (srcdir, name), mode) - -def do_substitution (d, in_file, out_file): - def repl (match_obj): - key = match_obj.group (1) - # print key - return d[key] - - inp = in_file.read () - out = re.sub (r"@([a-zA-Z0-9_]+)@", repl, inp) - out_file.write (out) - - - -copyright = '''/* -*- c++ -*- */ -/* - * Copyright 2003,2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ -''' - -def is_complex (code3): - if i_code (code3) == 'c' or o_code (code3) == 'c': - return '1' - else: - return '0' - - -def standard_dict (name, code3, package='gr'): - d = {} - d['NAME'] = name - d['NAME_IMPL'] = name+'_impl' - d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper()) - d['GUARD_NAME_IMPL'] = 'INCLUDED_%s_%s_IMPL_H' % (package.upper(), name.upper()) - d['BASE_NAME'] = re.sub ('^' + package + '_', '', name) - d['SPTR_NAME'] = '%s_sptr' % name - d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten' - d['COPYRIGHT'] = copyright - d['TYPE'] = i_type (code3) - d['I_TYPE'] = i_type (code3) - d['O_TYPE'] = o_type (code3) - d['TAP_TYPE'] = tap_type (code3) - d['IS_COMPLEX'] = is_complex (code3) - return d - - -def standard_dict2 (name, code3, package): - d = {} - d['NAME'] = name - d['BASE_NAME'] = name - d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper()) - d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten' - d['COPYRIGHT'] = copyright - d['TYPE'] = i_type (code3) - d['I_TYPE'] = i_type (code3) - d['O_TYPE'] = o_type (code3) - d['TAP_TYPE'] = tap_type (code3) - d['IS_COMPLEX'] = is_complex (code3) - return d - -def standard_impl_dict2 (name, code3, package): - d = {} - d['NAME'] = name - d['IMPL_NAME'] = name - d['BASE_NAME'] = name.rstrip("impl").rstrip("_") - d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper()) - d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten' - d['COPYRIGHT'] = copyright - d['FIR_TYPE'] = "fir_filter_" + code3 - d['CFIR_TYPE'] = "fir_filter_" + code3[0:2] + 'c' - d['TYPE'] = i_type (code3) - d['I_TYPE'] = i_type (code3) - d['O_TYPE'] = o_type (code3) - d['TAP_TYPE'] = tap_type (code3) - d['IS_COMPLEX'] = is_complex (code3) - return d diff --git a/python/qa_bbheader_sink.py b/python/qa_bbheader_sink.py index b229cdc..ca99713 100755 --- a/python/qa_bbheader_sink.py +++ b/python/qa_bbheader_sink.py @@ -1,41 +1,41 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Copyright 2019 Ron Economos. -# +# +# Copyright 2020 Ron Economos. +# # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # This software is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this software; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from gnuradio import blocks import dvbgse_swig as dvbgse -class qa_bbheader_sink (gr_unittest.TestCase): +class qa_bbheader_sink(gr_unittest.TestCase): - def setUp (self): - self.tb = gr.top_block () + def setUp(self): + self.tb = gr.top_block() - def tearDown (self): + def tearDown(self): self.tb = None - def test_001_t (self): + def test_001_t(self): # set up fg - self.tb.run () + self.tb.run() # check data if __name__ == '__main__': - gr_unittest.run(qa_bbheader_sink, "qa_bbheader_sink.xml") + gr_unittest.run(qa_bbheader_sink) diff --git a/python/qa_bbheader_source.py b/python/qa_bbheader_source.py index 3cc067f..5ef6e21 100755 --- a/python/qa_bbheader_source.py +++ b/python/qa_bbheader_source.py @@ -1,41 +1,41 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Copyright 2016 Ron Economos. -# +# +# Copyright 2020 Ron Economos. +# # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # This software is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this software; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from gnuradio import blocks import dvbgse_swig as dvbgse -class qa_bbheader_source (gr_unittest.TestCase): +class qa_bbheader_source(gr_unittest.TestCase): - def setUp (self): - self.tb = gr.top_block () + def setUp(self): + self.tb = gr.top_block() - def tearDown (self): + def tearDown(self): self.tb = None - def test_001_t (self): + def test_001_t(self): # set up fg - self.tb.run () + self.tb.run() # check data if __name__ == '__main__': - gr_unittest.run(qa_bbheader_source, "qa_bbheader_source.xml") + gr_unittest.run(qa_bbheader_source) diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index 7f30eda..74ecc58 100644 --- a/swig/CMakeLists.txt +++ b/swig/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright 2011 Free Software Foundation, Inc. # -# This file is part of GNU Radio +# This file was generated by gr_modtool, a tool from the GNU Radio framework +# This file is a part of gr-dvbgse # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,15 +22,15 @@ # Check if there is C++ code at all ######################################################################## if(NOT dvbgse_sources) - MESSAGE(STATUS "No C++ sources... skipping swig/") - return() + MESSAGE(STATUS "No C++ sources... skipping swig/") + return() endif(NOT dvbgse_sources) ######################################################################## # Include swig generation macros ######################################################################## find_package(SWIG) -find_package(PythonLibs 2) +find_package(PythonLibs) if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND) return() endif() @@ -39,11 +40,11 @@ include(GrPython) ######################################################################## # Setup swig generation ######################################################################## -foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS}) - list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig) -endforeach(incdir) +set(GR_SWIG_INCLUDE_DIRS $) +set(GR_SWIG_TARGET_DEPS gnuradio::runtime_swig) set(GR_SWIG_LIBRARIES gnuradio-dvbgse) + set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/dvbgse_swig_doc.i) set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include) diff --git a/swig/dvbgse_swig.i b/swig/dvbgse_swig.i index b0e593b..8673f7a 100644 --- a/swig/dvbgse_swig.i +++ b/swig/dvbgse_swig.i @@ -2,7 +2,7 @@ #define DVBGSE_API -%include "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff //load generated python docstrings %include "dvbgse_swig_doc.i" @@ -13,7 +13,6 @@ #include "dvbgse/bbheader_sink.h" %} - %include "dvbgse/dvb_config.h" %include "dvbgse/bbheader_source.h" GR_SWIG_BLOCK_MAGIC2(dvbgse, bbheader_source);