# Writing Messages to a File

**URL:** <https://www.ruby-forum.com/t/writing-messages-to-a-file/242991>\
**Category:** GNU Radio\
**Created:** [August 13, 2015, 5:07pm UTC](https://www.ruby-forum.com/t/writing-messages-to-a-file/242991 "2015-08-13T17:07:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [August 13, 2015, 5:07pm UTC](https://www.ruby-forum.com/t/writing-messages-to-a-file/242991/1 "2015-08-13T17:07:14Z")

</div>

Does anyone have methods to write messages to a file? My use case is  
tagging baseband sample numbers of the start/end of WLAN packets in  
gr-ieee80211. It looks like typically people create custom blocks to  
deal with this such as messages to Wireshark. For general metadata to  
go along with blobs, I think it makes sense to have a (blob,dictionary)  
pmt tuple as the message, much like gr-ieee80211. I’ve implemented a  
file message sink block based on this premise which takes a list of  
dictionary keys in such a message and writes them to a csv file. If  
anyone is interested I can roll it up into a feature request on  
[gnuradio.org](http://gnuradio.org).

> **[GitHub - garverp/gnuradio at msg\_file\_sink](https://github.com/garverp/gnuradio/tree/msg_file_sink)**
>
> msg\_file\_sink

[https://github.com/garverp/gnuradio/tree/msg\_file\_sink](https://github.com/garverp/gnuradio/tree/msg_file_sink)

PWG

---

<div class="post-metadata">

**Author:** ![uddun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/f19dbf/32.png) [@uddun](https://www.ruby-forum.com/u/uddun)\
**Post date:** [August 13, 2015, 7:16pm UTC](https://www.ruby-forum.com/t/writing-messages-to-a-file/242991/2 "2015-08-13T19:16:21Z")

</div>

I’d be very interested in seeing in such a block. I wonder if it might  
be worth generalizing the file sink block somehow…

On Thu, Aug 13, 2015 at 8:06 AM, Paul G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> [GitHub - garverp/gnuradio at msg\_file\_sink · GitHub](https://github.com/garverp/gnuradio/tree/msg_file_sink)
> 
> PWG
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

–  
GDB has a ‘break’ feature; why doesn’t it have ‘fix’ too?
