USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing GNU Radio "tagged streams" in LabView

GNU Radio has a neat feature that allows you to "tag" a certain sample in your data stream that can be used to flag or signal action in future processing steps.  For example, within an array of data, I could look for a certain marker/sequence/code, and then place a 'tag' on that sample as a hint for a later processing stage.

 

To my knowledge, there is no explicit analog of this in LabView, but I've been thinking about how you might be able to do something similar.  The only idea I had was to create an entirely separate array, say of booleans, that was the same size as my data stream...but that necessitates having to carry around this other array.  Saving a smaller array of indexes of certain events could work, but doesn't really seem like an elegant solution, and could be trouble if I'm purging parts of the data stream as I go.

 

Anyway...has anyone thought about this at all?  I suppose it's not really a USRP thing as much as it is a programing methodolgy.  I know there probably aren't many gnuradio users here (I'm only begin to dabble in GR myself), but was hoping maybe some of the NI application wizards who see on both sides of the wall might have some ideas.

 

Thanks!

---

Brandon

0 Kudos
Message 1 of 4
(4,937 Views)

Just occured to me that you could do this with an array of clusters.  One element in the cluster would be your tag (string, boolean, whatever) and the other you IQ pair.  Implementing this currently would require you to index each element of your fetch, build a cluster element, then array up all those elements again.  Doable...but have to "index down" then "build back up" the array adds a bunch of overhead.

 

Or...maybe you could take the polymorphic cluster data type from the Fetch.vi currently, and somehow add your own tag to that.  That might be more efficient.

 

Here's an even better idea!  (Erik, are you out there! 🙂 ).....Could a future version of the driver just include a cluster element for a "tag"?  Currently it's what...complex sample, t0, and dt....right?  Add us a tag element!!!

 

---

Brandon

0 Kudos
Message 2 of 4
(4,934 Views)
Brandon -

I think you could implement this yourself. The waveform data type has 4 items in the cluster. t0, dt, and the index for the value. Other arbitrary information can be added to the waveform cluster as variants. So yes, I believe the flexibility is there without breaking any existing code.
0 Kudos
Message 3 of 4
(4,929 Views)

Yup!  I'll give it a try!

 

---
BC

0 Kudos
Message 4 of 4
(4,927 Views)