[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>
main()
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
__init__
self._setup_usrp_source(options)
File "/home/tom/projects/testy/2threads_1/receive_path.py", line 123, in
_setup_usrp_source
self.u = usrp_options.create_usrp_source(options)
File "/home/tom/projects/testy/2threads_1/usrp_options.py", line 70, in
create_usrp_source
fusb_nblocks=options.fusb_nblocks,
File "/home/tom/projects/testy/2threads_1/generic_usrp.py", line 98, in
__init__
except: self._setup_usrp_source()
File "/home/tom/projects/testy/2threads_1/generic_usrp.py", line 117, in
_setup_usrp_source
fusb_nblocks=self._fusb_nblocks)
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()
u.read_aux_adc(0,0)
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.
Tom
--
View this message in context:
http://www.nabble.com/strange-inheritance-in-gnuradio..-or-something-wrong-with-SWIG..-tp25393083p25423236.html
Sent from the GnuRadio mailing list archive at Nabble.com.