discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Packet-based communication & underrun / Possible solu


From: Mattia Rizzi
Subject: [Discuss-gnuradio] Packet-based communication & underrun / Possible solution?
Date: Wed, 26 Oct 2011 15:30:32 +0200

I want a gnu radio application that send packets (messages) in AIR when pressing ENTER with USRP. Since i don't want any underun on USRP side, i need a block that send zero-filled packets when there's no data to send.
I solved it with a modify of message_source block.
Instead of call delete->head() and wait for a message, i check if there's a new message to send with empty_p(). If there isn't, then zero-fill the data (to the USRP)

The code
    //my code
     if (d_msgq->empty_p())
      {
     memset (out, 0, noutput_items*d_itemsize);
    return noutput_items;
      }
      // end of my code

      d_msg = d_msgq->delete_head();  //blocking call     
      d_msg_offset = 0;

It's okay? There are other ways to do it better? Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]