ls ..........................................................................................................................1
Table of Content
s
Version March 20, 2020
RSA7100 Series API Programmer Manuali
Preface
Preface
In the typical API scenario, the custom user program calls functions from the API to fetch data. This is known as a “pull” model.
The user’s program must “pull” the data from the instrument. The RSA7100 Series IQFlow™ streaming API uses both “pull”
and “push” models. The “push” model pushes the data to the user’s code by calling user supplied callback functions. These
callback functions have immediate access to the latest acquired data and can then use it how ever the user has programmed.
Version March 20, 2020
iiRSA7100 Series API Programmer Manual
Function calls
dataCallbackFxnType definition for the user’s data callback function. Called automatically by
Declaration:
Parameters:
data
size
startofBlockSamplesize_t sample number of the first sample in the IQ data block.
streamOverloadbool. True indicates an IQ data block was missed. False indicates no skipped
sampleRate
centerFreq
triggerCallbackFxnType definition for the user’s trigger callback function. Called automatically by
IQDataPtr structure. Provides the IQ pair data block.
size_t of the number of samples in the IQ pair data block.
IQ data blo
triggerS
and trigger time in nanoseconds.
auxData contains a scaling factor. IQ data is structured as an array of 16-bit
signed integer pairs and needs to be scaled by multiplying it with this scaling
factor.
ataQueue is a structure that contains a queue to hold the trigData structure.
TrigD
_t. sample number of trigger.
size
64_t. time associated with trigger in seconds, if a time reference value
uint
is found.
uint64_t time associated with trigger in nanoseconds, if a time reference value
is found.
The function completed successfully.
The function parameter sampleRate is 0 or negative.
est IQ data block with relevant trigger information using a
e, &auxData AuxData);
ck.
tructQueue holds parameters for trigger sample, trigger time in seconds,
Version March 20, 2020
RSA7100 Series API Programmer Manual3
Function calls
USERDATA_GetT
Declaration:
Parameters:
sample
Return values:
Structure of PosixTime:
SecondsPosix time of associated sample.
Nanosecon
Additional information
Should be used after any of the following functions: triggerDataCallbackFxn, USERDATA_GetAuxData, and
USERDAT
PosixTi
imeFromSample()
ds
A_GetTrigData. This will ensure that the most recent time value is used.
me structure will return 0 if there is no valid time reference (PPS, GPS, IRIG-B).
Returns a time s
PosixTime USE
Sample number to obtain the associated Posix time.
The number of nanoseconds that have elapsed since the Posix time of the
associated sample.
tructure for the given sample.
RDATA_GetTimeFromSample(size_t sample);
Version March 20, 2020
4RSA7100 Series API Programmer Manual
Function calls
USERDATA_GetA
Declaration:
Parameters:
AuxData structure defined as follows:
Float version
bool skippedFrame:
bool adcO
bool refF
bool ifP
bool ifP
bool dm
bool gpsStatus;True indicates GPS is on. False indicates GPS is off.
doubl
doub
doub
bool validTimeRef;
TimingReference timeRef;Returns the time source selected. (IRIG-B AM,
uint64_t timeRefSample;Returns the IQ sample number associated with the
int64_t timeRefSeconds;
u
uint64_t timeRefNanoseconds;Returns time of associated time reference sample in
uint64_t startOfBlockSample;Returns the sample of the first IQ pair in data block.
double sampleRate;
double cf;Returns the center frequency of the current
double scalingFactor;
Return Values:
noError:
errorInvalidSharedMemory:
errorTimedOut:The function timed out.
errorNotConnected:The function had no valid c onnection to SignalVu-PC.
Additional Detail:
uxData()
verrange:
reqUnlock:
owerOverloadStartAcq;
owerOverloadRuntime;
aOverflow;
e gpsLat;
le gpsLong;
le gpsAlt;
Fetches a data s
tructure containing metadata for the acquired data.
IQ data is structured as an array of 16-bit signed integer pairs and needs to be
scaled by multiplying it with a scaling factor. The AuxData structure returned by the
USERDATA_Get
ReturnStatus
AuxData() function contains this scaling factor.
USERDATA_GetAuxData(AuxData &auxData);
Version of structure.
True indicates a skipped frame. False indicates no
skipped fr
ame.
True indicates adc over range occurred. False
s no adc overrange.
indicate
True indi
cates that the external reference is unlocked.
IF power overload occurred during instrument
ization.
initial
IF power overload occurred during run time.
dicates dma overflow occurred. False
True in
indicates no dma overflow.
Returns GPS latitude if GPS status is true.
Returns G PS longitude if GPS status is true.
Returns GPS altitude if GPS status is true.
e source used is valid.
Tim
IRIG-B DC, GPS, 1PPS, or PC).
ime, if time source is valid.
t
eturns posix second of associated time reference
R
sample if time source is valid.
nanoseconds past the associated second value, if
time source is valid.
Returns the sample rate of the current acquisition.
acquisition.
Returns the scaling factor for the IQ data. Multiply
the signed 16-bit integer values by this to scale the
data factor.
The function completed successfully.
No data found in auxiliary data.
GFRM_OFF (0) is returned when GNSS source is not selected.
Version March 20, 2020
RSA7100 Series API Programmer Manual5
Function calls
USERDATA_GetD
Declaration:
Parameters:
data
size
startofBlockSamplesize_t sample number of the first sample in IQ data block.
streamOverloadbool. True indicates an IQ data block was missed. False indicates no skipped
sampleRate
centerFreq
Return values:
noError
errorInvalidSizeThe function parameter size is 0.
errorI
errorTimedOutThe function timed out.
errorNotConnectedThe function had no valid connection to SignalVu-PC.
USERDATA_FindData ()Searches for the sample number passed to it in the API’s local circular buffer
Declaration:
Parameters:
da
si
findSample
startofBlockSamplesize_t sample number of the first sample in the IQ data block.
streamOverloadbool. True indicates an IQ data block was missed. False indicates no skipped
sampleRate
centerFreq
Return values:
noError
errorInvalidSizeThe function parameter size is 0.
errorInvalidDataRate
errorStaleTriggerThe function failed to acquire the trigger since the data has already passed.
errorTimedOutThe function timed out while looking for a trigger.
errorNotConnectedThe function had no valid connection to SignalVu-PC.