I want to sample (aperiodically) a contiguous set of samples from the
USRP
based on subsequently analyzed data content of demodulated samples,
processed at a packet level. I have looked at the gr_squelch_base
routine
and/or the general_work routines for doing this.
I am interested in storing and then examining with fine granularity
signals
that occur exactly before the beginning of the first received packet in
a
particular packet transmission. I don’t need to store too many samples
beforehand, but I want to get all of them in that short window.
Any suggestions on existing code to review or for the best approach to
take
from a run-time perspective? I don’t want to miss samples from the
hardware. However, I need to do some higher-level processing (packet
data
extraction and so on) before I can tell which samples that I actually
want
to store permanently to disk.
I believe that I will need to have some high-level python or C++ code
processing demodulated data and which then continues on to process the
I/Q
data samples that occured directly before a particular packet data was
received (gathered by a low-level C++ routine). I had considered
creating
sets of files in the lower level signal processing routines. This would
occur whenever signals were classified as being above noise thresholds
in
the squelch routine. Then, the higher-level routine could process the
files, erasing the extraneous ones to avoid the disk being filled up.
Some experimentation showed that files got big quickly and that
excessive
processing delays were an issue too. My approach relied on timestamps,
but
absolute time accuracy is not as important as associating the right set
of
samples with the right packet data. Essentially, the problem is
communicating state machines, where one machine is working much faster
than
the other and being told to latch data processed in recent history by
the
slower machine. The gr_connectivity abstraction doesn’t help me
understand
the scheduling/blocking nature of thread execution between the C++
routines.
The code in the general_work and gr_squelch_base routines refers to the
input/output vectors as in[i]/out[i]. If I try to fprintf in[i] using
%f or
%d it complains of an illegal instruction and dies. Therefore, these
must
be C++ pointers or classes … or other…, right? Can anyone give me
example code (or point me to it) to print such values. I am a C++
novice.
Are there routines to print the I/Q value of received USRP samples that
I
could use in gr_squelch_base. Is there an equivalent of cfile.py
written in
C++? Ideally, I’d like to pass pointers/references to record/array data
structures from the lower-level to the higher-level routines, rather
than
using the file system as shared memory.
/ David K.
View this message in context:
http://old.nabble.com/Irregular-sampling-of-input-stream-tp26157717p26157717.html
Sent from the GnuRadio mailing list archive at Nabble.com.