discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] How to "close" osmosdr source?


From: M. Ranganathan
Subject: Re: [Discuss-gnuradio] How to "close" osmosdr source?
Date: Fri, 25 Mar 2016 10:53:36 -0400

Kevin,

Thanks for the answer. My setup is a little more complicated than that. The sensor reads its configuration from the server. The server could reconfigure the sensor between restarts.

I did try stopping the task graph and restarting but the problem is unresolved. I tried ulocking but I get the following: AttributeError: 'top_block_sptr' object has no attribute '_unlock'

Regards,

Ranga



On Mar 24, 2016 7:55 PM, "Kevin Reid" <address@hidden> wrote:
On Mar 24, 2016, at 15:13, M. Ranganathan <address@hidden> wrote:
> This works fine using USRP so I am wondering if there is a way to close the osmosdr  "source" explicitly before restart.

You must ensure that the old block is destroyed.

In order to do this, you must of course drop all references to it within your program, but you must also remove it from the GR flow graph and, if the graph is running, _unlock() the graph_ before creating the new block.

But:

> I am building a sensor using osmosdr which continuously sends data to a server. I want the sensor to be resilient to server restarts, so when a server disconnection is detected, my sensor tries to restart itself.

Instead of recreating the source, why not recreate the connection to the server and keep the source?

--
Kevin Reid                                  <http://switchb.org/kpreid/>


reply via email to

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