pysdrlib 0.2.1__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (457) hide show
  1. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/PKG-INFO +32 -3
  2. pysdrlib-0.3.0/README.md +66 -0
  3. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/pyproject.toml +7 -3
  4. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/setup.py +6 -6
  5. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/__init__.py +1 -1
  6. pysdrlib-0.3.0/src/pysdrlib/__main__.py +3 -0
  7. pysdrlib-0.3.0/src/pysdrlib/_ext/extio.py +22 -0
  8. pysdrlib-0.3.0/src/pysdrlib/_ext/hackrf.py +24 -0
  9. pysdrlib-0.3.0/src/pysdrlib/_ext/rtl_sdr.py +24 -0
  10. pysdrlib-0.3.0/src/pysdrlib/_ext/utils.py +208 -0
  11. pysdrlib-0.3.0/src/pysdrlib/_native/extio/extio_device.cpp +159 -0
  12. pysdrlib-0.3.0/src/pysdrlib/_native/extio/extio_device.hpp +71 -0
  13. pysdrlib-0.3.0/src/pysdrlib/_native/extio/extio_pybind.cpp +60 -0
  14. pysdrlib-0.3.0/src/pysdrlib/_native/extio/usb_guard.cpp +26 -0
  15. {pysdrlib-0.2.1/src/pysdrlib/hackrf/lib → pysdrlib-0.3.0/src/pysdrlib/_native/hackrf}/hackrf_device.cpp +7 -21
  16. {pysdrlib-0.2.1/src/pysdrlib/hackrf/lib → pysdrlib-0.3.0/src/pysdrlib/_native/hackrf}/hackrf_device.hpp +6 -11
  17. pysdrlib-0.3.0/src/pysdrlib/_native/hackrf/hackrf_pybind.cpp +122 -0
  18. pysdrlib-0.3.0/src/pysdrlib/_native/include/hardware_convert.hpp +272 -0
  19. pysdrlib-0.3.0/src/pysdrlib/_native/include/hardware_format.hpp +25 -0
  20. pysdrlib-0.3.0/src/pysdrlib/_native/include/hardware_pybind.hpp +169 -0
  21. pysdrlib-0.3.0/src/pysdrlib/_native/include/hardware_ring.hpp +164 -0
  22. pysdrlib-0.3.0/src/pysdrlib/_native/include/hardware_rx.hpp +62 -0
  23. pysdrlib-0.3.0/src/pysdrlib/_native/include/hardware_wrapper.hpp +87 -0
  24. pysdrlib-0.3.0/src/pysdrlib/_native/rtl_sdr/rtl_sdr_device.cpp +172 -0
  25. pysdrlib-0.3.0/src/pysdrlib/_native/rtl_sdr/rtl_sdr_device.hpp +81 -0
  26. pysdrlib-0.3.0/src/pysdrlib/_native/rtl_sdr/rtl_sdr_pybind.cpp +60 -0
  27. pysdrlib-0.3.0/src/pysdrlib/_native/samples/samples_pybind.cpp +99 -0
  28. pysdrlib-0.3.0/src/pysdrlib/base/buffer.py +26 -0
  29. pysdrlib-0.3.0/src/pysdrlib/base/convert.py +102 -0
  30. pysdrlib-0.3.0/src/pysdrlib/base/lib/__init__.py +1 -0
  31. pysdrlib-0.3.0/src/pysdrlib/base/native.py +88 -0
  32. pysdrlib-0.3.0/src/pysdrlib/base/watchdog.py +117 -0
  33. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/devices.py +1 -1
  34. pysdrlib-0.3.0/src/pysdrlib/err.py +27 -0
  35. pysdrlib-0.3.0/src/pysdrlib/extio/README.md +27 -0
  36. pysdrlib-0.3.0/src/pysdrlib/extio/__init__.py +4 -0
  37. pysdrlib-0.3.0/src/pysdrlib/extio/config.py +35 -0
  38. pysdrlib-0.3.0/src/pysdrlib/extio/lib/__init__.py +2 -0
  39. pysdrlib-0.3.0/src/pysdrlib/extio/lib/err.py +11 -0
  40. pysdrlib-0.3.0/src/pysdrlib/extio/rx888.py +68 -0
  41. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/CMakeLists.txt +31 -0
  42. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/.git +1 -0
  43. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/.gitattributes +63 -0
  44. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/.github/workflows/cmake.yml +219 -0
  45. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/.gitignore +271 -0
  46. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/CMakeLists.txt +82 -0
  47. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/CMakeLists.txt +67 -0
  48. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/FX3Class.h +37 -0
  49. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/PScope_uti.cpp +35 -0
  50. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/PScope_uti.h +9 -0
  51. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/RadioHandler.cpp +439 -0
  52. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/RadioHandler.h +342 -0
  53. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/FX3handler.cpp +144 -0
  54. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/FX3handler.h +49 -0
  55. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/ezusb.c +815 -0
  56. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/ezusb.h +114 -0
  57. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/logging.c +47 -0
  58. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/logging.h +43 -0
  59. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/streaming.c +406 -0
  60. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/streaming.h +65 -0
  61. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/usb_device.c +577 -0
  62. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/usb_device.h +60 -0
  63. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/linux/usb_device_internals.h +52 -0
  64. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/CyAPI/CyAPI.cpp +3359 -0
  65. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/CyAPI/CyAPI.h +602 -0
  66. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/CyAPI/CyUSB30_def.h +90 -0
  67. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/CyAPI/UsbdStatus.h +46 -0
  68. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/CyAPI/VersionNo.h +26 -0
  69. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/CyAPI/cyioctl.h +213 -0
  70. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/CyAPI/devioctl.h +184 -0
  71. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/CyAPI/usb100.h +270 -0
  72. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/CyAPI/usb200.h +111 -0
  73. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/FX3handler.cpp +409 -0
  74. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/arch/win32/FX3handler.h +73 -0
  75. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/bin2h.cmake +83 -0
  76. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/config.cpp +8 -0
  77. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/config.h +91 -0
  78. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/dsp/ringbuffer.h +205 -0
  79. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/fft_mt_r2iq.cpp +299 -0
  80. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/fft_mt_r2iq.h +128 -0
  81. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/fft_mt_r2iq_avx.cpp +9 -0
  82. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/fft_mt_r2iq_avx2.cpp +9 -0
  83. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/fft_mt_r2iq_avx512.cpp +9 -0
  84. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/fft_mt_r2iq_def.cpp +9 -0
  85. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/fft_mt_r2iq_impl.hpp +171 -0
  86. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/fft_mt_r2iq_neon.cpp +9 -0
  87. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/fir.cpp +105 -0
  88. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/fir.h +3 -0
  89. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/license.txt +28 -0
  90. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/pffft/LICENSE.txt +38 -0
  91. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/pffft/bench_mixers.c +733 -0
  92. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/pffft/fmv.h +20 -0
  93. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/pffft/pf_mixer.cpp +1148 -0
  94. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/pffft/pf_mixer.h +283 -0
  95. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/pffft/sse2neon.h +8401 -0
  96. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/r2iq.h +50 -0
  97. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/radio/BBRF103Radio.cpp +145 -0
  98. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/radio/HF103Radio.cpp +50 -0
  99. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/radio/RX888R2Radio.cpp +178 -0
  100. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/radio/RX888R3Radio.cpp +210 -0
  101. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/radio/RX888Radio.cpp +1 -0
  102. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/radio/RX999Radio.cpp +118 -0
  103. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/radio/RXLucy.cpp +120 -0
  104. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Core/radio/RadioHardware.cpp +22 -0
  105. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/CMakeLists.txt +14 -0
  106. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/Connecting.bmp +0 -0
  107. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/ExtIO_sddc.cpp +1080 -0
  108. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/ExtIO_sddc.h +92 -0
  109. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/ExtIO_sddc.ico +0 -0
  110. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/LC_ExtIO_Types.h +473 -0
  111. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/SplashWindow.cpp +327 -0
  112. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/SplashWindow.h +36 -0
  113. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/extio.def +58 -0
  114. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/framework.h +5 -0
  115. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/manifest.xml +17 -0
  116. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/resource.h +102 -0
  117. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/resource.rc +283 -0
  118. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/tdialog.cpp +531 -0
  119. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/tdialog.h +22 -0
  120. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/uti.cpp +101 -0
  121. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/ExtIO_sddc/uti.h +29 -0
  122. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/HWSDRtable.h +44 -0
  123. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/Interface.h +154 -0
  124. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/LICENSE.txt +23 -0
  125. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/README.md +186 -0
  126. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/.cproject +884 -0
  127. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/.project +81 -0
  128. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/Application.h +140 -0
  129. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/DebugConsole.c +330 -0
  130. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/RunApplication.c +341 -0
  131. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/SDDC_GPIF/SDDC_GPIF.cyfx +30 -0
  132. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/SDDC_GPIF/projectfiles/gpif2model.xml +137 -0
  133. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/SDDC_GPIF/projectfiles/gpif2timingsimulation.xml +9 -0
  134. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/SDDC_GPIF/projectfiles/gpif2view.xml +260 -0
  135. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/SDDC_GPIF.h +173 -0
  136. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/StartStopApplication.c +163 -0
  137. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/StartUP.c +89 -0
  138. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/Support.c +165 -0
  139. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/USBdescriptor.c +347 -0
  140. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/USBhandler.c +648 -0
  141. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/cyfx_gcc_startup.S +56 -0
  142. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/cyfxtx.c +1187 -0
  143. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/driver/Si5351.c +263 -0
  144. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/driver/Si5351.h +6 -0
  145. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/driver/adf4351.c +450 -0
  146. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/driver/adf4351.h +197 -0
  147. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/driver/rd5815.c +286 -0
  148. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/driver/rd5815.h +8 -0
  149. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/driver/tuner_r82xx.c +2416 -0
  150. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/driver/tuner_r82xx.h +189 -0
  151. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/i2cmodule.c +89 -0
  152. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/i2cmodule.h +29 -0
  153. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/makefile +110 -0
  154. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/pcal6408a.c +37 -0
  155. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/pcal6408a.h +7 -0
  156. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/radio/bbrf103.c +42 -0
  157. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/radio/hf103.c +63 -0
  158. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/radio/radio.h +35 -0
  159. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/radio/rx888.c +43 -0
  160. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/radio/rx888r2.c +99 -0
  161. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/radio/rx888r3.c +135 -0
  162. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/radio/rx999.c +217 -0
  163. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3/radio/rxlucy.c +97 -0
  164. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDDC_FX3.img +0 -0
  165. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/cx3_build_config.mak +104 -0
  166. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/cyfx3.scat +67 -0
  167. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/cyfx_gcc_startup.S +56 -0
  168. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/cyfx_startup.S +77 -0
  169. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/cyfxcppsyscall.cpp +163 -0
  170. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/cyfxtx.c +1187 -0
  171. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/cyfxtx.cpp +1154 -0
  172. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/fx3.ld +118 -0
  173. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/fx3_256k.ld +119 -0
  174. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/fx3_512k.ld +118 -0
  175. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/fx3_armg++_config.mak +62 -0
  176. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/fx3_armgcc_config.mak +68 -0
  177. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/fx3_armrvds_config.mak +53 -0
  178. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/fx3_build_config.mak +105 -0
  179. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/fx3_def.xml +40 -0
  180. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_build/fx3_fw/fx3cpp.ld +134 -0
  181. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyfx3_api.h +832 -0
  182. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyfxapidesc.h +878 -0
  183. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyfxversion.h +60 -0
  184. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3cardmgr.h +719 -0
  185. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3cardmgr_fx3s.h +333 -0
  186. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3descriptor.h +310 -0
  187. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3dma.h +2430 -0
  188. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3error.h +155 -0
  189. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3externcend.h +32 -0
  190. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3externcstart.h +33 -0
  191. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3gpif.h +887 -0
  192. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3gpio.h +782 -0
  193. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3i2c.h +575 -0
  194. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3i2s.h +370 -0
  195. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3imagesensor.h +74 -0
  196. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3lpp.h +507 -0
  197. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3mbox.h +184 -0
  198. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3mipicsi.h +886 -0
  199. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3mmu.h +494 -0
  200. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3os.h +2486 -0
  201. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3pib.h +674 -0
  202. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3sib.h +1325 -0
  203. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3sibpp.h +267 -0
  204. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3socket.h +464 -0
  205. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3spi.h +529 -0
  206. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3system.h +1292 -0
  207. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3tx.h +407 -0
  208. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3types.h +97 -0
  209. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3uart.h +434 -0
  210. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3usb.h +2015 -0
  211. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3usbconst.h +240 -0
  212. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3usbhost.h +762 -0
  213. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3usbotg.h +555 -0
  214. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3utils.h +294 -0
  215. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/cyu3vic.h +290 -0
  216. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/gpif_regs.h +2110 -0
  217. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/gpio_regs.h +473 -0
  218. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/i2c_regs.h +733 -0
  219. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/i2s_regs.h +526 -0
  220. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/pib_regs.h +2518 -0
  221. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/pp_regs.h +928 -0
  222. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/sock_regs.h +708 -0
  223. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/spi_regs.h +534 -0
  224. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/tx_api.h +1294 -0
  225. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/tx_port.h +348 -0
  226. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/tx_user.h +211 -0
  227. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/fw_lib/1_3_4/inc/uart_regs.h +600 -0
  228. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/license/license.txt +256 -0
  229. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/util/elf2img/elf2img.c +418 -0
  230. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SDK/util/elf2img/readme.txt +102 -0
  231. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SoapySDDC/CMakeLists.txt +26 -0
  232. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SoapySDDC/Registration.cpp +35 -0
  233. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SoapySDDC/Settings.cpp +593 -0
  234. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SoapySDDC/SoapySDDC.hpp +170 -0
  235. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/SoapySDDC/Streaming.cpp +190 -0
  236. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/cmake/CheckGit.cmake +81 -0
  237. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/cmake/git_version.cpp.in +2 -0
  238. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/cmake/git_version.h +7 -0
  239. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/BBRF103/BBRF103_posts_2017_2020.pdf +0 -0
  240. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/BBRF103/RC1_2017/BBRF103TopPCBview.pdf +0 -0
  241. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/BBRF103/RC1_2017/BBRF103_scheme.pdf +0 -0
  242. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/BBRF103/RC1_2017/BBRF103bottomPCBview.pdf +0 -0
  243. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/BBRF103/RC1_2017/BLOCKscheme01.pdf +0 -0
  244. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/BBRF103/RC2_2018/BBRF103_2B.pdf +0 -0
  245. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/BBRF103/RC3_2018/BBRF103-RC3.brd +9130 -0
  246. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/BBRF103/RC3_2018/BBRF103-RC3.sch +16165 -0
  247. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/BBRF103/RC3_2018/BBRF103.ods +0 -0
  248. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/BBRF103/RC3_2018/License.txt +7 -0
  249. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/Filters/2m_PBF_rev1.pdf +0 -0
  250. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/Filters/2m_PBF_rev1.zip +0 -0
  251. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/README.md +17 -0
  252. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/RF103/HF103_7A.pdf +0 -0
  253. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/RX888/BSMT.pdf +0 -0
  254. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/RX888/README.md +10 -0
  255. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/RX888/TSMT.pdf +0 -0
  256. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/hardware/RX888/rx888-v1.0-20200515.pdf +0 -0
  257. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/libsddc/CMakeLists.txt +27 -0
  258. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/libsddc/libsddc.cpp +396 -0
  259. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/libsddc/libsddc.h +171 -0
  260. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/libsddc/sddc_stream_test.c +219 -0
  261. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/libsddc/sddc_test.c +104 -0
  262. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/libsddc/sddc_vhf_stream_test.c +238 -0
  263. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/libsddc/wavehdr.h +102 -0
  264. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/libsddc/wavewrite.c +232 -0
  265. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/libsddc/wavewrite.h +55 -0
  266. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/unittest/CMakeLists.txt +44 -0
  267. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/unittest/core_test.cpp +185 -0
  268. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/unittest/ringbuffer_test.cpp +177 -0
  269. pysdrlib-0.3.0/src/pysdrlib/extio/vendor/ExtIO_sddc/unittest/unittests.cpp +4 -0
  270. pysdrlib-0.3.0/src/pysdrlib/hackrf/__init__.py +4 -0
  271. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/hackrf/hackrf.py +6 -33
  272. pysdrlib-0.3.0/src/pysdrlib/remote/__init__.py +16 -0
  273. pysdrlib-0.3.0/src/pysdrlib/remote/cli.py +189 -0
  274. pysdrlib-0.3.0/src/pysdrlib/remote/client.py +350 -0
  275. pysdrlib-0.3.0/src/pysdrlib/remote/protocol.py +153 -0
  276. pysdrlib-0.3.0/src/pysdrlib/remote/server.py +407 -0
  277. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/README.md +26 -0
  278. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/__init__.py +4 -0
  279. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/config.py +35 -0
  280. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/lib/__init__.py +2 -0
  281. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/lib/err.py +17 -0
  282. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/rtlsdr.py +69 -0
  283. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/CMakeLists.txt +33 -0
  284. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/.git +1 -0
  285. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/.github/FUNDING.yml +1 -0
  286. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/.gitignore +43 -0
  287. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/.travis.yml +10 -0
  288. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/AUTHORS +4 -0
  289. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/CMakeLists.txt +221 -0
  290. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/COPYING +339 -0
  291. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/Doxyfile.in +1716 -0
  292. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/Makefile.am +49 -0
  293. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/README +6 -0
  294. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/cmake/Modules/Version.cmake +60 -0
  295. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/cmake/cmake_uninstall.cmake.in +32 -0
  296. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/cmake/rtlsdrConfig.cmake +8 -0
  297. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/configure.ac +119 -0
  298. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/contrib/jenkins.sh +51 -0
  299. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/README.Debian +55 -0
  300. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/changelog +273 -0
  301. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/compat +1 -0
  302. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/control +53 -0
  303. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/copyright +251 -0
  304. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/copyright-scan-patterns.yml +3 -0
  305. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/heatmap.py +134 -0
  306. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/librtlsdr-dev.acc +27 -0
  307. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/librtlsdr-dev.dirs +2 -0
  308. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/librtlsdr-dev.install +5 -0
  309. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/librtlsdr0.dirs +2 -0
  310. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/librtlsdr0.install +2 -0
  311. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/librtlsdr0.maintscript +1 -0
  312. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/librtlsdr0.udev +139 -0
  313. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/org.osmocom.librtlsdr.metainfo.xml +58 -0
  314. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl-sdr-blacklist.conf +6 -0
  315. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl-sdr.dirs +1 -0
  316. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl-sdr.examples +1 -0
  317. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl-sdr.install +1 -0
  318. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl-sdr.manpages +8 -0
  319. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl_adsb.1 +70 -0
  320. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl_biast.1 +50 -0
  321. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl_eeprom.1 +65 -0
  322. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl_fm.1 +103 -0
  323. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl_power.1 +176 -0
  324. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl_sdr.1 +73 -0
  325. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl_tcp.1 +81 -0
  326. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rtl_test.1 +60 -0
  327. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/rules +18 -0
  328. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/source/format +1 -0
  329. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/debian/watch +4 -0
  330. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/git-version-gen +151 -0
  331. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/CMakeLists.txt +27 -0
  332. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/Makefile.am +5 -0
  333. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/reg_field.h +60 -0
  334. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/rtl-sdr.h +407 -0
  335. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/rtl-sdr_export.h +47 -0
  336. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/rtlsdr_i2c.h +10 -0
  337. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/tuner_e4k.h +222 -0
  338. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/tuner_fc0012.h +36 -0
  339. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/tuner_fc0013.h +37 -0
  340. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/tuner_fc2580.h +127 -0
  341. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/include/tuner_r82xx.h +120 -0
  342. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/librtlsdr.pc.in +11 -0
  343. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/m4/.gitignore +2 -0
  344. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/rtl-sdr.rules +142 -0
  345. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/CMakeLists.txt +171 -0
  346. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/Makefile.am +36 -0
  347. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/convenience/convenience.c +308 -0
  348. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/convenience/convenience.h +142 -0
  349. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/getopt/getopt.c +1059 -0
  350. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/getopt/getopt.h +180 -0
  351. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/librtlsdr.c +2057 -0
  352. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/rtl_adsb.c +508 -0
  353. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/rtl_biast.c +101 -0
  354. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/rtl_eeprom.c +426 -0
  355. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/rtl_fm.c +1294 -0
  356. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/rtl_power.c +1016 -0
  357. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/rtl_sdr.c +289 -0
  358. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/rtl_tcp.c +670 -0
  359. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/rtl_test.c +458 -0
  360. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/rtlsdr.rc.in +34 -0
  361. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/tuner_e4k.c +1000 -0
  362. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/tuner_fc0012.c +333 -0
  363. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/tuner_fc0013.c +500 -0
  364. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/tuner_fc2580.c +494 -0
  365. pysdrlib-0.3.0/src/pysdrlib/rtl_sdr/vendor/librtlsdr/src/tuner_r82xx.c +1427 -0
  366. pysdrlib-0.3.0/src/pysdrlib/warn.py +11 -0
  367. pysdrlib-0.3.0/src/pysdrlib.egg-info/SOURCES.txt +435 -0
  368. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/bench/README.md +2 -1
  369. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/bench/run.py +16 -5
  370. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/bench/suite.py +93 -48
  371. pysdrlib-0.3.0/tests/bench/vs_numpy.py +114 -0
  372. pysdrlib-0.3.0/tests/conftest.py +37 -0
  373. pysdrlib-0.3.0/tests/devices.py +198 -0
  374. pysdrlib-0.2.1/src/pysdrlib/base/buffer.py → pysdrlib-0.3.0/tests/reference/buffer_numpy.py +2 -0
  375. pysdrlib-0.2.1/src/pysdrlib/base/convert.py → pysdrlib-0.3.0/tests/reference/convert_numpy.py +5 -0
  376. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/test_agnostic.py +2 -2
  377. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/test_benchmarks.py +1 -1
  378. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/test_buffer.py +4 -6
  379. pysdrlib-0.3.0/tests/test_device_contract.py +333 -0
  380. pysdrlib-0.3.0/tests/test_ext_loader.py +280 -0
  381. pysdrlib-0.3.0/tests/test_extio_api.py +62 -0
  382. pysdrlib-0.3.0/tests/test_extio_ext.py +140 -0
  383. pysdrlib-0.3.0/tests/test_hackrf_api.py +103 -0
  384. pysdrlib-0.3.0/tests/test_hackrf_ext.py +163 -0
  385. pysdrlib-0.3.0/tests/test_native_contract.py +399 -0
  386. pysdrlib-0.3.0/tests/test_native_integration.py +177 -0
  387. pysdrlib-0.3.0/tests/test_remote.py +387 -0
  388. pysdrlib-0.3.0/tests/test_rtl_sdr_api.py +89 -0
  389. pysdrlib-0.3.0/tests/test_rtl_sdr_ext.py +97 -0
  390. pysdrlib-0.3.0/tests/test_samples_native.py +270 -0
  391. pysdrlib-0.3.0/tests/test_watchdog.py +266 -0
  392. pysdrlib-0.2.1/README.md +0 -40
  393. pysdrlib-0.2.1/src/pysdrlib/_ext/hackrf.py +0 -164
  394. pysdrlib-0.2.1/src/pysdrlib/_ext/hardware_wrapper.hpp +0 -59
  395. pysdrlib-0.2.1/src/pysdrlib/_ext/utils.py +0 -19
  396. pysdrlib-0.2.1/src/pysdrlib/err.py +0 -12
  397. pysdrlib-0.2.1/src/pysdrlib/extio/README.md +0 -8
  398. pysdrlib-0.2.1/src/pysdrlib/extio/config.py +0 -9
  399. pysdrlib-0.2.1/src/pysdrlib/extio/rx888.py +0 -10
  400. pysdrlib-0.2.1/src/pysdrlib/hackrf/__init__.py +0 -28
  401. pysdrlib-0.2.1/src/pysdrlib/hackrf/lib/hackrf_pybind.cpp +0 -203
  402. pysdrlib-0.2.1/src/pysdrlib/rtl_sdr/README.md +0 -10
  403. pysdrlib-0.2.1/src/pysdrlib/rtl_sdr/__init__.py +0 -2
  404. pysdrlib-0.2.1/src/pysdrlib/rtl_sdr/config.py +0 -9
  405. pysdrlib-0.2.1/src/pysdrlib/rtl_sdr/rtlsdr.py +0 -10
  406. pysdrlib-0.2.1/src/pysdrlib/warn.py +0 -7
  407. pysdrlib-0.2.1/src/pysdrlib.egg-info/SOURCES.txt +0 -79
  408. pysdrlib-0.2.1/tests/test_hackrf_api.py +0 -324
  409. pysdrlib-0.2.1/tests/test_hackrf_ext.py +0 -320
  410. pysdrlib-0.2.1/tests/test_hackrf_loader.py +0 -238
  411. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/LICENSE +0 -0
  412. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/MANIFEST.in +0 -0
  413. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/setup.cfg +0 -0
  414. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/UHD/README.md +0 -0
  415. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/UHD/__init__.py +0 -0
  416. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/UHD/b210.py +0 -0
  417. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/UHD/config.py +0 -0
  418. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/_ext/__init__.py +0 -0
  419. {pysdrlib-0.2.1/src/pysdrlib/_ext → pysdrlib-0.3.0/src/pysdrlib/_native/include}/hardware_numpy.hpp +0 -0
  420. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/base/__init__.py +0 -0
  421. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/base/config.py +0 -0
  422. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/base/device.py +0 -0
  423. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/base/formats.py +0 -0
  424. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/base/io.py +0 -0
  425. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/bladerf/README.md +0 -0
  426. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/bladerf/__init__.py +0 -0
  427. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/bladerf/bladerf.py +0 -0
  428. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/bladerf/config.py +0 -0
  429. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/file/__init__.py +0 -0
  430. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/file/err.py +0 -0
  431. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/file/file.py +0 -0
  432. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/hackrf/README.md +0 -0
  433. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/hackrf/config.py +0 -0
  434. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/hackrf/lib/__init__.py +0 -0
  435. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/hackrf/lib/err.py +0 -0
  436. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/cmake/cmake_uninstall.cmake.in +0 -0
  437. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/cmake/modules/FindFFTW3f.cmake +0 -0
  438. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/cmake/modules/FindLIBUSB.cmake +0 -0
  439. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/cmake/set_release.cmake +0 -0
  440. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/libhackrf/53-hackrf.rules +0 -0
  441. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/libhackrf/53-hackrf.rules.in +0 -0
  442. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/libhackrf/CMakeLists.txt +0 -0
  443. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/libhackrf/HackRFConfig.cmake +0 -0
  444. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/libhackrf/libhackrf.pc.in +0 -0
  445. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/libhackrf/src/CMakeLists.txt +0 -0
  446. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/libhackrf/src/hackrf.c +0 -0
  447. {pysdrlib-0.2.1/src/pysdrlib/hackrf/_build → pysdrlib-0.3.0/src/pysdrlib/hackrf/vendor}/libhackrf/src/hackrf.h +0 -0
  448. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/logger.py +0 -0
  449. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/sim/__init__.py +0 -0
  450. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/sim/config.py +0 -0
  451. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/src/pysdrlib/sim/sim.py +0 -0
  452. {pysdrlib-0.2.1/src/pysdrlib/extio → pysdrlib-0.3.0/tests/reference}/__init__.py +0 -0
  453. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/test_convert.py +0 -0
  454. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/test_file.py +0 -0
  455. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/test_formats.py +0 -0
  456. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/test_io.py +0 -0
  457. {pysdrlib-0.2.1 → pysdrlib-0.3.0}/tests/test_sim.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pysdrlib
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: wrapper for hardware SDRs
5
5
  Author-email: Anonoei <to+dev@an0.us>
