GNU Radio code and data type conversion

I am a GNU Radio beginner, and I use the following code to make the block's output-port output a pmt data:

message_port_register_out(pmt::mp("fer"));
...
int d_pdu=cnt_int;
pmt::pmt_t pdu = pmt::mp(d_pdu);
message_port_pub(pmt::mp("fer"),pdu);


And the "QT GUI Message Edit Box" only can show me that date in type 'int'. But I can't use it as an integer data. How to change its data type? Is there a block that can make pmt into int?

• I'm surprised – the QT Gui Message Edit Box should be able to be set to different types, and is set to "String" by default. – Marcus Müller Oct 18 '17 at 10:34

      float d_pda = pmt::to_float(d_msg);