Hi All, time_spec_t is a class representing time in UHD. It uses time_t (long int) for representing full seconds and double for parts of a second. This format of time is usable to tell USRPs when to do certain tasks. It is also very usable for operations on time without loosing precision.
In c++ time_spec_t can be constructed from time represented by a double (not precise if number of full seconds is large) or from time_t and double. Both constructors are exposed by SWIG in Python. When I construct time_spec from double everything is fine: >>> from gnuradio import uhd >>> uhd.time_spec(10) But when I construct from int and float I get an error: >>> uhd.time_spec(10,0.1) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/gnuradio/uhd/uhd_swig.py", line 1576, in __init__ this = _uhd_swig.new_time_spec_t(*args) NotImplementedError: Wrong number or type of arguments for overloaded function 'new_time_spec_t'. Possible C/C++ prototypes are: uhd::time_spec_t::time_spec_t(double) uhd::time_spec_t::time_spec_t(time_t,double) uhd::time_spec_t::time_spec_t(time_t,long,double) Somehow Python's integer is not recognized as compatible with time_t parameter in the second constructor (uhd::time_spec_t::time_spec_t(time_t,double) ). My question: Is there a way to use time_spec_t's constructor uhd::time_spec_t::time_spec_t(time_t,double) from Python interface exposed by GNU Radio? In my opinion there should be, otherwise why to expose it through SWIG. -- Best Regards, Piotr Krysik _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio