(python 2.7 based)
importing gnuradio, numpy and pmt,
the behavior I get (which agrees with the documentation):r = pmt.to_python(p)
create and pass the pmt via the message port,
I get a string type after converting to python:
def handle_rxmsg(self, msg):
dat = pmt.to_python(msg) # dat is an np.array[9] of type np.uint8
print "Type of msg: ", type(msg)
print "Type of dat: ", type(dat)
Type of msg: <class 'pmt.pmt_swig.swig_int_ptr'>
Type of dat: <type 'str'>
running under gnuradio?
Why does this work in a command line console, but not in gnuradio?
-- Tom, N5EG
No comments:
Post a Comment