On Tue, Jun 14, 2011 at 1:22 PM, <r...@ee.ucla.edu> wrote:

> Hi,
>
> I have looked at the python examples tagging where a trigger signal is used
> to insert "burst" tags at various stream sample locations. However, what I
> would like to do is add a tag at the first sample of a packet. The tag will
> be called "send_at_time" and will have a value of time at which to
> send. Following questions arise (I am assuming the use of send_pkt() used in
> examples in digital):
>
> 1. Is it possible to tag the first bit?  For e.g. can I modify
> "message_from_string" called in pkt.py (if I can find the source for it)
> msg = gr.message_from_string(pkt,time_to_send)
>
> 2. If tagging bits is not easy to do, is there some property of stream
> samples that indicates "first sample of a packet"?
>
> Thanks,
> Ragh
>

Ragh,
Yes, the stream tagging system was designed pretty much exactly for this
purpose. What you'll need to do is create a new GNU Radio block that looks
for the start of packet, and when it finds it, adds a tag to the stream.

Have a look at  gnuradio-core/src/lib/runtime/qa_block_tags.cc for an idea
of how the stream tags work (that is, how to add them to the stream and how
to get them).

Tom
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to