6
6
  Project-URL: Homepage, https://github.com/Anonoei/pysdrlib
@@ -24,8 +24,11 @@ Requires-Python: >=3.12
24
24
  Description-Content-Type: text/markdown
25
25
  License-File: LICENSE
26
26
  Requires-Dist: numpy
27
+ Provides-Extra: remote
28
+ Requires-Dist: pyzmq; extra == "remote"
27
29
  Provides-Extra: dev
28
30
  Requires-Dist: setuptools; extra == "dev"
31
+ Requires-Dist: pyzmq; extra == "dev"
29
32
  Requires-Dist: twine; extra == "dev"
30
33
  Requires-Dist: build; extra == "dev"
31
34
  Requires-Dist: cython; extra == "dev"
@@ -51,11 +54,11 @@ with minimal user intervention.
51
54
  Other projects, like SoapySDR, are likely what you're looking for.
52
55
 
53
56
  # Roadmap
54
- - [ ] [RTL-SDR](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/rtl_sdr)
57
+ - [X] [RTL-SDR](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/rtl_sdr)
55
58
  - [X] [Hack RF](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/hackrf)
56
59
  - [ ] [Blade RF](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/bladerf)
57
60
  - [ ] [B210 (UHD)](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/UHD)
58
- - [ ] [RX-888 (extio)](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/extio)
61
+ - [X] [RX-888 (extio)](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/extio)
59
62
 
