summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastian Bloessl <mail@bastibl.net>2019-06-19 18:00:53 +0200
committerMartin Braun <martin.braun@ettus.com>2019-06-19 13:00:00 -0700
commitc1a046e7640df4f4a9e29e24c6a3eeec88a62323 (patch)
tree20d4b2b8fd08e00bc4bc21de3d9ea78c00daf827
parent59226dd0b43a5090daa66a59fe98aa61e56700d2 (diff)
ctrlport monitors: fix config check
-rw-r--r--gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor5
-rw-r--r--gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx18
-rw-r--r--gnuradio-runtime/python/gnuradio/ctrlport/monitor.py4
3 files changed, 11 insertions, 16 deletions
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor b/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor
index b1f4f321ec..09edfbebae 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor
@@ -752,7 +752,10 @@ class MyApp(object):
try:
GNURadioControlPortClient(args.host, args.port, 'thrift', self.run, Qt.QApplication(sys.argv).exec_)
except:
- print("Control Port failed to connect.")
+ print("ControlPort failed to connect. Check the config of your endpoint.")
+ print("\t[ControlPort] on = True")
+ print("\t[PerfCounters] on = True")
+ print("\t[PerfCounters] export = True")
sys.exit(1)
def run(self, client):
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
index c557d12813..65ab799a05 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
@@ -886,18 +886,6 @@ class MForm(Qt.QWidget):
class MyApp(object):
def __init__(self, args):
- p = gr.prefs()
- cp_on = p.get_bool("ControlPort", "on", False)
- cp_edges = p.get_bool("ControlPort", "edges_list", False)
- pcs_on = p.get_bool("PerfCounters", "on", False)
- pcs_exported = p.get_bool("PerfCounters", "export", False)
- if(not (pcs_on and cp_on and pcs_exported and cp_edges)):
- print("Configuration has not turned on all of the appropriate ControlPort features:")
- print("\t[ControlPort] on = {0}".format(cp_on))
- print("\t[ControlPort] edges_list = {0}".format(cp_edges))
- print("\t[PerfCounters] on = {0}".format(pcs_on))
- print("\t[PerfCounters] export = {0}".format(pcs_exported))
- sys.exit(1)
parser = ArgumentParser(description="GNU Radio Performance Monitor")
parser.add_argument("host", nargs="?", default="localhost", help="host name or IP")
@@ -910,7 +898,11 @@ class MyApp(object):
try:
GNURadioControlPortClient(args.host, args.port, 'thrift', self.run, Qt.QApplication(sys.argv).exec_)
except:
- print("Control Port failed to connect.")
+ print("ControlPort failed to connect. Check the config of your endpoint.")
+ print("\t[ControlPort] on = True")
+ print("\t[ControlPort] edges_list = True")
+ print("\t[PerfCounters] on = True")
+ print("\t[PerfCounters] export = True")
sys.exit(1)
def run(self, client):
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py b/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
index c9e22198bb..151683318b 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
@@ -35,10 +35,10 @@ class monitor(object):
# setup export prefs
gr.prefs().singleton().set_bool("ControlPort","on",True)
+ gr.prefs().singleton().set_bool("PerfCounters","on",True)
+ gr.prefs().singleton().set_bool("PerfCounters","export",True)
if(tool == "gr-perf-monitorx"):
gr.prefs().singleton().set_bool("ControlPort","edges_list",True)
- gr.prefs().singleton().set_bool("PerfCounters","on",True)
- gr.prefs().singleton().set_bool("PerfCounters","export",True)
def start(self):
try: