Achilleas,

Sure, this is possible. Through Python all things are possible, to
paraphrase. =)

The message could be, but doesn't have to be, a Gnuradio PMT message passed
via the message passing interface. It is probably easier for your sending
block to simply set a semaphore or condition variable shared by the
toplevel flowgraph and passed into the sending block at construction. The
semaphore is monitored by the toplevel main loop and triggers a
reconfiguration when set.

You could also use the "Message to Variable" block to set a variable
created in the toplevel flowgraph, and then monitor that variable's value
in the toplevel main loop to trigger reconfiguration.

The important thing to remember about the above two approaches is that
thread safety requires that you do the reconfiguration in the thread
context of the toplevel main loop. You cannot trigger a reconfiguration via
a callback as each block runs in its own thread.

You could also try using the "Selector" block to control dataflow through a
static flowgraph without reconfiguring. A pair of such selectors can be
used much the same as filterbank switches in hardware. The selection change
can be triggered via the same "Message to Variable" block.

There are probably more elegant options as well. These are just the ones
that came to mind immediately.

Hope this helps,
Nick

On Wed, Mar 27, 2024 at 9:44 AM Achilleas Anastasopoulos <anas...@umich.edu>
wrote:

> Hi all,
>
> I sent an email earlier but didn't get any response, so I am restating the
> problem in the hope that I will elicit some feedback.
>
> I would like to be able to reconfigure a flowgraph when a message is
> received by a block.
> Is there a mechanism to do that?
>
>
> Here is why I want to do it:
> I am building a system which uses a lot of resources for initial
> acquisition (think eg, of a FH system that tries to acquire the FH pattern,
> which I have implemented by a massively parallel filter bank).
> Once this is done, I want to "turn off" this part of the RX.
> I was thinking that a block will send an appropriate message once
> acquisition is achieved and this will trigger the reconfiguration of a
> flowgraph.
>
> thanks
> Achilleas
>
>
>
>
>
>

Reply via email to