60
63
  ## Usage
61
64
  Dynamic imports
@@ -71,6 +74,32 @@ import pysdrlib.rtl_sdr
71
74
  sdr = pysdrlib.rtl_sdr.Device() # Initialize sdr
72
75
  ```
73
76
 
77
+ ### Remote devices
78
+ Host SDRs on one machine and use them from another (`pip install pysdrlib[remote]`, uses ZeroMQ).
79
+
80
+ ```
81
+ pysdrlib server --bind tcp://0.0.0.0:5555 --port-range 6000-6100
82
+ pysdrlib client tcp://host:5555 list
83
+ pysdrlib client tcp://host:5555 rx hackrf --freq 100e6 --rate 10e6 -t 5 -o out.cfile
84
+ ```
85
+ ```python
86
+ sdr = pysdrlib.device("remote", "tcp://host:5555", "hackrf") # same API as a local device
87
+ sdr.open(); sdr.initialize(cf=100e6, Fs=10e6); sdr.start_rx()
88
+ samples = sdr.get_samples()
89
+ ```
90
+ One client controls a device; any number can attach as viewers (`pysdrlib.device("remote", addr, id="hackrf-0")`) to receive samples.
91
+
92
+ ### Stalls and dropped samples
93
+ Hardware devices watch their own stream each time you call `get_samples()`:
94
+ ```python
95
+ try:
96
+ samples = sdr.get_samples()
97
+ except pysdrlib.err.StreamStalled: # no samples for sdr.stall_timeout seconds (default 1, None disables)
98
+ sdr.stop_rx(); sdr.start_rx() # or close and reopen the device
99
+ print(sdr.stats) # samples delivered, dropped, missing, stalls, and seconds since the last samples
100
+ ```
101
+ Samples lost because `get_samples()` wasn't called often enough, or because the device delivered fewer than its sample rate requires, raise a `pysdrlib.warn.Dropped` warning. Anything still buffered when a stall is detected is returned first.
102
+
74
103
  # Contributing
75
104
  1. `git clone https://github.com/Anonoei/pysdrlib`
