├── .clang-format ├── .conda ├── README.md ├── conda-forge.yml └── recipe │ ├── bld.bat │ ├── build.sh │ ├── conda_build_config.yaml │ └── meta.yaml ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── MANIFEST.md ├── README.md ├── apps ├── CMakeLists.txt ├── minimal.py ├── minimal.sh ├── sensor.sh ├── sensor_gui │ ├── off.svg │ ├── on.svg │ ├── sensor_value.py │ ├── sensor_window.glade │ └── sensor_window.py └── transceiver.sh ├── cmake ├── Modules │ ├── CMakeParseArgumentsCopy.cmake │ ├── ieee802_15_4Config.cmake │ └── targetConfig.cmake.in └── cmake_uninstall.cmake.in ├── contiki ├── Makefile ├── README ├── project-conf.h └── sdr_shell.c ├── docs ├── CMakeLists.txt ├── README.ieee802_15_4 └── 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 ├── examples ├── CMakeLists.txt ├── ieee802_15_4_CSS_PHY.grc ├── ieee802_15_4_OQPSK_PHY.grc ├── transceiver_CSS_USRP.grc ├── transceiver_CSS_loopback.grc └── transceiver_OQPSK.grc ├── grc ├── CMakeLists.txt ├── ieee802_15_4_access_code_prefixer.block.yml ├── ieee802_15_4_access_code_removal_b.block.yml ├── ieee802_15_4_chips_to_bits_fb.block.yml ├── ieee802_15_4_codeword_demapper_ib.block.yml ├── ieee802_15_4_codeword_mapper_bi.block.yml ├── ieee802_15_4_codeword_soft_demapper_fb.block.yml ├── ieee802_15_4_deinterleaver_ff.block.yml ├── ieee802_15_4_dqcsk_demapper_cc.block.yml ├── ieee802_15_4_dqcsk_mapper_fc.block.yml ├── ieee802_15_4_dqpsk_mapper_ff.block.yml ├── ieee802_15_4_dqpsk_soft_demapper_cc.block.yml ├── ieee802_15_4_frame_buffer_cc.block.yml ├── ieee802_15_4_interleaver_ii.block.yml ├── ieee802_15_4_mac.block.yml ├── ieee802_15_4_multiuser_chirp_detector_cc.block.yml ├── ieee802_15_4_packet_sink.block.yml ├── ieee802_15_4_phr_prefixer.block.yml ├── ieee802_15_4_phr_removal.block.yml ├── ieee802_15_4_preamble_sfd_prefixer_ii.block.yml ├── ieee802_15_4_preamble_tagger_cc.block.yml ├── ieee802_15_4_qpsk_demapper_fi.block.yml ├── ieee802_15_4_qpsk_mapper_if.block.yml ├── ieee802_15_4_rime_stack.block.yml ├── ieee802_15_4_zeropadding_b.block.yml └── ieee802_15_4_zeropadding_removal_b.block.yml ├── include └── ieee802_15_4 │ ├── CMakeLists.txt │ ├── access_code_prefixer.h │ ├── access_code_removal_b.h │ ├── api.h │ ├── chips_to_bits_fb.h │ ├── codeword_demapper_ib.h │ ├── codeword_mapper_bi.h │ ├── codeword_soft_demapper_fb.h │ ├── deinterleaver_ff.h │ ├── dqcsk_demapper_cc.h │ ├── dqcsk_mapper_fc.h │ ├── dqpsk_mapper_ff.h │ ├── dqpsk_soft_demapper_cc.h │ ├── frame_buffer_cc.h │ ├── interleaver_ii.h │ ├── mac.h │ ├── multiuser_chirp_detector_cc.h │ ├── packet_sink.h │ ├── phr_prefixer.h │ ├── phr_removal.h │ ├── preamble_sfd_prefixer_ii.h │ ├── preamble_tagger_cc.h │ ├── qpsk_demapper_fi.h │ ├── qpsk_mapper_if.h │ ├── rime_stack.h │ ├── zeropadding_b.h │ └── zeropadding_removal_b.h ├── lib ├── CMakeLists.txt ├── access_code_prefixer.cc ├── access_code_removal_b_impl.cc ├── access_code_removal_b_impl.h ├── bc_connection.cc ├── bc_connection.h ├── chips_to_bits_fb_impl.cc ├── chips_to_bits_fb_impl.h ├── codeword_demapper_ib_impl.cc ├── codeword_demapper_ib_impl.h ├── codeword_mapper_bi_impl.cc ├── codeword_mapper_bi_impl.h ├── codeword_soft_demapper_fb_impl.cc ├── codeword_soft_demapper_fb_impl.h ├── deinterleaver_ff_impl.cc ├── deinterleaver_ff_impl.h ├── dqcsk_demapper_cc_impl.cc ├── dqcsk_demapper_cc_impl.h ├── dqcsk_mapper_fc_impl.cc ├── dqcsk_mapper_fc_impl.h ├── dqpsk_mapper_ff_impl.cc ├── dqpsk_mapper_ff_impl.h ├── dqpsk_soft_demapper_cc_impl.cc ├── dqpsk_soft_demapper_cc_impl.h ├── frame_buffer_cc_impl.cc ├── frame_buffer_cc_impl.h ├── interleaver_ii_impl.cc ├── interleaver_ii_impl.h ├── mac.cc ├── multiuser_chirp_detector_cc_impl.cc ├── multiuser_chirp_detector_cc_impl.h ├── packet_sink.cc ├── phr_prefixer_impl.cc ├── phr_prefixer_impl.h ├── phr_removal_impl.cc ├── phr_removal_impl.h ├── preamble_sfd_prefixer_ii_impl.cc ├── preamble_sfd_prefixer_ii_impl.h ├── preamble_tagger_cc_impl.cc ├── preamble_tagger_cc_impl.h ├── qpsk_demapper_fi_impl.cc ├── qpsk_demapper_fi_impl.h ├── qpsk_mapper_if_impl.cc ├── qpsk_mapper_if_impl.h ├── rime_connection.cc ├── rime_connection.h ├── rime_stack.cc ├── ruc_connection.cc ├── ruc_connection.h ├── stubborn_sender.cc ├── stubborn_sender.h ├── uc_connection.cc ├── uc_connection.h ├── zeropadding_b_impl.cc ├── zeropadding_b_impl.h ├── zeropadding_removal_b_impl.cc └── zeropadding_removal_b_impl.h ├── python ├── CMakeLists.txt ├── __init__.py ├── bindings │ ├── CMakeLists.txt │ ├── README.md │ ├── access_code_prefixer_python.cc │ ├── access_code_removal_b_python.cc │ ├── bind_oot_file.py │ ├── chips_to_bits_fb_python.cc │ ├── codeword_demapper_ib_python.cc │ ├── codeword_mapper_bi_python.cc │ ├── codeword_soft_demapper_fb_python.cc │ ├── deinterleaver_ff_python.cc │ ├── docstrings │ │ ├── README.md │ │ ├── access_code_prefixer_pydoc_template.h │ │ ├── access_code_removal_b_pydoc_template.h │ │ ├── chips_to_bits_fb_pydoc_template.h │ │ ├── codeword_demapper_ib_pydoc_template.h │ │ ├── codeword_mapper_bi_pydoc_template.h │ │ ├── codeword_soft_demapper_fb_pydoc_template.h │ │ ├── deinterleaver_ff_pydoc_template.h │ │ ├── dqcsk_demapper_cc_pydoc_template.h │ │ ├── dqcsk_mapper_fc_pydoc_template.h │ │ ├── dqpsk_mapper_ff_pydoc_template.h │ │ ├── dqpsk_soft_demapper_cc_pydoc_template.h │ │ ├── frame_buffer_cc_pydoc_template.h │ │ ├── interleaver_ii_pydoc_template.h │ │ ├── mac_pydoc_template.h │ │ ├── multiuser_chirp_detector_cc_pydoc_template.h │ │ ├── packet_sink_pydoc_template.h │ │ ├── phr_prefixer_pydoc_template.h │ │ ├── phr_removal_pydoc_template.h │ │ ├── preamble_sfd_prefixer_ii_pydoc_template.h │ │ ├── preamble_tagger_cc_pydoc_template.h │ │ ├── qpsk_demapper_fi_pydoc_template.h │ │ ├── qpsk_mapper_if_pydoc_template.h │ │ ├── rime_stack_pydoc_template.h │ │ ├── zeropadding_b_pydoc_template.h │ │ └── zeropadding_removal_b_pydoc_template.h │ ├── dqcsk_demapper_cc_python.cc │ ├── dqcsk_mapper_fc_python.cc │ ├── dqpsk_mapper_ff_python.cc │ ├── dqpsk_soft_demapper_cc_python.cc │ ├── frame_buffer_cc_python.cc │ ├── header_utils.py │ ├── interleaver_ii_python.cc │ ├── mac_python.cc │ ├── multiuser_chirp_detector_cc_python.cc │ ├── packet_sink_python.cc │ ├── phr_prefixer_python.cc │ ├── phr_removal_python.cc │ ├── preamble_sfd_prefixer_ii_python.cc │ ├── preamble_tagger_cc_python.cc │ ├── python_bindings.cc │ ├── qpsk_demapper_fi_python.cc │ ├── qpsk_mapper_if_python.cc │ ├── rime_stack_python.cc │ ├── zeropadding_b_python.cc │ └── zeropadding_removal_b_python.cc ├── css_analyze_tx_signal.py ├── css_constants.py ├── css_demod.py ├── css_mod.py ├── css_phy.py ├── qa_access_code_removal_b.py ├── qa_chips_to_bits_fb.py ├── qa_chirp_detector_cc.py ├── qa_codeword_demapper_ib.py ├── qa_codeword_mapper_bi.py ├── qa_codeword_soft_demapper_fb.py ├── qa_css_txrx.py ├── qa_deinterleaver_ff.py ├── qa_dqcsk_demapper_cc.py ├── qa_dqcsk_mapper_fc.py ├── qa_dqpsk_mapper_ff.py ├── qa_dqpsk_soft_demapper_cc.py ├── qa_frame_buffer_cc.py ├── qa_interleaver_ii.py ├── qa_multiuser_chirp_detector_cc.py ├── qa_phr_prefixer.py ├── qa_phr_removal.py ├── qa_preamble_sfd_prefixer_ii.py ├── qa_preamble_tagger_cc.py ├── qa_qpsk_demapper_fi.py ├── qa_qpsk_mapper_if.py ├── qa_zeropadding_b.py └── qa_zeropadding_removal_b.py └── utils ├── rime.lua ├── symbol_mapping.py └── udp.py /.conda/conda-forge.yml: -------------------------------------------------------------------------------- 1 | # See https://conda-forge.org/docs/maintainer/conda_forge_yml.html for 2 | # documentation on possible keys and values. 3 | 4 | # uncomment to enable cross-compiled osx-arm64 builds 5 | build_platform: 6 | linux_aarch64: linux_64 7 | linux_ppc64le: linux_64 8 | osx_arm64: osx_64 9 | clone_depth: 0 10 | conda_build: 11 | pkg_format: '2' 12 | github_actions: 13 | store_build_artifacts: true 14 | os_version: 15 | linux_64: cos7 16 | provider: 17 | linux: github_actions 18 | osx: github_actions 19 | win: github_actions 20 | # uncomment to enable additional linux platforms 21 | #linux_aarch64: github_actions 22 | #linux_ppc64le: github_actions 23 | recipe_dir: .conda/recipe 24 | # skip unnecessary files since this is not a full-fledged conda-forge feedstock 25 | skip_render: 26 | - README.md 27 | - LICENSE.txt 28 | - .gitattributes 29 | - .gitignore 30 | - build-locally.py 31 | - LICENSE 32 | test: native_and_emulated 33 | # enable uploads to Anaconda Cloud from specified branches only 34 | upload_on_branch: main 35 | -------------------------------------------------------------------------------- /.conda/recipe/bld.bat: -------------------------------------------------------------------------------- 1 | setlocal EnableDelayedExpansion 2 | @echo on 3 | 4 | :: Make a build folder and change to it 5 | cmake -E make_directory buildconda 6 | cd buildconda 7 | 8 | :: configure 9 | cmake -G "Ninja" ^ 10 | -DCMAKE_BUILD_TYPE:STRING=Release ^ 11 | -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ 12 | -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^ 13 | -DGR_PYTHON_DIR:PATH="%SP_DIR%" ^ 14 | -DENABLE_DOXYGEN=OFF ^ 15 | -DENABLE_TESTING=ON ^ 16 | .. 17 | if errorlevel 1 exit 1 18 | 19 | :: build 20 | cmake --build . --config Release -- -j%CPU_COUNT% 21 | if errorlevel 1 exit 1 22 | 23 | :: install 24 | cmake --build . --config Release --target install 25 | if errorlevel 1 exit 1 26 | 27 | :: test 28 | ctest --build-config Release --output-on-failure --timeout 120 -j%CPU_COUNT% 29 | if errorlevel 1 exit 1 30 | -------------------------------------------------------------------------------- /.conda/recipe/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | cmake -E make_directory buildconda 6 | cd buildconda 7 | 8 | cmake_config_args=( 9 | -DCMAKE_BUILD_TYPE=Release 10 | -DCMAKE_INSTALL_PREFIX=$PREFIX 11 | -DLIB_SUFFIX="" 12 | -DENABLE_DOXYGEN=OFF 13 | -DENABLE_TESTING=ON 14 | ) 15 | 16 | cmake ${CMAKE_ARGS} -G "Ninja" .. "${cmake_config_args[@]}" 17 | cmake --build . --config Release -- -j${CPU_COUNT} 18 | cmake --build . --config Release --target install 19 | 20 | if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "" ]]; then 21 | ctest --build-config Release --output-on-failure --timeout 120 -j${CPU_COUNT} 22 | fi 23 | -------------------------------------------------------------------------------- /.conda/recipe/conda_build_config.yaml: -------------------------------------------------------------------------------- 1 | channel_sources: 2 | - conda-forge,ryanvolz 3 | # this is the channel and label where packages will be uploaded to if enabled 4 | # (see ../README.md) 5 | channel_targets: 6 | - gnuradio main 7 | # override the conda-forge pin for gnuradio-core by uncommenting 8 | # and specifying a different version here 9 | #gnuradio_core: 10 | #- "3.10.1" 11 | gnuradio_extra_pin: 12 | # always leave one entry with the empty string 13 | - "" 14 | # add version strings here like to get builds for versions other than 15 | # the conda-forge-wide default or version specified above for gnuradio_core 16 | #- "3.9.5" 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | contiki/obj_sky/* 2 | .cproject 3 | .project 4 | .pydevproject 5 | contiki/symbols.* 6 | contiki/*.a 7 | contiki/*.map 8 | contiki/*.ihex 9 | contiki/*.sky 10 | examples/transceiver_OQPSK.py 11 | examples/transceiver_CSS_loopback.py 12 | examples/transceiver_CSS_USRP.py 13 | *.npy 14 | *~ 15 | *.pyc 16 | *.pyo 17 | build*/ 18 | examples/grc/*.py 19 | -------------------------------------------------------------------------------- /MANIFEST.md: -------------------------------------------------------------------------------- 1 | title: gr-ieee802-15-4 2 | brief: An IEEE 802.15.4 (ZigBee) Transceiver 3 | tags: 4 | - IEEE 802.15.4 5 | - ZigBee 6 | - IoT 7 | author: 8 | - Bastian Bloessl 9 | - Felix Wunsch 10 | copyright_owner: 11 | - Bastian Bloessl 12 | - Felix Wunsch 13 | - Free Software Foundation 14 | repo: https://github.com/bastibl/gr-ieee802-15-4.git 15 | website: http://www.ccs-labs.org/software/gr-ieee802-15-4/ 16 | icon: http://www.ccs-labs.org/software/gr-ieee802-15-4/gr-15-4-logo.png 17 | gr_supported_version: v3.7, v3.8, v3.9 18 | --- 19 | This is an IEEE802.15.4 transceiver for GNU Radio v3.7. It is based on the UCLA implementation (https://cgran.org/wiki/UCLAZigBee) of Thomas Schmid. 20 | 21 | Currently, it features the following: 22 | 23 | - The O-QPSK PHY encapsulated in a hierarchical block. 24 | - The CSS PHY, also encapsulated in a hierarchical block (Limitation: Packets need to have a fixed length). 25 | - A block that implements the Rime communication stack. Rime is a lightweight communication stack designed for Wireless Sensor Networks and is part of the Contiki Operating System. 26 | - A transceiver flow graph with USRP <-> PHY <-> MAC <-> Network layer (Rime) <-> UDP Socket / APP which resembles pretty well the ISO/OSI structure. 27 | - A sample application which visualizes sensor values. The application shows how easy it is to connect an external program to the flow graph by using Socket PDU blocks. 28 | - An IEEE 802.15.4 and Rime dissector for Wireshark. 29 | 30 | Some interesting stuff: 31 | 32 | - Packets can be piped to Wireshark. 33 | - The complete physical modulation is done with plain GNU Radio blocks. 34 | - It is interoperable with TelosB sensor motes. 35 | - It is interoperable with Contiki. 36 | - It uses a block to tag packet bursts with tx_sob and tx_eob tags. This tags are understood by the UHD blocks and allow fast switching between transmission and reception. 37 | -------------------------------------------------------------------------------- /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-ieee802_15_4 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 | -------------------------------------------------------------------------------- /apps/minimal.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from socket import * 4 | from struct import * 5 | 6 | sock = socket(AF_INET, SOCK_DGRAM) 7 | sock.sendto("hello", ("127.0.0.1", 52001)) 8 | 9 | while(True): 10 | data, addr = sock.recvfrom(200) 11 | (a,) = unpack("H", data[0:2]) 12 | print a 13 | -------------------------------------------------------------------------------- /apps/minimal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo | nc -u localhost 52001 | od -vsw2 3 | -------------------------------------------------------------------------------- /apps/sensor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FILE="/tmp/sensor.pcap" 4 | FLOWGRAPH="transceiver_OQPSK.py" 5 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | ### create fifo 8 | if [ -e ${FILE} ] 9 | then 10 | echo "${FILE}: file already exists" 11 | if ! [ -p ${FILE} ] 12 | then 13 | echo "ERROR: ${FILE} exists and is not a FIFO" 14 | exit 1 15 | fi 16 | else 17 | echo "creating fifo: ${FILE}" 18 | mkfifo ${FILE} 19 | fi 20 | 21 | ### start transceiver 22 | cd ${DIR} 23 | cd ../examples/ 24 | ./${FLOWGRAPH} & 25 | sleep 1 26 | 27 | 28 | wireshark -k -i ${FILE} & 29 | sleep 3 30 | 31 | 32 | cd ${DIR}/sensor_gui 33 | ./sensor_value.py 34 | 35 | 36 | -------------------------------------------------------------------------------- /apps/sensor_gui/sensor_window.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | True 6 | False 7 | SaFIC: Detector 8 | 500 9 | 300 10 | 11 | 12 | 13 | True 14 | False 15 | 16 | 17 | True 18 | False 19 | gtk-missing-image 20 | 21 | 22 | True 23 | True 24 | 0 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /apps/transceiver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FILE="/tmp/sensor.pcap" 4 | FLOWGRAPH="transceiver_OQPSK.py" 5 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | ### create fifo 8 | if [ -e ${FILE} ] 9 | then 10 | echo "${FILE}: file already exists" 11 | if ! [ -p ${FILE} ] 12 | then 13 | echo "ERROR: ${FILE} exists and is not a FIFO" 14 | exit 1 15 | fi 16 | else 17 | echo "creating fifo: ${FILE}" 18 | mkfifo ${FILE} 19 | fi 20 | 21 | ### start transceiver 22 | cd ${DIR} 23 | cd ../examples/ 24 | ./${FLOWGRAPH} & 25 | sleep 1 26 | 27 | 28 | wireshark -k -i ${FILE} & 29 | sleep 1 30 | 31 | echo "##########################################################################" 32 | echo "### starting netcat. Just type and the lines will be send to the flowgraph" 33 | echo "##########################################################################" 34 | nc -u localhost 52001 35 | 36 | 37 | -------------------------------------------------------------------------------- /cmake/Modules/ieee802_15_4Config.cmake: -------------------------------------------------------------------------------- 1 | if(NOT PKG_CONFIG_FOUND) 2 | INCLUDE(FindPkgConfig) 3 | endif() 4 | PKG_CHECK_MODULES(PC_IEEE802_15_4 ieee802_15_4) 5 | 6 | FIND_PATH( 7 | IEEE802_15_4_INCLUDE_DIRS 8 | NAMES ieee802_15_4/api.h 9 | HINTS $ENV{IEEE802_15_4_DIR}/include 10 | ${PC_IEEE802_15_4_INCLUDEDIR} 11 | PATHS ${CMAKE_INSTALL_PREFIX}/include 12 | /usr/local/include 13 | /usr/include 14 | ) 15 | 16 | FIND_LIBRARY( 17 | IEEE802_15_4_LIBRARIES 18 | NAMES gnuradio-ieee802_15_4 19 | HINTS $ENV{IEEE802_15_4_DIR}/lib 20 | ${PC_IEEE802_15_4_LIBDIR} 21 | PATHS ${CMAKE_INSTALL_PREFIX}/lib 22 | ${CMAKE_INSTALL_PREFIX}/lib64 23 | /usr/local/lib 24 | /usr/local/lib64 25 | /usr/lib 26 | /usr/lib64 27 | ) 28 | 29 | include("${CMAKE_CURRENT_LIST_DIR}/ieee802_15_4Target.cmake") 30 | 31 | INCLUDE(FindPackageHandleStandardArgs) 32 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(IEEE802_15_4 DEFAULT_MSG IEEE802_15_4_LIBRARIES IEEE802_15_4_INCLUDE_DIRS) 33 | MARK_AS_ADVANCED(IEEE802_15_4_LIBRARIES IEEE802_15_4_INCLUDE_DIRS) 34 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /contiki/Makefile: -------------------------------------------------------------------------------- 1 | CONTIKI = ../../contiki 2 | APPS = serial-shell 3 | ifndef TARGET 4 | TARGET=sky 5 | endif 6 | 7 | CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\" 8 | 9 | all: sdr_shell 10 | 11 | upload: 12 | make sdr_shell.upload 13 | 14 | CONTIKI_WITH_RIME = 1 15 | include $(CONTIKI)/Makefile.include 16 | -------------------------------------------------------------------------------- /contiki/README: -------------------------------------------------------------------------------- 1 | This is an example Contiki firmware for TelosB sensor motes that can be used to test interoperability. 2 | 3 | ### INSTALLATION 4 | - install Contiki (http://www.contiki-os.org/) 5 | - edit the CONTIKI variable in the Makefile to point to your contiki installation directory 6 | - make 7 | - make upload 8 | 9 | ### USAGE 10 | - press the button to start broadcasting messages 11 | - every time a broadcast is sent the LEDs change 12 | - you can configure the IEEE 802.15.4 channel in the project-conf.h 13 | - type make login to see what the node receives 14 | -------------------------------------------------------------------------------- /contiki/project-conf.h: -------------------------------------------------------------------------------- 1 | // channel 26 is the default 2 | #define RF_CHANNEL 26 3 | 4 | // turn off radio duty cycling 5 | // this is important, otherwise you will miss most of the packets 6 | #define NETSTACK_CONF_RDC nullrdc_driver 7 | 8 | // disable MAC functionality (for immediate channel access?) 9 | #define NETSTACK_CONF_MAC nullmac_driver 10 | -------------------------------------------------------------------------------- /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-ieee802_15_4 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.ieee802_15_4: -------------------------------------------------------------------------------- 1 | This is the ieee802_15_4-write-a-block package meant as a guide to building 2 | out-of-tree packages. To use the ieee802_15_4 blocks, the Python namespaces 3 | is in 'ieee802_15_4', which is imported as: 4 | 5 | import ieee802_15_4 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(ieee802_15_4) 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-ieee802_15_4 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/__init__.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-ieee802_15_4 6 | # 7 | # SPDX-License-Identifier: GPL-3.0-or-later 8 | # 9 | # 10 | """ 11 | Python interface to contents of doxygen xml documentation. 12 | 13 | Example use: 14 | See the contents of the example folder for the C++ and 15 | doxygen-generated xml used in this example. 16 | 17 | >>> # Parse the doxygen docs. 18 | >>> import os 19 | >>> this_dir = os.path.dirname(globals()['__file__']) 20 | >>> xml_path = this_dir + "/example/xml/" 21 | >>> di = DoxyIndex(xml_path) 22 | 23 | Get a list of all top-level objects. 24 | 25 | >>> print([mem.name() for mem in di.members()]) 26 | [u'Aadvark', u'aadvarky_enough', u'main'] 27 | 28 | Get all functions. 29 | 30 | >>> print([mem.name() for mem in di.in_category(DoxyFunction)]) 31 | [u'aadvarky_enough', u'main'] 32 | 33 | Check if an object is present. 34 | 35 | >>> di.has_member(u'Aadvark') 36 | True 37 | >>> di.has_member(u'Fish') 38 | False 39 | 40 | Get an item by name and check its properties. 41 | 42 | >>> aad = di.get_member(u'Aadvark') 43 | >>> print(aad.brief_description) 44 | Models the mammal Aadvark. 45 | >>> print(aad.detailed_description) 46 | Sadly the model is incomplete and cannot capture all aspects of an aadvark yet. 47 | 48 | This line is uninformative and is only to test line breaks in the comments. 49 | >>> [mem.name() for mem in aad.members()] 50 | [u'aadvarkness', u'print', u'Aadvark', u'get_aadvarkness'] 51 | >>> aad.get_member(u'print').brief_description 52 | u'Outputs the vital aadvark statistics.' 53 | 54 | """ 55 | 56 | from .doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther 57 | 58 | def _test(): 59 | import os 60 | this_dir = os.path.dirname(globals()['__file__']) 61 | xml_path = this_dir + "/example/xml/" 62 | di = DoxyIndex(xml_path) 63 | # Get the Aadvark class 64 | aad = di.get_member('Aadvark') 65 | aad.brief_description 66 | import doctest 67 | return doctest.testmod() 68 | 69 | if __name__ == "__main__": 70 | _test() 71 | 72 | -------------------------------------------------------------------------------- /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-ieee802_15_4 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 IEEE802_15_4 C++ Signal Processing Blocks 3 | * \brief All C++ blocks that can be used from the IEEE802_15_4 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 IEEE802_15_4 Block 4 | 5 | This is the intro page for the Doxygen manual generated for the IEEE802_15_4 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 -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Ryan Volz 2 | # 3 | # This file is part of gr-ieee802_11 4 | # 5 | # SPDX-License-Identifier: GPL-3.0-or-later 6 | # 7 | 8 | install( 9 | FILES ieee802_15_4_CSS_PHY.grc 10 | ieee802_15_4_OQPSK_PHY.grc 11 | transceiver_CSS_loopback.grc 12 | transceiver_CSS_USRP.grc 13 | transceiver_OQPSK.grc 14 | DESTINATION ${GR_PKG_DATA_DIR}/examples) 15 | -------------------------------------------------------------------------------- /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-ieee802_15_4 5 | # 6 | # SPDX-License-Identifier: GPL-3.0-or-later 7 | # 8 | 9 | install(FILES 10 | ieee802_15_4_access_code_prefixer.block.yml 11 | ieee802_15_4_access_code_removal_b.block.yml 12 | ieee802_15_4_chips_to_bits_fb.block.yml 13 | ieee802_15_4_codeword_demapper_ib.block.yml 14 | ieee802_15_4_codeword_mapper_bi.block.yml 15 | ieee802_15_4_codeword_soft_demapper_fb.block.yml 16 | ieee802_15_4_deinterleaver_ff.block.yml 17 | ieee802_15_4_dqcsk_demapper_cc.block.yml 18 | ieee802_15_4_dqcsk_mapper_fc.block.yml 19 | ieee802_15_4_dqpsk_mapper_ff.block.yml 20 | ieee802_15_4_dqpsk_soft_demapper_cc.block.yml 21 | ieee802_15_4_frame_buffer_cc.block.yml 22 | ieee802_15_4_interleaver_ii.block.yml 23 | ieee802_15_4_mac.block.yml 24 | ieee802_15_4_multiuser_chirp_detector_cc.block.yml 25 | ieee802_15_4_packet_sink.block.yml 26 | ieee802_15_4_phr_prefixer.block.yml 27 | ieee802_15_4_phr_removal.block.yml 28 | ieee802_15_4_preamble_sfd_prefixer_ii.block.yml 29 | ieee802_15_4_preamble_tagger_cc.block.yml 30 | ieee802_15_4_qpsk_demapper_fi.block.yml 31 | ieee802_15_4_qpsk_mapper_if.block.yml 32 | ieee802_15_4_rime_stack.block.yml 33 | ieee802_15_4_zeropadding_b.block.yml 34 | ieee802_15_4_zeropadding_removal_b.block.yml DESTINATION share/gnuradio/grc/blocks) 35 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_access_code_prefixer.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_access_code_prefixer 4 | label: Access Code Prefixer 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: pad 9 | label: Pad 10 | dtype: hex 11 | default: '0x00' 12 | - id: preamble 13 | label: Preamble 14 | dtype: hex 15 | default: '0x000000a7' 16 | 17 | inputs: 18 | - domain: message 19 | id: in 20 | 21 | outputs: 22 | - domain: message 23 | id: out 24 | 25 | templates: 26 | imports: import ieee802_15_4 27 | make: ieee802_15_4.access_code_prefixer(${pad},${preamble}) 28 | 29 | file_format: 1 30 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_access_code_removal_b.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_access_code_removal_b 4 | label: Access Code Removal 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: payload_len 9 | label: Num Payload Bytes 10 | dtype: int 11 | 12 | inputs: 13 | - domain: stream 14 | dtype: byte 15 | 16 | outputs: 17 | - domain: message 18 | id: out 19 | 20 | templates: 21 | imports: import ieee802_15_4 22 | make: ieee802_15_4.access_code_removal_b(${payload_len}) 23 | 24 | file_format: 1 25 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_chips_to_bits_fb.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_chips_to_bits_fb 4 | label: Chip Sequence Soft Demapper 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: chip_seq 9 | label: Chip Sequence 10 | dtype: raw 11 | 12 | inputs: 13 | - domain: stream 14 | dtype: float 15 | 16 | outputs: 17 | - domain: stream 18 | dtype: byte 19 | 20 | templates: 21 | imports: import ieee802_15_4 22 | make: ieee802_15_4.chips_to_bits_fb(${chip_seq}) 23 | 24 | file_format: 1 25 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_codeword_demapper_ib.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_codeword_demapper_ib 4 | label: Codeword Demapper 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: bits_per_cw 9 | label: Bits per codeword 10 | dtype: int 11 | - id: codewords 12 | label: Codewords 13 | dtype: raw 14 | 15 | inputs: 16 | - domain: stream 17 | dtype: int 18 | 19 | outputs: 20 | - domain: stream 21 | dtype: byte 22 | 23 | templates: 24 | imports: import ieee802_15_4 25 | make: ieee802_15_4.codeword_demapper_ib(${bits_per_cw}, ${codewords}) 26 | 27 | file_format: 1 28 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_codeword_mapper_bi.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_codeword_mapper_bi 4 | label: Codeword Mapping 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: bits_per_cw 9 | label: Bits per codeword 10 | dtype: int 11 | - id: codewords 12 | label: Codewords 13 | dtype: raw 14 | 15 | inputs: 16 | - domain: stream 17 | dtype: byte 18 | 19 | outputs: 20 | - domain: stream 21 | dtype: int 22 | 23 | templates: 24 | imports: import ieee802_15_4 25 | make: ieee802_15_4.codeword_mapper_bi(${bits_per_cw}, ${codewords}) 26 | 27 | file_format: 1 28 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_codeword_soft_demapper_fb.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_codeword_soft_demapper_fb 4 | label: Codeword Soft Demapper 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: bits_per_cw 9 | label: Bits per Codeword 10 | dtype: int 11 | - id: codewords 12 | label: Codewords 13 | dtype: raw 14 | 15 | inputs: 16 | - domain: stream 17 | dtype: float 18 | 19 | outputs: 20 | - domain: stream 21 | dtype: byte 22 | 23 | templates: 24 | imports: import ieee802_15_4 25 | make: ieee802_15_4.codeword_soft_demapper_fb(${bits_per_cw}, ${codewords}) 26 | 27 | file_format: 1 28 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_deinterleaver_ff.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_deinterleaver_ff 4 | label: Deinterleaver 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: intlv_seq 9 | label: Interleaver sequence 10 | dtype: int_vector 11 | 12 | inputs: 13 | - domain: stream 14 | dtype: float 15 | 16 | outputs: 17 | - domain: stream 18 | dtype: float 19 | 20 | templates: 21 | imports: import ieee802_15_4 22 | make: ieee802_15_4.deinterleaver_ff(${intlv_seq}) 23 | 24 | file_format: 1 25 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_dqcsk_demapper_cc.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_dqcsk_demapper_cc 4 | label: DQCSK Demapper 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: chirp_seq 9 | label: Chirp Sequence 10 | dtype: complex_vector 11 | - id: time_gap_1 12 | label: Time Gap 1 13 | dtype: complex_vector 14 | - id: time_gap_2 15 | label: Time Gap 2 16 | dtype: complex_vector 17 | - id: len_subchirp 18 | label: Samples per Subchirp 19 | dtype: int 20 | - id: num_subchirps 21 | label: Num subchirps per sequence 22 | dtype: int 23 | 24 | inputs: 25 | - domain: stream 26 | dtype: complex 27 | 28 | outputs: 29 | - domain: stream 30 | dtype: complex 31 | 32 | templates: 33 | imports: import ieee802_15_4 34 | make: ieee802_15_4.dqcsk_demapper_cc(${chirp_seq}, ${time_gap_1}, ${time_gap_2}, 35 | ${len_subchirp}, ${num_subchirps}) 36 | 37 | file_format: 1 38 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_dqcsk_mapper_fc.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_dqcsk_mapper_fc 4 | label: DQCSK Mapper 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: chirp_seq 9 | label: Chirp Sequence 10 | dtype: complex_vector 11 | - id: time_gap_1 12 | label: Time Gap 1 13 | dtype: complex_vector 14 | - id: time_gap_2 15 | label: Time Gap 2 16 | dtype: complex_vector 17 | - id: len_subchirp 18 | label: Samples per Subchirp 19 | dtype: int 20 | - id: num_subchirps 21 | label: Num subchirps per sequence 22 | dtype: int 23 | - id: nsym_frame 24 | label: Num symbols per Frame 25 | dtype: int 26 | 27 | inputs: 28 | - domain: stream 29 | dtype: float 30 | 31 | outputs: 32 | - domain: stream 33 | dtype: complex 34 | 35 | templates: 36 | imports: import ieee802_15_4 37 | make: ieee802_15_4.dqcsk_mapper_fc(${chirp_seq}, ${time_gap_1}, ${time_gap_2}, 38 | ${len_subchirp}, ${num_subchirps}, ${nsym_frame}) 39 | 40 | file_format: 1 41 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_dqpsk_mapper_ff.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_dqpsk_mapper_ff 4 | label: DQPSK Mapper 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: framelen 9 | label: Symbols per frame 10 | dtype: int 11 | - id: forward 12 | label: Direction 13 | dtype: bool 14 | default: 'True' 15 | options: ['True', 'False'] 16 | option_labels: [Forward, Reverse] 17 | 18 | inputs: 19 | - domain: stream 20 | dtype: float 21 | 22 | outputs: 23 | - domain: stream 24 | dtype: float 25 | 26 | templates: 27 | imports: import ieee802_15_4 28 | make: ieee802_15_4.dqpsk_mapper_ff(${framelen}, ${forward}) 29 | 30 | file_format: 1 31 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_dqpsk_soft_demapper_cc.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_dqpsk_soft_demapper_cc 4 | label: DQPSK Soft Demapper 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: framelen 9 | label: Frame length 10 | dtype: int 11 | 12 | inputs: 13 | - domain: stream 14 | dtype: complex 15 | 16 | outputs: 17 | - domain: stream 18 | dtype: complex 19 | 20 | templates: 21 | imports: import ieee802_15_4 22 | make: ieee802_15_4.dqpsk_soft_demapper_cc(${framelen}) 23 | 24 | file_format: 1 25 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_frame_buffer_cc.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_frame_buffer_cc 4 | label: Frame Buffer 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: nsym_frame 9 | label: Symbols per frame 10 | dtype: int 11 | 12 | inputs: 13 | - domain: stream 14 | dtype: complex 15 | 16 | outputs: 17 | - domain: stream 18 | dtype: complex 19 | 20 | templates: 21 | imports: import ieee802_15_4 22 | make: ieee802_15_4.frame_buffer_cc(${nsym_frame}) 23 | 24 | file_format: 1 25 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_interleaver_ii.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_interleaver_ii 4 | label: Block Interleaver 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: intlv_seq 9 | label: Interleaver sequence 10 | dtype: int_vector 11 | - id: forward 12 | label: Direction 13 | dtype: bool 14 | default: 'True' 15 | options: ['True', 'False'] 16 | option_labels: [Forward, Reverse] 17 | 18 | inputs: 19 | - domain: stream 20 | dtype: int 21 | 22 | outputs: 23 | - domain: stream 24 | dtype: int 25 | 26 | templates: 27 | imports: import ieee802_15_4 28 | make: ieee802_15_4.interleaver_ii(${intlv_seq}, ${forward}) 29 | 30 | file_format: 1 31 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_mac.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_mac 4 | label: IEEE802.15.4 MAC 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: debug 9 | label: Debug 10 | dtype: bool 11 | default: 'False' 12 | options: ['True', 'False'] 13 | option_labels: [Enable, Disable] 14 | - id: fcf 15 | label: Frame Control 16 | dtype: hex 17 | default: '0x8841' 18 | - id: seq_nr 19 | label: Sequence Number 20 | dtype: hex 21 | default: '0' 22 | - id: dst_pan 23 | label: Destination PAN 24 | dtype: hex 25 | default: '0x1aaa' 26 | - id: dst 27 | label: Destination Address 28 | dtype: hex 29 | default: '0xffff' 30 | - id: src 31 | label: Source Address 32 | dtype: hex 33 | default: '0x3344' 34 | 35 | inputs: 36 | - domain: message 37 | id: pdu in 38 | optional: true 39 | - domain: message 40 | id: app in 41 | optional: true 42 | 43 | outputs: 44 | - domain: message 45 | id: pdu out 46 | optional: true 47 | - domain: message 48 | id: app out 49 | optional: true 50 | 51 | templates: 52 | imports: import ieee802_15_4 53 | make: ieee802_15_4.mac(${debug},${fcf},${seq_nr},${dst_pan},${dst},${src}) 54 | 55 | file_format: 1 56 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_multiuser_chirp_detector_cc.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_multiuser_chirp_detector_cc 4 | label: Multiuser Chirp Detector 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: chirp_seq 9 | label: Chirp Sequence 10 | dtype: complex_vector 11 | - id: time_gap_1 12 | label: Time Gap 1 13 | dtype: int 14 | - id: time_gap_2 15 | label: Time Gap 2 16 | dtype: int 17 | - id: len_subchirp 18 | label: Length Subchirp 19 | dtype: int 20 | - id: threshold 21 | label: Threshold 22 | dtype: float 23 | 24 | inputs: 25 | - domain: stream 26 | dtype: complex 27 | 28 | outputs: 29 | - domain: stream 30 | dtype: complex 31 | 32 | templates: 33 | imports: import ieee802_15_4 34 | make: ieee802_15_4.multiuser_chirp_detector_cc(${chirp_seq}, ${time_gap_1}, ${time_gap_2}, 35 | ${len_subchirp}, ${threshold}) 36 | 37 | file_format: 1 38 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_packet_sink.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_packet_sink 4 | label: Packet Sink 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: th 9 | label: Threshold 10 | dtype: int 11 | default: '10' 12 | 13 | inputs: 14 | - domain: stream 15 | dtype: float 16 | multiplicity: '1' 17 | 18 | outputs: 19 | - domain: message 20 | id: out 21 | 22 | templates: 23 | imports: import ieee802_15_4 24 | make: ieee802_15_4.packet_sink(${th}) 25 | 26 | file_format: 1 27 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_phr_prefixer.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_phr_prefixer 4 | label: PHR Prefixer 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: phr 9 | label: PHR 10 | dtype: raw 11 | 12 | inputs: 13 | - domain: message 14 | id: in 15 | 16 | outputs: 17 | - domain: message 18 | id: out 19 | 20 | templates: 21 | imports: import ieee802_15_4 22 | make: ieee802_15_4.phr_prefixer(${phr}) 23 | 24 | file_format: 1 25 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_phr_removal.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_phr_removal 4 | label: PHR Removal 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: phr 9 | label: PHR 10 | dtype: raw 11 | 12 | inputs: 13 | - domain: message 14 | id: in 15 | 16 | outputs: 17 | - domain: message 18 | id: out 19 | 20 | templates: 21 | imports: import ieee802_15_4 22 | make: ieee802_15_4.phr_removal(${phr}) 23 | 24 | file_format: 1 25 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_preamble_sfd_prefixer_ii.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_preamble_sfd_prefixer_ii 4 | label: Preamble and SFD Prefixer 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: preamble 9 | label: Preamble 10 | dtype: int_vector 11 | - id: sfd 12 | label: SFD 13 | dtype: int_vector 14 | - id: nsym_frame 15 | label: Symbols per frame 16 | dtype: int 17 | 18 | inputs: 19 | - domain: stream 20 | dtype: int 21 | 22 | outputs: 23 | - domain: stream 24 | dtype: int 25 | 26 | templates: 27 | imports: import ieee802_15_4 28 | make: ieee802_15_4.preamble_sfd_prefixer_ii(${preamble}, ${sfd}, ${nsym_frame}) 29 | 30 | file_format: 1 31 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_preamble_tagger_cc.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_preamble_tagger_cc 4 | label: Preamble Tagger 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: len_preamble 9 | label: Length of preamble 10 | dtype: int 11 | 12 | inputs: 13 | - domain: stream 14 | dtype: complex 15 | 16 | outputs: 17 | - domain: stream 18 | dtype: complex 19 | 20 | templates: 21 | imports: import ieee802_15_4 22 | make: ieee802_15_4.preamble_tagger_cc(${len_preamble}) 23 | 24 | file_format: 1 25 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_qpsk_demapper_fi.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_qpsk_demapper_fi 4 | label: QPSK Demapper 5 | category: '[IEEE802.15.4]' 6 | 7 | inputs: 8 | - domain: stream 9 | dtype: float 10 | 11 | outputs: 12 | - domain: stream 13 | dtype: int 14 | multiplicity: '2' 15 | 16 | templates: 17 | imports: import ieee802_15_4 18 | make: ieee802_15_4.qpsk_demapper_fi() 19 | 20 | file_format: 1 21 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_qpsk_mapper_if.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_qpsk_mapper_if 4 | label: QPSK Mapper 5 | category: '[IEEE802.15.4]' 6 | 7 | inputs: 8 | - domain: stream 9 | dtype: int 10 | multiplicity: '2' 11 | 12 | outputs: 13 | - domain: stream 14 | dtype: float 15 | 16 | templates: 17 | imports: import ieee802_15_4 18 | make: ieee802_15_4.qpsk_mapper_if() 19 | 20 | file_format: 1 21 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_rime_stack.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_rime_stack 4 | label: RIME Stack 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: bc_channels 9 | label: Broadcast Channels 10 | dtype: int_vector 11 | default: '[129]' 12 | hide: part 13 | - id: uc_channels 14 | label: Unicast Channels 15 | dtype: int_vector 16 | default: '[130]' 17 | hide: part 18 | - id: ruc_channels 19 | label: Reliable Unicast Channels 20 | dtype: int_vector 21 | default: '[131]' 22 | hide: part 23 | - id: rime_add 24 | label: RIME Address 25 | dtype: int_vector 26 | default: '[23,42]' 27 | 28 | inputs: 29 | - domain: message 30 | id: bcin 31 | multiplicity: ${ len(bc_channels) } 32 | optional: true 33 | - domain: message 34 | id: ucin 35 | multiplicity: ${ len(uc_channels) } 36 | optional: true 37 | - domain: message 38 | id: rucin 39 | multiplicity: ${ len(ruc_channels) } 40 | optional: true 41 | - domain: message 42 | id: fromMAC 43 | multiplicity: '1' 44 | 45 | outputs: 46 | - domain: message 47 | id: bcout 48 | multiplicity: ${ len(bc_channels) } 49 | optional: true 50 | - domain: message 51 | id: ucout 52 | multiplicity: ${ len(uc_channels) } 53 | optional: true 54 | - domain: message 55 | id: rucout 56 | multiplicity: ${ len(ruc_channels) } 57 | optional: true 58 | - domain: message 59 | id: toMAC 60 | multiplicity: '1' 61 | 62 | templates: 63 | imports: import ieee802_15_4 64 | make: ieee802_15_4.rime_stack(${bc_channels}, ${uc_channels}, ${ruc_channels}, 65 | ${rime_add}) 66 | 67 | file_format: 1 68 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_zeropadding_b.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_zeropadding_b 4 | label: Zero Padding 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: nzeros 9 | label: Num zeros 10 | dtype: int 11 | 12 | inputs: 13 | - domain: message 14 | id: in 15 | 16 | outputs: 17 | - domain: stream 18 | dtype: byte 19 | 20 | templates: 21 | imports: import ieee802_15_4 22 | make: ieee802_15_4.zeropadding_b(${nzeros}) 23 | 24 | file_format: 1 25 | -------------------------------------------------------------------------------- /grc/ieee802_15_4_zeropadding_removal_b.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: ieee802_15_4_zeropadding_removal_b 4 | label: Zeropadding Removal 5 | category: '[IEEE802.15.4]' 6 | 7 | parameters: 8 | - id: phr_payload_len 9 | label: PHR+payload len 10 | dtype: int 11 | - id: nzeros 12 | label: Num zeros 13 | dtype: int 14 | 15 | inputs: 16 | - domain: stream 17 | dtype: byte 18 | 19 | outputs: 20 | - domain: message 21 | id: out 22 | 23 | templates: 24 | imports: import ieee802_15_4 25 | make: ieee802_15_4.zeropadding_removal_b(${phr_payload_len}, ${nzeros}) 26 | 27 | file_format: 1 28 | -------------------------------------------------------------------------------- /include/ieee802_15_4/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-ieee802_15_4 5 | # 6 | # SPDX-License-Identifier: GPL-3.0-or-later 7 | # 8 | 9 | ######################################################################## 10 | # Install public header files 11 | ######################################################################## 12 | install(FILES 13 | access_code_prefixer.h 14 | access_code_removal_b.h 15 | api.h 16 | chips_to_bits_fb.h 17 | codeword_demapper_ib.h 18 | codeword_mapper_bi.h 19 | codeword_soft_demapper_fb.h 20 | deinterleaver_ff.h 21 | dqcsk_demapper_cc.h 22 | dqcsk_mapper_fc.h 23 | dqpsk_mapper_ff.h 24 | dqpsk_soft_demapper_cc.h 25 | frame_buffer_cc.h 26 | interleaver_ii.h 27 | mac.h 28 | multiuser_chirp_detector_cc.h 29 | packet_sink.h 30 | phr_prefixer.h 31 | phr_removal.h 32 | preamble_sfd_prefixer_ii.h 33 | preamble_tagger_cc.h 34 | qpsk_demapper_fi.h 35 | qpsk_mapper_if.h 36 | rime_stack.h 37 | zeropadding_b.h 38 | zeropadding_removal_b.h 39 | DESTINATION include/ieee802_15_4 40 | ) 41 | -------------------------------------------------------------------------------- /include/ieee802_15_4/access_code_prefixer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Bastian Bloessl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #ifndef INCLUDED_GR_IEEE802_15_4_ACCESS_CODE_PREFIXER_H 18 | #define INCLUDED_GR_IEEE802_15_4_ACCESS_CODE_PREFIXER_H 19 | 20 | #include 21 | #include 22 | 23 | namespace gr { 24 | namespace ieee802_15_4 { 25 | 26 | class IEEE802_15_4_API access_code_prefixer : virtual public gr::block 27 | { 28 | public: 29 | typedef std::shared_ptr sptr; 30 | static sptr make(int pad = 0, int preamble = 0x000000a7); // per IEEE 802.15.4 31 | }; 32 | 33 | } // namespace ieee802_15_4 34 | } // namespace gr 35 | 36 | #endif /* INCLUDED_GR_IEEE802_15_4_ACCESS_CODE_PREFIXER_H */ 37 | -------------------------------------------------------------------------------- /include/ieee802_15_4/access_code_removal_b.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_ACCESS_CODE_REMOVAL_B_H 24 | #define INCLUDED_IEEE802_15_4_ACCESS_CODE_REMOVAL_B_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API access_code_removal_b : virtual public gr::sync_block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of 44 | * ieee802_15_4::access_code_removal_b. 45 | * 46 | * To avoid accidental use of raw pointers, ieee802_15_4::access_code_removal_b's 47 | * constructor is in a private implementation 48 | * class. ieee802_15_4::access_code_removal_b::make is the public interface for 49 | * creating new instances. 50 | */ 51 | static sptr make(int len_payload); 52 | }; 53 | 54 | } // namespace ieee802_15_4 55 | } // namespace gr 56 | 57 | #endif /* INCLUDED_IEEE802_15_4_ACCESS_CODE_REMOVAL_B_H */ 58 | -------------------------------------------------------------------------------- /include/ieee802_15_4/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-ieee802_15_4 6 | * 7 | * SPDX-License-Identifier: GPL-3.0-or-later 8 | * 9 | */ 10 | 11 | #ifndef INCLUDED_IEEE802_15_4_API_H 12 | #define INCLUDED_IEEE802_15_4_API_H 13 | 14 | #include 15 | 16 | #ifdef gnuradio_ieee802_15_4_EXPORTS 17 | #define IEEE802_15_4_API __GR_ATTR_EXPORT 18 | #else 19 | #define IEEE802_15_4_API __GR_ATTR_IMPORT 20 | #endif 21 | 22 | #endif /* INCLUDED_IEEE802_15_4_API_H */ 23 | -------------------------------------------------------------------------------- /include/ieee802_15_4/chips_to_bits_fb.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_CHIPS_TO_BITS_FB_H 24 | #define INCLUDED_IEEE802_15_4_CHIPS_TO_BITS_FB_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API chips_to_bits_fb : virtual public gr::sync_decimator 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::chips_to_bits_fb. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::chips_to_bits_fb's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::chips_to_bits_fb::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(std::vector> chip_seq); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_CHIPS_TO_BITS_FB_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/codeword_demapper_ib.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_CODEWORD_DEMAPPER_IB_H 24 | #define INCLUDED_IEEE802_15_4_CODEWORD_DEMAPPER_IB_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API codeword_demapper_ib : virtual public gr::block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::codeword_demapper_ib. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::codeword_demapper_ib's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::codeword_demapper_ib::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(int bits_per_cw, std::vector> codewords); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_CODEWORD_DEMAPPER_IB_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/codeword_mapper_bi.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_CODEWORD_MAPPER_BI_H 24 | #define INCLUDED_IEEE802_15_4_CODEWORD_MAPPER_BI_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API codeword_mapper_bi : virtual public gr::block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::codeword_mapper_bi. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::codeword_mapper_bi's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::codeword_mapper_bi::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(int bits_per_cw, std::vector> codewords); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_CODEWORD_MAPPER_BI_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/codeword_soft_demapper_fb.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_CODEWORD_SOFT_DEMAPPER_FB_H 24 | #define INCLUDED_IEEE802_15_4_CODEWORD_SOFT_DEMAPPER_FB_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API codeword_soft_demapper_fb : virtual public gr::block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of 44 | * ieee802_15_4::codeword_soft_demapper_fb. 45 | * 46 | * To avoid accidental use of raw pointers, ieee802_15_4::codeword_soft_demapper_fb's 47 | * constructor is in a private implementation 48 | * class. ieee802_15_4::codeword_soft_demapper_fb::make is the public interface for 49 | * creating new instances. 50 | */ 51 | static sptr make(int bits_per_cw, std::vector> codewords); 52 | }; 53 | 54 | } // namespace ieee802_15_4 55 | } // namespace gr 56 | 57 | #endif /* INCLUDED_IEEE802_15_4_CODEWORD_SOFT_DEMAPPER_FB_H */ 58 | -------------------------------------------------------------------------------- /include/ieee802_15_4/deinterleaver_ff.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_DEINTERLEAVER_FF_H 24 | #define INCLUDED_IEEE802_15_4_DEINTERLEAVER_FF_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API deinterleaver_ff : virtual public gr::sync_block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::deinterleaver_ff. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::deinterleaver_ff's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::deinterleaver_ff::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(std::vector intlv_seq); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_DEINTERLEAVER_FF_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/dqpsk_mapper_ff.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_DQPSK_MAPPER_FF_H 24 | #define INCLUDED_IEEE802_15_4_DQPSK_MAPPER_FF_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API dqpsk_mapper_ff : virtual public gr::sync_block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::dqpsk_mapper_ff. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::dqpsk_mapper_ff's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::dqpsk_mapper_ff::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(int framelen, bool forward); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_DQPSK_MAPPER_FF_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/dqpsk_soft_demapper_cc.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_DQPSK_SOFT_DEMAPPER_CC_H 24 | #define INCLUDED_IEEE802_15_4_DQPSK_SOFT_DEMAPPER_CC_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API dqpsk_soft_demapper_cc : virtual public gr::sync_block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of 44 | * ieee802_15_4::dqpsk_soft_demapper_cc. 45 | * 46 | * To avoid accidental use of raw pointers, ieee802_15_4::dqpsk_soft_demapper_cc's 47 | * constructor is in a private implementation 48 | * class. ieee802_15_4::dqpsk_soft_demapper_cc::make is the public interface for 49 | * creating new instances. 50 | */ 51 | static sptr make(int framelen); 52 | }; 53 | 54 | } // namespace ieee802_15_4 55 | } // namespace gr 56 | 57 | #endif /* INCLUDED_IEEE802_15_4_DQPSK_SOFT_DEMAPPER_CC_H */ 58 | -------------------------------------------------------------------------------- /include/ieee802_15_4/frame_buffer_cc.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_FRAME_BUFFER_CC_H 24 | #define INCLUDED_IEEE802_15_4_FRAME_BUFFER_CC_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API frame_buffer_cc : virtual public gr::block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::frame_buffer_cc. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::frame_buffer_cc's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::frame_buffer_cc::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(int nsym_frame); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_FRAME_BUFFER_CC_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/interleaver_ii.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_INTERLEAVER_II_H 24 | #define INCLUDED_IEEE802_15_4_INTERLEAVER_II_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API interleaver_ii : virtual public gr::sync_block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::interleaver_ii. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::interleaver_ii's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::interleaver_ii::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(std::vector intlv_seq, bool forward); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_INTERLEAVER_II_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/mac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Bastian Bloessl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #ifndef INCLUDED_GR_IEEE802_15_4_MAC_H 18 | #define INCLUDED_GR_IEEE802_15_4_MAC_H 19 | 20 | #include 21 | #include 22 | 23 | namespace gr { 24 | namespace ieee802_15_4 { 25 | 26 | /*! 27 | * \brief This is the MAC Block. 28 | * 29 | * \details 30 | * The MAC block... 31 | */ 32 | class IEEE802_15_4_API mac : virtual public block 33 | { 34 | public: 35 | virtual int get_num_packet_errors() = 0; 36 | virtual int get_num_packets_received() = 0; 37 | virtual float get_packet_error_ratio() = 0; 38 | 39 | typedef std::shared_ptr sptr; 40 | static sptr make(bool debug = false, 41 | /* default values for receive sensitivity testing in Zigbee test spec 42 | 14-0332-01 */ 43 | int fcf = 0x8841, 44 | int seq_nr = 0, 45 | int dst_pan = 0x1aaa, 46 | int dst = 0xffff, 47 | int src = 0x3344); 48 | }; 49 | 50 | } // namespace ieee802_15_4 51 | } // namespace gr 52 | 53 | #endif /* INCLUDED_GR_IEEE802_15_4_MAC_H */ 54 | -------------------------------------------------------------------------------- /include/ieee802_15_4/packet_sink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Bastian Bloessl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #ifndef INCLUDED_GR_IEEE802_15_4_PACKET_SINK_H 18 | #define INCLUDED_GR_IEEE802_15_4_PACKET_SINK_H 19 | 20 | #include 21 | #include 22 | 23 | namespace gr { 24 | namespace ieee802_15_4 { 25 | 26 | class IEEE802_15_4_API packet_sink : virtual public block 27 | { 28 | public: 29 | typedef std::shared_ptr sptr; 30 | static sptr make(unsigned int threshold = 10); 31 | }; 32 | 33 | } // namespace ieee802_15_4 34 | } // namespace gr 35 | 36 | #endif /* INCLUDED_GR_IEEE802_15_4_PACKET_SINK_H */ 37 | -------------------------------------------------------------------------------- /include/ieee802_15_4/phr_prefixer.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_PHR_PREFIXER_H 24 | #define INCLUDED_IEEE802_15_4_PHR_PREFIXER_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API phr_prefixer : virtual public gr::block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::phr_prefixer. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::phr_prefixer's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::phr_prefixer::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(std::vector phr); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_PHR_PREFIXER_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/phr_removal.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_PHR_REMOVAL_H 24 | #define INCLUDED_IEEE802_15_4_PHR_REMOVAL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API phr_removal : virtual public gr::block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::phr_removal. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::phr_removal's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::phr_removal::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(std::vector phr); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_PHR_REMOVAL_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/preamble_sfd_prefixer_ii.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_PREAMBLE_SFD_PREFIXER_II_H 24 | #define INCLUDED_IEEE802_15_4_PREAMBLE_SFD_PREFIXER_II_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API preamble_sfd_prefixer_ii : virtual public gr::block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of 44 | * ieee802_15_4::preamble_sfd_prefixer_ii. 45 | * 46 | * To avoid accidental use of raw pointers, ieee802_15_4::preamble_sfd_prefixer_ii's 47 | * constructor is in a private implementation 48 | * class. ieee802_15_4::preamble_sfd_prefixer_ii::make is the public interface for 49 | * creating new instances. 50 | */ 51 | static sptr make(std::vector preamble, std::vector sfd, int nsym_frame); 52 | }; 53 | 54 | } // namespace ieee802_15_4 55 | } // namespace gr 56 | 57 | #endif /* INCLUDED_IEEE802_15_4_PREAMBLE_SFD_PREFIXER_II_H */ 58 | -------------------------------------------------------------------------------- /include/ieee802_15_4/preamble_tagger_cc.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_PREAMBLE_TAGGER_CC_H 24 | #define INCLUDED_IEEE802_15_4_PREAMBLE_TAGGER_CC_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API preamble_tagger_cc : virtual public gr::sync_block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::preamble_tagger_cc. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::preamble_tagger_cc's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::preamble_tagger_cc::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(int len_preamble); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_PREAMBLE_TAGGER_CC_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/qpsk_demapper_fi.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_QPSK_DEMAPPER_FI_H 24 | #define INCLUDED_IEEE802_15_4_QPSK_DEMAPPER_FI_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API qpsk_demapper_fi : virtual public gr::sync_block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::qpsk_demapper_fi. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::qpsk_demapper_fi's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::qpsk_demapper_fi::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_QPSK_DEMAPPER_FI_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/qpsk_mapper_if.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_QPSK_MAPPER_IF_H 24 | #define INCLUDED_IEEE802_15_4_QPSK_MAPPER_IF_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API qpsk_mapper_if : virtual public gr::sync_block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::qpsk_mapper_if. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::qpsk_mapper_if's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::qpsk_mapper_if::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_QPSK_MAPPER_IF_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/rime_stack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Christoph Leitner 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #ifndef INCLUDED_GR_IEEE802_15_4_RIME_STACK_H 18 | #define INCLUDED_GR_IEEE802_15_4_RIME_STACK_H 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace gr { 25 | namespace ieee802_15_4 { 26 | 27 | class IEEE802_15_4_API rime_stack : virtual public block 28 | { 29 | public: 30 | typedef std::shared_ptr sptr; 31 | static sptr make(std::vector bc_channels, 32 | std::vector uc_channels, 33 | std::vector ruc_channels, 34 | std::vector rime_add); 35 | }; 36 | } // namespace ieee802_15_4 37 | } // namespace gr 38 | 39 | #endif /* INCLUDED_GR_IEEE802_15_4_RIME_STACK_H */ 40 | -------------------------------------------------------------------------------- /include/ieee802_15_4/zeropadding_b.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_ZEROPADDING_B_H 24 | #define INCLUDED_IEEE802_15_4_ZEROPADDING_B_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API zeropadding_b : virtual public gr::block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of ieee802_15_4::zeropadding_b. 44 | * 45 | * To avoid accidental use of raw pointers, ieee802_15_4::zeropadding_b's 46 | * constructor is in a private implementation 47 | * class. ieee802_15_4::zeropadding_b::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(int nzeros); 51 | }; 52 | 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_IEEE802_15_4_ZEROPADDING_B_H */ 57 | -------------------------------------------------------------------------------- /include/ieee802_15_4/zeropadding_removal_b.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | 23 | #ifndef INCLUDED_IEEE802_15_4_ZEROPADDING_REMOVAL_B_H 24 | #define INCLUDED_IEEE802_15_4_ZEROPADDING_REMOVAL_B_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace ieee802_15_4 { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup ieee802_15_4 35 | * 36 | */ 37 | class IEEE802_15_4_API zeropadding_removal_b : virtual public gr::sync_block 38 | { 39 | public: 40 | typedef std::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of 44 | * ieee802_15_4::zeropadding_removal_b. 45 | * 46 | * To avoid accidental use of raw pointers, ieee802_15_4::zeropadding_removal_b's 47 | * constructor is in a private implementation 48 | * class. ieee802_15_4::zeropadding_removal_b::make is the public interface for 49 | * creating new instances. 50 | */ 51 | static sptr make(int phr_payload_len, int nzeros); 52 | }; 53 | 54 | } // namespace ieee802_15_4 55 | } // namespace gr 56 | 57 | #endif /* INCLUDED_IEEE802_15_4_ZEROPADDING_REMOVAL_B_H */ 58 | -------------------------------------------------------------------------------- /lib/access_code_removal_b_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_ACCESS_CODE_REMOVAL_B_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_ACCESS_CODE_REMOVAL_B_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class access_code_removal_b_impl : public access_code_removal_b 31 | { 32 | private: 33 | static const int d_len_SHR = 5; 34 | static const int d_len_PHR = 1; 35 | int d_len_payload; 36 | bool d_fixed_payload_len; 37 | int d_byte_ctr; 38 | unsigned char d_buf[256]; 39 | void extract_payload(); 40 | 41 | public: 42 | access_code_removal_b_impl(int len_payload); 43 | ~access_code_removal_b_impl(); 44 | 45 | int work(int noutput_items, 46 | gr_vector_const_void_star& input_items, 47 | gr_vector_void_star& output_items); 48 | }; 49 | 50 | } // namespace ieee802_15_4 51 | } // namespace gr 52 | 53 | #endif /* INCLUDED_IEEE802_15_4_ACCESS_CODE_REMOVAL_B_IMPL_H */ 54 | -------------------------------------------------------------------------------- /lib/bc_connection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Christoph Leitner 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #ifndef INCLUDED_BC_CONNECTION_H 18 | #define INCLUDED_BC_CONNECTION_H 19 | 20 | #include "rime_connection.h" 21 | #include 22 | 23 | namespace gr { 24 | namespace ieee802_15_4 { 25 | class IEEE802_15_4_API bc_connection : public rime_connection 26 | { 27 | private: 28 | static const int header_length = 4; 29 | 30 | public: 31 | static std::array make_msgbuf(uint16_t channel, const uint8_t src[2]); 32 | bc_connection(rime_stack* block, 33 | uint16_t channel, 34 | pmt::pmt_t inport, 35 | pmt::pmt_t outport, 36 | const uint8_t rime_add_mine[2]); 37 | void pack(pmt::pmt_t msg); 38 | void unpack(pmt::pmt_t msg); 39 | }; 40 | } // namespace ieee802_15_4 41 | } // namespace gr 42 | 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /lib/chips_to_bits_fb_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_CHIPS_TO_BITS_FB_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_CHIPS_TO_BITS_FB_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class chips_to_bits_fb_impl : public chips_to_bits_fb 31 | { 32 | private: 33 | std::vector> d_chip_seq; 34 | int d_bits_per_seq; 35 | int d_len_chip_seq; 36 | int d_num_chip_seq; 37 | std::vector dec2bin_lsb(int dec, int nbit); 38 | 39 | public: 40 | chips_to_bits_fb_impl(std::vector> chip_seq); 41 | ~chips_to_bits_fb_impl(); 42 | 43 | int work(int noutput_items, 44 | gr_vector_const_void_star& input_items, 45 | gr_vector_void_star& output_items); 46 | }; 47 | 48 | } // namespace ieee802_15_4 49 | } // namespace gr 50 | 51 | #endif /* INCLUDED_IEEE802_15_4_CHIPS_TO_BITS_FB_IMPL_H */ 52 | -------------------------------------------------------------------------------- /lib/codeword_demapper_ib_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_CODEWORD_DEMAPPER_IB_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_CODEWORD_DEMAPPER_IB_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class codeword_demapper_ib_impl : public codeword_demapper_ib 31 | { 32 | private: 33 | int d_bits_per_cw; 34 | std::vector> d_codewords; 35 | int d_len_cw; 36 | float d_coderate; 37 | std::vector calc_distances(const int* in); 38 | std::vector dec2bin(int dec, int nbit); 39 | 40 | public: 41 | codeword_demapper_ib_impl(int bits_per_cw, std::vector> codewords); 42 | ~codeword_demapper_ib_impl(); 43 | 44 | void forecast(int noutput_items, gr_vector_int& ninput_items_required); 45 | 46 | int general_work(int noutput_items, 47 | gr_vector_int& ninput_items, 48 | gr_vector_const_void_star& input_items, 49 | gr_vector_void_star& output_items); 50 | }; 51 | 52 | } // namespace ieee802_15_4 53 | } // namespace gr 54 | 55 | #endif /* INCLUDED_IEEE802_15_4_CODEWORD_DEMAPPER_IB_IMPL_H */ 56 | -------------------------------------------------------------------------------- /lib/codeword_mapper_bi_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_CODEWORD_MAPPER_BI_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_CODEWORD_MAPPER_BI_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class codeword_mapper_bi_impl : public codeword_mapper_bi 31 | { 32 | private: 33 | int d_bits_per_cw; 34 | std::vector> d_codewords; 35 | int d_len_cw; 36 | float d_coderate; 37 | int bin2dec(const unsigned char* bin_ptr, int nbits); 38 | 39 | public: 40 | codeword_mapper_bi_impl(int bits_per_cw, std::vector> codewords); 41 | ~codeword_mapper_bi_impl(); 42 | 43 | void forecast(int noutput_items, gr_vector_int& ninput_items_required); 44 | 45 | int general_work(int noutput_items, 46 | gr_vector_int& ninput_items, 47 | gr_vector_const_void_star& input_items, 48 | gr_vector_void_star& output_items); 49 | }; 50 | 51 | } // namespace ieee802_15_4 52 | } // namespace gr 53 | 54 | #endif /* INCLUDED_IEEE802_15_4_CODEWORD_MAPPER_BI_IMPL_H */ 55 | -------------------------------------------------------------------------------- /lib/deinterleaver_ff_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_DEINTERLEAVER_FF_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_DEINTERLEAVER_FF_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class deinterleaver_ff_impl : public deinterleaver_ff 31 | { 32 | private: 33 | std::vector d_intlv_seq; 34 | int d_len_intlv_seq; 35 | bool d_forward; 36 | 37 | public: 38 | deinterleaver_ff_impl(std::vector intlv_seq); 39 | ~deinterleaver_ff_impl(); 40 | 41 | int work(int noutput_items, 42 | gr_vector_const_void_star& input_items, 43 | gr_vector_void_star& output_items); 44 | }; 45 | 46 | } // namespace ieee802_15_4 47 | } // namespace gr 48 | 49 | #endif /* INCLUDED_IEEE802_15_4_DEINTERLEAVER_FF_IMPL_H */ 50 | -------------------------------------------------------------------------------- /lib/dqpsk_mapper_ff_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_DQPSK_MAPPER_FF_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_DQPSK_MAPPER_FF_IMPL_H 24 | 25 | #include 26 | #include 27 | 28 | namespace gr { 29 | namespace ieee802_15_4 { 30 | 31 | class dqpsk_mapper_ff_impl : public dqpsk_mapper_ff 32 | { 33 | private: 34 | bool d_forward; 35 | int d_framelen; 36 | int d_symctr; 37 | int d_nmem; 38 | boost::circular_buffer d_mem; 39 | float d_init_val; 40 | void reset_mem(); 41 | 42 | public: 43 | dqpsk_mapper_ff_impl(int framelen, bool forward); 44 | ~dqpsk_mapper_ff_impl(); 45 | 46 | int work(int noutput_items, 47 | gr_vector_const_void_star& input_items, 48 | gr_vector_void_star& output_items); 49 | }; 50 | 51 | } // namespace ieee802_15_4 52 | } // namespace gr 53 | 54 | #endif /* INCLUDED_IEEE802_15_4_DQPSK_MAPPER_FF_IMPL_H */ 55 | -------------------------------------------------------------------------------- /lib/dqpsk_soft_demapper_cc_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_DQPSK_SOFT_DEMAPPER_CC_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_DQPSK_SOFT_DEMAPPER_CC_IMPL_H 24 | 25 | #include 26 | #include 27 | 28 | namespace gr { 29 | namespace ieee802_15_4 { 30 | 31 | class dqpsk_soft_demapper_cc_impl : public dqpsk_soft_demapper_cc 32 | { 33 | private: 34 | int d_framelen; 35 | int d_symctr; 36 | int d_nmem; 37 | boost::circular_buffer d_mem; 38 | gr_complex d_init_val; 39 | void reset_mem(); 40 | 41 | public: 42 | dqpsk_soft_demapper_cc_impl(int framelen); 43 | ~dqpsk_soft_demapper_cc_impl(); 44 | 45 | int work(int noutput_items, 46 | gr_vector_const_void_star& input_items, 47 | gr_vector_void_star& output_items); 48 | }; 49 | 50 | } // namespace ieee802_15_4 51 | } // namespace gr 52 | 53 | #endif /* INCLUDED_IEEE802_15_4_DQPSK_SOFT_DEMAPPER_CC_IMPL_H */ 54 | -------------------------------------------------------------------------------- /lib/frame_buffer_cc_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_FRAME_BUFFER_CC_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_FRAME_BUFFER_CC_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class frame_buffer_cc_impl : public frame_buffer_cc 31 | { 32 | private: 33 | int d_nsym_frame; 34 | std::vector d_buf; 35 | 36 | public: 37 | frame_buffer_cc_impl(int nsym_frame); 38 | ~frame_buffer_cc_impl(); 39 | 40 | // Where all the action really happens 41 | void forecast(int noutput_items, gr_vector_int& ninput_items_required); 42 | 43 | int general_work(int noutput_items, 44 | gr_vector_int& ninput_items, 45 | gr_vector_const_void_star& input_items, 46 | gr_vector_void_star& output_items); 47 | }; 48 | 49 | } // namespace ieee802_15_4 50 | } // namespace gr 51 | 52 | #endif /* INCLUDED_IEEE802_15_4_FRAME_BUFFER_CC_IMPL_H */ 53 | -------------------------------------------------------------------------------- /lib/interleaver_ii_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_INTERLEAVER_II_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_INTERLEAVER_II_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class interleaver_ii_impl : public interleaver_ii 31 | { 32 | private: 33 | std::vector d_intlv_seq; 34 | int d_len_intlv_seq; 35 | bool d_forward; 36 | 37 | public: 38 | interleaver_ii_impl(std::vector intlv_seq, bool forward); 39 | ~interleaver_ii_impl(); 40 | 41 | // Where all the action really happens 42 | int work(int noutput_items, 43 | gr_vector_const_void_star& input_items, 44 | gr_vector_void_star& output_items); 45 | }; 46 | 47 | } // namespace ieee802_15_4 48 | } // namespace gr 49 | 50 | #endif /* INCLUDED_IEEE802_15_4_INTERLEAVER_II_IMPL_H */ 51 | -------------------------------------------------------------------------------- /lib/phr_prefixer_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_PHR_PREFIXER_C_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_PHR_PREFIXER_C_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class phr_prefixer_impl : public phr_prefixer 31 | { 32 | private: 33 | const static int PHR_LEN = 12; 34 | unsigned char* d_buf; 35 | void prefix_phr(pmt::pmt_t msg); 36 | void unpack(unsigned char* dest_unpacked, unsigned char* src_packed, int nbytes); 37 | 38 | public: 39 | phr_prefixer_impl(std::vector phr); 40 | ~phr_prefixer_impl(); 41 | }; 42 | 43 | } // namespace ieee802_15_4 44 | } // namespace gr 45 | 46 | #endif /* INCLUDED_IEEE802_15_4_PHR_PREFIXER_C_IMPL_H */ 47 | -------------------------------------------------------------------------------- /lib/phr_removal_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_PHR_REMOVAL_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_PHR_REMOVAL_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class phr_removal_impl : public phr_removal 31 | { 32 | private: 33 | const static int PHR_LEN = 12; 34 | const static int MAX_PHY_SIZE = 127; 35 | unsigned char d_buf[127]; 36 | void remove_phr(pmt::pmt_t msg); 37 | void pack(unsigned char* dest_packed, unsigned char* src_unpacked, int nbytes); 38 | 39 | public: 40 | phr_removal_impl(std::vector phr); 41 | ~phr_removal_impl(); 42 | }; 43 | 44 | } // namespace ieee802_15_4 45 | } // namespace gr 46 | 47 | #endif /* INCLUDED_IEEE802_15_4_PHR_REMOVAL_IMPL_H */ 48 | -------------------------------------------------------------------------------- /lib/preamble_sfd_prefixer_ii_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_PREAMBLE_SFD_PREFIXER_II_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_PREAMBLE_SFD_PREFIXER_II_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class preamble_sfd_prefixer_ii_impl : public preamble_sfd_prefixer_ii 31 | { 32 | private: 33 | std::vector d_preamble_sfd; 34 | int d_nsym_frame; 35 | int d_sym_ctr; 36 | 37 | public: 38 | preamble_sfd_prefixer_ii_impl(std::vector preamble, 39 | std::vector sfd, 40 | int nsym_frame); 41 | ~preamble_sfd_prefixer_ii_impl(); 42 | 43 | int general_work(int noutput_items, 44 | gr_vector_int& ninput_items, 45 | gr_vector_const_void_star& input_items, 46 | gr_vector_void_star& output_items); 47 | }; 48 | 49 | } // namespace ieee802_15_4 50 | } // namespace gr 51 | 52 | #endif /* INCLUDED_IEEE802_15_4_PREAMBLE_SFD_PREFIXER_II_IMPL_H */ 53 | -------------------------------------------------------------------------------- /lib/preamble_tagger_cc_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_PREAMBLE_TAGGER_CC_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_PREAMBLE_TAGGER_CC_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class preamble_tagger_cc_impl : public preamble_tagger_cc 31 | { 32 | private: 33 | int d_len_preamble; 34 | 35 | public: 36 | preamble_tagger_cc_impl(int len_preamble); 37 | ~preamble_tagger_cc_impl(); 38 | 39 | // Where all the action really happens 40 | int work(int noutput_items, 41 | gr_vector_const_void_star& input_items, 42 | gr_vector_void_star& output_items); 43 | }; 44 | 45 | } // namespace ieee802_15_4 46 | } // namespace gr 47 | 48 | #endif /* INCLUDED_IEEE802_15_4_PREAMBLE_TAGGER_CC_IMPL_H */ 49 | -------------------------------------------------------------------------------- /lib/qpsk_demapper_fi_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_QPSK_DEMAPPER_FI_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_QPSK_DEMAPPER_FI_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class qpsk_demapper_fi_impl : public qpsk_demapper_fi 31 | { 32 | private: 33 | float* d_angle_tab; 34 | void decide(int* out_I, int* out_Q, const float* in, int nitems); 35 | 36 | public: 37 | qpsk_demapper_fi_impl(); 38 | ~qpsk_demapper_fi_impl(); 39 | 40 | // Where all the action really happens 41 | int work(int noutput_items, 42 | gr_vector_const_void_star& input_items, 43 | gr_vector_void_star& output_items); 44 | }; 45 | 46 | } // namespace ieee802_15_4 47 | } // namespace gr 48 | 49 | #endif /* INCLUDED_IEEE802_15_4_QPSK_DEMAPPER_FI_IMPL_H */ 50 | -------------------------------------------------------------------------------- /lib/qpsk_mapper_if_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_QPSK_MAPPER_IF_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_QPSK_MAPPER_IF_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class qpsk_mapper_if_impl : public qpsk_mapper_if 31 | { 32 | private: 33 | float* d_angle_tab; 34 | 35 | public: 36 | qpsk_mapper_if_impl(); 37 | ~qpsk_mapper_if_impl(); 38 | 39 | int work(int noutput_items, 40 | gr_vector_const_void_star& input_items, 41 | gr_vector_void_star& output_items); 42 | }; 43 | 44 | } // namespace ieee802_15_4 45 | } // namespace gr 46 | 47 | #endif /* INCLUDED_IEEE802_15_4_QPSK_MAPPER_IF_IMPL_H */ 48 | -------------------------------------------------------------------------------- /lib/rime_connection.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Christoph Leitner 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #include "rime_connection.h" 18 | 19 | using namespace gr::ieee802_15_4; 20 | 21 | rime_connection::rime_connection(rime_stack* block, 22 | uint16_t channel, 23 | pmt::pmt_t inport, 24 | pmt::pmt_t outport, 25 | const uint8_t rime_add_mine[2]) 26 | : d_block(block), 27 | d_channel(channel), 28 | d_inport(inport), 29 | d_outport(outport), 30 | d_mac_outport(pmt::mp("toMAC")) 31 | { 32 | d_rime_add_mine[0] = rime_add_mine[0]; 33 | d_rime_add_mine[1] = rime_add_mine[1]; 34 | } 35 | 36 | uint16_t rime_connection::channel() const { return d_channel; } 37 | 38 | std::string rime_connection::msg_to_string(pmt::pmt_t msg) 39 | { 40 | if (pmt::is_pair(msg)) { 41 | pmt::pmt_t blob = pmt::cdr(msg); 42 | return std::string(static_cast(pmt::blob_data(blob)), 43 | pmt::blob_length(blob)); 44 | } else if (pmt::is_symbol(msg)) { 45 | return std::string(pmt::symbol_to_string(msg)); 46 | } else if (pmt::is_blob(msg)) { 47 | return std::string(static_cast(pmt::blob_data(msg)), 48 | pmt::blob_length(msg)); 49 | } 50 | 51 | throw std::runtime_error("rime connection: wrong message type"); 52 | return ""; 53 | } 54 | -------------------------------------------------------------------------------- /lib/rime_connection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Christoph Leitner 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #ifndef INCLUDED_RIME_CONNECTION_H 18 | #define INCLUDED_RIME_CONNECTION_H 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace gr { 25 | namespace ieee802_15_4 { 26 | class IEEE802_15_4_API rime_connection 27 | { 28 | protected: 29 | rime_stack* d_block; 30 | uint16_t d_channel; 31 | pmt::pmt_t d_inport; 32 | pmt::pmt_t d_outport; 33 | pmt::pmt_t d_mac_outport; 34 | uint8_t d_rime_add_mine[2]; 35 | 36 | public: 37 | static std::string msg_to_string(pmt::pmt_t msg); 38 | rime_connection(rime_stack* block, 39 | uint16_t channel, 40 | pmt::pmt_t inport, 41 | pmt::pmt_t outport, 42 | const uint8_t rime_add_mine[2]); 43 | virtual ~rime_connection(){}; 44 | virtual void pack(pmt::pmt_t msg) = 0; 45 | virtual void unpack(pmt::pmt_t msg) = 0; 46 | uint16_t channel() const; 47 | }; 48 | } // namespace ieee802_15_4 49 | } // namespace gr 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /lib/ruc_connection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Christoph Leitner 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #ifndef INCLUDED_RUC_CONNECTION_H 19 | #define INCLUDED_RUC_CONNECTION_H 20 | 21 | #include "rime_connection.h" 22 | #include "stubborn_sender.h" 23 | #include 24 | 25 | namespace gr { 26 | namespace ieee802_15_4 { 27 | class IEEE802_15_4_API ruc_connection : public rime_connection 28 | { 29 | private: 30 | static const int header_length = 7; 31 | static const int seqno_bits = 2; 32 | int d_send_seqno; 33 | int d_recv_seqno; 34 | stubborn_sender d_stubborn_sender; 35 | gr::thread::mutex d_mutex; 36 | 37 | public: 38 | static std::array make_msgbuf(uint16_t channel, 39 | bool ack, 40 | int seqno, 41 | const uint8_t src[2], 42 | const uint8_t dest[2]); 43 | ruc_connection(rime_stack* block, 44 | uint16_t channel, 45 | pmt::pmt_t inport, 46 | pmt::pmt_t outport, 47 | const uint8_t rime_add_mine[2]); 48 | void pack(pmt::pmt_t msg); 49 | void unpack(pmt::pmt_t msg); 50 | void inc_recv_seqno(); 51 | int recv_seqno(); 52 | }; 53 | } // namespace ieee802_15_4 54 | } // namespace gr 55 | #endif 56 | -------------------------------------------------------------------------------- /lib/stubborn_sender.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Christoph Leitner 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #ifndef INCLUDED_STUBBORN_SENDER_H 18 | #define INCLUDED_STUBBORN_SENDER_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | namespace gr { 26 | namespace ieee802_15_4 { 27 | class ruc_connection; 28 | class IEEE802_15_4_API stubborn_sender 29 | { 30 | private: 31 | rime_stack* d_block; 32 | ruc_connection* d_caller; 33 | pmt::pmt_t d_mac_outport; 34 | long d_retxtime; 35 | int d_retxs; 36 | std::atomic_bool d_stop; 37 | std::queue d_msg_queue; 38 | gr::thread::mutex d_mutex; 39 | gr::thread::condition_variable d_queue_filled; 40 | gr::thread::condition_variable d_ack_received; 41 | void thread_func(); 42 | pmt::pmt_t queue_pop(); 43 | 44 | public: 45 | stubborn_sender(rime_stack* block, ruc_connection* caller, pmt::pmt_t mac_outport); 46 | void start(long retxtime = 1000L, int retxs = 3); 47 | void enqueue(pmt::pmt_t msg); 48 | void stop(); 49 | }; 50 | } // namespace ieee802_15_4 51 | } // namespace gr 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /lib/uc_connection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Christoph Leitner 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #ifndef INCLUDED_UC_CONNECTION_H 19 | #define INCLUDED_UC_CONNECTION_H 20 | 21 | #include "rime_connection.h" 22 | #include 23 | 24 | namespace gr { 25 | namespace ieee802_15_4 { 26 | class IEEE802_15_4_API uc_connection : public rime_connection 27 | { 28 | private: 29 | static const int header_length = 6; 30 | 31 | public: 32 | static std::array 33 | make_msgbuf(uint16_t channel, const uint8_t src[2], const uint8_t dest[2]); 34 | static bool rime_add_from_string(std::string& to_parse, uint8_t addr[2]); 35 | uc_connection(rime_stack* block, 36 | uint16_t channel, 37 | pmt::pmt_t inport, 38 | pmt::pmt_t outport, 39 | const uint8_t rime_add_mine[2]); 40 | void pack(pmt::pmt_t msg); 41 | void unpack(pmt::pmt_t msg); 42 | }; 43 | } // namespace ieee802_15_4 44 | } // namespace gr 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /lib/zeropadding_b_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_ZEROPADDING_B_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_ZEROPADDING_B_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class zeropadding_b_impl : public zeropadding_b 31 | { 32 | private: 33 | std::vector d_buf; 34 | int d_nzeros; 35 | void pad_zeros(pmt::pmt_t msg); 36 | 37 | public: 38 | zeropadding_b_impl(int nzeros); 39 | ~zeropadding_b_impl(); 40 | 41 | int general_work(int noutput_items, 42 | gr_vector_int& ninput_items, 43 | gr_vector_const_void_star& input_items, 44 | gr_vector_void_star& output_items); 45 | }; 46 | 47 | } // namespace ieee802_15_4 48 | } // namespace gr 49 | 50 | #endif /* INCLUDED_IEEE802_15_4_ZEROPADDING_B_IMPL_H */ 51 | -------------------------------------------------------------------------------- /lib/zeropadding_removal_b_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute 4 | * of Technology (KIT) . 5 | * 6 | * This is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this software; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef INCLUDED_IEEE802_15_4_ZEROPADDING_REMOVAL_B_IMPL_H 23 | #define INCLUDED_IEEE802_15_4_ZEROPADDING_REMOVAL_B_IMPL_H 24 | 25 | #include 26 | 27 | namespace gr { 28 | namespace ieee802_15_4 { 29 | 30 | class zeropadding_removal_b_impl : public zeropadding_removal_b 31 | { 32 | private: 33 | int d_nzeros; 34 | int d_phr_payload_len; 35 | std::vector d_buf; 36 | int d_buf_pos; 37 | void remove_zeros(); 38 | 39 | public: 40 | zeropadding_removal_b_impl(int phr_payload_len, int nzeros); 41 | ~zeropadding_removal_b_impl(); 42 | 43 | // Where all the action really happens 44 | int work(int noutput_items, 45 | gr_vector_const_void_star& input_items, 46 | gr_vector_void_star& output_items); 47 | }; 48 | 49 | } // namespace ieee802_15_4 50 | } // namespace gr 51 | 52 | #endif /* INCLUDED_IEEE802_15_4_ZEROPADDING_REMOVAL_B_IMPL_H */ 53 | -------------------------------------------------------------------------------- /python/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-ieee802_15_4 5 | # 6 | # SPDX-License-Identifier: GPL-3.0-or-later 7 | # 8 | 9 | ######################################################################## 10 | # Include python install macros 11 | ######################################################################## 12 | include(GrPython) 13 | if(NOT PYTHONINTERP_FOUND) 14 | return() 15 | endif() 16 | 17 | add_subdirectory(bindings) 18 | 19 | ######################################################################## 20 | # Install python sources 21 | ######################################################################## 22 | GR_PYTHON_INSTALL( 23 | FILES 24 | __init__.py 25 | css_constants.py 26 | css_phy.py 27 | css_mod.py 28 | css_demod.py DESTINATION ${GR_PYTHON_DIR}/ieee802_15_4 29 | ) 30 | 31 | ######################################################################## 32 | # Handle the unit tests 33 | ######################################################################## 34 | include(GrTest) 35 | 36 | set(GR_TEST_TARGET_DEPS gnuradio-ieee802_15_4) 37 | -------------------------------------------------------------------------------- /python/__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 IEEE802_15_4 module. Place your Python package 11 | description here (python/__init__.py). 12 | ''' 13 | import os 14 | 15 | # import pybind11 generated symbols into the ieee802_15_4 namespace 16 | try: 17 | # this might fail if the module is python-only 18 | from .ieee802_15_4_python import * 19 | except ModuleNotFoundError: 20 | pass 21 | 22 | # import any pure python here 23 | from .css_constants import * 24 | from .css_phy import physical_layer as css_phy 25 | from .css_mod import modulator as css_modulator 26 | from .css_demod import demodulator as css_demodulator 27 | # 28 | -------------------------------------------------------------------------------- /python/bindings/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2020 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 | ######################################################################## 9 | # Check if there is C++ code at all 10 | ######################################################################## 11 | if(NOT ieee802_15_4_sources) 12 | MESSAGE(STATUS "No C++ sources... skipping python bindings") 13 | return() 14 | endif(NOT ieee802_15_4_sources) 15 | 16 | ######################################################################## 17 | # Check for pygccxml 18 | ######################################################################## 19 | GR_PYTHON_CHECK_MODULE_RAW( 20 | "pygccxml" 21 | "import pygccxml" 22 | PYGCCXML_FOUND 23 | ) 24 | 25 | include(GrPybind) 26 | 27 | ######################################################################## 28 | # Python Bindings 29 | ######################################################################## 30 | 31 | list(APPEND ieee802_15_4_python_files 32 | access_code_prefixer_python.cc 33 | access_code_removal_b_python.cc 34 | chips_to_bits_fb_python.cc 35 | codeword_demapper_ib_python.cc 36 | codeword_mapper_bi_python.cc 37 | codeword_soft_demapper_fb_python.cc 38 | deinterleaver_ff_python.cc 39 | dqcsk_demapper_cc_python.cc 40 | dqcsk_mapper_fc_python.cc 41 | dqpsk_mapper_ff_python.cc 42 | dqpsk_soft_demapper_cc_python.cc 43 | frame_buffer_cc_python.cc 44 | interleaver_ii_python.cc 45 | mac_python.cc 46 | multiuser_chirp_detector_cc_python.cc 47 | packet_sink_python.cc 48 | phr_prefixer_python.cc 49 | phr_removal_python.cc 50 | preamble_sfd_prefixer_ii_python.cc 51 | preamble_tagger_cc_python.cc 52 | qpsk_demapper_fi_python.cc 53 | qpsk_mapper_if_python.cc 54 | rime_stack_python.cc 55 | zeropadding_b_python.cc 56 | zeropadding_removal_b_python.cc 57 | python_bindings.cc) 58 | 59 | GR_PYBIND_MAKE_OOT(ieee802_15_4 60 | ../.. 61 | gr::ieee802_15_4 62 | "${ieee802_15_4_python_files}") 63 | 64 | install(TARGETS ieee802_15_4_python DESTINATION ${GR_PYTHON_DIR}/ieee802_15_4 COMPONENT pythonapi) 65 | -------------------------------------------------------------------------------- /python/bindings/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/gr-ieee802-15-4/a210b11fed2d307ef797ea79842b54f4e8ed3dd5/python/bindings/README.md -------------------------------------------------------------------------------- /python/bindings/access_code_prefixer_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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_prefixer.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(b74bd0506a3cff0b89a450dd6a498204) */ 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_prefixer(py::module& m) 31 | { 32 | 33 | using access_code_prefixer = ::gr::ieee802_15_4::access_code_prefixer; 34 | 35 | 36 | py::class_>(m, "access_code_prefixer", D(access_code_prefixer)) 38 | 39 | .def(py::init(&access_code_prefixer::make), 40 | py::arg("pad") = 0, 41 | py::arg("preamble") = 167, 42 | D(access_code_prefixer,make) 43 | ) 44 | 45 | 46 | 47 | 48 | ; 49 | 50 | 51 | 52 | 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /python/bindings/access_code_removal_b_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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_removal_b.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(8c5350c088bc9ea63f67462618b35d53) */ 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_removal_b(py::module& m) 31 | { 32 | 33 | using access_code_removal_b = ::gr::ieee802_15_4::access_code_removal_b; 34 | 35 | 36 | py::class_>(m, "access_code_removal_b", D(access_code_removal_b)) 38 | 39 | .def(py::init(&access_code_removal_b::make), 40 | py::arg("len_payload"), 41 | D(access_code_removal_b,make) 42 | ) 43 | 44 | 45 | 46 | 47 | ; 48 | 49 | 50 | 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /python/bindings/chips_to_bits_fb_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(chips_to_bits_fb.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(8b2d311cb935ae8ae5d15320de3a6d5d) */ 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_chips_to_bits_fb(py::module& m) 31 | { 32 | 33 | using chips_to_bits_fb = ::gr::ieee802_15_4::chips_to_bits_fb; 34 | 35 | 36 | py::class_>(m, "chips_to_bits_fb", D(chips_to_bits_fb)) 38 | 39 | .def(py::init(&chips_to_bits_fb::make), 40 | py::arg("chip_seq"), 41 | D(chips_to_bits_fb,make) 42 | ) 43 | 44 | 45 | 46 | 47 | ; 48 | 49 | 50 | 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /python/bindings/codeword_demapper_ib_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(codeword_demapper_ib.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(a17fb1b6f4a550f76c7efcdc64da823d) */ 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_codeword_demapper_ib(py::module& m) 31 | { 32 | 33 | using codeword_demapper_ib = ::gr::ieee802_15_4::codeword_demapper_ib; 34 | 35 | 36 | py::class_>(m, "codeword_demapper_ib", D(codeword_demapper_ib)) 38 | 39 | .def(py::init(&codeword_demapper_ib::make), 40 | py::arg("bits_per_cw"), 41 | py::arg("codewords"), 42 | D(codeword_demapper_ib,make) 43 | ) 44 | 45 | 46 | 47 | 48 | ; 49 | 50 | 51 | 52 | 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /python/bindings/codeword_mapper_bi_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(codeword_mapper_bi.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(ae23614c6694004781086d4d60e8de47) */ 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_codeword_mapper_bi(py::module& m) 31 | { 32 | 33 | using codeword_mapper_bi = ::gr::ieee802_15_4::codeword_mapper_bi; 34 | 35 | 36 | py::class_>(m, "codeword_mapper_bi", D(codeword_mapper_bi)) 38 | 39 | .def(py::init(&codeword_mapper_bi::make), 40 | py::arg("bits_per_cw"), 41 | py::arg("codewords"), 42 | D(codeword_mapper_bi,make) 43 | ) 44 | 45 | 46 | 47 | 48 | ; 49 | 50 | 51 | 52 | 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /python/bindings/codeword_soft_demapper_fb_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(codeword_soft_demapper_fb.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(b2c725b787d15184d4df030597b6a2be) */ 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_codeword_soft_demapper_fb(py::module& m) 31 | { 32 | 33 | using codeword_soft_demapper_fb = ::gr::ieee802_15_4::codeword_soft_demapper_fb; 34 | 35 | 36 | py::class_>(m, "codeword_soft_demapper_fb", D(codeword_soft_demapper_fb)) 38 | 39 | .def(py::init(&codeword_soft_demapper_fb::make), 40 | py::arg("bits_per_cw"), 41 | py::arg("codewords"), 42 | D(codeword_soft_demapper_fb,make) 43 | ) 44 | 45 | 46 | 47 | 48 | ; 49 | 50 | 51 | 52 | 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /python/bindings/deinterleaver_ff_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(deinterleaver_ff.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(519e9f59bfbe71d8933e563ac5f2cf1c) */ 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_deinterleaver_ff(py::module& m) 31 | { 32 | 33 | using deinterleaver_ff = ::gr::ieee802_15_4::deinterleaver_ff; 34 | 35 | 36 | py::class_>(m, "deinterleaver_ff", D(deinterleaver_ff)) 38 | 39 | .def(py::init(&deinterleaver_ff::make), 40 | py::arg("intlv_seq"), 41 | D(deinterleaver_ff,make) 42 | ) 43 | 44 | 45 | 46 | 47 | ; 48 | 49 | 50 | 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /python/bindings/docstrings/README.md: -------------------------------------------------------------------------------- 1 | This directory stores templates for docstrings that are scraped from the include header files for each block -------------------------------------------------------------------------------- /python/bindings/docstrings/access_code_prefixer_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_access_code_prefixer = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_access_code_prefixer_access_code_prefixer = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_access_code_prefixer_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/access_code_removal_b_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_access_code_removal_b = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_access_code_removal_b_access_code_removal_b = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_access_code_removal_b_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/chips_to_bits_fb_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_chips_to_bits_fb = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_chips_to_bits_fb_chips_to_bits_fb = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_chips_to_bits_fb_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/codeword_demapper_ib_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_codeword_demapper_ib = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_codeword_demapper_ib_codeword_demapper_ib = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_codeword_demapper_ib_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/codeword_mapper_bi_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_codeword_mapper_bi = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_codeword_mapper_bi_codeword_mapper_bi = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_codeword_mapper_bi_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/codeword_soft_demapper_fb_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_codeword_soft_demapper_fb = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_codeword_soft_demapper_fb_codeword_soft_demapper_fb = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_codeword_soft_demapper_fb_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/deinterleaver_ff_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_deinterleaver_ff = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_deinterleaver_ff_deinterleaver_ff = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_deinterleaver_ff_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/dqcsk_demapper_cc_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_dqcsk_demapper_cc = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_dqcsk_demapper_cc_dqcsk_demapper_cc = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_dqcsk_demapper_cc_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/dqcsk_mapper_fc_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_dqcsk_mapper_fc = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_dqcsk_mapper_fc_dqcsk_mapper_fc = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_dqcsk_mapper_fc_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/dqpsk_mapper_ff_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_dqpsk_mapper_ff = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_dqpsk_mapper_ff_dqpsk_mapper_ff = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_dqpsk_mapper_ff_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/dqpsk_soft_demapper_cc_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_dqpsk_soft_demapper_cc = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_dqpsk_soft_demapper_cc_dqpsk_soft_demapper_cc = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_dqpsk_soft_demapper_cc_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/frame_buffer_cc_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_frame_buffer_cc = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_frame_buffer_cc_frame_buffer_cc = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_frame_buffer_cc_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/interleaver_ii_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_interleaver_ii = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_interleaver_ii_interleaver_ii = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_interleaver_ii_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/mac_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_mac = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_mac_mac_0 = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_mac_mac_1 = R"doc()doc"; 26 | 27 | 28 | static const char *__doc_gr_ieee802_15_4_mac_get_num_packet_errors = R"doc()doc"; 29 | 30 | 31 | static const char *__doc_gr_ieee802_15_4_mac_get_num_packets_received = R"doc()doc"; 32 | 33 | 34 | static const char *__doc_gr_ieee802_15_4_mac_get_packet_error_ratio = R"doc()doc"; 35 | 36 | 37 | static const char *__doc_gr_ieee802_15_4_mac_make = R"doc()doc"; 38 | 39 | 40 | -------------------------------------------------------------------------------- /python/bindings/docstrings/multiuser_chirp_detector_cc_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_multiuser_chirp_detector_cc = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_multiuser_chirp_detector_cc_multiuser_chirp_detector_cc = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_multiuser_chirp_detector_cc_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/packet_sink_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_packet_sink = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_packet_sink_packet_sink = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_packet_sink_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/phr_prefixer_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_phr_prefixer = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_phr_prefixer_phr_prefixer = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_phr_prefixer_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/phr_removal_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_phr_removal = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_phr_removal_phr_removal = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_phr_removal_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/preamble_sfd_prefixer_ii_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_preamble_sfd_prefixer_ii = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_preamble_sfd_prefixer_ii_preamble_sfd_prefixer_ii = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_preamble_sfd_prefixer_ii_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/preamble_tagger_cc_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_preamble_tagger_cc = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_preamble_tagger_cc_preamble_tagger_cc = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_preamble_tagger_cc_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/qpsk_demapper_fi_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_qpsk_demapper_fi = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_qpsk_demapper_fi_qpsk_demapper_fi = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_qpsk_demapper_fi_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/qpsk_mapper_if_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_qpsk_mapper_if = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_qpsk_mapper_if_qpsk_mapper_if = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_qpsk_mapper_if_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/rime_stack_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_rime_stack = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_rime_stack_rime_stack = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_rime_stack_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/zeropadding_b_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_zeropadding_b = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_zeropadding_b_zeropadding_b = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_zeropadding_b_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/docstrings/zeropadding_removal_b_pydoc_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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,ieee802_15_4, __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 | 19 | static const char *__doc_gr_ieee802_15_4_zeropadding_removal_b = R"doc()doc"; 20 | 21 | 22 | static const char *__doc_gr_ieee802_15_4_zeropadding_removal_b_zeropadding_removal_b = R"doc()doc"; 23 | 24 | 25 | static const char *__doc_gr_ieee802_15_4_zeropadding_removal_b_make = R"doc()doc"; 26 | 27 | 28 | -------------------------------------------------------------------------------- /python/bindings/dqcsk_demapper_cc_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(dqcsk_demapper_cc.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(d50c0b368f7887882c54435946de81b9) */ 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_dqcsk_demapper_cc(py::module& m) 31 | { 32 | 33 | using dqcsk_demapper_cc = ::gr::ieee802_15_4::dqcsk_demapper_cc; 34 | 35 | 36 | py::class_>(m, "dqcsk_demapper_cc", D(dqcsk_demapper_cc)) 38 | 39 | .def(py::init(&dqcsk_demapper_cc::make), 40 | py::arg("chirp_seq"), 41 | py::arg("time_gap_1"), 42 | py::arg("time_gap_2"), 43 | py::arg("len_subchirp"), 44 | py::arg("num_subchirps"), 45 | D(dqcsk_demapper_cc,make) 46 | ) 47 | 48 | 49 | 50 | 51 | ; 52 | 53 | 54 | 55 | 56 | } 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /python/bindings/dqcsk_mapper_fc_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(dqcsk_mapper_fc.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(79ce4101aa8adff7f5c594384703389e) */ 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_dqcsk_mapper_fc(py::module& m) 31 | { 32 | 33 | using dqcsk_mapper_fc = ::gr::ieee802_15_4::dqcsk_mapper_fc; 34 | 35 | 36 | py::class_>(m, "dqcsk_mapper_fc", D(dqcsk_mapper_fc)) 38 | 39 | .def(py::init(&dqcsk_mapper_fc::make), 40 | py::arg("chirp_seq"), 41 | py::arg("time_gap_1"), 42 | py::arg("time_gap_2"), 43 | py::arg("len_subchirp"), 44 | py::arg("num_subchirp"), 45 | py::arg("nsym_frame"), 46 | D(dqcsk_mapper_fc,make) 47 | ) 48 | 49 | 50 | 51 | 52 | ; 53 | 54 | 55 | 56 | 57 | } 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /python/bindings/dqpsk_mapper_ff_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(dqpsk_mapper_ff.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(f76afdebe46747547a09b37a66a6dbac) */ 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_dqpsk_mapper_ff(py::module& m) 31 | { 32 | 33 | using dqpsk_mapper_ff = ::gr::ieee802_15_4::dqpsk_mapper_ff; 34 | 35 | 36 | py::class_>(m, "dqpsk_mapper_ff", D(dqpsk_mapper_ff)) 38 | 39 | .def(py::init(&dqpsk_mapper_ff::make), 40 | py::arg("framelen"), 41 | py::arg("forward"), 42 | D(dqpsk_mapper_ff,make) 43 | ) 44 | 45 | 46 | 47 | 48 | ; 49 | 50 | 51 | 52 | 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /python/bindings/dqpsk_soft_demapper_cc_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(dqpsk_soft_demapper_cc.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(e485594ab71bc15aa9bb6ff996f6a492) */ 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_dqpsk_soft_demapper_cc(py::module& m) 31 | { 32 | 33 | using dqpsk_soft_demapper_cc = ::gr::ieee802_15_4::dqpsk_soft_demapper_cc; 34 | 35 | 36 | py::class_>(m, "dqpsk_soft_demapper_cc", D(dqpsk_soft_demapper_cc)) 38 | 39 | .def(py::init(&dqpsk_soft_demapper_cc::make), 40 | py::arg("framelen"), 41 | D(dqpsk_soft_demapper_cc,make) 42 | ) 43 | 44 | 45 | 46 | 47 | ; 48 | 49 | 50 | 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /python/bindings/frame_buffer_cc_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(frame_buffer_cc.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(8f6dcd5bc62eeca65790ab67a2a56ea7) */ 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_frame_buffer_cc(py::module& m) 31 | { 32 | 33 | using frame_buffer_cc = ::gr::ieee802_15_4::frame_buffer_cc; 34 | 35 | 36 | py::class_>(m, "frame_buffer_cc", D(frame_buffer_cc)) 38 | 39 | .def(py::init(&frame_buffer_cc::make), 40 | py::arg("nsym_frame"), 41 | D(frame_buffer_cc,make) 42 | ) 43 | 44 | 45 | 46 | 47 | ; 48 | 49 | 50 | 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /python/bindings/interleaver_ii_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(interleaver_ii.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(c4326cb66b7b1f42fd16727df3cebf8e) */ 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_interleaver_ii(py::module& m) 31 | { 32 | 33 | using interleaver_ii = ::gr::ieee802_15_4::interleaver_ii; 34 | 35 | 36 | py::class_>(m, "interleaver_ii", D(interleaver_ii)) 38 | 39 | .def(py::init(&interleaver_ii::make), 40 | py::arg("intlv_seq"), 41 | py::arg("forward"), 42 | D(interleaver_ii,make) 43 | ) 44 | 45 | 46 | 47 | 48 | ; 49 | 50 | 51 | 52 | 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /python/bindings/multiuser_chirp_detector_cc_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(multiuser_chirp_detector_cc.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(07f3a8e0bf8162cde013aff2c055a608) */ 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_multiuser_chirp_detector_cc(py::module& m) 31 | { 32 | 33 | using multiuser_chirp_detector_cc = ::gr::ieee802_15_4::multiuser_chirp_detector_cc; 34 | 35 | 36 | py::class_>(m, "multiuser_chirp_detector_cc", D(multiuser_chirp_detector_cc)) 38 | 39 | .def(py::init(&multiuser_chirp_detector_cc::make), 40 | py::arg("chirp_seq"), 41 | py::arg("time_gap_1"), 42 | py::arg("time_gap_2"), 43 | py::arg("len_subchirp"), 44 | py::arg("threshold"), 45 | D(multiuser_chirp_detector_cc,make) 46 | ) 47 | 48 | 49 | 50 | 51 | ; 52 | 53 | 54 | 55 | 56 | } 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /python/bindings/packet_sink_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(packet_sink.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(4583c6d0d4450f5e49034ceb50f271a5) */ 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_packet_sink(py::module& m) 31 | { 32 | 33 | using packet_sink = ::gr::ieee802_15_4::packet_sink; 34 | 35 | 36 | py::class_>(m, "packet_sink", D(packet_sink)) 38 | 39 | .def(py::init(&packet_sink::make), 40 | py::arg("threshold") = 10, 41 | D(packet_sink,make) 42 | ) 43 | 44 | 45 | 46 | 47 | ; 48 | 49 | 50 | 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /python/bindings/phr_prefixer_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(phr_prefixer.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(6cb39ce891f1fac9dd876bff7bc49ae3) */ 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_phr_prefixer(py::module& m) 31 | { 32 | 33 | using phr_prefixer = ::gr::ieee802_15_4::phr_prefixer; 34 | 35 | 36 | py::class_>(m, "phr_prefixer", D(phr_prefixer)) 38 | 39 | .def(py::init(&phr_prefixer::make), 40 | py::arg("phr"), 41 | D(phr_prefixer,make) 42 | ) 43 | 44 | 45 | 46 | 47 | ; 48 | 49 | 50 | 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /python/bindings/phr_removal_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(phr_removal.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(1beb9fa3bff89cce86e21837cc441add) */ 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_phr_removal(py::module& m) 31 | { 32 | 33 | using phr_removal = ::gr::ieee802_15_4::phr_removal; 34 | 35 | 36 | py::class_>(m, "phr_removal", D(phr_removal)) 38 | 39 | .def(py::init(&phr_removal::make), 40 | py::arg("phr"), 41 | D(phr_removal,make) 42 | ) 43 | 44 | 45 | 46 | 47 | ; 48 | 49 | 50 | 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /python/bindings/preamble_sfd_prefixer_ii_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(preamble_sfd_prefixer_ii.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(bbee31d1c7d1296b74bd326d5e90a736) */ 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_preamble_sfd_prefixer_ii(py::module& m) 31 | { 32 | 33 | using preamble_sfd_prefixer_ii = ::gr::ieee802_15_4::preamble_sfd_prefixer_ii; 34 | 35 | 36 | py::class_>(m, "preamble_sfd_prefixer_ii", D(preamble_sfd_prefixer_ii)) 38 | 39 | .def(py::init(&preamble_sfd_prefixer_ii::make), 40 | py::arg("preamble"), 41 | py::arg("sfd"), 42 | py::arg("nsym_frame"), 43 | D(preamble_sfd_prefixer_ii,make) 44 | ) 45 | 46 | 47 | 48 | 49 | ; 50 | 51 | 52 | 53 | 54 | } 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /python/bindings/preamble_tagger_cc_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(preamble_tagger_cc.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(f40c949e08ffd3856e17349c7f834615) */ 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_preamble_tagger_cc(py::module& m) 31 | { 32 | 33 | using preamble_tagger_cc = ::gr::ieee802_15_4::preamble_tagger_cc; 34 | 35 | 36 | py::class_>(m, "preamble_tagger_cc", D(preamble_tagger_cc)) 38 | 39 | .def(py::init(&preamble_tagger_cc::make), 40 | py::arg("len_preamble"), 41 | D(preamble_tagger_cc,make) 42 | ) 43 | 44 | 45 | 46 | 47 | ; 48 | 49 | 50 | 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /python/bindings/qpsk_demapper_fi_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(qpsk_demapper_fi.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(211dfc618fcc712aaa027804f620ae87) */ 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_qpsk_demapper_fi(py::module& m) 31 | { 32 | 33 | using qpsk_demapper_fi = ::gr::ieee802_15_4::qpsk_demapper_fi; 34 | 35 | 36 | py::class_>(m, "qpsk_demapper_fi", D(qpsk_demapper_fi)) 38 | 39 | .def(py::init(&qpsk_demapper_fi::make), 40 | D(qpsk_demapper_fi,make) 41 | ) 42 | 43 | 44 | 45 | 46 | ; 47 | 48 | 49 | 50 | 51 | } 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /python/bindings/qpsk_mapper_if_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(qpsk_mapper_if.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(fd92e244e3b58d68467e6c8c5d2f8212) */ 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_qpsk_mapper_if(py::module& m) 31 | { 32 | 33 | using qpsk_mapper_if = ::gr::ieee802_15_4::qpsk_mapper_if; 34 | 35 | 36 | py::class_>(m, "qpsk_mapper_if", D(qpsk_mapper_if)) 38 | 39 | .def(py::init(&qpsk_mapper_if::make), 40 | D(qpsk_mapper_if,make) 41 | ) 42 | 43 | 44 | 45 | 46 | ; 47 | 48 | 49 | 50 | 51 | } 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /python/bindings/rime_stack_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(rime_stack.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(1ece006b2fd03e3e85a850496450bd50) */ 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_rime_stack(py::module& m) 31 | { 32 | 33 | using rime_stack = ::gr::ieee802_15_4::rime_stack; 34 | 35 | 36 | py::class_>(m, "rime_stack", D(rime_stack)) 38 | 39 | .def(py::init(&rime_stack::make), 40 | py::arg("bc_channels"), 41 | py::arg("uc_channels"), 42 | py::arg("ruc_channels"), 43 | py::arg("rime_add"), 44 | D(rime_stack,make) 45 | ) 46 | 47 | 48 | 49 | 50 | ; 51 | 52 | 53 | 54 | 55 | } 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /python/bindings/zeropadding_b_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(zeropadding_b.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(2751676ae2b54f7d927ecb3f4ef9bfc6) */ 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_zeropadding_b(py::module& m) 31 | { 32 | 33 | using zeropadding_b = ::gr::ieee802_15_4::zeropadding_b; 34 | 35 | 36 | py::class_>(m, "zeropadding_b", D(zeropadding_b)) 38 | 39 | .def(py::init(&zeropadding_b::make), 40 | py::arg("nzeros"), 41 | D(zeropadding_b,make) 42 | ) 43 | 44 | 45 | 46 | 47 | ; 48 | 49 | 50 | 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /python/bindings/zeropadding_removal_b_python.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 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(zeropadding_removal_b.h) */ 17 | /* BINDTOOL_HEADER_FILE_HASH(6c035154dd89a931ebdb801b6fed7228) */ 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_zeropadding_removal_b(py::module& m) 31 | { 32 | 33 | using zeropadding_removal_b = ::gr::ieee802_15_4::zeropadding_removal_b; 34 | 35 | 36 | py::class_>(m, "zeropadding_removal_b", D(zeropadding_removal_b)) 38 | 39 | .def(py::init(&zeropadding_removal_b::make), 40 | py::arg("phr_payload_len"), 41 | py::arg("nzeros"), 42 | D(zeropadding_removal_b,make) 43 | ) 44 | 45 | 46 | 47 | 48 | ; 49 | 50 | 51 | 52 | 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /python/qa_chips_to_bits_fb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT) . 5 | # 6 | # This is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 3, or (at your option) 9 | # any later version. 10 | # 11 | # This software is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this software; see the file COPYING. If not, write to 18 | # the Free Software Foundation, Inc., 51 Franklin Street, 19 | # Boston, MA 02110-1301, USA. 20 | # 21 | 22 | from gnuradio import gr, gr_unittest 23 | from gnuradio import blocks 24 | import ieee802_15_4_swig as ieee802_15_4 25 | 26 | class qa_chips_to_bits_fb (gr_unittest.TestCase): 27 | 28 | def setUp (self): 29 | self.tb = gr.top_block () 30 | 31 | def tearDown (self): 32 | self.tb = None 33 | 34 | def test_001_t (self): 35 | # set up fg 36 | chips_in = (3,2,-2,-3, 4,-3,3,-4, -2,2,-1,1.5, -1.5,-1.2,2,1) 37 | self.src = blocks.vector_source_f(chips_in) 38 | self.c2b = ieee802_15_4.chips_to_bits_fb([[1,1,0,0],[1,0,1,0],[0,1,0,1],[0,0,1,1]]) 39 | self.snk = blocks.vector_sink_b(1) 40 | self.tb.connect(self.src, self.c2b, self.snk) 41 | self.tb.run () 42 | # check data 43 | bits_out = self.snk.data() 44 | ref = (0,0,1,0,0,1,1,1) 45 | self.assertFloatTuplesAlmostEqual(bits_out, ref) 46 | 47 | if __name__ == '__main__': 48 | gr_unittest.run(qa_chips_to_bits_fb, "qa_chips_to_bits_fb.xml") 49 | -------------------------------------------------------------------------------- /python/qa_frame_buffer_cc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT) . 5 | # 6 | # This is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 3, or (at your option) 9 | # any later version. 10 | # 11 | # This software is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this software; see the file COPYING. If not, write to 18 | # the Free Software Foundation, Inc., 51 Franklin Street, 19 | # Boston, MA 02110-1301, USA. 20 | # 21 | 22 | from gnuradio import gr, gr_unittest 23 | from gnuradio import blocks 24 | import ieee802_15_4_swig as ieee802_15_4 25 | 26 | class qa_frame_buffer_cc (gr_unittest.TestCase): 27 | 28 | def setUp (self): 29 | self.tb = gr.top_block () 30 | 31 | def tearDown (self): 32 | self.tb = None 33 | 34 | def test_001_t (self): 35 | # set up fg 36 | print("no test here") 37 | pass 38 | 39 | 40 | if __name__ == '__main__': 41 | gr_unittest.run(qa_frame_buffer_cc) 42 | -------------------------------------------------------------------------------- /python/qa_qpsk_mapper_if.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT) . 5 | # 6 | # This is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 3, or (at your option) 9 | # any later version. 10 | # 11 | # This software is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this software; see the file COPYING. If not, write to 18 | # the Free Software Foundation, Inc., 51 Franklin Street, 19 | # Boston, MA 02110-1301, USA. 20 | # 21 | 22 | from gnuradio import gr, gr_unittest 23 | from gnuradio import blocks 24 | import numpy as np 25 | import ieee802_15_4_swig as ieee802_15_4 26 | 27 | class qa_qpsk_mapper_if (gr_unittest.TestCase): 28 | 29 | def setUp (self): 30 | self.tb = gr.top_block () 31 | 32 | def tearDown (self): 33 | self.tb = None 34 | 35 | def test_001_t (self): 36 | # set up fg 37 | self.src_I = blocks.vector_source_i([1,-1,1,-1]) 38 | self.src_Q = blocks.vector_source_i([1,1,-1,-1]) 39 | self.qpsk_mapper = ieee802_15_4.qpsk_mapper_if() 40 | self.snk = blocks.vector_sink_f(1) 41 | self.tb.connect(self.src_I, (self.qpsk_mapper,0)) 42 | self.tb.connect(self.src_Q, (self.qpsk_mapper,1)) 43 | self.tb.connect(self.qpsk_mapper, self.snk) 44 | self.tb.run () 45 | # check data 46 | ref = [0, np.pi/2, -np.pi/2, np.pi] 47 | data = self.snk.data() 48 | self.assertFloatTuplesAlmostEqual(data, ref, 5) 49 | 50 | if __name__ == '__main__': 51 | gr_unittest.run(qa_qpsk_mapper_if) 52 | -------------------------------------------------------------------------------- /utils/rime.lua: -------------------------------------------------------------------------------- 1 | print("loading rime dissector") 2 | 3 | rime_proto = Proto("rime","Contiki Rime") 4 | -- dissect 5 | function rime_proto.dissector(buffer,pinfo,tree) 6 | pinfo.cols.protocol = "RIME" 7 | 8 | local mac_tree = tree:add(rime_proto, buffer(0, 9), "IEEE 802.15.4") 9 | local fcf_tree = mac_tree:add(rime_proto, buffer(0, 2), "Frame Control " .. tostring(buffer(0, 2))) 10 | fcf_tree:add(buffer(0,1), "Frame Type: ", buffer(0,1):bitfield(5,3)) 11 | fcf_tree:add(buffer(0,1), "Security Enabled: ", buffer(0,1):bitfield(4,1)) 12 | fcf_tree:add(buffer(0,1), "Frame Pending: ", buffer(0,1):bitfield(3,1)) 13 | fcf_tree:add(buffer(0,1), "ACK Request: ", buffer(0,1):bitfield(2,1)) 14 | fcf_tree:add(buffer(0,1), "PAN ID Compression: ", buffer(0,1):bitfield(1,1)) 15 | 16 | fcf_tree:add(buffer(0,1), "Dest. Addr. Mode: ", buffer(1,1):bitfield(6,2)) 17 | fcf_tree:add(buffer(0,1), "Frame Version: ", buffer(1,1):bitfield(4,2)) 18 | fcf_tree:add(buffer(0,1), "Src. Addr. Mode: ", buffer(1,1):bitfield(2,2)) 19 | 20 | mac_tree:add(buffer(2,1), "Sequence Number: " .. buffer(2,1):uint()) 21 | mac_tree:add(buffer(3,2),"Source PAN: " .. tostring(buffer(4,1))..tostring(buffer(3,1))) 22 | mac_tree:add(buffer(5,2),"Destination Address: " .. tostring(buffer(6,1))..tostring(buffer(5,1))) 23 | mac_tree:add(buffer(7,2),"Source Address: " .. tostring(buffer(8,1))..tostring(buffer(7,1))) 24 | mac_tree:add(buffer(buffer:len()-2, 2), "CRC: ", buffer(buffer:len()-2, 2):uint()) 25 | 26 | local rime_tree = tree:add(rime_proto, buffer(9, 4), "RIME") 27 | rime_tree:add(buffer(9,2), "Port: " .. buffer(9,2):le_uint()) 28 | rime_tree:add(buffer(11,2),"Source Address: " .. buffer(11,1):uint() .. ":" .. buffer(12,1):uint()) 29 | 30 | local data_tree = tree:add(rime_proto, buffer(13, buffer:len() - 15), "Payload") 31 | 32 | pinfo.cols.info = " Rime " .. buffer(11,1):uint()..":"..buffer(7,1):uint().. " -> port " .. buffer(9,2):le_uint() 33 | end 34 | 35 | -- get wiretap table 36 | table = DissectorTable.get("wtap_encap") 37 | -- and add rime protocol 38 | table:add(wtap["IEEE802_15_4"], rime_proto) 39 | 40 | 41 | -------------------------------------------------------------------------------- /utils/symbol_mapping.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2013 Bastian Bloessl 4 | # 5 | # This program 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 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program 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 this program. If not, see . 17 | 18 | # Section 6.5.2.3 19 | chips = [ 20 | 0b11011001110000110101001000101110, 21 | 0b11101101100111000011010100100010, 22 | 0b00101110110110011100001101010010, 23 | 0b00100010111011011001110000110101, 24 | 0b01010010001011101101100111000011, 25 | 0b00110101001000101110110110011100, 26 | 0b11000011010100100010111011011001, 27 | 0b10011100001101010010001011101101, 28 | 0b10001100100101100000011101111011, 29 | 0b10111000110010010110000001110111, 30 | 0b01111011100011001001011000000111, 31 | 0b01110111101110001100100101100000, 32 | 0b00000111011110111000110010010110, 33 | 0b01100000011101111011100011001001, 34 | 0b10010110000001110111101110001100, 35 | 0b11001001011000000111011110111000 36 | ] 37 | 38 | # reflect bits 39 | def mirror(n, bits): 40 | o = 0 41 | for i in range(bits): 42 | if(n & (1 << i)): 43 | o = o | (1 << (bits - 1 - i)) 44 | return o 45 | 46 | 47 | mapping = [] 48 | 49 | for c in range(16): 50 | # ahhhhhh endianess 51 | c = chips[mirror(c, 4)] 52 | c = mirror(c, 32) 53 | 54 | for i in range(16): 55 | rem = c % 4 56 | c = c / 4 57 | 58 | # QPSK 59 | if(rem == 0): 60 | mapping.append(-1-1j) 61 | elif (rem == 1): 62 | mapping.append( 1-1j) 63 | elif (rem == 2): 64 | mapping.append(-1+1j) 65 | elif (rem == 3): 66 | mapping.append( 1+1j) 67 | 68 | 69 | print mapping 70 | -------------------------------------------------------------------------------- /utils/udp.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2013 Bastian Bloessl 4 | # 5 | # This program 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 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program 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 this program. If not, see . 17 | 18 | import socket 19 | 20 | UDP_IP = "127.0.0.1" 21 | UDP_PORT = 52002 22 | MESSAGE = "Hello, from python!\n" 23 | 24 | print "UDP target IP:", UDP_IP 25 | print "UDP target port:", UDP_PORT 26 | print "message:", MESSAGE 27 | 28 | sock = socket.socket(socket.AF_INET, # Internet 29 | socket.SOCK_DGRAM) # UDP 30 | sock.sendto(MESSAGE, (UDP_IP, UDP_PORT)) 31 | --------------------------------------------------------------------------------