GNU Radio - How to send PMT string type to debug block in Python Block

52 Views Asked by At

I'm attempting to send a Python string, basically for debug purposes, from a GNU Radio Python Block to a Message Debug block. Whilst I can do this easily for an integer using a PMT pair, I can't figure out how to send a simple string. I've gone over the documentation of course, but I'm having trouble interpreting in. There is no simple complete example I can find.

I've edited this question eliminating my non-functional code which was probably not helpful.

So let's say I have a debug port set up in the INIT section of a Python Block as follows

        self.portName1 = "debugOutput"
        self.message_port_register_out(pmt.intern(self.portName1))

and I have a Python string variable in the "work" function

        test_str = "This is a test"

what code do I need to send this string to the Debug Block?

0

There are 0 best solutions below