I am experimenting with a custom implementation of a "Correlate Access Code Tag" block and I am getting a "Missing a required length tag on port 0 at item #0" when I connect its output to a "Repack Bits" or to a "Tagged Stream to PDU".
Bitstream -> Correlate Access Code Tag -> Repack Bits -> Tagged Stream to PDU
My idea was to examine a stream of bits until I find the access code. Then, read the following bits to get the length of the packet. Finally, knowing the length of the packet I thought I could just add a tag as "packet_length: x ", so that the following blocks understood that they have to pack the next x bits after the tag as a pdu.
However, taking a look at the error I get and reading a little bit, I think I am misunderstanding how to use the tags. So I wanted to ask whether the tagged stream I am producing (with tags at irregular and arbitrary intervals, whenever I find the access code) is really a tagged stream.
My other idea is that maybe the error is in the fact that my "Correlate Access Code Tag" block is outputing samples no matter if they have a tag or not. In that case, some samples without tags are going to reach the blocks that expect tagged streams before one tag arrives. Should I just start outputting samples after I find the access code and therefore make sure that the first sample always has a tag?. If so, wouldn't it be easy to just keep reading bits and build the pdu inside the "Correlate Access Code Tag" block directly?. Also, am I correct if I say that it makes no sense to solve variable length tasks with tags?
If you think that none of the options that I mentioned (tagged streams vs build the pdu within the access code block) are suitable for this variable length task, I would appreciate if you could point me in the right direction.
I am sorry for the noob questions, but I am a little bit stuck with this. Thanks in advance :)