discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Question about writing message handling blocks


From: Ellie White
Subject: Re: Question about writing message handling blocks
Date: Fri, 10 Jul 2020 16:16:50 -0400

Hi Christoph, Jeff --

Thanks so much for the very helpful replies. So I ended up following
Christoph's suggestion to run everything out of the message handler
function, and that works well for my purposes. Really appreciate the
feedback from both of you!

Enjoy your weekend, and stay safe.

Cheers,
Ellie


On Thu, Jul 9, 2020 at 1:57 PM Christoph Mayer <hcab14@gmail.com> wrote:
>
> Ellie,
>
> not sure I completely understand what you are trying to do, but why
> don't you do everything in the message handler of your control block?
> To me it looks like there is no need for having global variables and
> for setting member variables in the init method.
>
> If you do everything in the method handler there should be no problems
> with initialization order: whenever a message is being received (this
> is non-deterministic) the according actions are performed.
>
> Cheers
> Christoph
>
>
> On Thu, Jul 9, 2020 at 6:00 PM Ellie White <elliewhite1420@gmail.com> wrote:
> >
> > Hey all,
> >
> > I've got a question about message handling in GNU Radio. I'm working on 
> > developing an out of tree module for controlling the Allen Array, and I'm 
> > currently working on a set of two blocks which are supposed to interact via 
> > messages, control.py and trackscan.py; note that "control" receives the 
> > messages and "trackscan" receives them. The code can be found here (please 
> > forgive the messiness, I've not had a chance to tidy it up yet): 
> > https://github.com/SETIatHCRO/gr-ata/tree/master/python
> >
> > I'm struggling because I can't seem to figure out why it is that when I put 
> > both of these blocks in a flowgraph, connect them, and run it -- the start 
> > function for the "control" blockseemingly gets called *before* the message 
> > handler function, and thus it acts like the obs_info dictionary is empty. 
> > (https://github.com/SETIatHCRO/gr-ata/blob/master/python/control.py#L54)  
> > Does anyone have any advice on this? This is my first time writing 
> > message-passing blocks so I am unfamiliar with the process. If I need to 
> > clarify any of the above please let me know and I'd be glad to. Thanks so 
> > much for your time and help -- I appreciate it!
> >
> > Cheers,
> > Ellie
> >
> > --
> > Ellie White
> > Co-Director, Open Source Radio Telescopes
> > Student at Marshall University
> > 304-654-9381
> > www.catseyeenterprises.net



--
Ellie White
Co-Director, Open Source Radio Telescopes
Student at Marshall University
304-654-9381
www.catseyeenterprises.net



reply via email to

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