On Tue, Mar 4, 2014 at 4:17 PM, Azza Ben Mosbah <azza.ben.mos...@gmail.com> wrote: > Hi All, > > I am manipulating GNU Radio Companion. > While using the "Constellation Decoder" block, I have put > digital.constellation_qpsk as a "Constellation Object" argument. But, I have > found an error when I have executed the flow graph: > > Traceback (most recent call last): > File "/users/anb10/metrics/error_rate.py", line 342, in <module> > tb = error_rate() > File "/users/anb10/metrics/error_rate.py", line 225, in __init__ > self.digital_constellation_decoder_cb_0 = > digital.constellation_decoder_cb(digital.constellation_qpsk) > File > "/usr/lib64/python2.6/site-packages/gnuradio/digital/digital_swig.py", line > 3096, in constellation_decoder_cb > return _digital_swig.constellation_decoder_cb(*args, **kwargs) > TypeError: in method 'constellation_decoder_cb', argument 1 of type > 'digital_constellation_sptr' > > I don't know what went wrong. I have even tried > digital.psk.psk_constellation(m=4,mod_code='gray'), > digital.constellation_8psk and > digital.psk.psk_constellation(m=8,mod_code='gray') as a "Constellation > Object" argument. > > So, what is the proper way to define the argument (Constellation Object) in > the "Constellation Decoder" block? > > I hope you can give me some ideas. Any help is appreciated. Thank you. > > Regards, > Azza
Azza, Check out the documentation page: http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1constellation__decoder__cb.html It's not entirely clear (unless you know to look for it). You want to pass the constellation object using the base() parameter to get to the parent class. Basically, you'd call it: digital.constellation_decoder_cb(digital.constellation_qpsk.base()) Tom _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio