|
From: | Price, Rodney D. |
Subject: | RE: EXTERNAL: Tags in Embedded Python Blocks |
Date: | Tue, 24 May 2022 17:44:59 +0000 |
Eli, Forgive me for asking a question in reply to your question, but how did you get GNU Radio 3.9.3 to run on a Mac? I’m struggling to get it running on my Mac with the new ARM chip (see my post
from yesterday). Thanks, -Rod From: Discuss-gnuradio [mailto:discuss-gnuradio-bounces+price-rodney=zai.com@gnu.org]
On Behalf Of Eli Baum Hello, We are implementing a custom Python block which reads an input stream and sends Messages when a certain Tag is seen. The message-passing component is working fine, but there seems to be an issue with the Tags. The relevant work() function looks like this (based on the
tutorial): def work(self, input_items, output_items): in0 = input_items[0] out = output_items[0]
tags = self.get_tags_in_window(0, 0, len(in0)) # ... process tags ... # ... send message ... out[:] = in0 return len(out) However, this only works for the first few tags. We’ll get around a dozen tags being returned by self.get_tags_in_window() in the first few calls to work(), and then nothing. However, with a Tag Debug block,
we have confirmed that tags are in fact still being produced by the upstream block. (For our test file, we expect a few hundred tags total; all of the tags are of the same format.) Tags are even still propagating through the block (i.e. according to a Time
Sink). But the python block itself can’t see them. Using self.get_tags_in_range instead appears to work, interestingly – even though get_tags_in_window just calls get_tags_in_range under the hood. Are we calling get_tags_in_window incorrectly? Or are there known issues with this function in python? This is on Mac OS 12.4, Gnuradio 3.9.3. Thank you, --- Eli Baum Electrical Engineer N231 Naval Enterprise & Sea Systems The MITRE Corporation This message is intended only for the use of the individual or entity to which it is addressed and may contain ZETA Associates confidential or proprietary information. If you are not the intended recipient, any use, dissemination, or distribution of this communication is prohibited. If you have received this communication in error, please notify the sender and delete all copies. |
[Prev in Thread] | Current Thread | [Next in Thread] |