76
105
  2. `cd pysdrlib`
@@ -0,0 +1,66 @@
1
+ # pysdrlib
2
+ Python wrappers for hardware SDRs
3
+
4
+ - [Documentation](https://anonoei.github.io/pysdrlib/)
5
+ - [PyPI](https://pypi.org/project/pysdrlib/)
6
+
7
+ ## Notes
8
+ - No affiliation to the fantastic [pysdr](https://pysdr.org) page
9
+ - For a more robust C implementation, check [SoapySDR](https://github.com/pothosware/SoapySDR)
10
+
11
+ This serves as a lightweight backend for my [pyspecan](https://github.com/Anonoei/pyspecan) and [RPPS](https://github.com/Anonoei/RPPS) projects,
12
+ with minimal user intervention.
13
+ Other projects, like SoapySDR, are likely what you're looking for.
14
+
15
+ # Roadmap
16
+ - [X] [RTL-SDR](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/rtl_sdr)
17
+ - [X] [Hack RF](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/hackrf)
18
+ - [ ] [Blade RF](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/bladerf)
19
+ - [ ] [B210 (UHD)](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/UHD)
20
+ - [X] [RX-888 (extio)](https://github.com/Anonoei/pysdrlib/tree/main/src/pysdrlib/extio)
21
+
22
+ ## Usage
23
+ Dynamic imports
24
+ ```
25
+ import pysdrlib
26
+ print(pysdrlib.devices.ls()) # Print available device interfaces
27
+ sdr = pysdrlib.devices.get("rtl_sdr").Device() # Initialize sdr
28
+ sdr.open()
29
+ ```
30
+ Static imports
31
+ ```
32
+ import pysdrlib.rtl_sdr
33
+ sdr = pysdrlib.rtl_sdr.Device() # Initialize sdr
34
+ ```
35
+
36
+ ### Remote devices
37
+ Host SDRs on one machine and use them from another (`pip install pysdrlib[remote]`, uses ZeroMQ).
38
+
39
+ ```
40
+ pysdrlib server --bind tcp://0.0.0.0:5555 --port-range 6000-6100
41
+ pysdrlib client tcp://host:5555 list
42
+ pysdrlib client tcp://host:5555 rx hackrf --freq 100e6 --rate 10e6 -t 5 -o out.cfile
43
+ ```
44
+ ```python
45
+ sdr = pysdrlib.device("remote", "tcp://host:5555", "hackrf") # same API as a local device
46
+ sdr.open(); sdr.initialize(cf=100e6, Fs=10e6); sdr.start_rx()
47
+ samples = sdr.get_samples()
48
+ ```
49
+ One client controls a device; any number can attach as viewers (`pysdrlib.device("remote", addr, id="hackrf-0")`) to receive samples.
50
+
51
+ ### Stalls and dropped samples
52
+ Hardware devices watch their own stream each time you call `get_samples()`:
53
+ ```python
54
+ try:
55
+ samples = sdr.get_samples()
56
+ except pysdrlib.err.StreamStalled: # no samples for sdr.stall_timeout seconds (default 1, None disables)
57
+ sdr.stop_rx(); sdr.start_rx() # or close and reopen the device
58
+ print(sdr.stats) # samples delivered, dropped, missing, stalls, and seconds since the last samples
59
+ ```
60
+ Samples lost because `get_samples()` wasn't called often enough, or because the device delivered fewer than its sample rate requires, raise a `pysdrlib.warn.Dropped` warning. Anything still buffered when a stall is detected is returned first.
61
+
62
+ # Contributing
63
+ 1. `git clone https://github.com/Anonoei/pysdrlib`
64
+ 2. `cd pysdrlib`
65
+ 3. `git branch -c feature/<your feature>`
66
+ 4. `python3 builder.py -b -l` build and install locally
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pysdrlib"
7
- version = "0.2.1"
7
+ version = "0.3.0"
8
8
  description = "wrapper for hardware SDRs"
9
9
  readme = "README.md"
10
10
  license-files = ["LICENSE"]
@@ -32,7 +32,11 @@ keywords = ["anonoei", "sdr"]
32
32
  dependencies = ["numpy"]
33
33
 
34
34
  [project.optional-dependencies]
35
- dev = ["setuptools", "twine", "build", "cython", "pybind11", "bumpver", "pytest", "pdoc3", "matplotlib"]
35
+ remote = ["pyzmq"]
36
+ dev = ["setuptools", "pyzmq", "twine", "build", "cython", "pybind11", "bumpver", "pytest", "pdoc3", "matplotlib"]
37
+
38
+ [project.scripts]
39
+ pysdrlib = "pysdrlib.remote.cli:main"
36
40
 
37
41
  [project.urls]
38
42
  Homepage = "https://github.com/Anonoei/pysdrlib"
@@ -43,7 +47,7 @@ Source = "https://github.com/anonoei/pysdrlib"
43
47
 
44
48
 
45
49
  [tool.bumpver]
46
- current_version = "0.2.1"
50
+ current_version = "0.3.0"
47
51
  version_pattern = "MAJOR.MINOR.PATCH"
48
52
  commit_message = "bump version {old_version} -> {new_version}"
49
53
  tag_message = "{new_version}"
@@ -1,4 +1,3 @@
1
- import os
2
1
  import sys
3
2
  from pathlib import Path
4
3
 
@@ -7,17 +6,18 @@ from setuptools import setup
7
6
  # python3 setup.py build_ext --inplace
8
7
 
9
8
  sys.path.insert(0, str(Path(__file__).parent / "src"))
9
+ import pysdrlib._ext.utils as ext_utils # noqa: E402
10
10
  import pysdrlib._ext.hackrf as ext_hackrf # noqa: E402
11
+ import pysdrlib._ext.extio as ext_extio # noqa: E402
12
+ import pysdrlib._ext.rtl_sdr as ext_rtl_sdr # noqa: E402
11
13
 
12
14
  ext_modules = [
15
+ ext_utils.samples_extension(),
13
16
  ext_hackrf.get(),
17
+ ext_extio.get(),
18
+ ext_rtl_sdr.get(),
14
19
  ]
15
20
 
16
- # extio is in early development; opt in with PYSDRLIB_EXTIO=1
17
- if os.environ.get("PYSDRLIB_EXTIO") == "1":
18
- import pysdrlib._ext.extio as ext_extio # noqa: E402
19
- ext_modules.append(ext_extio.get())
20
-
21
21
  setup(
22
22
  name="pysdrlib",
23
23
  include_package_data=True,
@@ -8,7 +8,7 @@ Github: https://github.com/Anonoei/pysdrlib
8
8
  PyPI: https://pypi.org/project/pysdrlib/
9
9
  """
10
10
 
11
- __version__ = "0.2.1"
11
+ __version__ = "0.3.0"
12
12
  __author__ = "Anonoei <to+dev@an0.cx>"
13
13
 
14
14
  from . import err
@@ -0,0 +1,3 @@
1
+ from .remote.cli import main
2
+
3
+ main()
@@ -0,0 +1,22 @@
1
+ """Build and load helpers for the RX888 (ExtIO_sddc) extension.
2
+
3
+ Like HackRF, the extension is compiled WITHOUT linking the vendor library, so packaging never builds
4
+ it. `libsddc_core` (ExtIO_sddc's Core, built as a shared library) is found or built on the user's
5
+ machine the first time `pysdrlib.extio` is imported; see `utils.VendorLibrary`.
6
+ """
7
+ from . import utils
8
+
9
+ LIB = utils.VendorLibrary(
10
+ name="sddc_core",
11
+ source=utils.PATH_MOD / "extio" / "vendor", # CMake project wrapping the vendored ExtIO_sddc/Core
12
+ files=("libsddc_core.so", "libsddc_core.dylib"),
13
+ missing_hints=("sddc",),
14
+ help=("Install cmake, a C++17 compiler and the libusb-1.0 and fftw3f development files (e.g. "
15
+ "`apt install cmake libusb-1.0-0-dev libfftw3-dev`) so pysdrlib can build its bundled copy."),
16
+ )
17
+
18
+ mk_lib = LIB.build
19
+ load_library = LIB.load
20
+
21
+ def get():
22
+ return utils.pybind_extension("extio", "src/pysdrlib/extio/vendor/ExtIO_sddc/Core", "RadioHandler.h")
@@ -0,0 +1,24 @@
1
+ """Build and load helpers for the HackRF extension.
2
+
3
+ The extension is compiled WITHOUT linking libhackrf (only the vendored hackrf.h is needed), so
4
+ packaging never builds or needs the library and wheels build anywhere. libhackrf is found or built on
5
+ the user's machine the first time `pysdrlib.hackrf` is imported; see `utils.VendorLibrary`.
6
+ """
7
+ from . import utils
8
+
9
+ LIB = utils.VendorLibrary(
10
+ name="hackrf",
11
+ source=utils.PATH_MOD / "hackrf" / "vendor" / "libhackrf", # vendored libhackrf (CMake project)
12
+ files=("libhackrf.so.0", "libhackrf.so", "libhackrf.0.dylib", "libhackrf.dylib", "hackrf.dll"),
13
+ build_globs=("libhackrf.so*", "libhackrf*.dylib", "hackrf.dll"),
14
+ missing_hints=("libhackrf", "hackrf_"),
15
+ help=("Install libhackrf from your package manager (e.g. `apt install libhackrf0`), or install "
16
+ "cmake and the libusb-1.0 development files (e.g. `apt install cmake libusb-1.0-0-dev`) "
17
+ "so pysdrlib can build its bundled copy."),
18
+ )
19
+
20
+ mk_lib = LIB.build
21
+ load_library = LIB.load
22
+
23
+ def get():
24
+ return utils.pybind_extension("hackrf", "src/pysdrlib/hackrf/vendor/libhackrf/src", "hackrf.h")
@@ -0,0 +1,24 @@
1
+ """Build and load helpers for the RTL-SDR extension.
2
+
3
+ Like HackRF, the extension is compiled WITHOUT linking librtlsdr (only the vendored rtl-sdr.h is needed),
4
+ so packaging never builds the library. librtlsdr is found or built on the user's machine the first time
5
+ `pysdrlib.rtl_sdr` is imported; see `utils.VendorLibrary`.
6
+ """
7
+ from . import utils
8
+
9
+ LIB = utils.VendorLibrary(
10
+ name="rtlsdr",
11
+ source=utils.PATH_MOD / "rtl_sdr" / "vendor", # CMake project wrapping the vendored librtlsdr
12
+ files=("librtlsdr.so.0", "librtlsdr.so", "librtlsdr.0.dylib", "librtlsdr.dylib", "rtlsdr.dll"),
13
+ build_globs=("librtlsdr.so*", "librtlsdr*.dylib", "rtlsdr.dll"),
14
+ missing_hints=("librtlsdr", "rtlsdr_"),
15
+ help=("Install librtlsdr from your package manager (e.g. `apt install librtlsdr0`), or install "
16
+ "cmake and the libusb-1.0 development files (e.g. `apt install cmake libusb-1.0-0-dev`) "
17
+ "so pysdrlib can build its bundled copy."),
18
+ )
19
+
20
+ mk_lib = LIB.build
21
+ load_library = LIB.load
22
+
23
+ def get():
24
+ return utils.pybind_extension("rtl_sdr", "src/pysdrlib/rtl_sdr/vendor/librtlsdr/include", "rtl-sdr.h")
@@ -0,0 +1,208 @@
1
+ import ctypes
2
+ import ctypes.util
3
+ import importlib
4
+ import os
5
+ import shutil
6
+ import subprocess
7
+ import sys
8
+ import tempfile
9
+ from dataclasses import dataclass
10
+ from pathlib import Path
11
+
12
+ PATH_MOD = Path(__file__).parent.parent
13
+ PATH_LIB = PATH_MOD / "_ext" / "cache"
14
+
15
+ def rmdir(path: Path):
16
+ for file in path.iterdir():
17
+ if file.is_dir():
18
+ rmdir(file)
19
+ continue
20
+ file.unlink()
21
+ path.rmdir()
22
+
23
+ def is_installed(lib_name):
24
+ libc_path = ctypes.util.find_library(lib_name)
25
+ if libc_path is None:
26
+ return False
27
+ return True
28
+
29
+
30
+ # ------------------------------------------------------------------ vendor libraries, found or built on the host
31
+ # A device's compiled extension leaves the vendor library's symbols undefined (packaging never builds or
32
+ # links it). `VendorLibrary.load` makes them available when the device package is first imported:
33
+ #
34
+ # 1. the system library, if installed
35
+ # 2. a copy previously built from the vendored sources
36
+ # 3. otherwise build one now from the vendored sources (cmake, no network) and cache it
37
+
38
+ def user_cache(name: str) -> Path:
39
+ """Per-user directory for the library pysdrlib builds (override the root with PYSDRLIB_CACHE)"""
40
+ if os.environ.get("PYSDRLIB_CACHE"):
41
+ return Path(os.environ["PYSDRLIB_CACHE"]) / name
42
+ if sys.platform == "win32":
43
+ base = Path(os.environ.get("LOCALAPPDATA", Path.home() / "AppData" / "Local"))
44
+ else:
45
+ base = Path(os.environ.get("XDG_CACHE_HOME", Path.home() / ".cache"))
46
+ return base / "pysdrlib" / name
47
+
48
+ def load_global(path):
49
+ # RTLD_GLOBAL so the extension's undefined symbols resolve against it
50
+ ctypes.CDLL(str(path), mode=getattr(ctypes, "RTLD_GLOBAL", 0))
51
+
52
+ def writable(path: Path) -> bool:
53
+ """True if `path` (or the nearest existing parent) can be written"""
54
+ while not path.exists() and path != path.parent:
55
+ path = path.parent
56
+ return os.access(path, os.W_OK)
57
+
58
+
59
+ @dataclass
60
+ class VendorLibrary:
61
+ """A vendor library a device's extension needs, and how to find or build it"""
62
+ name: str # `ctypes.util.find_library` name, and the cache directory
63
+ source: Path # CMake project that builds it
64
+ files: tuple # file names that are the library, preferred first
65
+ help: str # what to tell the user when it can't be built
66
+ build_globs: tuple = () # CMake output to cache (default: `files`)
67
+ missing_hints: tuple = () # in an ImportError: the extension loaded but this library didn't
68
+
69
+ def cache_dirs(self):
70
+ """Where a built library may live: next to the package (dev checkouts), then the user cache"""
71
+ return [PATH_LIB / self.name, user_cache(self.name)]
72
+
73
+ def find_cached(self):
74
+ """Path of a previously built library, or None"""
75
+ for directory in self.cache_dirs():
76
+ for file in self.files:
77
+ if (directory / file).exists():
78
+ return directory / file
79
+ return None
80
+
81
+ def is_missing(self, exc: ImportError) -> bool:
82
+ """True if `exc` means the extension is there but this library's symbols aren't"""
83
+ msg = str(exc).lower()
84
+ return any(s in msg for s in ("undefined symbol", "symbol not found", "dll load failed", *self.missing_hints))
85
+
86
+ def build(self) -> Path:
87
+ """Build from the vendored sources out of tree (the package is never modified) and cache the
88
+ result. Returns the library's path. Raises RuntimeError with instructions."""
89
+ if shutil.which("cmake") is None:
90
+ raise RuntimeError(f"{self.name} was not found and building it needs `cmake`, which is not on PATH. {self.help}")
91
+ if not (self.source / "CMakeLists.txt").exists():
92
+ raise RuntimeError(f"The bundled {self.name} sources are missing (a source checkout needs "
93
+ f"`git submodule update --init`). {self.help}")
94
+ target = next((d for d in self.cache_dirs() if writable(d)), None)
95
+ if target is None:
96
+ raise RuntimeError(f"No writable place to cache {self.name} (tried {self.cache_dirs()}); "
97
+ f"set PYSDRLIB_CACHE. {self.help}")
98
+
99
+ with tempfile.TemporaryDirectory(prefix=f"pysdrlib-{self.name}-") as tmp:
100
+ try:
101
+ subprocess.check_call(["cmake", "-S", str(self.source), "-B", tmp, "-DCMAKE_BUILD_TYPE=Release"])
102
+ subprocess.check_call(["cmake", "--build", tmp, "--config", "Release"])
103
+ except (subprocess.CalledProcessError, OSError) as exc:
104
+ raise RuntimeError(f"Building {self.name} failed ({exc}). {self.help}") from exc
105
+ built = [p for glob in (self.build_globs or self.files) for p in Path(tmp).rglob(glob)]
106
+ if not built:
107
+ raise RuntimeError(f"The {self.name} build produced no library. {self.help}")
108
+ target.mkdir(parents=True, exist_ok=True)
109
+ for file in built:
110
+ shutil.copy2(file, target / file.name) # follows symlinks: soname files become real copies
111
+ found = next((target / f for f in self.files if (target / f).exists()), None)
112
+ if found is None:
113
+ raise RuntimeError(f"Could not find the built {self.name} in {target}. {self.help}")
114
+ return found
115
+
116
+ def load(self) -> str:
117
+ """Make the library's symbols available to the extension; returns a description of what was
118
+ loaded. Builds the bundled copy only if neither a system nor a cached library can be loaded."""
119
+ system = ctypes.util.find_library(self.name)
120
+ if system:
121
+ try:
122
+ load_global(system)
123
+ return f"system library {system}"
124
+ except OSError:
125
+ pass
126
+ cached = self.find_cached()
127
+ if cached is not None:
128
+ try:
129
+ load_global(cached)
130
+ return f"cached {cached}"
131
+ except OSError:
132
+ pass
133
+ built = self.build()
134
+ try:
135
+ load_global(built)
136
+ except OSError as exc:
137
+ raise RuntimeError(f"Built {built} but could not load it: {exc}. {self.help}") from exc
138
+ return f"built {built}"
139
+
140
+
141
+ def import_device(package: str, module: str, attr: str, library: VendorLibrary):
142
+ """`attr` from `module` (relative to `package`), finding or building `library` first if the
143
+ extension it imports can't load without it. Raises ImportError with instructions."""
144
+ def get():
145
+ return getattr(importlib.import_module(module, package), attr)
146
+ try:
147
+ return get()
148
+ except ImportError as first:
149
+ if not library.is_missing(first):
150
+ raise ImportError(
151
+ f"{package}'s compiled extension is not available for this installation "
152
+ "(e.g. an unsupported platform, or a source checkout that was never built). "
153
+ "Install a wheel for your platform, or build it with `pip install .`."
154
+ ) from first
155
+ try:
156
+ library.load()
157
+ except RuntimeError as exc:
158
+ raise ImportError(str(exc)) from first
159
+ return get()
160
+
161
+
162
+ # ------------------------------------------------------------------ the extensions (for setup.py)
163
+ # All C++ lives under here: include/ is shared, and each device (and samples) has a folder of its own
164
+ NATIVE = "src/pysdrlib/_native"
165
+
166
+ # No fused multiply-add: the conversion must round exactly as the numpy reference does, on every CPU. And no
167
+ # FP traps, which nothing uses and which stop the encoder's clamps from being vectorised.
168
+ FP_FLAGS = [] if sys.platform == "win32" else ["-ffp-contract=off", "-fno-trapping-math"]
169
+
170
+ def pybind_extension(device: str, header_dir: str, header: str):
171
+ """The pybind11 Extension for `pysdrlib.<device>.lib._<device>` (setup.py). Does no building and
172
+ does not link the vendor library: its symbols stay undefined and are resolved when the library is
173
+ loaded at import time. Sources are `<device>_pybind.cpp` and `<device>_device.{cpp,hpp}` in
174
+ `src/pysdrlib/_native/<device>`, compiled against the vendor's `header` in `header_dir` (repo-relative)."""
175
+ from pybind11.setup_helpers import Pybind11Extension
176
+
177
+ src, shared = f"{NATIVE}/{device}", f"{NATIVE}/include"
178
+ return Pybind11Extension(
179
+ name=f"pysdrlib.{device}.lib._{device}",
180
+ sources=[f"{src}/{device}_pybind.cpp", f"{src}/{device}_device.cpp"],
181
+ include_dirs=[header_dir, shared, src],
182
+ depends=[f"{src}/{device}_device.hpp", f"{header_dir}/{header}",
183
+ f"{shared}/hardware_wrapper.hpp", f"{shared}/hardware_numpy.hpp", f"{shared}/hardware_pybind.hpp",
184
+ f"{shared}/hardware_format.hpp", f"{shared}/hardware_convert.hpp", f"{shared}/hardware_rx.hpp"],
185
+ # macOS leaves them undefined with a flag; Windows can't at all: skip the extension there rather
186
+ # than fail the whole build (importing the device then explains it). Elsewhere errors are fatal.
187
+ extra_link_args=["-undefined", "dynamic_lookup"] if sys.platform == "darwin" else [],
188
+ extra_compile_args=FP_FLAGS,
189
+ cxx_std=17,
190
+ optional=sys.platform == "win32",
191
+ )
192
+
193
+
194
+ def samples_extension():
195
+ """The pybind11 Extension for `pysdrlib.base.lib._samples` (setup.py): the sample conversion and ring
196
+ that pysdrlib.base.convert and pysdrlib.base.buffer call. It depends on no vendor library, so unlike the
197
+ devices' it is always built and always works."""
198
+ from pybind11.setup_helpers import Pybind11Extension
199
+
200
+ src, shared = f"{NATIVE}/samples", f"{NATIVE}/include"
201
+ return Pybind11Extension(
202
+ name="pysdrlib.base.lib._samples",
203
+ sources=[f"{src}/samples_pybind.cpp"],
204
+ include_dirs=[shared],
205
+ depends=[f"{shared}/hardware_format.hpp", f"{shared}/hardware_convert.hpp", f"{shared}/hardware_ring.hpp"],
206
+ extra_compile_args=FP_FLAGS,
207
+ cxx_std=17,
208
+ )
@@ -0,0 +1,159 @@
1
+ #include "extio_device.hpp"
2
+
3
+ #include <cmath>
4
+ #include <memory>
5
+
6
+ namespace {
7
+
8
+ // Supported sample rates are the ADC rate decimated by powers of two (the index Start() takes):
9
+ // 0..4 -> 2, 4, 8, 16, 32 MHz at 64 MHz, plus one more octave when the ADC runs above N2_BANDSWITCH.
10
+ int rate_count() { return adcnominalfreq > N2_BANDSWITCH ? 6 : 5; }
11
+
12
+ double rate_at(int index) {
13
+ double base = adcnominalfreq / 64.0;
14
+ if (adcnominalfreq > N2_BANDSWITCH) base /= 2;
15
+ return base * 2.0 * (1 << index);
16
+ }
17
+
18
+ using StepsFn = int (RadioHandlerClass::*)(const float**) const;
19
+
20
+ // Index of the step closest to `gain_db`, or -1 if there are no steps
21
+ int nearest_step(const RadioHandlerClass& h, StepsFn steps_of, double gain_db) {
22
+ const float* steps = nullptr;
23
+ const int count = (h.*steps_of)(&steps);
24
+ int best = -1;
25
+ for (int i = 0; i < count; i++) {
26
+ if (best < 0 || std::abs(steps[i] - gain_db) < std::abs(steps[best] - gain_db)) best = i;
27
+ }
28
+ return best;
29
+ }
30
+
31
+ float step_value(const RadioHandlerClass& h, StepsFn steps_of, int index) {
32
+ const float* steps = nullptr;
33
+ (h.*steps_of)(&steps);
34
+ return steps[index];
35
+ }
36
+
37
+ } // namespace
38
+
39
+ ExtIODevice::~ExtIODevice() {
40
+ try { close(); } catch (...) {}
41
+ }
42
+
43
+ HardwareError ExtIODevice::not_open_error() const {
44
+ return HardwareError(EXTIO_ERROR_NOT_OPEN, "RX888 device is not open");
45
+ }
46
+
47
+ void ExtIODevice::open() {
48
+ close();
49
+
50
+ std::unique_ptr<fx3class> fx3(CreateUsbHandler());
51
+ if (!fx3 || !fx3->Open()) throw HardwareError(EXTIO_ERROR_NOT_FOUND, "No SDDC device found");
52
+
53
+ auto handler = std::make_unique<RadioHandlerClass>();
54
+ handler->Init(fx3.get(), &ExtIODevice::rx_trampoline, nullptr, this);
55
+ if (handler->getModel() == NORADIO) {
56
+ handler->Close(); // before fx3: the hardware powers itself down through it
57
+ throw HardwareError(EXTIO_ERROR_NOT_FOUND, "Connected SDDC device is not a supported radio");
58
+ }
59
+
60
+ fx3_ = fx3.release();
61
+ handle_ = handler.release();
62
+ rate_index_ = 0;
63
+ }
64
+
65
+ void ExtIODevice::close() {
66
+ if (!handle_) return;
67
+ RadioHandlerClass* handler = handle_;
68
+ handle_ = nullptr;
69
+ handler->Stop(); // joins the streaming threads, so nothing can call rx_callback_ after this
70
+ handler->Close(); // powers the hardware down; needs fx3_ still alive
71
+ delete handler;
72
+ delete fx3_;
73
+ fx3_ = nullptr;
74
+ streaming_ = false;
75
+ rx_callback_ = nullptr;
76
+ rf_gain_.reset();
77
+ if_gain_.reset();
78
+ }
79
+
80
+ void ExtIODevice::rx_trampoline(void* context, const float* data, uint32_t length) {
81
+ const size_t bytes = static_cast<size_t>(length) * 2 * sizeof(float); // `length` counts I/Q pairs
82
+ static_cast<ExtIODevice*>(context)->dispatch_rx(data, bytes, bytes);
83
+ }
84
+
85
+ void ExtIODevice::start_rx() {
86
+ require()->Start(rate_index_); // stops a running stream first
87
+ streaming_ = true;
88
+ }
89
+
90
+ void ExtIODevice::stop_rx() {
91
+ require()->Stop();
92
+ streaming_ = false;
93
+ }
94
+
95
+ void ExtIODevice::set_freq(uint64_t freq_hz) {
96
+ RadioHandlerClass* h = require();
97
+ const rf_mode mode = h->PrepareLo(freq_hz);
98
+ if (mode == NOMODE) throw HardwareError(EXTIO_ERROR_INVALID_PARAM, "Frequency is outside the device's range");
99
+ if (mode != h->GetmodeRF()) {
100
+ h->UpdatemodeRF(mode);
101
+ apply_gains();
102
+ }
103
+ h->TuneLO(freq_hz);
104
+ }
105
+
106
+ double ExtIODevice::set_sample_rate(double rate_hz) {
107
+ RadioHandlerClass* h = require();
108
+ int best = 0;
109
+ for (int i = 1; i < rate_count(); i++) {
110
+ if (std::abs(rate_at(i) - rate_hz) < std::abs(rate_at(best) - rate_hz)) best = i;
111
+ }
112
+ rate_index_ = best;
113
+ if (streaming_) h->Start(rate_index_);
114
+ return rate_at(best);
115
+ }
116
+
117
+ std::vector<double> ExtIODevice::sample_rates() const {
118
+ std::vector<double> rates;
119
+ for (int i = 0; i < rate_count(); i++) rates.push_back(rate_at(i));
120
+ return rates;
121
+ }
122
+
123
+ std::optional<double> ExtIODevice::set_rx_rf_gain(double gain_db) {
124
+ RadioHandlerClass* h = require();
125
+ rf_gain_ = gain_db;
126
+ const int index = nearest_step(*h, &RadioHandlerClass::GetRFAttSteps, gain_db);
127
+ if (index < 0) return std::nullopt;
128
+ h->UpdateattRF(index);
129
+ return step_value(*h, &RadioHandlerClass::GetRFAttSteps, index);
130
+ }
131
+
132
+ std::optional<double> ExtIODevice::set_rx_if_gain(double gain_db) {
133
+ RadioHandlerClass* h = require();
134
+ if_gain_ = gain_db;
135
+ const int index = nearest_step(*h, &RadioHandlerClass::GetIFGainSteps, gain_db);
136
+ if (index < 0) return std::nullopt;
137
+ h->UpdateIFGain(index);
138
+ return step_value(*h, &RadioHandlerClass::GetIFGainSteps, index);
139
+ }
140
+
141
+ // Switching inputs resets the radio's gain stages; restore what was asked for
142
+ void ExtIODevice::apply_gains() {
143
+ if (rf_gain_) set_rx_rf_gain(*rf_gain_);
144
+ if (if_gain_) set_rx_if_gain(*if_gain_);
145
+ }
146
+
147
+ void ExtIODevice::set_bias_t(bool enable) {
148
+ RadioHandlerClass* h = require();
149
+ if (h->GetmodeRF() == VHFMODE) h->UpdBiasT_VHF(enable);
150
+ else h->UpdBiasT_HF(enable);
151
+ }
152
+
153
+ void ExtIODevice::set_dither(bool enable) { require()->UptDither(enable); }
154
+ void ExtIODevice::set_random(bool enable) { require()->UptRand(enable); }
155
+ void ExtIODevice::set_pga(bool enable) { require()->UptPga(enable); }
156
+
157
+ std::string ExtIODevice::name() const { return require()->getName(); }
158
+ uint16_t ExtIODevice::firmware() const { return require()->GetFirmware(); }
159
+ bool ExtIODevice::is_vhf() const { return require()->GetmodeRF() == VHFMODE; }