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