简体   繁体   中英

How to implement message passing in GNU Radio?

I need to implement message passing, my idea is to make some sort of message source (I inherit from public gr_sync_block ) that works as a controller for another block (it has to send a message each 6 minutes).

I read that is necessary to inherit from gnuradio::block -and by the way, installing grextras is mandatory-. In the .h file I added the #include <gnuradio/block.h> and inherited from block class JDFM_API jdfm_control : public gr_sync_block, public gnuradio::block . I know that I have redefine some things like the gnuradio::block constructor but I dont know what msg_signature is, I also don't get the relation between block's parameters and work parameter, the last thing that I am not sure is if I still can use gnuradio-companion if I create a block like this.

I haven't been able to find a simple example of messages implementation. If anyone can guide me or show me an example, it would be awesome.

Thanks in advance.

This has already been done, by Josh Blum, and is available as part of his GNURadio extras packages on GitHub:

https://github.com/guruofquality/grextras/wiki#wiki-feature-message-passing

Enjoy!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM