discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] message queues - Inconsistent data problem


From: Jérôme Nokin
Subject: [Discuss-gnuradio] message queues - Inconsistent data problem
Date: Sun, 29 Jun 2014 16:08:03 +0200

Hello,


I'm using Gnuradio version: v3.7.2.1-62 and am facing a strange issue
with message queuing.

I wrote a testing "hier" block which holds 2 message blocks (source + sink).

---------------
#create blocks
msgq_in = gr.msg_queue(2)
msgq_out = gr.msg_queue(2)
msg_sink = blocks.message_sink(gr.sizeof_char, msgq_in, False)
msg_source = blocks.message_source(gr.sizeof_char, msgq_out)

#connect
self.connect(self, msg_sink)
self.connect(msg_source, self)
---------------


The hier block run a thread which read messages from the message_sink
and send them to message_source. Nothing more.
The final flow graph is "File source" -> "Hier block" -> "File Sink"

The full python code is here:
http://pastebin.com/AfFhEGQ6

The problem:

/tmp/source contains "abcdefghijklmnopqrstuvwxz0123456789" + new line:

$ hexdump -C  /tmp/source
00000000  61 62 63 64 65 66 67 68  69 6a 6b 6c 6d 6e 6f 70  |abcdefghijklmnop|
00000010  71 72 73 74 75 76 77 78  7a 30 31 32 33 34 35 36  |qrstuvwxz0123456|
00000020  37 38 39 0a                                       |789.|

When I run the Gnuradio script for a few seconds, I expect to found
the following in /tmp/sink:

$ head /tmp/sink
abcdefghijklmnopqrstuvwxz0123456789
abcdefghijklmnopqrstuvwxz0123456789
abcdefghijklmnopqrstuvwxz0123456789
abcdefghijklmnopqrstuvwxz0123456789
abcdefghijklmnopqrstuvwxz0123456789
[...]

However, from time to time, bytes are missing:

$ grep -v abcdefghijklmnopqrstuvwxz0123456789 /tmp/sink
abcdefghijklmnopqrstuvwxz012qrstuvwxz0123456789
abcdeqrstuvwxz0123456789
abcklmnopqrstuvwxz0123456789
abcdefghijklmnopqrstuvwxz01234stuvwxz0123456789
abcdefghijklmnopqrstuvwx


Am I doing something wrong ?

Thank you very much for your feedback.

Regards,
Jerome



reply via email to

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