discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] using get_time_now in python


From: Zing Yu
Subject: [Discuss-gnuradio] using get_time_now in python
Date: Fri, 18 May 2012 13:53:17 -0700 (PDT)

Hello everyone,

A simple problem for you guys which is giving me tough time though :)

I have a custom gnuradio block which requires the current time in usrp FPGA. So, I do the following in my python flow-graph file:

self.uhd_usrp_sink_0 = uhd.usrp_sink(
            device_addr="",
            io_type=uhd.io_type.COMPLEX_FLOAT32,
            num_channels=1,
        )
secs = self.uhd_usrp_sink_0.get_time_now().get_full_secs().to_int()+1
fracs = self.uhd_usrp_sink_0.get_time_now().get_frac_secs()

I then pass secs and fracs to my custom block as parameters. Now the issue is that I get following error message when I run the python file:

swig/python detected a memory leak of type 'time_t *', no destructor found.
Traceback (most recent call last):
  File "./top_block.py", line 75, in <module>
    tb = top_block()
  File "./top_block.py", line 43, in __init__
    secs = self.uhd_usrp_sink_0.get_time_now().get_full_secs().to_int()+1
AttributeError: 'SwigPyObject' object has no attribute 'to_int'



Could someone suggest how to fix it. Thanks in advance for the help.

Yu

reply via email to

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