I want to sample (aperiodically) a contiguous set of samples from the
based on subsequently analyzed data content of demodulated samples,
processed at a packet level. I have looked at the gr_squelch_base
and/or the general_work routines for doing this.
I am interested in storing and then examining with fine granularity
that occur exactly before the beginning of the first received packet in
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
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
extraction and so on) before I can tell which samples that I actually
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
data samples that occured directly before a particular packet data was
received (gathered by a low-level C++ routine). I had considered
sets of files in the lower level signal processing routines. This would
occur whenever signals were classified as being above noise thresholds
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
processing delays were an issue too. My approach relied on timestamps,
absolute time accuracy is not as important as associating the right set
samples with the right packet data. Essentially, the problem is
communicating state machines, where one machine is working much faster
the other and being told to latch data processed in recent history by
slower machine. The gr_connectivity abstraction doesn’t help me
the scheduling/blocking nature of thread execution between the C++
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
%d it complains of an illegal instruction and dies. Therefore, these
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++
Are there routines to print the I/Q value of received USRP samples that
could use in gr_squelch_base. Is there an equivalent of cfile.py
C++? Ideally, I’d like to pass pointers/references to record/array data
structures from the lower-level to the higher-level routines, rather
using the file system as shared memory.
/ David K.
View this message in context:
Sent from the GnuRadio mailing list archive at Nabble.com.