[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] strange inheritance in gnuradio.. or something wr

From: tom_unaff
Subject: Re: [Discuss-gnuradio] strange inheritance in gnuradio.. or something wrong with SWIG..
Date: Sun, 13 Sep 2009 06:28:05 -0700 (PDT)

OK, there is not problem with inheritance in C++.

There is something strange in SWIG interface or python.
I am able to create objects and call method read_aux_adc() in C++.
but whenever I create second object in python I got errors:

 ./streamer_rx_tx_t.py -f 2.4G
usrp_open_interface:usb_claim_interface: failed interface 2
could not claim interface 2: Device or resource busy
usrp_basic_rx: can't open rx interface
Traceback (most recent call last):
  File "./streamer_rx_tx_t.py", line 251, in <module>
  File "./streamer_rx_tx_t.py", line 203, in main
    tb_rx = my_top_block_rx(demods[options.modulation], rx_callback,
test123, options)
  File "./streamer_rx_tx_t.py", line 71, in __init__
    self.rxpath = receive_path(demodulator, rx_callback, test123, options) 
  File "/home/tom/projects/testy/2threads_1/receive_path.py", line 62, in
  File "/home/tom/projects/testy/2threads_1/receive_path.py", line 123, in
    self.u = usrp_options.create_usrp_source(options)
  File "/home/tom/projects/testy/2threads_1/usrp_options.py", line 70, in
  File "/home/tom/projects/testy/2threads_1/generic_usrp.py", line 98, in
    except: self._setup_usrp_source()
  File "/home/tom/projects/testy/2threads_1/generic_usrp.py", line 117, in
  File "/usr/lib/python2.6/dist-packages/gnuradio/usrp/usrp_swig.py", line
1646, in source_c
    return _usrp_swig.source_c(*args, **kwargs)
RuntimeError: can't open usrp
Exception AttributeError: "'gr_hier_block2_sptr' object has no attribute
'_type'" in <bound method generic_usrp_source_c.__del__ of
<generic_usrp.generic_usrp_source_c object at 0xa7336cc>> ignored

u = usrp.source_c()

Any ideas what is wrong with SWIG interface?

Concerning inheritance in C++ I think that SWIG doesn't know anything about
inheritance mechanism in C++. It only exports stuff that is represented by
given class. Correct me if I am wrong.


View this message in context: 
Sent from the GnuRadio mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]