I have an external device, which sends UDP unicast packet of size 556 bytes. I need to transform each packet to vector of size 270 with uint16 inside. And then I'd like to plot this waveform as time-domain data. Here is a c++ code to do this tranformation :
std::vector<boost::uint8_t> rxPacket(BUFFSIZE*sizeof(std::int16_t) + UPP_TAIL_SIZE_IN_BYTES, 0);
udpBuffer->pop_back(rxPacket);
std::vector<boost::int16_t> rx_data(BUFFSIZE, 0);
memcpy(&rx_data[0], &rxPacket[0], BUFFSIZE*sizeof(std::int16_t));
How to do this using GNU Radio Companion? What block do I have to use to achieve this kind of transformation?