Message strobe sends a PMT message of STRING type (without car and cdr, just message_port_pub(pmt::mp("strobe"), pmt.intern("12345678")); ), then I need to send from the port Message out a PMT message of STRING type.
But I receive the message in a BLOB type. I was trying all types of methods, but I can't convert from BLOB to String If I send BLOB it doesn't work.
The message comes in the cdr of the PMT, so i tried with different versions of this codeBut I receive the message in a BLOB type. I was trying all types of methods, but I can't convert from BLOB to String If I send BLOB it doesn't work.
pmt::pmt_t blob(pmt::cdr(msg));
const char *aux = reinterpret_cast<const char *>(pmt::blob_data(blob));
pmt::pmt_t snrf2 = pmt::intern(std::string(aux));
std::cout << "Es blob " <<std::string(aux)<< std::endl;
message_port_pub(pmt::mp("
No comments:
Post a Comment