[Discuss-gnuradio] How to use gr.message_sink and gr.message_source
From:
Sajjad Sarwar
Subject:
[Discuss-gnuradio] How to use gr.message_sink and gr.message_source
Date:
Mon, 23 Mar 2009 11:02:04 +0000
Hi, I am new to gnuradio and trying to understand how gr.message_sink and gr.message_source work. I want to convert a byte stream (read from a file) into a message of 50 bytes and store it in a queue. Then i want to retrieve that message, convert it back to byte stream and write it to another file to make the copy of original file.
Here is the code I have written for this but its not working. Perhaps I am misunderstanding how to convert a byte stream into a "message":
#!/usr/bin/env python from gnuradio import gr from gnuradio import audio