discuss-gnuradio
[Top][All Lists]
Advanced

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

Help with understanding message pair to var


From: Nik Ansell
Subject: Help with understanding message pair to var
Date: Wed, 23 Nov 2022 08:40:04 +0000

Hello All,

I am writing a block that decodes metadata from an incoming stream and I would like the decoded metadata to be available to other downstream blocks. The best way to do this (I think) is to use the message passing functionality,

My ultimate aim is to receive multiple metadata values via a single message from a c++ block and then to create a custom Python block which will parse the received message and set multiple variables.

For reference I have been looking at the "message pair to var" block, but I am having trouble understanding exactly how the block updates the runtime variable.

I think it has something to do with the callback line (self.callback(new_val)) here: https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/python/blocks/msg_pair_to_var.py and the template make statement here: https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/grc/blocks_msg_pair_to_var.block.yml. However, I am not 100% certain.

Would someone be kind enough to explain to me exactly how the variable is set so I can determine how to write similar code that will update multiple variables. Thanks in advance!

Kind Regards,
Nik

reply via email to

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