aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples/python
Commit message (Collapse)AuthorAgeFilesLines
* examples: Add replay_capture.pyMartin Braun2022-03-312-0/+311
| | | | | This is an example that allows capturing RF data into DRAM, and then stream it back to host, using the Python API.
* bug: fix channel indexing when reading USRP powerLars Amsel2021-10-111-1/+1
| | | | | | | the USRP power meter will only receive from a single channel which is configured by the argument parameter. The streamer receive data will therefor alwalys have a single channel. So do not index with chan when passing the streamer to uhd.dsp.signals.get_usrp_power.
* python: multi_usrp: Fix issues in send_waveform()Martin Braun2021-10-061-7/+7
| | | | | | | - Like with RX, this now allows passing in stream time and existing streamer - There was no EOB being sent at the end (now there is) - Fixed some linter issues
* python: Fix dropped-sample calculation in benchmark_rate.pyMartin Braun2021-09-281-5/+7
| | | | | | | | | | This fixes a subtle bug, where a variable to cache the timestamp of an error gets bound to the metadata instead of creating a copy thereof. Without this fix, the calculation of dropped samples would always be 0, because the difference in timestamps would incorrectly be always zero. This fix will now make a copy of the timestamp. Shoutout to GitHub user bhorsfield for finding this issue.
* examples: Fix underrun/seq error reporting in benchmark_rate.pyMartin Braun2021-05-201-10/+10
| | | | The numbers for these were swapped.
* examples: Fix usrp_power_meter exampleLars Amsel2020-06-111-16/+23
| | | | | | This PR applies antenna channel settings before available calibration data, and moves initialization code to setup_device, returning necessary settings in a tuple.
* examples: Add usrp_power_meter exampleMartin Braun2020-05-192-1/+135
| | | | | | | | | | | This is a utility that can be used to measure received power, assuming a calibrated device. For example, it can be called like this: usrp_power_meter.py -a type=x300 -f 1e9 --mode continuous To continuously measure input power at 1 GHz.
* Remove remaining Python 2 referencesMartin Braun2020-05-074-4/+4
| | | | | | | This changes two things in all applicable files: - Remove imports from __future__ - Change default shebangs from /usr/bin/env python to /usr/bin/env python3
* examples: benchmark_rate.py: Add ?x_stream_args argsMartin Braun2019-11-261-2/+9
| | | | | | | | | | | | | This allows adding stream args to the Python version of benchmark_rate in the same way as for the C++ version, e.g.: python3 ./benchmark_rate.py \ --args addr=192.168.40.2,num_poll_offload_threads=4 \ --rx_stream_args \ recv_offload=1,num_recv_frames=32,recv_offload_wait_mode=poll \ --tx_stream_args \ send_offload=1,num_send_frames=32,send_offload_wait_mode=poll \ [... other arguments ...]
* python: Fixup bmark_rate printed statisticsBrent Stapleton2019-08-211-3/+3
| | | | | | | | - When printing statistics, the number of TX and RX timeouts were mixed up. - Fixing main() docstring Fixes e735a63ff9e ("python: Adding Python API benchmark rate")
* cmake: Update coding style to use lowercase commandsMartin Braun2018-11-141-1/+1
| | | | | | | | | | | | | | | | | Also updates our coding style file. Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code (with GNU compliant sed): cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done > convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \ '*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed (Make sure the backslashes don't get mangled!)
* python: Fix duration of benchmark rateBrent Stapleton2018-09-121-1/+1
| | | | | | | | Duration of multichannel benchmark was 50 seconds longer than intended- a 50ms initialization delay was mistakenly multiplied by 1000. Fixes e735a63ff9e ("python: Adding Python API benchmark rate")
* python: Adding Python API benchmark rateBrent Stapleton2018-06-202-0/+482
| | | | Python API version of the benchmark rate utility.
* python: Added curses frequency plot examplePaul David2018-06-202-0/+153
|
* python: Separating exposed Python data structuresPaul David2018-06-203-55/+38
| | | | | | | | | - Separating exposed Python data structures into logical sections - Exposes all of the multi_usrp API - Adds a layer of Python for documentation and adding helper methods - Adds improvements and fixes to the MultiUSRP object - Includes additional exposed data structures (like time_spec_t, etc.) - Add code to release the Python GIL during long C++ calls
* python: Initial commit of Python APIAndrej Rode2018-06-203-0/+133
Initial commit of the Python API using Boost.Python. Bind the MultiUSRP API for use in Python. Bindings intended to provide as complete coverage as possible. - Wrap most multi_usrp calls - Adding multi channel send/recv examples in examples/python - Adding setuptools support - Initial attempt at binding the UHD types and filters