[Top][All Lists]

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

Re: [Discuss-gnuradio] Problem with messages and msg_queue

From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Problem with messages and msg_queue
Date: Thu, 10 May 2007 13:08:28 -0700
User-agent: Mutt/1.5.9i

On Thu, May 10, 2007 at 05:02:21PM +0200, Trond Danielsen wrote:
> 2007/5/10, Eric Blossom <address@hidden>:
> >On Thu, May 10, 2007 at 10:24:04AM +0200, Trond Danielsen wrote:
> >>
> >> Ok, I read from pkt.py that to finish a packet, I just append
> >> gr.message(1) at the tail of the message queue, but is there a simple
> >> way to do this if I just want to send packet of fixed size, where the
> >> payload comes from a flow graph?
> >
> >Hi Trond,
> >
> >The gr.message(1) isn't to end a packet, it's to tell the scheduler
> >that there's no more data coming.
> >
> >I'm not exactly sure I'm following what you are trying to do.
> >However, I think that if you follow through the logic in
> >gnuradio-examples/python/digital/tunnel.py you'll see a way to send
> >and receive packets (fixed or variable length) between python and the
> >flow graph.
> >
> >Eric
> >
> Okay, I will try to describe my problem a little better. I have a
> block that estimates some properties on a received signal: Frequency
> and phase. Lets call the block acquisition. The acquisition block
> outputs the estimates at 1kHz. Now what I want to do is grab these
> estimates and use them to update the center frequency and code delay
> in another block, lets call it tracking :).
> I have tried to use probe_signal_f, but this does not work because the
> acquisition and tracking block must be synchronized.

The easy way is to put them in the same block (Yes, I know that wasn't
the answer you were looking for.)  Or you could try using a
message queue and messages between them.  You don't have to use
gr_message_sink.  You could have your estimator block create mesages
(of whatever format it likes) and insert them into a message queue
that was handed to it, say in the constructor.


reply via email to

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