On Wed, May 09, 2007 at 11:14:43PM +0200, Trond Danielsen wrote: > 2007/5/9, Eric Blossom <[EMAIL PROTECTED]>: > >On Wed, May 09, 2007 at 08:12:05PM +0200, Trond Danielsen wrote: > >> Hi everyone, > >> > >> I've got a problem with messages and message queues. The problem is > >> simply that I just cannot figure out how to use them. I tried the > >> simple program that is attached to this email (test.py), and the > >> result is in test.log. If anybody has the time to take a quick look at > >> the code and point me in the right direction, I would be very > >> thankful! > >> > >> Regards, > >> > >> -- > >> Trond Danielsen > > > > > >This looks correct, and in fact you are receiving a payload that's 800 > >bytes long (== 200 * sizeof(float)), so everything looks good. > > > >In reality, you'd want to do something with the payload: > > > > payload = msg.to_string() # return payload as an python string > > > > foo = struct.unpack(format, payload) > > > >See gnuradio-core/src/python/gnuradio/blksimpl/pkt.py for a real-life > >example. > > > >Eric > > Ok, I guess I misunderstood one thing: I assumed that gr.message_sink( > gr.sizeof_float, ...) would set the payload size for each packet to 4 > bytes.
No, that would kill our performance. Eric _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
