2007/5/10, Eric Blossom <[EMAIL PROTECTED]>:
On Thu, May 10, 2007 at 05:02:21PM +0200, Trond Danielsen wrote: > 2007/5/10, Eric Blossom <[EMAIL PROTECTED]>: > >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.
First of all, thank you for you patience with all the questions from a simple user like me! I wouldn't have got very far without the support from this mailing list.
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.
Indeed it would easier if everything was in one block, but I should mention that the acquisition block is defined at python level, and is currently not written in C++. I would really like to keep it at this level, both because of simplicity and for the flexibility it adds. I do believe that the problem that I address is a fairly general one, and something that might be easier with the new mblock. But from what I could see, mblocks are currently only available from C++, or am I missing something? -- Trond Danielsen _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
