diff options
author | Tom Rondeau <tom@trondeau.com> | 2015-03-03 15:45:36 -0500 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2015-04-02 15:38:57 -0700 |
commit | 3da7369d88f67258d1ed69069521a2620657b875 (patch) | |
tree | 763c673b8d13d397f00764dc01c6174b16067ad6 /gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py | |
parent | cc5b9ae930b70a9ada0a9efc5a538fa357753e32 (diff) |
controlport: cleaning up; trying to handle shutdown better.
Added QA code in for testing probes and other basic connection features. Requires nthreads >= 10.
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py index f662a66c90..9a2a302af5 100644 --- a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py +++ b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py @@ -39,6 +39,7 @@ class ThriftRadioClient: self.transport.open() def __del__(self): + self.radio.shutdown() self.transport.close() def getRadio(self, host, port): @@ -154,6 +155,13 @@ class RPCConnectionThrift(RPCConnection.RPCConnection): for key, knob in self.thriftclient.radio.getKnobs(*args).iteritems(): #print("key:", key, "value:", knob, "type:", knob.type) result[key] = self.unpackKnob(key, knob) + + # If complex, convert to Python complex + # FIXME: better list iterator way to handle this? + if(knob.type == self.BaseTypes.C32VECTOR): + for i in xrange(len(result[key].value)): + result[key].value[i] = complex(result[key].value[i].re, + result[key].value[i].im) return result def getKnobsRaw(self, *args): |