[Top][All Lists]

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

Re: [Discuss-gnuradio] Error in python (XML file)

From: Josh Blum
Subject: Re: [Discuss-gnuradio] Error in python (XML file)
Date: Tue, 29 Jun 2010 09:21:48 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100423 Thunderbird/3.0.4


You can check what is in the module like so: python -c "from gnuradio import usrp2; print dir(usrp2)" ['MC_PROVIDE_CLK_TO_MIMO', 'MC_WE_DONT_LOCK', 'MC_WE_LOCK_TO_MIMO', 'MC_WE_LOCK_TO_SMA', 'SwigPyIterator', 'SwigPyIterator_swigregister', '_MC_MIMO_CLK_INPUT', '_MC_WE_LOCK', '__adc_rate', '__builtins__', '__dac_rate', '__daughterboard_id', '__default_tx_scale_iq', '__doc__', '__file__', '__fpga_master_clock_freq', '__freq_range', '__gain_range', '__name__', '__package__', '__read_gpio', '__set_center_freq', '_newclass', '_object', '_swig_getattr', '_swig_property', '_swig_repr', '_swig_setattr', '_swig_setattr_nondynamic', '_swig_setattr_nondynamic_method', '_usrp2', 'cvar', 'deref_int_ptr', 'deref_long_ptr', 'deref_uint16_ptr', 'free_int_ptr', 'free_long_ptr', 'free_uint16_ptr', 'make_int_ptr', 'make_long_ptr', 'make_uint16_ptr', 'rx_metadata', 'rx_metadata_swigregister', 'sink_16sc', 'sink_32fc', 'sizeof_char', 'sizeof_double', 'sizeof_float', 'sizeof_gr_complex', 'sizeof_int', 'sizeof_short', 'source_16sc', 'source_32fc', 'tune_result', 'tune_result_swigregister', 'tx_metadata', 'tx_metadata_swigregister', 'uint32_t_vector', 'uint32_t_vector_swigregister', 'usrp2_base', 'usrp2_base_swigregister', 'usrp2_sink_16sc_sptr', 'usrp2_sink_16sc_sptr_swigregister', 'usrp2_sink_32fc_sptr', 'usrp2_sink_32fc_sptr_swigregister', 'usrp2_sink_base', 'usrp2_sink_base_swigregister', 'usrp2_source_16sc_sptr', 'usrp2_source_16sc_sptr_swigregister', 'usrp2_source_32fc_sptr', 'usrp2_source_32fc_sptr_swigregister', 'usrp2_source_base', 'usrp2_source_base_swigregister']

Looks like time_spec is not present. The gr-usrp2 swig file probably needs a line added: %include <usrp2/usrp2.h>
This is where the time spec is defined.

I encourage you to use the UHD if you are interested in timestamped samples if you want a supported solution that works with the latest gnuradio: http://ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/wiki

It also seems that I need to add the import for time_spec_t to the uhd_swig.i file :-)


On 06/29/2010 03:38 AM, Zohair wrote:

Dear all,

I am trying to modify the USRP2 block so that the timer is reset at the
beginning. I added this line to the make tag in the xml file:_


I receive this error:

Traceback (most recent call last):
   File "/media/ZOHAIR/top_block.py", line 64, in<module>
     tb = top_block()
   File "/media/ZOHAIR/top_block.py", line 36, in __init__
NameError: global name 'time_spec_t' is not defined

Any help or hint please? I am using GRC 3.3git-23e45f33


reply via email to

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