Friday, May 27, 2011

Re: [Discuss-gnuradio] how to trigger dynamic reconfiguration with lock/disconnect

So you have to reach some state that makes you want to reconfigure, e.g.
you finished scanning some particular band or some time limit is
reached. Whenever you reach the point that you want to reconfigure, set
a flag, then check for the flag in your main application.

My typical program flow is

application
top block
hier block

So in the application level is where you want to test for a flag of some
kind. This is the simplest way that I know of. You can certainly do it
with threads, but that seems trickier.

Scott

Johannes Schmitz wrote:
> Hi Scott,
>
>
>> This works well during testing. Once you get some kind of protocol or some
>> series of steps that you want to do, you can just test a flag, and whenever
>> your block finishes set it to true, then reconfigure.
>>
>
> What do you mean with "your block finishes" ? How do you implement this flags?
>
> I am now using a thread to implement the state machine.
> I am using member variables in the C++ blocks to implement the flags
> or to hand over certain signals/values to the control thread.
>
> Johannes
>

--
Scott Johnston
MIT Lincoln Laboratory
244 Wood Street, Lexington, MA 02420-9108
(781) 981-8196
scott.johnston@LL.mit.edu


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment