[Top][All Lists]

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

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

From: Zohair
Subject: Re: [Discuss-gnuradio] Error in python (XML file)
Date: Wed, 30 Jun 2010 03:57:43 -0700 (PDT)

Hi Josh,

Thanks for replying.

I tried what you told me to do. I added %include<usrp2/usrp2.h> and maked
the directory. However, I receive this error;

usrp2.cc: In function ‘PyObject* _wrap_usrp2_start_rx_streaming(PyObject*,
PyObject*, PyObject*)’:
usrp2.cc:7970: error: ‘time_spec_t’ was not declared in this scope

This line has: 
  usrp2::time_spec_t const &arg3_defvalue = time_spec_t() ;

Before this line there are a lot of occurrences of time_spec_t and there is
no compiling error. This means that the usrp2.h is indeed accessed but why
do you think I receive this error? Any clue or hint, please?


Josh Blum-2 wrote:
> Zohair,
> You can check what is in the module like so: python -c "from gnuradio 
> import usrp2; print dir(usrp2)"
> '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 :-)
> -Josh
> 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:_
>> self.$(id).set_time_at_next_pps(time_spec_t(0,0))
>> 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__
>>      self.usrp2_sync_source_xxxx_0.set_time_at_next_pps(time_spec_t(0,0))
>> NameError: global name 'time_spec_t' is not defined
>> Any help or hint please? I am using GRC 3.3git-23e45f33
>> Cheers,
>> Zoh
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

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]