├── .clang-format ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── MANIFEST.md ├── README.md ├── apps └── CMakeLists.txt ├── cmake ├── Modules │ ├── CMakeParseArgumentsCopy.cmake │ ├── gnuradio-pdu_utilsConfig.cmake │ ├── gnuradio-pdu_utilsConfigVersion.cmake.in │ └── targetConfig.cmake.in └── cmake_uninstall.cmake.in ├── docs ├── CMakeLists.txt ├── README.pdu_utils ├── doxygen │ ├── CMakeLists.txt │ ├── Doxyfile.in │ ├── doxyxml │ │ ├── __init__.py │ │ ├── base.py │ │ ├── doxyindex.py │ │ ├── generated │ │ │ ├── __init__.py │ │ │ ├── compound.py │ │ │ ├── compoundsuper.py │ │ │ ├── index.py │ │ │ └── indexsuper.py │ │ └── text.py │ ├── other │ │ ├── group_defs.dox │ │ └── main_page.dox │ ├── pydoc_macros.h │ └── update_pydoc.py ├── figures │ ├── basic_pdu.png │ ├── fhss_tag.png │ ├── pdu_to_bursts.png │ ├── rx_pdu.png │ ├── snl.png │ ├── tagging_methods.png │ └── tx_pdu.png └── pdu.png ├── examples ├── README └── pdu_to_burst_test.grc ├── gnuradio-pdu_utils.pc.in ├── grc ├── CMakeLists.txt ├── pdu_utils_access_code_to_pdu.block.yml ├── pdu_utils_extract_metadata.block.yml ├── pdu_utils_message_counter.block.yml ├── pdu_utils_message_emitter.block.yml ├── pdu_utils_message_gate.block.yml ├── pdu_utils_message_keep_1_in_n.block.yml ├── pdu_utils_msg_drop_random.block.yml ├── pdu_utils_pack_unpack.block.yml ├── pdu_utils_pdu_add_noise.block.yml ├── pdu_utils_pdu_align.block.yml ├── pdu_utils_pdu_binary_tools.block.yml ├── pdu_utils_pdu_burst_combiner.block.yml ├── pdu_utils_pdu_clock_recovery.block.yml ├── pdu_utils_pdu_complex_to_mag2.block.yml ├── pdu_utils_pdu_delay.block.yml ├── pdu_utils_pdu_downsample.block.yml ├── pdu_utils_pdu_fine_time_measure.block.yml ├── pdu_utils_pdu_fir_filter.block.yml ├── pdu_utils_pdu_flow_ctrl.block.yml ├── pdu_utils_pdu_gmsk_fc.block.yml ├── pdu_utils_pdu_head_tail.block.yml ├── pdu_utils_pdu_length_filter.block.yml ├── pdu_utils_pdu_logger.block.yml ├── pdu_utils_pdu_pfb_resamp.block.yml ├── pdu_utils_pdu_preamble.block.yml ├── pdu_utils_pdu_quadrature_demod_cf.block.yml ├── pdu_utils_pdu_range_filter.block.yml ├── pdu_utils_pdu_rotate.block.yml ├── pdu_utils_pdu_round_robin.block.yml ├── pdu_utils_pdu_set_m.block.yml ├── pdu_utils_pdu_slice.block.yml ├── pdu_utils_pdu_split.block.yml ├── pdu_utils_pdu_to_bursts.block.yml ├── pdu_utils_qt_pdu_source.block.yml ├── pdu_utils_tag_message_trigger.block.yml ├── pdu_utils_tags_to_pdu.block.yml ├── pdu_utils_take_skip_to_pdu.block.yml └── pdu_utils_upsample.block.yml ├── include └── gnuradio │ └── pdu_utils │ ├── CMakeLists.txt │ ├── access_code_to_pdu.h │ ├── api.h │ ├── constants.h │ ├── extract_metadata.h │ ├── message_counter.h │ ├── message_emitter.h │ ├── message_gate.h │ ├── message_keep_1_in_n.h │ ├── msg_drop_random.h │ ├── pack_unpack.h │ ├── pdu_add_noise.h │ ├── pdu_align.h │ ├── pdu_binary_tools.h │ ├── pdu_burst_combiner.h │ ├── pdu_clock_recovery.h │ ├── pdu_complex_to_mag2.h │ ├── pdu_downsample.h │ ├── pdu_fine_time_measure.h │ ├── pdu_fir_filter.h │ ├── pdu_flow_ctrl_helper.h │ ├── pdu_gmsk_fc.h │ ├── pdu_head_tail.h │ ├── pdu_length_filter.h │ ├── pdu_logger.h │ ├── pdu_pfb_resamp.h │ ├── pdu_preamble.h │ ├── pdu_quadrature_demod_cf.h │ ├── pdu_range_filter.h │ ├── pdu_rotate.h │ ├── pdu_round_robin.h │ ├── pdu_set_m.h │ ├── pdu_slice.h │ ├── pdu_split.h │ ├── pdu_to_bursts.h │ ├── tag_message_trigger.h │ ├── tags_to_pdu.h │ ├── take_skip_to_pdu.h │ └── upsample.h ├── lib ├── CMakeLists.txt ├── access_code_to_pdu_impl.cc ├── access_code_to_pdu_impl.h ├── constants.cc ├── extract_metadata_impl.cc ├── extract_metadata_impl.h ├── message_counter_impl.cc ├── message_counter_impl.h ├── message_emitter_impl.cc ├── message_emitter_impl.h ├── message_gate_impl.cc ├── message_gate_impl.h ├── message_keep_1_in_n_impl.cc ├── message_keep_1_in_n_impl.h ├── msg_drop_random_impl.cc ├── msg_drop_random_impl.h ├── pack_unpack_impl.cc ├── pack_unpack_impl.h ├── pdu_add_noise_impl.cc ├── pdu_add_noise_impl.h ├── pdu_align_impl.cc ├── pdu_align_impl.h ├── pdu_binary_tools_impl.cc ├── pdu_binary_tools_impl.h ├── pdu_burst_combiner_impl.cc ├── pdu_burst_combiner_impl.h ├── pdu_clock_recovery_impl.cc ├── pdu_clock_recovery_impl.h ├── pdu_complex_to_mag2_impl.cc ├── pdu_complex_to_mag2_impl.h ├── pdu_downsample_impl.cc ├── pdu_downsample_impl.h ├── pdu_fine_time_measure_impl.cc ├── pdu_fine_time_measure_impl.h ├── pdu_fir_filter_impl.cc ├── pdu_fir_filter_impl.h ├── pdu_flow_ctrl_helper.cc ├── pdu_gmsk_fc_impl.cc ├── pdu_gmsk_fc_impl.h ├── pdu_head_tail_impl.cc ├── pdu_head_tail_impl.h ├── pdu_length_filter_impl.cc ├── pdu_length_filter_impl.h ├── pdu_logger_impl.cc ├── pdu_logger_impl.h ├── pdu_pfb_resamp_impl.cc ├── pdu_pfb_resamp_impl.h ├── pdu_preamble_impl.cc ├── pdu_preamble_impl.h ├── pdu_quadrature_demod_cf_impl.cc ├── pdu_quadrature_demod_cf_impl.h ├── pdu_range_filter_impl.cc ├── pdu_range_filter_impl.h ├── pdu_rotate_impl.cc ├── pdu_rotate_impl.h ├── pdu_round_robin_impl.cc ├── pdu_round_robin_impl.h ├── pdu_set_m_impl.cc ├── pdu_set_m_impl.h ├── pdu_slice_impl.cc ├── pdu_slice_impl.h ├── pdu_split_impl.cc ├── pdu_split_impl.h ├── pdu_to_bursts_impl.cc ├── pdu_to_bursts_impl.h ├── qa_pdu_utils.cc ├── qa_pdu_utils.h ├── tag_message_trigger_impl.cc ├── tag_message_trigger_impl.h ├── tags_to_pdu_impl.cc ├── tags_to_pdu_impl.h ├── take_skip_to_pdu_impl.cc ├── take_skip_to_pdu_impl.h ├── test_pdu_utils.cc ├── upsample_impl.cc └── upsample_impl.h └── python └── pdu_utils ├── CMakeLists.txt ├── __init__.py ├── bindings ├── CMakeLists.txt ├── README.md ├── access_code_to_pdu_python.cc ├── bind_oot_file.py ├── constants_python.cc ├── docstrings │ ├── README.md │ ├── access_code_to_pdu_pydoc_template.h │ ├── constants_pydoc_template.h │ ├── extract_metadata_pydoc_template.h │ ├── message_counter_pydoc_template.h │ ├── message_emitter_pydoc_template.h │ ├── message_gate_pydoc_template.h │ ├── message_keep_1_in_n_pydoc_template.h │ ├── msg_drop_random_pydoc_template.h │ ├── pack_unpack_pydoc_template.h │ ├── pdu_add_noise_pydoc_template.h │ ├── pdu_align_pydoc_template.h │ ├── pdu_binary_tools_pydoc_template.h │ ├── pdu_burst_combiner_pydoc_template.h │ ├── pdu_clock_recovery_pydoc_template.h │ ├── pdu_complex_to_mag2_pydoc_template.h │ ├── pdu_downsample_pydoc_template.h │ ├── pdu_fine_time_measure_pydoc_template.h │ ├── pdu_fir_filter_pydoc_template.h │ ├── pdu_flow_ctrl_helper_pydoc_template.h │ ├── pdu_gmsk_fc_pydoc_template.h │ ├── pdu_head_tail_pydoc_template.h │ ├── pdu_length_filter_pydoc_template.h │ ├── pdu_logger_pydoc_template.h │ ├── pdu_pfb_resamp_pydoc_template.h │ ├── pdu_preamble_pydoc_template.h │ ├── pdu_quadrature_demod_cf_pydoc_template.h │ ├── pdu_range_filter_pydoc_template.h │ ├── pdu_rotate_pydoc_template.h │ ├── pdu_round_robin_pydoc_template.h │ ├── pdu_set_m_pydoc_template.h │ ├── pdu_slice_pydoc_template.h │ ├── pdu_split_pydoc_template.h │ ├── pdu_to_bursts_pydoc_template.h │ ├── tag_message_trigger_pydoc_template.h │ ├── tags_to_pdu_pydoc_template.h │ ├── take_skip_to_pdu_pydoc_template.h │ └── upsample_pydoc_template.h ├── extract_metadata_python.cc ├── header_utils.py ├── message_counter_python.cc ├── message_emitter_python.cc ├── message_gate_python.cc ├── message_keep_1_in_n_python.cc ├── msg_drop_random_python.cc ├── pack_unpack_python.cc ├── pdu_add_noise_python.cc ├── pdu_align_python.cc ├── pdu_binary_tools_python.cc ├── pdu_burst_combiner_python.cc ├── pdu_clock_recovery_python.cc ├── pdu_complex_to_mag2_python.cc ├── pdu_downsample_python.cc ├── pdu_fine_time_measure_python.cc ├── pdu_fir_filter_python.cc ├── pdu_flow_ctrl_helper_python.cc ├── pdu_gmsk_fc_python.cc ├── pdu_head_tail_python.cc ├── pdu_length_filter_python.cc ├── pdu_logger_python.cc ├── pdu_pfb_resamp_python.cc ├── pdu_preamble_python.cc ├── pdu_quadrature_demod_cf_python.cc ├── pdu_range_filter_python.cc ├── pdu_rotate_python.cc ├── pdu_round_robin_python.cc ├── pdu_set_m_python.cc ├── pdu_slice_python.cc ├── pdu_split_python.cc ├── pdu_to_bursts_python.cc ├── python_bindings.cc ├── tag_message_trigger_python.cc ├── tags_to_pdu_python.cc ├── take_skip_to_pdu_python.cc └── upsample_python.cc ├── pdu_delay.py ├── pdu_flow_ctrl.py ├── qa_access_code_to_pdu.py ├── qa_constants.py ├── qa_extract_metadata.py ├── qa_message_counter.py ├── qa_message_emitter.py ├── qa_message_gate.py ├── qa_message_keep_1_in_n.py ├── qa_msg_drop_random.py ├── qa_pack_unpack.py ├── qa_pdu_add_noise.py ├── qa_pdu_align.py ├── qa_pdu_binary_tools.py ├── qa_pdu_burst_combiner.py ├── qa_pdu_clock_recovery.py ├── qa_pdu_complex_to_mag2.py ├── qa_pdu_delay.py ├── qa_pdu_downsample.py ├── qa_pdu_fine_time_measure.py ├── qa_pdu_fir_filter.py ├── qa_pdu_gmsk_fc.py ├── qa_pdu_head_tail.py ├── qa_pdu_length_filter.py ├── qa_pdu_logger.py ├── qa_pdu_pfb_resamp.py ├── qa_pdu_preamble.py ├── qa_pdu_quadrature_demod_cf.py ├── qa_pdu_range_filter.py ├── qa_pdu_rotate.py ├── qa_pdu_round_robin.py ├── qa_pdu_set_m.py ├── qa_pdu_slice.py ├── qa_pdu_split.py ├── qa_pdu_to_bursts.py ├── qa_qt_pdu_source.py ├── qa_tag_message_trigger.py ├── qa_tags_to_pdu.py ├── qa_take_skip_to_pdu.py ├── qa_upsample.py └── qt_pdu_source.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | *.pyo 10 | *.pyc 11 | *.gch 12 | 13 | # Temp VI files # 14 | ################# 15 | *~ 16 | *.swp 17 | *.bak 18 | 19 | # Packages # 20 | ############ 21 | # it's better to unpack these files and commit the raw source 22 | # git has its own built in compression methods 23 | *.7z 24 | *.dmg 25 | *.gz 26 | *.iso 27 | *.jar 28 | *.rar 29 | *.tar 30 | *.zip 31 | 32 | # Logs and databases # 33 | ###################### 34 | *.log 35 | *.sql 36 | *.sqlite 37 | 38 | # OS generated files # 39 | ###################### 40 | .DS_Store 41 | .DS_Store? 42 | ._* 43 | .Spotlight-V100 44 | .Trashes 45 | ehthumbs.db 46 | Thumbs.db 47 | 48 | # build files # 49 | ############### 50 | build 51 | build/* 52 | 53 | # unit test files # 54 | ################### 55 | .unittests 56 | .unittests/* 57 | 58 | /.cproject 59 | /.project 60 | /.pydevproject 61 | -------------------------------------------------------------------------------- /MANIFEST.md: -------------------------------------------------------------------------------- 1 | title: The PDU Utilities OOT Module 2 | brief: Tools for manipulation of PDU objects 3 | tags: 4 | - pdu 5 | author: 6 | - Sandia National Laboratories 7 | - Jacob Gilbert 8 | - Peter Knee 9 | - Sam Whiting 10 | - Brian Adams 11 | - Darren Kartchner 12 | copyright_owner: 13 | - NTESS, LLC 14 | license: GPLv3 15 | gr_supported_version: v3.7, v3.8, v3.10 16 | dependencies: 17 | repo: https://github.com/sandialabs/gr-pdu_utils 18 | icon: https://raw.githubusercontent.com/sandialabs/gr-pdu_utils/master/docs/pdu.png 19 | --- 20 | This GNU Radio module contains tools for manipulation of PDU objects. There are blocks to translate between streams and PDUs while maintaining timing information, a number of self explanatory blocks that emulate the behavior of some in-tree stream blocks for messages and PDUs, and some other features. This module is complimentary to the gr-timing_utils module and some of the advanced timing features require blocks there. 21 | -------------------------------------------------------------------------------- /apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011 Free Software Foundation, Inc. 2 | # 3 | # This file was generated by gr_modtool, a tool from the GNU Radio framework 4 | # This file is a part of gr-pdu_utils 5 | # 6 | # SPDX-License-Identifier: GPL-3.0-or-later 7 | # 8 | 9 | include(GrPython) 10 | 11 | GR_PYTHON_INSTALL( 12 | PROGRAMS 13 | DESTINATION bin 14 | ) 15 | -------------------------------------------------------------------------------- /cmake/Modules/gnuradio-pdu_utilsConfig.cmake: -------------------------------------------------------------------------------- 1 | find_package(PkgConfig) 2 | 3 | PKG_CHECK_MODULES(PC_GR_PDU_UTILS gnuradio-pdu_utils) 4 | 5 | FIND_PATH( 6 | GR_PDU_UTILS_INCLUDE_DIRS 7 | NAMES gnuradio/pdu_utils/api.h 8 | HINTS $ENV{PDU_UTILS_DIR}/include 9 | ${PC_PDU_UTILS_INCLUDEDIR} 10 | PATHS ${CMAKE_INSTALL_PREFIX}/include 11 | /usr/local/include 12 | /usr/include 13 | ) 14 | 15 | FIND_LIBRARY( 16 | GR_PDU_UTILS_LIBRARIES 17 | NAMES gnuradio-pdu_utils 18 | HINTS $ENV{PDU_UTILS_DIR}/lib 19 | ${PC_PDU_UTILS_LIBDIR} 20 | PATHS ${CMAKE_INSTALL_PREFIX}/lib 21 | ${CMAKE_INSTALL_PREFIX}/lib64 22 | /usr/local/lib 23 | /usr/local/lib64 24 | /usr/lib 25 | /usr/lib64 26 | ) 27 | 28 | include("${CMAKE_CURRENT_LIST_DIR}/gnuradio-pdu_utilsTarget.cmake") 29 | 30 | INCLUDE(FindPackageHandleStandardArgs) 31 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(GR_PDU_UTILS DEFAULT_MSG GR_PDU_UTILS_LIBRARIES GR_PDU_UTILS_INCLUDE_DIRS) 32 | MARK_AS_ADVANCED(GR_PDU_UTILS_LIBRARIES GR_PDU_UTILS_INCLUDE_DIRS) 33 | -------------------------------------------------------------------------------- /cmake/Modules/gnuradio-pdu_utilsConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | set(MAJOR_VERSION @VERSION_MAJOR@) 21 | set(API_COMPAT @VERSION_API@) 22 | set(MINOR_VERSION @VERSION_ABI@) 23 | set(MAINT_VERSION @VERSION_PATCH@) 24 | 25 | set(PACKAGE_VERSION 26 | ${MAJOR_VERSION}.${API_COMPAT}.${MINOR_VERSION}.${MAINT_VERSION}) 27 | 28 | if(${PACKAGE_FIND_VERSION_MAJOR} EQUAL ${MAJOR_VERSION}) 29 | if(${PACKAGE_FIND_VERSION_MINOR} EQUAL ${API_COMPAT}) 30 | if(NOT ${PACKAGE_FIND_VERSION_PATCH} GREATER ${MINOR_VERSION}) 31 | set(PACKAGE_VERSION_EXACT 1) # exact match for API version 32 | set(PACKAGE_VERSION_COMPATIBLE 1) # compat for minor/patch version 33 | endif(NOT ${PACKAGE_FIND_VERSION_PATCH} GREATER ${MINOR_VERSION}) 34 | endif(${PACKAGE_FIND_VERSION_MINOR} EQUAL ${API_COMPAT}) 35 | endif(${PACKAGE_FIND_VERSION_MAJOR} EQUAL ${MAJOR_VERSION}) 36 | 37 | -------------------------------------------------------------------------------- /cmake/Modules/targetConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # SPDX-License-Identifier: GPL-3.0-or-later 6 | # 7 | 8 | include(CMakeFindDependencyMacro) 9 | 10 | set(target_deps "@TARGET_DEPENDENCIES@") 11 | foreach(dep IN LISTS target_deps) 12 | find_dependency(${dep}) 13 | endforeach() 14 | include("${CMAKE_CURRENT_LIST_DIR}/@TARGET@Targets.cmake") 15 | -------------------------------------------------------------------------------- /cmake/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | # http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F 2 | 3 | IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") 5 | ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 6 | 7 | FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 8 | STRING(REGEX REPLACE "\n" ";" files "${files}") 9 | FOREACH(file ${files}) 10 | MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 11 | IF(EXISTS "$ENV{DESTDIR}${file}") 12 | EXEC_PROGRAM( 13 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 14 | OUTPUT_VARIABLE rm_out 15 | RETURN_VALUE rm_retval 16 | ) 17 | IF(NOT "${rm_retval}" STREQUAL 0) 18 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 19 | ENDIF(NOT "${rm_retval}" STREQUAL 0) 20 | ELSEIF(IS_SYMLINK "$ENV{DESTDIR}${file}") 21 | EXEC_PROGRAM( 22 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 23 | OUTPUT_VARIABLE rm_out 24 | RETURN_VALUE rm_retval 25 | ) 26 | IF(NOT "${rm_retval}" STREQUAL 0) 27 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 28 | ENDIF(NOT "${rm_retval}" STREQUAL 0) 29 | ELSE(EXISTS "$ENV{DESTDIR}${file}") 30 | MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 31 | ENDIF(EXISTS "$ENV{DESTDIR}${file}") 32 | ENDFOREACH(file) 33 | -------------------------------------------------------------------------------- /docs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011 Free Software Foundation, Inc. 2 | # 3 | # This file was generated by gr_modtool, a tool from the GNU Radio framework 4 | # This file is a part of gr-pdu_utils 5 | # 6 | # SPDX-License-Identifier: GPL-3.0-or-later 7 | # 8 | 9 | ######################################################################## 10 | # Setup dependencies 11 | ######################################################################## 12 | find_package(Doxygen) 13 | 14 | ######################################################################## 15 | # Begin conditional configuration 16 | ######################################################################## 17 | if(ENABLE_DOXYGEN) 18 | 19 | ######################################################################## 20 | # Add subdirectories 21 | ######################################################################## 22 | add_subdirectory(doxygen) 23 | 24 | endif(ENABLE_DOXYGEN) 25 | -------------------------------------------------------------------------------- /docs/README.pdu_utils: -------------------------------------------------------------------------------- 1 | This is the pdu_utils-write-a-block package meant as a guide to building 2 | out-of-tree packages. To use the pdu_utils blocks, the Python namespaces 3 | is in 'pdu_utils', which is imported as: 4 | 5 | import pdu_utils 6 | 7 | See the Doxygen documentation for details about the blocks available 8 | in this package. A quick listing of the details can be found in Python 9 | after importing by using: 10 | 11 | help(pdu_utils) 12 | -------------------------------------------------------------------------------- /docs/doxygen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011 Free Software Foundation, Inc. 2 | # 3 | # This file was generated by gr_modtool, a tool from the GNU Radio framework 4 | # This file is a part of gr-pdu_utils 5 | # 6 | # SPDX-License-Identifier: GPL-3.0-or-later 7 | # 8 | 9 | ######################################################################## 10 | # Create the doxygen configuration file 11 | ######################################################################## 12 | file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir) 13 | file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir) 14 | file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} abs_top_srcdir) 15 | file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} abs_top_builddir) 16 | 17 | set(HAVE_DOT ${DOXYGEN_DOT_FOUND}) 18 | set(enable_html_docs YES) 19 | set(enable_latex_docs NO) 20 | set(enable_mathjax NO) 21 | set(enable_xml_docs YES) 22 | 23 | configure_file( 24 | ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in 25 | ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile 26 | @ONLY) 27 | 28 | set(BUILT_DIRS ${CMAKE_CURRENT_BINARY_DIR}/xml ${CMAKE_CURRENT_BINARY_DIR}/html) 29 | 30 | ######################################################################## 31 | # Make and install doxygen docs 32 | ######################################################################## 33 | add_custom_command( 34 | OUTPUT ${BUILT_DIRS} 35 | COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile 36 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 37 | COMMENT "Generating documentation with doxygen" 38 | ) 39 | 40 | add_custom_target(doxygen_target ALL DEPENDS ${BUILT_DIRS}) 41 | 42 | install(DIRECTORY ${BUILT_DIRS} DESTINATION ${GR_PKG_DOC_DIR}) 43 | -------------------------------------------------------------------------------- /docs/doxygen/doxyxml/generated/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Contains generated files produced by generateDS.py. 3 | 4 | These do the real work of parsing the doxygen xml files but the 5 | resultant classes are not very friendly to navigate so the rest of the 6 | doxyxml module processes them further. 7 | """ 8 | -------------------------------------------------------------------------------- /docs/doxygen/doxyxml/text.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010 Free Software Foundation, Inc. 3 | # 4 | # This file was generated by gr_modtool, a tool from the GNU Radio framework 5 | # This file is a part of gr-pdu_utils 6 | # 7 | # SPDX-License-Identifier: GPL-3.0-or-later 8 | # 9 | # 10 | """ 11 | Utilities for extracting text from generated classes. 12 | """ 13 | 14 | def is_string(txt): 15 | if isinstance(txt, str): 16 | return True 17 | try: 18 | if isinstance(txt, str): 19 | return True 20 | except NameError: 21 | pass 22 | return False 23 | 24 | def description(obj): 25 | if obj is None: 26 | return None 27 | return description_bit(obj).strip() 28 | 29 | def description_bit(obj): 30 | if hasattr(obj, 'content'): 31 | contents = [description_bit(item) for item in obj.content] 32 | result = ''.join(contents) 33 | elif hasattr(obj, 'content_'): 34 | contents = [description_bit(item) for item in obj.content_] 35 | result = ''.join(contents) 36 | elif hasattr(obj, 'value'): 37 | result = description_bit(obj.value) 38 | elif is_string(obj): 39 | return obj 40 | else: 41 | raise Exception('Expecting a string or something with content, content_ or value attribute') 42 | # If this bit is a paragraph then add one some line breaks. 43 | if hasattr(obj, 'name') and obj.name == 'para': 44 | result += "\n\n" 45 | return result 46 | -------------------------------------------------------------------------------- /docs/doxygen/other/group_defs.dox: -------------------------------------------------------------------------------- 1 | /*! 2 | * \defgroup block GNU Radio PDU_UTILS C++ Signal Processing Blocks 3 | * \brief All C++ blocks that can be used from the PDU_UTILS GNU Radio 4 | * module are listed here or in the subcategories below. 5 | * 6 | */ 7 | 8 | -------------------------------------------------------------------------------- /docs/doxygen/other/main_page.dox: -------------------------------------------------------------------------------- 1 | /*! \mainpage 2 | 3 | Welcome to the GNU Radio PDU_UTILS Block 4 | 5 | This is the intro page for the Doxygen manual generated for the PDU_UTILS 6 | block (docs/doxygen/other/main_page.dox). Edit it to add more detailed 7 | documentation about the new GNU Radio modules contained in this 8 | project. 9 | 10 | */ 11 | -------------------------------------------------------------------------------- /docs/doxygen/pydoc_macros.h: -------------------------------------------------------------------------------- 1 | #ifndef PYDOC_MACROS_H 2 | #define PYDOC_MACROS_H 3 | 4 | #define __EXPAND(x) x 5 | #define __COUNT(_1, _2, _3, _4, _5, _6, _7, COUNT, ...) COUNT 6 | #define __VA_SIZE(...) __EXPAND(__COUNT(__VA_ARGS__, 7, 6, 5, 4, 3, 2, 1)) 7 | #define __CAT1(a, b) a##b 8 | #define __CAT2(a, b) __CAT1(a, b) 9 | #define __DOC1(n1) __doc_##n1 10 | #define __DOC2(n1, n2) __doc_##n1##_##n2 11 | #define __DOC3(n1, n2, n3) __doc_##n1##_##n2##_##n3 12 | #define __DOC4(n1, n2, n3, n4) __doc_##n1##_##n2##_##n3##_##n4 13 | #define __DOC5(n1, n2, n3, n4, n5) __doc_##n1##_##n2##_##n3##_##n4##_##n5 14 | #define __DOC6(n1, n2, n3, n4, n5, n6) __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6 15 | #define __DOC7(n1, n2, n3, n4, n5, n6, n7) \ 16 | __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7 17 | #define DOC(...) __EXPAND(__EXPAND(__CAT2(__DOC, __VA_SIZE(__VA_ARGS__)))(__VA_ARGS__)) 18 | 19 | #endif // PYDOC_MACROS_H -------------------------------------------------------------------------------- /docs/figures/basic_pdu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sandialabs/gr-pdu_utils/68984503712114bbabb4d6b8814d3997144f025b/docs/figures/basic_pdu.png -------------------------------------------------------------------------------- /docs/figures/fhss_tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sandialabs/gr-pdu_utils/68984503712114bbabb4d6b8814d3997144f025b/docs/figures/fhss_tag.png -------------------------------------------------------------------------------- /docs/figures/pdu_to_bursts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sandialabs/gr-pdu_utils/68984503712114bbabb4d6b8814d3997144f025b/docs/figures/pdu_to_bursts.png -------------------------------------------------------------------------------- /docs/figures/rx_pdu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sandialabs/gr-pdu_utils/68984503712114bbabb4d6b8814d3997144f025b/docs/figures/rx_pdu.png -------------------------------------------------------------------------------- /docs/figures/snl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sandialabs/gr-pdu_utils/68984503712114bbabb4d6b8814d3997144f025b/docs/figures/snl.png -------------------------------------------------------------------------------- /docs/figures/tagging_methods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sandialabs/gr-pdu_utils/68984503712114bbabb4d6b8814d3997144f025b/docs/figures/tagging_methods.png -------------------------------------------------------------------------------- /docs/figures/tx_pdu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sandialabs/gr-pdu_utils/68984503712114bbabb4d6b8814d3997144f025b/docs/figures/tx_pdu.png -------------------------------------------------------------------------------- /docs/pdu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sandialabs/gr-pdu_utils/68984503712114bbabb4d6b8814d3997144f025b/docs/pdu.png -------------------------------------------------------------------------------- /examples/README: -------------------------------------------------------------------------------- 1 | It is considered good practice to add examples in here to demonstrate the 2 | functionality of your OOT module. Python scripts, GRC flow graphs or other 3 | code can go here. 4 | 5 | -------------------------------------------------------------------------------- /gnuradio-pdu_utils.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: gr-pdu_utils 7 | Description: GNURadio OOT toolset for PDU-based processing (3.9 API) 8 | Requires: gnuradio-runtime 9 | Version: @LIBVER@ 10 | Libs: -L${libdir} 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /grc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011 Free Software Foundation, Inc. 2 | # 3 | # This file was generated by gr_modtool, a tool from the GNU Radio framework 4 | # This file is a part of gr-pdu_utils 5 | # 6 | # SPDX-License-Identifier: GPL-3.0-or-later 7 | # 8 | 9 | install(FILES 10 | pdu_utils_tags_to_pdu.block.yml 11 | pdu_utils_pdu_to_bursts.block.yml 12 | pdu_utils_qt_pdu_source.block.yml 13 | pdu_utils_message_gate.block.yml 14 | pdu_utils_pdu_split.block.yml 15 | pdu_utils_tag_message_trigger.block.yml 16 | pdu_utils_pdu_preamble.block.yml 17 | pdu_utils_pdu_gmsk_fc.block.yml 18 | pdu_utils_pdu_set_m.block.yml 19 | pdu_utils_pdu_head_tail.block.yml 20 | pdu_utils_pdu_burst_combiner.block.yml 21 | pdu_utils_take_skip_to_pdu.block.yml 22 | pdu_utils_pdu_fir_filter.block.yml 23 | pdu_utils_pdu_pfb_resamp.block.yml 24 | #pdu_utils_pdu_rational_resampler_cc.xml 25 | pdu_utils_message_counter.block.yml 26 | pdu_utils_message_gate.block.yml 27 | pdu_utils_message_emitter.block.yml 28 | pdu_utils_message_keep_1_in_n.block.yml 29 | pdu_utils_pdu_preamble.block.yml 30 | pdu_utils_pack_unpack.block.yml 31 | pdu_utils_extract_metadata.block.yml 32 | pdu_utils_upsample.block.yml 33 | pdu_utils_pdu_add_noise.block.yml 34 | pdu_utils_msg_drop_random.block.yml 35 | pdu_utils_pdu_length_filter.block.yml 36 | pdu_utils_pdu_logger.block.yml 37 | pdu_utils_pdu_clock_recovery.block.yml 38 | pdu_utils_pdu_align.block.yml 39 | pdu_utils_pdu_range_filter.block.yml 40 | pdu_utils_pdu_round_robin.block.yml 41 | pdu_utils_pdu_flow_ctrl.block.yml 42 | pdu_utils_pdu_binary_tools.block.yml 43 | pdu_utils_pdu_downsample.block.yml 44 | pdu_utils_pdu_fine_time_measure.block.yml 45 | pdu_utils_pdu_complex_to_mag2.block.yml 46 | pdu_utils_pdu_quadrature_demod_cf.block.yml 47 | pdu_utils_pdu_rotate.block.yml 48 | pdu_utils_pdu_slice.block.yml 49 | pdu_utils_pdu_delay.block.yml 50 | pdu_utils_access_code_to_pdu.block.yml DESTINATION share/gnuradio/grc/blocks 51 | ) 52 | -------------------------------------------------------------------------------- /grc/pdu_utils_access_code_to_pdu.block.yml: -------------------------------------------------------------------------------- 1 | id: pdu_utils_access_code_to_pdu 2 | label: Access Code to PDU 3 | category: '[Sandia]/PDU Utilities' 4 | 5 | templates: 6 | imports: from gnuradio import pdu_utils 7 | make: pdu_utils.access_code_to_pdu(${access_code}, ${tail_sync}, ${burst_len}, ${threshold}, ${sync_mode}, ${read_mode}) 8 | 9 | parameters: 10 | - id: access_code 11 | label: Access Code Word 12 | dtype: string 13 | default: '' 14 | - id: tail_sync 15 | label: Tail Syncword 16 | dtype: string 17 | default: '' 18 | - id: burst_len 19 | label: Burst Length 20 | dtype: int 21 | - id: threshold 22 | label: Threshold 23 | dtype: int 24 | - id: sync_mode 25 | label: Syncwords in PDU 26 | dtype: enum 27 | options: [pdu_utils.SYNC_KEEP, pdu_utils.SYNC_FIX, pdu_utils.SYNC_DISCARD] 28 | option_labels: [Keep, Fix, Discard] 29 | default: 'pdu_utils.SYNC_KEEP' 30 | - id: read_mode 31 | label: Read-in Mode 32 | dtype: enum 33 | options: [pdu_utils.READ_STRICT, pdu_utils.READ_PERMISSIVE, pdu_utils.READ_RESET] 34 | option_labels: [Strict, Permissive, Reset] 35 | default: 'pdu_utils.READ_STRICT' 36 | 37 | inputs: 38 | - domain: stream 39 | dtype: byte 40 | # label: in 41 | # id: in 42 | 43 | outputs: 44 | - label: pdu_out 45 | domain: message 46 | id: pdu_out 47 | 48 | asserts: 49 | - ${ burst_len > -1 } 50 | - ${ threshold > -1 } 51 | # 'file_format' specifies the version of the GRC yml format used in the file 52 | # and should usually not be changed. 53 | file_format: 1 54 | -------------------------------------------------------------------------------- /grc/pdu_utils_extract_metadata.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_extract_metadata 4 | label: Extract Metadata 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: key 9 | label: Dictionary Key 10 | dtype: raw 11 | default: pmt.intern("") 12 | - id: scale 13 | label: Scale 14 | dtype: float 15 | default: '1.0' 16 | hide: part 17 | - id: offset 18 | label: Offset 19 | dtype: float 20 | default: '0.0' 21 | hide: part 22 | 23 | inputs: 24 | - domain: message 25 | id: dict 26 | optional: true 27 | 28 | outputs: 29 | - domain: message 30 | id: msg 31 | optional: true 32 | 33 | templates: 34 | imports: |- 35 | from gnuradio import pdu_utils 36 | import pmt 37 | make: pdu_utils.extract_metadata(${key}, ${scale}, ${offset}) 38 | callbacks: 39 | - set_key(${key}) 40 | - set_scale(${scale}) 41 | - set_offset(${offset}) 42 | 43 | file_format: 1 44 | -------------------------------------------------------------------------------- /grc/pdu_utils_message_counter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_message_counter 4 | label: Message Counter 5 | category: '[Sandia]/PDU Utilities/Debug Utils' 6 | 7 | parameters: 8 | - id: name 9 | label: Name 10 | dtype: string 11 | 12 | inputs: 13 | - domain: message 14 | id: msg 15 | 16 | templates: 17 | imports: |- 18 | import pmt 19 | from gnuradio import pdu_utils 20 | make: pdu_utils.message_counter( ${name} ) 21 | 22 | file_format: 1 23 | -------------------------------------------------------------------------------- /grc/pdu_utils_message_emitter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_message_emitter 4 | label: Message Emitter 5 | category: '[Sandia]/PDU Utilities/Debug Utils' 6 | 7 | parameters: 8 | - id: msg 9 | label: Message 10 | dtype: raw 11 | default: pmt.PMT_NIL 12 | - id: emit_msg 13 | label: Emit Message Now 14 | dtype: raw 15 | default: pmt.PMT_NIL 16 | 17 | 18 | outputs: 19 | - domain: message 20 | id: msg 21 | optional: true 22 | 23 | templates: 24 | imports: |- 25 | from gnuradio import pdu_utils 26 | import pmt 27 | make: pdu_utils.message_emitter(${msg}) 28 | callbacks: 29 | - set_msg(msg) 30 | - emit(${emit_msg}) 31 | 32 | file_format: 1 33 | -------------------------------------------------------------------------------- /grc/pdu_utils_message_gate.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_message_gate 4 | label: Message Gate 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: enabled 9 | label: Enabled 10 | dtype: bool 11 | - id: showport 12 | label: Config Port 13 | dtype: enum 14 | default: 'True' 15 | options: ['False', 'True'] 16 | option_labels: [Show, Hide] 17 | hide: part 18 | 19 | inputs: 20 | - domain: message 21 | id: in 22 | optional: true 23 | 24 | outputs: 25 | - domain: message 26 | id: out 27 | optional: true 28 | 29 | templates: 30 | imports: from gnuradio import pdu_utils 31 | make: pdu_utils.message_gate(${enabled}) 32 | callbacks: 33 | - set_enabled(${enabled}) 34 | 35 | file_format: 1 36 | -------------------------------------------------------------------------------- /grc/pdu_utils_message_keep_1_in_n.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_message_keep_1_in_n 4 | label: Keep 1 in N 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: n 9 | label: N 10 | dtype: int 11 | 12 | inputs: 13 | - domain: message 14 | id: in 15 | optional: true 16 | 17 | outputs: 18 | - domain: message 19 | id: out 20 | optional: true 21 | asserts: 22 | - ${ n >= 1 } 23 | 24 | templates: 25 | imports: from gnuradio import pdu_utils 26 | make: pdu_utils.message_keep_1_in_n(${n}) 27 | callbacks: 28 | - set_n(${n}) 29 | 30 | file_format: 1 31 | -------------------------------------------------------------------------------- /grc/pdu_utils_msg_drop_random.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_msg_drop_random 4 | label: Random Msg Drop 5 | category: '[Sandia]/PDU Utilities/Debug Utils' 6 | 7 | parameters: 8 | - id: p_drop 9 | label: P{drop} 10 | dtype: float 11 | default: '0.1' 12 | - id: seed 13 | label: Seed 14 | dtype: int 15 | default: '12345678' 16 | 17 | inputs: 18 | - domain: message 19 | id: pdu_in 20 | optional: true 21 | 22 | outputs: 23 | - domain: message 24 | id: pdu_out 25 | optional: true 26 | asserts: 27 | - ${ p_drop >= 0 } 28 | - ${ p_drop <= 1 } 29 | 30 | templates: 31 | imports: from gnuradio import pdu_utils 32 | make: pdu_utils.msg_drop_random(${p_drop}, ${seed}) 33 | callbacks: 34 | - set_prob_drop(${p_drop}) 35 | 36 | 37 | file_format: 1 38 | -------------------------------------------------------------------------------- /grc/pdu_utils_pack_unpack.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pack_unpack 4 | label: PDU Pack/Unpack 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: mode 9 | label: Mode 10 | dtype: enum 11 | options: [pdu_utils.MODE_PACK_BYTE, pdu_utils.MODE_UNPACK_BYTE, pdu_utils.MODE_BITSWAP_BYTE] 12 | option_labels: [Pack, Unpack, Bit Reverse] 13 | - id: bit_order 14 | label: Bit Order 15 | dtype: enum 16 | options: [pdu_utils.BIT_ORDER_MSB_FIRST, pdu_utils.BIT_ORDER_LSB_FIRST] 17 | option_labels: [MSB First, LSB First] 18 | 19 | inputs: 20 | - domain: message 21 | id: pdu_in 22 | 23 | outputs: 24 | - domain: message 25 | id: pdu_out 26 | optional: true 27 | 28 | templates: 29 | imports: from gnuradio import pdu_utils 30 | make: pdu_utils.pack_unpack(${mode}, ${bit_order}) 31 | 32 | file_format: 1 33 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_add_noise.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_add_noise 4 | label: Add Noise 5 | category: '[Sandia]/PDU Utilities/Debug Utils' 6 | 7 | parameters: 8 | - id: level 9 | label: Noise Level (stddev) 10 | dtype: float 11 | default: '0.0' 12 | - id: offset 13 | label: Offset 14 | dtype: float 15 | default: '0.0' 16 | - id: scale 17 | label: Scale 18 | dtype: float 19 | default: '1.0' 20 | - id: seed 21 | label: Seed 22 | dtype: int 23 | default: '123456789' 24 | - id: dist 25 | label: Distribution 26 | dtype: int 27 | default: pdu_utils.UNIFORM 28 | options: [pdu_utils.UNIFORM, pdu_utils.GAUSSIAN] 29 | option_labels: [Uniform, Gaussian] 30 | 31 | inputs: 32 | - domain: message 33 | id: pdu_in 34 | optional: true 35 | 36 | outputs: 37 | - domain: message 38 | id: pdu_out 39 | optional: true 40 | asserts: 41 | - ${ level >= 0 } 42 | 43 | templates: 44 | imports: from gnuradio import pdu_utils 45 | make: pdu_utils.pdu_add_noise(${level}, ${offset}, ${scale}, ${seed}, ${dist}) 46 | callbacks: 47 | - set_noise_level(${level}) 48 | - set_offset(${offset}) 49 | - set_scale(${scale}) 50 | - set_noise_dist(${dist}) 51 | 52 | file_format: 1 53 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_align.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_align 4 | label: PDU Align 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: syncwords 9 | label: Syncwords 10 | dtype: string 11 | default: 01010101010101010010110111010100, 10101010101010100010110111010100 12 | - id: offset 13 | label: Offset 14 | dtype: int 15 | default: '-16' 16 | - id: threshold 17 | label: Threshold 18 | dtype: int 19 | default: '0' 20 | - id: mode 21 | label: Output if no sync 22 | dtype: enum 23 | options: [pdu_utils.ALIGN_DROP, pdu_utils.ALIGN_FORWARD, pdu_utils.ALIGN_EMPTY] 24 | option_labels: [Send nothing, Send input PDU, Send empty PDU] 25 | - id: match_mode 26 | label: Sync match mode 27 | dtype: enum 28 | options: [pdu_utils.ALIGN_FIRST_MATCH, pdu_utils.ALIGN_BEST_MATCH] 29 | option_labels: [Output at first match, Look ahead for better match] 30 | 31 | inputs: 32 | - domain: message 33 | id: pdu_in 34 | 35 | outputs: 36 | - domain: message 37 | id: pdu_out 38 | asserts: 39 | - ${ threshold >= 0 } 40 | 41 | templates: 42 | imports: from gnuradio import pdu_utils 43 | make: pdu_utils.pdu_align(${syncwords}, ${threshold}, ${offset}, ${mode}, ${match_mode}) 44 | 45 | 46 | file_format: 1 47 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_binary_tools.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_binary_tools 4 | label: PDU Binary Tools 5 | category: '[Sandia]/PDU Utilities/' 6 | 7 | parameters: 8 | - id: mode 9 | label: Mode 10 | dtype: enum 11 | options: ['0', '1', '2', '3', '4','5','6'] 12 | option_labels: [Bit Flip, To NRZ, From NRZ, Slice, Endian Swap, Manchester Encode, Manchester Decode] 13 | 14 | inputs: 15 | - domain: message 16 | id: pdu_in 17 | optional: true 18 | 19 | outputs: 20 | - domain: message 21 | id: pdu_out 22 | optional: true 23 | 24 | templates: 25 | imports: from gnuradio import pdu_utils 26 | make: pdu_utils.pdu_binary_tools(${mode}) 27 | 28 | file_format: 1 29 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_burst_combiner.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_burst_combiner 4 | label: PDU Burst Combiner 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | inputs: 8 | - domain: message 9 | id: pdu_in 10 | optional: true 11 | 12 | outputs: 13 | - domain: message 14 | id: pdu_out 15 | optional: true 16 | 17 | templates: 18 | imports: from gnuradio import pdu_utils 19 | make: pdu_utils.pdu_burst_combiner() 20 | 21 | file_format: 1 22 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_clock_recovery.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_clock_recovery 4 | label: PDU Clock Recovery 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: binary_slice 9 | label: Slice? 10 | dtype: enum 11 | options: [binary, none] 12 | option_attributes: 13 | val: ['True', 'False'] 14 | - id: debug 15 | label: Debug 16 | dtype: enum 17 | default: 'False' 18 | options: ['False', 'True'] 19 | hide: part 20 | - id: win_type 21 | label: Window Type 22 | dtype: enum 23 | default: pdu_utils.TUKEY_WIN 24 | options: [pdu_utils.TUKEY_WIN, pdu_utils.GAUSSIAN_WIN] 25 | option_labels: [Tukey, Gaussian] 26 | 27 | 28 | inputs: 29 | - domain: message 30 | id: pdu_in 31 | 32 | outputs: 33 | - domain: message 34 | id: pdu_out 35 | - domain: message 36 | id: debug 37 | optional: true 38 | - domain: message 39 | id: zeroX 40 | optional: true 41 | - domain: message 42 | id: window 43 | optional: true 44 | 45 | templates: 46 | imports: from gnuradio import pdu_utils 47 | make: pdu_utils.pdu_clock_recovery(${binary_slice.val}, ${debug}, ${win_type}) 48 | 49 | 50 | 51 | file_format: 1 52 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_complex_to_mag2.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_complex_to_mag2 4 | label: Complex to Mag^2 5 | category: '[Sandia]/PDU Utilities/' 6 | 7 | inputs: 8 | - domain: message 9 | id: cpdus 10 | 11 | outputs: 12 | - domain: message 13 | id: fpdus 14 | 15 | templates: 16 | imports: from gnuradio import pdu_utils 17 | make: pdu_utils.pdu_complex_to_mag2() 18 | 19 | file_format: 1 20 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_delay.block.yml: -------------------------------------------------------------------------------- 1 | id: pdu_utils_pdu_delay 2 | label: PDU Delay 3 | category: '[Sandia]/PDU Utilities/' 4 | 5 | parameters: 6 | - id: delay 7 | label: Delay (s) 8 | dtype: float 9 | default: '0' 10 | - id: debug 11 | label: Debug Mode 12 | dtype: bool 13 | default: 'False' 14 | 15 | inputs: 16 | - domain: message 17 | id: pdu_in 18 | 19 | outputs: 20 | - domain: message 21 | id: pdu_out 22 | 23 | templates: 24 | imports: from gnuradio import pdu_utils 25 | make: pdu_utils.pdu_delay(${delay}) 26 | callbacks: 27 | - set_delay(${delay}) 28 | - set_debug(${debug}) 29 | 30 | file_format: 1 31 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_downsample.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_downsample 4 | label: PDU Downsample 5 | category: '[Sandia]/PDU Utilities/' 6 | 7 | parameters: 8 | - id: decimation 9 | label: Decimation 10 | dtype: int 11 | default: '2' 12 | - id: phase 13 | label: Phase 14 | dtype: int 15 | default: '0' 16 | 17 | inputs: 18 | - domain: message 19 | id: pdu_in 20 | optional: true 21 | 22 | outputs: 23 | - domain: message 24 | id: pdu_out 25 | optional: true 26 | 27 | templates: 28 | imports: from gnuradio import pdu_utils 29 | make: pdu_utils.pdu_downsample(${decimation}, ${phase}) 30 | 31 | file_format: 1 32 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_fine_time_measure.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_fine_time_measure 4 | label: PDU Fine Time Measurement 5 | category: '[Sandia]/PDU Utilities/' 6 | 7 | parameters: 8 | - id: pre_burst_time 9 | label: Pre Burst time 10 | dtype: float 11 | default: 80e-6 12 | - id: post_burst_time 13 | label: Post Burst time 14 | dtype: float 15 | default: 80e-6 16 | - id: average_width 17 | label: Moving Average Width 18 | dtype: int 19 | default: '20' 20 | - id: buffer_percent 21 | label: Buffer Percent 22 | dtype: float 23 | default: '10' 24 | 25 | inputs: 26 | - domain: message 27 | id: pdu_in 28 | optional: true 29 | 30 | outputs: 31 | - domain: message 32 | id: pdu_out 33 | optional: true 34 | asserts: 35 | - ${ buffer_percent >= 0 } 36 | - ${ buffer_percent < 100 } 37 | - ${ average_width > 0 } 38 | - ${ pre_burst_time > 0 } 39 | - ${ post_burst_time > 0 } 40 | 41 | templates: 42 | imports: from gnuradio import pdu_utils 43 | make: pdu_utils.pdu_fine_time_measure(${pre_burst_time}, ${post_burst_time}, ${average_width}, 44 | ${buffer_percent}) 45 | 46 | file_format: 1 47 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_fir_filter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_fir_filter 4 | label: PDU FIR Filter 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: decimation 9 | label: Decimation 10 | dtype: int 11 | default: '1' 12 | - id: taps 13 | label: FIR Taps 14 | dtype: float_vector 15 | default: '1' 16 | 17 | inputs: 18 | - domain: message 19 | id: pdu_in 20 | 21 | outputs: 22 | - domain: message 23 | id: pdu_out 24 | optional: true 25 | 26 | templates: 27 | imports: from gnuradio import pdu_utils 28 | make: pdu_utils.pdu_fir_filter(${decimation}, ${taps}) 29 | callbacks: 30 | - set_taps(${taps}) 31 | - set_decimation(${decimation}) 32 | 33 | file_format: 1 34 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_gmsk_fc.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_gmsk_fc 4 | label: PDU GMSK 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: sensitivity 9 | label: Sensitivity 10 | dtype: float 11 | - id: taps 12 | label: FIR Taps 13 | dtype: float_vector 14 | default: '1' 15 | 16 | inputs: 17 | - domain: message 18 | id: pdu_in 19 | 20 | outputs: 21 | - domain: message 22 | id: pdu_out 23 | optional: true 24 | asserts: 25 | - ${ sensitivity > 0 } 26 | 27 | templates: 28 | imports: from gnuradio import pdu_utils 29 | make: pdu_utils.pdu_gmsk_fc(${sensitivity}, ${taps}) 30 | callbacks: 31 | - set_sensitivity(${sensitivity}) 32 | - set_taps(${taps}) 33 | 34 | file_format: 1 35 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_head_tail.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_head_tail 4 | label: PDU Head/Tail 5 | category: '[Sandia]/PDU Utilities/Debug Utils' 6 | 7 | parameters: 8 | - id: pdu_type 9 | label: PDU Type 10 | dtype: enum 11 | options: [pdu_utils.INPUTTYPE_UNPACKED_BYTE, pdu_utils.INPUTTYPE_PACKED_BYTE, 12 | pdu_utils.INPUTTYPE_FLOAT] 13 | option_labels: [U8 Bits, U8 Bytes, Float] 14 | - id: length 15 | label: Length 16 | dtype: int 17 | default: 8*8 18 | - id: histsize 19 | label: Hist Length 20 | dtype: int 21 | default: '64' 22 | 23 | inputs: 24 | - domain: message 25 | id: pdu_in 26 | optional: true 27 | 28 | outputs: 29 | - domain: message 30 | id: head 31 | optional: true 32 | - domain: message 33 | id: tail 34 | optional: true 35 | asserts: 36 | - ${ length >= 2 } 37 | - ${ length <= 4096 } 38 | - ${ histsize >= 2 } 39 | - ${ histsize <= 4096 } 40 | 41 | templates: 42 | imports: from gnuradio import pdu_utils 43 | make: pdu_utils.pdu_head_tail(${pdu_type}, ${length}, ${histsize}) 44 | callbacks: 45 | - set_length(${length}) 46 | - set_histsize(${histsize}) 47 | 48 | 49 | file_format: 1 50 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_length_filter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_length_filter 4 | label: PDU Length Filter 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: length 9 | label: Length 10 | dtype: int 11 | default: '1024' 12 | - id: drop_long 13 | label: Mode 14 | dtype: enum 15 | options: ['True', 'False'] 16 | option_labels: [Drop Longer, Drop Shorter] 17 | 18 | inputs: 19 | - domain: message 20 | id: pdu_in 21 | optional: true 22 | 23 | outputs: 24 | - domain: message 25 | id: pdu_out 26 | optional: true 27 | 28 | templates: 29 | imports: from gnuradio import pdu_utils 30 | make: pdu_utils.pdu_length_filter(${length}, ${drop_long}) 31 | 32 | 33 | file_format: 1 34 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_logger.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_logger 4 | label: PDU Logger 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: logfile 9 | label: Logfile 10 | dtype: string 11 | default: '''/tmp/bursts/raw-''' 12 | 13 | - id: pdus_per_file 14 | label: PDUs per File 15 | dtype: int 16 | default: '1' 17 | 18 | inputs: 19 | - domain: message 20 | id: pdu_in 21 | 22 | templates: 23 | imports: from gnuradio import pdu_utils 24 | make: pdu_utils.pdu_logger(${logfile}, ${pdus_per_file}) 25 | 26 | file_format: 1 27 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_pfb_resamp.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_pfb_resamp_cc 4 | label: PDU PFB Resampler 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: type 9 | label: Type 10 | dtype: enum 11 | options: [ccf, fff, ccc] 12 | option_labels: [Complex->Complex (Real Taps), Float->Float (Real Taps), Complex->Complex (Complex Taps)] 13 | option_attributes: 14 | input: [complex, float, complex] 15 | output: [complex, float, complex] 16 | taps: [real_vector, real_vector, complex_vector] 17 | - id: resamp_rate 18 | label: Resample Rate 19 | dtype: float 20 | default: '1' 21 | - id: taps 22 | label: PFB Taps 23 | dtype: float_vector 24 | - id: nfilts 25 | label: N Filters 26 | dtype: int 27 | default: '32' 28 | 29 | inputs: 30 | - domain: message 31 | id: pdu_in 32 | 33 | outputs: 34 | - domain: message 35 | id: pdu_out 36 | optional: true 37 | 38 | templates: 39 | imports: |- 40 | from gnuradio import pdu_utils 41 | from gnuradio import filter 42 | make: |- 43 | pdu_utils.pdu_pfb_resamp_${type}( 44 | % if taps: 45 | ${taps}, 46 | % else: 47 | filter.firdes.low_pass_2(${nfilts}, ${nfilts}, 0.4, 0.2, 100, filter.window.WIN_BLACKMAN_HARRIS) \ 48 | if ${resamp_rate} < 1 \ 49 | else filter.optfir.low_pass(${nfilts}, ${nfilts}, 0.4, 0.6, .1, 100), 50 | % endif 51 | ${nfilts}, ${resamp_rate}) 52 | callbacks: 53 | - set_taps(${taps}) 54 | 55 | file_format: 1 56 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_preamble.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_preamble 4 | label: PDU Preamble F 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: preamble 9 | label: Preamble 10 | dtype: raw 11 | default: numpy.array([]) 12 | - id: tail 13 | label: Tail 14 | dtype: raw 15 | default: numpy.array([]) 16 | - id: interp 17 | label: Interpolation 18 | dtype: int 19 | default: '1' 20 | - id: zero_pad 21 | label: Pad Size 22 | dtype: int 23 | default: '0' 24 | - id: nrz 25 | label: Encoding 26 | dtype: bool 27 | default: 'True' 28 | options: ['False', 'True'] 29 | option_labels: [None, NRZ] 30 | hide: part 31 | 32 | inputs: 33 | - domain: message 34 | id: pdu_in 35 | 36 | outputs: 37 | - domain: message 38 | id: pdu_out 39 | optional: true 40 | asserts: 41 | - ${ interp >= 1 } 42 | - ${ zero_pad >= 0 } 43 | 44 | templates: 45 | imports: |- 46 | from gnuradio import pdu_utils 47 | import numpy 48 | make: pdu_utils.pdu_preamble(${preamble}, ${tail}, ${interp}, ${zero_pad}, ${nrz}) 49 | callbacks: 50 | - set_preamble(${preamble}) 51 | - set_tail(${tail}) 52 | - set_interp(${interp}) 53 | - set_pad(${zero_pad}) 54 | - set_nrz(${nrz}) 55 | 56 | file_format: 1 57 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_quadrature_demod_cf.block.yml: -------------------------------------------------------------------------------- 1 | id: pdu_utils_pdu_quadrature_demod_cf 2 | label: PDU Quadrature Demod 3 | category: '[Sandia]/PDU Utilities' 4 | 5 | parameters: 6 | - id: sensitivity 7 | label: Sensitivity 8 | dtype: float 9 | default: 1.0 10 | 11 | inputs: 12 | - domain: message 13 | id: cpdus 14 | 15 | outputs: 16 | - domain: message 17 | id: fpdus 18 | 19 | templates: 20 | imports: from gnuradio import pdu_utils 21 | make: pdu_utils.pdu_quadrature_demod_cf(${sensitivity}) 22 | 23 | file_format: 1 24 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_range_filter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_range_filter 4 | label: PDU Range Filter 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: key 9 | label: Key 10 | dtype: raw 11 | default: pmt.intern("key") 12 | - id: min 13 | label: Min Value 14 | dtype: real 15 | - id: max 16 | label: Max Value 17 | dtype: real 18 | - id: invert 19 | label: Invert Filter 20 | dtype: bool 21 | default: 'False' 22 | options: ['False', 'True'] 23 | option_labels: ['No', 'Yes'] 24 | 25 | inputs: 26 | - domain: message 27 | id: pdu_in 28 | 29 | outputs: 30 | - domain: message 31 | id: pdu_out 32 | 33 | templates: 34 | imports: from gnuradio import pdu_utils 35 | make: pdu_utils.pdu_range_filter(${key}, ${min}, ${max}, ${invert}) 36 | callbacks: 37 | - set_key(${key}) 38 | - set_min(${min}) 39 | - set_max(${max}) 40 | - set_inversion(${invert}) 41 | 42 | file_format: 1 43 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_rotate.block.yml: -------------------------------------------------------------------------------- 1 | id: pdu_utils_pdu_rotate 2 | label: PDU Rotate 3 | category: '[Sandia]/PDU Utilities/' 4 | 5 | templates: 6 | imports: from gnuradio import pdu_utils 7 | make: pdu_utils.pdu_rotate(${phase_inc}) 8 | callbacks: 9 | - set_phase_inc(${phase_inc}) 10 | 11 | parameters: 12 | - id: phase_inc 13 | label: Phase Inc 14 | dtype: float 15 | default: '0' 16 | 17 | inputs: 18 | - domain: message 19 | id: pdu_in 20 | optional: true 21 | 22 | outputs: 23 | - domain: message 24 | id: pdu_out 25 | optional: true 26 | 27 | file_format: 1 28 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_round_robin.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_round_robin 4 | label: PDU Round Robin 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: num_outputs 9 | label: Num Outputs 10 | dtype: int 11 | default: '2' 12 | hide: part 13 | 14 | inputs: 15 | - domain: message 16 | id: pdu_in 17 | optional: true 18 | 19 | outputs: 20 | - domain: message 21 | id: pdu_out_ 22 | multiplicity: ${ num_outputs } 23 | optional: true 24 | asserts: 25 | - ${ num_outputs >= 2 } 26 | 27 | templates: 28 | imports: from gnuradio import pdu_utils 29 | make: pdu_utils.pdu_round_robin(${num_outputs}) 30 | 31 | file_format: 1 32 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_set_m.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_set_m 4 | label: PDU Set 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: k 9 | label: Key 10 | dtype: raw 11 | default: pmt.intern("key") 12 | - id: v 13 | label: Value 14 | dtype: raw 15 | default: pmt.intern("value") 16 | - id: kv_merge 17 | label: Parse for Value Insertion 18 | dtype: bool 19 | default: False 20 | - id: v_overwrite 21 | label: Value Overwrite 22 | dtype: bool 23 | default: False 24 | hide: part 25 | 26 | 27 | inputs: 28 | - domain: message 29 | id: pdu_in 30 | optional: true 31 | 32 | outputs: 33 | - domain: message 34 | id: pdu_out 35 | optional: true 36 | 37 | templates: 38 | imports: from gnuradio import pdu_utils 39 | make: pdu_utils.pdu_set_m(${k}, ${v}, ${kv_merge}, ${v_overwrite}) 40 | callbacks: 41 | - set_key(${k}) 42 | - set_val(${v}) 43 | - set_val(${kv_merge}) 44 | - set_val(${v_overwrite}) 45 | 46 | file_format: 1 47 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_slice.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_slice 4 | label: PDU Slice 5 | category: '[Sandia]/PDU Utilities/' 6 | 7 | parameters: 8 | - id: slice 9 | label: Slice 10 | dtype: string 11 | default: '[:]' 12 | 13 | inputs: 14 | - domain: message 15 | id: pdu_in 16 | 17 | outputs: 18 | - domain: message 19 | id: pdu_out 20 | 21 | templates: 22 | imports: from gnuradio import pdu_utils 23 | make: pdu_utils.pdu_slice(${slice}) 24 | callbacks: 25 | - set_slice(${slice}) 26 | 27 | file_format: 1 28 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_split.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_split 4 | label: PDU Split 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: pass_empty 9 | label: Empty 10 | dtype: enum 11 | options: ['False', 'True'] 12 | option_labels: [Drop, Print] 13 | 14 | inputs: 15 | - domain: message 16 | id: pdu_in 17 | 18 | outputs: 19 | - domain: message 20 | id: dict 21 | optional: true 22 | - domain: message 23 | id: data 24 | optional: true 25 | 26 | templates: 27 | imports: from gnuradio import pdu_utils 28 | make: pdu_utils.pdu_split(${pass_empty}) 29 | 30 | file_format: 1 31 | -------------------------------------------------------------------------------- /grc/pdu_utils_pdu_to_bursts.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_pdu_to_bursts_X 4 | label: PDU To Bursts 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: type 9 | label: PDU Type 10 | dtype: enum 11 | options: [c, f, s, b] 12 | option_labels: [Complex, Float, Short, Byte] 13 | option_attributes: 14 | output: [complex, float, short, byte] 15 | hide: part 16 | - id: early_behavior 17 | label: Early Behavior 18 | dtype: enum 19 | options: [pdu_utils.EARLY_BURST_BEHAVIOR__APPEND, pdu_utils.EARLY_BURST_BEHAVIOR__DROP, 20 | pdu_utils.EARLY_BURST_BEHAVIOR__BALK] 21 | option_labels: [Append, Drop, Balk] 22 | - id: depth 23 | label: Queue Depth 24 | dtype: int 25 | default: '64' 26 | hide: part 27 | 28 | inputs: 29 | - domain: message 30 | id: bursts 31 | 32 | outputs: 33 | - domain: stream 34 | dtype: ${ type.output } 35 | asserts: 36 | - ${ depth > 2 } 37 | - ${ depth <= 2048 } 38 | 39 | templates: 40 | imports: from gnuradio import pdu_utils 41 | make: pdu_utils.pdu_to_bursts_${type}(${early_behavior}, ${depth}) 42 | callbacks: 43 | - set_max_queue_size(${depth}) 44 | 45 | file_format: 1 46 | -------------------------------------------------------------------------------- /grc/pdu_utils_qt_pdu_source.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_qt_pdu_source 4 | label: QT PDU Source 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: default_vector 9 | label: PDU Vector 10 | dtype: int_vector 11 | default: '[1,2,3,4]' 12 | - id: default_meta 13 | label: PDU Metadata 14 | dtype: string 15 | default: '{''trailer flags'':(0,0,0),''trailer window'':1000,''net ID'':25}' 16 | - id: submit_text 17 | label: Button Text 18 | dtype: string 19 | default: Send 20 | - id: gui_hint 21 | label: GUI Hint 22 | dtype: gui_hint 23 | hide: part 24 | - id: cr_on 25 | label: Append ASCII CR? 26 | dtype: int 27 | default: '0' 28 | hide: part 29 | 30 | outputs: 31 | - domain: message 32 | id: pdu_out 33 | optional: true 34 | 35 | templates: 36 | imports: from gnuradio import pdu_utils 37 | 38 | make: |- 39 | #set $win = 'self._%s_win'%$id 40 | <% win = 'self._%s_win'%id %> 41 | pdu_utils.qt_pdu_source(defaults={"PDU Vector":$default_vector,"PDU Metadata":$default_meta},submit_text=$submit_text) 42 | self._$(id)_win = self.$(id) 43 | $(gui_hint()($win)) 44 | 45 | 46 | #<% win = 'self._%s_win'%id %> 47 | #pdu_utils.qt_pdu_source(defaults={"PDU Vector":${default_vector},"PDU Metadata":${default_meta}},submit_text=${submit_text}) 48 | #self._${id}_win = self.${id} 49 | #${gui_hint(in)} 50 | callbacks: 51 | - set_ascii_cr(${cr_on}) 52 | 53 | file_format: 1 54 | -------------------------------------------------------------------------------- /grc/pdu_utils_take_skip_to_pdu.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_take_skip_to_pdu 4 | label: Take/Skip To PDU 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: type 9 | label: PDU Type 10 | dtype: enum 11 | options: [c, f, s, b] 12 | option_labels: [Complex, Float, Short, Byte] 13 | option_attributes: 14 | input: [complex, float, short, byte] 15 | vec_type: [complex_vector, float_vector, int_vector, int_vector] 16 | hide: part 17 | - id: take 18 | label: Take 19 | dtype: int 20 | default: '1024' 21 | - id: skip 22 | label: Skip 23 | dtype: int 24 | default: '4096' 25 | 26 | inputs: 27 | - domain: stream 28 | dtype: ${ type.input } 29 | 30 | outputs: 31 | - domain: message 32 | id: pdu_out 33 | optional: true 34 | asserts: 35 | - ${ take >= 1 } 36 | - ${ take <= pdu_utils.TAKESKIP_MAXIMUM_PDU_SIZE } 37 | - ${ skip >= 0 } 38 | 39 | templates: 40 | imports: from gnuradio import pdu_utils 41 | make: pdu_utils.take_skip_to_pdu_${type}(${take}, ${skip}) 42 | callbacks: 43 | - set_take(${take}) 44 | - set_skip(${skip}) 45 | 46 | file_format: 1 47 | -------------------------------------------------------------------------------- /grc/pdu_utils_upsample.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: pdu_utils_upsample 4 | label: PDU Upsample 5 | category: '[Sandia]/PDU Utilities' 6 | 7 | parameters: 8 | - id: repeat 9 | label: Mode 10 | dtype: bool 11 | options: ['True', 'False'] 12 | option_labels: [Repeat, Zero Pad] 13 | - id: n 14 | label: N 15 | dtype: int 16 | default: '4' 17 | 18 | inputs: 19 | - domain: message 20 | id: pdu_in 21 | 22 | outputs: 23 | - domain: message 24 | id: pdu_out 25 | optional: true 26 | asserts: 27 | - ${ n >= 1 } 28 | 29 | templates: 30 | imports: from gnuradio import pdu_utils 31 | make: pdu_utils.upsample(${n}, ${repeat}) 32 | callbacks: 33 | - set_n(${n}) 34 | - set_repeat(${repeat}) 35 | 36 | file_format: 1 37 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file was generated by gr_modtool, a tool from the GNU Radio framework 4 | # This file is a part of gr-pdu_utils 5 | # 6 | # SPDX-License-Identifier: GPL-3.0-or-later 7 | # 8 | 9 | ######################################################################## 10 | # Install public header files 11 | ######################################################################## 12 | install(FILES 13 | api.h 14 | constants.h 15 | pdu_gmsk_fc.h 16 | pdu_set_m.h 17 | pdu_burst_combiner.h 18 | pdu_split.h 19 | pdu_fir_filter.h 20 | pdu_pfb_resamp.h 21 | #pdu_rational_resampler_cc.h 22 | message_counter.h 23 | message_gate.h 24 | message_emitter.h 25 | message_keep_1_in_n.h 26 | pdu_preamble.h 27 | pack_unpack.h 28 | extract_metadata.h 29 | upsample.h 30 | pdu_add_noise.h 31 | msg_drop_random.h 32 | pdu_head_tail.h 33 | pdu_length_filter.h 34 | pdu_logger.h 35 | pdu_clock_recovery.h 36 | pdu_align.h 37 | pdu_range_filter.h 38 | pdu_round_robin.h 39 | pdu_flow_ctrl_helper.h 40 | pdu_binary_tools.h 41 | pdu_downsample.h 42 | pdu_fine_time_measure.h 43 | pdu_complex_to_mag2.h 44 | pdu_to_bursts.h 45 | tag_message_trigger.h 46 | tags_to_pdu.h 47 | take_skip_to_pdu.h 48 | pdu_quadrature_demod_cf.h 49 | pdu_rotate.h 50 | pdu_slice.h 51 | access_code_to_pdu.h DESTINATION include/gnuradio/pdu_utils 52 | ) 53 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Free Software Foundation, Inc. 3 | * 4 | * This file was generated by gr_modtool, a tool from the GNU Radio framework 5 | * This file is a part of gr-pdu_utils 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | * 9 | */ 10 | 11 | #ifndef INCLUDED_PDU_UTILS_API_H 12 | #define INCLUDED_PDU_UTILS_API_H 13 | 14 | #include 15 | 16 | #ifdef gnuradio_pdu_utils_EXPORTS 17 | #define PDU_UTILS_API __GR_ATTR_EXPORT 18 | #else 19 | #define PDU_UTILS_API __GR_ATTR_IMPORT 20 | #endif 21 | 22 | #endif /* INCLUDED_PDU_UTILS_API_H */ 23 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/message_counter.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | 11 | #ifndef INCLUDED_PDU_UTILS_MESSAGE_COUNTER_H 12 | #define INCLUDED_PDU_UTILS_MESSAGE_COUNTER_H 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | 19 | namespace gr { 20 | namespace pdu_utils { 21 | 22 | /*! 23 | * \brief Counts the number of message received by the msg port 24 | * 25 | * Prints out message count when the flow graph stops 26 | * 27 | * \ingroup pdu_utils 28 | * 29 | */ 30 | class PDU_UTILS_API message_counter : virtual public gr::block 31 | { 32 | public: 33 | typedef std::shared_ptr sptr; 34 | 35 | /*! 36 | * \brief Return a shared_ptr to a new instance of pdu_utils::message_counter. 37 | * 38 | * To avoid accidental use of raw pointers, pdu_utils::message_counter's 39 | * constructor is in a private implementation 40 | * class. pdu_utils::message_counter::make is the public interface for 41 | * creating new instances. 42 | * 43 | * @param name - name of counter 44 | */ 45 | static sptr make(std::string name); 46 | 47 | /** 48 | * resets the counter to zero 49 | */ 50 | virtual void reset(void) = 0; 51 | 52 | /** 53 | * returns the current value of the counter 54 | * 55 | * @return uint64_t - counter value. 56 | */ 57 | virtual uint64_t get_ctr(void) = 0; 58 | 59 | /** 60 | * returns the counter name 61 | * 62 | * @return std::string 63 | */ 64 | virtual std::string get_name(void) = 0; 65 | }; 66 | 67 | } // namespace pdu_utils 68 | } // namespace gr 69 | 70 | #endif /* INCLUDED_PDU_UTILS_MESSAGE_COUNTER_H */ 71 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/message_emitter.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | 11 | #ifndef INCLUDED_PDU_UTILS_MESSAGE_EMITTER_H 12 | #define INCLUDED_PDU_UTILS_MESSAGE_EMITTER_H 13 | 14 | #include 15 | #include 16 | 17 | namespace gr { 18 | namespace pdu_utils { 19 | 20 | /*! 21 | * \brief Block emits messages when emit() is called. Designed to be useful 22 | * for QA tests. 23 | * 24 | * \ingroup pdu_utils 25 | * 26 | */ 27 | class PDU_UTILS_API message_emitter : virtual public gr::block 28 | { 29 | public: 30 | typedef std::shared_ptr sptr; 31 | 32 | /*! 33 | * \brief Return a shared_ptr to a new instance of pdu_utils::message_emitter. 34 | * 35 | * @param msg - PDU message to emit 36 | */ 37 | static sptr make(pmt::pmt_t msg = pmt::PMT_NIL); 38 | 39 | /** 40 | * Set Message to emit 41 | * 42 | * @param msg - message to emit 43 | */ 44 | virtual void set_msg(pmt::pmt_t msg) = 0; 45 | 46 | /** 47 | * Returns count of total messages emitted 48 | * 49 | * @return uint64_t 50 | */ 51 | virtual uint64_t get_n_msgs(void) = 0; 52 | 53 | /** 54 | * Emits pre-specified message 55 | */ 56 | virtual void emit(void) = 0; 57 | 58 | /** 59 | * Emits passed message. 60 | * If passed message is invalid, pre-specified message is emitted 61 | * 62 | * @param msg - Message to emit 63 | */ 64 | virtual void emit(pmt::pmt_t msg) = 0; 65 | }; 66 | 67 | } // namespace pdu_utils 68 | } // namespace gr 69 | 70 | #endif /* INCLUDED_PDU_UTILS_MESSAGE_EMITTER_H */ 71 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/message_gate.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | 11 | #ifndef INCLUDED_PDU_UTILS_MESSAGE_GATE_H 12 | #define INCLUDED_PDU_UTILS_MESSAGE_GATE_H 13 | 14 | #include 15 | #include 16 | 17 | namespace gr { 18 | namespace pdu_utils { 19 | 20 | /*! 21 | * \brief Simple message gate 22 | * \ingroup pdu_utils 23 | * 24 | * Simple message gate to control whether or not messages pass. 25 | * 26 | */ 27 | class PDU_UTILS_API message_gate : virtual public gr::block 28 | { 29 | public: 30 | typedef std::shared_ptr sptr; 31 | 32 | /*! 33 | * \brief Return a shared_ptr to a new instance of pdu_utils::message_gate. 34 | * 35 | * @param enabled - true to pass messages 36 | */ 37 | static sptr make(bool enabled); 38 | 39 | /** 40 | * Resets state of block 41 | */ 42 | virtual void reset(void) = 0; 43 | 44 | /** 45 | * Return count of passed messages 46 | * 47 | * @return uint64_t 48 | */ 49 | virtual uint64_t get_n_passed(void) = 0; 50 | 51 | /** 52 | * Return count of blocked messages 53 | * 54 | * @return uint64_t 55 | */ 56 | virtual uint64_t get_n_blocked(void) = 0; 57 | 58 | /** 59 | * Returns enable status 60 | * 61 | * @return bool - true when messages passed 62 | */ 63 | virtual bool get_enabled(void) = 0; 64 | 65 | /** 66 | * Set gate state 67 | * 68 | * @param enabled - true to pass messages 69 | */ 70 | virtual void set_enabled(bool enabled) = 0; 71 | }; 72 | 73 | } // namespace pdu_utils 74 | } // namespace gr 75 | 76 | #endif /* INCLUDED_PDU_UTILS_MESSAGE_GATE_H */ 77 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/message_keep_1_in_n.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | 11 | #ifndef INCLUDED_PDU_UTILS_MESSAGE_KEEP_1_IN_N_H 12 | #define INCLUDED_PDU_UTILS_MESSAGE_KEEP_1_IN_N_H 13 | 14 | #include 15 | #include 16 | 17 | namespace gr { 18 | namespace pdu_utils { 19 | 20 | /*! 21 | * \brief Keep 1 in N messages 22 | * \ingroup pdu_utils 23 | * 24 | * This block is equivalent to the Stream keep_1_in_n block but for messages. 25 | */ 26 | class PDU_UTILS_API message_keep_1_in_n : virtual public gr::block 27 | { 28 | public: 29 | typedef std::shared_ptr sptr; 30 | 31 | /*! 32 | * \brief Return a shared_ptr to a new instance of pdu_utils::message_keep_1_in_n. 33 | * 34 | * @param n - Sets N 35 | */ 36 | static sptr make(uint32_t n); 37 | 38 | /** 39 | * Sets N value 40 | * 41 | * @param n - 42 | */ 43 | virtual void set_n(uint32_t n) = 0; 44 | 45 | /** 46 | * Returns N value 47 | * 48 | * @return uint32_t 49 | */ 50 | virtual uint32_t get_n(void) = 0; 51 | }; 52 | 53 | } // namespace pdu_utils 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_PDU_UTILS_MESSAGE_KEEP_1_IN_N_H */ 57 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/msg_drop_random.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_MSG_DROP_RANDOM_H 11 | #define INCLUDED_PDU_UTILS_MSG_DROP_RANDOM_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief Will randomly drop a message with specified probability. 21 | * \ingroup pdu_utils 22 | * 23 | */ 24 | class PDU_UTILS_API msg_drop_random : virtual public gr::block 25 | { 26 | public: 27 | typedef std::shared_ptr sptr; 28 | 29 | /*! 30 | * \brief Return a shared_ptr to a new instance of pdu_utils::msg_drop_random. 31 | * 32 | * @param p_drop - percentage to drop, [0..1] 33 | * @param seed - RNG seed value 34 | */ 35 | static sptr make(float p_drop, uint64_t seed = 12345678); 36 | 37 | /** 38 | * Set percentage of dropped messages 39 | * 40 | * @param p - percentage drop, [0..1] 41 | */ 42 | virtual void set_prob_drop(float p) = 0; 43 | 44 | /** 45 | * Resets counters 46 | */ 47 | virtual void reset(void) = 0; 48 | 49 | /** 50 | * Returns count of dropped messages 51 | * 52 | * @return uint64_t 53 | */ 54 | virtual uint64_t get_drop_count() = 0; 55 | 56 | /** 57 | * Returns count of incoming messages 58 | * 59 | * @return uint64_t 60 | */ 61 | virtual uint64_t get_msg_count() = 0; 62 | 63 | /** 64 | * Returns count of passed messages 65 | * 66 | * @return uint64_t 67 | */ 68 | virtual uint64_t get_pass_count() = 0; 69 | }; 70 | 71 | } // namespace pdu_utils 72 | } // namespace gr 73 | 74 | #endif /* INCLUDED_PDU_UTILS_MSG_DROP_RANDOM_H */ 75 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pack_unpack.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PACK_UNPACK_H 11 | #define INCLUDED_PDU_UTILS_PACK_UNPACK_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief pack/unpack operations on uint8 PDUs 21 | * \ingroup pdu_utils 22 | * 23 | * This block operates on uint8 PDUs and can pack/unpack bits or swap the bit order of a 24 | * uint8 byte PDU. 25 | * 26 | * 27 | */ 28 | class PDU_UTILS_API pack_unpack : virtual public gr::block 29 | { 30 | public: 31 | typedef std::shared_ptr sptr; 32 | 33 | /*! 34 | * \brief Return a shared_ptr to a new instance of pdu_utils::pack_unpack. 35 | * 36 | * @param mode - operation mode, MODE_UNPACK_BYTE, MODE_PACK_BYTE, MODE_BITSWAP_BYTE 37 | * @param bitorder - BIT_ORDER_LSB_FIRST, BIT_ORDER_MSB_FIRST 38 | */ 39 | static sptr make(uint32_t mode, uint32_t bitorder); 40 | 41 | /* 42 | * these are intentionally not exposed in GRC as they should not change 43 | * on the fly... for test only 44 | */ 45 | 46 | /** 47 | * Sets Mode 48 | * 49 | * @param mode - MODE_UNPACK_BYTE, MODE_PACK_BYTE, MODE_BITSWAP_BYTE 50 | */ 51 | virtual void set_mode(uint32_t mode) = 0; 52 | 53 | /** 54 | * Sets order mode 55 | * 56 | * @param order - BIT_ORDER_LSB_FIRST, BIT_ORDER_MSB_FIRST 57 | */ 58 | virtual void set_bit_order(uint32_t order) = 0; 59 | }; 60 | 61 | } // namespace pdu_utils 62 | } // namespace gr 63 | 64 | #endif /* INCLUDED_PDU_UTILS_PACK_UNPACK_H */ 65 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_burst_combiner.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_BURST_COMBINER_H 11 | #define INCLUDED_PDU_UTILS_PDU_BURST_COMBINER_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief c32 PDU combiner 21 | * \ingroup pdu_utils 22 | * 23 | * Combines multiple bursts into a single burst 24 | * 25 | * Only operates on PDUs with c32vector data 26 | * 27 | * Uses burst_index meta data 28 | */ 29 | class PDU_UTILS_API pdu_burst_combiner : virtual public gr::block 30 | { 31 | public: 32 | typedef std::shared_ptr sptr; 33 | 34 | /*! 35 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_burst_combiner. 36 | * 37 | * To avoid accidental use of raw pointers, pdu_utils::pdu_burst_combiner's 38 | * constructor is in a private implementation 39 | * class. pdu_utils::pdu_burst_combiner::make is the public interface for 40 | * creating new instances. 41 | */ 42 | static sptr make(); 43 | }; 44 | 45 | } // namespace pdu_utils 46 | } // namespace gr 47 | 48 | #endif /* INCLUDED_PDU_UTILS_PDU_BURST_COMBINER_H */ 49 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_complex_to_mag2.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | #ifndef INCLUDED_PDU_UTILS_PDU_COMPLEX_TO_MAG2_H 10 | #define INCLUDED_PDU_UTILS_PDU_COMPLEX_TO_MAG2_H 11 | 12 | #include 13 | #include 14 | 15 | namespace gr { 16 | namespace pdu_utils { 17 | 18 | /*! 19 | * \brief converts Complex PDUs to Float Magnitude PDUs 20 | * \ingroup pdu_utils 21 | * 22 | * Converts a c32vector PDU to a f32vector PDU using magnitude squared 23 | */ 24 | class PDU_UTILS_API pdu_complex_to_mag2 : virtual public gr::block 25 | { 26 | public: 27 | typedef std::shared_ptr sptr; 28 | 29 | /*! 30 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_complex_to_mag2. 31 | * 32 | * 33 | */ 34 | static sptr make(); 35 | }; 36 | 37 | } // namespace pdu_utils 38 | } // namespace gr 39 | 40 | #endif /* INCLUDED_PDU_UTILS_PDU_COMPLEX_TO_MAG2_H */ 41 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_downsample.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_DOWNSAMPLE_H 11 | #define INCLUDED_PDU_UTILS_PDU_DOWNSAMPLE_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief <+description of block+> 21 | * \ingroup pdu_utils 22 | * 23 | * Downsample the vector poriton of a pdu by decimation starting at index phase. 24 | * 25 | * Can handle floats or uint8s 26 | * 27 | */ 28 | class PDU_UTILS_API pdu_downsample : virtual public gr::block 29 | { 30 | public: 31 | typedef std::shared_ptr sptr; 32 | 33 | /*! 34 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_downsample. 35 | * 36 | * @param decimation - decimation factor 37 | * @param phase - offset into each PDU 38 | */ 39 | static sptr make(int decimation, int phase); 40 | }; 41 | 42 | } // namespace pdu_utils 43 | } // namespace gr 44 | 45 | #endif /* INCLUDED_PDU_UTILS_PDU_DOWNSAMPLE_H */ 46 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_fir_filter.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_FIR_FILTER_H 11 | #define INCLUDED_PDU_UTILS_PDU_FIR_FILTER_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief PDU FIR filter 21 | * \ingroup pdu_utils 22 | * 23 | * This block will apply a FIR filter to an input PDU (byte, float, or complex) 24 | * 25 | */ 26 | class PDU_UTILS_API pdu_fir_filter : virtual public gr::block 27 | { 28 | public: 29 | typedef std::shared_ptr sptr; 30 | 31 | /*! 32 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_fir_filter. 33 | * 34 | * @param decimation - decimation factor to apply 35 | * @param taps - FIR taps 36 | */ 37 | static sptr make(int decimation, const std::vector taps); 38 | 39 | /** 40 | * Set FIR taps 41 | * 42 | * @param taps - FIR taps 43 | */ 44 | virtual void set_taps(std::vector taps) = 0; 45 | 46 | /** 47 | * Set Decimation factor 48 | * 49 | * @param decimation - decimation factor 50 | */ 51 | virtual void set_decimation(int decimation) = 0; 52 | }; 53 | 54 | } // namespace pdu_utils 55 | } // namespace gr 56 | 57 | #endif /* INCLUDED_PDU_UTILS_PDU_FIR_FILTER_H */ 58 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_flow_ctrl_helper.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_FLOW_CTRL_HELPER_H 11 | #define INCLUDED_PDU_UTILS_PDU_FLOW_CTRL_HELPER_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | typedef std::weak_ptr basic_block_wptr; 20 | 21 | /*! 22 | * \brief Convenience functions for watching the number of messages waiting 23 | * at the given blocks' inputs. 24 | */ 25 | class PDU_UTILS_API pdu_flow_ctrl_helper 26 | { 27 | public: 28 | /** 29 | * Constructor 30 | * 31 | * @param blocks - 32 | */ 33 | pdu_flow_ctrl_helper(std::vector blocks); 34 | 35 | /** 36 | * Deconstructor 37 | */ 38 | virtual ~pdu_flow_ctrl_helper(); 39 | 40 | int max_nmsgs(); 41 | void print_nmsgs(); 42 | 43 | private: 44 | struct block_port { 45 | basic_block_wptr block; 46 | std::vector ports; 47 | }; 48 | 49 | std::vector d_blocks; 50 | }; 51 | 52 | } // namespace pdu_utils 53 | } // namespace gr 54 | 55 | #endif /* INCLUDED_PDU_UTILS_PDU_FLOW_CTRL_HELPER_H */ 56 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_gmsk_fc.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_GMSK_FC_H 11 | #define INCLUDED_PDU_UTILS_PDU_GMSK_FC_H 12 | 13 | #include 14 | #include 15 | //#include 16 | 17 | namespace gr { 18 | namespace pdu_utils { 19 | 20 | /*! 21 | * \brief GMSK Modulator 22 | * \ingroup pdu_utils 23 | * 24 | * This block accepts a float PDU of size n containing baseband 25 | * data, applies GMSK modulation, then sends a gr_complex PDU of 26 | * size n-len(taps)+1. 27 | */ 28 | class PDU_UTILS_API pdu_gmsk_fc : virtual public gr::block 29 | { 30 | public: 31 | typedef std::shared_ptr sptr; 32 | 33 | /*! 34 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_gmsk_fc. 35 | * 36 | * @param sensitivity - 37 | * @param taps - 38 | */ 39 | static sptr make(float sensitivity, const std::vector taps); 40 | 41 | /** 42 | * Sets sensitivity 43 | * 44 | * @param sensitivity - 45 | */ 46 | virtual void set_sensitivity(float sensitivity) = 0; 47 | 48 | /** 49 | * Sets taps array 50 | * 51 | * @param taps - 52 | */ 53 | virtual void set_taps(std::vector taps) = 0; 54 | }; 55 | 56 | } // namespace pdu_utils 57 | } // namespace gr 58 | 59 | #endif /* INCLUDED_PDU_UTILS_PDU_GMSK_FC_H */ 60 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_head_tail.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_HEAD_TAIL_H 11 | #define INCLUDED_PDU_UTILS_PDU_HEAD_TAIL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief <+description of block+> 21 | * \ingroup pdu_utils 22 | * 23 | * Block accumulates the start and end of bursts and emits PDUs suitable for bit 24 | * rastering. 25 | * 26 | * 27 | */ 28 | class PDU_UTILS_API pdu_head_tail : virtual public gr::block 29 | { 30 | public: 31 | typedef std::shared_ptr sptr; 32 | 33 | /*! 34 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_head_tail. 35 | * 36 | * @param pdu_type - 37 | * @param length - 38 | * @param histsize - 39 | */ 40 | static sptr make(uint32_t pdu_type, uint32_t length, uint32_t histsize); 41 | 42 | /** 43 | * Set Length 44 | * 45 | * @param length - 46 | */ 47 | virtual void set_length(uint32_t length) = 0; 48 | 49 | /** 50 | * Set Histogram size 51 | * 52 | * @param histsize - 53 | */ 54 | virtual void set_histsize(uint32_t histsize) = 0; 55 | 56 | /** 57 | * Set whether to space out bytes or not 58 | * 59 | * @param spacebytes - insert space between bytes? 60 | */ 61 | virtual void set_space_bytes(bool spacebytes) = 0; 62 | }; 63 | 64 | } // namespace pdu_utils 65 | } // namespace gr 66 | 67 | #endif /* INCLUDED_PDU_UTILS_PDU_HEAD_TAIL_H */ 68 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_length_filter.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_LENGTH_FILTER_H 11 | #define INCLUDED_PDU_UTILS_PDU_LENGTH_FILTER_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief PDU filtering based on length 21 | * \ingroup pdu_utils 22 | * 23 | * This block will selectively filter PDUs based on length of the data inside the PDU 24 | * 25 | */ 26 | class PDU_UTILS_API pdu_length_filter : virtual public gr::block 27 | { 28 | public: 29 | typedef std::shared_ptr sptr; 30 | 31 | /*! 32 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_length_filter. 33 | * 34 | * @param length - length of data threshold 35 | * @param drop_long - true to drop PDUs with >length, false to drop PDUs with 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief PDU data to file 21 | * \ingroup pdu_utils 22 | * 23 | * The PDU Logger block dumps a u8, c32, or f32 data vector from PDUs to file. 24 | * The block lets the user specify the filename prefix, as well as how many 25 | * PDU data vectors are printed to each file. Note that there is no delimiter 26 | * between data vectors printed to the same file. 27 | * 28 | * 29 | */ 30 | class PDU_UTILS_API pdu_logger : virtual public gr::block 31 | { 32 | public: 33 | typedef std::shared_ptr sptr; 34 | 35 | /*! 36 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_logger. 37 | * 38 | * @param logfile - Filename to write to 39 | * 40 | * @param pdus_per_file - how many PDUs to print to a file 41 | */ 42 | static sptr make(std::string logfile, uint32_t pdus_per_file); 43 | 44 | /*! 45 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_logger, 46 | * where pdus_per_file is equal to 1. 47 | * 48 | * @param logfile - Filename to write to 49 | */ 50 | static sptr make(std::string logfile); 51 | }; 52 | 53 | } // namespace pdu_utils 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_PDU_UTILS_PDU_LOGGER_H */ 57 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_pfb_resamp.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_PFB_RESAMP_CC_H 11 | #define INCLUDED_PDU_UTILS_PDU_PFB_RESAMP_CC_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief PFB resample PDU 21 | * \ingroup pdu_utils 22 | * 23 | * This block will apply a PFB resampling kernel to input data. 24 | * 25 | */ 26 | template 27 | class PDU_UTILS_API pdu_pfb_resamp : virtual public gr::block 28 | { 29 | public: 30 | typedef std::shared_ptr> sptr; 31 | 32 | /*! 33 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_pfb_resamp_cc. 34 | * 35 | * @param taps - 36 | * @param n_filters - 37 | * @param resamp_rate - 38 | */ 39 | static sptr make(const std::vector taps, int n_filters, float resamp_rate); 40 | 41 | /** 42 | * Set taps 43 | * 44 | * @param taps - 45 | */ 46 | virtual void set_taps(std::vector taps) = 0; 47 | }; 48 | 49 | typedef pdu_pfb_resamp pdu_pfb_resamp_fff; 50 | typedef pdu_pfb_resamp pdu_pfb_resamp_ccf; 51 | typedef pdu_pfb_resamp pdu_pfb_resamp_ccc; 52 | } // namespace pdu_utils 53 | } // namespace gr 54 | 55 | #endif /* INCLUDED_PDU_UTILS_PDU_PFB_RESAMP_CC_H */ 56 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_quadrature_demod_cf.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_QUADRATURE_DEMOD_CF_H 11 | #define INCLUDED_PDU_UTILS_PDU_QUADRATURE_DEMOD_CF_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief PDU Quadrature Demod 21 | * \ingroup pdu_utils 22 | * 23 | * c32vector input, f32vector output 24 | */ 25 | class PDU_UTILS_API pdu_quadrature_demod_cf : virtual public gr::block 26 | { 27 | public: 28 | typedef std::shared_ptr sptr; 29 | 30 | /*! 31 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_quadrature_demod_cf. 32 | * 33 | * @param sensitivity - 34 | */ 35 | static sptr make(float sensitivity); 36 | }; 37 | 38 | } // namespace pdu_utils 39 | } // namespace gr 40 | 41 | #endif /* INCLUDED_PDU_UTILS_PDU_QUADRATURE_DEMOD_CF_H */ 42 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_rotate.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_ROTATE_H 11 | #define INCLUDED_PDU_UTILS_PDU_ROTATE_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief <+description of block+> 21 | * \ingroup pdu_utils 22 | * 23 | */ 24 | class PDU_UTILS_API pdu_rotate : virtual public gr::block 25 | { 26 | public: 27 | typedef std::shared_ptr sptr; 28 | 29 | /*! 30 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_rotate. 31 | * 32 | * @param phase_inc - phase increment in radians 33 | */ 34 | static sptr make(double phase_inc); 35 | 36 | /** 37 | * Set Phase Increment 38 | * 39 | * @param phase_inc - Phase Increment 40 | */ 41 | virtual void set_phase_inc(double phase_inc) = 0; 42 | }; 43 | 44 | } // namespace pdu_utils 45 | } // namespace gr 46 | 47 | #endif /* INCLUDED_PDU_UTILS_PDU_ROTATE_H */ 48 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_round_robin.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_ROUND_ROBIN_H 11 | #define INCLUDED_PDU_UTILS_PDU_ROUND_ROBIN_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief Round Robin PDU delivery 21 | * \ingroup pdu_utils 22 | * 23 | * Round Robin delivers messages to a number of output paths. 24 | * In other Words Load shares messages across a number of outputs 25 | */ 26 | class PDU_UTILS_API pdu_round_robin : virtual public gr::block 27 | { 28 | public: 29 | typedef std::shared_ptr sptr; 30 | 31 | /*! 32 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_round_robin. 33 | * 34 | * @param num_outputs - number of output ports 35 | */ 36 | static sptr make(int num_outputs); 37 | }; 38 | 39 | } // namespace pdu_utils 40 | } // namespace gr 41 | 42 | #endif /* INCLUDED_PDU_UTILS_PDU_ROUND_ROBIN_H */ 43 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_slice.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018, 2019, 2020 National Technology & Engineering Solutions of Sa> 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Gover> 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_SLICE_H 11 | #define INCLUDED_PDU_UTILS_PDU_SLICE_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief PDU Slice 21 | * \ingroup pdu_utils 22 | * 23 | * This block receives a PDU and outputs a sliced version of it, given 24 | * a start and stop index, and a stride size. The input notation and function 25 | * is identical to the Python slice notation. See Python documentation 26 | * on numpy slice notation for more information. 27 | */ 28 | class PDU_UTILS_API pdu_slice : virtual public gr::block 29 | { 30 | public: 31 | typedef std::shared_ptr sptr; 32 | 33 | /*! 34 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_slice. 35 | * 36 | * @param slice - string that defines how PDU is sliced 37 | */ 38 | static sptr make(std::string slice); 39 | 40 | /** 41 | * Sets slice notation 42 | * 43 | * @param slice 44 | */ 45 | virtual void set_slice(std::string slice) = 0; 46 | }; 47 | 48 | } // namespace pdu_utils 49 | } // namespace gr 50 | 51 | #endif /* INCLUDED_PDU_UTILS_PDU_SLICE_H */ 52 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_split.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_SPLIT_H 11 | #define INCLUDED_PDU_UTILS_PDU_SPLIT_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief Split dict and data 21 | * \ingroup pdu_utils 22 | * 23 | * Splits a PDU into its metadata dictionary and vector, 24 | * outputs nothing if not a PDU. Useful for stripping/viewing metadata. 25 | * 26 | * 27 | */ 28 | class PDU_UTILS_API pdu_split : virtual public gr::block 29 | { 30 | public: 31 | typedef std::shared_ptr sptr; 32 | 33 | /*! 34 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_split. 35 | * 36 | * @param pass_empty_data - true to pass empty vectors 37 | */ 38 | static sptr make(bool pass_empty_data = false); 39 | }; 40 | 41 | } // namespace pdu_utils 42 | } // namespace gr 43 | 44 | #endif /* INCLUDED_PDU_UTILS_PDU_SPLIT_H */ 45 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/pdu_to_bursts.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_TO_BURSTS_H 11 | #define INCLUDED_PDU_UTILS_PDU_TO_BURSTS_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief Emit a PDU data as a stream. 21 | * 22 | * The PDU to Bursts block takes data stored in the uniform vector of a PDU 23 | * and emits it with UHD style tx_sob and tx_eob tags. If desired, the 24 | * metadata dictionary can contain a tx_time tag which will append a UHD 25 | * style tx_time tag to the tx_sob sample causing transmission at a well 26 | * defined point in time. 27 | * 28 | * \ingroup pdu_utils 29 | * 30 | */ 31 | template 32 | class PDU_UTILS_API pdu_to_bursts : virtual public gr::sync_block 33 | { 34 | public: 35 | typedef std::shared_ptr> sptr; 36 | 37 | /*! 38 | * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_to_bursts_b. 39 | * 40 | * @param early_burst_behavior - EARLY_BURST_BEHAVIOR__APPEND, 41 | * EARLY_BURST_BEHAVIOR__DROP 42 | * @param max_queue_size - max number of PDUs to queue 43 | */ 44 | static sptr make(uint32_t early_burst_behavior, uint32_t max_queue_size = 64); 45 | 46 | /** 47 | * Set Max Queue size 48 | * 49 | * @param size - 50 | */ 51 | virtual void set_max_queue_size(uint32_t size) = 0; 52 | }; 53 | 54 | typedef pdu_to_bursts pdu_to_bursts_b; 55 | typedef pdu_to_bursts pdu_to_bursts_s; 56 | typedef pdu_to_bursts pdu_to_bursts_f; 57 | typedef pdu_to_bursts pdu_to_bursts_c; 58 | } // namespace pdu_utils 59 | } // namespace gr 60 | 61 | #endif /* INCLUDED_PDU_UTILS_PDU_TO_BURSTS_H */ 62 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/take_skip_to_pdu.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_TAKE_SKIP_TO_PDU_H 11 | #define INCLUDED_PDU_UTILS_TAKE_SKIP_TO_PDU_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | #ifndef MAXIMUM_PDU_SIZE 20 | #define MAXIMUM_PDU_SIZE 21 | static const uint32_t TAKESKIP_MAXIMUM_PDU_SIZE = 8192; 22 | #endif 23 | 24 | /*! 25 | * \brief <+description of block+> 26 | * \ingroup pdu_utils 27 | * 28 | * This block will generate PDUs of size TAKE skipping SKIP samples between 29 | * 30 | */ 31 | template 32 | class PDU_UTILS_API take_skip_to_pdu : virtual public gr::sync_block 33 | { 34 | public: 35 | typedef std::shared_ptr> sptr; 36 | 37 | /*! 38 | * \brief Return a shared_ptr to a new instance of pdu_utils::take_skip_to_pdu. 39 | * 40 | * @param take - size of PDUs to generate 41 | * @param skip - number of samples to skip between takes 42 | */ 43 | static sptr make(uint32_t take, uint32_t skip); 44 | 45 | virtual void set_take(uint32_t take) = 0; 46 | virtual void set_skip(uint32_t skip) = 0; 47 | }; 48 | 49 | typedef take_skip_to_pdu take_skip_to_pdu_b; 50 | typedef take_skip_to_pdu take_skip_to_pdu_s; 51 | typedef take_skip_to_pdu take_skip_to_pdu_f; 52 | typedef take_skip_to_pdu take_skip_to_pdu_c; 53 | } // namespace pdu_utils 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_PDU_UTILS_TAKE_SKIP_TO_PDU_H */ 57 | -------------------------------------------------------------------------------- /include/gnuradio/pdu_utils/upsample.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_UPSAMPLE_H 11 | #define INCLUDED_PDU_UTILS_UPSAMPLE_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | /*! 20 | * \brief upsample PDUs 21 | * \ingroup pdu_utils 22 | * 23 | * This block will upsample via zero insertion or repetition. 24 | * 25 | */ 26 | class PDU_UTILS_API upsample : virtual public gr::block 27 | { 28 | public: 29 | typedef std::shared_ptr sptr; 30 | 31 | /*! 32 | * \brief Return a shared_ptr to a new instance of pdu_utils::upsample. 33 | * 34 | * @param n - upsample by factor n 35 | * @param repeat - true to repeat values, false to zero fill 36 | */ 37 | static sptr make(uint32_t n, bool repeat); 38 | 39 | /** 40 | * Set upsample factor 41 | * 42 | * @param n 43 | */ 44 | virtual void set_n(uint32_t n) = 0; 45 | 46 | /** 47 | * Set repeat behavior 48 | * 49 | * @param repeat = true to report values, false to zero fill 50 | */ 51 | virtual void set_repeat(bool repeat) = 0; 52 | }; 53 | 54 | } // namespace pdu_utils 55 | } // namespace gr 56 | 57 | #endif /* INCLUDED_PDU_UTILS_UPSAMPLE_H */ 58 | -------------------------------------------------------------------------------- /lib/extract_metadata_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_EXTRACT_METADATA_IMPL_H 11 | #define INCLUDED_PDU_UTILS_EXTRACT_METADATA_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class extract_metadata_impl : public extract_metadata 20 | { 21 | private: 22 | pmt::pmt_t d_key; 23 | float d_scale; 24 | float d_offset; 25 | 26 | /*! 27 | * \brief Message handler for input messages 28 | * 29 | * \param msg Dict PMT or PDU message passed from the scheduler's message handling. 30 | */ 31 | void handle_msg(pmt::pmt_t msg); 32 | 33 | public: 34 | extract_metadata_impl(pmt::pmt_t key, float scale, float offset); 35 | 36 | ~extract_metadata_impl() override; 37 | 38 | void set_key(pmt::pmt_t key) override; 39 | void set_scale(float scale) override; 40 | void set_offset(float offset) override; 41 | pmt::pmt_t get_key(void) override { return d_key; } 42 | float get_scale(void) override { return d_scale; } 43 | float get_offset(void) override { return d_offset; } 44 | }; 45 | 46 | } // namespace pdu_utils 47 | } // namespace gr 48 | 49 | #endif /* INCLUDED_PDU_UTILS_EXTRACT_METADATA_IMPL_H */ 50 | -------------------------------------------------------------------------------- /lib/message_counter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_MESSAGE_COUNTER_IMPL_H 11 | #define INCLUDED_PDU_UTILS_MESSAGE_COUNTER_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | /** 19 | * Implementing class of message_counter 20 | */ 21 | class message_counter_impl : public message_counter 22 | { 23 | private: 24 | std::string d_name; 25 | uint64_t d_ctr; 26 | 27 | /*! 28 | * \brief Message handler for input messages 29 | * 30 | * \param msg Any PMT message passed from the scheduler's message handling. 31 | */ 32 | void handle_msg(pmt::pmt_t msg); 33 | 34 | public: 35 | message_counter_impl(std::string name); 36 | 37 | ~message_counter_impl() override; 38 | virtual bool stop() override; // overloaded for print output 39 | void setup_rpc() override; // enable controlport 40 | 41 | virtual void reset(void) override { d_ctr = 0; } 42 | virtual uint64_t get_ctr() override { return d_ctr; } 43 | virtual std::string get_name(void) override { return d_name; } 44 | 45 | }; // end class message_counter_impl 46 | 47 | } // namespace pdu_utils 48 | } // namespace gr 49 | 50 | #endif /* INCLUDED_PDU_UTILS_MESSAGE_COUNTER_IMPL_H */ 51 | -------------------------------------------------------------------------------- /lib/message_emitter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_MESSAGE_EMITTER_IMPL_H 11 | #define INCLUDED_PDU_UTILS_MESSAGE_EMITTER_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class message_emitter_impl : public message_emitter 20 | { 21 | private: 22 | pmt::pmt_t d_msg; 23 | uint64_t d_n_msgs; 24 | 25 | public: 26 | message_emitter_impl(pmt::pmt_t msg = pmt::PMT_NIL); 27 | 28 | ~message_emitter_impl(); 29 | bool stop() override; // overloaded for print output 30 | void setup_rpc() override; // enable controlport 31 | 32 | void set_msg(pmt::pmt_t msg) override; 33 | uint64_t get_n_msgs(void) override { return d_n_msgs; } 34 | void emit() override; 35 | void emit(pmt::pmt_t msg) override; 36 | }; 37 | 38 | } // namespace pdu_utils 39 | } // namespace gr 40 | 41 | #endif /* INCLUDED_PDU_UTILS_MESSAGE_EMITTER_IMPL_H */ 42 | -------------------------------------------------------------------------------- /lib/message_gate_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_MESSAGE_GATE_IMPL_H 11 | #define INCLUDED_PDU_UTILS_MESSAGE_GATE_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class message_gate_impl : public message_gate 20 | { 21 | private: 22 | bool d_enabled; 23 | uint64_t d_n_blocked; 24 | uint64_t d_n_passed; 25 | 26 | /*! 27 | * \brief Message handler for input messages 28 | * 29 | * \param msg Any PMT message passed from the scheduler's message handling. 30 | */ 31 | void handle_msg(pmt::pmt_t msg); 32 | 33 | public: 34 | message_gate_impl(bool enabled); 35 | 36 | ~message_gate_impl() override; 37 | bool stop() override; // overloaded for print output 38 | void setup_rpc() override; // enable controlport 39 | 40 | void reset(void) override; 41 | void set_enabled(bool enabled) override; 42 | bool get_enabled(void) override { return d_enabled; } 43 | uint64_t get_n_passed(void) override { return d_n_passed; } 44 | uint64_t get_n_blocked(void) override { return d_n_blocked; } 45 | }; 46 | 47 | } // namespace pdu_utils 48 | } // namespace gr 49 | 50 | #endif /* INCLUDED_PDU_UTILS_MESSAGE_GATE_IMPL_H */ 51 | -------------------------------------------------------------------------------- /lib/message_keep_1_in_n_impl.cc: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifdef HAVE_CONFIG_H 11 | #include "config.h" 12 | #endif 13 | 14 | #include "message_keep_1_in_n_impl.h" 15 | #include 16 | 17 | namespace gr { 18 | namespace pdu_utils { 19 | 20 | message_keep_1_in_n::sptr message_keep_1_in_n::make(uint32_t n) 21 | { 22 | return gnuradio::make_block_sptr(n); 23 | } 24 | 25 | /* 26 | * The private constructor 27 | */ 28 | message_keep_1_in_n_impl::message_keep_1_in_n_impl(uint32_t n) 29 | : gr::block("message_keep_1_in_n", 30 | io_signature::make(0, 0, 0), 31 | io_signature::make(0, 0, 0)), 32 | d_ctr(0) 33 | { 34 | if (n) { 35 | set_n(n); 36 | } else { 37 | throw std::invalid_argument("Message Keep 1 in N: n cannot be zero!"); 38 | } 39 | 40 | message_port_register_in(PMTCONSTSTR__in()); 41 | set_msg_handler(PMTCONSTSTR__in(), [this](pmt::pmt_t msg) { this->handle_msg(msg); }); 42 | message_port_register_out(PMTCONSTSTR__out()); 43 | } 44 | 45 | /* 46 | * Our virtual destructor. 47 | */ 48 | message_keep_1_in_n_impl::~message_keep_1_in_n_impl() {} 49 | 50 | /* 51 | * Message handler 52 | */ 53 | void message_keep_1_in_n_impl::handle_msg(pmt::pmt_t msg) 54 | { 55 | gr::thread::scoped_lock l(d_setlock); 56 | 57 | d_ctr++; 58 | if (d_ctr >= d_n) { 59 | message_port_pub(PMTCONSTSTR__out(), msg); 60 | d_ctr = 0; 61 | } 62 | } 63 | 64 | void message_keep_1_in_n_impl::set_n(uint32_t n) 65 | { 66 | gr::thread::scoped_lock l(d_setlock); 67 | 68 | if (n) { 69 | d_n = n; 70 | } else { 71 | GR_LOG_ERROR(d_logger, boost::format("n cannot be zero, not set (n=%d)") % d_n); 72 | } 73 | } 74 | 75 | 76 | } /* namespace pdu_utils */ 77 | } /* namespace gr */ 78 | -------------------------------------------------------------------------------- /lib/message_keep_1_in_n_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_MESSAGE_KEEP_1_IN_N_IMPL_H 11 | #define INCLUDED_PDU_UTILS_MESSAGE_KEEP_1_IN_N_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class message_keep_1_in_n_impl : public message_keep_1_in_n 20 | { 21 | private: 22 | uint32_t d_n; 23 | uint32_t d_ctr; 24 | 25 | /*! 26 | * \brief Message handler for input messages 27 | * 28 | * \param msg Any PMT message passed from the scheduler's message handling. 29 | */ 30 | void handle_msg(pmt::pmt_t msg); 31 | 32 | public: 33 | message_keep_1_in_n_impl(uint32_t n); 34 | 35 | ~message_keep_1_in_n_impl() override; 36 | 37 | void set_n(uint32_t n) override; 38 | uint32_t get_n(void) override { return d_n; } 39 | }; 40 | 41 | } // namespace pdu_utils 42 | } // namespace gr 43 | 44 | #endif /* INCLUDED_PDU_UTILS_MESSAGE_KEEP_1_IN_N_IMPL_H */ 45 | -------------------------------------------------------------------------------- /lib/msg_drop_random_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_MSG_DROP_RANDOM_IMPL_H 11 | #define INCLUDED_PDU_UTILS_MSG_DROP_RANDOM_IMPL_H 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace gr { 18 | namespace pdu_utils { 19 | 20 | class msg_drop_random_impl : public msg_drop_random 21 | { 22 | private: 23 | uint64_t d_msg_ctr; 24 | uint64_t d_pass_ctr; 25 | uint64_t d_drop_ctr; 26 | float d_p_drop; 27 | gr::random d_rng; 28 | 29 | /*! 30 | * \brief Message handler for input messages 31 | * 32 | * \param msg Any PMT message passed from the scheduler's message handling. 33 | */ 34 | void handle_msg(pmt::pmt_t msg); 35 | 36 | public: 37 | msg_drop_random_impl(float p_drop, uint64_t seed); 38 | 39 | ~msg_drop_random_impl() override; 40 | bool stop() override; // overloaded for print output 41 | 42 | void set_prob_drop(float p) override; 43 | void reset(void) override; 44 | uint64_t get_drop_count() override { return d_drop_ctr; } 45 | uint64_t get_msg_count() override { return d_msg_ctr; } 46 | uint64_t get_pass_count() override { return d_pass_ctr; } 47 | }; 48 | 49 | } // namespace pdu_utils 50 | } // namespace gr 51 | 52 | #endif /* INCLUDED_PDU_UTILS_MSG_DROP_RANDOM_IMPL_H */ 53 | -------------------------------------------------------------------------------- /lib/pdu_add_noise_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_ADD_NOISE_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_ADD_NOISE_IMPL_H 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace gr { 18 | namespace pdu_utils { 19 | 20 | class pdu_add_noise_impl : public pdu_add_noise 21 | { 22 | private: 23 | float d_noise_level; 24 | float d_complex_nl; 25 | float d_offset; 26 | float d_scale; 27 | gr::random d_rng; 28 | noise_dist d_noise_dist; 29 | 30 | float get_rand_samp(); 31 | void handle_msg(pmt::pmt_t pdu); 32 | 33 | public: 34 | pdu_add_noise_impl(float noise_level, float offset, float scale, long seed, int dist); 35 | 36 | ~pdu_add_noise_impl(); 37 | 38 | void set_noise_level(float nl) override; 39 | void set_offset(float o) override; 40 | void set_scale(float s) override; 41 | void set_noise_dist(int d) override; 42 | void set_seed(int x) override; 43 | }; 44 | 45 | } // namespace pdu_utils 46 | } // namespace gr 47 | 48 | #endif /* INCLUDED_PDU_UTILS_PDU_ADD_NOISE_IMPL_H */ 49 | -------------------------------------------------------------------------------- /lib/pdu_align_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_ALIGN_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_ALIGN_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_align_impl : public pdu_align 20 | { 21 | private: 22 | void pdu_handler(pmt::pmt_t pdu); 23 | void update_time_metadata(pmt::pmt_t& metadata, int start_idx); 24 | 25 | std::vector d_syncwords; 26 | std::vector d_syncword_lens; 27 | std::vector d_masks; 28 | 29 | int d_threshold; 30 | int d_offset; 31 | align_modes d_mode; 32 | align_match_mode d_match_mode; 33 | 34 | public: 35 | pdu_align_impl(std::string syncwords, int threshold, int offset, align_modes mode, align_match_mode match_mode); 36 | 37 | ~pdu_align_impl() override; 38 | }; 39 | 40 | } // namespace pdu_utils 41 | } // namespace gr 42 | 43 | #endif /* INCLUDED_PDU_UTILS_PDU_ALIGN_IMPL_H */ 44 | -------------------------------------------------------------------------------- /lib/pdu_binary_tools_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_BINARY_TOOLS_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_BINARY_TOOLS_IMPL_H 12 | 13 | #include 14 | 15 | namespace gr { 16 | namespace pdu_utils { 17 | 18 | class pdu_binary_tools_impl : public pdu_binary_tools 19 | { 20 | private: 21 | void handle_msg_bit_flip(pmt::pmt_t pdu); 22 | void handle_msg_to_nrz(pmt::pmt_t pdu); 23 | void handle_msg_from_nrz(pmt::pmt_t pdu); 24 | void handle_msg_slice(pmt::pmt_t pdu); 25 | void handle_msg_endian8(pmt::pmt_t pdu); 26 | void handle_msg_passthrough(pmt::pmt_t pdu); 27 | void handle_msg_manchester_encode(pmt::pmt_t pdu); 28 | void handle_msg_manchester_decode(pmt::pmt_t pdu); 29 | 30 | 31 | public: 32 | pdu_binary_tools_impl(uint8_t mode); 33 | 34 | ~pdu_binary_tools_impl(); 35 | 36 | 37 | }; 38 | 39 | } // namespace pdu_utils 40 | } // namespace gr 41 | 42 | #endif /* INCLUDED_PDU_UTILS_PDU_BINARY_TOOLS_IMPL_H */ 43 | -------------------------------------------------------------------------------- /lib/pdu_burst_combiner_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_BURST_COMBINER_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_BURST_COMBINER_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_burst_combiner_impl : public pdu_burst_combiner 20 | { 21 | private: 22 | std::vector d_data; 23 | pmt::pmt_t d_burst0_metadata; 24 | uint32_t d_burst_count; 25 | 26 | void reset_state(void); 27 | void handle_pdu(pmt::pmt_t pdu); 28 | 29 | public: 30 | pdu_burst_combiner_impl(); 31 | 32 | ~pdu_burst_combiner_impl() override; 33 | }; 34 | 35 | } // namespace pdu_utils 36 | } // namespace gr 37 | 38 | #endif /* INCLUDED_PDU_UTILS_PDU_BURST_COMBINER_IMPL_H */ 39 | -------------------------------------------------------------------------------- /lib/pdu_complex_to_mag2_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_COMPLEX_TO_MAG2_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_COMPLEX_TO_MAG2_IMPL_H 12 | 13 | #include 14 | 15 | namespace gr { 16 | namespace pdu_utils { 17 | 18 | class pdu_complex_to_mag2_impl : public pdu_complex_to_mag2 19 | { 20 | private: 21 | void handle_pdu(pmt::pmt_t pdu); 22 | 23 | public: 24 | pdu_complex_to_mag2_impl(); 25 | 26 | ~pdu_complex_to_mag2_impl() override; 27 | }; 28 | 29 | } // namespace pdu_utils 30 | } // namespace gr 31 | 32 | #endif /* INCLUDED_PDU_UTILS_PDU_COMPLEX_TO_MAG2_IMPL_H */ 33 | -------------------------------------------------------------------------------- /lib/pdu_downsample_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_DOWNSAMPLE_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_DOWNSAMPLE_IMPL_H 12 | 13 | #include 14 | 15 | namespace gr { 16 | namespace pdu_utils { 17 | 18 | class pdu_downsample_impl : public pdu_downsample 19 | { 20 | private: 21 | int d_decimation; 22 | int d_phase; 23 | 24 | void handle_msg(pmt::pmt_t pdu); 25 | 26 | public: 27 | pdu_downsample_impl(int decimation, int phase); 28 | 29 | ~pdu_downsample_impl() override; 30 | 31 | 32 | 33 | }; 34 | 35 | } // namespace pdu_utils 36 | } // namespace gr 37 | 38 | #endif /* INCLUDED_PDU_UTILS_PDU_DOWNSAMPLE_IMPL_H */ 39 | -------------------------------------------------------------------------------- /lib/pdu_fine_time_measure_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_FINE_TIME_MEASURE_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_FINE_TIME_MEASURE_IMPL_H 12 | 13 | #include 14 | 15 | namespace gr { 16 | namespace pdu_utils { 17 | 18 | class pdu_fine_time_measure_impl : public pdu_fine_time_measure 19 | { 20 | private: 21 | std::vector d_magnitude_squared_f; 22 | float d_pre_burst_time; 23 | float d_post_burst_time; 24 | size_t d_average_size; 25 | float d_buffer_percent; 26 | 27 | void pdu_handler(pmt::pmt_t pdu); 28 | 29 | public: 30 | pdu_fine_time_measure_impl(float pre_burst_time, 31 | float post_burst_time, 32 | size_t average_width, 33 | float buffer_percent); 34 | 35 | ~pdu_fine_time_measure_impl() override; 36 | }; 37 | 38 | } // namespace pdu_utils 39 | } // namespace gr 40 | 41 | #endif /* INCLUDED_PDU_UTILS_PDU_FINE_TIME_MEASURE_IMPL_H */ 42 | -------------------------------------------------------------------------------- /lib/pdu_fir_filter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_FIR_FILTER_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_FIR_FILTER_IMPL_H 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace gr { 18 | namespace pdu_utils { 19 | 20 | class pdu_fir_filter_impl : public pdu_fir_filter 21 | { 22 | private: 23 | filter::kernel::fir_filter_fff d_fir_fff; 24 | filter::kernel::fir_filter_ccf d_fir_ccf; 25 | int d_decimation; 26 | std::vector d_tmp; 27 | size_t d_pad; 28 | size_t d_group_delay_offset; 29 | bool d_even_num_taps; 30 | gr::thread::mutex d_mutex; 31 | 32 | void handle_pdu(pmt::pmt_t pdu); 33 | 34 | public: 35 | pdu_fir_filter_impl(int decimation, const std::vector taps); 36 | 37 | ~pdu_fir_filter_impl() override; 38 | 39 | void set_taps(std::vector taps) override; 40 | void set_decimation(int decimation) override { d_decimation = decimation; } 41 | }; 42 | 43 | } // namespace pdu_utils 44 | } // namespace gr 45 | 46 | #endif /* INCLUDED_PDU_UTILS_PDU_FIR_FILTER_IMPL_H */ 47 | -------------------------------------------------------------------------------- /lib/pdu_gmsk_fc_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_GMSK_FC_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_GMSK_FC_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_gmsk_fc_impl : public pdu_gmsk_fc 20 | { 21 | private: 22 | float d_sensitivity; 23 | float d_phase; 24 | std::vector d_taps; 25 | filter::kernel::fir_filter_fff* d_fir; 26 | std::vector d_log_ramp; 27 | 28 | void handle_pdu(pmt::pmt_t pdu); 29 | 30 | public: 31 | pdu_gmsk_fc_impl(float sensitivity, const std::vector taps); 32 | 33 | ~pdu_gmsk_fc_impl() override; 34 | 35 | void set_sensitivity(float sensitivity) override; 36 | void set_taps(std::vector taps) override; 37 | }; 38 | 39 | } // namespace pdu_utils 40 | } // namespace gr 41 | 42 | #endif /* INCLUDED_PDU_UTILS_PDU_GMSK_FC_IMPL_H */ 43 | -------------------------------------------------------------------------------- /lib/pdu_head_tail_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_HEAD_TAIL_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_HEAD_TAIL_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_head_tail_impl : public pdu_head_tail 20 | { 21 | private: 22 | uint32_t d_input_type; 23 | uint32_t d_length; 24 | uint32_t d_maxhistsize; 25 | uint32_t d_histsize; 26 | bool d_space_bytes; 27 | uint32_t d_bit_order; 28 | 29 | void reset(void); 30 | 31 | std::vector d_head; 32 | std::vector d_tail; 33 | std::vector d_head_f; 34 | std::vector d_tail_f; 35 | 36 | void handle_pdu(pmt::pmt_t pdu); 37 | 38 | public: 39 | pdu_head_tail_impl(uint32_t input_type, uint32_t length, uint32_t histsize); 40 | 41 | ~pdu_head_tail_impl() override; 42 | 43 | void set_length(uint32_t length) override; 44 | void set_histsize(uint32_t histsize) override; 45 | void set_space_bytes(bool spacebytes) override; 46 | }; 47 | 48 | } // namespace pdu_utils 49 | } // namespace gr 50 | 51 | #endif /* INCLUDED_PDU_UTILS_PDU_HEAD_TAIL_IMPL_H */ 52 | -------------------------------------------------------------------------------- /lib/pdu_length_filter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_LENGTH_FILTER_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_LENGTH_FILTER_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_length_filter_impl : public pdu_length_filter 20 | { 21 | private: 22 | uint32_t d_length; 23 | bool d_drop_long; 24 | uint64_t d_n_passed; 25 | uint64_t d_n_blocked; 26 | 27 | void handle_pdu(pmt::pmt_t pdu); 28 | 29 | public: 30 | pdu_length_filter_impl(uint32_t length, bool drop_long); 31 | 32 | ~pdu_length_filter_impl() override; 33 | bool stop() override; // overloaded for print output 34 | }; 35 | 36 | } // namespace pdu_utils 37 | } // namespace gr 38 | 39 | #endif /* INCLUDED_PDU_UTILS_PDU_LENGTH_FILTER_IMPL_H */ 40 | -------------------------------------------------------------------------------- /lib/pdu_logger_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_LOGGER_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_LOGGER_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_logger_impl : public pdu_logger 20 | { 21 | private: 22 | std::string d_logfile; 23 | uint32_t d_pdus_per_file; 24 | uint32_t d_burstnum; 25 | uint32_t d_filenum; 26 | 27 | void write_data_c32(const gr_complex* data, size_t len, char* name, int num); 28 | void write_data_f32(const float* data, size_t len, char* name, int num); 29 | void write_data_u8(const char* data, size_t len, char* name, int num); 30 | 31 | void handle_pdu(pmt::pmt_t pdu); 32 | 33 | public: 34 | pdu_logger_impl(std::string logfile, uint32_t pdus_per_file); 35 | pdu_logger_impl(std::string logfile); 36 | 37 | ~pdu_logger_impl() override; 38 | }; 39 | 40 | } // namespace pdu_utils 41 | } // namespace gr 42 | 43 | #endif /* INCLUDED_PDU_UTILS_PDU_LOGGER_IMPL_H */ 44 | -------------------------------------------------------------------------------- /lib/pdu_preamble_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_PREAMBLE_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_PREAMBLE_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_preamble_impl : public pdu_preamble 20 | { 21 | private: 22 | std::vector d_preamble; 23 | std::vector d_preamble_interp; 24 | std::vector d_tail; 25 | std::vector d_tail_interp; 26 | std::vector d_zeros; 27 | uint32_t d_interp; 28 | uint32_t d_zero_pad; 29 | bool d_nrz; 30 | 31 | void handle_msg(pmt::pmt_t pdu); 32 | 33 | public: 34 | pdu_preamble_impl(const std::vector preamble, 35 | const std::vector tail, 36 | uint32_t interp = 1, 37 | uint32_t zero_pad = 0, 38 | bool nrz = true); 39 | 40 | ~pdu_preamble_impl() override; 41 | 42 | void set_preamble(const std::vector preamble) override; 43 | void set_tail(const std::vector tail) override; 44 | void set_interp(uint32_t interp) override; 45 | void set_zero_pad(uint32_t zero_pad) override; 46 | void set_nrz(bool nrz) override; 47 | }; 48 | 49 | } // namespace pdu_utils 50 | } // namespace gr 51 | 52 | #endif /* INCLUDED_PDU_UTILS_PDU_PREAMBLE_IMPL_H */ 53 | -------------------------------------------------------------------------------- /lib/pdu_quadrature_demod_cf_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_QUADRATURE_DEMOD_CF_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_QUADRATURE_DEMOD_CF_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_quadrature_demod_cf_impl : public pdu_quadrature_demod_cf 20 | { 21 | private: 22 | float d_sensitivity; 23 | 24 | void handle_pdu(pmt::pmt_t pdu); 25 | 26 | public: 27 | pdu_quadrature_demod_cf_impl(float sensitivity); 28 | 29 | ~pdu_quadrature_demod_cf_impl() override; 30 | }; 31 | 32 | } // namespace pdu_utils 33 | } // namespace gr 34 | 35 | #endif /* INCLUDED_PDU_UTILS_PDU_QUADRATURE_DEMOD_CF_IMPL_H */ 36 | -------------------------------------------------------------------------------- /lib/pdu_range_filter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_RANGE_FILTER_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_RANGE_FILTER_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_range_filter_impl : public pdu_range_filter 20 | { 21 | private: 22 | pmt::pmt_t d_key; 23 | double d_min; 24 | double d_max; 25 | bool d_invert; 26 | 27 | void pdu_handler(pmt::pmt_t pdu); 28 | 29 | public: 30 | pdu_range_filter_impl(pmt::pmt_t key, double min, double max, bool invert); 31 | 32 | ~pdu_range_filter_impl() override; 33 | 34 | void set_key(pmt::pmt_t key) override { d_key = key; } 35 | void set_min(double min) override { d_min = min; } 36 | void set_max(double max) override { d_max = max; } 37 | void set_inversion(bool invert) override { d_invert = invert; } 38 | }; 39 | 40 | } // namespace pdu_utils 41 | } // namespace gr 42 | 43 | #endif /* INCLUDED_PDU_UTILS_PDU_RANGE_FILTER_IMPL_H */ 44 | -------------------------------------------------------------------------------- /lib/pdu_rotate_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2020-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_ROTATE_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_ROTATE_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_rotate_impl : public pdu_rotate 20 | { 21 | private: 22 | blocks::rotator d_r; 23 | double d_phase_inc; 24 | void pdu_handler(pmt::pmt_t pdu); 25 | 26 | public: 27 | pdu_rotate_impl(double phase_inc); 28 | 29 | ~pdu_rotate_impl() override; 30 | 31 | void set_phase_inc(double phase_inc) override; 32 | }; 33 | 34 | } // namespace pdu_utils 35 | } // namespace gr 36 | 37 | #endif /* INCLUDED_PDU_UTILS_PDU_ROTATE_IMPL_H */ 38 | -------------------------------------------------------------------------------- /lib/pdu_round_robin_impl.cc: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifdef HAVE_CONFIG_H 11 | #include "config.h" 12 | #endif 13 | 14 | #include "pdu_round_robin_impl.h" 15 | #include "gnuradio/pdu_utils/constants.h" 16 | #include 17 | 18 | namespace gr { 19 | namespace pdu_utils { 20 | 21 | pdu_round_robin::sptr pdu_round_robin::make(int num_outputs) 22 | { 23 | return gnuradio::make_block_sptr(num_outputs); 24 | } 25 | 26 | /* 27 | * The private constructor 28 | */ 29 | pdu_round_robin_impl::pdu_round_robin_impl(int num_outputs) 30 | : gr::block("pdu_round_robin", 31 | gr::io_signature::make(0, 0, 0), 32 | gr::io_signature::make(0, 0, 0)), 33 | d_num_outputs(num_outputs), 34 | d_counter(0) 35 | { 36 | // inputs 37 | message_port_register_in(PMTCONSTSTR__pdu_in()); 38 | set_msg_handler(PMTCONSTSTR__pdu_in(), 39 | [this](pmt::pmt_t msg) { this->pdu_handler(msg); }); 40 | 41 | // outputs 42 | for (int i = 0; i < d_num_outputs; i++) { 43 | std::stringstream s; 44 | s << "pdu_out_" << i; 45 | d_output_ports.push_back(pmt::mp(s.str())); 46 | message_port_register_out(d_output_ports[i]); 47 | } 48 | } 49 | 50 | /* 51 | * Our virtual destructor. 52 | */ 53 | pdu_round_robin_impl::~pdu_round_robin_impl() {} 54 | 55 | void pdu_round_robin_impl::pdu_handler(pmt::pmt_t pdu) 56 | { 57 | message_port_pub(d_output_ports[d_counter], pdu); 58 | 59 | d_counter = (d_counter + 1) % d_num_outputs; 60 | } 61 | 62 | } /* namespace pdu_utils */ 63 | } /* namespace gr */ 64 | -------------------------------------------------------------------------------- /lib/pdu_round_robin_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_ROUND_ROBIN_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_ROUND_ROBIN_IMPL_H 12 | 13 | #include 14 | 15 | namespace gr { 16 | namespace pdu_utils { 17 | 18 | class pdu_round_robin_impl : public pdu_round_robin 19 | { 20 | private: 21 | int d_num_outputs; 22 | int d_counter; 23 | 24 | std::vector d_output_ports; 25 | 26 | void pdu_handler(pmt::pmt_t pdu); 27 | 28 | public: 29 | pdu_round_robin_impl(int num_outputs); 30 | 31 | ~pdu_round_robin_impl() override; 32 | }; 33 | 34 | } // namespace pdu_utils 35 | } // namespace gr 36 | 37 | #endif /* INCLUDED_PDU_UTILS_PDU_ROUND_ROBIN_IMPL_H */ 38 | -------------------------------------------------------------------------------- /lib/pdu_slice_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018, 2019, 2020 National Technology & Engineering Solutions of Sa> 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Gover> 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_SLICE_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_SLICE_IMPL_H 12 | 13 | #include "gnuradio/pdu_utils/constants.h" 14 | #include 15 | #include 16 | 17 | namespace gr { 18 | namespace pdu_utils { 19 | class pdu_slice_impl : public pdu_slice 20 | { 21 | private: 22 | template 23 | void slice_vector(std::vector &in_data, std::vector &out_data); 24 | 25 | private: 26 | std::string d_slice; 27 | int d_start_index; 28 | int d_stop_index; 29 | int d_stride_size; 30 | bool d_blank_start; 31 | bool d_blank_stop; 32 | 33 | public: 34 | /** 35 | * Constructor 36 | * 37 | * @param slice 38 | */ 39 | pdu_slice_impl(std::string slice); 40 | 41 | /** 42 | * Deconstructor 43 | */ 44 | ~pdu_slice_impl(); 45 | 46 | void handle_pdu(pmt::pmt_t pdu); 47 | 48 | /** 49 | * Sets slice notation 50 | * 51 | * @param slice 52 | */ 53 | void set_slice(std::string slice); 54 | 55 | 56 | }; 57 | 58 | } // namespace pdu_utils 59 | } // namespace gr 60 | 61 | #endif /* INCLUDED_PDU_UTILS_PDU_SLICE_IMPL_H */ 62 | -------------------------------------------------------------------------------- /lib/pdu_split_impl.cc: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifdef HAVE_CONFIG_H 11 | #include "config.h" 12 | #endif 13 | 14 | #include "pdu_split_impl.h" 15 | #include 16 | 17 | namespace gr { 18 | namespace pdu_utils { 19 | 20 | pdu_split::sptr pdu_split::make(bool pass_empty_data) 21 | { 22 | return gnuradio::make_block_sptr(pass_empty_data); 23 | } 24 | 25 | /* 26 | * The private constructor 27 | */ 28 | pdu_split_impl::pdu_split_impl(bool pass_empty_data) 29 | : gr::block("pdu_split", io_signature::make(0, 0, 0), io_signature::make(0, 0, 0)), 30 | d_pass_empty_data(pass_empty_data) 31 | { 32 | message_port_register_in(PMTCONSTSTR__pdu_in()); 33 | set_msg_handler(PMTCONSTSTR__pdu_in(), 34 | [this](pmt::pmt_t msg) { this->handle_pdu(msg); }); 35 | message_port_register_out(PMTCONSTSTR__dict()); 36 | message_port_register_out(PMTCONSTSTR__data()); 37 | } 38 | 39 | /* 40 | * Our virtual destructor. 41 | */ 42 | pdu_split_impl::~pdu_split_impl() {} 43 | 44 | void pdu_split_impl::handle_pdu(pmt::pmt_t pdu) 45 | { 46 | 47 | // make sure PDU data is formed properly 48 | if (!(pmt::is_pair(pdu))) { 49 | GR_LOG_WARN(d_logger, "received unexpected PMT (non-pair)"); 50 | return; 51 | } 52 | 53 | pmt::pmt_t meta = pmt::car(pdu); 54 | pmt::pmt_t v_data = pmt::cdr(pdu); 55 | 56 | if ((!pmt::equal(meta, pmt::PMT_NIL)) | d_pass_empty_data) { 57 | message_port_pub(PMTCONSTSTR__dict(), pmt::car(pdu)); 58 | } 59 | 60 | if (pmt::is_uniform_vector(v_data)) { 61 | if (pmt::length(v_data) | d_pass_empty_data) { 62 | message_port_pub(PMTCONSTSTR__data(), pmt::cdr(pdu)); 63 | } 64 | } 65 | } 66 | 67 | } /* namespace pdu_utils */ 68 | } /* namespace gr */ 69 | -------------------------------------------------------------------------------- /lib/pdu_split_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_SPLIT_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_SPLIT_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class pdu_split_impl : public pdu_split 20 | { 21 | private: 22 | bool d_pass_empty_data; 23 | 24 | void handle_pdu(pmt::pmt_t pdu); 25 | 26 | public: 27 | pdu_split_impl(bool pass_empty_data); 28 | 29 | ~pdu_split_impl() override; 30 | }; 31 | 32 | } // namespace pdu_utils 33 | } // namespace gr 34 | 35 | #endif /* INCLUDED_PDU_UTILS_PDU_SPLIT_IMPL_H */ 36 | -------------------------------------------------------------------------------- /lib/pdu_to_bursts_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_PDU_TO_BURSTS_IMPL_H 11 | #define INCLUDED_PDU_UTILS_PDU_TO_BURSTS_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | template 20 | class pdu_to_bursts_impl : public pdu_to_bursts 21 | { 22 | private: 23 | pmt::pmt_t d_msg_port_out; 24 | bool d_early_burst_err; 25 | bool d_drop_early_bursts; 26 | bool d_tag_sob; 27 | int d_type; 28 | uint32_t d_itemsize; 29 | uint32_t d_max_queue_size; 30 | uint32_t d_drop_ctr; 31 | pmt::pmt_t d_time_tag; 32 | std::list d_pdu_queue; 33 | 34 | std::vector d_data; 35 | 36 | uint32_t queue_data(void); 37 | void store_pdu(pmt::pmt_t pdu); 38 | 39 | public: 40 | pdu_to_bursts_impl(uint32_t early_burst_behavior, uint32_t max_queue_size = 64); 41 | 42 | ~pdu_to_bursts_impl() override; 43 | 44 | void set_max_queue_size(uint32_t size) override { d_max_queue_size = size; } 45 | 46 | // Where all the action really happens 47 | int work(int noutput_items, 48 | gr_vector_const_void_star& input_items, 49 | gr_vector_void_star& output_items) override; 50 | }; 51 | 52 | } // namespace pdu_utils 53 | } // namespace gr 54 | 55 | #endif /* INCLUDED_PDU_UTILS_PDU_TO_BURSTS_IMPL_H */ 56 | -------------------------------------------------------------------------------- /lib/qa_pdu_utils.cc: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | /* 11 | * This class gathers together all the test cases for the gr-filter 12 | * directory into a single test suite. As you create new test cases, 13 | * add them here. 14 | */ 15 | 16 | #include "qa_pdu_utils.h" 17 | 18 | CppUnit::TestSuite* qa_pdu_utils::suite() 19 | { 20 | CppUnit::TestSuite* s = new CppUnit::TestSuite("pdu_utils"); 21 | 22 | return s; 23 | } 24 | -------------------------------------------------------------------------------- /lib/qa_pdu_utils.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef _QA_PDU_UTILS_H_ 11 | #define _QA_PDU_UTILS_H_ 12 | 13 | #include 14 | #include 15 | 16 | //! collect all the tests for the gr-filter directory 17 | 18 | class __GR_ATTR_EXPORT qa_pdu_utils 19 | { 20 | public: 21 | //! return suite of tests for all of gr-filter directory 22 | static CppUnit::TestSuite* suite(); 23 | }; 24 | 25 | #endif /* _QA_PDU_UTILS_H_ */ 26 | -------------------------------------------------------------------------------- /lib/test_pdu_utils.cc: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifdef HAVE_CONFIG_H 11 | #include "config.h" 12 | #endif 13 | 14 | #include 15 | #include 16 | 17 | #include "qa_pdu_utils.h" 18 | #include 19 | #include 20 | #include 21 | 22 | int main(int argc, char** argv) 23 | { 24 | CppUnit::TextTestRunner runner; 25 | std::ofstream xmlfile(get_unittest_path("pdu_utils.xml").c_str()); 26 | CppUnit::XmlOutputter* xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile); 27 | 28 | runner.addTest(qa_pdu_utils::suite()); 29 | runner.setOutputter(xmlout); 30 | 31 | bool was_successful = runner.run("", false); 32 | 33 | return was_successful ? 0 : 1; 34 | } 35 | -------------------------------------------------------------------------------- /lib/upsample_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 4 | * (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 5 | * retains certain rights in this software. 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | */ 9 | 10 | #ifndef INCLUDED_PDU_UTILS_UPSAMPLE_IMPL_H 11 | #define INCLUDED_PDU_UTILS_UPSAMPLE_IMPL_H 12 | 13 | #include 14 | #include 15 | 16 | namespace gr { 17 | namespace pdu_utils { 18 | 19 | class upsample_impl : public upsample 20 | { 21 | private: 22 | uint32_t d_n; 23 | bool d_repeat; 24 | 25 | void handle_msg(pmt::pmt_t); 26 | 27 | public: 28 | upsample_impl(uint32_t n, bool repeat); 29 | 30 | ~upsample_impl() override; 31 | 32 | void set_n(uint32_t n) override; 33 | void set_repeat(bool repeat) override; 34 | }; 35 | 36 | } // namespace pdu_utils 37 | } // namespace gr 38 | 39 | #endif /* INCLUDED_PDU_UTILS_UPSAMPLE_IMPL_H */ 40 | -------------------------------------------------------------------------------- /python/pdu_utils/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2008,2009 Free Software Foundation, Inc. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | # 6 | 7 | # The presence of this file turns this directory into a Python package 8 | 9 | ''' 10 | This is the GNU Radio PDU_UTILS module. Place your Python package 11 | description here (python/__init__.py). 12 | ''' 13 | import os 14 | 15 | # import pybind11 generated symbols into the pdu_utils namespace 16 | try: 17 | # this might fail if the module is python-only 18 | from .pdu_utils_python import * 19 | except ModuleNotFoundError: 20 | pass 21 | 22 | # import any pure python here 23 | from .pdu_flow_ctrl import pdu_flow_ctrl 24 | from .pdu_delay import pdu_delay 25 | try: from .qt_pdu_source import qt_pdu_source 26 | except: print("QT PDU Source not available (import PyQt4 failed)") 27 | # 28 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sandialabs/gr-pdu_utils/68984503712114bbabb4d6b8814d3997144f025b/python/pdu_utils/bindings/README.md -------------------------------------------------------------------------------- /python/pdu_utils/bindings/access_code_to_pdu_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(access_code_to_pdu.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(492ea2bbacaaeaa6c7e7342efd0432d7) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_access_code_to_pdu(py::module& m) 31 | { 32 | 33 | using access_code_to_pdu = ::gr::pdu_utils::access_code_to_pdu; 34 | 35 | 36 | py::class_>( 41 | m, "access_code_to_pdu", D(access_code_to_pdu)) 42 | 43 | .def(py::init(&access_code_to_pdu::make), 44 | py::arg("access_code"), 45 | py::arg("tail_sync"), 46 | py::arg("burst_len"), 47 | py::arg("threshold"), 48 | py::arg("syncmode"), 49 | py::arg("readmode"), 50 | D(access_code_to_pdu, make)) 51 | 52 | 53 | ; 54 | } 55 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/README.md: -------------------------------------------------------------------------------- 1 | This directory stores templates for docstrings that are scraped from the include header files for each block -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/access_code_to_pdu_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_access_code_to_pdu = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_access_code_to_pdu_access_code_to_pdu = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_access_code_to_pdu_make = R"doc()doc"; 25 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/extract_metadata_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_extract_metadata = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_extract_metadata_extract_metadata_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_extract_metadata_extract_metadata_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_extract_metadata_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_extract_metadata_set_key = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_extract_metadata_set_scale = R"doc()doc"; 34 | 35 | 36 | static const char* __doc_gr_pdu_utils_extract_metadata_set_offset = R"doc()doc"; 37 | 38 | 39 | static const char* __doc_gr_pdu_utils_extract_metadata_get_key = R"doc()doc"; 40 | 41 | 42 | static const char* __doc_gr_pdu_utils_extract_metadata_get_scale = R"doc()doc"; 43 | 44 | 45 | static const char* __doc_gr_pdu_utils_extract_metadata_get_offset = R"doc()doc"; 46 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/message_counter_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_message_counter = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_message_counter_message_counter_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_message_counter_message_counter_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_message_counter_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_message_counter_reset = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_message_counter_get_ctr = R"doc()doc"; 34 | 35 | 36 | static const char* __doc_gr_pdu_utils_message_counter_get_name = R"doc()doc"; 37 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/message_emitter_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_message_emitter = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_message_emitter_message_emitter_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_message_emitter_message_emitter_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_message_emitter_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_message_emitter_set_msg = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_message_emitter_get_n_msgs = R"doc()doc"; 34 | 35 | 36 | static const char* __doc_gr_pdu_utils_message_emitter_emit_0 = R"doc()doc"; 37 | 38 | 39 | static const char* __doc_gr_pdu_utils_message_emitter_emit_1 = R"doc()doc"; 40 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/message_gate_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_message_gate = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_message_gate_message_gate_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_message_gate_message_gate_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_message_gate_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_message_gate_reset = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_message_gate_get_n_passed = R"doc()doc"; 34 | 35 | 36 | static const char* __doc_gr_pdu_utils_message_gate_get_n_blocked = R"doc()doc"; 37 | 38 | 39 | static const char* __doc_gr_pdu_utils_message_gate_get_enabled = R"doc()doc"; 40 | 41 | 42 | static const char* __doc_gr_pdu_utils_message_gate_set_enabled = R"doc()doc"; 43 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/message_keep_1_in_n_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_message_keep_1_in_n = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_message_keep_1_in_n_message_keep_1_in_n_0 = 22 | R"doc()doc"; 23 | 24 | 25 | static const char* __doc_gr_pdu_utils_message_keep_1_in_n_message_keep_1_in_n_1 = 26 | R"doc()doc"; 27 | 28 | 29 | static const char* __doc_gr_pdu_utils_message_keep_1_in_n_make = R"doc()doc"; 30 | 31 | 32 | static const char* __doc_gr_pdu_utils_message_keep_1_in_n_set_n = R"doc()doc"; 33 | 34 | 35 | static const char* __doc_gr_pdu_utils_message_keep_1_in_n_get_n = R"doc()doc"; 36 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/msg_drop_random_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_msg_drop_random = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_msg_drop_random_msg_drop_random_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_msg_drop_random_msg_drop_random_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_msg_drop_random_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_msg_drop_random_set_prob_drop = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_msg_drop_random_reset = R"doc()doc"; 34 | 35 | 36 | static const char* __doc_gr_pdu_utils_msg_drop_random_get_drop_count = R"doc()doc"; 37 | 38 | 39 | static const char* __doc_gr_pdu_utils_msg_drop_random_get_msg_count = R"doc()doc"; 40 | 41 | 42 | static const char* __doc_gr_pdu_utils_msg_drop_random_get_pass_count = R"doc()doc"; 43 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pack_unpack_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pack_unpack = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pack_unpack_pack_unpack_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pack_unpack_pack_unpack_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pack_unpack_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_pack_unpack_set_mode = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_pack_unpack_set_bit_order = R"doc()doc"; 34 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_add_noise_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_add_noise = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_add_noise_pdu_add_noise_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_add_noise_pdu_add_noise_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pdu_add_noise_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_pdu_add_noise_set_noise_level = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_pdu_add_noise_set_offset = R"doc()doc"; 34 | 35 | 36 | static const char* __doc_gr_pdu_utils_pdu_add_noise_set_scale = R"doc()doc"; 37 | 38 | 39 | static const char* __doc_gr_pdu_utils_pdu_add_noise_set_noise_dist = R"doc()doc"; 40 | 41 | 42 | static const char* __doc_gr_pdu_utils_pdu_add_noise_set_seed = R"doc()doc"; 43 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_align_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_align = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_align_pdu_align = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_align_make = R"doc()doc"; 25 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_binary_tools_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_binary_tools = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_binary_tools_pdu_binary_tools = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_binary_tools_make = R"doc()doc"; 25 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_burst_combiner_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_burst_combiner = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_burst_combiner_pdu_burst_combiner = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_burst_combiner_make = R"doc()doc"; 25 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_clock_recovery_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_clock_recovery = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_clock_recovery_pdu_clock_recovery_0 = 22 | R"doc()doc"; 23 | 24 | 25 | static const char* __doc_gr_pdu_utils_pdu_clock_recovery_pdu_clock_recovery_1 = 26 | R"doc()doc"; 27 | 28 | 29 | static const char* __doc_gr_pdu_utils_pdu_clock_recovery_make = R"doc()doc"; 30 | 31 | 32 | static const char* __doc_gr_pdu_utils_pdu_clock_recovery_set_window_type = R"doc()doc"; 33 | 34 | 35 | static const char* __doc_gr_pdu_utils_pdu_clock_recovery_set_gauss_sigma = R"doc()doc"; 36 | 37 | 38 | static const char* __doc_gr_pdu_utils_pdu_clock_recovery_set_dc_reject = R"doc()doc"; 39 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_complex_to_mag2_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_complex_to_mag2 = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_complex_to_mag2_pdu_complex_to_mag2 = 22 | R"doc()doc"; 23 | 24 | 25 | static const char* __doc_gr_pdu_utils_pdu_complex_to_mag2_make = R"doc()doc"; 26 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_downsample_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_downsample = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_downsample_pdu_downsample = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_downsample_make = R"doc()doc"; 25 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_fine_time_measure_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_fine_time_measure = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_fine_time_measure_pdu_fine_time_measure = 22 | R"doc()doc"; 23 | 24 | 25 | static const char* __doc_gr_pdu_utils_pdu_fine_time_measure_make = R"doc()doc"; 26 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_fir_filter_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_fir_filter = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_fir_filter_pdu_fir_filter_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_fir_filter_pdu_fir_filter_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pdu_fir_filter_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_pdu_fir_filter_set_taps = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_pdu_fir_filter_set_decimation = R"doc()doc"; 34 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_flow_ctrl_helper_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_flow_ctrl_helper = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_flow_ctrl_helper_pdu_flow_ctrl_helper_0 = 22 | R"doc()doc"; 23 | 24 | 25 | static const char* __doc_gr_pdu_utils_pdu_flow_ctrl_helper_pdu_flow_ctrl_helper_1 = 26 | R"doc()doc"; 27 | 28 | 29 | static const char* __doc_gr_pdu_utils_pdu_flow_ctrl_helper_max_nmsgs = R"doc()doc"; 30 | 31 | 32 | static const char* __doc_gr_pdu_utils_pdu_flow_ctrl_helper_print_nmsgs = R"doc()doc"; 33 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_gmsk_fc_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_gmsk_fc = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_gmsk_fc_pdu_gmsk_fc_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_gmsk_fc_pdu_gmsk_fc_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pdu_gmsk_fc_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_pdu_gmsk_fc_set_sensitivity = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_pdu_gmsk_fc_set_taps = R"doc()doc"; 34 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_head_tail_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_head_tail = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_head_tail_pdu_head_tail_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_head_tail_pdu_head_tail_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pdu_head_tail_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_pdu_head_tail_set_length = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_pdu_head_tail_set_histsize = R"doc()doc"; 34 | 35 | 36 | static const char* __doc_gr_pdu_utils_pdu_head_tail_set_space_bytes = R"doc()doc"; 37 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_length_filter_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_length_filter = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_length_filter_pdu_length_filter = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_length_filter_make = R"doc()doc"; 25 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_logger_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_logger = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_logger_pdu_logger = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_logger_make_0 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pdu_logger_make_1 = R"doc()doc"; 28 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_pfb_resamp_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_preamble_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_preamble = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_preamble_pdu_preamble_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_preamble_pdu_preamble_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pdu_preamble_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_pdu_preamble_set_preamble = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_pdu_preamble_set_tail = R"doc()doc"; 34 | 35 | 36 | static const char* __doc_gr_pdu_utils_pdu_preamble_set_interp = R"doc()doc"; 37 | 38 | 39 | static const char* __doc_gr_pdu_utils_pdu_preamble_set_zero_pad = R"doc()doc"; 40 | 41 | 42 | static const char* __doc_gr_pdu_utils_pdu_preamble_set_nrz = R"doc()doc"; 43 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_quadrature_demod_cf_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_quadrature_demod_cf = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_quadrature_demod_cf_pdu_quadrature_demod_cf = 22 | R"doc()doc"; 23 | 24 | 25 | static const char* __doc_gr_pdu_utils_pdu_quadrature_demod_cf_make = R"doc()doc"; 26 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_range_filter_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_range_filter = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_range_filter_pdu_range_filter_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_range_filter_pdu_range_filter_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pdu_range_filter_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_pdu_range_filter_set_key = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_pdu_range_filter_set_min = R"doc()doc"; 34 | 35 | 36 | static const char* __doc_gr_pdu_utils_pdu_range_filter_set_max = R"doc()doc"; 37 | 38 | 39 | static const char* __doc_gr_pdu_utils_pdu_range_filter_set_inversion = R"doc()doc"; 40 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_rotate_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_rotate = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_rotate_pdu_rotate_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_rotate_pdu_rotate_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pdu_rotate_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_pdu_rotate_set_phase_inc = R"doc()doc"; 31 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_round_robin_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_round_robin = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_round_robin_pdu_round_robin = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_round_robin_make = R"doc()doc"; 25 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_set_m_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_set_m = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_set_m_pdu_set_m_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_set_m_pdu_set_m_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pdu_set_m_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_pdu_set_m_key = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_pdu_set_m_val = R"doc()doc"; 34 | 35 | 36 | static const char* __doc_gr_pdu_utils_pdu_set_m_parse_val = R"doc()doc"; 37 | 38 | 39 | static const char* __doc_gr_pdu_utils_pdu_set_m_set_key = R"doc()doc"; 40 | 41 | 42 | static const char* __doc_gr_pdu_utils_pdu_set_m_set_val = R"doc()doc"; 43 | 44 | 45 | static const char* __doc_gr_pdu_utils_pdu_set_m_set_kv_merge = R"doc()doc"; 46 | 47 | 48 | static const char* __doc_gr_pdu_utils_pdu_set_m_set_v_overwrite = R"doc()doc"; 49 | 50 | 51 | static const char* __doc_gr_pdu_utils_pdu_set_m_set_kv = R"doc()doc"; 52 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_slice_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_slice = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_slice_pdu_slice_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_slice_pdu_slice_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_pdu_slice_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_pdu_slice_set_slice = R"doc()doc"; 31 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_split_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_pdu_split = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_pdu_split_pdu_split = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_pdu_split_make = R"doc()doc"; 25 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/pdu_to_bursts_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/tag_message_trigger_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/tags_to_pdu_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/take_skip_to_pdu_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/docstrings/upsample_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | #include "pydoc_macros.h" 10 | #define D(...) DOC(gr, pdu_utils, __VA_ARGS__) 11 | /* 12 | This file contains placeholders for docstrings for the Python bindings. 13 | Do not edit! These were automatically extracted during the binding process 14 | and will be overwritten during the build process 15 | */ 16 | 17 | 18 | static const char* __doc_gr_pdu_utils_upsample = R"doc()doc"; 19 | 20 | 21 | static const char* __doc_gr_pdu_utils_upsample_upsample_0 = R"doc()doc"; 22 | 23 | 24 | static const char* __doc_gr_pdu_utils_upsample_upsample_1 = R"doc()doc"; 25 | 26 | 27 | static const char* __doc_gr_pdu_utils_upsample_make = R"doc()doc"; 28 | 29 | 30 | static const char* __doc_gr_pdu_utils_upsample_set_n = R"doc()doc"; 31 | 32 | 33 | static const char* __doc_gr_pdu_utils_upsample_set_repeat = R"doc()doc"; 34 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/message_counter_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(message_counter.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(6a3f292fa1b2127b23b3c258c670e445) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_message_counter(py::module& m) 31 | { 32 | 33 | using message_counter = ::gr::pdu_utils::message_counter; 34 | 35 | 36 | py::class_>(m, "message_counter", D(message_counter)) 40 | 41 | .def(py::init(&message_counter::make), py::arg("name"), D(message_counter, make)) 42 | 43 | 44 | .def("reset", &message_counter::reset, D(message_counter, reset)) 45 | 46 | 47 | .def("get_ctr", &message_counter::get_ctr, D(message_counter, get_ctr)) 48 | 49 | 50 | .def("get_name", &message_counter::get_name, D(message_counter, get_name)) 51 | 52 | ; 53 | } 54 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/message_keep_1_in_n_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(message_keep_1_in_n.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(6035798df16e3118a514b5d9d095eec0) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_message_keep_1_in_n(py::module& m) 31 | { 32 | 33 | using message_keep_1_in_n = ::gr::pdu_utils::message_keep_1_in_n; 34 | 35 | 36 | py::class_>( 40 | m, "message_keep_1_in_n", D(message_keep_1_in_n)) 41 | 42 | .def(py::init(&message_keep_1_in_n::make), 43 | py::arg("n"), 44 | D(message_keep_1_in_n, make)) 45 | 46 | 47 | .def("set_n", 48 | &message_keep_1_in_n::set_n, 49 | py::arg("n"), 50 | D(message_keep_1_in_n, set_n)) 51 | 52 | 53 | .def("get_n", &message_keep_1_in_n::get_n, D(message_keep_1_in_n, get_n)) 54 | 55 | ; 56 | } 57 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pack_unpack_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pack_unpack.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(7a2efd348bb24736d88c011006d0819e) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pack_unpack(py::module& m) 31 | { 32 | 33 | using pack_unpack = ::gr::pdu_utils::pack_unpack; 34 | 35 | 36 | py::class_>( 37 | m, "pack_unpack", D(pack_unpack)) 38 | 39 | .def(py::init(&pack_unpack::make), 40 | py::arg("mode"), 41 | py::arg("bitorder"), 42 | D(pack_unpack, make)) 43 | 44 | 45 | .def( 46 | "set_mode", &pack_unpack::set_mode, py::arg("mode"), D(pack_unpack, set_mode)) 47 | 48 | 49 | .def("set_bit_order", 50 | &pack_unpack::set_bit_order, 51 | py::arg("order"), 52 | D(pack_unpack, set_bit_order)) 53 | 54 | ; 55 | } 56 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_align_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_align.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(c7ced7ebeb770430529aa8fc63ad5983) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_align(py::module& m) 31 | { 32 | 33 | using pdu_align = ::gr::pdu_utils::pdu_align; 34 | 35 | 36 | py::class_>( 37 | m, "pdu_align", D(pdu_align)) 38 | 39 | .def(py::init(&pdu_align::make), 40 | py::arg("syncwords"), 41 | py::arg("threshold"), 42 | py::arg("offset"), 43 | py::arg("mode") = ::gr::pdu_utils::align_modes::ALIGN_DROP, 44 | py::arg("match_mode") = ::gr::pdu_utils::align_match_mode::ALIGN_FIRST_MATCH, 45 | D(pdu_align, make)) 46 | 47 | 48 | ; 49 | } 50 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_binary_tools_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_binary_tools.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(bb4b4b9c5f500f72f20a06c15f8e8285) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_binary_tools(py::module& m) 31 | { 32 | 33 | using pdu_binary_tools = ::gr::pdu_utils::pdu_binary_tools; 34 | 35 | 36 | py::class_>( 40 | m, "pdu_binary_tools", D(pdu_binary_tools)) 41 | 42 | .def( 43 | py::init(&pdu_binary_tools::make), py::arg("mode"), D(pdu_binary_tools, make)) 44 | 45 | 46 | ; 47 | } 48 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_burst_combiner_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_burst_combiner.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(c067a247112e206cdbd524fb59017ff4) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_burst_combiner(py::module& m) 31 | { 32 | 33 | using pdu_burst_combiner = ::gr::pdu_utils::pdu_burst_combiner; 34 | 35 | 36 | py::class_>( 40 | m, "pdu_burst_combiner", D(pdu_burst_combiner)) 41 | 42 | .def(py::init(&pdu_burst_combiner::make), D(pdu_burst_combiner, make)) 43 | 44 | 45 | ; 46 | } 47 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_complex_to_mag2_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_complex_to_mag2.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(e821bbfbca20b71dfa24af62ab5e8d60) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_complex_to_mag2(py::module& m) 31 | { 32 | 33 | using pdu_complex_to_mag2 = ::gr::pdu_utils::pdu_complex_to_mag2; 34 | 35 | 36 | py::class_>( 40 | m, "pdu_complex_to_mag2", D(pdu_complex_to_mag2)) 41 | 42 | .def(py::init(&pdu_complex_to_mag2::make), D(pdu_complex_to_mag2, make)) 43 | 44 | 45 | ; 46 | } 47 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_downsample_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_downsample.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(2f7e29c8583ff4edd538a5aa5e208bd8) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_downsample(py::module& m) 31 | { 32 | 33 | using pdu_downsample = ::gr::pdu_utils::pdu_downsample; 34 | 35 | 36 | py::class_>(m, "pdu_downsample", D(pdu_downsample)) 40 | 41 | .def(py::init(&pdu_downsample::make), 42 | py::arg("decimation"), 43 | py::arg("phase"), 44 | D(pdu_downsample, make)) 45 | 46 | 47 | ; 48 | } 49 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_fine_time_measure_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_fine_time_measure.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(68aa3349aaeea14f717727fc1693744e) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_fine_time_measure(py::module& m) 31 | { 32 | 33 | using pdu_fine_time_measure = ::gr::pdu_utils::pdu_fine_time_measure; 34 | 35 | 36 | py::class_>( 40 | m, "pdu_fine_time_measure", D(pdu_fine_time_measure)) 41 | 42 | .def(py::init(&pdu_fine_time_measure::make), 43 | py::arg("pre_burst_time"), 44 | py::arg("post_burst_time"), 45 | py::arg("average_width"), 46 | py::arg("buffer_percent"), 47 | D(pdu_fine_time_measure, make)) 48 | 49 | 50 | ; 51 | } 52 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_gmsk_fc_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_gmsk_fc.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(092a48c5585c6af9ae32c9c7e33cfdd2) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_gmsk_fc(py::module& m) 31 | { 32 | 33 | using pdu_gmsk_fc = ::gr::pdu_utils::pdu_gmsk_fc; 34 | 35 | 36 | py::class_>( 37 | m, "pdu_gmsk_fc", D(pdu_gmsk_fc)) 38 | 39 | .def(py::init(&pdu_gmsk_fc::make), 40 | py::arg("sensitivity"), 41 | py::arg("taps"), 42 | D(pdu_gmsk_fc, make)) 43 | 44 | 45 | .def("set_sensitivity", 46 | &pdu_gmsk_fc::set_sensitivity, 47 | py::arg("sensitivity"), 48 | D(pdu_gmsk_fc, set_sensitivity)) 49 | 50 | 51 | .def( 52 | "set_taps", &pdu_gmsk_fc::set_taps, py::arg("taps"), D(pdu_gmsk_fc, set_taps)) 53 | 54 | ; 55 | } 56 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_length_filter_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_length_filter.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(ac4821fc12ab164f2d974dd1dfd0c4a8) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_length_filter(py::module& m) 31 | { 32 | 33 | using pdu_length_filter = ::gr::pdu_utils::pdu_length_filter; 34 | 35 | 36 | py::class_>( 40 | m, "pdu_length_filter", D(pdu_length_filter)) 41 | 42 | .def(py::init(&pdu_length_filter::make), 43 | py::arg("length"), 44 | py::arg("drop_long"), 45 | D(pdu_length_filter, make)) 46 | 47 | 48 | ; 49 | } 50 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_quadrature_demod_cf_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_quadrature_demod_cf.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(450dc397766c7b23cd8d7bfd4f132759) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_quadrature_demod_cf(py::module& m) 31 | { 32 | 33 | using pdu_quadrature_demod_cf = ::gr::pdu_utils::pdu_quadrature_demod_cf; 34 | 35 | 36 | py::class_>( 40 | m, "pdu_quadrature_demod_cf", D(pdu_quadrature_demod_cf)) 41 | 42 | .def(py::init(&pdu_quadrature_demod_cf::make), 43 | py::arg("sensitivity"), 44 | D(pdu_quadrature_demod_cf, make)) 45 | 46 | 47 | ; 48 | } 49 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_rotate_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_rotate.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(4d849ae264fd784fe35c97105117136d) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_rotate(py::module& m) 31 | { 32 | 33 | using pdu_rotate = ::gr::pdu_utils::pdu_rotate; 34 | 35 | 36 | py::class_>( 37 | m, "pdu_rotate", D(pdu_rotate)) 38 | 39 | .def(py::init(&pdu_rotate::make), py::arg("phase_inc"), D(pdu_rotate, make)) 40 | 41 | 42 | .def("set_phase_inc", 43 | &pdu_rotate::set_phase_inc, 44 | py::arg("phase_inc"), 45 | D(pdu_rotate, set_phase_inc)) 46 | 47 | ; 48 | } 49 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_round_robin_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_round_robin.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(6d69bd9fc09a5b2d37dac8958555af60) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_round_robin(py::module& m) 31 | { 32 | 33 | using pdu_round_robin = ::gr::pdu_utils::pdu_round_robin; 34 | 35 | 36 | py::class_>(m, "pdu_round_robin", D(pdu_round_robin)) 40 | 41 | .def(py::init(&pdu_round_robin::make), 42 | py::arg("num_outputs"), 43 | D(pdu_round_robin, make)) 44 | 45 | 46 | ; 47 | } 48 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_slice_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_slice.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(c630a9faf1e07aca1a3310d5b3e89e20) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_slice(py::module& m) 31 | { 32 | 33 | using pdu_slice = ::gr::pdu_utils::pdu_slice; 34 | 35 | 36 | py::class_>( 37 | m, "pdu_slice", D(pdu_slice)) 38 | 39 | .def(py::init(&pdu_slice::make), py::arg("slice"), D(pdu_slice, make)) 40 | 41 | 42 | .def( 43 | "set_slice", &pdu_slice::set_slice, py::arg("slice"), D(pdu_slice, set_slice)) 44 | 45 | ; 46 | } 47 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_split_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_split.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(022cf963eb022ebe33e54fb749a06481) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_pdu_split(py::module& m) 31 | { 32 | 33 | using pdu_split = ::gr::pdu_utils::pdu_split; 34 | 35 | 36 | py::class_>( 37 | m, "pdu_split", D(pdu_split)) 38 | 39 | .def(py::init(&pdu_split::make), 40 | py::arg("pass_empty_data") = false, 41 | D(pdu_split, make)) 42 | 43 | 44 | ; 45 | } 46 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/pdu_to_bursts_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(pdu_to_bursts.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(d2fef3c10429b6936ecffb8f96f422f8) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | template 31 | void bind_pdu_to_bursts_template(py::module& m, const char* classname) 32 | { 33 | using pdu_to_bursts = ::gr::pdu_utils::pdu_to_bursts; 34 | 35 | py::class_>( 36 | m, classname) 37 | .def(py::init(&gr::pdu_utils::pdu_to_bursts::make), 38 | py::arg("early_burst_behavior"), 39 | py::arg("max_queue_size") = 64); 40 | } 41 | 42 | void bind_pdu_to_bursts(py::module& m) 43 | { 44 | 45 | bind_pdu_to_bursts_template(m, "pdu_to_bursts_b"); 46 | bind_pdu_to_bursts_template(m, "pdu_to_bursts_s"); 47 | bind_pdu_to_bursts_template(m, "pdu_to_bursts_f"); 48 | bind_pdu_to_bursts_template(m, "pdu_to_bursts_c"); 49 | } 50 | -------------------------------------------------------------------------------- /python/pdu_utils/bindings/upsample_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Radio 5 | * 6 | * SPDX-License-Identifier: GPL-3.0-or-later 7 | * 8 | */ 9 | 10 | /***********************************************************************************/ 11 | /* This file is automatically generated using bindtool and can be manually edited */ 12 | /* The following lines can be configured to regenerate this file during cmake */ 13 | /* If manual edits are made, the following tags should be modified accordingly. */ 14 | /* BINDTOOL_GEN_AUTOMATIC(0) */ 15 | /* BINDTOOL_USE_PYGCCXML(0) */ 16 | /* BINDTOOL_HEADER_FILE(upsample.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(d17e5f439d282ee9df7cbdddd7e5e433) */ 18 | /***********************************************************************************/ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace py = pybind11; 25 | 26 | #include 27 | // pydoc.h is automatically generated in the build directory 28 | #include 29 | 30 | void bind_upsample(py::module& m) 31 | { 32 | 33 | using upsample = ::gr::pdu_utils::upsample; 34 | 35 | 36 | py::class_>( 37 | m, "upsample", D(upsample)) 38 | 39 | .def( 40 | py::init(&upsample::make), py::arg("n"), py::arg("repeat"), D(upsample, make)) 41 | 42 | 43 | .def("set_n", &upsample::set_n, py::arg("n"), D(upsample, set_n)) 44 | 45 | 46 | .def("set_repeat", 47 | &upsample::set_repeat, 48 | py::arg("repeat"), 49 | D(upsample, set_repeat)) 50 | 51 | ; 52 | } 53 | -------------------------------------------------------------------------------- /python/pdu_utils/qa_qt_pdu_source.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC 5 | # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government 6 | # retains certain rights in this software. 7 | # 8 | # SPDX-License-Identifier: GPL-3.0-or-later 9 | # 10 | 11 | from gnuradio import gr, gr_unittest 12 | from gnuradio import blocks 13 | from gnuradio import pdu_utils 14 | 15 | 16 | class qa_qt_pdu_source (gr_unittest.TestCase): 17 | 18 | def setUp (self): 19 | self.tb = gr.top_block () 20 | 21 | def tearDown (self): 22 | self.tb = None 23 | 24 | def test_001_t (self): 25 | # set up fg 26 | self.tb.run () 27 | # check data 28 | 29 | 30 | if __name__ == '__main__': 31 | gr_unittest.run(qa_qt_pdu_source) 32 | --------------------------------------------------------------------------------