|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] Problem processing BLOB type in a new block for IEEE 802-11 transceiver |
Date: | Fri, 30 Jun 2017 18:52:01 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
Hi Cristian, a blob is not a string. You MUST NOT pmt::pmt_t snrf2 = pmt::intern(std::string(aux)); ever. Blob data is *not* zero-terminated and it's absolutely legal to contain the zero byte. While a std::string might actually contain zero bytes, there's nothing guaranteeing that for the pmt string type. Also: it doesn't really make sense to try and convert something that is not a string to a string type. So, if your Tx App takes arbitrary data, it shouldn't be consuming PMT strings (which actually come with quite a performance hit, by the way, if used to transport info), and if it actually only accepts strings, then you can't just put arbitrary binary data through it. Best regards, Marcus On 06/30/2017 06:13 PM, Cristian
Rodríguez wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |