discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] time tags for transition time using USRPs


From: Henning Bredenberg
Subject: Re: [Discuss-gnuradio] time tags for transition time using USRPs
Date: Wed, 27 Apr 2016 15:22:20 +0200
User-agent: Horde Application Framework 5

Hi Martin,

the time tag 'tx_time' tells the USRP when to transmit - so far so good. So I don't need any delay blocks because the USRP sink realizes the delay, right? Assume i want to add a propagation delay of 240ms: Setting 'tx_time' at the begin of the burst to 240ms will realize that?


Do I tag the burst in the code of the PDU-generator using add_item_tag() or is there another block who does it after the generator (I thought the pdu_to_tagged_stream - block tags the packet)?

The crucial code in the random_pdu_impl.cc is:
[...]
      // pick a random vector length
      int len = d_rvar();
      len = std::max(d_length_modulo, len - len%d_length_modulo);

      // fill it with random bytes
      std::vector<unsigned char> vec(len);
      for (int i=0; i<len; i++)
        vec[i] = ((unsigned char) d_bvar()) & d_mask;

      // send the vector
      pmt::pmt_t vecpmt(pmt::make_blob(&vec[0], len));
      pmt::pmt_t pdu(pmt::cons(pmt::PMT_NIL, vecpmt));

      message_port_pub(PDU_PORT_ID, pdu);
[...]

My idea then is to use add_item_tag here with 'tx_time' as key for the output vector "PDU_PORT_ID", i.d. "pdus" in GRC.

An additional question: How do I set a data rate that determines how long a packet needs to be transmitted? Is that done by USRP as well?

By now the time sink just shows a blue, continuous signal as seen in the attached picture.

Best regards,
Henning

Attachment: packet_length.png
Description: PNG image


reply via email to

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