18 #define SP_API __declspec(dllexport)
25 typedef signed char int8_t;
26 typedef short int16_t;
28 typedef long long int64_t;
29 typedef unsigned char uint8_t;
30 typedef unsigned short uint16_t;
31 typedef unsigned int uint32_t;
32 typedef unsigned long long uint64_t;
37 #define SP_DEPRECATED(comment) __declspec(deprecated(comment))
40 #define SP_API __attribute__((visibility("default")))
43 #define SP_DEPRECATED(comment) __attribute__((deprecated))
45 #define SP_DEPRECATED(comment) comment
55#define SP_MAX_DEVICES (9)
58#define SP_MAX_REF_LEVEL (20.0)
60#define SP_AUTO_ATTEN (-1)
62#define SP_MAX_ATTEN (6)
65#define SP_MIN_FREQ (9.0e3)
67#define SP_MAX_FREQ (15.0e9)
70#define SP_MIN_SWEEP_TIME (1.0e-6)
72#define SP_MAX_SWEEP_TIME (100.0)
75#define SP_REAL_TIME_MIN_SPAN (200.0e3)
77#define SP_REAL_TIME_MAX_SPAN (40.0e6)
79#define SP_REAL_TIME_MIN_RBW (2.0e3)
81#define SP_REAL_TIME_MAX_RBW (1.0e6)
84#define SP_MAX_IQ_DECIMATION (8192)
87#define SP_MAX_IQ_SWEEP_STEPS (1000)
90#define SP_MIN_FAN_SET_POINT (0.0)
92#define SP_MAX_FAN_SET_POINT (60.0)
99#define SP_MAX_SWEEP_QUEUE_SZ (16)
1231 double *actualStartFreq,
double *binSize,
int *sweepSize);
1260 double *binSize,
int *frameWidth,
int *frameHeight,
double *poi);
1351 float *sweepMax,
int *frameCount, int64_t *nsSinceEpoch);
1392SP_API
SpStatus spGetIQ(
int device,
void *iqBuf,
int iqBufSize,
double *triggers,
int triggerBufSize,
1393 int64_t *nsSinceEpoch,
SpBool purge,
int *sampleLoss,
int *samplesRemaining);
1519 double *latitude,
double *longitude,
double *altitude,
char *nmea,
int *nmeaLen);
SpTriggerEdge
Definition: sp_api.h:289
@ spTriggerEdgeFalling
Definition: sp_api.h:293
@ spTriggerEdgeRising
Definition: sp_api.h:291
SP_API SpStatus spWriteToGPS(int device, const uint8_t *mem, int len)
SpReference
Definition: sp_api.h:311
@ spReferenceUseExternal
Definition: sp_api.h:315
@ spReferenceUseInternal
Definition: sp_api.h:313
SP_API SpStatus spIQSweepListStartSweep(int device, int pos, void *dst, int64_t *timestamps)
SpStatus
Definition: sp_api.h:104
@ spInternalFlashErr
Definition: sp_api.h:106
@ spDeviceNotFoundErr
Definition: sp_api.h:153
@ spFramingErr
Definition: sp_api.h:136
@ spTempDrift
Definition: sp_api.h:165
@ spInternalFileIOErr
Definition: sp_api.h:108
@ spMaxDevicesConnectedErr
Definition: sp_api.h:115
@ spUncalData
Definition: sp_api.h:169
@ spADCOverflow
Definition: sp_api.h:167
@ spBootErr
Definition: sp_api.h:131
@ spNoError
Definition: sp_api.h:156
@ spConnectionLostErr
Definition: sp_api.h:142
@ spNullPtrErr
Definition: sp_api.h:146
@ spSettingClamped
Definition: sp_api.h:159
@ spInvalidDeviceErr
Definition: sp_api.h:144
@ spInvalidCalData
Definition: sp_api.h:178
@ spAllocationErr
Definition: sp_api.h:113
@ spSweepAlreadyActiveErr
Definition: sp_api.h:129
@ spCPULimited
Definition: sp_api.h:171
@ spInvalidConfigurationErr
Definition: sp_api.h:122
@ spInvalidParameterErr
Definition: sp_api.h:148
SP_API SpStatus spGetCalDate(int device, uint32_t *lastCalDate)
SP_API SpStatus spSetRealTimeCenterSpan(int device, double centerFreqHz, double spanHz)
SP_API SpStatus spSetRealTimeScale(int device, SpScale scale, double frameRef, double frameScale)
SP_API SpStatus spSetIQQueueSize(int device, int units)
SP_API SpStatus spSetIQSoftwareFilter(int device, SpBool enabled)
SP_API SpStatus spCloseDevice(int device)
SpDataType
Definition: sp_api.h:279
@ spDataType16sc
Definition: sp_api.h:283
@ spDataType32fc
Definition: sp_api.h:281
SpMode
Definition: sp_api.h:205
@ spModeRealTime
Definition: sp_api.h:211
@ spModeAudio
Definition: sp_api.h:217
@ spModeIdle
Definition: sp_api.h:207
@ spModeIQStreaming
Definition: sp_api.h:213
@ spModeIQSweepList
Definition: sp_api.h:215
@ spModeSweeping
Definition: sp_api.h:209
SP_API SpStatus spSetSweepWindow(int device, SpWindowType window)
SpPowerState
Definition: sp_api.h:195
@ spPowerStateStandby
Definition: sp_api.h:199
@ spPowerStateOn
Definition: sp_api.h:197
SP_API SpStatus spGetGPSInfo(int device, SpBool refresh, SpBool *updated, int64_t *secSinceEpoch, double *latitude, double *longitude, double *altitude, char *nmea, int *nmeaLen)
SP_API SpStatus spSetGPSTimebaseUpdate(int device, SpBool enabled)
SP_API SpStatus spWriteUARTDirect(int device, uint8_t data)
SP_API SpStatus spSetSweepScale(int device, SpScale scale)
SP_API SpStatus spSetIQSweepListSampleCount(int device, int step, uint32_t samples)
SP_API SpStatus spSetReference(int device, SpReference reference)
SP_API SpStatus spSetIQSampleRate(int device, int decimation)
SP_API SpStatus spIQSweepListFinishSweep(int device, int pos)
SP_API SpStatus spSetFanSetPoint(int device, float setPoint)
SP_API const char * spGetErrorString(SpStatus status)
SP_API SpStatus spGetIQ(int device, void *iqBuf, int iqBufSize, double *triggers, int triggerBufSize, int64_t *nsSinceEpoch, SpBool purge, int *sampleLoss, int *samplesRemaining)
SP_API SpStatus spSetIQExtTriggerEdge(int device, SpTriggerEdge edge)
SP_API SpStatus spGetReference(int device, SpReference *reference)
SP_API SpStatus spGetGPSState(int device, SpGPSState *GPSState)
SP_API SpStatus spSetIQTriggerSentinel(double sentinelValue)
SP_API SpStatus spSetAudioCenterFreq(int device, double centerFreqHz)
SpGPIOFunction
Definition: sp_api.h:321
@ SpGPIOFunctionUARTSweep
Definition: sp_api.h:337
@ SpGPIOFunctionLogicOutLow
Definition: sp_api.h:331
@ SpGPIOFunctionUARTDirect
Definition: sp_api.h:335
@ SpGPIOFunctionLogicOutHigh
Definition: sp_api.h:333
@ SpGPIOFunctionUARTDoppler
Definition: sp_api.h:339
@ SpGPIOFunctionTrigIn
Definition: sp_api.h:327
@ SpGPIOFunctionPPSOut
Definition: sp_api.h:329
SP_API SpStatus spAbort(int device)
SP_API SpStatus spOpenDevice(int *device)
SP_API SpStatus spSetAudioFilters(int device, double ifBandwidth, double audioLpf, double audioHpf)
SP_API SpStatus spSetRefLevel(int device, double refLevel)
SP_API SpStatus spSetSweepCenterSpan(int device, double centerFreqHz, double spanHz)
SP_API SpStatus spGetDeviceList(int *serials, int *deviceCount)
SP_API SpStatus spGetRealTimeParameters(int device, double *actualRBW, int *sweepSize, double *actualStartFreq, double *binSize, int *frameWidth, int *frameHeight, double *poi)
SP_API SpStatus spIQSweepListGetSweep(int device, void *dst, int64_t *timestamps)
SP_API SpStatus spGetFanSettings(int device, float *setPoint, float *voltage)
SP_API SpStatus spGetFirmwareVersion(int device, int *major, int *minor, int *revision)
SpWindowType
Definition: sp_api.h:259
@ spWindowBlackman
Definition: sp_api.h:265
@ spWindowRect
Definition: sp_api.h:271
@ spWindowHamming
Definition: sp_api.h:267
@ spWindowFlatTop
Definition: sp_api.h:261
@ spWindowNutall
Definition: sp_api.h:263
@ spWindowGaussian6dB
Definition: sp_api.h:269
SP_API SpStatus spGetGPSHoldoverInfo(int device, SpBool *usingGPSHoldover, uint32_t *lastHoldoverTime)
SP_API SpStatus spSetSweepDetector(int device, SpDetector detector, SpVideoUnits videoUnits)
SP_API SpStatus spSetIQDataType(int device, SpDataType dataType)
SP_API SpStatus spSetRealTimeRBW(int device, double rbw)
SP_API SpStatus spGetUARTBaudRate(int device, float *rate)
SpDetector
Definition: sp_api.h:223
@ spDetectorMinMax
Definition: sp_api.h:227
@ spDetectorAverage
Definition: sp_api.h:225
SpAudioType
Definition: sp_api.h:345
@ spAudioTypeFM
Definition: sp_api.h:349
@ spAudioTypeLSB
Definition: sp_api.h:353
@ spAudioTypeCW
Definition: sp_api.h:355
@ spAudioTypeUSB
Definition: sp_api.h:351
@ spAudioTypeAM
Definition: sp_api.h:347
SP_API SpStatus spGetIQCenterFreq(int device, double *centerFreqHz)
SP_API SpStatus spGetCurrentMode(int device, SpMode *mode)
SP_API SpStatus spOpenDeviceBySerial(int *device, int serialNumber)
SP_API SpStatus spSetIQSweepListSteps(int device, int steps)
SP_API SpStatus spSetIQSweepListRef(int device, int step, double level)
SP_API SpStatus spGetSweep(int device, float *sweepMin, float *sweepMax, int64_t *nsSinceEpoch)
SP_API const char * spGetAPIVersion()
SP_API SpStatus spSetAudioFMDeemphasis(int device, double deemphasis)
SP_API SpStatus spGetIQSweepListSteps(int device, int *steps)
SP_API SpStatus spGetIQParameters(int device, double *sampleRate, double *bandwidth)
SP_API SpStatus spSetSweepGPIOSwitchingDisabled(int device)
SP_API SpStatus spGetRefLevel(int device, double *refLevel)
SP_API SpStatus spSetUARTBaudRate(int device, float rate)
SP_API SpStatus spSetIQBandwidth(int device, double bandwidth)
SP_API SpStatus spSetAudioType(int device, SpAudioType audioType)
SP_API SpStatus spGetSerialNumber(int device, int *serialNumber)
SP_API SpStatus spSetIQSweepListAtten(int device, int step, int atten)
SP_API SpStatus spSetIQSweepListCorrected(int device, SpBool corrected)
SP_API SpStatus spConfigure(int device, SpMode mode)
SpScale
Definition: sp_api.h:233
@ spScaleFullScale
Definition: sp_api.h:239
@ spScaleLin
Definition: sp_api.h:237
@ spScaleLog
Definition: sp_api.h:235
SP_API SpStatus spSetPowerState(int device, SpPowerState powerState)
SpGPSState
Definition: sp_api.h:299
@ spGPSStateLocked
Definition: sp_api.h:303
@ spGPSStateDisciplined
Definition: sp_api.h:305
@ spGPSStateNotPresent
Definition: sp_api.h:301
SP_API SpStatus spSetIQCenterFreq(int device, double centerFreqHz)
SP_API SpStatus spGetAttenuator(int device, int *atten)
SP_API SpStatus spGetSweepParameters(int device, double *actualRBW, double *actualVBW, double *actualStartFreq, double *binSize, int *sweepSize)
SpVideoUnits
Definition: sp_api.h:245
@ spVideoPower
Definition: sp_api.h:251
@ spVideoLog
Definition: sp_api.h:247
@ spVideoSample
Definition: sp_api.h:253
@ spVideoVoltage
Definition: sp_api.h:249
SP_API SpStatus spSetRealTimeDetector(int device, SpDetector detector)
SP_API SpStatus spGetRealTimeFrame(int device, float *colorFrame, float *alphaFrame, float *sweepMin, float *sweepMax, int *frameCount, int64_t *nsSinceEpoch)
SP_API SpStatus spSetIQSweepListDataType(int device, SpDataType dataType)
SP_API SpStatus spSetSweepCoupling(int device, double rbw, double vbw, double sweepTime)
SP_API SpStatus spSetIQSweepListFreq(int device, int step, double freq)
SP_API SpStatus spSetSweepStartStop(int device, double startFreqHz, double stopFreqHz)
SP_API SpStatus spIQSweepListGetCorrections(int device, float *corrections)
SP_API SpStatus spGetPowerState(int device, SpPowerState *powerState)
SpBool
Definition: sp_api.h:185
@ spTrue
Definition: sp_api.h:189
@ spFalse
Definition: sp_api.h:187
SP_API SpStatus spSetAttenuator(int device, int atten)
SP_API SpStatus spGetDeviceDiagnostics(int device, float *voltage, float *current, float *temperature)
SP_API SpStatus spGetAudio(int device, float *audio)
SP_API SpStatus spGetGPSTimebaseUpdate(int device, SpBool *enabled)
SP_API SpStatus spSetRealTimeWindow(int device, SpWindowType window)
SP_API SpStatus spSetSweepGPIOSwitching(int device, double *freqs, uint8_t *data, int count)
SP_API SpStatus spGetGPIOPort(int device, SpGPIOFunction *func)
SP_API SpStatus spPresetDevice(int device)
SP_API SpStatus spSetGPIOPort(int device, SpGPIOFunction func)
SP_API SpStatus spGetIQCorrection(int device, float *scale)