The “usrp_spectrum_sense.py” program is used to sense the defined
range. Now, I want to stop it for a period of five second time (e.g.
55 to 59 seconds). For that purpose, I wrote the following lines in
calling the ‘usrp_spectrum_sense.py’ program
def relay_func(self, tb):
curr_time = time.strftime('%S',time.localtime()) if int(curr_time)>=55:
print 'Hello World"
t = usrp_spectrum_sense_updated.ThreadClass()
t.start() tb = usrp_spectrum_sense_updated.my_top_block() try: tb.start() usrp_spectrum_sense_updated.main_loop(tb) except KeyboardInterrupt: pass
if name == ‘main’:
tb = main_class() tb.relay_func(tb)
In the above program, I tried to stop sensing for the duration of 5
(i.e. 55 ---- 59 seconds). The program works fine whenever I execute it
between of the mentioned time and it shift automatically to the sensing
mode at time=0 second; but once it start sensing then it never be
to the print message ‘hello world’ even when the condition is matched.
Earliest and kind response is highly appreciated. Thanks.
Syed Aqeel R.