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

int d_pdu=cnt_int;
pmt::pmt_t pdu = pmt::mp(d_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?

  • $\begingroup$ 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. $\endgroup$ Oct 18 '17 at 10:34

Well!I've made song changes on the Edit Box module. Let the Edit Box output pdu-type data. Code:

      float d_pda = pmt::to_float(d_msg);     
      pmt::pmt_t pda = pmt::cons(pmt::PMT_NIL, pmt::make_f32vector(8, 

Now I can use pdu_to_tagged_stream module to convert msg to float.And the float data can be shown in Number sink module.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.