aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/b200/b2x0_side_channel.py650
-rw-r--r--tools/kitchen_sink/CMakeLists.txt9
-rw-r--r--tools/kitchen_sink/kitchen_sink.cpp35
-rw-r--r--tools/mega_fft/MegaFFT-3.7.grc10459
-rw-r--r--tools/mega_fft/README.md7
-rwxr-xr-xtools/mega_fft/mega_fft.py2645
-rwxr-xr-xtools/mega_fft/mega_fft_2ch.py2818
-rw-r--r--tools/nirio_programmer/.gitignore1
-rw-r--r--tools/nirio_programmer/CMakeLists.txt83
-rw-r--r--tools/nirio_programmer/nirio_programmer.cpp291
-rw-r--r--tools/uhd_txrx_debug_prints/uhd_txrx_debug_prints_README.md17
-rwxr-xr-xtools/uhd_txrx_debug_prints/uhd_txrx_debug_prints_graph.py415
12 files changed, 16780 insertions, 650 deletions
diff --git a/tools/b200/b2x0_side_channel.py b/tools/b200/b2x0_side_channel.py
deleted file mode 100755
index cf88bd35f..000000000
--- a/tools/b200/b2x0_side_channel.py
+++ /dev/null
@@ -1,650 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# Copyright 2013-2014 Ettus Research LLC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-"""
-Tool to read log buffers from the FX3. Use to debug USB connection issues.
-Requires PyUSB 1.0.
-"""
-
-import sys
-import time
-import struct
-from optparse import OptionParser
-import serial
-
-try:
- import usb.core
- import usb.util
-except Exception as e:
- print "Failed to import usb - please have pyusb in your PYTHONPATH"
- raise e
-
-VRT_OUT = usb.util.CTRL_TYPE_VENDOR | usb.util.CTRL_OUT
-VRT_IN = usb.util.CTRL_TYPE_VENDOR | usb.util.CTRL_IN
-
-VRQS = {}
-B200_VREQ_GET_LOG = 0x23
-VRQS[B200_VREQ_GET_LOG] = 'B200_VREQ_GET_LOG'
-B200_VREQ_GET_COUNTERS = 0x24
-VRQS[B200_VREQ_GET_COUNTERS] = 'B200_VREQ_GET_COUNTERS'
-B200_VREQ_CLEAR_COUNTERS = 0x25
-VRQS[B200_VREQ_CLEAR_COUNTERS] = 'B200_VREQ_CLEAR_COUNTERS'
-B200_VREQ_GET_USB_EVENT_LOG = 0x26
-VRQS[B200_VREQ_GET_USB_EVENT_LOG] = 'B200_VREQ_GET_USB_EVENT_LOG'
-B200_VREQ_SET_CONFIG = 0x27
-VRQS[B200_VREQ_SET_CONFIG] = 'B200_VREQ_SET_CONFIG'
-B200_VREQ_GET_CONFIG = 0x28
-VRQS[B200_VREQ_GET_CONFIG] = 'B200_VREQ_GET_CONFIG'
-B200_VREQ_GET_USB_SPEED = 0x80
-VRQS[B200_VREQ_GET_USB_SPEED] ='B200_VREQ_GET_USB_SPEED'
-B200_VREQ_WRITE_SB = 0x29
-VRQS[B200_VREQ_WRITE_SB] = 'B200_VREQ_WRITE_SB'
-B200_VREQ_SET_SB_BAUD_DIV = 0x30
-VRQS[B200_VREQ_SET_SB_BAUD_DIV] = 'B200_VREQ_SET_SB_BAUD_DIV'
-B200_VREQ_FLUSH_DATA_EPS = 0x31
-VRQS[B200_VREQ_FLUSH_DATA_EPS] = 'B200_VREQ_FLUSH_DATA_EPS'
-B200_VREQ_AD9361_LOOPBACK = 0x92
-VRQS[B200_VREQ_AD9361_LOOPBACK] = 'B200_VREQ_AD9361_LOOPBACK'
-
-COUNTER_MAGIC = 0x10024001
-"""
-typedef struct Counters {
- int magic;
-
- DMA_COUNTERS dma_to_host;
- DMA_COUNTERS dma_from_host;
-
- int log_overrun_count;
-
- int usb_error_update_count;
- USB_ERROR_COUNTERS usb_error_counters;
-
- int usb_ep_underrun_count;
-
- int heap_size;
-} COUNTERS, *PCOUNTERS;
-
-typedef struct USBErrorCounters {
- int phy_error_count;
- int link_error_count;
-
- int PHY_LOCK_EV;
- int TRAINING_ERROR_EV;
- int RX_ERROR_CRC32_EV;
- int RX_ERROR_CRC16_EV;
- int RX_ERROR_CRC5_EV;
- int PHY_ERROR_DISPARITY_EV;
- int PHY_ERROR_EB_UND_EV;
- int PHY_ERROR_EB_OVR_EV;
- int PHY_ERROR_DECODE_EV;
-} USB_ERROR_COUNTERS, *PUSB_ERROR_COUNTERS;
-
-typedef struct DMACounters {
- int XFER_CPLT;
- int SEND_CPLT;
- int RECV_CPLT;
- int PROD_EVENT;
- int CONS_EVENT;
- int ABORTED;
- int ERROR;
- int PROD_SUSP;
- int CONS_SUSP;
-
- int BUFFER_MARKER;
- int BUFFER_EOP;
- int BUFFER_ERROR;
- int BUFFER_OCCUPIED;
-
- int last_count;
- int last_size;
-
- int last_sid;
- int bad_sid_count;
-
- int resume_count;
-} DMA_COUNTERS, *PDMA_COUNTERS;
-"""
-DMA_COUNTERS = [
- 'XFER_CPLT',
- 'SEND_CPLT',
- 'RECV_CPLT',
- 'PROD_EVENT',
- 'CONS_EVENT',
- 'ABORTED',
- 'ERROR',
- 'PROD_SUSP',
- 'CONS_SUSP',
-
- 'BUFFER_MARKER',
- 'BUFFER_EOP',
- 'BUFFER_ERROR',
- 'BUFFER_OCCUPIED',
-
- 'last_count',
- 'last_size',
-
- 'last_sid',
- 'bad_sid_count'
-]
-
-USB_ERROR_COUNTERS = [
- 'phy_error_count',
- 'link_error_count'
-]
-
-USB_PHY_ERROR_REGISTERS = [
- 'PHY_LOCK_EV',
- 'TRAINING_ERROR_EV',
- 'RX_ERROR_CRC32_EV',
- 'RX_ERROR_CRC16_EV',
- 'RX_ERROR_CRC5_EV',
- 'PHY_ERROR_DISPARITY_EV',
- 'PHY_ERROR_EB_UND_EV',
- 'PHY_ERROR_EB_OVR_EV',
- 'PHY_ERROR_DECODE_EV'
-]
-
-USB_ERROR_COUNTERS += USB_PHY_ERROR_REGISTERS
-
-COUNTERS = [
- 'magic',
-
- ('dma_to_host', DMA_COUNTERS),
- ('dma_from_host', DMA_COUNTERS),
-
- 'log_overrun_count',
-
- 'usb_error_update_count',
- ('usb_error_counters', USB_ERROR_COUNTERS),
-
- 'usb_ep_underrun_count',
-
- 'heap_size',
-
- 'resume_count'
-]
-
-USB_EVENTS = {}
-USB_EVENTS[0x01] = ('CYU3P_USB_LOG_VBUS_OFF' , 'Indicates VBus turned off.')
-USB_EVENTS[0x02] = ('CYU3P_USB_LOG_VBUS_ON' , 'Indicates VBus turned on.')
-USB_EVENTS[0x03] = ('CYU3P_USB_LOG_USB2_PHY_OFF' , 'Indicates that the 2.0 PHY has been turned off.')
-USB_EVENTS[0x04] = ('CYU3P_USB_LOG_USB3_PHY_OFF' , 'Indicates that the 3.0 PHY has been turned off.')
-USB_EVENTS[0x05] = ('CYU3P_USB_LOG_USB2_PHY_ON' , 'Indicates that the 2.0 PHY has been turned on.')
-USB_EVENTS[0x06] = ('CYU3P_USB_LOG_USB3_PHY_ON' , 'Indicates that the 3.0 PHY has been turned on.')
-USB_EVENTS[0x10] = ('CYU3P_USB_LOG_USBSS_DISCONNECT' , 'Indicates that the USB 3.0 link has been disabled.')
-USB_EVENTS[0x11] = ('CYU3P_USB_LOG_USBSS_RESET' , 'Indicates that a USB 3.0 reset (warm/hot) has happened.')
-USB_EVENTS[0x12] = ('CYU3P_USB_LOG_USBSS_CONNECT' , 'Indicates that USB 3.0 Rx Termination has been detected.')
-USB_EVENTS[0x14] = ('CYU3P_USB_LOG_USBSS_CTRL' , 'Indicates that a USB 3.0 control request has been received.')
-USB_EVENTS[0x15] = ('CYU3P_USB_LOG_USBSS_STATUS' , 'Indicates completion of status stage for a 3.0 control request.')
-USB_EVENTS[0x16] = ('CYU3P_USB_LOG_USBSS_ACKSETUP' , 'Indicates that the CyU3PUsbAckSetup API has been called.')
-USB_EVENTS[0x21] = ('CYU3P_USB_LOG_LGO_U1' , 'Indicates that a LGO_U1 command has been received.')
-USB_EVENTS[0x22] = ('CYU3P_USB_LOG_LGO_U2' , 'Indicates that a LGO_U2 command has been received.')
-USB_EVENTS[0x23] = ('CYU3P_USB_LOG_LGO_U3' , 'Indicates that a LGO_U3 command has been received.')
-USB_EVENTS[0x40] = ('CYU3P_USB_LOG_USB2_SUSP' , 'Indicates that a USB 2.0 suspend condition has been detected.')
-USB_EVENTS[0x41] = ('CYU3P_USB_LOG_USB2_RESET' , 'Indicates that a USB 2.0 bus reset has been detected.')
-USB_EVENTS[0x42] = ('CYU3P_USB_LOG_USB2_HSGRANT' , 'Indicates that the USB High-Speed handshake has been completed.')
-USB_EVENTS[0x44] = ('CYU3P_USB_LOG_USB2_CTRL' , 'Indicates that a FS/HS control request has been received.')
-USB_EVENTS[0x45] = ('CYU3P_USB_LOG_USB2_STATUS' , 'Indicates completion of status stage for a FS/HS control transfer.')
-USB_EVENTS[0x50] = ('CYU3P_USB_LOG_USB_FALLBACK' , 'Indicates that the USB connection is dropping from 3.0 to 2.0')
-USB_EVENTS[0x51] = ('CYU3P_USB_LOG_USBSS_ENABLE' , 'Indicates that a USB 3.0 connection is being attempted again.')
-USB_EVENTS[0x52] = ('CYU3P_USB_LOG_USBSS_LNKERR' , 'The number of link errors has crossed the threshold.')
-USB_EVENTS[0x80] = ('CYU3P_USB_LOG_LTSSM_CHG' , 'Base of values that indicate a USB 3.0 LTSSM state change.')
-
-LTSSM_STATES = {}
-LTSSM_STATES[0x00] = ['00000', "SS.Disabled"]
-LTSSM_STATES[0x01] = ['00001', "Rx.Detect.Reset"]
-LTSSM_STATES[0x02] = ['00010', "Rx.Detect.Active"]
-LTSSM_STATES[0x03] = ['00011', "Rx.Detect.Quiet"]
-LTSSM_STATES[0x04] = ['00100', "SS.Inactive.Quiet"]
-LTSSM_STATES[0x05] = ['00101', "SS.Inactive.Disconnect.Detect"]
-LTSSM_STATES[0x06] = ['00110', "Hot Reset.Active"]
-LTSSM_STATES[0x07] = ['00111', "Hot Reset.Exit"]
-LTSSM_STATES[0x08] = ['01000', "Polling.LFPS"]
-LTSSM_STATES[0x09] = ['01001', "Polling.RxEQ"]
-LTSSM_STATES[0x0a] = ['01010', "Polling.Active"]
-LTSSM_STATES[0x0b] = ['01011', "Polling.Configuration"]
-LTSSM_STATES[0x0c] = ['01100', "Polling.Idle"]
-LTSSM_STATES[0x0d] = ['01101', "(none)"]
-#LTSSM_STATES[0x0X] = ['0111X', "(none)"]
-LTSSM_STATES[0x0e] = ['0111X', "(none)"]
-LTSSM_STATES[0x0f] = ['0111X', "(none)"]
-LTSSM_STATES[0x10] = ['10000', "U0"]
-LTSSM_STATES[0x11] = ['10001', "U1"]
-LTSSM_STATES[0x12] = ['10010', "U2"]
-LTSSM_STATES[0x13] = ['10011', "U3"]
-LTSSM_STATES[0x14] = ['10100', "Loopback.Active"]
-LTSSM_STATES[0x15] = ['10101', "Loopback.Exit"]
-LTSSM_STATES[0x16] = ['10110', "(none)"]
-LTSSM_STATES[0x17] = ['10111', "Compliance"]
-LTSSM_STATES[0x18] = ['11000', "Recovery.Active"]
-LTSSM_STATES[0x19] = ['11001', "Recovery.Configuration"]
-LTSSM_STATES[0x1a] = ['11010', "Recovery.Idle"]
-LTSSM_STATES[0x1b] = ['11011', "(none)"]
-#LTSSM_STATES[0x1X] = ['111XX', "(none)"]
-LTSSM_STATES[0x1c] = ['111XX', "(none)"]
-LTSSM_STATES[0x1d] = ['111XX', "(none)"]
-LTSSM_STATES[0x1c] = ['111XX', "(none)"]
-LTSSM_STATES[0x1f] = ['111XX', "(none)"]
-LTSSM_STATES[0x2c] = ['101100', "Cypress/Intel workaround"]
-
-def _parse_usb_event_log(data):
- l = []
- for d in data:
- if d == 0x14 or d == 0x15 or d == 0x16: # CTRL, STATUS, ACKSETUP
- continue
- elif (d & 0x80):
- #l += [(USB_EVENTS[0x80][0] + "+%i" % (d & ~0x80), USB_EVENTS[0x80][1])]
- ltssm_key = (d & ~0x80)
- ltssm_val = "(unknown)"
- if LTSSM_STATES.has_key(ltssm_key):
- ltssm_val = LTSSM_STATES[ltssm_key][1]
- ltssm_val = "LTSSM: " + ltssm_val
- l += [(USB_EVENTS[0x80][0] + "+%i" % (d & ~0x80), ltssm_val)]
- elif USB_EVENTS.has_key(d):
- l += [USB_EVENTS[d]]
- #else:
- # l += [("?", "?")]
- return l
-
-class counter_set():
- def __init__(self, counters, name='(top)'):
- self._counters = counters
- self._counter_names = []
- self._name = name
- for c in counters:
- o = 0
- default_value = False
- if isinstance(c, str):
- name = c
- default_value = True
- elif isinstance(c, tuple):
- name = c[0]
- o = counter_set(c[1])
- elif isinstance(c, dict):
- raise Exception('Not implemented yet')
- else:
- raise Exception('Unknown counter format')
- setattr(self, name, o)
- self._counter_names += [(name, default_value)]
- self._fmt_str = self._get_struct_format()
-
- def _get_struct_format(self):
- fmt_str = ""
- for name, default_value in self._counter_names:
- if default_value:
- fmt_str += "i"
- else:
- o = getattr(self, name)
- fmt_str += o._get_struct_format()
- return fmt_str
-
- def _update(self, data, parents=[]):
- if len(data) == 0:
- raise Exception('Ran out of data entering %s' % (self._name))
- #return []
- for name, default_value in self._counter_names:
- if default_value:
- if len(data) == 0:
- raise Exception('Ran out of data setting %s in %s' % (name, self._name))
- setattr(self, name, data[0])
- data = data[1:]
- else:
- o = getattr(self, name)
- data = o._update(data, parents+[self])
- return data
-
- def update(self, data):
- try:
- vals = struct.unpack(self._fmt_str, data)
- self._update(vals)
- except Exception, e:
- print e
-
- def __str__(self):
- return self.to_string()
-
- def to_string(self, parents=[]):
- s = ""
- cnt = 0
- for name, default_value in self._counter_names:
- o = getattr(self, name)
- if default_value:
- if cnt > 0:
- s += "\t"
- s += "%s: %05i" % (name, o)
- cnt += 1
- else:
- if cnt > 0:
- s += "\n"
- s += "\t"*(len(parents) + 1)
- s += o.to_string(parents+[self])
- cnt = 0
- s += "\n"
- return s
-
-class usb_device():
- def __init__(self):
- #self.max_buffer_size = 64 # Default to USB2
- self.max_buffer_size = 1024*4 # Apparently it'll frag bigger packets
- self.counters = counter_set(COUNTERS)
- self.timeout = 2000
-
- def open(self, idVendor, idProduct):
- print "Finding %04x:%04x..." % (idVendor, idProduct)
- self.dev = usb.core.find(idVendor=idVendor, idProduct=idProduct)
- if self.dev is None:
- raise ValueError('Device not found: %04x:%04x' % (idVendor, idProduct))
-
- self.log_index = 0
- self.log_read_count = 0
- self.usb_event_log_read_count = 0
- self.counters_read_count = 0
-
- #if self.dev.is_kernel_driver_active(0):
- # print "Detaching kernel driver..."
- # self.dev.detach_kernel_driver(0)
-
- #self.dev.set_configuration() # This will throw as device is already claimed
-
- print "Opened %04x:%04x" % (idVendor, idProduct)
-
- #self.dev.ctrl_transfer(0x21, 0x09, 0, 0, [0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00] )
- #self.dev.ctrl_transfer(bmRequestType, bRequest, wValue=0, wIndex=0, data_or_wLength = None, timeout = None
-
- #res = self.dev.ctrl_transfer(VRT_IN, 0x83, 0, 0, 1024)
- # Can give 1024 byte size for IN, result will be actual payload size
- # Invalid VREQ results in usb.core.USBError 32 Pipe error
- #print res
-
- #res = self.dev.ctrl_transfer(VRT_IN, B200_VREQ_GET_USB_SPEED, 0, 0, 1)
- #self.usb_speed = res[0]
- while True:
- #l = self.vrt_get(B200_VREQ_GET_USB_SPEED)
- l = []
- try:
- l = self.dev.ctrl_transfer(VRT_IN, B200_VREQ_GET_USB_SPEED, 0, 0, 1)
- except usb.core.USBError, e:
- if e.errno == 32:
- print e
- sys.exit(0)
- if len(l) > 0:
- self.usb_speed = l[0]
- print "Operating at USB", self.usb_speed
- break
- else:
- print "Retrying..."
- #if self.usb_speed == 3:
- # self.max_buffer_size = 512
- print "Max buffer size:", self.max_buffer_size
- print
-
- def _handle_error(self, e, vrt):
- if e.errno == 19: # No such device
- raise e
- vrt_str = "0x%02x" % (vrt)
- if VRQS.has_key(vrt):
- vrt_str += " (%s)" % (VRQS[vrt])
- print "%s: %s" % (vrt_str, str(e))
-
- def vrt_get(self, vrt):
- try:
- return self.dev.ctrl_transfer(VRT_IN, vrt, 0, 0, self.max_buffer_size, self.timeout)
- except usb.core.USBError, e:
- self._handle_error(e, vrt)
- return []
-
- def vrt_set(self, vrt, data=""):
- try:
- return self.dev.ctrl_transfer(VRT_OUT, vrt, 0, 0, data, self.timeout)
- except usb.core.USBError, e:
- self._handle_error(e, vrt)
- return None
-
- def get_log(self, with_log_index=True):
- lines = []
- raw = self.vrt_get(B200_VREQ_GET_LOG)
- if len(raw) == 0:
- return lines
- if raw[0] == 0:
- return lines
- self.log_read_count += 1
- raw = list(raw)
- last = 0
- while raw[last] != 0:
- try:
- idx = raw.index(0, last)
- self.log_index += 1
- line = "".join(map(chr, raw[last:idx]))
- #print "[%05i %05i] %s" % (self.log_index, self.log_read_count, line)
- if with_log_index:
- lines += [(self.log_index, line)]
- else:
- lines += [line]
- last = idx + 1
- if last >= len(raw):
- break
- except Exception, e:
- print e
- break
- return lines
-
- def print_log(self):
- lines = self.get_log()
- if len(lines) == 0:
- return
- for l in lines:
- #print l
- print "[%05i %05i] %s" % (l[0], self.log_read_count, l[1])
- print
-
- def get_counters(self):
- data = self.vrt_get(B200_VREQ_GET_COUNTERS)
- if len(data) == 0:
- return
- self.counters_read_count += 1
- self.counters.update(data)
-
- def print_counters(self):
- self.get_counters()
- print "[%05i]" % (self.counters_read_count)
- print self.counters
-
- def get_usb_event_log(self):
- data = self.vrt_get(B200_VREQ_GET_USB_EVENT_LOG)
- if len(data) == 0:
- return []
- if len(data) == self.max_buffer_size: # ZLP when no new events have been recorded
- return []
- if len(data) > 64:
- raise Exception("USB event log data len = %i" % (len(data)))
- self.usb_event_log_read_count += 1
- return _parse_usb_event_log(data)
-
- def print_usb_event_log(self):
- l = self.get_usb_event_log()
- if len(l) == 0:
- return
- print "\n".join(map(lambda x: ("[%05i] " % (self.usb_event_log_read_count)) + x[0] + ":\t" + x[1], l))
- print
-
-def run_log(dev, options):
- items = [
- (options.log, dev.print_log),
- (options.counters, dev.print_counters),
- (options.usb_events, dev.print_usb_event_log)
- ]
- items = filter(lambda x: x[0] > 0, items)
- smallest_interval = min(map(lambda x: x[0], items))
- time_now = time.time()
- last = [time_now]*len(items)
-
- try:
- for i in items:
- if i[0] < 0:
- i[1]()
- while True:
- time_now = time.time()
- cleared = False
- for i in range(len(items)):
- time_last = last[i]
- if time_now < (time_last + items[i][0]):
- continue
- if options.clear_screen and not cleared:
- print chr(27) + "[2J"
- cleared = True
- #print items[i][1]
- items[i][1]()
- last[i] = time.time()
- time.sleep(smallest_interval)
- except KeyboardInterrupt:
- return
-
-def hex_to_int(s):
- radix = 10
- s = s.lower()
- if (len(s) > 1 and s[0] == 'x') or (len(s) > 2 and s[0:2] == "0x"):
- radix = 16
- return int(s, radix)
-
-def recv_serial_data(ser):
- data = ""
- usb_event_log_read_count = 0
- time_start = time.time()
- while True:
- c = ser.read()
- data += c
- #if c == '\n':
- if len(data) >= 2 and data[-2:] == "\r\n":
- time_now_str = "[%06d]" % (int(time.time() - time_start))
- data = data[0:-2]
- if data == "":
- #print "[Received an empty line]"
- print
- elif data[0] == ' ':
- print time_now_str, data[1:]
- elif data[0] == 'U':
- data = data[1:]
- cur_type = 0
- i = 0
- usb_events = []
- while len(data) > 0:
- c = data[0]
-
- if cur_type == 0:
- if c == 'a':
- cur_type = 1
- elif (c >= 'A') and (c <= 'P'):
- i = ord(c) - ord('A')
- cur_type = 2
- else:
- print time_now_str, "[Unknown type: '%s' (0x%02x) in '%s']" % (c, ord(c), data)
-
- elif cur_type == 1:
- i = ord(c) - ord('a')
- if (i < 0) or (i >= len(USB_PHY_ERROR_REGISTERS)):
- print time_now_str, "[Unknown PHY error register index: '%s' (0x%02x) (%d) in '%s']" % (c, ord(c), i, data)
- else:
- print time_now_str, USB_PHY_ERROR_REGISTERS[i]
- cur_type = 0
-
- elif cur_type == 2:
- i2 = ord(c) - ord('A')
- if (c < 'A') or (c > 'P'):
- print time_now_str, "[Unknown second USB event part: '%s' (0x%02x) (%d) in '%s']" % (c, ord(c), i2, data)
- else:
- i = (i << 4) | i2
- usb_events += [i]
-
- cur_type = 0
-
- data = data[1:]
-
- if len(usb_events) > 0:
- usb_event_log_read_count += 1
- l = _parse_usb_event_log(usb_events)
- print "\n".join(map(lambda x: time_now_str + ("[%05i] " % (usb_event_log_read_count)) + x[0] + ":\t" + x[1], l))
- #print
-
- data = ""
-
-def main():
- parser = OptionParser(usage="%prog: [options]") #option_class=eng_option,
-
- parser.add_option("-v", "--vid", type="string", default="0x2500", help="VID [default=%default]")
- parser.add_option("-p", "--pid", type="string", default="0x0020", help="PID [default=%default]")
- parser.add_option("-t", "--tty", type="string", default=None, help="TTY [default=%default]")
- parser.add_option("-c", "--cmd", type="string", default="", help="Command (empty opens prompt)")
- parser.add_option("-n", "--counters", type="float", default="5.0", help="Counter print interval [default=%default]")
- parser.add_option("-l", "--log", type="float", default="0.25", help="Log print interval [default=%default]")
- parser.add_option("-e", "--usb-events", type="float", default="0.25", help="USB event log print interval [default=%default]")
- parser.add_option("-s", "--sb", type="string", default=None, help="Settings Bus write message [default=%default]")
- parser.add_option("-d", "--sb-baud-div", type="int", default=None, help="Settings Bus baud rate divisor [default=%default]")
- parser.add_option("-b", "--sb-baud", type="int", default=None, help="Settings Bus baud rate [default=%default]")
- parser.add_option("-r", "--clear-screen", action="store_true", default=False, help="Clear screen [default=%default]")
- parser.add_option("-R", "--reset-counters", action="store_true", default=False, help="Reset counters [default=%default]")
- parser.add_option("-f", "--flush-data-eps", action="store_true", default=False, help="Flush data endpoints [default=%default]")
- parser.add_option("-L", "--fe-loopback", type="int", default=None, help="Change AD9361 digital loopback [default=%default]")
-
- (options, args) = parser.parse_args()
-
- if options.tty is not None and options.tty != "":
- while True:
- try:
- ser = serial.Serial(port=options.tty, baudrate=115200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS, timeout=None) # timeout: None (blocking), 0 (non-blocking)
- print "Opened", options.tty
-
- try:
- recv_serial_data(ser)
- except KeyboardInterrupt:
- break
- except Exception, e:
- print e
- break
- else:
- dev = usb_device()
-
- while True:
- try:
- dev.open(idVendor=hex_to_int(options.vid), idProduct=hex_to_int(options.pid))
- if options.flush_data_eps:
- dev.vrt_set(B200_VREQ_FLUSH_DATA_EPS)
- if options.sb_baud_div is not None:
- dev.vrt_set(B200_VREQ_SET_SB_BAUD_DIV, struct.pack('H', options.sb_baud_div))
- if options.sb is not None and len(options.sb) > 0:
- dev.vrt_set(B200_VREQ_WRITE_SB, " " + options.sb)
- if options.reset_counters:
- dev.vrt_set(B200_VREQ_CLEAR_COUNTERS)
- if options.fe_loopback is not None:
- dev.vrt_set(B200_VREQ_AD9361_LOOPBACK, struct.pack('B', int(options.fe_loopback)))
- if len(options.cmd) == 0:
- run_log(dev, options)
- pass
- else:
- pass
-
- break
- except usb.core.USBError, e:
- if e.errno == 19: # No such device
- pass
- print e
- break
-
- return 0
-
-if __name__ == '__main__':
- main()
diff --git a/tools/kitchen_sink/CMakeLists.txt b/tools/kitchen_sink/CMakeLists.txt
index b28a9e411..edbc33bd0 100644
--- a/tools/kitchen_sink/CMakeLists.txt
+++ b/tools/kitchen_sink/CMakeLists.txt
@@ -17,6 +17,15 @@
cmake_minimum_required(VERSION 2.8)
+###############################################################################
+
+#select the release build type by default to get optimization flags
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Release")
+ message(STATUS "Build type not specified: defaulting to release.")
+endif(NOT CMAKE_BUILD_TYPE)
+set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
+
### Set up build environment ##################################################
#### Set up Boost:
set(BOOST_REQUIRED_COMPONENTS
diff --git a/tools/kitchen_sink/kitchen_sink.cpp b/tools/kitchen_sink/kitchen_sink.cpp
index f350f4516..e17ee6437 100644
--- a/tools/kitchen_sink/kitchen_sink.cpp
+++ b/tools/kitchen_sink/kitchen_sink.cpp
@@ -269,6 +269,33 @@ static void msg_handler(uhd::msg::type_t type, const std::string& msg)
}
/***********************************************************************
+ * Checker thread
+ **********************************************************************/
+
+void check_thread(uhd::usrp::multi_usrp::sptr usrp)
+{
+ {
+ std::stringstream ss;
+ ss << "(" << get_stringified_time() << ") Checker running..." << std::endl;
+ std::cout << ss.str();
+ }
+
+ while (running)
+ {
+ uhd::sensor_value_t ref_locked = usrp->get_mboard_sensor("ref_locked");
+ if (ref_locked.to_bool() == false) {
+ std::stringstream ss;
+ ss << HEADER_WARN"(" << get_stringified_time() << ") " << boost::format("ref_locked: unlocked") << std::endl;
+ std::cout << ss.str();
+ }
+
+ boost::this_thread::sleep(boost::posix_time::seconds(0) + boost::posix_time::microseconds(1000 * 500)); // MAGIC
+ }
+
+ std::cout << "Checker exiting..." << std::endl;
+}
+
+/***********************************************************************
* Benchmark RX Rate
**********************************************************************/
@@ -1511,6 +1538,12 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
}
}
+ if (usrp->get_time_source(0) == "gpsdo")
+ {
+ std::cout << boost::format(HEADER "Waiting for GPSDO time to latch") << std::endl;
+ sleep(1);
+ }
+
uhd::time_spec_t time_start = usrp->get_time_now(); // Usually DSP #0 on mboard #0
std::cout << boost::format(HEADER "Time now: %f seconds (%llu ticks)") % time_start.get_real_secs() % time_start.to_ticks(usrp->get_master_clock_rate()) << std::endl;
@@ -1755,6 +1788,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
running = true;
std::cout << HEADER "Begin..." << std::endl;
+ thread_group.create_thread(boost::bind(&check_thread, usrp));
+
if (tx_channel_nums.size() > 0)
tx_thread_begin.wait(l_tx);
if (rx_channel_nums.size() > 0)
diff --git a/tools/mega_fft/MegaFFT-3.7.grc b/tools/mega_fft/MegaFFT-3.7.grc
new file mode 100644
index 000000000..500c7a8bb
--- /dev/null
+++ b/tools/mega_fft/MegaFFT-3.7.grc
@@ -0,0 +1,10459 @@
+<?xml version='1.0' encoding='ASCII'?>
+<?grc format='1' created='3.7.8'?>
+<flow_graph>
+ <timestamp>Thu Feb 19 08:48:00 2015</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>author</key>
+ <value>Balint Seeber, Ettus Research</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value>Standard edition, single-channel</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>wx_gui</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>mega_fft</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>thread_safe_setters</key>
+ <value></value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Mega FFT</value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>2400, 1800</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.src.get_center_freq()</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(173, 1024)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>actual_center_freq</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'tune_obj': tune_obj}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.src.get_samp_rate()</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(762, 1310)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>actual_sample_rate</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'requested_sample_rate': requested_sample_rate}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.src.get_antennas()</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>['']</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1361, 1211)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>antennas</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>if self.fft_sink.controller['average']: self.fft_sink.controller['average'] = False; time.sleep(0.25); self.fft_sink.controller['average'] = True;</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>test</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>none</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(496, 409)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>any_test_1</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>plain</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'test': test}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.fft_sink.controller['average'] = True</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>any_test_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>none</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(617, 499)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>any_test_1_0</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>plain</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'any_test': any_test_1}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_check_box</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>false</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(529, 632)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>auto_dc_offset_removal</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Auto DC offset removal</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_analog, 1</value>
+ </param>
+ <param>
+ <key>true</key>
+ <value>True</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_check_box</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>false</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(576, 828)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>auto_iq_correction</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Auto IQ correction</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_analog, 1</value>
+ </param>
+ <param>
+ <key>true</key>
+ <value>True</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(505, 1023)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>clicked_freq</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_text_box</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>clicked_freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(423, 921)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>clicked_freq_txt</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Clicked freq</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_function_probe</key>
+ <param>
+ <key>block_id</key>
+ <value>src</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>function_args</key>
+ <value></value>
+ </param>
+ <param>
+ <key>function_name</key>
+ <value>get_sensor_names</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(2138, 153)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>daughterboard_sensor_names</value>
+ </param>
+ <param>
+ <key>poll_rate</key>
+ <value>sensor_interval</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[]</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>'\n'.join(map(lambda x: '%s: %s' % (x, str(self.src.get_sensor(x))), self.daughterboard_sensor_names))</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'(none)'</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(2143, 258)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>daughterboard_sensors</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'daughterboard_sensor_names': daughterboard_sensor_names}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(441, 1338)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>decim</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>int(2**decim_idx)</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>int_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(769, 1062)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>decim</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Divide base sample rate</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>max_decim</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_rate, 0</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>max_decim-1</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>int_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(472, 1150)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>decim_idx</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Decimate current sample rate</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>int(math.log(max_decim)/math.log(2))</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_rate, 0</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>int(math.log(max_decim)/math.log(2))</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code_post_eval</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1619, 1219)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>dont_need_this_now_built_in_to_Any_Code_block</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_function_probe</key>
+ <param>
+ <key>block_id</key>
+ <value>fft_sink</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>function_args</key>
+ <value></value>
+ </param>
+ <param>
+ <key>function_name</key>
+ <value>win['avg_alpha'] * [1.0/self.fft_sink.win['avg_alpha'],1.0][self.fft_sink.win['average']];</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(352, 311)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_ave_probe</value>
+ </param>
+ <param>
+ <key>poll_rate</key>
+ <value>5</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>ave</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1322, 397)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_averaging</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>str_to_bool(averaging)</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(328, 1177)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_center_freq</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>actual_center_freq * relative_freq</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_function_probe</key>
+ <param>
+ <key>block_id</key>
+ <value>fft_max_idx_probe</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>function_args</key>
+ <value></value>
+ </param>
+ <param>
+ <key>function_name</key>
+ <value>level</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(784, 373)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_idx</value>
+ </param>
+ <param>
+ <key>poll_rate</key>
+ <value>probe_interval</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>(fft_size/2)*0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(808, 682)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_idx_norm</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[fft_max_idx,fft_max_idx-fft_size][int(fft_max_idx&gt;(fft_size/2))]</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_function_probe</key>
+ <param>
+ <key>block_id</key>
+ <value>fft_max_lvl_probe</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>function_args</key>
+ <value></value>
+ </param>
+ <param>
+ <key>function_name</key>
+ <value>level</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(937, 652)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_lvl</value>
+ </param>
+ <param>
+ <key>poll_rate</key>
+ <value>probe_interval</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0.0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_function_probe</key>
+ <param>
+ <key>block_id</key>
+ <value>fft_max_lvl_probe_2</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>function_args</key>
+ <value></value>
+ </param>
+ <param>
+ <key>function_name</key>
+ <value>level</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1119, 1682)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_lvl_2</value>
+ </param>
+ <param>
+ <key>poll_rate</key>
+ <value>probe_interval</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0.0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1055, 490)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_lvl_log</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>math.log10([fft_max_lvl,1.0][int(fft_max_lvl==0.0)])*10.0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(947, 373)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_lvl_value</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fft_max_lvl</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1293, 1707)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_lvl_value_2</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fft_max_lvl_2</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1155, 399)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_peak_hold</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>str_to_bool(peak_hold)</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>((freq &lt;= freq_range.stop()) and (freq &gt;= freq_range.start())) or self.set_requested_freq_txt(self.src.get_center_freq()); print self.src.get_center_freq()</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(352, 665)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fix_invalid_freq</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>plain</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(277, 893)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>2, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>freq_fine</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Freq (fine)</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>freq_fine_range/2</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>-freq_fine_range/2</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_freq, 0</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.src.get_freq_range()</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>uhd.freq_range(freq,freq+1)</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(91, 795)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>freq_range</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>[gain,initial_gain][gain==float('-inf')]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>gain_range.start()</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1467, 1032)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>gain_default</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'initial_gain': initial_gain}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.src.get_gain_range()</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>uhd.gain_range(0,0,0)</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1304, 1034)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>gain_range</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>print self.src.get_antennas()</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1361, 1127)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>get_antennas</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>plain</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>'lo_locked' in self.src.get_sensor_names()</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(338, 1236)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>has_lo_locked</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>[gain,gain_range.start() + ((gain_range.stop() - gain_range.start()) * 0.25)][gain==float('-inf')]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1380, 839)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>initial_gain</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'gain_range': gain_range}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1693, 976)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>initial_gain_old</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>gain_range.start() + ((gain_range.stop() - gain_range.start()) * 0.25)</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_text_box</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>lo_offset</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(162, 729)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>4, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>lo_offset_txt</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>LO offset (only for LO offset tuning mode)</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_freq, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_function_probe</key>
+ <param>
+ <key>block_id</key>
+ <value>src</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>function_args</key>
+ <value>"'lo_locked'"</value>
+ </param>
+ <param>
+ <key>function_name</key>
+ <value>get_sensor</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(7, 1282)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>locked_probe</value>
+ </param>
+ <param>
+ <key>poll_rate</key>
+ <value>lo_check_interval * float(has_lo_locked)</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'(unknown)'</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(947, 489)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>max_bin_freq</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fft_center_freq + (((1.0*fft_max_idx_norm) / fft_size) * samp_rate)</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(947, 430)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>max_bin_freq_old</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fft_center_freq + (((1.0*fft_max_idx_norm - (fft_size/2)) / fft_size) * samp_rate)</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(666, 1121)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>max_decim</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>256</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_function_probe</key>
+ <param>
+ <key>block_id</key>
+ <value>src</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>function_args</key>
+ <value></value>
+ </param>
+ <param>
+ <key>function_name</key>
+ <value>get_mboard_sensor_names</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1950, 150)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>motherboard_sensor_names</value>
+ </param>
+ <param>
+ <key>poll_rate</key>
+ <value>sensor_interval</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[]</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>'\n'.join(map(lambda x: '%s: %s' % (x, str(self.src.get_mboard_sensor(x))), filter(lambda x: x.find('gps') != 0, self.motherboard_sensor_names)))</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'(none)'</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1954, 257)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>motherboard_sensors</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'motherboard_sensor_names': motherboard_sensor_names}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_check_box</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>false</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(7, 1154)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>relative_freq</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Baseband Frequency Axis</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ <param>
+ <key>true</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_chooser</key>
+ <param>
+ <key>choices</key>
+ <value>[1, 0]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(179, 1108)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>7, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>relative_freq</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frequency Axis</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['RF', 'Baseband']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_freq, 0</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.RA_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>drop_down</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_chooser</key>
+ <param>
+ <key>choices</key>
+ <value>[False, True]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1106, 901)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>1, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>relative_time</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Time display</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Absolute', 'Relative']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.RA_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>drop_down</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(324, 1116)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>requested_freq</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>requested_freq_txt + freq_fine</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(91, 706)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>1, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>requested_freq_txt</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Requested freq</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>[freq_range.stop(), freq_range.start() + 1.0][freq_range.start()==freq_range.stop()]</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>freq_range.start()</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_freq, 0</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>[1000,1][freq_range.start()==freq_range.stop()]</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_text_box</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(3, 748)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>1, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>requested_freq_txt</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Requested base freq</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_freq, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(608, 1062)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>requested_sample_rate</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>requested_sample_rate_base / (1.*decim)</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_text_box</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(588, 1282)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>requested_sample_rate_base</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Requested base sample rate</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_rate, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(498, 1281)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>int(actual_sample_rate)</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_chooser</key>
+ <param>
+ <key>choices</key>
+ <value>[0, 1]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0+1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1442, 4)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>scope_mode</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Scope Mode</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Complex', 'Magnitude']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 1</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.RA_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>radio_buttons</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_chooser</key>
+ <param>
+ <key>choices</key>
+ <value>[0, 1]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0+1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1465, 1432)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>scope_mode_2</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Scope Mode 2</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Complex', 'Magnitude']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 1</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.RA_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>radio_buttons</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_chooser</key>
+ <param>
+ <key>choices</key>
+ <value>antennas</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[ [antenna,antennas[0]][antenna not in antennas] ,antennas[0]][antenna=='']</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1526, 1265)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>selected_antenna</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Antenna</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>[antennas,['(default)']][antennas==('',)]</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_analog, 0</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.RA_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>radio_buttons</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(187, 5)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>selected_antenna_proxy</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>selected_antenna</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>gain_default</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1554, 906)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>selected_gain</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Gain</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>[gain_range.stop(), gain_range.start() + 1.0][gain_range.stop()==gain_range.start()]</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>gain_range.start()</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_analog, 0</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>[int((abs(gain_range.stop()-gain_range.start())/[gain_range.step(), 1.0][gain_range.step()==0])), 1][gain_range.stop()==gain_range.start()]</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(207, 65)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>selected_gain_proxy</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>selected_gain</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.src.set_antenna(self.selected_antenna)</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>none</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1526, 1127)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>set_antenna</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>plain</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'selected_antenna': selected_antenna}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_check_box</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>false</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(352, 411)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 1, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>show_max_freq</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Show max freq</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ <param>
+ <key>true</key>
+ <value>True</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_check_box</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>false</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(352, 538)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 2, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>show_max_lvl</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Show max level</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ <param>
+ <key>true</key>
+ <value>True</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_check_box</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[False, True][show_stream_tags.lower() != 'false']</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>false</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1172, 578)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>show_stream_tags_chk</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Print stream tags</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ <param>
+ <key>true</key>
+ <value>True</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_function_probe</key>
+ <param>
+ <key>block_id</key>
+ <value>probe_avg_mag</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>function_args</key>
+ <value></value>
+ </param>
+ <param>
+ <key>function_name</key>
+ <value>level</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(765, 820)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>signal_probe</value>
+ </param>
+ <param>
+ <key>poll_rate</key>
+ <value>probe_interval</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0.0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(916, 911)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>signal_probe_log</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>math.log10([signal_probe,1.0][signal_probe==0.0])*10</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>if self.spec != "": self.src.set_subdev_spec(self.spec, 0); print self.spec</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1795, 618)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>spec_proxy</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>plain</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>str_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'"' + str(locked_probe) + '"'</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(172, 1234)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>static_locked</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Locked</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_info, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1230, 251)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>str_to_bool</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>lambda x: len(x)&gt;0 and x.lower()[0] not in ['0', 'n', 'f']</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>'[' + self.src.get_subdev_spec().strip() + ']'</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'(unknown)'</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(954, 1201)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>subdev_spec</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_chooser</key>
+ <param>
+ <key>choices</key>
+ <value>[1]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(497, 497)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>test</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Test</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Reset FFT average']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.RA_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>button</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_function_probe</key>
+ <param>
+ <key>block_id</key>
+ <value>src</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>function_args</key>
+ <value></value>
+ </param>
+ <param>
+ <key>function_name</key>
+ <value>get_time_now</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1107, 702)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>time_probe</value>
+ </param>
+ <param>
+ <key>poll_rate</key>
+ <value>sensor_interval</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>uhd.time_spec_t()</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_chooser</key>
+ <param>
+ <key>choices</key>
+ <value>[0, 1, 2]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[1,0][lo_offset==0.0]</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 1017)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>tune_mode</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Tune mode</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Auto (no LO offset)', 'Auto with LO offset', 'Manual (no DSP)']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_freq, 0</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.RA_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>drop_down</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(176, 868)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>tune_obj</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[requested_freq, uhd.tune_request(requested_freq, lo_offset_txt), uhd.tune_request(requested_freq, dsp_freq=0, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)][tune_mode]</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.src.set_center_freq(self.tune_obj)</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>uhd.tune_result_t()</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(346, 88)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>tune_result</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'tune_obj': tune_obj}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>if self.ref != '': self.src.set_clock_source(self.ref, 0); print 'Ref =', self.ref;</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1314, 748)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>update_clock_source</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>plain</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'ref': ref}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>if self.pps != '': self.src.set_time_source(self.pps, 0); print '1 PPS =', self.pps;</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1316, 664)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>update_time_source</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>plain</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'pps': pps}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>'%s (\'%s\'), %s' % (self.src.get_usrp_info().get('mboard_id'), self.src.get_usrp_info().get('mboard_name'), self.src.get_usrp_info().get('rx_subdev_name'))</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'(unknown)'</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1240, 1201)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>usrp_info</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>',\n'.join(map(lambda x: '%s: %s'%(x,self.src.get_usrp_info().get(x)), self.src.get_usrp_info().keys()))</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'(unknown)'</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1096, 1201)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>usrp_info_all</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>[self.src.set_auto_dc_offset(self.auto_dc_offset_removal), self.auto_dc_offset_removal or self.src.set_dc_offset(0+0j)]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(536, 744)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_any_code_auto_dc_offset_removal</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>plain</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'auto_dc_offset_removal': auto_dc_offset_removal}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.fft_sink.win['average'] = fft_averaging</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fft_averaging</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(354, 227)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_any_code_fft_sink_ave</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'averaging': fft_averaging}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.fft_sink.win['peak_hold'] = fft_peak_hold</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fft_peak_hold</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(355, 142)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_any_code_fft_sink_peak_hold</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'peak_hold': fft_peak_hold}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>[self.src.set_auto_iq_balance(self.auto_iq_correction), self.auto_iq_correction or self.src.set_iq_balance(0+0j)]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>inline</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(583, 940)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_any_code_iq_correction</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>plain</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'auto_iq_correction': auto_iq_correction}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_any_code</key>
+ <param>
+ <key>callback_mode</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>code</key>
+ <value>self.waterfall_sink.win['average'] = fft_averaging</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fft_averaging</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>first_eval</key>
+ <value>post</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(171, 643)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_any_code_waterfall_ave</value>
+ </param>
+ <param>
+ <key>injection</key>
+ <value>variable</value>
+ </param>
+ <param>
+ <key>deps</key>
+ <value>{'averaging': fft_averaging}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_config</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>config_file</key>
+ <value>default</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1670, 1266)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_config_0</value>
+ </param>
+ <param>
+ <key>option</key>
+ <value>key</value>
+ </param>
+ <param>
+ <key>section</key>
+ <value>main</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>real</value>
+ </param>
+ <param>
+ <key>writeback</key>
+ <value>None</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>actual_center_freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(343, 724)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_actual_center_freq</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Actual center frequency</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_freq, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>tune_result.actual_dsp_freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(5, 943)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>6, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_actual_dsp_freq</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Actual DSP freq</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_freq, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>actual_sample_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(762, 1196)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 1, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_actual_sample_rate</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Actual</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_rate, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>int_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fft_max_idx</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(779, 473)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_fft_max_idx</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Idx</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fft_max_lvl</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(948, 552)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_fft_max_lvl_log</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Peak magnitude (dB)</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>str_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>window_fn_name_map[window]</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1628, 204)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_fft_window_name</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>FFT window</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_info, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>str_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>gain_range.to_pp_string().strip()</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1623, 1032)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_gain_range</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Gain Range</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>signal_probe_log</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(748, 918)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_level_probe</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Signal mag^2 (dB)</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>max_bin_freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(767, 579)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_max_bin_freq</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Peak freq</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>requested_freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(271, 793)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>3, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_requested_freq</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Requested base + fine freq</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_freq, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>tune_result.actual_rf_freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(5, 843)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>5, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_rf_freq</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Actual RF freq</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_freq, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>str_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>subdev_spec</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(955, 1285)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>1, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_subdev_spec</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Sub-device</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_info, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>str_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>motherboard_sensors</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1955, 30)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_text_0</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Motherboard</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 3</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>str_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>daughterboard_sensors</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(2153, 37)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>2, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_text_0_0</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Daughterboard</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 3</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>str_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>str( [time.ctime(time_probe.get_real_secs()), datetime.timedelta(seconds=time_probe.get_real_secs()), time.gmtime(time_probe.get_real_secs())] [relative_time])</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1105, 802)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>1, 1, 1, 2</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_time_now</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Time now</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_static_text</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>str_converter</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>usrp_info</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>formatter</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1123, 1286)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 0, 1, 1*10</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>variable_static_usrp_info</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>USRP</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_info, 0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1538, 198)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>window_fn</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>window_fn_map[window]</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1636, 144)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>window_fn_map</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>{'auto': None, 'bh': fft_win.blackmanharris, 'ham': fft_win.hamming, 'han': fft_win.hanning, 'rect': fft_win.rectangular, 'flat': fft_win.flattop}</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1648, 3)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>window_fn_name_map</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>{'auto': 'Auto', 'bh': 'Blackman-Harris', 'ham': 'Hamming', 'han': 'Hanning', 'rect': 'Rectangular', 'flat': 'Flattop'}</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1367, 1295)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>antenna</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Antenna (blank for default)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value>A</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value></value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1635, 519)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>args</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>UHD device args</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value>a</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value></value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1525, 399)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>ave</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Average FFT</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1*0 + 0.5</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1268, 311)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>averaging</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Enable FFT averaging</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>True</value>
+ </param>
+ </block>
+ <block>
+ <key>baz_time_panel</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>auto</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1106, 1070)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>1, 2, 1, 2</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>baz_time_panel_0</value>
+ </param>
+ <param>
+ <key>ignore_next_trigger</key>
+ <value>['rx_rate', 'rx_freq']</value>
+ </param>
+ <param>
+ <key>item_size</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_test, 0</value>
+ </param>
+ <param>
+ <key>relative</key>
+ <value>relative_time</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>4</value>
+ </param>
+ </block>
+ <block>
+ <key>blks2_logpwrfft_x</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(571, 275)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blks2_logpwrfft_x_0</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>avg_alpha</key>
+ <value>fft_ave_probe</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>fft_size</value>
+ </param>
+ <param>
+ <key>frame_rate</key>
+ <value>fft_rate</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>fft_ref_scale</value>
+ </param>
+ <param>
+ <key>sample_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ </block>
+ <block>
+ <key>blks2_selector</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1301, 51)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blks2_selector_0</value>
+ </param>
+ <param>
+ <key>input_index</key>
+ <value>scope_mode</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>num_outputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>output_index</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blks2_selector</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1083, 51)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blks2_selector_0_0</value>
+ </param>
+ <param>
+ <key>input_index</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_outputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>output_index</key>
+ <value>scope_mode</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blks2_selector</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1094, 1423)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blks2_selector_0_0_0</value>
+ </param>
+ <param>
+ <key>input_index</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_outputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>output_index</key>
+ <value>scope_mode_2</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blks2_selector</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1312, 1423)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blks2_selector_0_1</value>
+ </param>
+ <param>
+ <key>input_index</key>
+ <value>scope_mode_2</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>num_outputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>output_index</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_argmax_xx</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(793, 259)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_argmax_xx_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>fft_size</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_argmax_xx</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(804, 1631)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_argmax_xx_0_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>fft_size</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_complex_to_mag</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1083, 121)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_complex_to_mag_0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_complex_to_mag</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1094, 1493)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_complex_to_mag_0_0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_complex_to_mag</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(823, 204)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_complex_to_mag_1</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>fft_size</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_float_to_complex</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1076, 160)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_float_to_complex_0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_float_to_complex</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1087, 1532)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_float_to_complex_0_0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_max_xx</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(792, 326)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_max_xx_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>fft_size</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_max_xx</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(803, 1698)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_max_xx_0_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>fft_size</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_null_sink</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bus_conns</key>
+ <value>[[0,],]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1002, 291)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_null_sink_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_null_sink</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bus_conns</key>
+ <value>[[0,],]</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1013, 1663)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_null_sink_0_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_stream_to_vector</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(572, 132)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_stream_to_vector_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_items</key>
+ <value>fft_size</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tag_debug</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>display</key>
+ <value>show_stream_tags_chk</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1266, 521)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_tag_debug_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>filter</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1630, 815)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>bw</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Daughterboard bandwidth (where appropriate)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1663, 311)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>dyn_rng</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Dynamic Range</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>130</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_probe_signal_x</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1002, 259)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_idx_probe</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>short</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_probe_signal_x</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1013, 1631)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_idx_probe_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>short</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_probe_signal_x</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1001, 330)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_lvl_probe</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_probe_signal_x</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1012, 1702)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_max_lvl_probe_2</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1425, 400)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_rate</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>FFT Rate</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>15</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1647, 399)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_ref_scale</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>FFT Ref Scale (p2p)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2.0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
+ <param>
+ <key>avg_alpha</key>
+ <value>ave</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>fft_center_freq</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>1024*0 + fft_size</value>
+ </param>
+ <param>
+ <key>freqvar</key>
+ <value>clicked_freq</value>
+ </param>
+ <param>
+ <key>freq_of_interest</key>
+ <value>float('inf')</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(162, 176)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_sink</value>
+ </param>
+ <param>
+ <key>fft_in</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 0</value>
+ </param>
+ <param>
+ <key>fft_out</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>ref_lvl</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>fft_ref_scale</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>fft_rate</value>
+ </param>
+ <param>
+ <key>always_run</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>threshold_level</key>
+ <value>float('inf')</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>FFT Plot</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>win</key>
+ <value>window_fn</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>int(dyn_rng/10)</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>10</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
+ <param>
+ <key>avg_alpha</key>
+ <value>ave</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>fft_center_freq</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>1024*0 + fft_size</value>
+ </param>
+ <param>
+ <key>freqvar</key>
+ <value>clicked_freq</value>
+ </param>
+ <param>
+ <key>freq_of_interest</key>
+ <value>[None,max_bin_freq][show_max_freq]</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(215, 258)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_sink_2</value>
+ </param>
+ <param>
+ <key>fft_in</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 0</value>
+ </param>
+ <param>
+ <key>fft_out</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>ref_lvl</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>fft_ref_scale</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>fft_rate</value>
+ </param>
+ <param>
+ <key>always_run</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>threshold_level</key>
+ <value>[None,fft_max_lvl_value][show_max_lvl]</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>FFT Plot</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>win</key>
+ <value>window_fn</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>int(dyn_rng/10)</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>10</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
+ <param>
+ <key>avg_alpha</key>
+ <value>ave</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>fft_center_freq</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>1024*0 + fft_size</value>
+ </param>
+ <param>
+ <key>freqvar</key>
+ <value>clicked_freq</value>
+ </param>
+ <param>
+ <key>freq_of_interest</key>
+ <value>float('inf')</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(363, 1414)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_sink_two</value>
+ </param>
+ <param>
+ <key>fft_in</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 0</value>
+ </param>
+ <param>
+ <key>fft_out</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>ref_lvl</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>fft_ref_scale</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>fft_rate</value>
+ </param>
+ <param>
+ <key>always_run</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>threshold_level</key>
+ <value>[None,fft_max_lvl_value_2][show_max_lvl]</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>FFT Plot 2</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>win</key>
+ <value>window_fn</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>int(dyn_rng/10)</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>10</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
+ <param>
+ <key>avg_alpha</key>
+ <value>ave</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>fft_center_freq</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>1024*0 + fft_size</value>
+ </param>
+ <param>
+ <key>freqvar</key>
+ <value>clicked_freq</value>
+ </param>
+ <param>
+ <key>freq_of_interest</key>
+ <value>float('inf')</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(201, 1413)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_sink_two_1</value>
+ </param>
+ <param>
+ <key>fft_in</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 0</value>
+ </param>
+ <param>
+ <key>fft_out</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>ref_lvl</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>fft_ref_scale</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>fft_rate</value>
+ </param>
+ <param>
+ <key>always_run</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>threshold_level</key>
+ <value>float('inf')</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>FFT Plot 2</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>win</key>
+ <value>window_fn</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>int(dyn_rng/10)</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>10</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1429, 312)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_size</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>FFT Size</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1024</value>
+ </param>
+ </block>
+ <block>
+ <key>fft_vxx</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>fft_size</value>
+ </param>
+ <param>
+ <key>forward</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(571, 176)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>fft_vxx_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>nthreads</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>shift</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>window</key>
+ <value>[fft_win.blackmanharris(fft_size),window_fn][int(window_fn!=None)]</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(173, 926)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frequency</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value>f</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0 + 100e6</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(415, 830)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>freq_fine_range</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Fine frequency slider range</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2e6</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1394, 927)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>gain</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Gain (default '-inf' selects relative gain of 25%)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value>g</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>float("-inf")</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1310, 928)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>gain_auto</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Gain</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value>g</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>gain_range.start() + ((gain_range.stop() - gain_range.start()) * 0.25)</value>
+ </param>
+ </block>
+ <block>
+ <key>import</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1532, 258)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>import_0</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>from gnuradio.fft import window as fft_win</value>
+ </param>
+ </block>
+ <block>
+ <key>import</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1271, 849)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>import_1</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>import time, datetime</value>
+ </param>
+ </block>
+ <block>
+ <key>import</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1, 703)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>import_math</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>import math</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(172, 1324)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>lo_check_interval</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>LO lock check frequency (Hz)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>5</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(339, 1024)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>lo_offset</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>LO offset (selects LO offset tuning mode)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>logpwrfft_x</key>
+ <param>
+ <key>avg_alpha</key>
+ <value>fft_ave_probe</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>fft_size</value>
+ </param>
+ <param>
+ <key>frame_rate</key>
+ <value>fft_rate</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(574, 278)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>logpwrfft_x_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>fft_ref_scale</value>
+ </param>
+ <param>
+ <key>sample_rate</key>
+ <value>samp_rate</value>
+ </param>
+ </block>
+ <block>
+ <key>logpwrfft_x</key>
+ <param>
+ <key>avg_alpha</key>
+ <value>fft_ave_probe</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>fft_size</value>
+ </param>
+ <param>
+ <key>frame_rate</key>
+ <value>fft_rate</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(585, 1650)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>logpwrfft_x_0_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>fft_ref_scale</value>
+ </param>
+ <param>
+ <key>sample_rate</key>
+ <value>samp_rate</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(913, 825)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>mag_alpha</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Signal magnitude probe alpha</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1e-3</value>
+ </param>
+ </block>
+ <block>
+ <key>notebook</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 82)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>nb</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['FFT', 'Scope', 'Waterfall', 'Sensors']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.NB_TOP</value>
+ </param>
+ </block>
+ <block>
+ <key>notebook</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(6, 352)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>nb_analog</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Analog', 'DC']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_right, 0</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.NB_LEFT</value>
+ </param>
+ </block>
+ <block>
+ <key>notebook</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(4, 532)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>nb_freq</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Freq']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_right, 0</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.NB_LEFT</value>
+ </param>
+ </block>
+ <block>
+ <key>notebook</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(6, 168)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>nb_info</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Info']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_right, 0</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.NB_LEFT</value>
+ </param>
+ </block>
+ <block>
+ <key>notebook</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(5, 615)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>nb_rate</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Rate']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_right, 0</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.NB_LEFT</value>
+ </param>
+ </block>
+ <block>
+ <key>notebook</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(6, 265)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 1, 1, 1</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>nb_right</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Params']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.NB_TOP</value>
+ </param>
+ </block>
+ <block>
+ <key>notebook</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(6, 442)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>nb_test</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>['Test']</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb_right, 0</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.NB_LEFT</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1146, 312)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>peak_hold</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>FFT peak hold</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>False</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1630, 730)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>pps</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Time source (none, internal, external, mimo, gpsdo). &lt;empty&gt; leaves it at the default.</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>''</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_probe_avg_mag_sqrd_x</key>
+ <param>
+ <key>alpha</key>
+ <value>mag_alpha</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(945, 768)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>probe_avg_mag</value>
+ </param>
+ <param>
+ <key>threshold</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>c</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(908, 967)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>probe_interval</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Signal probe frequency (Hz)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>3</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(644, 1183)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Sample Rate</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value>s</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1e6</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1467, 730)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>ref</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Clock source (internal, external, mimo, gpsdo). &lt;empty&gt; leaves it at the default.</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>''</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1527, 311)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>ref_lvl</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Reference Level</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(936, 1087)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>sensor_interval</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Sensor update frequency (Hz)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>eng_float</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1323, 580)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>show_stream_tags</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Print stream tags</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>False</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1634, 618)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>spec</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Sub-device specification (where appropriate)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>''</value>
+ </param>
+ </block>
+ <block>
+ <key>uhd_usrp_source</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>ant0</key>
+ <value>selected_antenna_proxy</value>
+ </param>
+ <param>
+ <key>bw0</key>
+ <value>bw</value>
+ </param>
+ <param>
+ <key>center_freq0</key>
+ <value>uhd.tune_request(freq, lo_offset)</value>
+ </param>
+ <param>
+ <key>norm_gain0</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain0</key>
+ <value>selected_gain_proxy</value>
+ </param>
+ <param>
+ <key>ant10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain10</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant11</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain11</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant12</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain12</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant13</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain13</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant14</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain14</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant15</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain15</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant16</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain16</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant17</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain17</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant18</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain18</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant19</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain19</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain1</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant20</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain20</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant21</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain21</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant22</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain22</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant23</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain23</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant24</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain24</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant25</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain25</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant26</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain26</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant27</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain27</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant28</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain28</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant29</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain29</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain2</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant30</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain30</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant31</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain31</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain3</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain4</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain5</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain6</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain7</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain8</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain9</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>clock_rate</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>dev_addr</key>
+ <value>args</value>
+ </param>
+ <param>
+ <key>dev_args</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(344, 4)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>src</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>clock_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec0</key>
+ <value>spec</value>
+ </param>
+ <param>
+ <key>time_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>nchan</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_mboards</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>fc32</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>requested_sample_rate</value>
+ </param>
+ <param>
+ <key>stream_args</key>
+ <value>stream_args</value>
+ </param>
+ <param>
+ <key>stream_chans</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>stream_immediately</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>sync</key>
+ <value></value>
+ </param>
+ <param>
+ <key>otw</key>
+ <value>wire_format</value>
+ </param>
+ </block>
+ <block>
+ <key>uhd_usrp_source</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>ant0</key>
+ <value>selected_antenna_proxy</value>
+ </param>
+ <param>
+ <key>bw0</key>
+ <value>bw</value>
+ </param>
+ <param>
+ <key>center_freq0</key>
+ <value>uhd.tune_request(freq, lo_offset)</value>
+ </param>
+ <param>
+ <key>norm_gain0</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain0</key>
+ <value>selected_gain_proxy</value>
+ </param>
+ <param>
+ <key>ant10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain10</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant11</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain11</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant12</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain12</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant13</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain13</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant14</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain14</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant15</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain15</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant16</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain16</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant17</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain17</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant18</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain18</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant19</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain19</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant1</key>
+ <value>selected_antenna_proxy</value>
+ </param>
+ <param>
+ <key>bw1</key>
+ <value>bw</value>
+ </param>
+ <param>
+ <key>center_freq1</key>
+ <value>uhd.tune_request(freq, lo_offset)</value>
+ </param>
+ <param>
+ <key>norm_gain1</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain1</key>
+ <value>selected_gain_proxy</value>
+ </param>
+ <param>
+ <key>ant20</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain20</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant21</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain21</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant22</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain22</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant23</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain23</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant24</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain24</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant25</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain25</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant26</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain26</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant27</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain27</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant28</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain28</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant29</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain29</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain2</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant30</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain30</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant31</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain31</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain3</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain4</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain5</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain6</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain7</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain8</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>norm_gain9</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>gain9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>clock_rate</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>dev_addr</key>
+ <value>args</value>
+ </param>
+ <param>
+ <key>dev_args</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(344, 50)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>src_2</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>clock_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec0</key>
+ <value>spec</value>
+ </param>
+ <param>
+ <key>time_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>nchan</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>num_mboards</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>fc32</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>requested_sample_rate</value>
+ </param>
+ <param>
+ <key>stream_args</key>
+ <value>stream_args</value>
+ </param>
+ <param>
+ <key>stream_chans</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>stream_immediately</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>sync</key>
+ <value></value>
+ </param>
+ <param>
+ <key>otw</key>
+ <value>wire_format</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1462, 617)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>stream_args</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Stream arguments (e.g. scalar=1024)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value></value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_sink</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(624, 4)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>virtual_sink_0</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>bb</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_sink</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(624, 45)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>virtual_sink_0_0</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>bb2</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_source</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1246, 478)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>virtual_source_0</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>bb</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_source</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1081, 5)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>virtual_source_0_0</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>bb</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_source</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(173, 128)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>virtual_source_0_0_0</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>bb</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_source</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(760, 775)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>virtual_source_0_0_0_0</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>bb</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_source</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1106, 1027)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>virtual_source_0_1</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>bb</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_source</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(571, 88)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>virtual_source_0_2</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>bb</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_source</key>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(27, 1456)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>virtual_source_0_2_0</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>bb2</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_waterfallsink2</key>
+ <param>
+ <key>avg_alpha</key>
+ <value>ave</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>fft_center_freq</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>dynamic_range</key>
+ <value>dyn_rng</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>fft_rate</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>512*0 + fft_size</value>
+ </param>
+ <param>
+ <key>freqvar</key>
+ <value>clicked_freq</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(177, 458)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>waterfall_sink</value>
+ </param>
+ <param>
+ <key>fft_in</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 2</value>
+ </param>
+ <param>
+ <key>fft_out</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>fft_ref_scale</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>ref_lvl</value>
+ </param>
+ <param>
+ <key>always_run</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Waterfall Plot</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>win</key>
+ <value>window_fn</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_waterfallsink2</key>
+ <param>
+ <key>avg_alpha</key>
+ <value>ave</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>fft_center_freq</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>dynamic_range</key>
+ <value>dyn_rng</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>fft_rate</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>512*0 + fft_size</value>
+ </param>
+ <param>
+ <key>freqvar</key>
+ <value>clicked_freq</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(181, 1616)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>waterfall_sink_0</value>
+ </param>
+ <param>
+ <key>fft_in</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 2</value>
+ </param>
+ <param>
+ <key>fft_out</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>fft_ref_scale</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>ref_lvl</value>
+ </param>
+ <param>
+ <key>always_run</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Waterfall Plot 2</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>win</key>
+ <value>window_fn</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1641, 60)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>window</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Window (bh: Blackman-Harris, ham: Hamming, han: Hanning, rect: Rectangular, flat: Flattop)</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>auto</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1471, 531)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>wire_format</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Wire format (e.g. sc16, sc8) [blank = automatic]</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value></value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_scopesink2</key>
+ <param>
+ <key>ac_couple</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1291, 119)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>wxgui_scopesink2_0</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 1</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Scope Plot</value>
+ </param>
+ <param>
+ <key>trig_mode</key>
+ <value>wxgui.TRIG_MODE_AUTO</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>v_offset</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>v_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>xy_mode</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>y_axis_label</key>
+ <value>Counts</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_scopesink2</key>
+ <param>
+ <key>ac_couple</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1302, 1491)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>wxgui_scopesink2_0_0</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>nb, 1</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Scope Plot 2</value>
+ </param>
+ <param>
+ <key>trig_mode</key>
+ <value>wxgui.TRIG_MODE_AUTO</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>v_offset</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>v_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>xy_mode</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>y_axis_label</key>
+ <value>Counts</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blks2_logpwrfft_x_0</source_block_id>
+ <sink_block_id>blocks_argmax_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blks2_logpwrfft_x_0</source_block_id>
+ <sink_block_id>blocks_max_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blks2_selector_0</source_block_id>
+ <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blks2_selector_0_0</source_block_id>
+ <sink_block_id>blks2_selector_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blks2_selector_0_0</source_block_id>
+ <sink_block_id>blocks_complex_to_mag_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blks2_selector_0_0_0</source_block_id>
+ <sink_block_id>blks2_selector_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blks2_selector_0_0_0</source_block_id>
+ <sink_block_id>blocks_complex_to_mag_0_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blks2_selector_0_1</source_block_id>
+ <sink_block_id>wxgui_scopesink2_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_argmax_xx_0</source_block_id>
+ <sink_block_id>blocks_null_sink_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_argmax_xx_0</source_block_id>
+ <sink_block_id>fft_max_idx_probe</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_argmax_xx_0_0</source_block_id>
+ <sink_block_id>blocks_null_sink_0_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_argmax_xx_0_0</source_block_id>
+ <sink_block_id>fft_max_idx_probe_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_complex_to_mag_0</source_block_id>
+ <sink_block_id>blocks_float_to_complex_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_complex_to_mag_0</source_block_id>
+ <sink_block_id>blocks_float_to_complex_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_complex_to_mag_0_0</source_block_id>
+ <sink_block_id>blocks_float_to_complex_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_complex_to_mag_0_0</source_block_id>
+ <sink_block_id>blocks_float_to_complex_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_complex_to_mag_1</source_block_id>
+ <sink_block_id>blocks_argmax_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_complex_to_mag_1</source_block_id>
+ <sink_block_id>blocks_max_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_float_to_complex_0</source_block_id>
+ <sink_block_id>blks2_selector_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_float_to_complex_0_0</source_block_id>
+ <sink_block_id>blks2_selector_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_max_xx_0</source_block_id>
+ <sink_block_id>fft_max_lvl_probe</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_max_xx_0_0</source_block_id>
+ <sink_block_id>fft_max_lvl_probe_2</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_stream_to_vector_0</source_block_id>
+ <sink_block_id>fft_vxx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fft_vxx_0</source_block_id>
+ <sink_block_id>blocks_complex_to_mag_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>logpwrfft_x_0</source_block_id>
+ <sink_block_id>blocks_argmax_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>logpwrfft_x_0</source_block_id>
+ <sink_block_id>blocks_max_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>logpwrfft_x_0_0</source_block_id>
+ <sink_block_id>blocks_argmax_xx_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>logpwrfft_x_0_0</source_block_id>
+ <sink_block_id>blocks_max_xx_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>src</source_block_id>
+ <sink_block_id>virtual_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>src_2</source_block_id>
+ <sink_block_id>virtual_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>src_2</source_block_id>
+ <sink_block_id>virtual_sink_0_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0</source_block_id>
+ <sink_block_id>blocks_tag_debug_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_0</source_block_id>
+ <sink_block_id>blks2_selector_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_0_0</source_block_id>
+ <sink_block_id>fft_sink</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_0_0</source_block_id>
+ <sink_block_id>fft_sink_2</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_0_0</source_block_id>
+ <sink_block_id>waterfall_sink</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_0_0_0</source_block_id>
+ <sink_block_id>probe_avg_mag</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_1</source_block_id>
+ <sink_block_id>baz_time_panel_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_2</source_block_id>
+ <sink_block_id>blks2_logpwrfft_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_2</source_block_id>
+ <sink_block_id>blocks_stream_to_vector_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_2</source_block_id>
+ <sink_block_id>logpwrfft_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_2_0</source_block_id>
+ <sink_block_id>blks2_selector_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_2_0</source_block_id>
+ <sink_block_id>fft_sink_two</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_2_0</source_block_id>
+ <sink_block_id>fft_sink_two_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_2_0</source_block_id>
+ <sink_block_id>logpwrfft_x_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_2_0</source_block_id>
+ <sink_block_id>waterfall_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/tools/mega_fft/README.md b/tools/mega_fft/README.md
new file mode 100644
index 000000000..c61207ec7
--- /dev/null
+++ b/tools/mega_fft/README.md
@@ -0,0 +1,7 @@
+== MegaFFT ==
+
+Highly configurable tool similar to `uhd_fft`.
+
+Requirements:
+* gr-baz required for GRC version
+
diff --git a/tools/mega_fft/mega_fft.py b/tools/mega_fft/mega_fft.py
new file mode 100755
index 000000000..8dab89f4f
--- /dev/null
+++ b/tools/mega_fft/mega_fft.py
@@ -0,0 +1,2645 @@
+#!/usr/bin/env python2
+##################################################
+# GNU Radio Python Flow Graph
+# Title: Mega FFT
+# Author: Balint Seeber, Ettus Research
+# Description: Standard edition, single-channel
+# Generated: Fri Jul 24 11:56:33 2015
+##################################################
+
+if __name__ == '__main__':
+ import ctypes
+ import sys
+ if sys.platform.startswith('linux'):
+ try:
+ x11 = ctypes.cdll.LoadLibrary('libX11.so')
+ x11.XInitThreads()
+ except:
+ print "Warning: failed to XInitThreads()"
+
+from gnuradio import analog
+from gnuradio import blocks
+from gnuradio import eng_notation
+from gnuradio import gr
+from gnuradio import uhd
+from gnuradio import wxgui
+from gnuradio.eng_option import eng_option
+from gnuradio.fft import logpwrfft
+from gnuradio.fft import window
+from gnuradio.fft import window as fft_win
+from gnuradio.filter import firdes
+from gnuradio.wxgui import fftsink2
+from gnuradio.wxgui import forms
+from gnuradio.wxgui import scopesink2
+from gnuradio.wxgui import waterfallsink2
+from grc_gnuradio import blks2 as grc_blks2
+from grc_gnuradio import wxgui as grc_wxgui
+from optparse import OptionParser
+import math
+import threading
+import time
+import time, datetime
+import wx
+
+class mega_fft(grc_wxgui.top_block_gui):
+
+ def __init__(self, antenna="", args="", ave=1*0 + 0.5, averaging="True", bw=0, dyn_rng=130, fft_rate=15, fft_ref_scale=2.0, fft_size=1024, freq=0 + 100e6, freq_fine_range=2e6, gain=float("-inf"), lo_check_interval=5, lo_offset=0, mag_alpha=1e-3, peak_hold="False", pps='', probe_interval=3, rate=1e6, ref='', ref_lvl=0, sensor_interval=2, show_stream_tags="False", spec='', stream_args="", window="auto", wire_format=""):
+ grc_wxgui.top_block_gui.__init__(self, title="Mega FFT")
+
+ ##################################################
+ # Parameters
+ ##################################################
+ self.antenna = antenna
+ self.args = args
+ self.ave = ave
+ self.averaging = averaging
+ self.bw = bw
+ self.dyn_rng = dyn_rng
+ self.fft_rate = fft_rate
+ self.fft_ref_scale = fft_ref_scale
+ self.fft_size = fft_size
+ self.freq = freq
+ self.freq_fine_range = freq_fine_range
+ self.gain = gain
+ self.lo_check_interval = lo_check_interval
+ self.lo_offset = lo_offset
+ self.mag_alpha = mag_alpha
+ self.peak_hold = peak_hold
+ self.pps = pps
+ self.probe_interval = probe_interval
+ self.rate = rate
+ self.ref = ref
+ self.ref_lvl = ref_lvl
+ self.sensor_interval = sensor_interval
+ self.show_stream_tags = show_stream_tags
+ self.spec = spec
+ self.stream_args = stream_args
+ self.window = window
+ self.wire_format = wire_format
+
+ ##################################################
+ # Variables
+ ##################################################
+ self.relative_freq = relative_freq = 1
+ self.gain_range = gain_range = uhd.gain_range(0,0,0)
+ self.fft_max_idx = fft_max_idx = (fft_size/2)*0
+ self.actual_sample_rate = actual_sample_rate = rate
+ self.actual_center_freq = actual_center_freq = 0
+ self.str_to_bool = str_to_bool = lambda x: len(x)>0 and x.lower()[0] not in ['0', 'n', 'f']
+ self.signal_probe = signal_probe = 0.0
+ self.samp_rate = samp_rate = int(actual_sample_rate)
+ self.requested_freq_txt = requested_freq_txt = freq
+ self.gain_default = gain_default = gain_range.start()
+ self.freq_fine = freq_fine = 0
+ self.fft_max_idx_norm = fft_max_idx_norm = [fft_max_idx,fft_max_idx-fft_size][int(fft_max_idx>(fft_size/2))]
+ self.fft_center_freq = fft_center_freq = actual_center_freq * relative_freq
+ self.antennas = antennas = ['']
+ self.window_fn_name_map = window_fn_name_map = {'auto': 'Auto', 'bh': 'Blackman-Harris', 'ham': 'Hamming', 'han': 'Hanning', 'rect': 'Rectangular', 'flat': 'Flattop'}
+ self.window_fn_map = window_fn_map = {'auto': None, 'bh': fft_win.blackmanharris, 'ham': fft_win.hamming, 'han': fft_win.hanning, 'rect': fft_win.rectangular, 'flat': fft_win.flattop}
+ self.usrp_info = usrp_info = '(unknown)'
+ self.tune_result = tune_result = uhd.tune_result_t()
+ self.tune_mode = tune_mode = [1,0][lo_offset==0.0]
+ self.time_probe = time_probe = uhd.time_spec_t()
+ self.test = test = 1
+ self.subdev_spec = subdev_spec = '(unknown)'
+ self.signal_probe_log = signal_probe_log = math.log10([signal_probe,1.0][signal_probe==0.0])*10
+ self.selected_gain = selected_gain = gain_default
+ self.selected_antenna = selected_antenna = [ [antenna,antennas[0]][antenna not in antennas] ,antennas[0]][antenna=='']
+ self.requested_sample_rate_base = requested_sample_rate_base = rate
+ self.requested_freq = requested_freq = requested_freq_txt + freq_fine
+ self.relative_time = relative_time = True
+ self.motherboard_sensors = motherboard_sensors = '(none)'
+ self.max_bin_freq = max_bin_freq = fft_center_freq + (((1.0*fft_max_idx_norm) / fft_size) * samp_rate)
+ self.locked_probe = locked_probe = '(unknown)'
+ self.lo_offset_txt = lo_offset_txt = lo_offset
+ self.fft_peak_hold = fft_peak_hold = str_to_bool(peak_hold)
+ self.fft_max_lvl = fft_max_lvl = 0.0
+ self.fft_averaging = fft_averaging = str_to_bool(averaging)
+ self.decim = decim = 1
+ self.daughterboard_sensors = daughterboard_sensors = '(none)'
+ self.clicked_freq = clicked_freq = 0
+ self.window_fn = window_fn = window_fn_map[window]
+ self.variable_static_usrp_info = variable_static_usrp_info = usrp_info
+ self.variable_static_time_now = variable_static_time_now = str( [time.ctime(time_probe.get_real_secs()), datetime.timedelta(seconds=time_probe.get_real_secs()), time.gmtime(time_probe.get_real_secs())] [relative_time])
+ self.variable_static_text_0_0 = variable_static_text_0_0 = daughterboard_sensors
+ self.variable_static_text_0 = variable_static_text_0 = motherboard_sensors
+ self.variable_static_subdev_spec = variable_static_subdev_spec = subdev_spec
+ self.variable_static_rf_freq = variable_static_rf_freq = tune_result.actual_rf_freq
+ self.variable_static_requested_freq = variable_static_requested_freq = requested_freq
+ self.variable_static_max_bin_freq = variable_static_max_bin_freq = max_bin_freq
+ self.variable_static_level_probe = variable_static_level_probe = signal_probe_log
+ self.variable_static_fft_window_name = variable_static_fft_window_name = window_fn_name_map[window]
+ self.variable_static_fft_max_lvl_log = variable_static_fft_max_lvl_log = fft_max_lvl
+ self.variable_static_actual_sample_rate = variable_static_actual_sample_rate = actual_sample_rate
+ self.variable_static_actual_dsp_freq = variable_static_actual_dsp_freq = tune_result.actual_dsp_freq
+ self.variable_any_code_waterfall_ave = variable_any_code_waterfall_ave = fft_averaging
+ self.variable_any_code_iq_correction = variable_any_code_iq_correction = None
+ self.variable_any_code_fft_sink_peak_hold = variable_any_code_fft_sink_peak_hold = fft_peak_hold
+ self.variable_any_code_fft_sink_ave = variable_any_code_fft_sink_ave = fft_averaging
+ self.variable_any_code_auto_dc_offset_removal = variable_any_code_auto_dc_offset_removal = None
+ self.update_time_source = update_time_source = None
+ self.update_clock_source = update_clock_source = None
+ self.tune_obj = tune_obj = [requested_freq, uhd.tune_request(requested_freq, lo_offset_txt), uhd.tune_request(requested_freq, dsp_freq=0, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)][tune_mode]
+ self.static_locked = static_locked = '"' + str(locked_probe) + '"'
+ self.show_stream_tags_chk = show_stream_tags_chk = [False, True][show_stream_tags.lower() != 'false']
+ self.show_max_lvl = show_max_lvl = True
+ self.show_max_freq = show_max_freq = True
+ self.selected_gain_proxy = selected_gain_proxy = selected_gain
+ self.selected_antenna_proxy = selected_antenna_proxy = selected_antenna
+ self.scope_mode = scope_mode = 0+1
+ self.requested_sample_rate = requested_sample_rate = requested_sample_rate_base / (1.*decim)
+ self.motherboard_sensor_names = motherboard_sensor_names = []
+ self.max_decim = max_decim = 256
+ self.initial_gain = initial_gain = 0
+ self.has_lo_locked = has_lo_locked = False
+ self.freq_range = freq_range = uhd.freq_range(freq,freq+1)
+ self.fix_invalid_freq = fix_invalid_freq = None
+ self.fft_max_lvl_value = fft_max_lvl_value = fft_max_lvl
+ self.fft_ave_probe = fft_ave_probe = ave
+ self.daughterboard_sensor_names = daughterboard_sensor_names = []
+ self.clicked_freq_txt = clicked_freq_txt = clicked_freq
+ self.auto_iq_correction = auto_iq_correction = True
+ self.auto_dc_offset_removal = auto_dc_offset_removal = True
+ self.any_test_1 = any_test_1 = test
+
+ ##################################################
+ # Blocks
+ ##################################################
+ self.src = uhd.usrp_source(
+ ",".join((args, "")),
+ uhd.stream_args(
+ cpu_format="fc32",
+ channels=range(1),
+ ),
+
+ )
+ if spec != "": self.src.set_subdev_spec(spec, 0)
+ self.src.set_samp_rate(requested_sample_rate)
+ self.src.set_center_freq(uhd.tune_request(freq, lo_offset), 0)
+ self.src.set_gain(selected_gain_proxy, 0)
+ self.nb_right = self.nb_right = wx.Notebook(self.GetWin(), style=wx.NB_TOP)
+ self.nb_right.AddPage(grc_wxgui.Panel(self.nb_right), "Params")
+ self.GridAdd(self.nb_right, 0, 1, 1, 1)
+ self.nb = self.nb = wx.Notebook(self.GetWin(), style=wx.NB_TOP)
+ self.nb.AddPage(grc_wxgui.Panel(self.nb), "FFT")
+ self.nb.AddPage(grc_wxgui.Panel(self.nb), "Scope")
+ self.nb.AddPage(grc_wxgui.Panel(self.nb), "Waterfall")
+ self.nb.AddPage(grc_wxgui.Panel(self.nb), "Sensors")
+ self.GridAdd(self.nb, 0, 0, 1, 1)
+ self.nb_test = self.nb_test = wx.Notebook(self.nb_right.GetPage(0).GetWin(), style=wx.NB_LEFT)
+ self.nb_test.AddPage(grc_wxgui.Panel(self.nb_test), "Test")
+ self.nb_right.GetPage(0).Add(self.nb_test)
+ self.nb_analog = self.nb_analog = wx.Notebook(self.nb_right.GetPage(0).GetWin(), style=wx.NB_LEFT)
+ self.nb_analog.AddPage(grc_wxgui.Panel(self.nb_analog), "Analog")
+ self.nb_analog.AddPage(grc_wxgui.Panel(self.nb_analog), "DC")
+ self.nb_right.GetPage(0).Add(self.nb_analog)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_gain_range():
+ self._post_any_code_evaluators += [('gain_range', lambda: self._evalutate_gain_range(**{}))]
+ def __evalutate_gain_range(*args, **kwds):
+ try:
+ self.gain_range = self.src.get_gain_range()
+ self.set_gain_range(self.gain_range)
+ except AttributeError, e:
+ print "AttributeError while evaulating gain_range:", e
+ __post_evalutate_gain_range()
+ except Exception, e:
+ print "Exception while evaluating gain_range:", e
+ self._evalutate_gain_range = __evalutate_gain_range
+ self.__post_evalutate_gain_range = __post_evalutate_gain_range
+ self._evalutate_gain_range(**{})
+ gain_range = self.gain_range
+ self.fft_sink = fftsink2.fft_sink_c(
+ self.nb.GetPage(0).GetWin(),
+ baseband_freq=fft_center_freq,
+ y_per_div=10,
+ y_divs=int(dyn_rng/10),
+ ref_level=ref_lvl,
+ ref_scale=fft_ref_scale,
+ sample_rate=samp_rate,
+ fft_size=1024*0 + fft_size,
+ fft_rate=fft_rate,
+ average=True,
+ avg_alpha=ave,
+ title="FFT Plot",
+ peak_hold=False, fft_in=False,
+ always_run=False,
+ fft_out=False,
+ )
+ self.nb.GetPage(0).Add(self.fft_sink.win)
+ def fft_sink_callback(x, y):
+ self.set_clicked_freq(x)
+
+ self.fft_sink.set_callback(fft_sink_callback)
+ self.waterfall_sink = waterfallsink2.waterfall_sink_c(
+ self.nb.GetPage(2).GetWin(),
+ baseband_freq=fft_center_freq,
+ dynamic_range=dyn_rng,
+ ref_level=ref_lvl,
+ ref_scale=fft_ref_scale,
+ sample_rate=samp_rate,
+ fft_size=512*0 + fft_size,
+ fft_rate=fft_rate,
+ average=True,
+ avg_alpha=ave,
+ title="Waterfall Plot",
+ fft_in=False,
+ always_run=False,
+ fft_out=False,
+ )
+ self.nb.GetPage(2).Add(self.waterfall_sink.win)
+ def waterfall_sink_callback(x, y):
+ self.set_clicked_freq(x)
+
+ self.waterfall_sink.set_callback(waterfall_sink_callback)
+ self._test_chooser = forms.button(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.test,
+ callback=self.set_test,
+ label="Test",
+ choices=[1],
+ labels=['Reset FFT average'],
+ )
+ self.nb_test.GetPage(0).Add(self._test_chooser)
+ self._show_stream_tags_chk_check_box = forms.check_box(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.show_stream_tags_chk,
+ callback=self.set_show_stream_tags_chk,
+ label="Print stream tags",
+ true=True,
+ false=False,
+ )
+ self.nb_test.GetPage(0).GridAdd(self._show_stream_tags_chk_check_box, 0, 0, 1, 1)
+ self._scope_mode_chooser = forms.radio_buttons(
+ parent=self.nb.GetPage(1).GetWin(),
+ value=self.scope_mode,
+ callback=self.set_scope_mode,
+ label="Scope Mode",
+ choices=[0, 1],
+ labels=['Complex', 'Magnitude'],
+ style=wx.RA_HORIZONTAL,
+ )
+ self.nb.GetPage(1).Add(self._scope_mode_chooser)
+ self.probe_avg_mag = analog.probe_avg_mag_sqrd_c(0, mag_alpha)
+ self.nb_rate = self.nb_rate = wx.Notebook(self.nb_right.GetPage(0).GetWin(), style=wx.NB_LEFT)
+ self.nb_rate.AddPage(grc_wxgui.Panel(self.nb_rate), "Rate")
+ self.nb_right.GetPage(0).Add(self.nb_rate)
+ self.nb_info = self.nb_info = wx.Notebook(self.nb_right.GetPage(0).GetWin(), style=wx.NB_LEFT)
+ self.nb_info.AddPage(grc_wxgui.Panel(self.nb_info), "Info")
+ self.nb_right.GetPage(0).GridAdd(self.nb_info, 0, 0, 1, 1)
+ self.nb_freq = self.nb_freq = wx.Notebook(self.nb_right.GetPage(0).GetWin(), style=wx.NB_LEFT)
+ self.nb_freq.AddPage(grc_wxgui.Panel(self.nb_freq), "Freq")
+ self.nb_right.GetPage(0).Add(self.nb_freq)
+ if sensor_interval > 0:
+ self._motherboard_sensor_names_poll_rate = sensor_interval
+ else:
+ self._motherboard_sensor_names_poll_rate = 1
+ self._motherboard_sensor_names_enabled = sensor_interval > 0
+ def _set_motherboard_sensor_names_poll_rate(rate):
+ self._motherboard_sensor_names_enabled = rate > 0
+ if rate > 0:
+ self._motherboard_sensor_names_poll_rate = rate
+ self.set_motherboard_sensor_names_poll_rate = _set_motherboard_sensor_names_poll_rate
+ def _motherboard_sensor_names_probe():
+ while True:
+ if self._motherboard_sensor_names_enabled:
+ val = self.src.get_mboard_sensor_names()
+ try:
+ self.set_motherboard_sensor_names(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._motherboard_sensor_names_poll_rate))
+ _motherboard_sensor_names_thread = threading.Thread(target=_motherboard_sensor_names_probe)
+ _motherboard_sensor_names_thread.daemon = True
+ _motherboard_sensor_names_thread.start()
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_initial_gain():
+ self._post_any_code_evaluators += [('initial_gain', lambda: self._evalutate_initial_gain(**{'gain_range': gain_range}))]
+ def __evalutate_initial_gain(*args, **kwds):
+ try:
+ self.initial_gain = [gain,gain_range.start() + ((gain_range.stop() - gain_range.start()) * 0.25)][gain==float('-inf')]
+ self.set_initial_gain(self.initial_gain)
+ except AttributeError, e:
+ print "AttributeError while evaulating initial_gain:", e
+ __post_evalutate_initial_gain()
+ except Exception, e:
+ print "Exception while evaluating initial_gain:", e
+ self._evalutate_initial_gain = __evalutate_initial_gain
+ self.__post_evalutate_initial_gain = __post_evalutate_initial_gain
+ self._evalutate_initial_gain(**{'gain_range': gain_range})
+ initial_gain = self.initial_gain
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_has_lo_locked():
+ self._post_any_code_evaluators += [('has_lo_locked', lambda: self._evalutate_has_lo_locked(**{}))]
+ def __evalutate_has_lo_locked(*args, **kwds):
+ try:
+ self.has_lo_locked = 'lo_locked' in self.src.get_sensor_names()
+ self.set_has_lo_locked(self.has_lo_locked)
+ except AttributeError, e:
+ print "AttributeError while evaulating has_lo_locked:", e
+ __post_evalutate_has_lo_locked()
+ except Exception, e:
+ print "Exception while evaluating has_lo_locked:", e
+ self._evalutate_has_lo_locked = __evalutate_has_lo_locked
+ self.__post_evalutate_has_lo_locked = __post_evalutate_has_lo_locked
+ self._evalutate_has_lo_locked(**{})
+ has_lo_locked = self.has_lo_locked
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_freq_range():
+ self._post_any_code_evaluators += [('freq_range', lambda: self._evalutate_freq_range(**{}))]
+ def __evalutate_freq_range(*args, **kwds):
+ try:
+ self.freq_range = self.src.get_freq_range()
+ self.set_freq_range(self.freq_range)
+ except AttributeError, e:
+ print "AttributeError while evaulating freq_range:", e
+ __post_evalutate_freq_range()
+ except Exception, e:
+ print "Exception while evaluating freq_range:", e
+ self._evalutate_freq_range = __evalutate_freq_range
+ self.__post_evalutate_freq_range = __post_evalutate_freq_range
+ self._evalutate_freq_range(**{})
+ freq_range = self.freq_range
+ if 5 > 0:
+ self._fft_ave_probe_poll_rate = 5
+ else:
+ self._fft_ave_probe_poll_rate = 1
+ self._fft_ave_probe_enabled = 5 > 0
+ def _set_fft_ave_probe_poll_rate(rate):
+ self._fft_ave_probe_enabled = rate > 0
+ if rate > 0:
+ self._fft_ave_probe_poll_rate = rate
+ self.set_fft_ave_probe_poll_rate = _set_fft_ave_probe_poll_rate
+ def _fft_ave_probe_probe():
+ while True:
+ if self._fft_ave_probe_enabled:
+ val = self.fft_sink.win['avg_alpha'] * [1.0/self.fft_sink.win['avg_alpha'],1.0][self.fft_sink.win['average']];()
+ try:
+ self.set_fft_ave_probe(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._fft_ave_probe_poll_rate))
+ _fft_ave_probe_thread = threading.Thread(target=_fft_ave_probe_probe)
+ _fft_ave_probe_thread.daemon = True
+ _fft_ave_probe_thread.start()
+ if sensor_interval > 0:
+ self._daughterboard_sensor_names_poll_rate = sensor_interval
+ else:
+ self._daughterboard_sensor_names_poll_rate = 1
+ self._daughterboard_sensor_names_enabled = sensor_interval > 0
+ def _set_daughterboard_sensor_names_poll_rate(rate):
+ self._daughterboard_sensor_names_enabled = rate > 0
+ if rate > 0:
+ self._daughterboard_sensor_names_poll_rate = rate
+ self.set_daughterboard_sensor_names_poll_rate = _set_daughterboard_sensor_names_poll_rate
+ def _daughterboard_sensor_names_probe():
+ while True:
+ if self._daughterboard_sensor_names_enabled:
+ val = self.src.get_sensor_names()
+ try:
+ self.set_daughterboard_sensor_names(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._daughterboard_sensor_names_poll_rate))
+ _daughterboard_sensor_names_thread = threading.Thread(target=_daughterboard_sensor_names_probe)
+ _daughterboard_sensor_names_thread.daemon = True
+ _daughterboard_sensor_names_thread.start()
+ self._auto_iq_correction_check_box = forms.check_box(
+ parent=self.nb_analog.GetPage(1).GetWin(),
+ value=self.auto_iq_correction,
+ callback=self.set_auto_iq_correction,
+ label="Auto IQ correction",
+ true=True,
+ false=False,
+ )
+ self.nb_analog.GetPage(1).Add(self._auto_iq_correction_check_box)
+ self._auto_dc_offset_removal_check_box = forms.check_box(
+ parent=self.nb_analog.GetPage(1).GetWin(),
+ value=self.auto_dc_offset_removal,
+ callback=self.set_auto_dc_offset_removal,
+ label="Auto DC offset removal",
+ true=True,
+ false=False,
+ )
+ self.nb_analog.GetPage(1).Add(self._auto_dc_offset_removal_check_box)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_antennas():
+ self._post_any_code_evaluators += [('antennas', lambda: self._evalutate_antennas(**{}))]
+ def __evalutate_antennas(*args, **kwds):
+ try:
+ self.antennas = self.src.get_antennas()
+ self.set_antennas(self.antennas)
+ except AttributeError, e:
+ print "AttributeError while evaulating antennas:", e
+ __post_evalutate_antennas()
+ except Exception, e:
+ print "Exception while evaluating antennas:", e
+ self._evalutate_antennas = __evalutate_antennas
+ self.__post_evalutate_antennas = __post_evalutate_antennas
+ self._evalutate_antennas(**{})
+ antennas = self.antennas
+ self.wxgui_scopesink2_0 = scopesink2.scope_sink_c(
+ self.nb.GetPage(1).GetWin(),
+ title="Scope Plot",
+ sample_rate=samp_rate,
+ v_scale=0,
+ v_offset=0,
+ t_scale=0,
+ ac_couple=False,
+ xy_mode=False,
+ num_inputs=1,
+ trig_mode=wxgui.TRIG_MODE_AUTO,
+ y_axis_label="Counts",
+ )
+ self.nb.GetPage(1).Add(self.wxgui_scopesink2_0.win)
+ self._variable_static_usrp_info_static_text = forms.static_text(
+ parent=self.nb_info.GetPage(0).GetWin(),
+ value=self.variable_static_usrp_info,
+ callback=self.set_variable_static_usrp_info,
+ label="USRP",
+ converter=forms.str_converter(),
+ )
+ self.nb_info.GetPage(0).GridAdd(self._variable_static_usrp_info_static_text, 0, 0, 1, 10)
+ self._variable_static_time_now_static_text = forms.static_text(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.variable_static_time_now,
+ callback=self.set_variable_static_time_now,
+ label="Time now",
+ converter=forms.str_converter(),
+ )
+ self.nb_test.GetPage(0).GridAdd(self._variable_static_time_now_static_text, 1, 1, 1, 2)
+ self._variable_static_text_0_0_static_text = forms.static_text(
+ parent=self.nb.GetPage(3).GetWin(),
+ value=self.variable_static_text_0_0,
+ callback=self.set_variable_static_text_0_0,
+ label="Daughterboard",
+ converter=forms.str_converter(),
+ )
+ self.nb.GetPage(3).GridAdd(self._variable_static_text_0_0_static_text, 2, 0, 1, 1)
+ self._variable_static_text_0_static_text = forms.static_text(
+ parent=self.nb.GetPage(3).GetWin(),
+ value=self.variable_static_text_0,
+ callback=self.set_variable_static_text_0,
+ label="Motherboard",
+ converter=forms.str_converter(),
+ )
+ self.nb.GetPage(3).GridAdd(self._variable_static_text_0_static_text, 0, 0, 1, 1)
+ self._variable_static_subdev_spec_static_text = forms.static_text(
+ parent=self.nb_info.GetPage(0).GetWin(),
+ value=self.variable_static_subdev_spec,
+ callback=self.set_variable_static_subdev_spec,
+ label="Sub-device",
+ converter=forms.str_converter(),
+ )
+ self.nb_info.GetPage(0).GridAdd(self._variable_static_subdev_spec_static_text, 1, 0, 1, 1)
+ self._variable_static_rf_freq_static_text = forms.static_text(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.variable_static_rf_freq,
+ callback=self.set_variable_static_rf_freq,
+ label="Actual RF freq",
+ converter=forms.float_converter(),
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._variable_static_rf_freq_static_text, 5, 0, 1, 1)
+ self._variable_static_requested_freq_static_text = forms.static_text(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.variable_static_requested_freq,
+ callback=self.set_variable_static_requested_freq,
+ label="Requested base + fine freq",
+ converter=forms.float_converter(),
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._variable_static_requested_freq_static_text, 3, 0, 1, 1)
+ self._variable_static_max_bin_freq_static_text = forms.static_text(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.variable_static_max_bin_freq,
+ callback=self.set_variable_static_max_bin_freq,
+ label="Peak freq",
+ converter=forms.float_converter(),
+ )
+ self.nb_test.GetPage(0).Add(self._variable_static_max_bin_freq_static_text)
+ self._variable_static_level_probe_static_text = forms.static_text(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.variable_static_level_probe,
+ callback=self.set_variable_static_level_probe,
+ label="Signal mag^2 (dB)",
+ converter=forms.float_converter(),
+ )
+ self.nb_test.GetPage(0).Add(self._variable_static_level_probe_static_text)
+ self._variable_static_fft_window_name_static_text = forms.static_text(
+ parent=self.nb_info.GetPage(0).GetWin(),
+ value=self.variable_static_fft_window_name,
+ callback=self.set_variable_static_fft_window_name,
+ label="FFT window",
+ converter=forms.str_converter(),
+ )
+ self.nb_info.GetPage(0).Add(self._variable_static_fft_window_name_static_text)
+ self._variable_static_fft_max_lvl_log_static_text = forms.static_text(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.variable_static_fft_max_lvl_log,
+ callback=self.set_variable_static_fft_max_lvl_log,
+ label="Peak magnitude (dB)",
+ converter=forms.float_converter(),
+ )
+ self.nb_test.GetPage(0).Add(self._variable_static_fft_max_lvl_log_static_text)
+ self._variable_static_actual_sample_rate_static_text = forms.static_text(
+ parent=self.nb_rate.GetPage(0).GetWin(),
+ value=self.variable_static_actual_sample_rate,
+ callback=self.set_variable_static_actual_sample_rate,
+ label="Actual",
+ converter=forms.float_converter(),
+ )
+ self.nb_rate.GetPage(0).GridAdd(self._variable_static_actual_sample_rate_static_text, 0, 1, 1, 1)
+ self._variable_static_actual_dsp_freq_static_text = forms.static_text(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.variable_static_actual_dsp_freq,
+ callback=self.set_variable_static_actual_dsp_freq,
+ label="Actual DSP freq",
+ converter=forms.float_converter(),
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._variable_static_actual_dsp_freq_static_text, 6, 0, 1, 1)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_variable_any_code_waterfall_ave():
+ self._post_any_code_evaluators += [('variable_any_code_waterfall_ave', lambda: self._evalutate_variable_any_code_waterfall_ave(**{'averaging': fft_averaging}))]
+ def __evalutate_variable_any_code_waterfall_ave(*args, **kwds):
+ try:
+ self.variable_any_code_waterfall_ave = self.waterfall_sink.win['average'] = fft_averaging
+ self.set_variable_any_code_waterfall_ave(self.variable_any_code_waterfall_ave)
+ except AttributeError, e:
+ print "AttributeError while evaulating variable_any_code_waterfall_ave:", e
+ __post_evalutate_variable_any_code_waterfall_ave()
+ except Exception, e:
+ print "Exception while evaluating variable_any_code_waterfall_ave:", e
+ self._evalutate_variable_any_code_waterfall_ave = __evalutate_variable_any_code_waterfall_ave
+ self.__post_evalutate_variable_any_code_waterfall_ave = __post_evalutate_variable_any_code_waterfall_ave
+ self.__post_evalutate_variable_any_code_waterfall_ave()
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_variable_any_code_iq_correction():
+ self._post_any_code_evaluators += [('variable_any_code_iq_correction', lambda: self._evalutate_variable_any_code_iq_correction(**{'auto_iq_correction': auto_iq_correction}))]
+ def __evalutate_variable_any_code_iq_correction(*args, **kwds):
+ try:
+ [self.src.set_auto_iq_balance(self.auto_iq_correction), self.auto_iq_correction or self.src.set_iq_balance(0+0j)]
+ self.set_variable_any_code_iq_correction(self.variable_any_code_iq_correction)
+ except AttributeError, e:
+ print "AttributeError while evaulating variable_any_code_iq_correction:", e
+ __post_evalutate_variable_any_code_iq_correction()
+ except Exception, e:
+ print "Exception while evaluating variable_any_code_iq_correction:", e
+ self._evalutate_variable_any_code_iq_correction = __evalutate_variable_any_code_iq_correction
+ self.__post_evalutate_variable_any_code_iq_correction = __post_evalutate_variable_any_code_iq_correction
+ self._evalutate_variable_any_code_iq_correction(**{'auto_iq_correction': auto_iq_correction})
+ variable_any_code_iq_correction = self.variable_any_code_iq_correction
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_variable_any_code_fft_sink_peak_hold():
+ self._post_any_code_evaluators += [('variable_any_code_fft_sink_peak_hold', lambda: self._evalutate_variable_any_code_fft_sink_peak_hold(**{'peak_hold': fft_peak_hold}))]
+ def __evalutate_variable_any_code_fft_sink_peak_hold(*args, **kwds):
+ try:
+ self.variable_any_code_fft_sink_peak_hold = self.fft_sink.win['peak_hold'] = fft_peak_hold
+ self.set_variable_any_code_fft_sink_peak_hold(self.variable_any_code_fft_sink_peak_hold)
+ except AttributeError, e:
+ print "AttributeError while evaulating variable_any_code_fft_sink_peak_hold:", e
+ __post_evalutate_variable_any_code_fft_sink_peak_hold()
+ except Exception, e:
+ print "Exception while evaluating variable_any_code_fft_sink_peak_hold:", e
+ self._evalutate_variable_any_code_fft_sink_peak_hold = __evalutate_variable_any_code_fft_sink_peak_hold
+ self.__post_evalutate_variable_any_code_fft_sink_peak_hold = __post_evalutate_variable_any_code_fft_sink_peak_hold
+ self._evalutate_variable_any_code_fft_sink_peak_hold(**{'peak_hold': fft_peak_hold})
+ variable_any_code_fft_sink_peak_hold = self.variable_any_code_fft_sink_peak_hold
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_variable_any_code_fft_sink_ave():
+ self._post_any_code_evaluators += [('variable_any_code_fft_sink_ave', lambda: self._evalutate_variable_any_code_fft_sink_ave(**{'averaging': fft_averaging}))]
+ def __evalutate_variable_any_code_fft_sink_ave(*args, **kwds):
+ try:
+ self.variable_any_code_fft_sink_ave = self.fft_sink.win['average'] = fft_averaging
+ self.set_variable_any_code_fft_sink_ave(self.variable_any_code_fft_sink_ave)
+ except AttributeError, e:
+ print "AttributeError while evaulating variable_any_code_fft_sink_ave:", e
+ __post_evalutate_variable_any_code_fft_sink_ave()
+ except Exception, e:
+ print "Exception while evaluating variable_any_code_fft_sink_ave:", e
+ self._evalutate_variable_any_code_fft_sink_ave = __evalutate_variable_any_code_fft_sink_ave
+ self.__post_evalutate_variable_any_code_fft_sink_ave = __post_evalutate_variable_any_code_fft_sink_ave
+ self.__post_evalutate_variable_any_code_fft_sink_ave()
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_variable_any_code_auto_dc_offset_removal():
+ self._post_any_code_evaluators += [('variable_any_code_auto_dc_offset_removal', lambda: self._evalutate_variable_any_code_auto_dc_offset_removal(**{'auto_dc_offset_removal': auto_dc_offset_removal}))]
+ def __evalutate_variable_any_code_auto_dc_offset_removal(*args, **kwds):
+ try:
+ [self.src.set_auto_dc_offset(self.auto_dc_offset_removal), self.auto_dc_offset_removal or self.src.set_dc_offset(0+0j)]
+ self.set_variable_any_code_auto_dc_offset_removal(self.variable_any_code_auto_dc_offset_removal)
+ except AttributeError, e:
+ print "AttributeError while evaulating variable_any_code_auto_dc_offset_removal:", e
+ __post_evalutate_variable_any_code_auto_dc_offset_removal()
+ except Exception, e:
+ print "Exception while evaluating variable_any_code_auto_dc_offset_removal:", e
+ self._evalutate_variable_any_code_auto_dc_offset_removal = __evalutate_variable_any_code_auto_dc_offset_removal
+ self.__post_evalutate_variable_any_code_auto_dc_offset_removal = __post_evalutate_variable_any_code_auto_dc_offset_removal
+ self._evalutate_variable_any_code_auto_dc_offset_removal(**{'auto_dc_offset_removal': auto_dc_offset_removal})
+ variable_any_code_auto_dc_offset_removal = self.variable_any_code_auto_dc_offset_removal
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_usrp_info():
+ self._post_any_code_evaluators += [('usrp_info', lambda: self._evalutate_usrp_info(**{}))]
+ def __evalutate_usrp_info(*args, **kwds):
+ try:
+ self.usrp_info = '%s (\'%s\'), %s' % (self.src.get_usrp_info().get('mboard_id'), self.src.get_usrp_info().get('mboard_name'), self.src.get_usrp_info().get('rx_subdev_name'))
+ self.set_usrp_info(self.usrp_info)
+ except AttributeError, e:
+ print "AttributeError while evaulating usrp_info:", e
+ __post_evalutate_usrp_info()
+ except Exception, e:
+ print "Exception while evaluating usrp_info:", e
+ self._evalutate_usrp_info = __evalutate_usrp_info
+ self.__post_evalutate_usrp_info = __post_evalutate_usrp_info
+ self._evalutate_usrp_info(**{})
+ usrp_info = self.usrp_info
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_update_time_source():
+ self._post_any_code_evaluators += [('update_time_source', lambda: self._evalutate_update_time_source(**{'pps': pps}))]
+ def __evalutate_update_time_source(*args, **kwds):
+ try:
+ if self.pps != '': self.src.set_time_source(self.pps, 0); print '1 PPS =', self.pps;
+ self.set_update_time_source(self.update_time_source)
+ except AttributeError, e:
+ print "AttributeError while evaulating update_time_source:", e
+ __post_evalutate_update_time_source()
+ except Exception, e:
+ print "Exception while evaluating update_time_source:", e
+ self._evalutate_update_time_source = __evalutate_update_time_source
+ self.__post_evalutate_update_time_source = __post_evalutate_update_time_source
+ self._evalutate_update_time_source(**{'pps': pps})
+ update_time_source = self.update_time_source
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_update_clock_source():
+ self._post_any_code_evaluators += [('update_clock_source', lambda: self._evalutate_update_clock_source(**{'ref': ref}))]
+ def __evalutate_update_clock_source(*args, **kwds):
+ try:
+ if self.ref != '': self.src.set_clock_source(self.ref, 0); print 'Ref =', self.ref;
+ self.set_update_clock_source(self.update_clock_source)
+ except AttributeError, e:
+ print "AttributeError while evaulating update_clock_source:", e
+ __post_evalutate_update_clock_source()
+ except Exception, e:
+ print "Exception while evaluating update_clock_source:", e
+ self._evalutate_update_clock_source = __evalutate_update_clock_source
+ self.__post_evalutate_update_clock_source = __post_evalutate_update_clock_source
+ self._evalutate_update_clock_source(**{'ref': ref})
+ update_clock_source = self.update_clock_source
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_tune_result():
+ self._post_any_code_evaluators += [('tune_result', lambda: self._evalutate_tune_result(**{'tune_obj': tune_obj}))]
+ def __evalutate_tune_result(*args, **kwds):
+ try:
+ self.tune_result = self.src.set_center_freq(self.tune_obj)
+ self.set_tune_result(self.tune_result)
+ except AttributeError, e:
+ print "AttributeError while evaulating tune_result:", e
+ __post_evalutate_tune_result()
+ except Exception, e:
+ print "Exception while evaluating tune_result:", e
+ self._evalutate_tune_result = __evalutate_tune_result
+ self.__post_evalutate_tune_result = __post_evalutate_tune_result
+ self._evalutate_tune_result(**{'tune_obj': tune_obj})
+ tune_result = self.tune_result
+ self._tune_mode_chooser = forms.drop_down(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.tune_mode,
+ callback=self.set_tune_mode,
+ label="Tune mode",
+ choices=[0, 1, 2],
+ labels=['Auto (no LO offset)', 'Auto with LO offset', 'Manual (no DSP)'],
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._tune_mode_chooser, 0, 0, 1, 1)
+ if sensor_interval > 0:
+ self._time_probe_poll_rate = sensor_interval
+ else:
+ self._time_probe_poll_rate = 1
+ self._time_probe_enabled = sensor_interval > 0
+ def _set_time_probe_poll_rate(rate):
+ self._time_probe_enabled = rate > 0
+ if rate > 0:
+ self._time_probe_poll_rate = rate
+ self.set_time_probe_poll_rate = _set_time_probe_poll_rate
+ def _time_probe_probe():
+ while True:
+ if self._time_probe_enabled:
+ val = self.src.get_time_now()
+ try:
+ self.set_time_probe(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._time_probe_poll_rate))
+ _time_probe_thread = threading.Thread(target=_time_probe_probe)
+ _time_probe_thread.daemon = True
+ _time_probe_thread.start()
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_subdev_spec():
+ self._post_any_code_evaluators += [('subdev_spec', lambda: self._evalutate_subdev_spec(**{}))]
+ def __evalutate_subdev_spec(*args, **kwds):
+ try:
+ self.subdev_spec = '[' + self.src.get_subdev_spec().strip() + ']'
+ self.set_subdev_spec(self.subdev_spec)
+ except AttributeError, e:
+ print "AttributeError while evaulating subdev_spec:", e
+ __post_evalutate_subdev_spec()
+ except Exception, e:
+ print "Exception while evaluating subdev_spec:", e
+ self._evalutate_subdev_spec = __evalutate_subdev_spec
+ self.__post_evalutate_subdev_spec = __post_evalutate_subdev_spec
+ self._evalutate_subdev_spec(**{})
+ subdev_spec = self.subdev_spec
+ self._static_locked_static_text = forms.static_text(
+ parent=self.nb_info.GetPage(0).GetWin(),
+ value=self.static_locked,
+ callback=self.set_static_locked,
+ label="Locked",
+ converter=forms.str_converter(),
+ )
+ self.nb_info.GetPage(0).Add(self._static_locked_static_text)
+ if probe_interval > 0:
+ self._signal_probe_poll_rate = probe_interval
+ else:
+ self._signal_probe_poll_rate = 1
+ self._signal_probe_enabled = probe_interval > 0
+ def _set_signal_probe_poll_rate(rate):
+ self._signal_probe_enabled = rate > 0
+ if rate > 0:
+ self._signal_probe_poll_rate = rate
+ self.set_signal_probe_poll_rate = _set_signal_probe_poll_rate
+ def _signal_probe_probe():
+ while True:
+ if self._signal_probe_enabled:
+ val = self.probe_avg_mag.level()
+ try:
+ self.set_signal_probe(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._signal_probe_poll_rate))
+ _signal_probe_thread = threading.Thread(target=_signal_probe_probe)
+ _signal_probe_thread.daemon = True
+ _signal_probe_thread.start()
+ self._show_max_lvl_check_box = forms.check_box(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.show_max_lvl,
+ callback=self.set_show_max_lvl,
+ label="Show max level",
+ true=True,
+ false=False,
+ )
+ self.nb_test.GetPage(0).GridAdd(self._show_max_lvl_check_box, 0, 2, 1, 1)
+ self._show_max_freq_check_box = forms.check_box(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.show_max_freq,
+ callback=self.set_show_max_freq,
+ label="Show max freq",
+ true=True,
+ false=False,
+ )
+ self.nb_test.GetPage(0).GridAdd(self._show_max_freq_check_box, 0, 1, 1, 1)
+ _selected_gain_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._selected_gain_text_box = forms.text_box(
+ parent=self.nb_analog.GetPage(0).GetWin(),
+ sizer=_selected_gain_sizer,
+ value=self.selected_gain,
+ callback=self.set_selected_gain,
+ label="Gain",
+ converter=forms.float_converter(),
+ proportion=0,
+ )
+ self._selected_gain_slider = forms.slider(
+ parent=self.nb_analog.GetPage(0).GetWin(),
+ sizer=_selected_gain_sizer,
+ value=self.selected_gain,
+ callback=self.set_selected_gain,
+ minimum=gain_range.start(),
+ maximum=[gain_range.stop(), gain_range.start() + 1.0][gain_range.stop()==gain_range.start()],
+ num_steps=[int((abs(gain_range.stop()-gain_range.start())/[gain_range.step(), 1.0][gain_range.step()==0])), 1][gain_range.stop()==gain_range.start()],
+ style=wx.SL_HORIZONTAL,
+ cast=float,
+ proportion=1,
+ )
+ self.nb_analog.GetPage(0).Add(_selected_gain_sizer)
+ self._selected_antenna_chooser = forms.radio_buttons(
+ parent=self.nb_analog.GetPage(0).GetWin(),
+ value=self.selected_antenna,
+ callback=self.set_selected_antenna,
+ label="Antenna",
+ choices=antennas,
+ labels=[antennas,['(default)']][antennas==('',)],
+ style=wx.RA_HORIZONTAL,
+ )
+ self.nb_analog.GetPage(0).Add(self._selected_antenna_chooser)
+ self._requested_sample_rate_base_text_box = forms.text_box(
+ parent=self.nb_rate.GetPage(0).GetWin(),
+ value=self.requested_sample_rate_base,
+ callback=self.set_requested_sample_rate_base,
+ label="Requested base sample rate",
+ converter=forms.float_converter(),
+ )
+ self.nb_rate.GetPage(0).GridAdd(self._requested_sample_rate_base_text_box, 0, 0, 1, 1)
+ _requested_freq_txt_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._requested_freq_txt_text_box = forms.text_box(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ sizer=_requested_freq_txt_sizer,
+ value=self.requested_freq_txt,
+ callback=self.set_requested_freq_txt,
+ label="Requested freq",
+ converter=forms.float_converter(),
+ proportion=0,
+ )
+ self._requested_freq_txt_slider = forms.slider(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ sizer=_requested_freq_txt_sizer,
+ value=self.requested_freq_txt,
+ callback=self.set_requested_freq_txt,
+ minimum=freq_range.start(),
+ maximum=[freq_range.stop(), freq_range.start() + 1.0][freq_range.start()==freq_range.stop()],
+ num_steps=[1000,1][freq_range.start()==freq_range.stop()],
+ style=wx.SL_HORIZONTAL,
+ cast=float,
+ proportion=1,
+ )
+ self.nb_freq.GetPage(0).GridAdd(_requested_freq_txt_sizer, 1, 0, 1, 1)
+ self._relative_time_chooser = forms.drop_down(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.relative_time,
+ callback=self.set_relative_time,
+ label="Time display",
+ choices=[False, True],
+ labels=['Absolute', 'Relative'],
+ )
+ self.nb_test.GetPage(0).GridAdd(self._relative_time_chooser, 1, 0, 1, 1)
+ self._relative_freq_chooser = forms.drop_down(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.relative_freq,
+ callback=self.set_relative_freq,
+ label="Frequency Axis",
+ choices=[1, 0],
+ labels=['RF', 'Baseband'],
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._relative_freq_chooser, 7, 0, 1, 1)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_motherboard_sensors():
+ self._post_any_code_evaluators += [('motherboard_sensors', lambda: self._evalutate_motherboard_sensors(**{'motherboard_sensor_names': motherboard_sensor_names}))]
+ def __evalutate_motherboard_sensors(*args, **kwds):
+ try:
+ self.motherboard_sensors = '\n'.join(map(lambda x: '%s: %s' % (x, str(self.src.get_mboard_sensor(x))), filter(lambda x: x.find('gps') != 0, self.motherboard_sensor_names)))
+ self.set_motherboard_sensors(self.motherboard_sensors)
+ except AttributeError, e:
+ print "AttributeError while evaulating motherboard_sensors:", e
+ __post_evalutate_motherboard_sensors()
+ except Exception, e:
+ print "Exception while evaluating motherboard_sensors:", e
+ self._evalutate_motherboard_sensors = __evalutate_motherboard_sensors
+ self.__post_evalutate_motherboard_sensors = __post_evalutate_motherboard_sensors
+ self._evalutate_motherboard_sensors(**{'motherboard_sensor_names': motherboard_sensor_names})
+ motherboard_sensors = self.motherboard_sensors
+ self.logpwrfft_x_0 = logpwrfft.logpwrfft_c(
+ sample_rate=samp_rate,
+ fft_size=fft_size,
+ ref_scale=fft_ref_scale,
+ frame_rate=fft_rate,
+ avg_alpha=fft_ave_probe,
+ average=False,
+ )
+ if lo_check_interval * float(has_lo_locked) > 0:
+ self._locked_probe_poll_rate = lo_check_interval * float(has_lo_locked)
+ else:
+ self._locked_probe_poll_rate = 1
+ self._locked_probe_enabled = lo_check_interval * float(has_lo_locked) > 0
+ def _set_locked_probe_poll_rate(rate):
+ self._locked_probe_enabled = rate > 0
+ if rate > 0:
+ self._locked_probe_poll_rate = rate
+ self.set_locked_probe_poll_rate = _set_locked_probe_poll_rate
+ def _locked_probe_probe():
+ while True:
+ if self._locked_probe_enabled:
+ val = self.src.get_sensor('lo_locked')
+ try:
+ self.set_locked_probe(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._locked_probe_poll_rate))
+ _locked_probe_thread = threading.Thread(target=_locked_probe_probe)
+ _locked_probe_thread.daemon = True
+ _locked_probe_thread.start()
+ self._lo_offset_txt_text_box = forms.text_box(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.lo_offset_txt,
+ callback=self.set_lo_offset_txt,
+ label="LO offset (only for LO offset tuning mode)",
+ converter=forms.float_converter(),
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._lo_offset_txt_text_box, 4, 0, 1, 1)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_gain_default():
+ self._post_any_code_evaluators += [('gain_default', lambda: self._evalutate_gain_default(**{'initial_gain': initial_gain}))]
+ def __evalutate_gain_default(*args, **kwds):
+ try:
+ self.gain_default = [gain,initial_gain][gain==float('-inf')]
+ self.set_gain_default(self.gain_default)
+ except AttributeError, e:
+ print "AttributeError while evaulating gain_default:", e
+ __post_evalutate_gain_default()
+ except Exception, e:
+ print "Exception while evaluating gain_default:", e
+ self._evalutate_gain_default = __evalutate_gain_default
+ self.__post_evalutate_gain_default = __post_evalutate_gain_default
+ self._evalutate_gain_default(**{'initial_gain': initial_gain})
+ gain_default = self.gain_default
+ _freq_fine_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._freq_fine_text_box = forms.text_box(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ sizer=_freq_fine_sizer,
+ value=self.freq_fine,
+ callback=self.set_freq_fine,
+ label="Freq (fine)",
+ converter=forms.float_converter(),
+ proportion=0,
+ )
+ self._freq_fine_slider = forms.slider(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ sizer=_freq_fine_sizer,
+ value=self.freq_fine,
+ callback=self.set_freq_fine,
+ minimum=-freq_fine_range/2,
+ maximum=freq_fine_range/2,
+ num_steps=1000,
+ style=wx.SL_HORIZONTAL,
+ cast=float,
+ proportion=1,
+ )
+ self.nb_freq.GetPage(0).GridAdd(_freq_fine_sizer, 2, 0, 1, 1)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_fix_invalid_freq():
+ self._post_any_code_evaluators += [('fix_invalid_freq', lambda: self._evalutate_fix_invalid_freq(**{}))]
+ def __evalutate_fix_invalid_freq(*args, **kwds):
+ try:
+ ((freq <= freq_range.stop()) and (freq >= freq_range.start())) or self.set_requested_freq_txt(self.src.get_center_freq()); print self.src.get_center_freq()
+ self.set_fix_invalid_freq(self.fix_invalid_freq)
+ except AttributeError, e:
+ print "AttributeError while evaulating fix_invalid_freq:", e
+ __post_evalutate_fix_invalid_freq()
+ except Exception, e:
+ print "Exception while evaluating fix_invalid_freq:", e
+ self._evalutate_fix_invalid_freq = __evalutate_fix_invalid_freq
+ self.__post_evalutate_fix_invalid_freq = __post_evalutate_fix_invalid_freq
+ self.__post_evalutate_fix_invalid_freq()
+ self.fft_max_lvl_probe = blocks.probe_signal_f()
+ if probe_interval > 0:
+ self._fft_max_lvl_poll_rate = probe_interval
+ else:
+ self._fft_max_lvl_poll_rate = 1
+ self._fft_max_lvl_enabled = probe_interval > 0
+ def _set_fft_max_lvl_poll_rate(rate):
+ self._fft_max_lvl_enabled = rate > 0
+ if rate > 0:
+ self._fft_max_lvl_poll_rate = rate
+ self.set_fft_max_lvl_poll_rate = _set_fft_max_lvl_poll_rate
+ def _fft_max_lvl_probe():
+ while True:
+ if self._fft_max_lvl_enabled:
+ val = self.fft_max_lvl_probe.level()
+ try:
+ self.set_fft_max_lvl(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._fft_max_lvl_poll_rate))
+ _fft_max_lvl_thread = threading.Thread(target=_fft_max_lvl_probe)
+ _fft_max_lvl_thread.daemon = True
+ _fft_max_lvl_thread.start()
+ self.fft_max_idx_probe = blocks.probe_signal_s()
+ if probe_interval > 0:
+ self._fft_max_idx_poll_rate = probe_interval
+ else:
+ self._fft_max_idx_poll_rate = 1
+ self._fft_max_idx_enabled = probe_interval > 0
+ def _set_fft_max_idx_poll_rate(rate):
+ self._fft_max_idx_enabled = rate > 0
+ if rate > 0:
+ self._fft_max_idx_poll_rate = rate
+ self.set_fft_max_idx_poll_rate = _set_fft_max_idx_poll_rate
+ def _fft_max_idx_probe():
+ while True:
+ if self._fft_max_idx_enabled:
+ val = self.fft_max_idx_probe.level()
+ try:
+ self.set_fft_max_idx(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._fft_max_idx_poll_rate))
+ _fft_max_idx_thread = threading.Thread(target=_fft_max_idx_probe)
+ _fft_max_idx_thread.daemon = True
+ _fft_max_idx_thread.start()
+ _decim_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._decim_text_box = forms.text_box(
+ parent=self.nb_rate.GetPage(0).GetWin(),
+ sizer=_decim_sizer,
+ value=self.decim,
+ callback=self.set_decim,
+ label="Divide base sample rate",
+ converter=forms.int_converter(),
+ proportion=0,
+ )
+ self._decim_slider = forms.slider(
+ parent=self.nb_rate.GetPage(0).GetWin(),
+ sizer=_decim_sizer,
+ value=self.decim,
+ callback=self.set_decim,
+ minimum=1,
+ maximum=max_decim,
+ num_steps=max_decim-1,
+ style=wx.SL_HORIZONTAL,
+ cast=int,
+ proportion=1,
+ )
+ self.nb_rate.GetPage(0).Add(_decim_sizer)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_daughterboard_sensors():
+ self._post_any_code_evaluators += [('daughterboard_sensors', lambda: self._evalutate_daughterboard_sensors(**{'daughterboard_sensor_names': daughterboard_sensor_names}))]
+ def __evalutate_daughterboard_sensors(*args, **kwds):
+ try:
+ self.daughterboard_sensors = '\n'.join(map(lambda x: '%s: %s' % (x, str(self.src.get_sensor(x))), self.daughterboard_sensor_names))
+ self.set_daughterboard_sensors(self.daughterboard_sensors)
+ except AttributeError, e:
+ print "AttributeError while evaulating daughterboard_sensors:", e
+ __post_evalutate_daughterboard_sensors()
+ except Exception, e:
+ print "Exception while evaluating daughterboard_sensors:", e
+ self._evalutate_daughterboard_sensors = __evalutate_daughterboard_sensors
+ self.__post_evalutate_daughterboard_sensors = __post_evalutate_daughterboard_sensors
+ self._evalutate_daughterboard_sensors(**{'daughterboard_sensor_names': daughterboard_sensor_names})
+ daughterboard_sensors = self.daughterboard_sensors
+ self._clicked_freq_txt_text_box = forms.text_box(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.clicked_freq_txt,
+ callback=self.set_clicked_freq_txt,
+ label="Clicked freq",
+ converter=forms.float_converter(),
+ )
+ self.nb_test.GetPage(0).Add(self._clicked_freq_txt_text_box)
+ self.blocks_tag_debug_0 = blocks.tag_debug(gr.sizeof_gr_complex*1, "", ""); self.blocks_tag_debug_0.set_display(show_stream_tags_chk)
+ self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_short*1)
+ self.blocks_max_xx_0 = blocks.max_ff(fft_size)
+ self.blocks_float_to_complex_0 = blocks.float_to_complex(1)
+ self.blocks_complex_to_mag_0 = blocks.complex_to_mag(1)
+ self.blocks_argmax_xx_0 = blocks.argmax_fs(fft_size)
+ self.blks2_selector_0_0 = grc_blks2.selector(
+ item_size=gr.sizeof_gr_complex*1,
+ num_inputs=1,
+ num_outputs=2,
+ input_index=0,
+ output_index=scope_mode,
+ )
+ self.blks2_selector_0 = grc_blks2.selector(
+ item_size=gr.sizeof_gr_complex*1,
+ num_inputs=2,
+ num_outputs=1,
+ input_index=scope_mode,
+ output_index=0,
+ )
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_any_test_1():
+ self._post_any_code_evaluators += [('any_test_1', lambda: self._evalutate_any_test_1(**{'test': test}))]
+ def __evalutate_any_test_1(*args, **kwds):
+ try:
+ if self.fft_sink.controller['average']: self.fft_sink.controller['average'] = False; time.sleep(0.25); self.fft_sink.controller['average'] = True;
+ self.set_any_test_1(self.any_test_1)
+ except AttributeError, e:
+ print "AttributeError while evaulating any_test_1:", e
+ __post_evalutate_any_test_1()
+ except Exception, e:
+ print "Exception while evaluating any_test_1:", e
+ self._evalutate_any_test_1 = __evalutate_any_test_1
+ self.__post_evalutate_any_test_1 = __post_evalutate_any_test_1
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_actual_sample_rate():
+ self._post_any_code_evaluators += [('actual_sample_rate', lambda: self._evalutate_actual_sample_rate(**{'requested_sample_rate': requested_sample_rate}))]
+ def __evalutate_actual_sample_rate(*args, **kwds):
+ try:
+ self.actual_sample_rate = self.src.get_samp_rate()
+ self.set_actual_sample_rate(self.actual_sample_rate)
+ except AttributeError, e:
+ print "AttributeError while evaulating actual_sample_rate:", e
+ __post_evalutate_actual_sample_rate()
+ except Exception, e:
+ print "Exception while evaluating actual_sample_rate:", e
+ self._evalutate_actual_sample_rate = __evalutate_actual_sample_rate
+ self.__post_evalutate_actual_sample_rate = __post_evalutate_actual_sample_rate
+ self._evalutate_actual_sample_rate(**{'requested_sample_rate': requested_sample_rate})
+ actual_sample_rate = self.actual_sample_rate
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_actual_center_freq():
+ self._post_any_code_evaluators += [('actual_center_freq', lambda: self._evalutate_actual_center_freq(**{'tune_obj': tune_obj}))]
+ def __evalutate_actual_center_freq(*args, **kwds):
+ try:
+ self.actual_center_freq = self.src.get_center_freq()
+ self.set_actual_center_freq(self.actual_center_freq)
+ except AttributeError, e:
+ print "AttributeError while evaulating actual_center_freq:", e
+ __post_evalutate_actual_center_freq()
+ except Exception, e:
+ print "Exception while evaluating actual_center_freq:", e
+ self._evalutate_actual_center_freq = __evalutate_actual_center_freq
+ self.__post_evalutate_actual_center_freq = __post_evalutate_actual_center_freq
+ self._evalutate_actual_center_freq(**{'tune_obj': tune_obj})
+ actual_center_freq = self.actual_center_freq
+
+ ##################################################
+ # Connections
+ ##################################################
+ self.connect((self.blks2_selector_0, 0), (self.wxgui_scopesink2_0, 0))
+ self.connect((self.blks2_selector_0_0, 0), (self.blks2_selector_0, 0))
+ self.connect((self.blks2_selector_0_0, 1), (self.blocks_complex_to_mag_0, 0))
+ self.connect((self.blocks_argmax_xx_0, 1), (self.blocks_null_sink_0, 0))
+ self.connect((self.blocks_argmax_xx_0, 0), (self.fft_max_idx_probe, 0))
+ self.connect((self.blocks_complex_to_mag_0, 0), (self.blocks_float_to_complex_0, 1))
+ self.connect((self.blocks_complex_to_mag_0, 0), (self.blocks_float_to_complex_0, 0))
+ self.connect((self.blocks_float_to_complex_0, 0), (self.blks2_selector_0, 1))
+ self.connect((self.blocks_max_xx_0, 0), (self.fft_max_lvl_probe, 0))
+ self.connect((self.logpwrfft_x_0, 0), (self.blocks_argmax_xx_0, 0))
+ self.connect((self.logpwrfft_x_0, 0), (self.blocks_max_xx_0, 0))
+ self.connect((self.src, 0), (self.blocks_tag_debug_0, 0))
+ self.connect((self.src, 0), (self.blks2_selector_0_0, 0))
+ self.connect((self.src, 0), (self.fft_sink, 0))
+ self.connect((self.src, 0), (self.waterfall_sink, 0))
+ self.connect((self.src, 0), (self.probe_avg_mag, 0))
+ self.connect((self.src, 0), (self.logpwrfft_x_0, 0))
+
+
+ def get_antenna(self):
+ return self.antenna
+
+ def set_antenna(self, antenna):
+ self.antenna = antenna
+ self.set_selected_antenna([ [self.antenna,self.antennas[0]][self.antenna not in self.antennas] ,self.antennas[0]][self.antenna==''])
+
+ def get_args(self):
+ return self.args
+
+ def set_args(self, args):
+ self.args = args
+
+ def get_ave(self):
+ return self.ave
+
+ def set_ave(self, ave):
+ self.ave = ave
+ self.set_fft_ave_probe(self.ave)
+
+ def get_averaging(self):
+ return self.averaging
+
+ def set_averaging(self, averaging):
+ self.averaging = averaging
+ self.set_fft_averaging(self.str_to_bool(self.averaging))
+
+ def get_bw(self):
+ return self.bw
+
+ def set_bw(self, bw):
+ self.bw = bw
+ self.src.set_bandwidth(self.bw, 0)
+
+ def get_dyn_rng(self):
+ return self.dyn_rng
+
+ def set_dyn_rng(self, dyn_rng):
+ self.dyn_rng = dyn_rng
+
+ def get_fft_rate(self):
+ return self.fft_rate
+
+ def set_fft_rate(self, fft_rate):
+ self.fft_rate = fft_rate
+
+ def get_fft_ref_scale(self):
+ return self.fft_ref_scale
+
+ def set_fft_ref_scale(self, fft_ref_scale):
+ self.fft_ref_scale = fft_ref_scale
+
+ def get_fft_size(self):
+ return self.fft_size
+
+ def set_fft_size(self, fft_size):
+ self.fft_size = fft_size
+ self.set_fft_max_idx((self.fft_size/2)*0)
+ self.set_fft_max_idx_norm([self.fft_max_idx,self.fft_max_idx-self.fft_size][int(self.fft_max_idx>(self.fft_size/2))])
+ self.set_max_bin_freq(self.fft_center_freq + (((1.0*self.fft_max_idx_norm) / self.fft_size) * self.samp_rate))
+
+ def get_freq(self):
+ return self.freq
+
+ def set_freq(self, freq):
+ self.freq = freq
+ self.set_requested_freq_txt(self.freq)
+ self.src.set_center_freq(uhd.tune_request(self.freq, self.lo_offset), 0)
+
+ def get_freq_fine_range(self):
+ return self.freq_fine_range
+
+ def set_freq_fine_range(self, freq_fine_range):
+ self.freq_fine_range = freq_fine_range
+
+ def get_gain(self):
+ return self.gain
+
+ def set_gain(self, gain):
+ self.gain = gain
+
+ def get_lo_check_interval(self):
+ return self.lo_check_interval
+
+ def set_lo_check_interval(self, lo_check_interval):
+ self.lo_check_interval = lo_check_interval
+ self.set_locked_probe_poll_rate(self.lo_check_interval * float(self.has_lo_locked))
+
+ def get_lo_offset(self):
+ return self.lo_offset
+
+ def set_lo_offset(self, lo_offset):
+ self.lo_offset = lo_offset
+ self.set_lo_offset_txt(self.lo_offset)
+ self.set_tune_mode([1,0][self.lo_offset==0.0])
+ self.src.set_center_freq(uhd.tune_request(self.freq, self.lo_offset), 0)
+
+ def get_mag_alpha(self):
+ return self.mag_alpha
+
+ def set_mag_alpha(self, mag_alpha):
+ self.mag_alpha = mag_alpha
+ self.probe_avg_mag.set_alpha(self.mag_alpha)
+
+ def get_peak_hold(self):
+ return self.peak_hold
+
+ def set_peak_hold(self, peak_hold):
+ self.peak_hold = peak_hold
+ self.set_fft_peak_hold(self.str_to_bool(self.peak_hold))
+
+ def get_pps(self):
+ return self.pps
+
+ def set_pps(self, pps):
+ self.pps = pps
+ self._evalutate_update_time_source(**{'pps': self.pps})
+
+ def get_probe_interval(self):
+ return self.probe_interval
+
+ def set_probe_interval(self, probe_interval):
+ self.probe_interval = probe_interval
+ self.set_fft_max_idx_poll_rate(self.probe_interval)
+ self.set_fft_max_lvl_poll_rate(self.probe_interval)
+ self.set_signal_probe_poll_rate(self.probe_interval)
+
+ def get_rate(self):
+ return self.rate
+
+ def set_rate(self, rate):
+ self.rate = rate
+ self.set_requested_sample_rate_base(self.rate)
+
+ def get_ref(self):
+ return self.ref
+
+ def set_ref(self, ref):
+ self.ref = ref
+ self._evalutate_update_clock_source(**{'ref': self.ref})
+
+ def get_ref_lvl(self):
+ return self.ref_lvl
+
+ def set_ref_lvl(self, ref_lvl):
+ self.ref_lvl = ref_lvl
+
+ def get_sensor_interval(self):
+ return self.sensor_interval
+
+ def set_sensor_interval(self, sensor_interval):
+ self.sensor_interval = sensor_interval
+ self.set_daughterboard_sensor_names_poll_rate(self.sensor_interval)
+ self.set_motherboard_sensor_names_poll_rate(self.sensor_interval)
+ self.set_time_probe_poll_rate(self.sensor_interval)
+
+ def get_show_stream_tags(self):
+ return self.show_stream_tags
+
+ def set_show_stream_tags(self, show_stream_tags):
+ self.show_stream_tags = show_stream_tags
+ self.set_show_stream_tags_chk([False, True][self.show_stream_tags.lower() != 'false'])
+
+ def get_spec(self):
+ return self.spec
+
+ def set_spec(self, spec):
+ self.spec = spec
+
+ def get_stream_args(self):
+ return self.stream_args
+
+ def set_stream_args(self, stream_args):
+ self.stream_args = stream_args
+
+ def get_window(self):
+ return self.window
+
+ def set_window(self, window):
+ self.window = window
+ self.set_variable_static_fft_window_name(self.window_fn_name_map[self.window])
+ self.set_window_fn(self.window_fn_map[self.window])
+
+ def get_wire_format(self):
+ return self.wire_format
+
+ def set_wire_format(self, wire_format):
+ self.wire_format = wire_format
+
+ def get_relative_freq(self):
+ return self.relative_freq
+
+ def set_relative_freq(self, relative_freq):
+ self.relative_freq = relative_freq
+ self.set_fft_center_freq(self.actual_center_freq * self.relative_freq)
+ self._relative_freq_chooser.set_value(self.relative_freq)
+
+ def get_gain_range(self):
+ return self.gain_range
+
+ def set_gain_range(self, gain_range):
+ self.gain_range = gain_range
+ self._run_evaluators_later(('initial_gain', lambda: self._evalutate_initial_gain(**{'gain_range': self.gain_range})))
+
+ def get_fft_max_idx(self):
+ return self.fft_max_idx
+
+ def set_fft_max_idx(self, fft_max_idx):
+ self.fft_max_idx = fft_max_idx
+ self.set_fft_max_idx_norm([self.fft_max_idx,self.fft_max_idx-self.fft_size][int(self.fft_max_idx>(self.fft_size/2))])
+
+ def get_actual_sample_rate(self):
+ return self.actual_sample_rate
+
+ def set_actual_sample_rate(self, actual_sample_rate):
+ self.actual_sample_rate = actual_sample_rate
+ self.set_samp_rate(int(self.actual_sample_rate))
+ self.set_variable_static_actual_sample_rate(self.actual_sample_rate)
+
+ def get_actual_center_freq(self):
+ return self.actual_center_freq
+
+ def set_actual_center_freq(self, actual_center_freq):
+ self.actual_center_freq = actual_center_freq
+ self.set_fft_center_freq(self.actual_center_freq * self.relative_freq)
+
+ def get_str_to_bool(self):
+ return self.str_to_bool
+
+ def set_str_to_bool(self, str_to_bool):
+ self.str_to_bool = str_to_bool
+ self.set_fft_averaging(self.str_to_bool(self.averaging))
+ self.set_fft_peak_hold(self.str_to_bool(self.peak_hold))
+
+ def get_signal_probe(self):
+ return self.signal_probe
+
+ def set_signal_probe(self, signal_probe):
+ self.signal_probe = signal_probe
+ self.set_signal_probe_log(math.log10([self.signal_probe,1.0][self.signal_probe==0.0])*10)
+
+ def get_samp_rate(self):
+ return self.samp_rate
+
+ def set_samp_rate(self, samp_rate):
+ self.samp_rate = samp_rate
+ self.set_max_bin_freq(self.fft_center_freq + (((1.0*self.fft_max_idx_norm) / self.fft_size) * self.samp_rate))
+ self.fft_sink.set_sample_rate(self.samp_rate)
+ self.logpwrfft_x_0.set_sample_rate(self.samp_rate)
+ self.waterfall_sink.set_sample_rate(self.samp_rate)
+ self.wxgui_scopesink2_0.set_sample_rate(self.samp_rate)
+
+ def get_requested_freq_txt(self):
+ return self.requested_freq_txt
+
+ def set_requested_freq_txt(self, requested_freq_txt):
+ self.requested_freq_txt = requested_freq_txt
+ self.set_requested_freq(self.requested_freq_txt + self.freq_fine)
+ self._requested_freq_txt_slider.set_value(self.requested_freq_txt)
+ self._requested_freq_txt_text_box.set_value(self.requested_freq_txt)
+
+ def get_gain_default(self):
+ return self.gain_default
+
+ def set_gain_default(self, gain_default):
+ self.gain_default = gain_default
+ self.set_selected_gain(self.gain_default)
+
+ def get_freq_fine(self):
+ return self.freq_fine
+
+ def set_freq_fine(self, freq_fine):
+ self.freq_fine = freq_fine
+ self._freq_fine_slider.set_value(self.freq_fine)
+ self._freq_fine_text_box.set_value(self.freq_fine)
+ self.set_requested_freq(self.requested_freq_txt + self.freq_fine)
+
+ def get_fft_max_idx_norm(self):
+ return self.fft_max_idx_norm
+
+ def set_fft_max_idx_norm(self, fft_max_idx_norm):
+ self.fft_max_idx_norm = fft_max_idx_norm
+ self.set_max_bin_freq(self.fft_center_freq + (((1.0*self.fft_max_idx_norm) / self.fft_size) * self.samp_rate))
+
+ def get_fft_center_freq(self):
+ return self.fft_center_freq
+
+ def set_fft_center_freq(self, fft_center_freq):
+ self.fft_center_freq = fft_center_freq
+ self.set_max_bin_freq(self.fft_center_freq + (((1.0*self.fft_max_idx_norm) / self.fft_size) * self.samp_rate))
+ self.fft_sink.set_baseband_freq(self.fft_center_freq)
+ self.waterfall_sink.set_baseband_freq(self.fft_center_freq)
+
+ def get_antennas(self):
+ return self.antennas
+
+ def set_antennas(self, antennas):
+ self.antennas = antennas
+ self.set_selected_antenna([ [self.antenna,self.antennas[0]][self.antenna not in self.antennas] ,self.antennas[0]][self.antenna==''])
+
+ def get_window_fn_name_map(self):
+ return self.window_fn_name_map
+
+ def set_window_fn_name_map(self, window_fn_name_map):
+ self.window_fn_name_map = window_fn_name_map
+ self.set_variable_static_fft_window_name(self.window_fn_name_map[self.window])
+
+ def get_window_fn_map(self):
+ return self.window_fn_map
+
+ def set_window_fn_map(self, window_fn_map):
+ self.window_fn_map = window_fn_map
+ self.set_window_fn(self.window_fn_map[self.window])
+
+ def get_usrp_info(self):
+ return self.usrp_info
+
+ def set_usrp_info(self, usrp_info):
+ self.usrp_info = usrp_info
+ self.set_variable_static_usrp_info(self.usrp_info)
+
+ def get_tune_result(self):
+ return self.tune_result
+
+ def set_tune_result(self, tune_result):
+ self.tune_result = tune_result
+ self.set_variable_static_actual_dsp_freq(self.tune_result.actual_dsp_freq)
+ self.set_variable_static_rf_freq(self.tune_result.actual_rf_freq)
+
+ def get_tune_mode(self):
+ return self.tune_mode
+
+ def set_tune_mode(self, tune_mode):
+ self.tune_mode = tune_mode
+ self._tune_mode_chooser.set_value(self.tune_mode)
+ self.set_tune_obj([self.requested_freq, uhd.tune_request(self.requested_freq, self.lo_offset_txt), uhd.tune_request(self.requested_freq, dsp_freq=0, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)][self.tune_mode])
+
+ def get_time_probe(self):
+ return self.time_probe
+
+ def set_time_probe(self, time_probe):
+ self.time_probe = time_probe
+ self.set_variable_static_time_now(str( [time.ctime(self.time_probe.get_real_secs()), datetime.timedelta(seconds=self.time_probe.get_real_secs()), time.gmtime(self.time_probe.get_real_secs())] [self.relative_time]))
+
+ def get_test(self):
+ return self.test
+
+ def set_test(self, test):
+ self.test = test
+ self._run_evaluators_later(('any_test_1', lambda: self._evalutate_any_test_1(**{'test': self.test})))
+ self._test_chooser.set_value(self.test)
+
+ def get_subdev_spec(self):
+ return self.subdev_spec
+
+ def set_subdev_spec(self, subdev_spec):
+ self.subdev_spec = subdev_spec
+ self.set_variable_static_subdev_spec(self.subdev_spec)
+
+ def get_signal_probe_log(self):
+ return self.signal_probe_log
+
+ def set_signal_probe_log(self, signal_probe_log):
+ self.signal_probe_log = signal_probe_log
+ self.set_variable_static_level_probe(self.signal_probe_log)
+
+ def get_selected_gain(self):
+ return self.selected_gain
+
+ def set_selected_gain(self, selected_gain):
+ self.selected_gain = selected_gain
+ self._selected_gain_slider.set_value(self.selected_gain)
+ self._selected_gain_text_box.set_value(self.selected_gain)
+ self.set_selected_gain_proxy(self.selected_gain)
+
+ def get_selected_antenna(self):
+ return self.selected_antenna
+
+ def set_selected_antenna(self, selected_antenna):
+ self.selected_antenna = selected_antenna
+ self._selected_antenna_chooser.set_value(self.selected_antenna)
+ self.set_selected_antenna_proxy(self.selected_antenna)
+
+ def get_requested_sample_rate_base(self):
+ return self.requested_sample_rate_base
+
+ def set_requested_sample_rate_base(self, requested_sample_rate_base):
+ self.requested_sample_rate_base = requested_sample_rate_base
+ self.set_requested_sample_rate(self.requested_sample_rate_base / (1.*self.decim))
+ self._requested_sample_rate_base_text_box.set_value(self.requested_sample_rate_base)
+
+ def get_requested_freq(self):
+ return self.requested_freq
+
+ def set_requested_freq(self, requested_freq):
+ self.requested_freq = requested_freq
+ self.set_tune_obj([self.requested_freq, uhd.tune_request(self.requested_freq, self.lo_offset_txt), uhd.tune_request(self.requested_freq, dsp_freq=0, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)][self.tune_mode])
+ self.set_variable_static_requested_freq(self.requested_freq)
+
+ def get_relative_time(self):
+ return self.relative_time
+
+ def set_relative_time(self, relative_time):
+ self.relative_time = relative_time
+ self._relative_time_chooser.set_value(self.relative_time)
+ self.set_variable_static_time_now(str( [time.ctime(self.time_probe.get_real_secs()), datetime.timedelta(seconds=self.time_probe.get_real_secs()), time.gmtime(self.time_probe.get_real_secs())] [self.relative_time]))
+
+ def get_motherboard_sensors(self):
+ return self.motherboard_sensors
+
+ def set_motherboard_sensors(self, motherboard_sensors):
+ self.motherboard_sensors = motherboard_sensors
+ self.set_variable_static_text_0(self.motherboard_sensors)
+
+ def get_max_bin_freq(self):
+ return self.max_bin_freq
+
+ def set_max_bin_freq(self, max_bin_freq):
+ self.max_bin_freq = max_bin_freq
+ self.set_variable_static_max_bin_freq(self.max_bin_freq)
+
+ def get_locked_probe(self):
+ return self.locked_probe
+
+ def set_locked_probe(self, locked_probe):
+ self.locked_probe = locked_probe
+ self.set_static_locked('"' + str(self.locked_probe) + '"')
+
+ def get_lo_offset_txt(self):
+ return self.lo_offset_txt
+
+ def set_lo_offset_txt(self, lo_offset_txt):
+ self.lo_offset_txt = lo_offset_txt
+ self._lo_offset_txt_text_box.set_value(self.lo_offset_txt)
+ self.set_tune_obj([self.requested_freq, uhd.tune_request(self.requested_freq, self.lo_offset_txt), uhd.tune_request(self.requested_freq, dsp_freq=0, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)][self.tune_mode])
+
+ def get_fft_peak_hold(self):
+ return self.fft_peak_hold
+
+ def set_fft_peak_hold(self, fft_peak_hold):
+ self.fft_peak_hold = fft_peak_hold
+ self._run_evaluators_later(('variable_any_code_fft_sink_peak_hold', lambda: self._evalutate_variable_any_code_fft_sink_peak_hold(**{'peak_hold': self.fft_peak_hold})))
+
+ def get_fft_max_lvl(self):
+ return self.fft_max_lvl
+
+ def set_fft_max_lvl(self, fft_max_lvl):
+ self.fft_max_lvl = fft_max_lvl
+ self.set_fft_max_lvl_value(self.fft_max_lvl)
+ self.set_variable_static_fft_max_lvl_log(self.fft_max_lvl)
+
+ def get_fft_averaging(self):
+ return self.fft_averaging
+
+ def set_fft_averaging(self, fft_averaging):
+ self.fft_averaging = fft_averaging
+ self._run_evaluators_later(('variable_any_code_fft_sink_ave', lambda: self._evalutate_variable_any_code_fft_sink_ave(**{'averaging': self.fft_averaging})))
+ self._run_evaluators_later(('variable_any_code_waterfall_ave', lambda: self._evalutate_variable_any_code_waterfall_ave(**{'averaging': self.fft_averaging})))
+
+ def get_decim(self):
+ return self.decim
+
+ def set_decim(self, decim):
+ self.decim = decim
+ self._decim_slider.set_value(self.decim)
+ self._decim_text_box.set_value(self.decim)
+ self.set_requested_sample_rate(self.requested_sample_rate_base / (1.*self.decim))
+
+ def get_daughterboard_sensors(self):
+ return self.daughterboard_sensors
+
+ def set_daughterboard_sensors(self, daughterboard_sensors):
+ self.daughterboard_sensors = daughterboard_sensors
+ self.set_variable_static_text_0_0(self.daughterboard_sensors)
+
+ def get_clicked_freq(self):
+ return self.clicked_freq
+
+ def set_clicked_freq(self, clicked_freq):
+ self.clicked_freq = clicked_freq
+ self.set_clicked_freq_txt(self.clicked_freq)
+
+ def get_window_fn(self):
+ return self.window_fn
+
+ def set_window_fn(self, window_fn):
+ self.window_fn = window_fn
+
+ def get_variable_static_usrp_info(self):
+ return self.variable_static_usrp_info
+
+ def set_variable_static_usrp_info(self, variable_static_usrp_info):
+ self.variable_static_usrp_info = variable_static_usrp_info
+ self._variable_static_usrp_info_static_text.set_value(self.variable_static_usrp_info)
+
+ def get_variable_static_time_now(self):
+ return self.variable_static_time_now
+
+ def set_variable_static_time_now(self, variable_static_time_now):
+ self.variable_static_time_now = variable_static_time_now
+ self._variable_static_time_now_static_text.set_value(self.variable_static_time_now)
+
+ def get_variable_static_text_0_0(self):
+ return self.variable_static_text_0_0
+
+ def set_variable_static_text_0_0(self, variable_static_text_0_0):
+ self.variable_static_text_0_0 = variable_static_text_0_0
+ self._variable_static_text_0_0_static_text.set_value(self.variable_static_text_0_0)
+
+ def get_variable_static_text_0(self):
+ return self.variable_static_text_0
+
+ def set_variable_static_text_0(self, variable_static_text_0):
+ self.variable_static_text_0 = variable_static_text_0
+ self._variable_static_text_0_static_text.set_value(self.variable_static_text_0)
+
+ def get_variable_static_subdev_spec(self):
+ return self.variable_static_subdev_spec
+
+ def set_variable_static_subdev_spec(self, variable_static_subdev_spec):
+ self.variable_static_subdev_spec = variable_static_subdev_spec
+ self._variable_static_subdev_spec_static_text.set_value(self.variable_static_subdev_spec)
+
+ def get_variable_static_rf_freq(self):
+ return self.variable_static_rf_freq
+
+ def set_variable_static_rf_freq(self, variable_static_rf_freq):
+ self.variable_static_rf_freq = variable_static_rf_freq
+ self._variable_static_rf_freq_static_text.set_value(self.variable_static_rf_freq)
+
+ def get_variable_static_requested_freq(self):
+ return self.variable_static_requested_freq
+
+ def set_variable_static_requested_freq(self, variable_static_requested_freq):
+ self.variable_static_requested_freq = variable_static_requested_freq
+ self._variable_static_requested_freq_static_text.set_value(self.variable_static_requested_freq)
+
+ def get_variable_static_max_bin_freq(self):
+ return self.variable_static_max_bin_freq
+
+ def set_variable_static_max_bin_freq(self, variable_static_max_bin_freq):
+ self.variable_static_max_bin_freq = variable_static_max_bin_freq
+ self._variable_static_max_bin_freq_static_text.set_value(self.variable_static_max_bin_freq)
+
+ def get_variable_static_level_probe(self):
+ return self.variable_static_level_probe
+
+ def set_variable_static_level_probe(self, variable_static_level_probe):
+ self.variable_static_level_probe = variable_static_level_probe
+ self._variable_static_level_probe_static_text.set_value(self.variable_static_level_probe)
+
+ def get_variable_static_fft_window_name(self):
+ return self.variable_static_fft_window_name
+
+ def set_variable_static_fft_window_name(self, variable_static_fft_window_name):
+ self.variable_static_fft_window_name = variable_static_fft_window_name
+ self._variable_static_fft_window_name_static_text.set_value(self.variable_static_fft_window_name)
+
+ def get_variable_static_fft_max_lvl_log(self):
+ return self.variable_static_fft_max_lvl_log
+
+ def set_variable_static_fft_max_lvl_log(self, variable_static_fft_max_lvl_log):
+ self.variable_static_fft_max_lvl_log = variable_static_fft_max_lvl_log
+ self._variable_static_fft_max_lvl_log_static_text.set_value(self.variable_static_fft_max_lvl_log)
+
+ def get_variable_static_actual_sample_rate(self):
+ return self.variable_static_actual_sample_rate
+
+ def set_variable_static_actual_sample_rate(self, variable_static_actual_sample_rate):
+ self.variable_static_actual_sample_rate = variable_static_actual_sample_rate
+ self._variable_static_actual_sample_rate_static_text.set_value(self.variable_static_actual_sample_rate)
+
+ def get_variable_static_actual_dsp_freq(self):
+ return self.variable_static_actual_dsp_freq
+
+ def set_variable_static_actual_dsp_freq(self, variable_static_actual_dsp_freq):
+ self.variable_static_actual_dsp_freq = variable_static_actual_dsp_freq
+ self._variable_static_actual_dsp_freq_static_text.set_value(self.variable_static_actual_dsp_freq)
+
+ def get_variable_any_code_waterfall_ave(self):
+ return self.variable_any_code_waterfall_ave
+
+ def set_variable_any_code_waterfall_ave(self, variable_any_code_waterfall_ave):
+ self.variable_any_code_waterfall_ave = variable_any_code_waterfall_ave
+
+ def get_variable_any_code_iq_correction(self):
+ return self.variable_any_code_iq_correction
+
+ def set_variable_any_code_iq_correction(self, variable_any_code_iq_correction):
+ self.variable_any_code_iq_correction = variable_any_code_iq_correction
+
+ def get_variable_any_code_fft_sink_peak_hold(self):
+ return self.variable_any_code_fft_sink_peak_hold
+
+ def set_variable_any_code_fft_sink_peak_hold(self, variable_any_code_fft_sink_peak_hold):
+ self.variable_any_code_fft_sink_peak_hold = variable_any_code_fft_sink_peak_hold
+
+ def get_variable_any_code_fft_sink_ave(self):
+ return self.variable_any_code_fft_sink_ave
+
+ def set_variable_any_code_fft_sink_ave(self, variable_any_code_fft_sink_ave):
+ self.variable_any_code_fft_sink_ave = variable_any_code_fft_sink_ave
+
+ def get_variable_any_code_auto_dc_offset_removal(self):
+ return self.variable_any_code_auto_dc_offset_removal
+
+ def set_variable_any_code_auto_dc_offset_removal(self, variable_any_code_auto_dc_offset_removal):
+ self.variable_any_code_auto_dc_offset_removal = variable_any_code_auto_dc_offset_removal
+
+ def get_update_time_source(self):
+ return self.update_time_source
+
+ def set_update_time_source(self, update_time_source):
+ self.update_time_source = update_time_source
+
+ def get_update_clock_source(self):
+ return self.update_clock_source
+
+ def set_update_clock_source(self, update_clock_source):
+ self.update_clock_source = update_clock_source
+
+ def get_tune_obj(self):
+ return self.tune_obj
+
+ def set_tune_obj(self, tune_obj):
+ self.tune_obj = tune_obj
+ self._run_evaluators_later(('actual_center_freq', lambda: self._evalutate_actual_center_freq(**{'tune_obj': self.tune_obj})))
+ self._run_evaluators_later(('tune_result', lambda: self._evalutate_tune_result(**{'tune_obj': self.tune_obj})))
+
+ def get_static_locked(self):
+ return self.static_locked
+
+ def set_static_locked(self, static_locked):
+ self.static_locked = static_locked
+ self._static_locked_static_text.set_value(self.static_locked)
+
+ def get_show_stream_tags_chk(self):
+ return self.show_stream_tags_chk
+
+ def set_show_stream_tags_chk(self, show_stream_tags_chk):
+ self.show_stream_tags_chk = show_stream_tags_chk
+ self._show_stream_tags_chk_check_box.set_value(self.show_stream_tags_chk)
+ self.blocks_tag_debug_0.set_display(self.show_stream_tags_chk)
+
+ def get_show_max_lvl(self):
+ return self.show_max_lvl
+
+ def set_show_max_lvl(self, show_max_lvl):
+ self.show_max_lvl = show_max_lvl
+ self._show_max_lvl_check_box.set_value(self.show_max_lvl)
+
+ def get_show_max_freq(self):
+ return self.show_max_freq
+
+ def set_show_max_freq(self, show_max_freq):
+ self.show_max_freq = show_max_freq
+ self._show_max_freq_check_box.set_value(self.show_max_freq)
+
+ def get_selected_gain_proxy(self):
+ return self.selected_gain_proxy
+
+ def set_selected_gain_proxy(self, selected_gain_proxy):
+ self.selected_gain_proxy = selected_gain_proxy
+ self.src.set_gain(self.selected_gain_proxy, 0)
+
+ def get_selected_antenna_proxy(self):
+ return self.selected_antenna_proxy
+
+ def set_selected_antenna_proxy(self, selected_antenna_proxy):
+ self.selected_antenna_proxy = selected_antenna_proxy
+ self.src.set_antenna(self.selected_antenna_proxy, 0)
+
+ def get_scope_mode(self):
+ return self.scope_mode
+
+ def set_scope_mode(self, scope_mode):
+ self.scope_mode = scope_mode
+ self._scope_mode_chooser.set_value(self.scope_mode)
+ self.blks2_selector_0.set_input_index(int(self.scope_mode))
+ self.blks2_selector_0_0.set_output_index(int(self.scope_mode))
+
+ def get_requested_sample_rate(self):
+ return self.requested_sample_rate
+
+ def set_requested_sample_rate(self, requested_sample_rate):
+ self.requested_sample_rate = requested_sample_rate
+ self._run_evaluators_later(('actual_sample_rate', lambda: self._evalutate_actual_sample_rate(**{'requested_sample_rate': self.requested_sample_rate})))
+ self.src.set_samp_rate(self.requested_sample_rate)
+
+ def get_motherboard_sensor_names(self):
+ return self.motherboard_sensor_names
+
+ def set_motherboard_sensor_names(self, motherboard_sensor_names):
+ self.motherboard_sensor_names = motherboard_sensor_names
+ self._run_evaluators_later(('motherboard_sensors', lambda: self._evalutate_motherboard_sensors(**{'motherboard_sensor_names': self.motherboard_sensor_names})))
+
+ def get_max_decim(self):
+ return self.max_decim
+
+ def set_max_decim(self, max_decim):
+ self.max_decim = max_decim
+
+ def get_initial_gain(self):
+ return self.initial_gain
+
+ def set_initial_gain(self, initial_gain):
+ self.initial_gain = initial_gain
+ self._run_evaluators_later(('gain_default', lambda: self._evalutate_gain_default(**{'initial_gain': self.initial_gain})))
+
+ def get_has_lo_locked(self):
+ return self.has_lo_locked
+
+ def set_has_lo_locked(self, has_lo_locked):
+ self.has_lo_locked = has_lo_locked
+ self.set_locked_probe_poll_rate(self.lo_check_interval * float(self.has_lo_locked))
+
+ def get_freq_range(self):
+ return self.freq_range
+
+ def set_freq_range(self, freq_range):
+ self.freq_range = freq_range
+
+ def get_fix_invalid_freq(self):
+ return self.fix_invalid_freq
+
+ def set_fix_invalid_freq(self, fix_invalid_freq):
+ self.fix_invalid_freq = fix_invalid_freq
+
+ def get_fft_max_lvl_value(self):
+ return self.fft_max_lvl_value
+
+ def set_fft_max_lvl_value(self, fft_max_lvl_value):
+ self.fft_max_lvl_value = fft_max_lvl_value
+
+ def get_fft_ave_probe(self):
+ return self.fft_ave_probe
+
+ def set_fft_ave_probe(self, fft_ave_probe):
+ self.fft_ave_probe = fft_ave_probe
+ self.logpwrfft_x_0.set_avg_alpha(self.fft_ave_probe)
+
+ def get_daughterboard_sensor_names(self):
+ return self.daughterboard_sensor_names
+
+ def set_daughterboard_sensor_names(self, daughterboard_sensor_names):
+ self.daughterboard_sensor_names = daughterboard_sensor_names
+ self._run_evaluators_later(('daughterboard_sensors', lambda: self._evalutate_daughterboard_sensors(**{'daughterboard_sensor_names': self.daughterboard_sensor_names})))
+
+ def get_clicked_freq_txt(self):
+ return self.clicked_freq_txt
+
+ def set_clicked_freq_txt(self, clicked_freq_txt):
+ self.clicked_freq_txt = clicked_freq_txt
+ self._clicked_freq_txt_text_box.set_value(self.clicked_freq_txt)
+
+ def get_auto_iq_correction(self):
+ return self.auto_iq_correction
+
+ def set_auto_iq_correction(self, auto_iq_correction):
+ self.auto_iq_correction = auto_iq_correction
+ self._auto_iq_correction_check_box.set_value(self.auto_iq_correction)
+ self._run_evaluators_later(('variable_any_code_iq_correction', lambda: self._evalutate_variable_any_code_iq_correction(**{'auto_iq_correction': self.auto_iq_correction})))
+
+ def get_auto_dc_offset_removal(self):
+ return self.auto_dc_offset_removal
+
+ def set_auto_dc_offset_removal(self, auto_dc_offset_removal):
+ self.auto_dc_offset_removal = auto_dc_offset_removal
+ self._auto_dc_offset_removal_check_box.set_value(self.auto_dc_offset_removal)
+ self._run_evaluators_later(('variable_any_code_auto_dc_offset_removal', lambda: self._evalutate_variable_any_code_auto_dc_offset_removal(**{'auto_dc_offset_removal': self.auto_dc_offset_removal})))
+
+ def get_any_test_1(self):
+ return self.any_test_1
+
+ def set_any_test_1(self, any_test_1):
+ self.any_test_1 = any_test_1
+
+
+if __name__ == '__main__':
+ parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
+ parser.add_option("-A", "--antenna", dest="antenna", type="string", default="",
+ help="Set Antenna (blank for default) [default=%default]")
+ parser.add_option("-a", "--args", dest="args", type="string", default="",
+ help="Set UHD device args [default=%default]")
+ parser.add_option("", "--ave", dest="ave", type="eng_float", default=eng_notation.num_to_str(1*0 + 0.5),
+ help="Set Average FFT [default=%default]")
+ parser.add_option("", "--averaging", dest="averaging", type="string", default="True",
+ help="Set Enable FFT averaging [default=%default]")
+ parser.add_option("", "--bw", dest="bw", type="eng_float", default=eng_notation.num_to_str(0),
+ help="Set Daughterboard bandwidth (where appropriate) [default=%default]")
+ parser.add_option("", "--dyn-rng", dest="dyn_rng", type="eng_float", default=eng_notation.num_to_str(130),
+ help="Set Dynamic Range [default=%default]")
+ parser.add_option("", "--fft-rate", dest="fft_rate", type="intx", default=15,
+ help="Set FFT Rate [default=%default]")
+ parser.add_option("", "--fft-ref-scale", dest="fft_ref_scale", type="eng_float", default=eng_notation.num_to_str(2.0),
+ help="Set FFT Ref Scale (p2p) [default=%default]")
+ parser.add_option("", "--fft-size", dest="fft_size", type="intx", default=1024,
+ help="Set FFT Size [default=%default]")
+ parser.add_option("-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(0 + 100e6),
+ help="Set Frequency [default=%default]")
+ parser.add_option("", "--freq-fine-range", dest="freq_fine_range", type="eng_float", default=eng_notation.num_to_str(2e6),
+ help="Set Fine frequency slider range [default=%default]")
+ parser.add_option("-g", "--gain", dest="gain", type="eng_float", default=eng_notation.num_to_str(float("-inf")),
+ help="Set Gain (default '-inf' selects relative gain of 25%) [default=%default]")
+ parser.add_option("", "--lo-check-interval", dest="lo_check_interval", type="eng_float", default=eng_notation.num_to_str(5),
+ help="Set LO lock check frequency (Hz) [default=%default]")
+ parser.add_option("", "--lo-offset", dest="lo_offset", type="eng_float", default=eng_notation.num_to_str(0),
+ help="Set LO offset (selects LO offset tuning mode) [default=%default]")
+ parser.add_option("", "--mag-alpha", dest="mag_alpha", type="eng_float", default=eng_notation.num_to_str(1e-3),
+ help="Set Signal magnitude probe alpha [default=%default]")
+ parser.add_option("", "--peak-hold", dest="peak_hold", type="string", default="False",
+ help="Set FFT peak hold [default=%default]")
+ parser.add_option("", "--pps", dest="pps", type="string", default='',
+ help="Set Time source (none, internal, external, mimo, gpsdo). <empty> leaves it at the default. [default=%default]")
+ parser.add_option("", "--probe-interval", dest="probe_interval", type="eng_float", default=eng_notation.num_to_str(3),
+ help="Set Signal probe frequency (Hz) [default=%default]")
+ parser.add_option("-s", "--rate", dest="rate", type="eng_float", default=eng_notation.num_to_str(1e6),
+ help="Set Sample Rate [default=%default]")
+ parser.add_option("", "--ref", dest="ref", type="string", default='',
+ help="Set Clock source (internal, external, mimo, gpsdo). <empty> leaves it at the default. [default=%default]")
+ parser.add_option("", "--ref-lvl", dest="ref_lvl", type="eng_float", default=eng_notation.num_to_str(0),
+ help="Set Reference Level [default=%default]")
+ parser.add_option("", "--sensor-interval", dest="sensor_interval", type="eng_float", default=eng_notation.num_to_str(2),
+ help="Set Sensor update frequency (Hz) [default=%default]")
+ parser.add_option("", "--show-stream-tags", dest="show_stream_tags", type="string", default="False",
+ help="Set Print stream tags [default=%default]")
+ parser.add_option("", "--spec", dest="spec", type="string", default='',
+ help="Set Sub-device specification (where appropriate) [default=%default]")
+ parser.add_option("", "--stream-args", dest="stream_args", type="string", default="",
+ help="Set Stream arguments (e.g. scalar=1024) [default=%default]")
+ parser.add_option("", "--window", dest="window", type="string", default="auto",
+ help="Set Window (bh: Blackman-Harris, ham: Hamming, han: Hanning, rect: Rectangular, flat: Flattop) [default=%default]")
+ parser.add_option("", "--wire-format", dest="wire_format", type="string", default="",
+ help="Set Wire format (e.g. sc16, sc8) [blank = automatic] [default=%default]")
+ (options, args) = parser.parse_args()
+ if gr.enable_realtime_scheduling() != gr.RT_OK:
+ print "Error: failed to enable realtime scheduling."
+ tb = mega_fft(antenna=options.antenna, args=options.args, ave=options.ave, averaging=options.averaging, bw=options.bw, dyn_rng=options.dyn_rng, fft_rate=options.fft_rate, fft_ref_scale=options.fft_ref_scale, fft_size=options.fft_size, freq=options.freq, freq_fine_range=options.freq_fine_range, gain=options.gain, lo_check_interval=options.lo_check_interval, lo_offset=options.lo_offset, mag_alpha=options.mag_alpha, peak_hold=options.peak_hold, pps=options.pps, probe_interval=options.probe_interval, rate=options.rate, ref=options.ref, ref_lvl=options.ref_lvl, sensor_interval=options.sensor_interval, show_stream_tags=options.show_stream_tags, spec=options.spec, stream_args=options.stream_args, window=options.window, wire_format=options.wire_format)
+ tb.Start(True)
+ tb.Wait()
diff --git a/tools/mega_fft/mega_fft_2ch.py b/tools/mega_fft/mega_fft_2ch.py
new file mode 100755
index 000000000..c8a74bc26
--- /dev/null
+++ b/tools/mega_fft/mega_fft_2ch.py
@@ -0,0 +1,2818 @@
+#!/usr/bin/env python2
+##################################################
+# GNU Radio Python Flow Graph
+# Title: Mega FFT
+# Author: Balint Seeber, Ettus Research
+# Description: Standard edition, dual-channel
+# Generated: Sun Jul 26 20:09:53 2015
+##################################################
+
+if __name__ == '__main__':
+ import ctypes
+ import sys
+ if sys.platform.startswith('linux'):
+ try:
+ x11 = ctypes.cdll.LoadLibrary('libX11.so')
+ x11.XInitThreads()
+ except:
+ print "Warning: failed to XInitThreads()"
+
+from gnuradio import analog
+from gnuradio import blocks
+from gnuradio import eng_notation
+from gnuradio import gr
+from gnuradio import uhd
+from gnuradio import wxgui
+from gnuradio.eng_option import eng_option
+from gnuradio.fft import logpwrfft
+from gnuradio.fft import window
+from gnuradio.fft import window as fft_win
+from gnuradio.filter import firdes
+from gnuradio.wxgui import fftsink2
+from gnuradio.wxgui import forms
+from gnuradio.wxgui import scopesink2
+from gnuradio.wxgui import waterfallsink2
+from grc_gnuradio import blks2 as grc_blks2
+from grc_gnuradio import wxgui as grc_wxgui
+from optparse import OptionParser
+import math
+import threading
+import time
+import time, datetime
+import wx
+
+class mega_fft_2ch(grc_wxgui.top_block_gui):
+
+ def __init__(self, antenna="", args="", ave=1*0 + 0.5, averaging="True", bw=0, dyn_rng=130, fft_rate=15, fft_ref_scale=2.0, fft_size=1024, freq=0 + 100e6, freq_fine_range=2e6, gain=float("-inf"), lo_check_interval=5, lo_offset=0, mag_alpha=1e-3, peak_hold="False", pps='', probe_interval=3, rate=1e6, ref='', ref_lvl=0, sensor_interval=2, show_stream_tags="False", spec='', stream_args="", window="auto", wire_format=""):
+ grc_wxgui.top_block_gui.__init__(self, title="Mega FFT")
+
+ ##################################################
+ # Parameters
+ ##################################################
+ self.antenna = antenna
+ self.args = args
+ self.ave = ave
+ self.averaging = averaging
+ self.bw = bw
+ self.dyn_rng = dyn_rng
+ self.fft_rate = fft_rate
+ self.fft_ref_scale = fft_ref_scale
+ self.fft_size = fft_size
+ self.freq = freq
+ self.freq_fine_range = freq_fine_range
+ self.gain = gain
+ self.lo_check_interval = lo_check_interval
+ self.lo_offset = lo_offset
+ self.mag_alpha = mag_alpha
+ self.peak_hold = peak_hold
+ self.pps = pps
+ self.probe_interval = probe_interval
+ self.rate = rate
+ self.ref = ref
+ self.ref_lvl = ref_lvl
+ self.sensor_interval = sensor_interval
+ self.show_stream_tags = show_stream_tags
+ self.spec = spec
+ self.stream_args = stream_args
+ self.window = window
+ self.wire_format = wire_format
+
+ ##################################################
+ # Variables
+ ##################################################
+ self.relative_freq = relative_freq = 1
+ self.gain_range = gain_range = uhd.gain_range(0,0,0)
+ self.fft_max_idx = fft_max_idx = (fft_size/2)*0
+ self.actual_sample_rate = actual_sample_rate = rate
+ self.actual_center_freq = actual_center_freq = 0
+ self.str_to_bool = str_to_bool = lambda x: len(x)>0 and x.lower()[0] not in ['0', 'n', 'f']
+ self.signal_probe = signal_probe = 0.0
+ self.samp_rate = samp_rate = int(actual_sample_rate)
+ self.requested_freq_txt = requested_freq_txt = freq
+ self.gain_default = gain_default = gain_range.start()
+ self.freq_fine = freq_fine = 0
+ self.fft_max_idx_norm = fft_max_idx_norm = [fft_max_idx,fft_max_idx-fft_size][int(fft_max_idx>(fft_size/2))]
+ self.fft_center_freq = fft_center_freq = actual_center_freq * relative_freq
+ self.antennas = antennas = ['']
+ self.window_fn_name_map = window_fn_name_map = {'auto': 'Auto', 'bh': 'Blackman-Harris', 'ham': 'Hamming', 'han': 'Hanning', 'rect': 'Rectangular', 'flat': 'Flattop'}
+ self.window_fn_map = window_fn_map = {'auto': None, 'bh': fft_win.blackmanharris, 'ham': fft_win.hamming, 'han': fft_win.hanning, 'rect': fft_win.rectangular, 'flat': fft_win.flattop}
+ self.usrp_info = usrp_info = '(unknown)'
+ self.tune_result = tune_result = uhd.tune_result_t()
+ self.tune_mode = tune_mode = [1,0][lo_offset==0.0]
+ self.time_probe = time_probe = uhd.time_spec_t()
+ self.test = test = 1
+ self.subdev_spec = subdev_spec = '(unknown)'
+ self.signal_probe_log = signal_probe_log = math.log10([signal_probe,1.0][signal_probe==0.0])*10
+ self.selected_gain = selected_gain = gain_default
+ self.selected_antenna = selected_antenna = [ [antenna,antennas[0]][antenna not in antennas] ,antennas[0]][antenna=='']
+ self.requested_sample_rate_base = requested_sample_rate_base = rate
+ self.requested_freq = requested_freq = requested_freq_txt + freq_fine
+ self.relative_time = relative_time = True
+ self.motherboard_sensors = motherboard_sensors = '(none)'
+ self.max_bin_freq = max_bin_freq = fft_center_freq + (((1.0*fft_max_idx_norm) / fft_size) * samp_rate)
+ self.locked_probe = locked_probe = '(unknown)'
+ self.lo_offset_txt = lo_offset_txt = lo_offset
+ self.fft_peak_hold = fft_peak_hold = str_to_bool(peak_hold)
+ self.fft_max_lvl_2 = fft_max_lvl_2 = 0.0
+ self.fft_max_lvl = fft_max_lvl = 0.0
+ self.fft_averaging = fft_averaging = str_to_bool(averaging)
+ self.decim = decim = 1
+ self.daughterboard_sensors = daughterboard_sensors = '(none)'
+ self.clicked_freq = clicked_freq = 0
+ self.window_fn = window_fn = window_fn_map[window]
+ self.variable_static_usrp_info = variable_static_usrp_info = usrp_info
+ self.variable_static_time_now = variable_static_time_now = str( [time.ctime(time_probe.get_real_secs()), datetime.timedelta(seconds=time_probe.get_real_secs()), time.gmtime(time_probe.get_real_secs())] [relative_time])
+ self.variable_static_text_0_0 = variable_static_text_0_0 = daughterboard_sensors
+ self.variable_static_text_0 = variable_static_text_0 = motherboard_sensors
+ self.variable_static_subdev_spec = variable_static_subdev_spec = subdev_spec
+ self.variable_static_rf_freq = variable_static_rf_freq = tune_result.actual_rf_freq
+ self.variable_static_requested_freq = variable_static_requested_freq = requested_freq
+ self.variable_static_max_bin_freq = variable_static_max_bin_freq = max_bin_freq
+ self.variable_static_level_probe = variable_static_level_probe = signal_probe_log
+ self.variable_static_fft_window_name = variable_static_fft_window_name = window_fn_name_map[window]
+ self.variable_static_fft_max_lvl_log = variable_static_fft_max_lvl_log = fft_max_lvl
+ self.variable_static_actual_sample_rate = variable_static_actual_sample_rate = actual_sample_rate
+ self.variable_static_actual_dsp_freq = variable_static_actual_dsp_freq = tune_result.actual_dsp_freq
+ self.variable_any_code_waterfall_ave = variable_any_code_waterfall_ave = fft_averaging
+ self.variable_any_code_iq_correction = variable_any_code_iq_correction = None
+ self.variable_any_code_fft_sink_peak_hold = variable_any_code_fft_sink_peak_hold = fft_peak_hold
+ self.variable_any_code_fft_sink_ave = variable_any_code_fft_sink_ave = fft_averaging
+ self.variable_any_code_auto_dc_offset_removal = variable_any_code_auto_dc_offset_removal = None
+ self.update_time_source = update_time_source = None
+ self.update_clock_source = update_clock_source = None
+ self.tune_obj = tune_obj = [requested_freq, uhd.tune_request(requested_freq, lo_offset_txt), uhd.tune_request(requested_freq, dsp_freq=0, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)][tune_mode]
+ self.static_locked = static_locked = '"' + str(locked_probe) + '"'
+ self.show_stream_tags_chk = show_stream_tags_chk = [False, True][show_stream_tags.lower() != 'false']
+ self.show_max_lvl = show_max_lvl = True
+ self.show_max_freq = show_max_freq = True
+ self.selected_gain_proxy = selected_gain_proxy = selected_gain
+ self.selected_antenna_proxy = selected_antenna_proxy = selected_antenna
+ self.scope_mode_2 = scope_mode_2 = 0+1
+ self.scope_mode = scope_mode = 0+1
+ self.requested_sample_rate = requested_sample_rate = requested_sample_rate_base / (1.*decim)
+ self.motherboard_sensor_names = motherboard_sensor_names = []
+ self.max_decim = max_decim = 256
+ self.initial_gain = initial_gain = 0
+ self.has_lo_locked = has_lo_locked = False
+ self.freq_range = freq_range = uhd.freq_range(freq,freq+1)
+ self.fix_invalid_freq = fix_invalid_freq = None
+ self.fft_max_lvl_value_2 = fft_max_lvl_value_2 = fft_max_lvl_2
+ self.fft_max_lvl_value = fft_max_lvl_value = fft_max_lvl
+ self.fft_ave_probe = fft_ave_probe = ave
+ self.daughterboard_sensor_names = daughterboard_sensor_names = []
+ self.clicked_freq_txt = clicked_freq_txt = clicked_freq
+ self.auto_iq_correction = auto_iq_correction = True
+ self.auto_dc_offset_removal = auto_dc_offset_removal = True
+ self.any_test_1 = any_test_1 = test
+
+ ##################################################
+ # Blocks
+ ##################################################
+ self.src = uhd.usrp_source(
+ ",".join((args, "")),
+ uhd.stream_args(
+ cpu_format="fc32",
+ channels=range(2),
+ ),
+
+ )
+ if spec != "": self.src.set_subdev_spec(spec, 0)
+ self.src.set_samp_rate(requested_sample_rate)
+ self.src.set_center_freq(uhd.tune_request(freq, lo_offset), 0)
+ self.src.set_gain(selected_gain_proxy, 0)
+ self.src.set_center_freq(uhd.tune_request(freq, lo_offset), 1)
+ self.src.set_gain(selected_gain_proxy, 1)
+ self.nb_right = self.nb_right = wx.Notebook(self.GetWin(), style=wx.NB_TOP)
+ self.nb_right.AddPage(grc_wxgui.Panel(self.nb_right), "Params")
+ self.GridAdd(self.nb_right, 0, 1, 1, 1)
+ self.nb = self.nb = wx.Notebook(self.GetWin(), style=wx.NB_TOP)
+ self.nb.AddPage(grc_wxgui.Panel(self.nb), "FFT")
+ self.nb.AddPage(grc_wxgui.Panel(self.nb), "Scope")
+ self.nb.AddPage(grc_wxgui.Panel(self.nb), "Waterfall")
+ self.nb.AddPage(grc_wxgui.Panel(self.nb), "Sensors")
+ self.GridAdd(self.nb, 0, 0, 1, 1)
+ self.nb_test = self.nb_test = wx.Notebook(self.nb_right.GetPage(0).GetWin(), style=wx.NB_LEFT)
+ self.nb_test.AddPage(grc_wxgui.Panel(self.nb_test), "Test")
+ self.nb_right.GetPage(0).Add(self.nb_test)
+ self.nb_analog = self.nb_analog = wx.Notebook(self.nb_right.GetPage(0).GetWin(), style=wx.NB_LEFT)
+ self.nb_analog.AddPage(grc_wxgui.Panel(self.nb_analog), "Analog")
+ self.nb_analog.AddPage(grc_wxgui.Panel(self.nb_analog), "DC")
+ self.nb_right.GetPage(0).Add(self.nb_analog)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_gain_range():
+ self._post_any_code_evaluators += [('gain_range', lambda: self._evalutate_gain_range(**{}))]
+ def __evalutate_gain_range(*args, **kwds):
+ try:
+ self.gain_range = self.src.get_gain_range()
+ self.set_gain_range(self.gain_range)
+ except AttributeError, e:
+ print "AttributeError while evaulating gain_range:", e
+ __post_evalutate_gain_range()
+ except Exception, e:
+ print "Exception while evaluating gain_range:", e
+ self._evalutate_gain_range = __evalutate_gain_range
+ self.__post_evalutate_gain_range = __post_evalutate_gain_range
+ self._evalutate_gain_range(**{})
+ gain_range = self.gain_range
+ self.fft_sink = fftsink2.fft_sink_c(
+ self.nb.GetPage(0).GetWin(),
+ baseband_freq=fft_center_freq,
+ y_per_div=10,
+ y_divs=int(dyn_rng/10),
+ ref_level=ref_lvl,
+ ref_scale=fft_ref_scale,
+ sample_rate=samp_rate,
+ fft_size=1024*0 + fft_size,
+ fft_rate=fft_rate,
+ average=True,
+ avg_alpha=ave,
+ title="FFT Plot",
+ peak_hold=False, fft_in=False,
+ always_run=False,
+ fft_out=False,
+ )
+ self.nb.GetPage(0).Add(self.fft_sink.win)
+ def fft_sink_callback(x, y):
+ self.set_clicked_freq(x)
+
+ self.fft_sink.set_callback(fft_sink_callback)
+ self.waterfall_sink = waterfallsink2.waterfall_sink_c(
+ self.nb.GetPage(2).GetWin(),
+ baseband_freq=fft_center_freq,
+ dynamic_range=dyn_rng,
+ ref_level=ref_lvl,
+ ref_scale=fft_ref_scale,
+ sample_rate=samp_rate,
+ fft_size=512*0 + fft_size,
+ fft_rate=fft_rate,
+ average=True,
+ avg_alpha=ave,
+ title="Waterfall Plot",
+ fft_in=False,
+ always_run=False,
+ fft_out=False,
+ )
+ self.nb.GetPage(2).Add(self.waterfall_sink.win)
+ def waterfall_sink_callback(x, y):
+ self.set_clicked_freq(x)
+
+ self.waterfall_sink.set_callback(waterfall_sink_callback)
+ self._test_chooser = forms.button(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.test,
+ callback=self.set_test,
+ label="Test",
+ choices=[1],
+ labels=['Reset FFT average'],
+ )
+ self.nb_test.GetPage(0).Add(self._test_chooser)
+ self._show_stream_tags_chk_check_box = forms.check_box(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.show_stream_tags_chk,
+ callback=self.set_show_stream_tags_chk,
+ label="Print stream tags",
+ true=True,
+ false=False,
+ )
+ self.nb_test.GetPage(0).GridAdd(self._show_stream_tags_chk_check_box, 0, 0, 1, 1)
+ self._scope_mode_2_chooser = forms.radio_buttons(
+ parent=self.nb.GetPage(1).GetWin(),
+ value=self.scope_mode_2,
+ callback=self.set_scope_mode_2,
+ label="Scope Mode 2",
+ choices=[0, 1],
+ labels=['Complex', 'Magnitude'],
+ style=wx.RA_HORIZONTAL,
+ )
+ self.nb.GetPage(1).Add(self._scope_mode_2_chooser)
+ self._scope_mode_chooser = forms.radio_buttons(
+ parent=self.nb.GetPage(1).GetWin(),
+ value=self.scope_mode,
+ callback=self.set_scope_mode,
+ label="Scope Mode",
+ choices=[0, 1],
+ labels=['Complex', 'Magnitude'],
+ style=wx.RA_HORIZONTAL,
+ )
+ self.nb.GetPage(1).Add(self._scope_mode_chooser)
+ self.probe_avg_mag = analog.probe_avg_mag_sqrd_c(0, mag_alpha)
+ self.nb_rate = self.nb_rate = wx.Notebook(self.nb_right.GetPage(0).GetWin(), style=wx.NB_LEFT)
+ self.nb_rate.AddPage(grc_wxgui.Panel(self.nb_rate), "Rate")
+ self.nb_right.GetPage(0).Add(self.nb_rate)
+ self.nb_info = self.nb_info = wx.Notebook(self.nb_right.GetPage(0).GetWin(), style=wx.NB_LEFT)
+ self.nb_info.AddPage(grc_wxgui.Panel(self.nb_info), "Info")
+ self.nb_right.GetPage(0).GridAdd(self.nb_info, 0, 0, 1, 1)
+ self.nb_freq = self.nb_freq = wx.Notebook(self.nb_right.GetPage(0).GetWin(), style=wx.NB_LEFT)
+ self.nb_freq.AddPage(grc_wxgui.Panel(self.nb_freq), "Freq")
+ self.nb_right.GetPage(0).Add(self.nb_freq)
+ if sensor_interval > 0:
+ self._motherboard_sensor_names_poll_rate = sensor_interval
+ else:
+ self._motherboard_sensor_names_poll_rate = 1
+ self._motherboard_sensor_names_enabled = sensor_interval > 0
+ def _set_motherboard_sensor_names_poll_rate(rate):
+ self._motherboard_sensor_names_enabled = rate > 0
+ if rate > 0:
+ self._motherboard_sensor_names_poll_rate = rate
+ self.set_motherboard_sensor_names_poll_rate = _set_motherboard_sensor_names_poll_rate
+ def _motherboard_sensor_names_probe():
+ while True:
+ if self._motherboard_sensor_names_enabled:
+ val = self.src.get_mboard_sensor_names()
+ try:
+ self.set_motherboard_sensor_names(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._motherboard_sensor_names_poll_rate))
+ _motherboard_sensor_names_thread = threading.Thread(target=_motherboard_sensor_names_probe)
+ _motherboard_sensor_names_thread.daemon = True
+ _motherboard_sensor_names_thread.start()
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_initial_gain():
+ self._post_any_code_evaluators += [('initial_gain', lambda: self._evalutate_initial_gain(**{'gain_range': gain_range}))]
+ def __evalutate_initial_gain(*args, **kwds):
+ try:
+ self.initial_gain = [gain,gain_range.start() + ((gain_range.stop() - gain_range.start()) * 0.25)][gain==float('-inf')]
+ self.set_initial_gain(self.initial_gain)
+ except AttributeError, e:
+ print "AttributeError while evaulating initial_gain:", e
+ __post_evalutate_initial_gain()
+ except Exception, e:
+ print "Exception while evaluating initial_gain:", e
+ self._evalutate_initial_gain = __evalutate_initial_gain
+ self.__post_evalutate_initial_gain = __post_evalutate_initial_gain
+ self._evalutate_initial_gain(**{'gain_range': gain_range})
+ initial_gain = self.initial_gain
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_has_lo_locked():
+ self._post_any_code_evaluators += [('has_lo_locked', lambda: self._evalutate_has_lo_locked(**{}))]
+ def __evalutate_has_lo_locked(*args, **kwds):
+ try:
+ self.has_lo_locked = 'lo_locked' in self.src.get_sensor_names()
+ self.set_has_lo_locked(self.has_lo_locked)
+ except AttributeError, e:
+ print "AttributeError while evaulating has_lo_locked:", e
+ __post_evalutate_has_lo_locked()
+ except Exception, e:
+ print "Exception while evaluating has_lo_locked:", e
+ self._evalutate_has_lo_locked = __evalutate_has_lo_locked
+ self.__post_evalutate_has_lo_locked = __post_evalutate_has_lo_locked
+ self._evalutate_has_lo_locked(**{})
+ has_lo_locked = self.has_lo_locked
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_freq_range():
+ self._post_any_code_evaluators += [('freq_range', lambda: self._evalutate_freq_range(**{}))]
+ def __evalutate_freq_range(*args, **kwds):
+ try:
+ self.freq_range = self.src.get_freq_range()
+ self.set_freq_range(self.freq_range)
+ except AttributeError, e:
+ print "AttributeError while evaulating freq_range:", e
+ __post_evalutate_freq_range()
+ except Exception, e:
+ print "Exception while evaluating freq_range:", e
+ self._evalutate_freq_range = __evalutate_freq_range
+ self.__post_evalutate_freq_range = __post_evalutate_freq_range
+ self._evalutate_freq_range(**{})
+ freq_range = self.freq_range
+ self.fft_max_lvl_probe_2 = blocks.probe_signal_f()
+ if 5 > 0:
+ self._fft_ave_probe_poll_rate = 5
+ else:
+ self._fft_ave_probe_poll_rate = 1
+ self._fft_ave_probe_enabled = 5 > 0
+ def _set_fft_ave_probe_poll_rate(rate):
+ self._fft_ave_probe_enabled = rate > 0
+ if rate > 0:
+ self._fft_ave_probe_poll_rate = rate
+ self.set_fft_ave_probe_poll_rate = _set_fft_ave_probe_poll_rate
+ def _fft_ave_probe_probe():
+ while True:
+ if self._fft_ave_probe_enabled:
+ val = self.fft_sink.win['avg_alpha'] * [1.0/self.fft_sink.win['avg_alpha'],1.0][self.fft_sink.win['average']];()
+ try:
+ self.set_fft_ave_probe(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._fft_ave_probe_poll_rate))
+ _fft_ave_probe_thread = threading.Thread(target=_fft_ave_probe_probe)
+ _fft_ave_probe_thread.daemon = True
+ _fft_ave_probe_thread.start()
+ if sensor_interval > 0:
+ self._daughterboard_sensor_names_poll_rate = sensor_interval
+ else:
+ self._daughterboard_sensor_names_poll_rate = 1
+ self._daughterboard_sensor_names_enabled = sensor_interval > 0
+ def _set_daughterboard_sensor_names_poll_rate(rate):
+ self._daughterboard_sensor_names_enabled = rate > 0
+ if rate > 0:
+ self._daughterboard_sensor_names_poll_rate = rate
+ self.set_daughterboard_sensor_names_poll_rate = _set_daughterboard_sensor_names_poll_rate
+ def _daughterboard_sensor_names_probe():
+ while True:
+ if self._daughterboard_sensor_names_enabled:
+ val = self.src.get_sensor_names()
+ try:
+ self.set_daughterboard_sensor_names(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._daughterboard_sensor_names_poll_rate))
+ _daughterboard_sensor_names_thread = threading.Thread(target=_daughterboard_sensor_names_probe)
+ _daughterboard_sensor_names_thread.daemon = True
+ _daughterboard_sensor_names_thread.start()
+ self._auto_iq_correction_check_box = forms.check_box(
+ parent=self.nb_analog.GetPage(1).GetWin(),
+ value=self.auto_iq_correction,
+ callback=self.set_auto_iq_correction,
+ label="Auto IQ correction",
+ true=True,
+ false=False,
+ )
+ self.nb_analog.GetPage(1).Add(self._auto_iq_correction_check_box)
+ self._auto_dc_offset_removal_check_box = forms.check_box(
+ parent=self.nb_analog.GetPage(1).GetWin(),
+ value=self.auto_dc_offset_removal,
+ callback=self.set_auto_dc_offset_removal,
+ label="Auto DC offset removal",
+ true=True,
+ false=False,
+ )
+ self.nb_analog.GetPage(1).Add(self._auto_dc_offset_removal_check_box)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_antennas():
+ self._post_any_code_evaluators += [('antennas', lambda: self._evalutate_antennas(**{}))]
+ def __evalutate_antennas(*args, **kwds):
+ try:
+ self.antennas = self.src.get_antennas()
+ self.set_antennas(self.antennas)
+ except AttributeError, e:
+ print "AttributeError while evaulating antennas:", e
+ __post_evalutate_antennas()
+ except Exception, e:
+ print "Exception while evaluating antennas:", e
+ self._evalutate_antennas = __evalutate_antennas
+ self.__post_evalutate_antennas = __post_evalutate_antennas
+ self._evalutate_antennas(**{})
+ antennas = self.antennas
+ self.wxgui_scopesink2_0_0 = scopesink2.scope_sink_c(
+ self.nb.GetPage(1).GetWin(),
+ title="Scope Plot 2",
+ sample_rate=samp_rate,
+ v_scale=0,
+ v_offset=0,
+ t_scale=0,
+ ac_couple=False,
+ xy_mode=False,
+ num_inputs=1,
+ trig_mode=wxgui.TRIG_MODE_AUTO,
+ y_axis_label="Counts",
+ )
+ self.nb.GetPage(1).Add(self.wxgui_scopesink2_0_0.win)
+ self.wxgui_scopesink2_0 = scopesink2.scope_sink_c(
+ self.nb.GetPage(1).GetWin(),
+ title="Scope Plot",
+ sample_rate=samp_rate,
+ v_scale=0,
+ v_offset=0,
+ t_scale=0,
+ ac_couple=False,
+ xy_mode=False,
+ num_inputs=1,
+ trig_mode=wxgui.TRIG_MODE_AUTO,
+ y_axis_label="Counts",
+ )
+ self.nb.GetPage(1).Add(self.wxgui_scopesink2_0.win)
+ self.waterfall_sink_0 = waterfallsink2.waterfall_sink_c(
+ self.nb.GetPage(2).GetWin(),
+ baseband_freq=fft_center_freq,
+ dynamic_range=dyn_rng,
+ ref_level=ref_lvl,
+ ref_scale=fft_ref_scale,
+ sample_rate=samp_rate,
+ fft_size=512*0 + fft_size,
+ fft_rate=fft_rate,
+ average=True,
+ avg_alpha=ave,
+ title="Waterfall Plot 2",
+ fft_in=False,
+ always_run=False,
+ fft_out=False,
+ )
+ self.nb.GetPage(2).Add(self.waterfall_sink_0.win)
+ def waterfall_sink_0_callback(x, y):
+ self.set_clicked_freq(x)
+
+ self.waterfall_sink_0.set_callback(waterfall_sink_0_callback)
+ self._variable_static_usrp_info_static_text = forms.static_text(
+ parent=self.nb_info.GetPage(0).GetWin(),
+ value=self.variable_static_usrp_info,
+ callback=self.set_variable_static_usrp_info,
+ label="USRP",
+ converter=forms.str_converter(),
+ )
+ self.nb_info.GetPage(0).GridAdd(self._variable_static_usrp_info_static_text, 0, 0, 1, 10)
+ self._variable_static_time_now_static_text = forms.static_text(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.variable_static_time_now,
+ callback=self.set_variable_static_time_now,
+ label="Time now",
+ converter=forms.str_converter(),
+ )
+ self.nb_test.GetPage(0).GridAdd(self._variable_static_time_now_static_text, 1, 1, 1, 2)
+ self._variable_static_text_0_0_static_text = forms.static_text(
+ parent=self.nb.GetPage(3).GetWin(),
+ value=self.variable_static_text_0_0,
+ callback=self.set_variable_static_text_0_0,
+ label="Daughterboard",
+ converter=forms.str_converter(),
+ )
+ self.nb.GetPage(3).GridAdd(self._variable_static_text_0_0_static_text, 2, 0, 1, 1)
+ self._variable_static_text_0_static_text = forms.static_text(
+ parent=self.nb.GetPage(3).GetWin(),
+ value=self.variable_static_text_0,
+ callback=self.set_variable_static_text_0,
+ label="Motherboard",
+ converter=forms.str_converter(),
+ )
+ self.nb.GetPage(3).GridAdd(self._variable_static_text_0_static_text, 0, 0, 1, 1)
+ self._variable_static_subdev_spec_static_text = forms.static_text(
+ parent=self.nb_info.GetPage(0).GetWin(),
+ value=self.variable_static_subdev_spec,
+ callback=self.set_variable_static_subdev_spec,
+ label="Sub-device",
+ converter=forms.str_converter(),
+ )
+ self.nb_info.GetPage(0).GridAdd(self._variable_static_subdev_spec_static_text, 1, 0, 1, 1)
+ self._variable_static_rf_freq_static_text = forms.static_text(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.variable_static_rf_freq,
+ callback=self.set_variable_static_rf_freq,
+ label="Actual RF freq",
+ converter=forms.float_converter(),
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._variable_static_rf_freq_static_text, 5, 0, 1, 1)
+ self._variable_static_requested_freq_static_text = forms.static_text(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.variable_static_requested_freq,
+ callback=self.set_variable_static_requested_freq,
+ label="Requested base + fine freq",
+ converter=forms.float_converter(),
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._variable_static_requested_freq_static_text, 3, 0, 1, 1)
+ self._variable_static_max_bin_freq_static_text = forms.static_text(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.variable_static_max_bin_freq,
+ callback=self.set_variable_static_max_bin_freq,
+ label="Peak freq",
+ converter=forms.float_converter(),
+ )
+ self.nb_test.GetPage(0).Add(self._variable_static_max_bin_freq_static_text)
+ self._variable_static_level_probe_static_text = forms.static_text(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.variable_static_level_probe,
+ callback=self.set_variable_static_level_probe,
+ label="Signal mag^2 (dB)",
+ converter=forms.float_converter(),
+ )
+ self.nb_test.GetPage(0).Add(self._variable_static_level_probe_static_text)
+ self._variable_static_fft_window_name_static_text = forms.static_text(
+ parent=self.nb_info.GetPage(0).GetWin(),
+ value=self.variable_static_fft_window_name,
+ callback=self.set_variable_static_fft_window_name,
+ label="FFT window",
+ converter=forms.str_converter(),
+ )
+ self.nb_info.GetPage(0).Add(self._variable_static_fft_window_name_static_text)
+ self._variable_static_fft_max_lvl_log_static_text = forms.static_text(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.variable_static_fft_max_lvl_log,
+ callback=self.set_variable_static_fft_max_lvl_log,
+ label="Peak magnitude (dB)",
+ converter=forms.float_converter(),
+ )
+ self.nb_test.GetPage(0).Add(self._variable_static_fft_max_lvl_log_static_text)
+ self._variable_static_actual_sample_rate_static_text = forms.static_text(
+ parent=self.nb_rate.GetPage(0).GetWin(),
+ value=self.variable_static_actual_sample_rate,
+ callback=self.set_variable_static_actual_sample_rate,
+ label="Actual",
+ converter=forms.float_converter(),
+ )
+ self.nb_rate.GetPage(0).GridAdd(self._variable_static_actual_sample_rate_static_text, 0, 1, 1, 1)
+ self._variable_static_actual_dsp_freq_static_text = forms.static_text(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.variable_static_actual_dsp_freq,
+ callback=self.set_variable_static_actual_dsp_freq,
+ label="Actual DSP freq",
+ converter=forms.float_converter(),
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._variable_static_actual_dsp_freq_static_text, 6, 0, 1, 1)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_variable_any_code_waterfall_ave():
+ self._post_any_code_evaluators += [('variable_any_code_waterfall_ave', lambda: self._evalutate_variable_any_code_waterfall_ave(**{'averaging': fft_averaging}))]
+ def __evalutate_variable_any_code_waterfall_ave(*args, **kwds):
+ try:
+ self.variable_any_code_waterfall_ave = self.waterfall_sink.win['average'] = fft_averaging
+ self.set_variable_any_code_waterfall_ave(self.variable_any_code_waterfall_ave)
+ except AttributeError, e:
+ print "AttributeError while evaulating variable_any_code_waterfall_ave:", e
+ __post_evalutate_variable_any_code_waterfall_ave()
+ except Exception, e:
+ print "Exception while evaluating variable_any_code_waterfall_ave:", e
+ self._evalutate_variable_any_code_waterfall_ave = __evalutate_variable_any_code_waterfall_ave
+ self.__post_evalutate_variable_any_code_waterfall_ave = __post_evalutate_variable_any_code_waterfall_ave
+ self.__post_evalutate_variable_any_code_waterfall_ave()
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_variable_any_code_iq_correction():
+ self._post_any_code_evaluators += [('variable_any_code_iq_correction', lambda: self._evalutate_variable_any_code_iq_correction(**{'auto_iq_correction': auto_iq_correction}))]
+ def __evalutate_variable_any_code_iq_correction(*args, **kwds):
+ try:
+ [self.src.set_auto_iq_balance(self.auto_iq_correction), self.auto_iq_correction or self.src.set_iq_balance(0+0j)]
+ self.set_variable_any_code_iq_correction(self.variable_any_code_iq_correction)
+ except AttributeError, e:
+ print "AttributeError while evaulating variable_any_code_iq_correction:", e
+ __post_evalutate_variable_any_code_iq_correction()
+ except Exception, e:
+ print "Exception while evaluating variable_any_code_iq_correction:", e
+ self._evalutate_variable_any_code_iq_correction = __evalutate_variable_any_code_iq_correction
+ self.__post_evalutate_variable_any_code_iq_correction = __post_evalutate_variable_any_code_iq_correction
+ self._evalutate_variable_any_code_iq_correction(**{'auto_iq_correction': auto_iq_correction})
+ variable_any_code_iq_correction = self.variable_any_code_iq_correction
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_variable_any_code_fft_sink_peak_hold():
+ self._post_any_code_evaluators += [('variable_any_code_fft_sink_peak_hold', lambda: self._evalutate_variable_any_code_fft_sink_peak_hold(**{'peak_hold': fft_peak_hold}))]
+ def __evalutate_variable_any_code_fft_sink_peak_hold(*args, **kwds):
+ try:
+ self.variable_any_code_fft_sink_peak_hold = self.fft_sink.win['peak_hold'] = fft_peak_hold
+ self.set_variable_any_code_fft_sink_peak_hold(self.variable_any_code_fft_sink_peak_hold)
+ except AttributeError, e:
+ print "AttributeError while evaulating variable_any_code_fft_sink_peak_hold:", e
+ __post_evalutate_variable_any_code_fft_sink_peak_hold()
+ except Exception, e:
+ print "Exception while evaluating variable_any_code_fft_sink_peak_hold:", e
+ self._evalutate_variable_any_code_fft_sink_peak_hold = __evalutate_variable_any_code_fft_sink_peak_hold
+ self.__post_evalutate_variable_any_code_fft_sink_peak_hold = __post_evalutate_variable_any_code_fft_sink_peak_hold
+ self._evalutate_variable_any_code_fft_sink_peak_hold(**{'peak_hold': fft_peak_hold})
+ variable_any_code_fft_sink_peak_hold = self.variable_any_code_fft_sink_peak_hold
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_variable_any_code_fft_sink_ave():
+ self._post_any_code_evaluators += [('variable_any_code_fft_sink_ave', lambda: self._evalutate_variable_any_code_fft_sink_ave(**{'averaging': fft_averaging}))]
+ def __evalutate_variable_any_code_fft_sink_ave(*args, **kwds):
+ try:
+ self.variable_any_code_fft_sink_ave = self.fft_sink.win['average'] = fft_averaging
+ self.set_variable_any_code_fft_sink_ave(self.variable_any_code_fft_sink_ave)
+ except AttributeError, e:
+ print "AttributeError while evaulating variable_any_code_fft_sink_ave:", e
+ __post_evalutate_variable_any_code_fft_sink_ave()
+ except Exception, e:
+ print "Exception while evaluating variable_any_code_fft_sink_ave:", e
+ self._evalutate_variable_any_code_fft_sink_ave = __evalutate_variable_any_code_fft_sink_ave
+ self.__post_evalutate_variable_any_code_fft_sink_ave = __post_evalutate_variable_any_code_fft_sink_ave
+ self.__post_evalutate_variable_any_code_fft_sink_ave()
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_variable_any_code_auto_dc_offset_removal():
+ self._post_any_code_evaluators += [('variable_any_code_auto_dc_offset_removal', lambda: self._evalutate_variable_any_code_auto_dc_offset_removal(**{'auto_dc_offset_removal': auto_dc_offset_removal}))]
+ def __evalutate_variable_any_code_auto_dc_offset_removal(*args, **kwds):
+ try:
+ [self.src.set_auto_dc_offset(self.auto_dc_offset_removal), self.auto_dc_offset_removal or self.src.set_dc_offset(0+0j)]
+ self.set_variable_any_code_auto_dc_offset_removal(self.variable_any_code_auto_dc_offset_removal)
+ except AttributeError, e:
+ print "AttributeError while evaulating variable_any_code_auto_dc_offset_removal:", e
+ __post_evalutate_variable_any_code_auto_dc_offset_removal()
+ except Exception, e:
+ print "Exception while evaluating variable_any_code_auto_dc_offset_removal:", e
+ self._evalutate_variable_any_code_auto_dc_offset_removal = __evalutate_variable_any_code_auto_dc_offset_removal
+ self.__post_evalutate_variable_any_code_auto_dc_offset_removal = __post_evalutate_variable_any_code_auto_dc_offset_removal
+ self._evalutate_variable_any_code_auto_dc_offset_removal(**{'auto_dc_offset_removal': auto_dc_offset_removal})
+ variable_any_code_auto_dc_offset_removal = self.variable_any_code_auto_dc_offset_removal
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_usrp_info():
+ self._post_any_code_evaluators += [('usrp_info', lambda: self._evalutate_usrp_info(**{}))]
+ def __evalutate_usrp_info(*args, **kwds):
+ try:
+ self.usrp_info = '%s (\'%s\'), %s' % (self.src.get_usrp_info().get('mboard_id'), self.src.get_usrp_info().get('mboard_name'), self.src.get_usrp_info().get('rx_subdev_name'))
+ self.set_usrp_info(self.usrp_info)
+ except AttributeError, e:
+ print "AttributeError while evaulating usrp_info:", e
+ __post_evalutate_usrp_info()
+ except Exception, e:
+ print "Exception while evaluating usrp_info:", e
+ self._evalutate_usrp_info = __evalutate_usrp_info
+ self.__post_evalutate_usrp_info = __post_evalutate_usrp_info
+ self._evalutate_usrp_info(**{})
+ usrp_info = self.usrp_info
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_update_time_source():
+ self._post_any_code_evaluators += [('update_time_source', lambda: self._evalutate_update_time_source(**{'pps': pps}))]
+ def __evalutate_update_time_source(*args, **kwds):
+ try:
+ if self.pps != '': self.src.set_time_source(self.pps, 0); print '1 PPS =', self.pps;
+ self.set_update_time_source(self.update_time_source)
+ except AttributeError, e:
+ print "AttributeError while evaulating update_time_source:", e
+ __post_evalutate_update_time_source()
+ except Exception, e:
+ print "Exception while evaluating update_time_source:", e
+ self._evalutate_update_time_source = __evalutate_update_time_source
+ self.__post_evalutate_update_time_source = __post_evalutate_update_time_source
+ self._evalutate_update_time_source(**{'pps': pps})
+ update_time_source = self.update_time_source
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_update_clock_source():
+ self._post_any_code_evaluators += [('update_clock_source', lambda: self._evalutate_update_clock_source(**{'ref': ref}))]
+ def __evalutate_update_clock_source(*args, **kwds):
+ try:
+ if self.ref != '': self.src.set_clock_source(self.ref, 0); print 'Ref =', self.ref;
+ self.set_update_clock_source(self.update_clock_source)
+ except AttributeError, e:
+ print "AttributeError while evaulating update_clock_source:", e
+ __post_evalutate_update_clock_source()
+ except Exception, e:
+ print "Exception while evaluating update_clock_source:", e
+ self._evalutate_update_clock_source = __evalutate_update_clock_source
+ self.__post_evalutate_update_clock_source = __post_evalutate_update_clock_source
+ self._evalutate_update_clock_source(**{'ref': ref})
+ update_clock_source = self.update_clock_source
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_tune_result():
+ self._post_any_code_evaluators += [('tune_result', lambda: self._evalutate_tune_result(**{'tune_obj': tune_obj}))]
+ def __evalutate_tune_result(*args, **kwds):
+ try:
+ self.tune_result = self.src.set_center_freq(self.tune_obj)
+ self.set_tune_result(self.tune_result)
+ except AttributeError, e:
+ print "AttributeError while evaulating tune_result:", e
+ __post_evalutate_tune_result()
+ except Exception, e:
+ print "Exception while evaluating tune_result:", e
+ self._evalutate_tune_result = __evalutate_tune_result
+ self.__post_evalutate_tune_result = __post_evalutate_tune_result
+ self._evalutate_tune_result(**{'tune_obj': tune_obj})
+ tune_result = self.tune_result
+ self._tune_mode_chooser = forms.drop_down(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.tune_mode,
+ callback=self.set_tune_mode,
+ label="Tune mode",
+ choices=[0, 1, 2],
+ labels=['Auto (no LO offset)', 'Auto with LO offset', 'Manual (no DSP)'],
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._tune_mode_chooser, 0, 0, 1, 1)
+ if sensor_interval > 0:
+ self._time_probe_poll_rate = sensor_interval
+ else:
+ self._time_probe_poll_rate = 1
+ self._time_probe_enabled = sensor_interval > 0
+ def _set_time_probe_poll_rate(rate):
+ self._time_probe_enabled = rate > 0
+ if rate > 0:
+ self._time_probe_poll_rate = rate
+ self.set_time_probe_poll_rate = _set_time_probe_poll_rate
+ def _time_probe_probe():
+ while True:
+ if self._time_probe_enabled:
+ val = self.src.get_time_now()
+ try:
+ self.set_time_probe(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._time_probe_poll_rate))
+ _time_probe_thread = threading.Thread(target=_time_probe_probe)
+ _time_probe_thread.daemon = True
+ _time_probe_thread.start()
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_subdev_spec():
+ self._post_any_code_evaluators += [('subdev_spec', lambda: self._evalutate_subdev_spec(**{}))]
+ def __evalutate_subdev_spec(*args, **kwds):
+ try:
+ self.subdev_spec = '[' + self.src.get_subdev_spec().strip() + ']'
+ self.set_subdev_spec(self.subdev_spec)
+ except AttributeError, e:
+ print "AttributeError while evaulating subdev_spec:", e
+ __post_evalutate_subdev_spec()
+ except Exception, e:
+ print "Exception while evaluating subdev_spec:", e
+ self._evalutate_subdev_spec = __evalutate_subdev_spec
+ self.__post_evalutate_subdev_spec = __post_evalutate_subdev_spec
+ self._evalutate_subdev_spec(**{})
+ subdev_spec = self.subdev_spec
+ self._static_locked_static_text = forms.static_text(
+ parent=self.nb_info.GetPage(0).GetWin(),
+ value=self.static_locked,
+ callback=self.set_static_locked,
+ label="Locked",
+ converter=forms.str_converter(),
+ )
+ self.nb_info.GetPage(0).Add(self._static_locked_static_text)
+ if probe_interval > 0:
+ self._signal_probe_poll_rate = probe_interval
+ else:
+ self._signal_probe_poll_rate = 1
+ self._signal_probe_enabled = probe_interval > 0
+ def _set_signal_probe_poll_rate(rate):
+ self._signal_probe_enabled = rate > 0
+ if rate > 0:
+ self._signal_probe_poll_rate = rate
+ self.set_signal_probe_poll_rate = _set_signal_probe_poll_rate
+ def _signal_probe_probe():
+ while True:
+ if self._signal_probe_enabled:
+ val = self.probe_avg_mag.level()
+ try:
+ self.set_signal_probe(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._signal_probe_poll_rate))
+ _signal_probe_thread = threading.Thread(target=_signal_probe_probe)
+ _signal_probe_thread.daemon = True
+ _signal_probe_thread.start()
+ self._show_max_lvl_check_box = forms.check_box(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.show_max_lvl,
+ callback=self.set_show_max_lvl,
+ label="Show max level",
+ true=True,
+ false=False,
+ )
+ self.nb_test.GetPage(0).GridAdd(self._show_max_lvl_check_box, 0, 2, 1, 1)
+ self._show_max_freq_check_box = forms.check_box(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.show_max_freq,
+ callback=self.set_show_max_freq,
+ label="Show max freq",
+ true=True,
+ false=False,
+ )
+ self.nb_test.GetPage(0).GridAdd(self._show_max_freq_check_box, 0, 1, 1, 1)
+ _selected_gain_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._selected_gain_text_box = forms.text_box(
+ parent=self.nb_analog.GetPage(0).GetWin(),
+ sizer=_selected_gain_sizer,
+ value=self.selected_gain,
+ callback=self.set_selected_gain,
+ label="Gain",
+ converter=forms.float_converter(),
+ proportion=0,
+ )
+ self._selected_gain_slider = forms.slider(
+ parent=self.nb_analog.GetPage(0).GetWin(),
+ sizer=_selected_gain_sizer,
+ value=self.selected_gain,
+ callback=self.set_selected_gain,
+ minimum=gain_range.start(),
+ maximum=[gain_range.stop(), gain_range.start() + 1.0][gain_range.stop()==gain_range.start()],
+ num_steps=[int((abs(gain_range.stop()-gain_range.start())/[gain_range.step(), 1.0][gain_range.step()==0])), 1][gain_range.stop()==gain_range.start()],
+ style=wx.SL_HORIZONTAL,
+ cast=float,
+ proportion=1,
+ )
+ self.nb_analog.GetPage(0).Add(_selected_gain_sizer)
+ self._selected_antenna_chooser = forms.radio_buttons(
+ parent=self.nb_analog.GetPage(0).GetWin(),
+ value=self.selected_antenna,
+ callback=self.set_selected_antenna,
+ label="Antenna",
+ choices=antennas,
+ labels=[antennas,['(default)']][antennas==('',)],
+ style=wx.RA_HORIZONTAL,
+ )
+ self.nb_analog.GetPage(0).Add(self._selected_antenna_chooser)
+ self._requested_sample_rate_base_text_box = forms.text_box(
+ parent=self.nb_rate.GetPage(0).GetWin(),
+ value=self.requested_sample_rate_base,
+ callback=self.set_requested_sample_rate_base,
+ label="Requested base sample rate",
+ converter=forms.float_converter(),
+ )
+ self.nb_rate.GetPage(0).GridAdd(self._requested_sample_rate_base_text_box, 0, 0, 1, 1)
+ _requested_freq_txt_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._requested_freq_txt_text_box = forms.text_box(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ sizer=_requested_freq_txt_sizer,
+ value=self.requested_freq_txt,
+ callback=self.set_requested_freq_txt,
+ label="Requested freq",
+ converter=forms.float_converter(),
+ proportion=0,
+ )
+ self._requested_freq_txt_slider = forms.slider(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ sizer=_requested_freq_txt_sizer,
+ value=self.requested_freq_txt,
+ callback=self.set_requested_freq_txt,
+ minimum=freq_range.start(),
+ maximum=[freq_range.stop(), freq_range.start() + 1.0][freq_range.start()==freq_range.stop()],
+ num_steps=[1000,1][freq_range.start()==freq_range.stop()],
+ style=wx.SL_HORIZONTAL,
+ cast=float,
+ proportion=1,
+ )
+ self.nb_freq.GetPage(0).GridAdd(_requested_freq_txt_sizer, 1, 0, 1, 1)
+ self._relative_time_chooser = forms.drop_down(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.relative_time,
+ callback=self.set_relative_time,
+ label="Time display",
+ choices=[False, True],
+ labels=['Absolute', 'Relative'],
+ )
+ self.nb_test.GetPage(0).GridAdd(self._relative_time_chooser, 1, 0, 1, 1)
+ self._relative_freq_chooser = forms.drop_down(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.relative_freq,
+ callback=self.set_relative_freq,
+ label="Frequency Axis",
+ choices=[1, 0],
+ labels=['RF', 'Baseband'],
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._relative_freq_chooser, 7, 0, 1, 1)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_motherboard_sensors():
+ self._post_any_code_evaluators += [('motherboard_sensors', lambda: self._evalutate_motherboard_sensors(**{'motherboard_sensor_names': motherboard_sensor_names}))]
+ def __evalutate_motherboard_sensors(*args, **kwds):
+ try:
+ self.motherboard_sensors = '\n'.join(map(lambda x: '%s: %s' % (x, str(self.src.get_mboard_sensor(x))), filter(lambda x: x.find('gps') != 0, self.motherboard_sensor_names)))
+ self.set_motherboard_sensors(self.motherboard_sensors)
+ except AttributeError, e:
+ print "AttributeError while evaulating motherboard_sensors:", e
+ __post_evalutate_motherboard_sensors()
+ except Exception, e:
+ print "Exception while evaluating motherboard_sensors:", e
+ self._evalutate_motherboard_sensors = __evalutate_motherboard_sensors
+ self.__post_evalutate_motherboard_sensors = __post_evalutate_motherboard_sensors
+ self._evalutate_motherboard_sensors(**{'motherboard_sensor_names': motherboard_sensor_names})
+ motherboard_sensors = self.motherboard_sensors
+ self.logpwrfft_x_0_0 = logpwrfft.logpwrfft_c(
+ sample_rate=samp_rate,
+ fft_size=fft_size,
+ ref_scale=fft_ref_scale,
+ frame_rate=fft_rate,
+ avg_alpha=fft_ave_probe,
+ average=False,
+ )
+ self.logpwrfft_x_0 = logpwrfft.logpwrfft_c(
+ sample_rate=samp_rate,
+ fft_size=fft_size,
+ ref_scale=fft_ref_scale,
+ frame_rate=fft_rate,
+ avg_alpha=fft_ave_probe,
+ average=False,
+ )
+ if lo_check_interval * float(has_lo_locked) > 0:
+ self._locked_probe_poll_rate = lo_check_interval * float(has_lo_locked)
+ else:
+ self._locked_probe_poll_rate = 1
+ self._locked_probe_enabled = lo_check_interval * float(has_lo_locked) > 0
+ def _set_locked_probe_poll_rate(rate):
+ self._locked_probe_enabled = rate > 0
+ if rate > 0:
+ self._locked_probe_poll_rate = rate
+ self.set_locked_probe_poll_rate = _set_locked_probe_poll_rate
+ def _locked_probe_probe():
+ while True:
+ if self._locked_probe_enabled:
+ val = self.src.get_sensor('lo_locked')
+ try:
+ self.set_locked_probe(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._locked_probe_poll_rate))
+ _locked_probe_thread = threading.Thread(target=_locked_probe_probe)
+ _locked_probe_thread.daemon = True
+ _locked_probe_thread.start()
+ self._lo_offset_txt_text_box = forms.text_box(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ value=self.lo_offset_txt,
+ callback=self.set_lo_offset_txt,
+ label="LO offset (only for LO offset tuning mode)",
+ converter=forms.float_converter(),
+ )
+ self.nb_freq.GetPage(0).GridAdd(self._lo_offset_txt_text_box, 4, 0, 1, 1)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_gain_default():
+ self._post_any_code_evaluators += [('gain_default', lambda: self._evalutate_gain_default(**{'initial_gain': initial_gain}))]
+ def __evalutate_gain_default(*args, **kwds):
+ try:
+ self.gain_default = [gain,initial_gain][gain==float('-inf')]
+ self.set_gain_default(self.gain_default)
+ except AttributeError, e:
+ print "AttributeError while evaulating gain_default:", e
+ __post_evalutate_gain_default()
+ except Exception, e:
+ print "Exception while evaluating gain_default:", e
+ self._evalutate_gain_default = __evalutate_gain_default
+ self.__post_evalutate_gain_default = __post_evalutate_gain_default
+ self._evalutate_gain_default(**{'initial_gain': initial_gain})
+ gain_default = self.gain_default
+ _freq_fine_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._freq_fine_text_box = forms.text_box(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ sizer=_freq_fine_sizer,
+ value=self.freq_fine,
+ callback=self.set_freq_fine,
+ label="Freq (fine)",
+ converter=forms.float_converter(),
+ proportion=0,
+ )
+ self._freq_fine_slider = forms.slider(
+ parent=self.nb_freq.GetPage(0).GetWin(),
+ sizer=_freq_fine_sizer,
+ value=self.freq_fine,
+ callback=self.set_freq_fine,
+ minimum=-freq_fine_range/2,
+ maximum=freq_fine_range/2,
+ num_steps=1000,
+ style=wx.SL_HORIZONTAL,
+ cast=float,
+ proportion=1,
+ )
+ self.nb_freq.GetPage(0).GridAdd(_freq_fine_sizer, 2, 0, 1, 1)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_fix_invalid_freq():
+ self._post_any_code_evaluators += [('fix_invalid_freq', lambda: self._evalutate_fix_invalid_freq(**{}))]
+ def __evalutate_fix_invalid_freq(*args, **kwds):
+ try:
+ ((freq <= freq_range.stop()) and (freq >= freq_range.start())) or self.set_requested_freq_txt(self.src.get_center_freq()); print self.src.get_center_freq()
+ self.set_fix_invalid_freq(self.fix_invalid_freq)
+ except AttributeError, e:
+ print "AttributeError while evaulating fix_invalid_freq:", e
+ __post_evalutate_fix_invalid_freq()
+ except Exception, e:
+ print "Exception while evaluating fix_invalid_freq:", e
+ self._evalutate_fix_invalid_freq = __evalutate_fix_invalid_freq
+ self.__post_evalutate_fix_invalid_freq = __post_evalutate_fix_invalid_freq
+ self.__post_evalutate_fix_invalid_freq()
+ self.fft_sink_two_1 = fftsink2.fft_sink_c(
+ self.nb.GetPage(0).GetWin(),
+ baseband_freq=fft_center_freq,
+ y_per_div=10,
+ y_divs=int(dyn_rng/10),
+ ref_level=ref_lvl,
+ ref_scale=fft_ref_scale,
+ sample_rate=samp_rate,
+ fft_size=1024*0 + fft_size,
+ fft_rate=fft_rate,
+ average=True,
+ avg_alpha=ave,
+ title="FFT Plot 2",
+ peak_hold=False, fft_in=False,
+ always_run=False,
+ fft_out=False,
+ )
+ self.nb.GetPage(0).Add(self.fft_sink_two_1.win)
+ def fft_sink_two_1_callback(x, y):
+ self.set_clicked_freq(x)
+
+ self.fft_sink_two_1.set_callback(fft_sink_two_1_callback)
+ self.fft_max_lvl_probe = blocks.probe_signal_f()
+ if probe_interval > 0:
+ self._fft_max_lvl_2_poll_rate = probe_interval
+ else:
+ self._fft_max_lvl_2_poll_rate = 1
+ self._fft_max_lvl_2_enabled = probe_interval > 0
+ def _set_fft_max_lvl_2_poll_rate(rate):
+ self._fft_max_lvl_2_enabled = rate > 0
+ if rate > 0:
+ self._fft_max_lvl_2_poll_rate = rate
+ self.set_fft_max_lvl_2_poll_rate = _set_fft_max_lvl_2_poll_rate
+ def _fft_max_lvl_2_probe():
+ while True:
+ if self._fft_max_lvl_2_enabled:
+ val = self.fft_max_lvl_probe_2.level()
+ try:
+ self.set_fft_max_lvl_2(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._fft_max_lvl_2_poll_rate))
+ _fft_max_lvl_2_thread = threading.Thread(target=_fft_max_lvl_2_probe)
+ _fft_max_lvl_2_thread.daemon = True
+ _fft_max_lvl_2_thread.start()
+ if probe_interval > 0:
+ self._fft_max_lvl_poll_rate = probe_interval
+ else:
+ self._fft_max_lvl_poll_rate = 1
+ self._fft_max_lvl_enabled = probe_interval > 0
+ def _set_fft_max_lvl_poll_rate(rate):
+ self._fft_max_lvl_enabled = rate > 0
+ if rate > 0:
+ self._fft_max_lvl_poll_rate = rate
+ self.set_fft_max_lvl_poll_rate = _set_fft_max_lvl_poll_rate
+ def _fft_max_lvl_probe():
+ while True:
+ if self._fft_max_lvl_enabled:
+ val = self.fft_max_lvl_probe.level()
+ try:
+ self.set_fft_max_lvl(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._fft_max_lvl_poll_rate))
+ _fft_max_lvl_thread = threading.Thread(target=_fft_max_lvl_probe)
+ _fft_max_lvl_thread.daemon = True
+ _fft_max_lvl_thread.start()
+ self.fft_max_idx_probe_0 = blocks.probe_signal_s()
+ self.fft_max_idx_probe = blocks.probe_signal_s()
+ if probe_interval > 0:
+ self._fft_max_idx_poll_rate = probe_interval
+ else:
+ self._fft_max_idx_poll_rate = 1
+ self._fft_max_idx_enabled = probe_interval > 0
+ def _set_fft_max_idx_poll_rate(rate):
+ self._fft_max_idx_enabled = rate > 0
+ if rate > 0:
+ self._fft_max_idx_poll_rate = rate
+ self.set_fft_max_idx_poll_rate = _set_fft_max_idx_poll_rate
+ def _fft_max_idx_probe():
+ while True:
+ if self._fft_max_idx_enabled:
+ val = self.fft_max_idx_probe.level()
+ try:
+ self.set_fft_max_idx(val)
+ except AttributeError:
+ pass
+ time.sleep(1.0/(self._fft_max_idx_poll_rate))
+ _fft_max_idx_thread = threading.Thread(target=_fft_max_idx_probe)
+ _fft_max_idx_thread.daemon = True
+ _fft_max_idx_thread.start()
+ _decim_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._decim_text_box = forms.text_box(
+ parent=self.nb_rate.GetPage(0).GetWin(),
+ sizer=_decim_sizer,
+ value=self.decim,
+ callback=self.set_decim,
+ label="Divide base sample rate",
+ converter=forms.int_converter(),
+ proportion=0,
+ )
+ self._decim_slider = forms.slider(
+ parent=self.nb_rate.GetPage(0).GetWin(),
+ sizer=_decim_sizer,
+ value=self.decim,
+ callback=self.set_decim,
+ minimum=1,
+ maximum=max_decim,
+ num_steps=max_decim-1,
+ style=wx.SL_HORIZONTAL,
+ cast=int,
+ proportion=1,
+ )
+ self.nb_rate.GetPage(0).Add(_decim_sizer)
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_daughterboard_sensors():
+ self._post_any_code_evaluators += [('daughterboard_sensors', lambda: self._evalutate_daughterboard_sensors(**{'daughterboard_sensor_names': daughterboard_sensor_names}))]
+ def __evalutate_daughterboard_sensors(*args, **kwds):
+ try:
+ self.daughterboard_sensors = '\n'.join(map(lambda x: '%s: %s' % (x, str(self.src.get_sensor(x))), self.daughterboard_sensor_names))
+ self.set_daughterboard_sensors(self.daughterboard_sensors)
+ except AttributeError, e:
+ print "AttributeError while evaulating daughterboard_sensors:", e
+ __post_evalutate_daughterboard_sensors()
+ except Exception, e:
+ print "Exception while evaluating daughterboard_sensors:", e
+ self._evalutate_daughterboard_sensors = __evalutate_daughterboard_sensors
+ self.__post_evalutate_daughterboard_sensors = __post_evalutate_daughterboard_sensors
+ self._evalutate_daughterboard_sensors(**{'daughterboard_sensor_names': daughterboard_sensor_names})
+ daughterboard_sensors = self.daughterboard_sensors
+ self._clicked_freq_txt_text_box = forms.text_box(
+ parent=self.nb_test.GetPage(0).GetWin(),
+ value=self.clicked_freq_txt,
+ callback=self.set_clicked_freq_txt,
+ label="Clicked freq",
+ converter=forms.float_converter(),
+ )
+ self.nb_test.GetPage(0).Add(self._clicked_freq_txt_text_box)
+ self.blocks_tag_debug_0 = blocks.tag_debug(gr.sizeof_gr_complex*1, "", ""); self.blocks_tag_debug_0.set_display(show_stream_tags_chk)
+ self.blocks_null_sink_0_0 = blocks.null_sink(gr.sizeof_short*1)
+ self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_short*1)
+ self.blocks_max_xx_0_0 = blocks.max_ff(fft_size)
+ self.blocks_max_xx_0 = blocks.max_ff(fft_size)
+ self.blocks_float_to_complex_0_0 = blocks.float_to_complex(1)
+ self.blocks_float_to_complex_0 = blocks.float_to_complex(1)
+ self.blocks_complex_to_mag_0_0 = blocks.complex_to_mag(1)
+ self.blocks_complex_to_mag_0 = blocks.complex_to_mag(1)
+ self.blocks_argmax_xx_0_0 = blocks.argmax_fs(fft_size)
+ self.blocks_argmax_xx_0 = blocks.argmax_fs(fft_size)
+ self.blks2_selector_0_1 = grc_blks2.selector(
+ item_size=gr.sizeof_gr_complex*1,
+ num_inputs=2,
+ num_outputs=1,
+ input_index=scope_mode_2,
+ output_index=0,
+ )
+ self.blks2_selector_0_0_0 = grc_blks2.selector(
+ item_size=gr.sizeof_gr_complex*1,
+ num_inputs=1,
+ num_outputs=2,
+ input_index=0,
+ output_index=scope_mode_2,
+ )
+ self.blks2_selector_0_0 = grc_blks2.selector(
+ item_size=gr.sizeof_gr_complex*1,
+ num_inputs=1,
+ num_outputs=2,
+ input_index=0,
+ output_index=scope_mode,
+ )
+ self.blks2_selector_0 = grc_blks2.selector(
+ item_size=gr.sizeof_gr_complex*1,
+ num_inputs=2,
+ num_outputs=1,
+ input_index=scope_mode,
+ output_index=0,
+ )
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_any_test_1():
+ self._post_any_code_evaluators += [('any_test_1', lambda: self._evalutate_any_test_1(**{'test': test}))]
+ def __evalutate_any_test_1(*args, **kwds):
+ try:
+ if self.fft_sink.controller['average']: self.fft_sink.controller['average'] = False; time.sleep(0.25); self.fft_sink.controller['average'] = True;
+ self.set_any_test_1(self.any_test_1)
+ except AttributeError, e:
+ print "AttributeError while evaulating any_test_1:", e
+ __post_evalutate_any_test_1()
+ except Exception, e:
+ print "Exception while evaluating any_test_1:", e
+ self._evalutate_any_test_1 = __evalutate_any_test_1
+ self.__post_evalutate_any_test_1 = __post_evalutate_any_test_1
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_actual_sample_rate():
+ self._post_any_code_evaluators += [('actual_sample_rate', lambda: self._evalutate_actual_sample_rate(**{'requested_sample_rate': requested_sample_rate}))]
+ def __evalutate_actual_sample_rate(*args, **kwds):
+ try:
+ self.actual_sample_rate = self.src.get_samp_rate()
+ self.set_actual_sample_rate(self.actual_sample_rate)
+ except AttributeError, e:
+ print "AttributeError while evaulating actual_sample_rate:", e
+ __post_evalutate_actual_sample_rate()
+ except Exception, e:
+ print "Exception while evaluating actual_sample_rate:", e
+ self._evalutate_actual_sample_rate = __evalutate_actual_sample_rate
+ self.__post_evalutate_actual_sample_rate = __post_evalutate_actual_sample_rate
+ self._evalutate_actual_sample_rate(**{'requested_sample_rate': requested_sample_rate})
+ actual_sample_rate = self.actual_sample_rate
+ if not hasattr(self, '_post_any_code_evaluators'):
+ self._post_any_code_evaluators = []
+ self.wxEVT_AnyCode = wxEVT_AnyCode = wx.NewEventType()
+ def _run_evaluators(event):
+ _post_any_code_evaluators = self._post_any_code_evaluators
+ if len(_post_any_code_evaluators) > 0:
+ for id, evaluator in _post_any_code_evaluators:
+ try:
+ evaluator()
+ except Exception, e:
+ print "Exception while running Any Code evaluator for '%s':" % (id), e
+ del _post_any_code_evaluators[0:len(_post_any_code_evaluators)]
+ self._run_evaluators = _run_evaluators
+ try:
+ self.GetWin().Connect(-1, -1, wxEVT_AnyCode, _run_evaluators)
+ except:
+ pass # FIXME
+ def _run_evaluators_later(evaluator=None):
+ if evaluator is not None:
+ self._post_any_code_evaluators += [evaluator]
+ try:
+ de = wx.PyEvent()
+ de.SetEventType(wxEVT_AnyCode)
+ wx.PostEvent(self.GetWin(), de)
+ except TypeError:
+ pass
+ except AttributeError: # FIXME
+ print "Cannot post message"
+ self._run_evaluators_later = _run_evaluators_later
+ _run_evaluators_later()
+ def __post_evalutate_actual_center_freq():
+ self._post_any_code_evaluators += [('actual_center_freq', lambda: self._evalutate_actual_center_freq(**{'tune_obj': tune_obj}))]
+ def __evalutate_actual_center_freq(*args, **kwds):
+ try:
+ self.actual_center_freq = self.src.get_center_freq()
+ self.set_actual_center_freq(self.actual_center_freq)
+ except AttributeError, e:
+ print "AttributeError while evaulating actual_center_freq:", e
+ __post_evalutate_actual_center_freq()
+ except Exception, e:
+ print "Exception while evaluating actual_center_freq:", e
+ self._evalutate_actual_center_freq = __evalutate_actual_center_freq
+ self.__post_evalutate_actual_center_freq = __post_evalutate_actual_center_freq
+ self._evalutate_actual_center_freq(**{'tune_obj': tune_obj})
+ actual_center_freq = self.actual_center_freq
+
+ ##################################################
+ # Connections
+ ##################################################
+ self.connect((self.blks2_selector_0, 0), (self.wxgui_scopesink2_0, 0))
+ self.connect((self.blks2_selector_0_0, 0), (self.blks2_selector_0, 0))
+ self.connect((self.blks2_selector_0_0, 1), (self.blocks_complex_to_mag_0, 0))
+ self.connect((self.blks2_selector_0_0_0, 0), (self.blks2_selector_0_1, 0))
+ self.connect((self.blks2_selector_0_0_0, 1), (self.blocks_complex_to_mag_0_0, 0))
+ self.connect((self.blks2_selector_0_1, 0), (self.wxgui_scopesink2_0_0, 0))
+ self.connect((self.blocks_argmax_xx_0, 1), (self.blocks_null_sink_0, 0))
+ self.connect((self.blocks_argmax_xx_0, 0), (self.fft_max_idx_probe, 0))
+ self.connect((self.blocks_argmax_xx_0_0, 1), (self.blocks_null_sink_0_0, 0))
+ self.connect((self.blocks_argmax_xx_0_0, 0), (self.fft_max_idx_probe_0, 0))
+ self.connect((self.blocks_complex_to_mag_0, 0), (self.blocks_float_to_complex_0, 1))
+ self.connect((self.blocks_complex_to_mag_0, 0), (self.blocks_float_to_complex_0, 0))
+ self.connect((self.blocks_complex_to_mag_0_0, 0), (self.blocks_float_to_complex_0_0, 1))
+ self.connect((self.blocks_complex_to_mag_0_0, 0), (self.blocks_float_to_complex_0_0, 0))
+ self.connect((self.blocks_float_to_complex_0, 0), (self.blks2_selector_0, 1))
+ self.connect((self.blocks_float_to_complex_0_0, 0), (self.blks2_selector_0_1, 1))
+ self.connect((self.blocks_max_xx_0, 0), (self.fft_max_lvl_probe, 0))
+ self.connect((self.blocks_max_xx_0_0, 0), (self.fft_max_lvl_probe_2, 0))
+ self.connect((self.logpwrfft_x_0, 0), (self.blocks_argmax_xx_0, 0))
+ self.connect((self.logpwrfft_x_0, 0), (self.blocks_max_xx_0, 0))
+ self.connect((self.logpwrfft_x_0_0, 0), (self.blocks_argmax_xx_0_0, 0))
+ self.connect((self.logpwrfft_x_0_0, 0), (self.blocks_max_xx_0_0, 0))
+ self.connect((self.src, 0), (self.blocks_tag_debug_0, 0))
+ self.connect((self.src, 0), (self.blks2_selector_0_0, 0))
+ self.connect((self.src, 0), (self.fft_sink, 0))
+ self.connect((self.src, 0), (self.waterfall_sink, 0))
+ self.connect((self.src, 0), (self.probe_avg_mag, 0))
+ self.connect((self.src, 0), (self.logpwrfft_x_0, 0))
+ self.connect((self.src, 1), (self.blks2_selector_0_0_0, 0))
+ self.connect((self.src, 1), (self.fft_sink_two_1, 0))
+ self.connect((self.src, 1), (self.logpwrfft_x_0_0, 0))
+ self.connect((self.src, 1), (self.waterfall_sink_0, 0))
+
+
+ def get_antenna(self):
+ return self.antenna
+
+ def set_antenna(self, antenna):
+ self.antenna = antenna
+ self.set_selected_antenna([ [self.antenna,self.antennas[0]][self.antenna not in self.antennas] ,self.antennas[0]][self.antenna==''])
+
+ def get_args(self):
+ return self.args
+
+ def set_args(self, args):
+ self.args = args
+
+ def get_ave(self):
+ return self.ave
+
+ def set_ave(self, ave):
+ self.ave = ave
+ self.set_fft_ave_probe(self.ave)
+
+ def get_averaging(self):
+ return self.averaging
+
+ def set_averaging(self, averaging):
+ self.averaging = averaging
+ self.set_fft_averaging(self.str_to_bool(self.averaging))
+
+ def get_bw(self):
+ return self.bw
+
+ def set_bw(self, bw):
+ self.bw = bw
+ self.src.set_bandwidth(self.bw, 0)
+ self.src.set_bandwidth(self.bw, 1)
+
+ def get_dyn_rng(self):
+ return self.dyn_rng
+
+ def set_dyn_rng(self, dyn_rng):
+ self.dyn_rng = dyn_rng
+
+ def get_fft_rate(self):
+ return self.fft_rate
+
+ def set_fft_rate(self, fft_rate):
+ self.fft_rate = fft_rate
+
+ def get_fft_ref_scale(self):
+ return self.fft_ref_scale
+
+ def set_fft_ref_scale(self, fft_ref_scale):
+ self.fft_ref_scale = fft_ref_scale
+
+ def get_fft_size(self):
+ return self.fft_size
+
+ def set_fft_size(self, fft_size):
+ self.fft_size = fft_size
+ self.set_fft_max_idx((self.fft_size/2)*0)
+ self.set_fft_max_idx_norm([self.fft_max_idx,self.fft_max_idx-self.fft_size][int(self.fft_max_idx>(self.fft_size/2))])
+ self.set_max_bin_freq(self.fft_center_freq + (((1.0*self.fft_max_idx_norm) / self.fft_size) * self.samp_rate))
+
+ def get_freq(self):
+ return self.freq
+
+ def set_freq(self, freq):
+ self.freq = freq
+ self.set_requested_freq_txt(self.freq)
+ self.src.set_center_freq(uhd.tune_request(self.freq, self.lo_offset), 0)
+ self.src.set_center_freq(uhd.tune_request(self.freq, self.lo_offset), 1)
+
+ def get_freq_fine_range(self):
+ return self.freq_fine_range
+
+ def set_freq_fine_range(self, freq_fine_range):
+ self.freq_fine_range = freq_fine_range
+
+ def get_gain(self):
+ return self.gain
+
+ def set_gain(self, gain):
+ self.gain = gain
+
+ def get_lo_check_interval(self):
+ return self.lo_check_interval
+
+ def set_lo_check_interval(self, lo_check_interval):
+ self.lo_check_interval = lo_check_interval
+ self.set_locked_probe_poll_rate(self.lo_check_interval * float(self.has_lo_locked))
+
+ def get_lo_offset(self):
+ return self.lo_offset
+
+ def set_lo_offset(self, lo_offset):
+ self.lo_offset = lo_offset
+ self.set_lo_offset_txt(self.lo_offset)
+ self.set_tune_mode([1,0][self.lo_offset==0.0])
+ self.src.set_center_freq(uhd.tune_request(self.freq, self.lo_offset), 0)
+ self.src.set_center_freq(uhd.tune_request(self.freq, self.lo_offset), 1)
+
+ def get_mag_alpha(self):
+ return self.mag_alpha
+
+ def set_mag_alpha(self, mag_alpha):
+ self.mag_alpha = mag_alpha
+ self.probe_avg_mag.set_alpha(self.mag_alpha)
+
+ def get_peak_hold(self):
+ return self.peak_hold
+
+ def set_peak_hold(self, peak_hold):
+ self.peak_hold = peak_hold
+ self.set_fft_peak_hold(self.str_to_bool(self.peak_hold))
+
+ def get_pps(self):
+ return self.pps
+
+ def set_pps(self, pps):
+ self.pps = pps
+ self._evalutate_update_time_source(**{'pps': self.pps})
+
+ def get_probe_interval(self):
+ return self.probe_interval
+
+ def set_probe_interval(self, probe_interval):
+ self.probe_interval = probe_interval
+ self.set_fft_max_idx_poll_rate(self.probe_interval)
+ self.set_fft_max_lvl_poll_rate(self.probe_interval)
+ self.set_fft_max_lvl_2_poll_rate(self.probe_interval)
+ self.set_signal_probe_poll_rate(self.probe_interval)
+
+ def get_rate(self):
+ return self.rate
+
+ def set_rate(self, rate):
+ self.rate = rate
+ self.set_requested_sample_rate_base(self.rate)
+
+ def get_ref(self):
+ return self.ref
+
+ def set_ref(self, ref):
+ self.ref = ref
+ self._evalutate_update_clock_source(**{'ref': self.ref})
+
+ def get_ref_lvl(self):
+ return self.ref_lvl
+
+ def set_ref_lvl(self, ref_lvl):
+ self.ref_lvl = ref_lvl
+
+ def get_sensor_interval(self):
+ return self.sensor_interval
+
+ def set_sensor_interval(self, sensor_interval):
+ self.sensor_interval = sensor_interval
+ self.set_daughterboard_sensor_names_poll_rate(self.sensor_interval)
+ self.set_motherboard_sensor_names_poll_rate(self.sensor_interval)
+ self.set_time_probe_poll_rate(self.sensor_interval)
+
+ def get_show_stream_tags(self):
+ return self.show_stream_tags
+
+ def set_show_stream_tags(self, show_stream_tags):
+ self.show_stream_tags = show_stream_tags
+ self.set_show_stream_tags_chk([False, True][self.show_stream_tags.lower() != 'false'])
+
+ def get_spec(self):
+ return self.spec
+
+ def set_spec(self, spec):
+ self.spec = spec
+
+ def get_stream_args(self):
+ return self.stream_args
+
+ def set_stream_args(self, stream_args):
+ self.stream_args = stream_args
+
+ def get_window(self):
+ return self.window
+
+ def set_window(self, window):
+ self.window = window
+ self.set_variable_static_fft_window_name(self.window_fn_name_map[self.window])
+ self.set_window_fn(self.window_fn_map[self.window])
+
+ def get_wire_format(self):
+ return self.wire_format
+
+ def set_wire_format(self, wire_format):
+ self.wire_format = wire_format
+
+ def get_relative_freq(self):
+ return self.relative_freq
+
+ def set_relative_freq(self, relative_freq):
+ self.relative_freq = relative_freq
+ self.set_fft_center_freq(self.actual_center_freq * self.relative_freq)
+ self._relative_freq_chooser.set_value(self.relative_freq)
+
+ def get_gain_range(self):
+ return self.gain_range
+
+ def set_gain_range(self, gain_range):
+ self.gain_range = gain_range
+ self._run_evaluators_later(('initial_gain', lambda: self._evalutate_initial_gain(**{'gain_range': self.gain_range})))
+
+ def get_fft_max_idx(self):
+ return self.fft_max_idx
+
+ def set_fft_max_idx(self, fft_max_idx):
+ self.fft_max_idx = fft_max_idx
+ self.set_fft_max_idx_norm([self.fft_max_idx,self.fft_max_idx-self.fft_size][int(self.fft_max_idx>(self.fft_size/2))])
+
+ def get_actual_sample_rate(self):
+ return self.actual_sample_rate
+
+ def set_actual_sample_rate(self, actual_sample_rate):
+ self.actual_sample_rate = actual_sample_rate
+ self.set_samp_rate(int(self.actual_sample_rate))
+ self.set_variable_static_actual_sample_rate(self.actual_sample_rate)
+
+ def get_actual_center_freq(self):
+ return self.actual_center_freq
+
+ def set_actual_center_freq(self, actual_center_freq):
+ self.actual_center_freq = actual_center_freq
+ self.set_fft_center_freq(self.actual_center_freq * self.relative_freq)
+
+ def get_str_to_bool(self):
+ return self.str_to_bool
+
+ def set_str_to_bool(self, str_to_bool):
+ self.str_to_bool = str_to_bool
+ self.set_fft_averaging(self.str_to_bool(self.averaging))
+ self.set_fft_peak_hold(self.str_to_bool(self.peak_hold))
+
+ def get_signal_probe(self):
+ return self.signal_probe
+
+ def set_signal_probe(self, signal_probe):
+ self.signal_probe = signal_probe
+ self.set_signal_probe_log(math.log10([self.signal_probe,1.0][self.signal_probe==0.0])*10)
+
+ def get_samp_rate(self):
+ return self.samp_rate
+
+ def set_samp_rate(self, samp_rate):
+ self.samp_rate = samp_rate
+ self.set_max_bin_freq(self.fft_center_freq + (((1.0*self.fft_max_idx_norm) / self.fft_size) * self.samp_rate))
+ self.fft_sink.set_sample_rate(self.samp_rate)
+ self.fft_sink_two_1.set_sample_rate(self.samp_rate)
+ self.logpwrfft_x_0.set_sample_rate(self.samp_rate)
+ self.logpwrfft_x_0_0.set_sample_rate(self.samp_rate)
+ self.waterfall_sink.set_sample_rate(self.samp_rate)
+ self.waterfall_sink_0.set_sample_rate(self.samp_rate)
+ self.wxgui_scopesink2_0.set_sample_rate(self.samp_rate)
+ self.wxgui_scopesink2_0_0.set_sample_rate(self.samp_rate)
+
+ def get_requested_freq_txt(self):
+ return self.requested_freq_txt
+
+ def set_requested_freq_txt(self, requested_freq_txt):
+ self.requested_freq_txt = requested_freq_txt
+ self.set_requested_freq(self.requested_freq_txt + self.freq_fine)
+ self._requested_freq_txt_slider.set_value(self.requested_freq_txt)
+ self._requested_freq_txt_text_box.set_value(self.requested_freq_txt)
+
+ def get_gain_default(self):
+ return self.gain_default
+
+ def set_gain_default(self, gain_default):
+ self.gain_default = gain_default
+ self.set_selected_gain(self.gain_default)
+
+ def get_freq_fine(self):
+ return self.freq_fine
+
+ def set_freq_fine(self, freq_fine):
+ self.freq_fine = freq_fine
+ self._freq_fine_slider.set_value(self.freq_fine)
+ self._freq_fine_text_box.set_value(self.freq_fine)
+ self.set_requested_freq(self.requested_freq_txt + self.freq_fine)
+
+ def get_fft_max_idx_norm(self):
+ return self.fft_max_idx_norm
+
+ def set_fft_max_idx_norm(self, fft_max_idx_norm):
+ self.fft_max_idx_norm = fft_max_idx_norm
+ self.set_max_bin_freq(self.fft_center_freq + (((1.0*self.fft_max_idx_norm) / self.fft_size) * self.samp_rate))
+
+ def get_fft_center_freq(self):
+ return self.fft_center_freq
+
+ def set_fft_center_freq(self, fft_center_freq):
+ self.fft_center_freq = fft_center_freq
+ self.set_max_bin_freq(self.fft_center_freq + (((1.0*self.fft_max_idx_norm) / self.fft_size) * self.samp_rate))
+ self.fft_sink.set_baseband_freq(self.fft_center_freq)
+ self.fft_sink_two_1.set_baseband_freq(self.fft_center_freq)
+ self.waterfall_sink.set_baseband_freq(self.fft_center_freq)
+ self.waterfall_sink_0.set_baseband_freq(self.fft_center_freq)
+
+ def get_antennas(self):
+ return self.antennas
+
+ def set_antennas(self, antennas):
+ self.antennas = antennas
+ self.set_selected_antenna([ [self.antenna,self.antennas[0]][self.antenna not in self.antennas] ,self.antennas[0]][self.antenna==''])
+
+ def get_window_fn_name_map(self):
+ return self.window_fn_name_map
+
+ def set_window_fn_name_map(self, window_fn_name_map):
+ self.window_fn_name_map = window_fn_name_map
+ self.set_variable_static_fft_window_name(self.window_fn_name_map[self.window])
+
+ def get_window_fn_map(self):
+ return self.window_fn_map
+
+ def set_window_fn_map(self, window_fn_map):
+ self.window_fn_map = window_fn_map
+ self.set_window_fn(self.window_fn_map[self.window])
+
+ def get_usrp_info(self):
+ return self.usrp_info
+
+ def set_usrp_info(self, usrp_info):
+ self.usrp_info = usrp_info
+ self.set_variable_static_usrp_info(self.usrp_info)
+
+ def get_tune_result(self):
+ return self.tune_result
+
+ def set_tune_result(self, tune_result):
+ self.tune_result = tune_result
+ self.set_variable_static_actual_dsp_freq(self.tune_result.actual_dsp_freq)
+ self.set_variable_static_rf_freq(self.tune_result.actual_rf_freq)
+
+ def get_tune_mode(self):
+ return self.tune_mode
+
+ def set_tune_mode(self, tune_mode):
+ self.tune_mode = tune_mode
+ self._tune_mode_chooser.set_value(self.tune_mode)
+ self.set_tune_obj([self.requested_freq, uhd.tune_request(self.requested_freq, self.lo_offset_txt), uhd.tune_request(self.requested_freq, dsp_freq=0, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)][self.tune_mode])
+
+ def get_time_probe(self):
+ return self.time_probe
+
+ def set_time_probe(self, time_probe):
+ self.time_probe = time_probe
+ self.set_variable_static_time_now(str( [time.ctime(self.time_probe.get_real_secs()), datetime.timedelta(seconds=self.time_probe.get_real_secs()), time.gmtime(self.time_probe.get_real_secs())] [self.relative_time]))
+
+ def get_test(self):
+ return self.test
+
+ def set_test(self, test):
+ self.test = test
+ self._run_evaluators_later(('any_test_1', lambda: self._evalutate_any_test_1(**{'test': self.test})))
+ self._test_chooser.set_value(self.test)
+
+ def get_subdev_spec(self):
+ return self.subdev_spec
+
+ def set_subdev_spec(self, subdev_spec):
+ self.subdev_spec = subdev_spec
+ self.set_variable_static_subdev_spec(self.subdev_spec)
+
+ def get_signal_probe_log(self):
+ return self.signal_probe_log
+
+ def set_signal_probe_log(self, signal_probe_log):
+ self.signal_probe_log = signal_probe_log
+ self.set_variable_static_level_probe(self.signal_probe_log)
+
+ def get_selected_gain(self):
+ return self.selected_gain
+
+ def set_selected_gain(self, selected_gain):
+ self.selected_gain = selected_gain
+ self._selected_gain_slider.set_value(self.selected_gain)
+ self._selected_gain_text_box.set_value(self.selected_gain)
+ self.set_selected_gain_proxy(self.selected_gain)
+
+ def get_selected_antenna(self):
+ return self.selected_antenna
+
+ def set_selected_antenna(self, selected_antenna):
+ self.selected_antenna = selected_antenna
+ self._selected_antenna_chooser.set_value(self.selected_antenna)
+ self.set_selected_antenna_proxy(self.selected_antenna)
+
+ def get_requested_sample_rate_base(self):
+ return self.requested_sample_rate_base
+
+ def set_requested_sample_rate_base(self, requested_sample_rate_base):
+ self.requested_sample_rate_base = requested_sample_rate_base
+ self.set_requested_sample_rate(self.requested_sample_rate_base / (1.*self.decim))
+ self._requested_sample_rate_base_text_box.set_value(self.requested_sample_rate_base)
+
+ def get_requested_freq(self):
+ return self.requested_freq
+
+ def set_requested_freq(self, requested_freq):
+ self.requested_freq = requested_freq
+ self.set_tune_obj([self.requested_freq, uhd.tune_request(self.requested_freq, self.lo_offset_txt), uhd.tune_request(self.requested_freq, dsp_freq=0, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)][self.tune_mode])
+ self.set_variable_static_requested_freq(self.requested_freq)
+
+ def get_relative_time(self):
+ return self.relative_time
+
+ def set_relative_time(self, relative_time):
+ self.relative_time = relative_time
+ self._relative_time_chooser.set_value(self.relative_time)
+ self.set_variable_static_time_now(str( [time.ctime(self.time_probe.get_real_secs()), datetime.timedelta(seconds=self.time_probe.get_real_secs()), time.gmtime(self.time_probe.get_real_secs())] [self.relative_time]))
+
+ def get_motherboard_sensors(self):
+ return self.motherboard_sensors
+
+ def set_motherboard_sensors(self, motherboard_sensors):
+ self.motherboard_sensors = motherboard_sensors
+ self.set_variable_static_text_0(self.motherboard_sensors)
+
+ def get_max_bin_freq(self):
+ return self.max_bin_freq
+
+ def set_max_bin_freq(self, max_bin_freq):
+ self.max_bin_freq = max_bin_freq
+ self.set_variable_static_max_bin_freq(self.max_bin_freq)
+
+ def get_locked_probe(self):
+ return self.locked_probe
+
+ def set_locked_probe(self, locked_probe):
+ self.locked_probe = locked_probe
+ self.set_static_locked('"' + str(self.locked_probe) + '"')
+
+ def get_lo_offset_txt(self):
+ return self.lo_offset_txt
+
+ def set_lo_offset_txt(self, lo_offset_txt):
+ self.lo_offset_txt = lo_offset_txt
+ self._lo_offset_txt_text_box.set_value(self.lo_offset_txt)
+ self.set_tune_obj([self.requested_freq, uhd.tune_request(self.requested_freq, self.lo_offset_txt), uhd.tune_request(self.requested_freq, dsp_freq=0, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)][self.tune_mode])
+
+ def get_fft_peak_hold(self):
+ return self.fft_peak_hold
+
+ def set_fft_peak_hold(self, fft_peak_hold):
+ self.fft_peak_hold = fft_peak_hold
+ self._run_evaluators_later(('variable_any_code_fft_sink_peak_hold', lambda: self._evalutate_variable_any_code_fft_sink_peak_hold(**{'peak_hold': self.fft_peak_hold})))
+
+ def get_fft_max_lvl_2(self):
+ return self.fft_max_lvl_2
+
+ def set_fft_max_lvl_2(self, fft_max_lvl_2):
+ self.fft_max_lvl_2 = fft_max_lvl_2
+ self.set_fft_max_lvl_value_2(self.fft_max_lvl_2)
+
+ def get_fft_max_lvl(self):
+ return self.fft_max_lvl
+
+ def set_fft_max_lvl(self, fft_max_lvl):
+ self.fft_max_lvl = fft_max_lvl
+ self.set_fft_max_lvl_value(self.fft_max_lvl)
+ self.set_variable_static_fft_max_lvl_log(self.fft_max_lvl)
+
+ def get_fft_averaging(self):
+ return self.fft_averaging
+
+ def set_fft_averaging(self, fft_averaging):
+ self.fft_averaging = fft_averaging
+ self._run_evaluators_later(('variable_any_code_fft_sink_ave', lambda: self._evalutate_variable_any_code_fft_sink_ave(**{'averaging': self.fft_averaging})))
+ self._run_evaluators_later(('variable_any_code_waterfall_ave', lambda: self._evalutate_variable_any_code_waterfall_ave(**{'averaging': self.fft_averaging})))
+
+ def get_decim(self):
+ return self.decim
+
+ def set_decim(self, decim):
+ self.decim = decim
+ self._decim_slider.set_value(self.decim)
+ self._decim_text_box.set_value(self.decim)
+ self.set_requested_sample_rate(self.requested_sample_rate_base / (1.*self.decim))
+
+ def get_daughterboard_sensors(self):
+ return self.daughterboard_sensors
+
+ def set_daughterboard_sensors(self, daughterboard_sensors):
+ self.daughterboard_sensors = daughterboard_sensors
+ self.set_variable_static_text_0_0(self.daughterboard_sensors)
+
+ def get_clicked_freq(self):
+ return self.clicked_freq
+
+ def set_clicked_freq(self, clicked_freq):
+ self.clicked_freq = clicked_freq
+ self.set_clicked_freq_txt(self.clicked_freq)
+
+ def get_window_fn(self):
+ return self.window_fn
+
+ def set_window_fn(self, window_fn):
+ self.window_fn = window_fn
+
+ def get_variable_static_usrp_info(self):
+ return self.variable_static_usrp_info
+
+ def set_variable_static_usrp_info(self, variable_static_usrp_info):
+ self.variable_static_usrp_info = variable_static_usrp_info
+ self._variable_static_usrp_info_static_text.set_value(self.variable_static_usrp_info)
+
+ def get_variable_static_time_now(self):
+ return self.variable_static_time_now
+
+ def set_variable_static_time_now(self, variable_static_time_now):
+ self.variable_static_time_now = variable_static_time_now
+ self._variable_static_time_now_static_text.set_value(self.variable_static_time_now)
+
+ def get_variable_static_text_0_0(self):
+ return self.variable_static_text_0_0
+
+ def set_variable_static_text_0_0(self, variable_static_text_0_0):
+ self.variable_static_text_0_0 = variable_static_text_0_0
+ self._variable_static_text_0_0_static_text.set_value(self.variable_static_text_0_0)
+
+ def get_variable_static_text_0(self):
+ return self.variable_static_text_0
+
+ def set_variable_static_text_0(self, variable_static_text_0):
+ self.variable_static_text_0 = variable_static_text_0
+ self._variable_static_text_0_static_text.set_value(self.variable_static_text_0)
+
+ def get_variable_static_subdev_spec(self):
+ return self.variable_static_subdev_spec
+
+ def set_variable_static_subdev_spec(self, variable_static_subdev_spec):
+ self.variable_static_subdev_spec = variable_static_subdev_spec
+ self._variable_static_subdev_spec_static_text.set_value(self.variable_static_subdev_spec)
+
+ def get_variable_static_rf_freq(self):
+ return self.variable_static_rf_freq
+
+ def set_variable_static_rf_freq(self, variable_static_rf_freq):
+ self.variable_static_rf_freq = variable_static_rf_freq
+ self._variable_static_rf_freq_static_text.set_value(self.variable_static_rf_freq)
+
+ def get_variable_static_requested_freq(self):
+ return self.variable_static_requested_freq
+
+ def set_variable_static_requested_freq(self, variable_static_requested_freq):
+ self.variable_static_requested_freq = variable_static_requested_freq
+ self._variable_static_requested_freq_static_text.set_value(self.variable_static_requested_freq)
+
+ def get_variable_static_max_bin_freq(self):
+ return self.variable_static_max_bin_freq
+
+ def set_variable_static_max_bin_freq(self, variable_static_max_bin_freq):
+ self.variable_static_max_bin_freq = variable_static_max_bin_freq
+ self._variable_static_max_bin_freq_static_text.set_value(self.variable_static_max_bin_freq)
+
+ def get_variable_static_level_probe(self):
+ return self.variable_static_level_probe
+
+ def set_variable_static_level_probe(self, variable_static_level_probe):
+ self.variable_static_level_probe = variable_static_level_probe
+ self._variable_static_level_probe_static_text.set_value(self.variable_static_level_probe)
+
+ def get_variable_static_fft_window_name(self):
+ return self.variable_static_fft_window_name
+
+ def set_variable_static_fft_window_name(self, variable_static_fft_window_name):
+ self.variable_static_fft_window_name = variable_static_fft_window_name
+ self._variable_static_fft_window_name_static_text.set_value(self.variable_static_fft_window_name)
+
+ def get_variable_static_fft_max_lvl_log(self):
+ return self.variable_static_fft_max_lvl_log
+
+ def set_variable_static_fft_max_lvl_log(self, variable_static_fft_max_lvl_log):
+ self.variable_static_fft_max_lvl_log = variable_static_fft_max_lvl_log
+ self._variable_static_fft_max_lvl_log_static_text.set_value(self.variable_static_fft_max_lvl_log)
+
+ def get_variable_static_actual_sample_rate(self):
+ return self.variable_static_actual_sample_rate
+
+ def set_variable_static_actual_sample_rate(self, variable_static_actual_sample_rate):
+ self.variable_static_actual_sample_rate = variable_static_actual_sample_rate
+ self._variable_static_actual_sample_rate_static_text.set_value(self.variable_static_actual_sample_rate)
+
+ def get_variable_static_actual_dsp_freq(self):
+ return self.variable_static_actual_dsp_freq
+
+ def set_variable_static_actual_dsp_freq(self, variable_static_actual_dsp_freq):
+ self.variable_static_actual_dsp_freq = variable_static_actual_dsp_freq
+ self._variable_static_actual_dsp_freq_static_text.set_value(self.variable_static_actual_dsp_freq)
+
+ def get_variable_any_code_waterfall_ave(self):
+ return self.variable_any_code_waterfall_ave
+
+ def set_variable_any_code_waterfall_ave(self, variable_any_code_waterfall_ave):
+ self.variable_any_code_waterfall_ave = variable_any_code_waterfall_ave
+
+ def get_variable_any_code_iq_correction(self):
+ return self.variable_any_code_iq_correction
+
+ def set_variable_any_code_iq_correction(self, variable_any_code_iq_correction):
+ self.variable_any_code_iq_correction = variable_any_code_iq_correction
+
+ def get_variable_any_code_fft_sink_peak_hold(self):
+ return self.variable_any_code_fft_sink_peak_hold
+
+ def set_variable_any_code_fft_sink_peak_hold(self, variable_any_code_fft_sink_peak_hold):
+ self.variable_any_code_fft_sink_peak_hold = variable_any_code_fft_sink_peak_hold
+
+ def get_variable_any_code_fft_sink_ave(self):
+ return self.variable_any_code_fft_sink_ave
+
+ def set_variable_any_code_fft_sink_ave(self, variable_any_code_fft_sink_ave):
+ self.variable_any_code_fft_sink_ave = variable_any_code_fft_sink_ave
+
+ def get_variable_any_code_auto_dc_offset_removal(self):
+ return self.variable_any_code_auto_dc_offset_removal
+
+ def set_variable_any_code_auto_dc_offset_removal(self, variable_any_code_auto_dc_offset_removal):
+ self.variable_any_code_auto_dc_offset_removal = variable_any_code_auto_dc_offset_removal
+
+ def get_update_time_source(self):
+ return self.update_time_source
+
+ def set_update_time_source(self, update_time_source):
+ self.update_time_source = update_time_source
+
+ def get_update_clock_source(self):
+ return self.update_clock_source
+
+ def set_update_clock_source(self, update_clock_source):
+ self.update_clock_source = update_clock_source
+
+ def get_tune_obj(self):
+ return self.tune_obj
+
+ def set_tune_obj(self, tune_obj):
+ self.tune_obj = tune_obj
+ self._run_evaluators_later(('actual_center_freq', lambda: self._evalutate_actual_center_freq(**{'tune_obj': self.tune_obj})))
+ self._run_evaluators_later(('tune_result', lambda: self._evalutate_tune_result(**{'tune_obj': self.tune_obj})))
+
+ def get_static_locked(self):
+ return self.static_locked
+
+ def set_static_locked(self, static_locked):
+ self.static_locked = static_locked
+ self._static_locked_static_text.set_value(self.static_locked)
+
+ def get_show_stream_tags_chk(self):
+ return self.show_stream_tags_chk
+
+ def set_show_stream_tags_chk(self, show_stream_tags_chk):
+ self.show_stream_tags_chk = show_stream_tags_chk
+ self._show_stream_tags_chk_check_box.set_value(self.show_stream_tags_chk)
+ self.blocks_tag_debug_0.set_display(self.show_stream_tags_chk)
+
+ def get_show_max_lvl(self):
+ return self.show_max_lvl
+
+ def set_show_max_lvl(self, show_max_lvl):
+ self.show_max_lvl = show_max_lvl
+ self._show_max_lvl_check_box.set_value(self.show_max_lvl)
+
+ def get_show_max_freq(self):
+ return self.show_max_freq
+
+ def set_show_max_freq(self, show_max_freq):
+ self.show_max_freq = show_max_freq
+ self._show_max_freq_check_box.set_value(self.show_max_freq)
+
+ def get_selected_gain_proxy(self):
+ return self.selected_gain_proxy
+
+ def set_selected_gain_proxy(self, selected_gain_proxy):
+ self.selected_gain_proxy = selected_gain_proxy
+ self.src.set_gain(self.selected_gain_proxy, 0)
+ self.src.set_gain(self.selected_gain_proxy, 1)
+
+ def get_selected_antenna_proxy(self):
+ return self.selected_antenna_proxy
+
+ def set_selected_antenna_proxy(self, selected_antenna_proxy):
+ self.selected_antenna_proxy = selected_antenna_proxy
+ self.src.set_antenna(self.selected_antenna_proxy, 0)
+ self.src.set_antenna(self.selected_antenna_proxy, 1)
+
+ def get_scope_mode_2(self):
+ return self.scope_mode_2
+
+ def set_scope_mode_2(self, scope_mode_2):
+ self.scope_mode_2 = scope_mode_2
+ self._scope_mode_2_chooser.set_value(self.scope_mode_2)
+ self.blks2_selector_0_0_0.set_output_index(int(self.scope_mode_2))
+ self.blks2_selector_0_1.set_input_index(int(self.scope_mode_2))
+
+ def get_scope_mode(self):
+ return self.scope_mode
+
+ def set_scope_mode(self, scope_mode):
+ self.scope_mode = scope_mode
+ self._scope_mode_chooser.set_value(self.scope_mode)
+ self.blks2_selector_0.set_input_index(int(self.scope_mode))
+ self.blks2_selector_0_0.set_output_index(int(self.scope_mode))
+
+ def get_requested_sample_rate(self):
+ return self.requested_sample_rate
+
+ def set_requested_sample_rate(self, requested_sample_rate):
+ self.requested_sample_rate = requested_sample_rate
+ self._run_evaluators_later(('actual_sample_rate', lambda: self._evalutate_actual_sample_rate(**{'requested_sample_rate': self.requested_sample_rate})))
+ self.src.set_samp_rate(self.requested_sample_rate)
+
+ def get_motherboard_sensor_names(self):
+ return self.motherboard_sensor_names
+
+ def set_motherboard_sensor_names(self, motherboard_sensor_names):
+ self.motherboard_sensor_names = motherboard_sensor_names
+ self._run_evaluators_later(('motherboard_sensors', lambda: self._evalutate_motherboard_sensors(**{'motherboard_sensor_names': self.motherboard_sensor_names})))
+
+ def get_max_decim(self):
+ return self.max_decim
+
+ def set_max_decim(self, max_decim):
+ self.max_decim = max_decim
+
+ def get_initial_gain(self):
+ return self.initial_gain
+
+ def set_initial_gain(self, initial_gain):
+ self.initial_gain = initial_gain
+ self._run_evaluators_later(('gain_default', lambda: self._evalutate_gain_default(**{'initial_gain': self.initial_gain})))
+
+ def get_has_lo_locked(self):
+ return self.has_lo_locked
+
+ def set_has_lo_locked(self, has_lo_locked):
+ self.has_lo_locked = has_lo_locked
+ self.set_locked_probe_poll_rate(self.lo_check_interval * float(self.has_lo_locked))
+
+ def get_freq_range(self):
+ return self.freq_range
+
+ def set_freq_range(self, freq_range):
+ self.freq_range = freq_range
+
+ def get_fix_invalid_freq(self):
+ return self.fix_invalid_freq
+
+ def set_fix_invalid_freq(self, fix_invalid_freq):
+ self.fix_invalid_freq = fix_invalid_freq
+
+ def get_fft_max_lvl_value_2(self):
+ return self.fft_max_lvl_value_2
+
+ def set_fft_max_lvl_value_2(self, fft_max_lvl_value_2):
+ self.fft_max_lvl_value_2 = fft_max_lvl_value_2
+
+ def get_fft_max_lvl_value(self):
+ return self.fft_max_lvl_value
+
+ def set_fft_max_lvl_value(self, fft_max_lvl_value):
+ self.fft_max_lvl_value = fft_max_lvl_value
+
+ def get_fft_ave_probe(self):
+ return self.fft_ave_probe
+
+ def set_fft_ave_probe(self, fft_ave_probe):
+ self.fft_ave_probe = fft_ave_probe
+ self.logpwrfft_x_0.set_avg_alpha(self.fft_ave_probe)
+ self.logpwrfft_x_0_0.set_avg_alpha(self.fft_ave_probe)
+
+ def get_daughterboard_sensor_names(self):
+ return self.daughterboard_sensor_names
+
+ def set_daughterboard_sensor_names(self, daughterboard_sensor_names):
+ self.daughterboard_sensor_names = daughterboard_sensor_names
+ self._run_evaluators_later(('daughterboard_sensors', lambda: self._evalutate_daughterboard_sensors(**{'daughterboard_sensor_names': self.daughterboard_sensor_names})))
+
+ def get_clicked_freq_txt(self):
+ return self.clicked_freq_txt
+
+ def set_clicked_freq_txt(self, clicked_freq_txt):
+ self.clicked_freq_txt = clicked_freq_txt
+ self._clicked_freq_txt_text_box.set_value(self.clicked_freq_txt)
+
+ def get_auto_iq_correction(self):
+ return self.auto_iq_correction
+
+ def set_auto_iq_correction(self, auto_iq_correction):
+ self.auto_iq_correction = auto_iq_correction
+ self._auto_iq_correction_check_box.set_value(self.auto_iq_correction)
+ self._run_evaluators_later(('variable_any_code_iq_correction', lambda: self._evalutate_variable_any_code_iq_correction(**{'auto_iq_correction': self.auto_iq_correction})))
+
+ def get_auto_dc_offset_removal(self):
+ return self.auto_dc_offset_removal
+
+ def set_auto_dc_offset_removal(self, auto_dc_offset_removal):
+ self.auto_dc_offset_removal = auto_dc_offset_removal
+ self._auto_dc_offset_removal_check_box.set_value(self.auto_dc_offset_removal)
+ self._run_evaluators_later(('variable_any_code_auto_dc_offset_removal', lambda: self._evalutate_variable_any_code_auto_dc_offset_removal(**{'auto_dc_offset_removal': self.auto_dc_offset_removal})))
+
+ def get_any_test_1(self):
+ return self.any_test_1
+
+ def set_any_test_1(self, any_test_1):
+ self.any_test_1 = any_test_1
+
+
+if __name__ == '__main__':
+ parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
+ parser.add_option("-A", "--antenna", dest="antenna", type="string", default="",
+ help="Set Antenna (blank for default) [default=%default]")
+ parser.add_option("-a", "--args", dest="args", type="string", default="",
+ help="Set UHD device args [default=%default]")
+ parser.add_option("", "--ave", dest="ave", type="eng_float", default=eng_notation.num_to_str(1*0 + 0.5),
+ help="Set Average FFT [default=%default]")
+ parser.add_option("", "--averaging", dest="averaging", type="string", default="True",
+ help="Set Enable FFT averaging [default=%default]")
+ parser.add_option("", "--bw", dest="bw", type="eng_float", default=eng_notation.num_to_str(0),
+ help="Set Daughterboard bandwidth (where appropriate) [default=%default]")
+ parser.add_option("", "--dyn-rng", dest="dyn_rng", type="eng_float", default=eng_notation.num_to_str(130),
+ help="Set Dynamic Range [default=%default]")
+ parser.add_option("", "--fft-rate", dest="fft_rate", type="intx", default=15,
+ help="Set FFT Rate [default=%default]")
+ parser.add_option("", "--fft-ref-scale", dest="fft_ref_scale", type="eng_float", default=eng_notation.num_to_str(2.0),
+ help="Set FFT Ref Scale (p2p) [default=%default]")
+ parser.add_option("", "--fft-size", dest="fft_size", type="intx", default=1024,
+ help="Set FFT Size [default=%default]")
+ parser.add_option("-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(0 + 100e6),
+ help="Set Frequency [default=%default]")
+ parser.add_option("", "--freq-fine-range", dest="freq_fine_range", type="eng_float", default=eng_notation.num_to_str(2e6),
+ help="Set Fine frequency slider range [default=%default]")
+ parser.add_option("-g", "--gain", dest="gain", type="eng_float", default=eng_notation.num_to_str(float("-inf")),
+ help="Set Gain (default '-inf' selects relative gain of 25%) [default=%default]")
+ parser.add_option("", "--lo-check-interval", dest="lo_check_interval", type="eng_float", default=eng_notation.num_to_str(5),
+ help="Set LO lock check frequency (Hz) [default=%default]")
+ parser.add_option("", "--lo-offset", dest="lo_offset", type="eng_float", default=eng_notation.num_to_str(0),
+ help="Set LO offset (selects LO offset tuning mode) [default=%default]")
+ parser.add_option("", "--mag-alpha", dest="mag_alpha", type="eng_float", default=eng_notation.num_to_str(1e-3),
+ help="Set Signal magnitude probe alpha [default=%default]")
+ parser.add_option("", "--peak-hold", dest="peak_hold", type="string", default="False",
+ help="Set FFT peak hold [default=%default]")
+ parser.add_option("", "--pps", dest="pps", type="string", default='',
+ help="Set Time source (none, internal, external, mimo, gpsdo). <empty> leaves it at the default. [default=%default]")
+ parser.add_option("", "--probe-interval", dest="probe_interval", type="eng_float", default=eng_notation.num_to_str(3),
+ help="Set Signal probe frequency (Hz) [default=%default]")
+ parser.add_option("-s", "--rate", dest="rate", type="eng_float", default=eng_notation.num_to_str(1e6),
+ help="Set Sample Rate [default=%default]")
+ parser.add_option("", "--ref", dest="ref", type="string", default='',
+ help="Set Clock source (internal, external, mimo, gpsdo). <empty> leaves it at the default. [default=%default]")
+ parser.add_option("", "--ref-lvl", dest="ref_lvl", type="eng_float", default=eng_notation.num_to_str(0),
+ help="Set Reference Level [default=%default]")
+ parser.add_option("", "--sensor-interval", dest="sensor_interval", type="eng_float", default=eng_notation.num_to_str(2),
+ help="Set Sensor update frequency (Hz) [default=%default]")
+ parser.add_option("", "--show-stream-tags", dest="show_stream_tags", type="string", default="False",
+ help="Set Print stream tags [default=%default]")
+ parser.add_option("", "--spec", dest="spec", type="string", default='',
+ help="Set Sub-device specification (where appropriate) [default=%default]")
+ parser.add_option("", "--stream-args", dest="stream_args", type="string", default="",
+ help="Set Stream arguments (e.g. scalar=1024) [default=%default]")
+ parser.add_option("", "--window", dest="window", type="string", default="auto",
+ help="Set Window (bh: Blackman-Harris, ham: Hamming, han: Hanning, rect: Rectangular, flat: Flattop) [default=%default]")
+ parser.add_option("", "--wire-format", dest="wire_format", type="string", default="",
+ help="Set Wire format (e.g. sc16, sc8) [blank = automatic] [default=%default]")
+ (options, args) = parser.parse_args()
+ if gr.enable_realtime_scheduling() != gr.RT_OK:
+ print "Error: failed to enable realtime scheduling."
+ tb = mega_fft_2ch(antenna=options.antenna, args=options.args, ave=options.ave, averaging=options.averaging, bw=options.bw, dyn_rng=options.dyn_rng, fft_rate=options.fft_rate, fft_ref_scale=options.fft_ref_scale, fft_size=options.fft_size, freq=options.freq, freq_fine_range=options.freq_fine_range, gain=options.gain, lo_check_interval=options.lo_check_interval, lo_offset=options.lo_offset, mag_alpha=options.mag_alpha, peak_hold=options.peak_hold, pps=options.pps, probe_interval=options.probe_interval, rate=options.rate, ref=options.ref, ref_lvl=options.ref_lvl, sensor_interval=options.sensor_interval, show_stream_tags=options.show_stream_tags, spec=options.spec, stream_args=options.stream_args, window=options.window, wire_format=options.wire_format)
+ tb.Start(True)
+ tb.Wait()
diff --git a/tools/nirio_programmer/.gitignore b/tools/nirio_programmer/.gitignore
new file mode 100644
index 000000000..567609b12
--- /dev/null
+++ b/tools/nirio_programmer/.gitignore
@@ -0,0 +1 @@
+build/
diff --git a/tools/nirio_programmer/CMakeLists.txt b/tools/nirio_programmer/CMakeLists.txt
new file mode 100644
index 000000000..bde0ea574
--- /dev/null
+++ b/tools/nirio_programmer/CMakeLists.txt
@@ -0,0 +1,83 @@
+#
+# Copyright 2014-2015 Ettus Research LLC
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+cmake_minimum_required(VERSION 2.8)
+
+### Set up build environment ##################################################
+# Choose a static or shared-library build (shared is default, and static will
+# probably need some special care!)
+# Set this to ON in order to link a static build of UHD:
+option(UHD_USE_STATIC_LIBS OFF)
+
+# This example also requires Boost:
+set(BOOST_REQUIRED_COMPONENTS
+ program_options
+ system
+ thread
+ regex
+)
+if(MSVC)
+ set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
+ if(BOOST_ALL_DYN_LINK)
+ add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
+ else(BOOST_ALL_DYN_LINK)
+ set(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
+ endif(BOOST_ALL_DYN_LINK)
+endif(MSVC)
+find_package(Boost "1.46" REQUIRED ${BOOST_REQUIRED_COMPONENTS})
+
+# To add UHD as a dependency to this project, add a line such as this:
+find_package(UHD "3.8.0" REQUIRED)
+# The version in ^^^^^ here is a minimum version.
+# To specify an exact version:
+#find_package(UHD 3.8.1 EXACT REQUIRED)
+
+### Configure Compiler ########################################################
+include_directories(
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../host/include"
+ ${Boost_INCLUDE_DIRS}
+ ${UHD_INCLUDE_DIRS}
+)
+link_directories(${Boost_LIBRARY_DIRS})
+
+### Make the executable #######################################################
+add_executable(nirio_programmer nirio_programmer.cpp)
+
+SET(CMAKE_BUILD_TYPE "Release")
+
+# Shared library case: All we need to do is link against the library, and
+# anything else we need (in this case, some Boost libraries):
+if(NOT UHD_USE_STATIC_LIBS)
+ message(STATUS "Linking against shared UHD library.")
+ target_link_libraries(nirio_programmer ${UHD_LIBRARIES} ${Boost_LIBRARIES})
+# Shared library case: All we need to do is link against the library, and
+# anything else we need (in this case, some Boost libraries):
+else(NOT UHD_USE_STATIC_LIBS)
+ message(STATUS "Linking against static UHD library.")
+ target_link_libraries(nirio_programmer
+ # We could use ${UHD_LIBRARIES}, but linking requires some extra flags,
+ # so we use this convenience variable provided to us
+ ${UHD_STATIC_LIB_LINK_FLAG}
+ # Also, when linking statically, we need to pull in all the deps for
+ # UHD as well, because the dependencies don't get resolved automatically
+ ${UHD_STATIC_LIB_DEPS}
+ )
+endif(NOT UHD_USE_STATIC_LIBS)
+
+### Once it's built... ########################################################
+# Here, you would have commands to install your program.
+# We will skip these in this example.
diff --git a/tools/nirio_programmer/nirio_programmer.cpp b/tools/nirio_programmer/nirio_programmer.cpp
new file mode 100644
index 000000000..9bb83e9a4
--- /dev/null
+++ b/tools/nirio_programmer/nirio_programmer.cpp
@@ -0,0 +1,291 @@
+//
+// Copyright 2014 Ettus Research LLC
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
+#include <uhd/transport/nirio/niusrprio_session.h>
+#include <uhd/transport/nirio/niriok_proxy.h>
+#include <uhd/transport/nirio/nifpga_lvbitx.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <fcntl.h>
+#include <iostream>
+#include <fstream>
+#include <streambuf>
+#include <boost/program_options.hpp>
+#include <boost/format.hpp>
+#include <boost/thread/thread.hpp>
+#include <boost/algorithm/string.hpp>
+#include <boost/regex.hpp>
+
+using namespace uhd::niusrprio;
+using namespace uhd::usrprio_rpc;
+
+class dummy_lvbitx : public nifpga_lvbitx {
+public:
+ dummy_lvbitx(const std::string& fpga_lvbitx_path) : _fpga_lvbitx_path(fpga_lvbitx_path) {
+ std::ifstream lvbitx_stream(_fpga_lvbitx_path.c_str());
+ if (lvbitx_stream.is_open()) {
+ std::string lvbitx_contents;
+ lvbitx_stream.seekg(0, std::ios::end);
+ lvbitx_contents.reserve(static_cast<size_t>(lvbitx_stream.tellg()));
+ lvbitx_stream.seekg(0, std::ios::beg);
+ lvbitx_contents.assign((std::istreambuf_iterator<char>(lvbitx_stream)), std::istreambuf_iterator<char>());
+ try {
+ boost::smatch md5_match;
+ if (boost::regex_search(lvbitx_contents, md5_match, boost::regex("<BitstreamMD5>([a-zA-Z0-9]{32})<\\/BitstreamMD5>", boost::regex::icase))) {
+ _bitstream_checksum = std::string(md5_match[1].first, md5_match[1].second);
+ }
+ boost::to_upper(_bitstream_checksum);
+ } catch (boost::exception&) {
+ _bitstream_checksum = "";
+ }
+ try {
+ boost::smatch sig_match;
+ if (boost::regex_search(lvbitx_contents, sig_match, boost::regex("<SignatureRegister>([a-zA-Z0-9]{32})<\\/SignatureRegister>", boost::regex::icase))) {
+ _signature = std::string(sig_match[1].first, sig_match[1].second);
+ }
+ boost::to_upper(_signature);
+ } catch (boost::exception&) {
+ _signature = "";
+ }
+ }
+ }
+ ~dummy_lvbitx() {}
+
+ virtual const char* get_bitfile_path() { return _fpga_lvbitx_path.c_str(); }
+ virtual const char* get_signature() { return _signature.c_str(); }
+ virtual const char* get_bitstream_checksum() { return _bitstream_checksum.c_str(); }
+
+ virtual size_t get_input_fifo_count() { return 0; }
+ virtual const char** get_input_fifo_names() { return NULL; }
+
+ virtual size_t get_output_fifo_count() { return 0; }
+ virtual const char** get_output_fifo_names() { return NULL; }
+
+ virtual size_t get_control_count() { return 0; }
+ virtual const char** get_control_names() { return NULL; }
+
+ virtual size_t get_indicator_count() { return 0; }
+ virtual const char** get_indicator_names() { return NULL; }
+
+ virtual void init_register_info(nirio_register_info_vtr& vtr) { vtr.clear(); }
+ virtual void init_fifo_info(nirio_fifo_info_vtr& vtr) { vtr.clear(); }
+
+private:
+ std::string _fpga_lvbitx_path;
+ std::string _bitstream_checksum;
+ std::string _signature;
+};
+
+int main(int argc, char *argv[])
+{
+ nirio_status status = NiRio_Status_Success;
+
+ //Setup the program options
+ uint32_t interface_num, peek_addr, poke_addr, poke_data;
+ std::string rpc_port, fpga_lvbitx_path, flash_path, peek_tokens_str, poke_tokens_str;
+
+ namespace po = boost::program_options;
+ po::options_description desc("Allowed options");
+ desc.add_options()
+ ("help", "help message")
+ ("interface", po::value<uint32_t>(&interface_num)->default_value(0), "The interface number to communicate with.")
+ ("port", po::value<std::string>(&rpc_port)->default_value("5444"), "Port to communicate with RPC server.")
+ ("fpga", po::value<std::string>(&fpga_lvbitx_path)->default_value(""), "The absolute path to the LVBITX file to download to the FPGA.")
+ ("flash", po::value<std::string>(&flash_path)->default_value(""), "The path to the image to download to the flash OR 'erase' to erase the FPGA image from flash.")
+ ("peek", po::value<std::string>(&peek_tokens_str)->default_value(""), "Peek32.")
+ ("poke", po::value<std::string>(&poke_tokens_str)->default_value(""), "Poke32.")
+ ("stats", "Dump interface and DMA stats.")
+ ;
+ po::variables_map vm;
+ po::store(po::parse_command_line(argc, argv, desc), vm);
+ po::notify(vm);
+
+ //Print the help message
+ if (vm.count("help")){
+ std::cout << boost::format("USRP-NIRIO-Programmer\n\n %s") % desc << std::endl;
+ return ~0;
+ }
+
+ std::string resource_name = boost::str(boost::format("RIO%u") % interface_num);
+
+ //Download LVBITX image
+ if (fpga_lvbitx_path != "")
+ {
+ printf("Downloading image %s to FPGA as %s...", fpga_lvbitx_path.c_str(), resource_name.c_str());
+ fflush(stdout);
+ uhd::niusrprio::niusrprio_session fpga_session(resource_name, rpc_port);
+ uhd::niusrprio::nifpga_lvbitx::sptr lvbitx(new dummy_lvbitx(fpga_lvbitx_path));
+ nirio_status_chain(fpga_session.open(lvbitx, true), status);
+ //Download BIN to flash or erase
+ if (flash_path != "erase") {
+ if (flash_path != "") {
+ printf("Writing FPGA image %s to flash...", flash_path.c_str());
+ fflush(stdout);
+ nirio_status_chain(fpga_session.download_bitstream_to_flash(flash_path), status);
+ printf("DONE\n");
+ }
+ } else {
+ printf("Erasing FPGA image from flash...");
+ fflush(stdout);
+ nirio_status_chain(fpga_session.download_bitstream_to_flash(""), status);
+ printf("DONE\n");
+ }
+ fpga_session.close();
+ printf("DONE\n");
+ }
+
+ fflush(stdout);
+ usrprio_rpc_client temp_rpc_client("localhost", rpc_port);
+ std::string interface_path;
+ nirio_status_chain(temp_rpc_client.niusrprio_get_interface_path(resource_name, interface_path), status);
+ if (interface_path.empty()) {
+ printf("ERROR: Could not open a proxy to interface %u. If it exists, try downloading an LVBITX to the FPGA first.\n", interface_num);
+ exit(EXIT_FAILURE);
+ }
+
+ niriok_proxy::sptr dev_proxy = niriok_proxy::make_and_open(interface_path);
+
+ if (poke_tokens_str != ""){
+ std::stringstream ss;
+ std::vector<std::string> poke_tokens;
+ boost::split(poke_tokens, poke_tokens_str, boost::is_any_of(":"));
+ ss.clear();
+ ss << std::hex << poke_tokens[1];
+ ss >> poke_addr;
+ ss.clear();
+ ss << std::hex << poke_tokens[2];
+ ss >> poke_data;
+
+ niriok_scoped_addr_space(dev_proxy, poke_tokens[0]=="c"?BUS_INTERFACE:FPGA, status);
+ if (poke_tokens[0]=="z") {
+ nirio_status_chain(dev_proxy->poke(poke_addr, (uint32_t)0x70000 + poke_addr), status);
+ } else {
+ nirio_status_chain(dev_proxy->poke(poke_addr, poke_data), status);
+ }
+ printf("[POKE] %s:0x%x <= 0x%x (%u)\n", poke_tokens[0]=="c"?"Chinch":(poke_tokens[0]=="z"?"ZPU":"FPGA"), poke_addr, poke_data, poke_data);
+ }
+
+ if (peek_tokens_str != ""){
+ std::stringstream ss;
+ std::vector<std::string> peek_tokens;
+ boost::split(peek_tokens, peek_tokens_str, boost::is_any_of(":"));
+ ss.clear();
+ ss << std::hex << peek_tokens[1];
+ ss >> peek_addr;
+
+ niriok_scoped_addr_space(dev_proxy, peek_tokens[0]=="c"?BUS_INTERFACE:FPGA, status);
+ uint32_t reg_val = 0;
+ if (peek_tokens[0]=="z") {
+ nirio_status_chain(dev_proxy->poke((uint32_t)0x60000 + peek_addr, (uint32_t)0), status);
+ do {
+ nirio_status_chain(dev_proxy->peek((uint32_t)0x60000 + peek_addr, reg_val), status);
+ } while (reg_val != 0);
+ nirio_status_chain(dev_proxy->peek((uint32_t)0x70000 + peek_addr, reg_val), status);
+ } else {
+ nirio_status_chain(dev_proxy->peek(peek_addr, reg_val), status);
+ }
+
+ printf("[PEEK] %s:0x%x = 0x%x (%u)\n", peek_tokens[0]=="c"?"Chinch":(peek_tokens[0]=="z"?"ZPU":"FPGA"), peek_addr, reg_val, reg_val);
+ }
+
+ //Display attributes
+ if (vm.count("stats")){
+ printf("[Interface %u]\n", interface_num);
+ uint32_t attr_val = 0;
+ nirio_status_chain(dev_proxy->get_attribute(RIO_IS_FPGA_PROGRAMMED, attr_val), status);
+ printf("* Is FPGA Programmed? = %s\n", (attr_val==1)?"YES":"NO");
+
+ std::string signature;
+ for (int i = 0; i < 4; i++) {
+ nirio_status_chain(dev_proxy->peek(0x3FFF4, attr_val), status);
+ signature += boost::str(boost::format("%08x") % attr_val);
+ }
+ printf("* FPGA Signature = %s\n", signature.c_str());
+
+ std::string checksum;
+ for (int i = 0; i < 4; i++) {
+ nirio_status_chain(dev_proxy->peek(0x40030 + (i * 4), attr_val), status);
+ checksum += boost::str(boost::format("%08x") % attr_val);
+ }
+ printf("* FPGA Bitstream Checksum = %s\n", checksum.c_str());
+
+ uint32_t reg_val = 0;
+ nirio_status_chain(dev_proxy->set_attribute(RIO_ADDRESS_SPACE, BUS_INTERFACE), status);
+ nirio_status_chain(dev_proxy->peek(0, reg_val), status);
+ printf("* Chinch Signature = %x\n", reg_val);
+ nirio_status_chain(dev_proxy->set_attribute(RIO_ADDRESS_SPACE, FPGA), status);
+ nirio_status_chain(dev_proxy->peek(0, reg_val), status);
+ printf("* PCIe FPGA Signature = %x\n", reg_val);
+
+ printf("\n[DMA Stream Stats]\n");
+
+ nirio_status_chain(dev_proxy->set_attribute(RIO_ADDRESS_SPACE, FPGA), status);
+
+ printf("------------------------------------------------------------------------------------------------");
+ printf("\nChannel => |");
+ for (uint32_t i = 0; i < 6; i++) {
+ printf("%11u |", i);
+ }
+ printf("\n------------------------------------------------------------------------------------------------");
+ printf("\nTX Status |");
+ for (uint32_t i = 0; i < 6; i++) {
+ nirio_status_chain(dev_proxy->peek(0x40200 + (i * 16), reg_val), status);
+ printf("%s |", reg_val==0 ? " Good" : " Error");
+ }
+ printf("\nRX Status |");
+ for (uint32_t i = 0; i < 6; i++) {
+ nirio_status_chain(dev_proxy->peek(0x40400 + (i * 16), reg_val), status);
+ printf("%s |", reg_val==0 ? " Good" : " Error");
+ }
+ printf("\nTX Frm Size |");
+ for (uint32_t i = 0; i < 6; i++) {
+ nirio_status_chain(dev_proxy->peek(0x40204 + (i * 16), reg_val), status);
+ printf("%11u |", reg_val);
+ }
+ printf("\nRX Frm Size |");
+ for (uint32_t i = 0; i < 6; i++) {
+ nirio_status_chain(dev_proxy->peek(0x40404 + (i * 16), reg_val), status);
+ printf("%11u |", reg_val);
+ }
+ printf("\nTX Pkt Count |");
+ for (uint32_t i = 0; i < 6; i++) {
+ nirio_status_chain(dev_proxy->peek(0x4020C + (i * 16), reg_val), status);
+ printf("%11u |", reg_val);
+ }
+ printf("\nTX Samp Count |");
+ for (uint32_t i = 0; i < 6; i++) {
+ nirio_status_chain(dev_proxy->peek(0x40208 + (i * 16), reg_val), status);
+ printf("%11u |", reg_val);
+ }
+ printf("\nRX Pkt Count |");
+ for (uint32_t i = 0; i < 6; i++) {
+ nirio_status_chain(dev_proxy->peek(0x4040C + (i * 16), reg_val), status);
+ printf("%11u |", reg_val);
+ }
+ printf("\nRX Samp Count |");
+ for (uint32_t i = 0; i < 6; i++) {
+ nirio_status_chain(dev_proxy->peek(0x40408 + (i * 16), reg_val), status);
+ printf("%11u |", reg_val);
+ }
+ printf("\n------------------------------------------------------------------------------------------------\n");
+ }
+
+ exit(EXIT_SUCCESS);
+}
+
+
diff --git a/tools/uhd_txrx_debug_prints/uhd_txrx_debug_prints_README.md b/tools/uhd_txrx_debug_prints/uhd_txrx_debug_prints_README.md
new file mode 100644
index 000000000..1425a4d96
--- /dev/null
+++ b/tools/uhd_txrx_debug_prints/uhd_txrx_debug_prints_README.md
@@ -0,0 +1,17 @@
+UHD TX/RX DEBUG PRINTS
+======================
+
+A tool for extensive debugging with UHD.
+
+Install
+-------
+Activate it by ticking `UHD_TXRX_DEBUG_PRINTS` in cmake-gui for your UHD installation. Then recompile and reinstall UHD.
+
+Use
+---
+Run your application and pipe stderr to a file.
+this is mostly done by <br>
+`app_call 2> dbg_print_file.txt`<br>
+After finishing the application offline processing of the gathered data is done with a python script called<br>
+`uhd_txrx_debug_prints_graph.py`<br>
+There are a lot of functions that help to preprocess your data and that describe the actual meaning of all the data points. in the end though, it comes down to the users needs what he wants to plot and see. \ No newline at end of file
diff --git a/tools/uhd_txrx_debug_prints/uhd_txrx_debug_prints_graph.py b/tools/uhd_txrx_debug_prints/uhd_txrx_debug_prints_graph.py
new file mode 100755
index 000000000..b0f6681f6
--- /dev/null
+++ b/tools/uhd_txrx_debug_prints/uhd_txrx_debug_prints_graph.py
@@ -0,0 +1,415 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright 2013-2014 Ettus Research LLC
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+Plots the output of the streamers that is produced when DEBUG_TXRX
+is enabled.
+"""
+
+import argparse
+import matplotlib.pyplot as plt
+import numpy as np
+
+# This is a top level function to load a debug file. It will return a list of lists with all the data.
+def get_data(filename):
+ res = []
+ with open(filename) as f:
+ for line in f.readlines():
+ line = line.rstrip('\n')
+ s = line.split(',')
+ res.append(s)
+ res = fix_known_data_corruption_patterns(res)
+ return res
+
+# Sometimes 'O' etc. get printed to stderr. This disturbs further processing. Thus, known pattern will be removed here.
+def fix_known_data_corruption_patterns(data):
+ # Some lines might be corrupted in the way that e.g. UHD prints sth else in the same line.
+ # O, D, Press Enter... are known patterns. These should be fixed.
+ counts = {'O': 0, 'D': 0, 'exit_msg': 0}
+ for i in range(len(data)):
+ if data[i][0].startswith('O'):
+ counts['O'] += 1
+ data[i][0] = data[i][0].replace('O', '')
+ if data[i][0].startswith('D'):
+ counts['D'] += 1
+ data[i][0] = data[i][0].replace('D', '')
+ if data[i][0].startswith('Press Enter to quit: '):
+ counts['exit_msg'] += 1
+ data[i][0] = data[i][0].replace('Press Enter to quit: ', '')
+ print counts
+ return data
+
+# Extract lines with a certain prefix.
+def extract_lines(prefix, data):
+ res = []
+ for line in data:
+ if line[0] == prefix:
+ res.append(line[1:])
+ return res
+
+# boolean values are stored as true/false. Convert them to real booleans again.
+def convert_to_bool(data):
+ res = []
+ for d in data:
+ res.append(d == "true")
+ return res
+
+# The different outputs have different structures. With this function you can conert them back to their actual type.
+def convert_data_set(data, reqtype):
+ zdata = zip(*data)
+ res = []
+ if len(zdata) == 0:
+ return res
+ for i in range(len(reqtype)):
+ if reqtype[i] == np.bool:
+ res.append(np.asarray(convert_to_bool(zdata[i]), dtype=np.bool))
+ else:
+ res.append(np.asarray(zdata[i], dtype=reqtype[i]))
+ return res
+
+# Wrapper for super_send_packet_handler data to be used with convert_data_set
+def convert_super_send_packet_handler_data(data):
+ # wallclock, timeout, avail_samps, sent_samps, sob, eob, has_time_spec, time_spec (ticks)
+ reqtype = [np.uint64, np.float, np.int, np.int, np.bool, np.bool, np.bool, np.uint64]
+ cdata = convert_data_set(data, reqtype)
+ return cdata
+
+# same o' same o'
+def convert_super_recv_packet_handler_data(data):
+ # wallclock, timeout, requested_samps, received_samps, one_packet, error_code, sob, eob, more_fragments, fragment_offset, has_timespec, time_spec
+ reqtype = [np.uint64, np.float, np.int, np.int, np.bool, np.int, np.bool, np.bool, np.bool, np.int, np.bool, np.uint64]
+ cdata = convert_data_set(data, reqtype)
+ return cdata
+
+def extract_super_recv_packet_handler_data(data):
+ pref1 = "super_recv_packet_handler"
+ pref2 = "recv"
+ super_recv = extract_lines(pref1, data)
+ recv = extract_lines(pref2, super_recv)
+ recv = convert_super_recv_packet_handler_data(recv)
+ return recv
+
+# Sometimes TX or RX is interrupted by system jiffies. Those are found by this function.
+def find_jiffy(data, thr):
+ res = []
+ last = data[0]
+ for i in range(len(data)):
+ if data[i] - last > thr:
+ res.append([last, data[i]])
+ last = data[i]
+ return res
+
+
+# Get difference between tx and rx wallclock
+def get_diff(tx, rx):
+ print "get diff, len(rx) = ", len(rx)
+ diff = [0] * len(rx[0])
+ for i in range(len(diff)):
+ r = rx[3][i]
+ idx = rx[0][i] - 1 # call count starts at 1. idx is 0 based.
+ t = tx[3][idx]
+ diff[i] = t - r
+ return diff
+
+
+def bps(samps, time):
+ bp = []
+ last = time[0]-1000
+ for i in range(len(samps)):
+ td = time[i] - last
+ last = time[i]
+ td = td /1e6
+ bp.append(samps[i] * 4 / td)
+ return bp
+
+
+# same as the other wrappers this time for libusb1
+def extract_libusb(trx, data):
+ pr1 = "libusb1_zero_copy"
+ pr2 = "libusb_async_cb"
+ ldata = extract_lines(pr1, data)
+ edata = extract_lines(pr2, ldata)
+ d = extract_lines(trx, edata)
+ # buff_num, actual_length, status, end_time, start_time
+ reqtype = [np.int, np.int, np.int, np.uint64, np.uint64]
+ return convert_data_set(d, reqtype)
+
+
+# Extract data for stream buffers. Typically there are 16 TX and 16 RX buffers. And there numbers are static. Though the number of buffers might be changed and the constant parameters must be adjusted in this case.
+def extract_txrx(data):
+ tx = [[], [], [], [], []]
+ rx = [[], [], [], [], []]
+ for i in range(len(data[0])):
+ print data[0][i]
+ if data[0][i] > 31 and data[0][i] < 48:
+ rx[0].append(data[0][i])
+ rx[1].append(data[1][i])
+ rx[2].append(data[2][i])
+ rx[3].append(data[3][i])
+ rx[4].append(data[4][i])
+ #print "tx\t", data[0][i], "\t", data[3][i], "\t", data[4][i]
+ if data[0][i] > 47 and data[0][i] < 64:
+ tx[0].append(data[0][i])
+ tx[1].append(data[1][i])
+ tx[2].append(data[2][i])
+ tx[3].append(data[3][i])
+ tx[4].append(data[4][i])
+ #print "rx\t", data[0][i], "\t", data[3][i], "\t", data[4][i]
+ return [tx, rx]
+
+# Calculate momentary throughput
+def throughput(data):
+ start = data[2][0]
+ total = data[1][-1] - data[2][0]
+ print total
+ thr = np.zeros(total)
+
+ for i in range(len(data[0])):
+ s = data[2][i] - start
+ f = data[1][i] - start
+ ticks = data[1][i] - data[2][i]
+ pertick = 1. * data[0][i] / ticks
+ vals = [pertick] * ticks
+ thr[s:f] = np.add(thr[s:f], vals)
+ #print pertick
+ print np.shape(thr)
+ return thr
+
+
+# Calculate a moving average
+def ma(data, wl):
+ ap = np.zeros(wl)
+ data = np.concatenate((ap, data, ap))
+ print np.shape(data)
+ res = np.zeros(len(data)-wl)
+ for i in range(len(data)-wl):
+ av = np.sum(data[i:i+wl]) / wl
+ res[i] = av
+ print i, "\t", av
+ return res
+
+
+def get_x_axis(stamps):
+ scale = 10e-6
+ return np.multiply(stamps, scale)
+
+
+# plot status codes.
+def plot_status_codes_over_time(data, fignum):
+ print "printing status numbers over time"
+
+ # extract and convert the data
+ recv = extract_super_recv_packet_handler_data(data)
+ libusb_rx = extract_libusb("rx", data)
+ libusb_tx = extract_libusb("tx", data)
+
+ # Plot all data
+ plt.figure(fignum) # Make sure these plots are printed to a new figure.
+ #plt.plot(get_x_axis(libusb_rx[3]), libusb_rx[2], marker='x', label='RX')
+ #plt.plot(get_x_axis(libusb_tx[3]), libusb_tx[2], marker='x', label='TX')
+
+ pos = 5
+ recv_error_codes = recv[pos]
+ plt.plot(get_x_axis(recv[0]), recv_error_codes, marker='x', label='recv')
+ plt.title("Status codes over timestamps")
+ plt.ylabel("status codes")
+ plt.xlabel("timestamps")
+ plt.grid()
+ plt.legend()
+
+ for i in range(len(recv[0])):
+ if recv[pos][i] == 8:
+ xaxis = get_x_axis([recv[0][i]])
+ plt.axvline(xaxis, color='b')
+
+
+ # Get some statistics and print them too
+ codes = []
+ code_dict = {}
+ for i in range(len(recv_error_codes)):
+ if recv_error_codes[i] != 0:
+ code = rx_metadata_error_codes[recv_error_codes[i]]
+ pair = [i, code]
+ codes.append(pair)
+ if not code_dict.has_key(code):
+ code_dict[code] = 0
+ code_dict[code] += 1
+ print codes
+ print code_dict
+
+
+# plot rtt times as peaks. That's the fast and easy way.
+def plot_rtt_times(data, fignum):
+ print "plot RTT times"
+ rx = extract_libusb("rx", data)
+ tx = extract_libusb("tx", data)
+
+ scale = 10e-6
+ rx_diff = np.multiply(np.subtract(rx[3], rx[4]), scale)
+ tx_diff = np.multiply(np.subtract(tx[3], tx[4]), scale)
+
+ plt.figure(fignum)
+ plt.plot(get_x_axis(rx[3]), rx_diff, marker='x', ls='', label="rx RTT")
+ plt.plot(get_x_axis(tx[3]), tx_diff, marker='x', ls='', label="tx RTT")
+ plt.title("Round trip times")
+ plt.ylabel("RTT (us)")
+ plt.grid()
+ plt.legend()
+
+
+# plot RTT as actual lines as long as buffers are on the fly.
+# This can take a long time if the function has to print a lot of small lines. Careful with this!
+def plot_rtt_lines(data, fignum):
+ print "plot RTT lines"
+ rx = extract_libusb("rx", data)
+ #tx = extract_libusb("tx", data)
+
+ if len(data) == 0 or len(rx) == 0:
+ return
+
+ plt.figure(fignum)
+ for i in range(len(rx[0])):
+ if rx[0][i] > -1:
+ start = rx[4][i]
+ stop = rx[3][i]
+ status = rx[2][i]
+
+ val = rx[0][i]#(stop - start) * scale
+ if not status == 0:
+ if status == 2:
+ print "status = ", status
+ val +=0.5
+ xaxis = get_x_axis([start, stop])
+ plt.plot(xaxis, [val, val], marker='x')
+ plt.ylabel('buffer number')
+
+ # Careful with these lines here.
+ # Basically they should always have these values to separate CTRL, TX, RX buffer number blocks.
+ # But these values can be adjusted. Thus, it requires you to adjust these lines
+ plt.axhline(15.5)
+ plt.axhline(31.5)
+ plt.axhline(47.5)
+ plt.grid()
+
+
+# only plot on-the-fly buffers.
+def plot_buff_otf(trx, nrange, data):
+ d = extract_libusb(trx, data)
+ res = [[], []]
+ num = 0
+ for i in range(len(d[0])):
+ if d[0][i] in nrange:
+ res
+
+
+# If there are still unknown lines after cleanup, they can be caught and printed here.
+# This way you can check what got caught but shouldn't have been caught.
+def get_unknown_lines(data):
+ # These are the 3 known starting lines. More might be added in the future.
+ known = ['super_recv_packet_handler', 'super_send_packet_handler', 'libusb1_zero_copy']
+ res = []
+ for i in range(len(data)):
+ if not data[i][0] in known:
+ print data[i]
+ res.append(data[i])
+ return res
+
+# LUT for all the return codes
+rx_metadata_error_codes = {0x0: "NONE", 0x1: "TIMEOUT", 0x2: "LATE_COMMAND", 0x4: "BROKEN_CHAIN", 0x8: "OVERFLOW",
+ 0xc: "ALIGNMENT", 0xf: "BAD_PACKET"}
+
+
+def parse_args():
+ """ Parse args, yo """
+ parser = argparse.ArgumentParser(description='Plot tool for debug prints.')
+ parser.add_argument('-f', '--filename', default=None, help='Debug output file')
+ return parser.parse_args()
+
+# Be really careful with the input files. They get pretty huge in a small time.
+# Doing some of the plotting can eat up a lot of time then.
+# Although this file contains a lot of functions by now, it is still left to the user to use everythin correctly.
+def main():
+ args = parse_args()
+ filename = args.filename
+ print "get data from: ", filename
+ #pref1 = "super_recv_packet_handler"
+ #pref2 = "recv"
+
+ # Here you get the data from a file
+ data = get_data(filename)
+ #print "data len: ", len(data)
+
+ # extract lines with unknown content.
+ unknown = get_unknown_lines(data)
+
+ # plot status codes and RTT lines.
+ plot_status_codes_over_time(data, 0)
+ plot_rtt_lines(data, 0)
+ #plot_rtt_times(data, 0)
+
+ #[tx, rx] = extract_txrx(data)
+ #print "txlen\t", len(tx[0])
+ #print "rxlen\t", len(rx[0])
+
+
+ #print "plot data"
+ #plt.title(filename)
+ #plt.plot(tx_data[0], tx_data[7], 'r', marker='o', label='TX')
+ #plt.plot(rx_data[0], rx_data[11], 'g', marker='x', label='RX')
+ #for j in jiffies:
+ # plt.axvline(x=j[0], color='r')
+ # plt.axvline(x=j[1], color='g')
+ #
+ #plt.xlabel('wallclock (us)')
+ #plt.ylabel('timestamp (ticks)')
+ #plt.legend()
+
+ #lencal = 200000
+
+ # calculate and plot rx throughput
+ #rxthr = throughput([rx[1], rx[3], rx[4]])
+ #plt.plot(rxthr[0:lencal])
+ #rxav = ma(rxthr[0:lencal], 2000)
+ #plt.plot(rxav)
+
+ # calculate and plot tx throughput
+ #txthr = throughput([tx[1], tx[3], tx[4]])
+ #plt.plot(txthr[0:lencal])
+ #txav = ma(txthr[0:lencal], 20)
+ #plt.plot(txav)
+
+
+ #bp = bps(data[1], data[2])
+ #print np.sum(bp)
+ #ave = np.sum(bp)/len(bp)
+ #print ave
+ #plt.plot(tx_data[0], tx_data[2], 'r')
+ #plt.plot(rx_data[0], rx_data[2], 'b')
+ #plt.plot(bp, 'g', marker='+')
+ #plt.plot(np.multiply(data[1], 1e6), 'r', marker='o')
+ #plt.plot(np.multiply(data[3],1e2), 'b', marker='x')
+ #plt.plot(ave)
+
+ # in the end, put a grid on the graph and show it.
+ plt.grid()
+ plt.show()
+
+if __name__ == '__main__':
+ print "[WARNING] This tool is in alpha status. Only use if you know what you're doing!"
+ main()
+