|Subject:||Re: [Discuss-gnuradio] stream tag samples|
|Date:||Fri, 25 Oct 2013 19:40:53 +0000|
Today at 1:02 PM
Is this even possible? Are there any recommendations or tricks to get it to behave this way?
If you decimate by N, you’re getting rid of N-1 out of every N samples. So naturally you would want the tag to stick with the sample that doesn’t get thrown out. Similarly, if you interpolate by M, you introduce M-1 samples into the stream for every input sample; you’d naturally want the tag associated with input sample /i/ to be placed on the first sample of the corresponding batch of M output samples. The propagate_tags method in gnuradio/gnuradio-runtime/lib/block_executor.cc handles this by default. You can override this behavior in your own blocks by calling “set_tag_propagation_policy(TPP_DONT)” in your block’s constructor and then handling tags yourself in your work method.
I don’t think there’s a way to tell GNU Radio blocks derived from sync_decimator and sync_interpolator to quit propagating tags as described above (unless you write blocks that inherit from these classes yourself). It’s the only way that really makes sense when changing rate domains by a rational factor.
|[Prev in Thread]||Current Thread||[Next in Thread]|