Zohair,
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
-Josh