On Wed, Jan 7, 2015 at 7:57 AM, Ludwig Stephan (CR/AEH4) < [email protected]> wrote:
> Hi list, > > I am trying to use the gr::digital::constellation::decision_maker(.) > method from python, but I get an error message. > In order to reproduce call in python: > > import gnuradio.digital > a = gnuradio.digital.constellation_qpsk() > b = complex(1+1j) > a.decision_maker(b) > => TypeError [..] argument 2 of type ‘gr_complex const*’ > The C++-implementation is wrapped by SWIG, where the error occurs. > > This might be a silly question, but what am I doing wrong? > > Thanks for any help. > > Best regards > > *Stephan Ludwig* > Hi Stephan, You're not doing anything wrong per se, but the block isn't really meant to be used that way. SWIG needs to be told how to handle some types of argument formats, and it hasn't been told how to handle this one. The post 3.7 way we've been handling SWIG is to just include the public .h file as the interface, so all methods are exported into SWIG. A class like this needs that method to be public for use as a contained object in the block that calls it, but it's not really meant for use outside like this. Not that it couldn't be, but you'd have to work with SWIG to let it understand how to call that function with the proper input type. Tom
_______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
