Dynamically updating vector sources

Hello!

I have a question regarding vector_source_c:

After the
src = gr.vector_source_c (xxx, 1) where xxx is a list of samples
self.connect (src, dst) where dst is the ursp
and having started the flow (fg.start())

is it possible to change/append/add values to the complex vector (“src”
in the previous lines) in a way of dynamically changing what it is sent
to the usrp?

For the big picture, this what I am trying to do:
I want to build a simple UHF rfid reader, partially implementing the EPC
G2C1 standard. Basically, only the part used to read the ID from a
single tag (no writing on the tag, no multiple tags).
The encoding is PIE and the modulation PR-ASK. The commands needed to
read a single tag are just 4, having between 8 and ~44 bits each.

My initial idea was to build vectors containing the baseband signal for
each of the 4 commands, and then use those vectors as source for the
uspr.sink.

I actually did this: I created two lists that represent the bit 0 and
bit 1 (each one containing the samples that represent bit 0, resp. bit
1, as PIE-encoded and PR-ASK-modulated with sampling rate at 1MS/s), and
put together those lists to compose the individual commands (which are
simply a sequence of bits).
Then, I properly concatenated those commands (“properly” = respecting
the order and timing of the standard), created the vector source, and
linked to the usrp sink (as shown above).
The sequence is correctly transmitted (so, the baseband signal contained
in the vector source is up-mixed and sent out by the usrp) and the tag
is actually responding back.

Now, I would like to decide which command to send (and set its fields)
and a step-by-step mode. That is, set and send command A, then do
something (e.g., receiving a tag response), set and send B (e.g.,
setting it according to the previous tag response), and so on, instead
of composing the entire communication at once with possibility of
interacting.

Thanks!!

Davide

On Thu, May 14, 2009 at 04:09:06PM +0200, Davide Zanetti wrote:

Hello!

I have a question regarding vector_source_c:

Hi Davide -

I don’t recommend using vector_source_* in any live code. It’s mainly
for unit testing.

What you’re trying to do is more likely to be done using a message
queue, you should check that out.

Cheers
MB

Martin B. wrote:

for unit testing.

What you’re trying to do is more likely to be done using a message
queue, you should check that out.

Cheers
MB

Hi Martin,

thanks for the tip. I’ll look at it.

Cheers,
Davide