discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Question on making OOT Tag Stream modules


From: Jeff Long
Subject: Re: Question on making OOT Tag Stream modules
Date: Sun, 21 Jun 2020 20:05:18 -0400

George - please reply to the list, not individuals. You'll get your problem solved faster that way, too.

You can try out your block with a vector source in GRC https://wiki.gnuradio.org/index.php/Vector_Source.

Also, the existing QA code for the vector source should give you an idea how to use it in Python. Most of the QA code is written in Python rather than C++.

https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/python/blocks/qa_vector_sink_source.py



On Sun, Jun 21, 2020 at 7:48 PM George Edwards <gedwards.eng@gmail.com> wrote:
Hi Jeff,

Thanks for the response. Please bear with me a little because of my newness to gnuradio.
I looked up vector source and tagging and found the following for a tagged list: [int offset,  pmt key, pmt value, pmt srcid]

In my case my input vector is:: src_data = array([1, 0, 1, 0,...1,,1]) with 10 values. Do I write the syntax as follows for the QA test code:
gr::tag_t(int 0, pmt "packet_len", pmt 10, pmt src_data)???

Thanks for the help.

Regards,
George

On Sun, Jun 21, 2020 at 5:09 PM Jeff Long <willcode4@gmail.com> wrote:
If you are trying to create a test vector to feed into a block that needs a tag named "length", you can use a Vector Source. That block allows you to define a vector of data along with tags.

On Sun, Jun 21, 2020 at 6:38 PM George Edwards <gedwards.eng@gmail.com> wrote:
Hello,

New to gnuradio and I am making an OOT CRC8 module to take a tagged bit stream (1's and 0's) and generate the CRC and attach the CRC to the end of the data and pass it on to the next block. Also, I am encapsulating both the generator and check sum in same block using a boolean variable "check" to determine operation. 

In QA test I get the following error:
gr::log :FATAL: my_crc8_bb0 - Missing a required length tag on port 0 at item #0.
thread [thread-per-block[1] < block my crc8_bb(2)>] Missing length tag

I modified the QA test vector by writing the length of the input string of 1's and 0's as the first element in the input data array, but it gave the same error as typed above. 

Questions:
Q1. How do I write in the input test vector, or what do I add to what I already have to make the module aware of the tag length?

Q2. In the my_crc8_bb_impl.cc file in the tagged stream method, I specified the tag name as "packet_len". In the signal processing in this .cc file, I assume the value of packet_len is available to me for use as a parameter and I used it. Are there some other things I need to do in this "my_crc8_bb_impl.cc file" to make the module more aware of input tagged stream data (maybe I am not binding "packet_len" properly)?

I greatly appreciate any help!

Regards,
George

reply via email to

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