SM API
Data Structures | Macros | Enumerations | Functions
sm_api.h File Reference

API functions for the SM435/SM200 spectrum analyzers. More...

Go to the source code of this file.

Data Structures

struct  SmGPIOStep
 
struct  SmDeviceDiagnostics
 

Macros

#define SM_TRUE   (1)
 
#define SM_FALSE   (0)
 
#define SM_MAX_DEVICES   (9)
 
#define SM_ADDR_ANY   ("0.0.0.0")
 
#define SM_DEFAULT_ADDR   ("192.168.2.10")
 
#define SM_DEFAULT_PORT   (51665)
 
#define SM_AUTO_ATTEN   (-1)
 
#define SM_MAX_ATTEN   (6)
 
#define SM_MAX_REF_LEVEL   (20.0)
 
#define SM_MAX_SWEEP_QUEUE_SZ   (16)
 
#define SM200_MIN_FREQ   (100.0e3)
 
#define SM200_MAX_FREQ   (20.6e9)
 
#define SM435_MIN_FREQ   (100.0e3)
 
#define SM435_MAX_FREQ   (44.2e9)
 
#define SM435_MAX_FREQ_IF_OPT   (40.8e9)
 
#define SM_MAX_IQ_DECIMATION   (4096)
 
#define SM_PRESELECTOR_MAX_FREQ   (645.0e6)
 
#define SM_FAST_SWEEP_MIN_RBW   (30.0e3)
 
#define SM_REAL_TIME_MIN_SPAN   (200.0e3)
 
#define SM_REAL_TIME_MAX_SPAN   (160.0e6)
 
#define SM_MIN_SWEEP_TIME   (1.0e-6)
 
#define SM_MAX_SWEEP_TIME   (100.0)
 
#define SM_SPI_MAX_BYTES   (4)
 
#define SM_GPIO_SWEEP_MAX_STEPS   (64)
 
#define SM_GPIO_SWITCH_MAX_STEPS   (64)
 
#define SM_GPIO_SWITCH_MIN_COUNT   (2)
 
#define SM_GPIO_SWITCH_MAX_COUNT   (4194303 - 1)
 
#define SM_TEMP_WARNING   (95.0)
 
#define SM_TEMP_MAX   (102.0)
 
#define SM_MAX_SEGMENTED_IQ_SEGMENTS   (250)
 
#define SM_MAX_SEGMENTED_IQ_SAMPLES   (520e6)
 
#define SM435_IF_OUTPUT_FREQ   (1.5e9)
 
#define SM435_IF_OUTPUT_MIN_FREQ   (24.0e9)
 
#define SM435_IF_OUTPUT_MAX_FREQ   (43.5e9)
 

Enumerations

enum  SmStatus {
}
 
enum  SmDataType { smDataType32fc , smDataType16sc }
 
enum  SmMode {
  smModeIdle = 0 , smModeSweeping = 1 , smModeRealTime = 2 , smModeIQStreaming = 3 ,
  smModeIQSegmentedCapture = 5 , smModeIQSweepList = 6 , smModeAudio = 4 , smModeIQ = 3
}
 
enum  SmSweepSpeed { smSweepSpeedAuto = 0 , smSweepSpeedNormal = 1 , smSweepSpeedFast = 2 }
 
enum  SmIQStreamSampleRate { smIQStreamSampleRateNative = 0 , smIQStreamSampleRateLTE = 1 }
 
enum  SmPowerState { smPowerStateOn = 0 , smPowerStateStandby = 1 }
 
enum  SmDetector { smDetectorAverage = 0 , smDetectorMinMax = 1 }
 
enum  SmScale { smScaleLog = 0 , smScaleLin = 1 , smScaleFullScale = 2 }
 
enum  SmVideoUnits { smVideoLog = 0 , smVideoVoltage = 1 , smVideoPower = 2 , smVideoSample = 3 }
 
enum  SmWindowType {
  smWindowFlatTop = 0 , smWindowNutall = 2 , smWindowBlackman = 3 , smWindowHamming = 4 ,
  smWindowGaussian6dB = 5 , smWindowRect = 6
}
 
enum  SmTriggerType { smTriggerTypeImm = 0 , smTriggerTypeVideo = 1 , smTriggerTypeExt = 2 , smTriggerTypeFMT = 3 }
 
enum  SmTriggerEdge { smTriggerEdgeRising = 0 , smTriggerEdgeFalling = 1 }
 
enum  SmBool { smFalse = 0 , smTrue = 1 }
 
enum  SmGPIOState { smGPIOStateOutput = 0 , smGPIOStateInput = 1 }
 
enum  SmReference { smReferenceUseInternal = 0 , smReferenceUseExternal = 1 }
 
enum  SmDeviceType {
  smDeviceTypeSM200A = 0 , smDeviceTypeSM200B = 1 , smDeviceTypeSM200C = 2 , smDeviceTypeSM435B = 3 ,
  smDeviceTypeSM435C = 4
}
 
enum  SmAudioType {
  smAudioTypeAM = 0 , smAudioTypeFM = 1 , smAudioTypeUSB = 2 , smAudioTypeLSB = 3 ,
  smAudioTypeCW = 4
}
 
enum  SmGPSState { smGPSStateNotPresent = 0 , smGPSStateLocked = 1 , smGPSStateDisciplined = 2 }
 

Functions

SM_API SmStatus smGetDeviceList (int *serials, int *deviceCount)
 
SM_API SmStatus smGetDeviceList2 (int *serials, SmDeviceType *deviceTypes, int *deviceCount)
 
SM_API SmStatus smOpenDevice (int *device)
 
SM_API SmStatus smOpenDeviceBySerial (int *device, int serialNumber)
 
SM_API SmStatus smOpenNetworkedDevice (int *device, const char *hostAddr, const char *deviceAddr, uint16_t port)
 
SM_API SmStatus smCloseDevice (int device)
 
SM_API SmStatus smPreset (int device)
 
SM_API SmStatus smPresetSerial (int serialNumber)
 
SM_API SmStatus smNetworkedSpeedTest (int device, double durationSeconds, double *bytesPerSecond)
 
SM_API SmStatus smGetDeviceInfo (int device, SmDeviceType *deviceType, int *serialNumber)
 
SM_API SmStatus smGetFirmwareVersion (int device, int *major, int *minor, int *revision)
 
SM_API SmStatus smHasIFOutput (int device, SmBool *present)
 
SM_API SmStatus smGetDeviceDiagnostics (int device, float *voltage, float *current, float *temperature)
 
SM_API SmStatus smGetFullDeviceDiagnostics (int device, SmDeviceDiagnostics *diagnostics)
 
SM_API SmStatus smGetSFPDiagnostics (int device, float *temp, float *voltage, float *txPower, float *rxPower)
 
SM_API SmStatus smSetPowerState (int device, SmPowerState powerState)
 
SM_API SmStatus smGetPowerState (int device, SmPowerState *powerState)
 
SM_API SmStatus smSetAttenuator (int device, int atten)
 
SM_API SmStatus smGetAttenuator (int device, int *atten)
 
SM_API SmStatus smSetRefLevel (int device, double refLevel)
 
SM_API SmStatus smGetRefLevel (int device, double *refLevel)
 
SM_API SmStatus smSetPreselector (int device, SmBool enabled)
 
SM_API SmStatus smGetPreselector (int device, SmBool *enabled)
 
SM_API SmStatus smSetGPIOState (int device, SmGPIOState lowerState, SmGPIOState upperState)
 
SM_API SmStatus smGetGPIOState (int device, SmGPIOState *lowerState, SmGPIOState *upperState)
 
SM_API SmStatus smWriteGPIOImm (int device, uint8_t data)
 
SM_API SmStatus smReadGPIOImm (int device, uint8_t *data)
 
SM_API SmStatus smWriteSPI (int device, uint32_t data, int byteCount)
 
SM_API SmStatus smSetGPIOSweepDisabled (int device)
 
SM_API SmStatus smSetGPIOSweep (int device, SmGPIOStep *steps, int stepCount)
 
SM_API SmStatus smSetGPIOSwitchingDisabled (int device)
 
SM_API SmStatus smSetGPIOSwitching (int device, uint8_t *gpio, uint32_t *counts, int gpioSteps)
 
SM_API SmStatus smSetExternalReference (int device, SmBool enabled)
 
SM_API SmStatus smGetExternalReference (int device, SmBool *enabled)
 
SM_API SmStatus smSetReference (int device, SmReference reference)
 
SM_API SmStatus smGetReference (int device, SmReference *reference)
 
SM_API SmStatus smSetGPSTimebaseUpdate (int device, SmBool enabled)
 
SM_API SmStatus smGetGPSTimebaseUpdate (int device, SmBool *enabled)
 
SM_API SmStatus smGetGPSHoldoverInfo (int device, SmBool *usingGPSHoldover, uint64_t *lastHoldoverTime)
 
SM_API SmStatus smGetGPSState (int device, SmGPSState *GPSState)
 
SM_API SmStatus smSetSweepSpeed (int device, SmSweepSpeed sweepSpeed)
 
SM_API SmStatus smSetSweepCenterSpan (int device, double centerFreqHz, double spanHz)
 
SM_API SmStatus smSetSweepStartStop (int device, double startFreqHz, double stopFreqHz)
 
SM_API SmStatus smSetSweepCoupling (int device, double rbw, double vbw, double sweepTime)
 
SM_API SmStatus smSetSweepDetector (int device, SmDetector detector, SmVideoUnits videoUnits)
 
SM_API SmStatus smSetSweepScale (int device, SmScale scale)
 
SM_API SmStatus smSetSweepWindow (int device, SmWindowType window)
 
SM_API SmStatus smSetSweepSpurReject (int device, SmBool spurRejectEnabled)
 
SM_API SmStatus smSetRealTimeCenterSpan (int device, double centerFreqHz, double spanHz)
 
SM_API SmStatus smSetRealTimeRBW (int device, double rbw)
 
SM_API SmStatus smSetRealTimeDetector (int device, SmDetector detector)
 
SM_API SmStatus smSetRealTimeScale (int device, SmScale scale, double frameRef, double frameScale)
 
SM_API SmStatus smSetRealTimeWindow (int device, SmWindowType window)
 
SM_API SmStatus smSetIQBaseSampleRate (int device, SmIQStreamSampleRate sampleRate)
 
SM_API SmStatus smSetIQDataType (int device, SmDataType dataType)
 
SM_API SmStatus smSetIQCenterFreq (int device, double centerFreqHz)
 
SM_API SmStatus smGetIQCenterFreq (int device, double *centerFreqHz)
 
SM_API SmStatus smSetIQSampleRate (int device, int decimation)
 
SM_API SmStatus smSetIQBandwidth (int device, SmBool enableSoftwareFilter, double bandwidth)
 
SM_API SmStatus smSetIQExtTriggerEdge (int device, SmTriggerEdge edge)
 
SM_API SmStatus smSetIQTriggerSentinel (double sentinelValue)
 
SM_API SmStatus smSetIQQueueSize (int device, float ms)
 
SM_API SmStatus smSetIQSweepListDataType (int device, SmDataType dataType)
 
SM_API SmStatus smSetIQSweepListCorrected (int device, SmBool corrected)
 
SM_API SmStatus smSetIQSweepListSteps (int device, int steps)
 
SM_API SmStatus smGetIQSweepListSteps (int device, int *steps)
 
SM_API SmStatus smSetIQSweepListFreq (int device, int step, double freq)
 
SM_API SmStatus smSetIQSweepListRef (int device, int step, double level)
 
SM_API SmStatus smSetIQSweepListAtten (int device, int step, int atten)
 
SM_API SmStatus smSetIQSweepListSampleCount (int device, int step, uint32_t samples)
 
SM_API SmStatus smSetSegIQDataType (int device, SmDataType dataType)
 
SM_API SmStatus smSetSegIQCenterFreq (int device, double centerFreqHz)
 
SM_API SmStatus smSetSegIQVideoTrigger (int device, double triggerLevel, SmTriggerEdge triggerEdge)
 
SM_API SmStatus smSetSegIQExtTrigger (int device, SmTriggerEdge extTriggerEdge)
 
SM_API SmStatus smSetSegIQFMTParams (int device, int fftSize, const double *frequencies, const double *ampls, int count)
 
SM_API SmStatus smSetSegIQSegmentCount (int device, int segmentCount)
 
SM_API SmStatus smSetSegIQSegment (int device, int segment, SmTriggerType triggerType, int preTrigger, int captureSize, double timeoutSeconds)
 
SM_API SmStatus smSetAudioCenterFreq (int device, double centerFreqHz)
 
SM_API SmStatus smSetAudioType (int device, SmAudioType audioType)
 
SM_API SmStatus smSetAudioFilters (int device, double ifBandwidth, double audioLpf, double audioHpf)
 
SM_API SmStatus smSetAudioFMDeemphasis (int device, double deemphasis)
 
SM_API SmStatus smConfigure (int device, SmMode mode)
 
SM_API SmStatus smGetCurrentMode (int device, SmMode *mode)
 
SM_API SmStatus smAbort (int device)
 
SM_API SmStatus smGetSweepParameters (int device, double *actualRBW, double *actualVBW, double *actualStartFreq, double *binSize, int *sweepSize)
 
SM_API SmStatus smGetRealTimeParameters (int device, double *actualRBW, int *sweepSize, double *actualStartFreq, double *binSize, int *frameWidth, int *frameHeight, double *poi)
 
SM_API SmStatus smGetIQParameters (int device, double *sampleRate, double *bandwidth)
 
SM_API SmStatus smGetIQCorrection (int device, float *scale)
 
SM_API SmStatus smIQSweepListGetCorrections (int device, float *corrections)
 
SM_API SmStatus smSegIQGetMaxCaptures (int device, int *maxCaptures)
 
SM_API SmStatus smGetSweep (int device, float *sweepMin, float *sweepMax, int64_t *nsSinceEpoch)
 
SM_API SmStatus smSetSweepGPIO (int device, int pos, uint8_t data)
 
SM_API SmStatus smStartSweep (int device, int pos)
 
SM_API SmStatus smFinishSweep (int device, int pos, float *sweepMin, float *sweepMax, int64_t *nsSinceEpoch)
 
SM_API SmStatus smGetRealTimeFrame (int device, float *colorFrame, float *alphaFrame, float *sweepMin, float *sweepMax, int *frameCount, int64_t *nsSinceEpoch)
 
SM_API SmStatus smGetIQ (int device, void *iqBuf, int iqBufSize, double *triggers, int triggerBufSize, int64_t *nsSinceEpoch, SmBool purge, int *sampleLoss, int *samplesRemaining)
 
SM_API SmStatus smIQSweepListGetSweep (int device, void *dst, int64_t *timestamps)
 
SM_API SmStatus smIQSweepListStartSweep (int device, int pos, void *dst, int64_t *timestamps)
 
SM_API SmStatus smIQSweepListFinishSweep (int device, int pos)
 
SM_API SmStatus smSegIQCaptureStart (int device, int capture)
 
SM_API SmStatus smSegIQCaptureWait (int device, int capture)
 
SM_API SmStatus smSegIQCaptureWaitAsync (int device, int capture, SmBool *completed)
 
SM_API SmStatus smSegIQCaptureTimeout (int device, int capture, int segment, SmBool *timedOut)
 
SM_API SmStatus smSegIQCaptureTime (int device, int capture, int segment, int64_t *nsSinceEpoch)
 
SM_API SmStatus smSegIQCaptureRead (int device, int capture, int segment, void *iq, int offset, int len)
 
SM_API SmStatus smSegIQCaptureFinish (int device, int capture)
 
SM_API SmStatus smSegIQCaptureFull (int device, int capture, void *iq, int offset, int len, int64_t *nsSinceEpoch, SmBool *timedOut)
 
SM_API SmStatus smSegIQLTEResample (float *input, int inputLen, float *output, int *outputLen, bool clearDelayLine)
 
SM_API SmStatus smSetIQFullBandAtten (int device, int atten)
 
SM_API SmStatus smSetIQFullBandCorrected (int device, SmBool corrected)
 
SM_API SmStatus smSetIQFullBandSamples (int device, int samples)
 
SM_API SmStatus smSetIQFullBandTriggerType (int device, SmTriggerType triggerType)
 
SM_API SmStatus smSetIQFullBandVideoTrigger (int device, double triggerLevel)
 
SM_API SmStatus smSetIQFullBandTriggerTimeout (int device, double triggerTimeout)
 
SM_API SmStatus smGetIQFullBand (int device, float *iq, int freq)
 
SM_API SmStatus smGetIQFullBandSweep (int device, float *iq, int startIndex, int stepSize, int steps)
 
SM_API SmStatus smGetAudio (int device, float *audio)
 
SM_API SmStatus smGetGPSInfo (int device, SmBool refresh, SmBool *updated, int64_t *secSinceEpoch, double *latitude, double *longitude, double *altitude, char *nmea, int *nmeaLen)
 
SM_API SmStatus smWriteToGPS (int device, const uint8_t *mem, int len)
 
SM_API SmStatus smSetFanThreshold (int device, int temp)
 
SM_API SmStatus smGetFanThreshold (int device, int *temp)
 
SM_API SmStatus smSetIFOutput (int device, double frequency)
 
SM_API SmStatus smGetCalDate (int device, uint64_t *lastCalDate)
 
SM_API SmStatus smBroadcastNetworkConfig (const char *hostAddr, const char *deviceAddr, uint16_t port, SmBool nonVolatile)
 
SM_API SmStatus smNetworkConfigGetDeviceList (int *serials, int *deviceCount)
 
SM_API SmStatus smNetworkConfigOpenDevice (int *device, int serialNumber)
 
SM_API SmStatus smNetworkConfigCloseDevice (int device)
 
SM_API SmStatus smNetworkConfigGetMAC (int device, char *mac)
 
SM_API SmStatus smNetworkConfigSetIP (int device, const char *addr, SmBool nonVolatile)
 
SM_API SmStatus smNetworkConfigGetIP (int device, char *addr)
 
SM_API SmStatus smNetworkConfigSetPort (int device, int port, SmBool nonVolatile)
 
SM_API SmStatus smNetworkConfigGetPort (int device, int *port)
 
SM_API const char * smGetAPIVersion ()
 
SM_API const char * smGetErrorString (SmStatus status)
 

Detailed Description

API functions for the SM435/SM200 spectrum analyzers.

This is the main file for user accessible functions for controlling the SM435/SM200 spectrum analyzers.

Macro Definition Documentation

◆ SM_TRUE

#define SM_TRUE   (1)

Used for boolean true when integer parameters are being used. Also see SmBool.

◆ SM_FALSE

#define SM_FALSE   (0)

Used for boolean false when integer parameters are being used. Also see SmBool.

◆ SM_MAX_DEVICES

#define SM_MAX_DEVICES   (9)

Max number of devices that can be interfaced in the API.

◆ SM_ADDR_ANY

#define SM_ADDR_ANY   ("0.0.0.0")

Convenience host address for connecting networked devices.

◆ SM_DEFAULT_ADDR

#define SM_DEFAULT_ADDR   ("192.168.2.10")

Default device IP address for networked devices.

◆ SM_DEFAULT_PORT

#define SM_DEFAULT_PORT   (51665)

Default port number for networked devices.

◆ SM_AUTO_ATTEN

#define SM_AUTO_ATTEN   (-1)

Tells the API to automatically choose attenuation based on reference level.

◆ SM_MAX_ATTEN

#define SM_MAX_ATTEN   (6)

Valid atten values [0,6] or -1 for auto

◆ SM_MAX_REF_LEVEL

#define SM_MAX_REF_LEVEL   (20.0)

Maximum reference level in dBm

◆ SM_MAX_SWEEP_QUEUE_SZ

#define SM_MAX_SWEEP_QUEUE_SZ   (16)

Maximum number of sweeps that can be queued up. Valid sweep indices between [0,15]

◆ SM200_MIN_FREQ

#define SM200_MIN_FREQ   (100.0e3)

Min frequency for sweeps, and min center frequency for I/Q measurements for SM200 devices.

◆ SM200_MAX_FREQ

#define SM200_MAX_FREQ   (20.6e9)

Max frequency for sweeps, and max center frequency for I/Q measurements for SM200 devices.

◆ SM435_MIN_FREQ

#define SM435_MIN_FREQ   (100.0e3)

Min frequency for sweeps, and min center frequency for I/Q measurements for SM435 devices.

◆ SM435_MAX_FREQ

#define SM435_MAX_FREQ   (44.2e9)

Max frequency for sweeps, and max center frequency for I/Q measurements for SM435 devices.

◆ SM435_MAX_FREQ_IF_OPT

#define SM435_MAX_FREQ_IF_OPT   (40.8e9)

Max frequency for sweeps, and max center frequency for I/Q measurements for SM435 devices with the IF output option.

◆ SM_MAX_IQ_DECIMATION

#define SM_MAX_IQ_DECIMATION   (4096)

Max decimation for I/Q streaming.

◆ SM_PRESELECTOR_MAX_FREQ

#define SM_PRESELECTOR_MAX_FREQ   (645.0e6)

The frequency at which the manually controlled preselector filters end. Past this frequency, the preselector filters are always enabled.

◆ SM_FAST_SWEEP_MIN_RBW

#define SM_FAST_SWEEP_MIN_RBW   (30.0e3)

Minimum RBW in Hz for fast sweep with Nuttall window.

◆ SM_REAL_TIME_MIN_SPAN

#define SM_REAL_TIME_MIN_SPAN   (200.0e3)

Min span for device configured in real-time measurement mode

◆ SM_REAL_TIME_MAX_SPAN

#define SM_REAL_TIME_MAX_SPAN   (160.0e6)

Max span for device configured in real-time measurement mode

◆ SM_MIN_SWEEP_TIME

#define SM_MIN_SWEEP_TIME   (1.0e-6)

Min sweep time in seconds. See smSetSweepCoupling.

◆ SM_MAX_SWEEP_TIME

#define SM_MAX_SWEEP_TIME   (100.0)

Max sweep time in seconds. See smSetSweepCoupling.

◆ SM_SPI_MAX_BYTES

#define SM_SPI_MAX_BYTES   (4)

Max number of bytes per SPI transfer.

◆ SM_GPIO_SWEEP_MAX_STEPS

#define SM_GPIO_SWEEP_MAX_STEPS   (64)

Max number of freq/state pairs for GPIO sweeps.

◆ SM_GPIO_SWITCH_MAX_STEPS

#define SM_GPIO_SWITCH_MAX_STEPS   (64)

Max number of GPIO states for I/Q streaming.

◆ SM_GPIO_SWITCH_MIN_COUNT

#define SM_GPIO_SWITCH_MIN_COUNT   (2)

Min length for GPIO state for I/Q streaming, in counts.

◆ SM_GPIO_SWITCH_MAX_COUNT

#define SM_GPIO_SWITCH_MAX_COUNT   (4194303 - 1)

Max length for GPIO state for I/Q streaming, in counts.

◆ SM_TEMP_WARNING

#define SM_TEMP_WARNING   (95.0)

FPGA core temp should not exceed this value, in C.

◆ SM_TEMP_MAX

#define SM_TEMP_MAX   (102.0)

FPGA shutdown temp, in C.

◆ SM_MAX_SEGMENTED_IQ_SEGMENTS

#define SM_MAX_SEGMENTED_IQ_SEGMENTS   (250)

Segmented I/Q captures, max segments.

◆ SM_MAX_SEGMENTED_IQ_SAMPLES

#define SM_MAX_SEGMENTED_IQ_SAMPLES   (520e6)

Segmented I/Q captures, max samples for all segments combined.

◆ SM435_IF_OUTPUT_FREQ

#define SM435_IF_OUTPUT_FREQ   (1.5e9)

IF output, output frequency. IF output option devices only.

◆ SM435_IF_OUTPUT_MIN_FREQ

#define SM435_IF_OUTPUT_MIN_FREQ   (24.0e9)

Min IF output, input frequency. IF output option devices only.

◆ SM435_IF_OUTPUT_MAX_FREQ

#define SM435_IF_OUTPUT_MAX_FREQ   (43.5e9)

Max IF output, input frequency. IF output option devices only.

Enumeration Type Documentation

◆ SmStatus

enum SmStatus

Status code returned from all SM API functions.

Enumerator
smInvalidCalibrationFileErr 

Calibration file unable to be used with the API

smInvalidCenterFreqErr 

Invalid center frequency specified

smInvalidIQDecimationErr 

I/Q decimation value provided not a valid value

smJESDErr 

FPGA/initialization error

smNetworkErr 

Socket/network error

smFx3RunErr 

If the core FX3 program fails to run

smMaxDevicesConnectedErr 

Only can connect up to SM_MAX_DEVICES receivers

smFPGABootErr 

FPGA boot error

smBootErr 

Boot error

smGpsNotLockedErr 

Requesting GPS information when the GPS is not locked

smVersionMismatchErr 

Invalid API version for target device, update API

smAllocationErr 

Unable to allocate resources needed to configure the measurement mode

smSyncErr 

Returned when the device detects framing issue on measurement data Measurement results are likely invalid. Device should be preset/power cycled

smInvalidSweepPosition 

Invalid or already active sweep position

smInvalidConfigurationErr 

Attempting to perform an operation that cannot currently be performed. Often the result of trying to do something while the device is currently making measurements or not in an idle state.

smConnectionLostErr 

Device disconnected, likely USB error detected

smInvalidParameterErr 

Required parameter found to have invalid value

smNullPtrErr 

One or more required pointer parameters were null

smInvalidDeviceErr 

User specified invalid device index

smDeviceNotFoundErr 

Unable to open device

smNoError 

Function returned successfully

smSettingClamped 

One or more of the provided settings were adjusted

smAdcOverflow 

Measurement includes data which caused an ADC overload (clipping/compression)

smUncalData 

Measurement is uncalibrated, overrides ADC overflow

smTempDriftWarning 

Temperature drift occured, measurements uncalibrated, reconfigure the device

smSpanExceedsPreselector 

Warning when the preselector span is smaller than the user selected span

smTempHighWarning 

Warning when the internal temperature gets too hot. The device is close to shutting down

smCpuLimited 

Returned when the API was unable to keep up with the necessary processing

smUpdateAPI 

Returned when the API detects a device with newer features than what was available when this version of the API was released. Suggested fix, update the API.

smInvalidCalData 

Calibration data potentially corrupt

◆ SmDataType

enum SmDataType

Specifies a data type for data returned from the API

Enumerator
smDataType32fc 

32-bit complex floats

smDataType16sc 

16-bit complex shorts

◆ SmMode

enum SmMode

Measurement mode

Enumerator
smModeIdle 

Idle, no measurement

smModeSweeping 

Swept spectrum analysis

smModeRealTime 

Real-time spectrum analysis

smModeIQStreaming 

I/Q streaming

smModeIQSegmentedCapture 

SM200B/SM435B wide band I/Q capture

smModeIQSweepList 

I/Q sweep list / frequency hopping

smModeAudio 

Audio demod

◆ SmSweepSpeed

Sweep speed

Enumerator
smSweepSpeedAuto 

Automatically choose the fastest sweep speed while maintaining customer requested settings

smSweepSpeedNormal 

Use standard sweep speed, always available

smSweepSpeedFast 

Choose fast sweep speed whenever possible, possibly ignoring some requested settings

◆ SmIQStreamSampleRate

Base sample rate used for I/Q streaming. See I/Q Acquisiton for more information.

Enumerator
smIQStreamSampleRateNative 

Use device native sample rate

smIQStreamSampleRateLTE 

Use LTE sample rates

◆ SmPowerState

Specifies device power state. See Power States for more information.

Enumerator
smPowerStateOn 

On

smPowerStateStandby 

Standby

◆ SmDetector

enum SmDetector

Detector used for sweep and real-time spectrum analysis.

Enumerator
smDetectorAverage 

Average

smDetectorMinMax 

Min/Max

◆ SmScale

enum SmScale

Specifies units of sweep and real-time spectrum analysis measurements.

Enumerator
smScaleLog 

dBm

smScaleLin 

mV

smScaleFullScale 

Log scale, no corrections

◆ SmVideoUnits

Specifies units in which VBW processing occurs.

Enumerator
smVideoLog 

dBm

smVideoVoltage 

Linear voltage

smVideoPower 

Linear power

smVideoSample 

No VBW processing

◆ SmWindowType

Specifies the window used for sweep and real-time analysis.

Enumerator
smWindowFlatTop 

SRS flattop

smWindowNutall 

Nutall

smWindowBlackman 

Blackman

smWindowHamming 

Hamming

smWindowGaussian6dB 

Gaussian 6dB BW window for EMC measurements and CISPR compatibility

smWindowRect 

Rectangular (no) window

◆ SmTriggerType

Trigger type for specific I/Q capture modes.

Enumerator
smTriggerTypeImm 

Immediate/no trigger

smTriggerTypeVideo 

Video/level trigger

smTriggerTypeExt 

External trigger

smTriggerTypeFMT 

Frequency mask trigger

◆ SmTriggerEdge

Trigger edge for video and external triggers.

Enumerator
smTriggerEdgeRising 

Rising edge

smTriggerEdgeFalling 

Falling edge

◆ SmBool

enum SmBool

Boolean type. Used in public facing functions instead of bool to improve API use from different programming languages.

Enumerator
smFalse 

False

smTrue 

True

◆ SmGPIOState

Used to set the 8 configurable GPIO pins to inputs/outputs.

Enumerator
smGPIOStateOutput 

Output

smGPIOStateInput 

Input

◆ SmReference

Used to indicate the source of the timebase reference for the device.

Enumerator
smReferenceUseInternal 

Use the internal 10MHz timebase.

smReferenceUseExternal 

Use an external 10MHz timebase on the 10 MHz In port.

◆ SmDeviceType

Device type

Enumerator
smDeviceTypeSM200A 

SM200A

smDeviceTypeSM200B 

SM200B

smDeviceTypeSM200C 

SM200C

smDeviceTypeSM435B 

SM435B

smDeviceTypeSM435C 

SM435C

◆ SmAudioType

Audio demodulation type.

Enumerator
smAudioTypeAM 

AM

smAudioTypeFM 

FM

smAudioTypeUSB 

Upper side band

smAudioTypeLSB 

Lower side band

smAudioTypeCW 

CW

◆ SmGPSState

enum SmGPSState

Internal GPS state

Enumerator
smGPSStateNotPresent 

GPS is not locked

smGPSStateLocked 

GPS is locked, NMEA data is valid, but the timebase is not being disciplined by the GPS

smGPSStateDisciplined 

GPS is locked, NMEA data is valid, timebase is being disciplined by the GPS

Function Documentation

◆ smGetDeviceList()

SM_API SmStatus smGetDeviceList ( int *  serials,
int *  deviceCount 
)

This function is for USB SM devices only. This function is used to retrieve the serial numbers of all unopened USB SM devices connected to the PC. The maximum number of serial numbers that can be returned is 9. The serial numbers returned can then be used to open specific devices with the smOpenDeviceBySerial function. When the function returns successfully, the serials array will contain deviceCount number of unique SM serial numbers. Only deviceCount values will be modified. This function will not return the serial numbers of any connected networked devices.

Parameters
[out]serialsPointer to an array of integers. The array must be larger than the number of USB SM devices connected to the PC.
[out]deviceCountIf the function returns successfully deviceCount will be set to the number devices found on the system.
Returns

◆ smGetDeviceList2()

SM_API SmStatus smGetDeviceList2 ( int *  serials,
SmDeviceType deviceTypes,
int *  deviceCount 
)

This function is for USB SM devices only. This function is used to retrieve the serial numbers and device types of all unopened USB SM devices connected to the PC. The maximum number of serial numbers that can be returned is 9. The serial numbers returned can then be used to open specific devices with the smOpenDeviceBySerial function. When the function returns successfully, the serials and deviceCount array will contain deviceCount number of unique SM serial numbers and deviceTypes. Only deviceCount values will be modified. This function will not return the serial numbers of any connected networked devices.

Parameters
[out]serialsPointer to an array of integers. The array must be larger than the number of USB SM devices connected to the PC.
[out]deviceTypesPointer to an array of SmDeviceType enums. The array must be larger than the number of USB SM devices connected to the PC.
[out]deviceCountPointer to integer. If the function returns successfully deviceCount will be set to the number devices found on the system.
Returns

◆ smOpenDevice()

SM_API SmStatus smOpenDevice ( int *  device)

This function is for USB SM devices only. Claim the first unopened USB SM device detected on the system. If the device is opened successfully, a handle to the function will be returned through the device pointer. This handle can then be used to refer to this device for all future API calls. This function has the same effect as calling smGetDeviceList and using the first device found to call smOpenDeviceBySerial.

Parameters
[out]deviceReturns handle that can be used to interface the device.
Returns

◆ smOpenDeviceBySerial()

SM_API SmStatus smOpenDeviceBySerial ( int *  device,
int  serialNumber 
)

This function is similar to smOpenDevice except it allows you to specify the device you wish to open. This function is often used in conjunction with smGetDeviceList when managing several SM devices on on PC.

Parameters
[out]deviceReturns handle that can be used to interface the device.
[in]serialNumberSerial number of the device you wish to open.
Returns

◆ smOpenNetworkedDevice()

SM_API SmStatus smOpenNetworkedDevice ( int *  device,
const char *  hostAddr,
const char *  deviceAddr,
uint16_t  port 
)

This function is for networked (10GbE) devices only. Attempts to connect to a networked device. If the device is opened successfully, a handle to the function will be returned through the device pointer. This handle can then be used to refer to this device for all future API calls. The device takes approximately 12 seconds to boot up after applying power. Until the device is booted, this function will return device not found. The SM API does not set the SO_REUSEADDR socket option. For customers connecting multiple networked devices, we recommend specifying the hostAddr explicitly instead of using “0.0.0.0”. Especially for configurations that involve multiple subnets. If not done, devices beyond the first will likely not be found and this function will return an error.

Parameters
[out]deviceReturns handle that can be used to interface the device.
[in]hostAddrHost interface IP on which the networked device is connected, provided as a string. Can be “0.0.0.0”. An example parameter is “192.168.2.2”.
[in]deviceAddrTarget device IP provided as a string. If more than one device with this IP is connected to the host interface, the behavior is undefined.
[in]portTarget device port.
Returns

◆ smCloseDevice()

SM_API SmStatus smCloseDevice ( int  device)

This function should be called when you want to release the resources for a device. All resources (memory, etc.) will be released, and the device will become available again for use in the current process. The device handle specified will no longer point to a valid device and the device must be re-opened again to be used. This function should be called before the process exits, but it is not strictly required.

Parameters
[in]deviceDevice handle.
Returns

◆ smPreset()

SM_API SmStatus smPreset ( int  device)

Performs a full device preset. When this function returns, the hardware will have performed a full reset, the device handle will no longer be valid, the smCloseDevice function will have been called for the device handle, and the device will need to be re-opened again. For USB devices, the full 20 seconds open cycle will occur when re-opening the device. For networked devices, this function blocks for an additional 15 seconds to ensure the device has fully power cycled and can be opened. This function can be used to recover from an undesirable device state.

Parameters
[in]deviceDevice handle.
Returns

◆ smPresetSerial()

SM_API SmStatus smPresetSerial ( int  serialNumber)

Performs a full device preset for a device that has not been opened with the smOpenDevice function. This function will open and then preset the device. This function does not check if the device is already opened. Calling this function on a device that is already open through the API is undefined behavior.

Parameters
[in]serialNumberSerial number of the device to preset.
Returns

◆ smNetworkedSpeedTest()

SM_API SmStatus smNetworkedSpeedTest ( int  device,
double  durationSeconds,
double *  bytesPerSecond 
)

This function is for networked (10GbE) devices only. Measure the network throughput between the device and the PC. Useful for troubleshooting network throughput issues.

Parameters
[in]deviceDevice handle.
[in]durationSecondsThe duration of the test specified in seconds. Can be values between 16ms and 100s. Recommended value of 1 second minimum to produce good averaging and reduce startup overhead.
[out]bytesPerSecondPointer to double which when finished, will contain the measured bytes per second throughput between the device and PC.
Returns

◆ smGetDeviceInfo()

SM_API SmStatus smGetDeviceInfo ( int  device,
SmDeviceType deviceType,
int *  serialNumber 
)

This function returns basic information about a specific open device. Also see smGetDeviceDiagnostics.

Parameters
[in]deviceDevice handle.
[out]deviceTypePointer to SmDeviceType to contain the device model number. Can be NULL.
[out]serialNumberReturns device serial number. Can be NULL.
Returns

◆ smGetFirmwareVersion()

SM_API SmStatus smGetFirmwareVersion ( int  device,
int *  major,
int *  minor,
int *  revision 
)

Get the firmware version of the device. The firmware version is of the form major.minor.revision.

Parameters
[in]deviceDevice handle.
[out]majorPointer to int. Can be NULL.
[out]minorPointer to int. Can be NULL.
[out]revisionPointer to int. Can be NULL.
Returns

◆ smHasIFOutput()

SM_API SmStatus smHasIFOutput ( int  device,
SmBool present 
)

Returns whethe the SM435 device has the IF output option. See SM435 IF Output Option for more information.

Parameters
[in]deviceDevice handle.
[out]presentSet to smTrue if the device has the IF output option.
Returns

◆ smGetDeviceDiagnostics()

SM_API SmStatus smGetDeviceDiagnostics ( int  device,
float *  voltage,
float *  current,
float *  temperature 
)

Returns operational information about a device.

Parameters
[in]deviceDevice handle.
[out]voltagePointer to float, to contain device voltage. Can be NULL.
[out]currentPointer to float, to contain device current. Can be NULL.
[out]temperaturePointer to float, to contain device temperature. Can be NULL.
Returns

◆ smGetFullDeviceDiagnostics()

SM_API SmStatus smGetFullDeviceDiagnostics ( int  device,
SmDeviceDiagnostics diagnostics 
)

Returns operational information about a device. If any temperature sensors are unpopulated, the temperature returned for that sensor will be 240C. Should always be able to retrieve the FPGA core and RF board temperatures.

Parameters
[in]deviceDevice handle.
[out]diagnosticsPointer to struct.
Returns

◆ smGetSFPDiagnostics()

SM_API SmStatus smGetSFPDiagnostics ( int  device,
float *  temp,
float *  voltage,
float *  txPower,
float *  rxPower 
)

For networked (10GbE) devices only. Returns a number of diagnostic information for the SFP+ transceiver attached to the device. If either the device is not a networked device or the SFP+ does not communicate diagnostic information, the values returned will be zero.

Parameters
[in]deviceDevice handle.
[out]tempReported SFP+ temperature in C. Can be NULL.
[out]voltageReported SFP+ voltage in V. Can be NULL.
[out]txPowerReported transmit power in mW. Can be NULL.
[out]rxPowerReported receive power in mW. Can be NULL.
Returns

◆ smSetPowerState()

SM_API SmStatus smSetPowerState ( int  device,
SmPowerState  powerState 
)

Change the power state of the device. The power state controls the power consumption of the device. See Power States for more information.

Parameters
[in]deviceDevice handle.
[in]powerStateNew power state.
Returns

◆ smGetPowerState()

SM_API SmStatus smGetPowerState ( int  device,
SmPowerState powerState 
)

Retrieves the current power state. See Power States for more information.

Parameters
[in]deviceDevice handle.
[out]powerStatePointer to SmPowerState.
Returns

◆ smSetAttenuator()

SM_API SmStatus smSetAttenuator ( int  device,
int  atten 
)

Set the device attenuation. See Reference Level and Sensitivity for more information. Valid values for attenuation are between [0,6] representing between [0,30] dB of attenuation (5dB steps). Setting the attenuation to -1 tells the receiver to automatically choose the best attenuation value for the specified reference level selected. Setting attenuation to a non-auto value overrides the reference level selection. The header file provides the SM_AUTO_ATTEN macro for -1.

Parameters
[in]deviceDevice handle.
[in]attenAttenuation value between [-1,6].
Returns

◆ smGetAttenuator()

SM_API SmStatus smGetAttenuator ( int  device,
int *  atten 
)

Get the device attenuation. See Reference Level and Sensitivity for more information.

Parameters
[in]deviceDevice handle.
[out]attenReturns current attenuation value.
Returns

◆ smSetRefLevel()

SM_API SmStatus smSetRefLevel ( int  device,
double  refLevel 
)

The reference level controls the sensitivity of the receiver by setting the attenuation of the receiver to optimize measurements for signals at or below the reference level. See Reference Level and Sensitivity for more information. Attenuation must be set to automatic (-1) to set reference level.

Parameters
[in]deviceDevice handle.
[in]refLevelSet the reference level of the receiver in dBm.
Returns

◆ smGetRefLevel()

SM_API SmStatus smGetRefLevel ( int  device,
double *  refLevel 
)

Retreive the current device reference level.

Parameters
[in]deviceDevice handle.
[out]refLevelReference level returned in dBm.
Returns

◆ smSetPreselector()

SM_API SmStatus smSetPreselector ( int  device,
SmBool  enabled 
)

Enable/disable the RF preselector. This setting controls the preselector for all measurement modes.

Parameters
[in]deviceDevice handle.
[in]enabledSet to smTrue to enable the preselector.
Returns

◆ smGetPreselector()

SM_API SmStatus smGetPreselector ( int  device,
SmBool enabled 
)

Retrieve the current preselector setting.

Parameters
[in]deviceDevice handle.
[out]enabledReturns smTrue if the preselector is enabled.
Returns

◆ smSetGPIOState()

SM_API SmStatus smSetGPIOState ( int  device,
SmGPIOState  lowerState,
SmGPIOState  upperState 
)

Configure whether the GPIO pins are read/write. This affects the pins immediately. See the GPIO section for more information.

Parameters
[in]deviceDevice handle.
[in]lowerStateSets the direction of the lower 4 GPIO pins.
[in]upperStateSets the direction of the upper 4 GPIO pins.
Returns

◆ smGetGPIOState()

SM_API SmStatus smGetGPIOState ( int  device,
SmGPIOState lowerState,
SmGPIOState upperState 
)

Get the direction (read/write) of the GPIO pins. See the GPIO section for more information.

Parameters
[in]deviceDevice handle.
[out]lowerStateReturns the direction of the lower 4 GPIO pins.
[out]upperStateReturns the direction of the upper 4 GPIO pins.
Returns

◆ smWriteGPIOImm()

SM_API SmStatus smWriteGPIOImm ( int  device,
uint8_t  data 
)

Set the GPIO output levels. Will only affect GPIO pins configured as outputs. The bits in the data parameter that correspond with GPIO pins that have been set as inputs are ignored.

Parameters
[in]deviceDevice handle.
[in]dataData used to set the GPIO. Each bit corresponds to the 8 GPIO pins.
Returns

◆ smReadGPIOImm()

SM_API SmStatus smReadGPIOImm ( int  device,
uint8_t *  data 
)

Retrieve the values of the GPIO pins. GPIO pins that are configured as outputs will return the set output logic level. If the device is currently idle, the GPIO logic levels are sampled. If the device is configured in a measurement mode, the values returned are those reported from the last measurement taken. For example, if the device is configured for sweeping, each sweep performed will update the GPIO. To retrieve the most current values, either perform another sweep and re-request the GPIO state or put the device in an idle mode and query the GPIO.

Parameters
[in]deviceDevice handle.
[out]dataPointer to byte. Each bit corresponds to the 8 GPIO pins.
Returns

◆ smWriteSPI()

SM_API SmStatus smWriteSPI ( int  device,
uint32_t  data,
int  byteCount 
)

Output up to 4 bytes on the SPI data pins. See the SPI section for more information.

Parameters
[in]deviceDevice handle.
[in]dataUp to 4 bytes of data to transfer.
[in]byteCountNumber of bytes to transfer.
Returns

◆ smSetGPIOSweepDisabled()

SM_API SmStatus smSetGPIOSweepDisabled ( int  device)

Disables and clears the current GPIO sweep setup. The effect of this function will be seen the next time the device is configured. See the GPIO section for more information.

Parameters
[in]deviceDevice handle.
Returns

◆ smSetGPIOSweep()

SM_API SmStatus smSetGPIOSweep ( int  device,
SmGPIOStep steps,
int  stepCount 
)

This function is used to set the frequency cross over points for the GPIO sweep functionality and the associated GPIO output logic levels for each frequency. See GPIO for more information.

Parameters
[in]deviceDevice handle.
[in]stepsArray of SmGPIOStep structs. The array must be stepCount in length.
[in]stepCountThe number of steps in the steps array.
Returns

◆ smSetGPIOSwitchingDisabled()

SM_API SmStatus smSetGPIOSwitchingDisabled ( int  device)

Disables any GPIO switching setup. The effect of this function will be seen the next time the device is configured for I/Q streaming. If the device is actively in a GPIO switching loop (and I/Q streaming) the GPIO switching is not disabled until the device is reconfigured. This function can be called at any time. See GPIO for more information.

Parameters
[in]deviceDevice handle.
Returns

◆ smSetGPIOSwitching()

SM_API SmStatus smSetGPIOSwitching ( int  device,
uint8_t *  gpio,
uint32_t *  counts,
int  gpioSteps 
)

Configures the GPIO switching functionality. See GPIO for more information.

Parameters
[in]deviceDevice handle.
[in]gpioArray of GPIO output settings.
[in]countsArray of dwell times (in 20ns counts). The maximum count value for a given state/step is (2^22 - 1).
[in]gpioStepsNumber of GPIO steps.
Returns

◆ smSetExternalReference()

SM_API SmStatus smSetExternalReference ( int  device,
SmBool  enabled 
)

Enable or disable the 10MHz reference out port. If enabled, the current reference being used by the SM (as specified by smSetReference) will be output on the 10MHz out port.

Parameters
[in]deviceDevice handle.
[in]enabledSet to smTrue to enable the 10MHz reference out port.
Returns

◆ smGetExternalReference()

SM_API SmStatus smGetExternalReference ( int  device,
SmBool enabled 
)

Return whether the 10MHz reference out port is enabled.

Parameters
[in]deviceDevice handle.
[out]enabledReturns smTrue if the ref out port is enabled.
Returns

◆ smSetReference()

SM_API SmStatus smSetReference ( int  device,
SmReference  reference 
)

Tell the receiver to use either the internal time base reference or use a 10MHz reference present on the 10MHz in port. The device must be in the idle state (call smAbort) for this function to take effect. If the function returns successfully, verify the new state with the smGetReference function.

Parameters
[in]deviceDevice handle.
[in]referenceNew reference state.
Returns

◆ smGetReference()

SM_API SmStatus smGetReference ( int  device,
SmReference reference 
)

Get the current reference state.

Parameters
[in]deviceDevice handle.
[out]referenceReturns current reference configuration.
Returns

◆ smSetGPSTimebaseUpdate()

SM_API SmStatus smSetGPSTimebaseUpdate ( int  device,
SmBool  enabled 
)

Enable whether or not the API auto updates the timebase calibration value when a valid GPS lock is acquired. This function must be called in an idle state. See Automatic GPS Timebase Discipline for more information.

Parameters
[in]deviceDevice handle.
[in]enabledSend smTrue to enable.
Returns

◆ smGetGPSTimebaseUpdate()

SM_API SmStatus smGetGPSTimebaseUpdate ( int  device,
SmBool enabled 
)

Get auto GPS timebase update status. See Automatic GPS Timebase Discipline for more information.

Parameters
[in]deviceDevice handle.
[out]enabledReturns smTrue if auto GPS timebase update is enabled.
Returns

◆ smGetGPSHoldoverInfo()

SM_API SmStatus smGetGPSHoldoverInfo ( int  device,
SmBool usingGPSHoldover,
uint64_t *  lastHoldoverTime 
)

Return information about the GPS holdover correction. Determine if a correction exists and when it was generated.

Parameters
[in]deviceDevice handle.
[out]usingGPSHoldoverReturns whether the GPS holdover value is newer than the factory calibration value. To determine whether the holdover value is actively in use, you will need to use this function in combination with smGetGPSState. This parameter can be NULL.
[out]lastHoldoverTimeIf a GPS holdover value exists on the system, return the timestamp of the value. Value is seconds since epoch. This parameter can be NULL.
Returns

◆ smGetGPSState()

SM_API SmStatus smGetGPSState ( int  device,
SmGPSState GPSState 
)

Determine the lock and discipline status of the GPS. See the Acquiring GPS Lock section for more information.

Parameters
[in]deviceDevice handle.
[out]GPSStatePointer to SmGPSState.
Returns

◆ smSetSweepSpeed()

SM_API SmStatus smSetSweepSpeed ( int  device,
SmSweepSpeed  sweepSpeed 
)

Set sweep speed.

Parameters
[in]deviceDevice handle.
[in]sweepSpeedNew sweep speed.
Returns

◆ smSetSweepCenterSpan()

SM_API SmStatus smSetSweepCenterSpan ( int  device,
double  centerFreqHz,
double  spanHz 
)

Set sweep center/span.

Parameters
[in]deviceDevice handle.
[in]centerFreqHzNew center frequency in Hz.
[in]spanHzNew span in Hz.
Returns

◆ smSetSweepStartStop()

SM_API SmStatus smSetSweepStartStop ( int  device,
double  startFreqHz,
double  stopFreqHz 
)

Set sweep start/stop frequency.

Parameters
[in]deviceDevice handle.
[in]startFreqHzStart frequency in Hz.
[in]stopFreqHzStop frequency in Hz.
Returns

◆ smSetSweepCoupling()

SM_API SmStatus smSetSweepCoupling ( int  device,
double  rbw,
double  vbw,
double  sweepTime 
)

Set sweep RBW/VBW parameters.

Parameters
[in]deviceDevice handle.
[in]rbwResolution bandwidth in Hz.
[in]vbwVideo bandwidth in Hz. Cannot be greater than RBW.
[in]sweepTimeSuggest the total acquisition time of the sweep. Specified in seconds. This parameter is a suggestion and will ensure RBW and VBW are first met before increasing sweep time.
Returns

◆ smSetSweepDetector()

SM_API SmStatus smSetSweepDetector ( int  device,
SmDetector  detector,
SmVideoUnits  videoUnits 
)

Set sweep detector.

Parameters
[in]deviceDevice handle.
[in]detectorNew sweep detector.
[in]videoUnitsNew video processing units.
Returns

◆ smSetSweepScale()

SM_API SmStatus smSetSweepScale ( int  device,
SmScale  scale 
)

Set the sweep mode output unit type.

Parameters
[in]deviceDevice handle.
[in]scaleNew sweep mode units.
Returns

◆ smSetSweepWindow()

SM_API SmStatus smSetSweepWindow ( int  device,
SmWindowType  window 
)

Set sweep mode window function.

Parameters
[in]deviceDevice handle.
[in]windowNew window function.
Returns

◆ smSetSweepSpurReject()

SM_API SmStatus smSetSweepSpurReject ( int  device,
SmBool  spurRejectEnabled 
)

Set sweep mode spur rejection enable/disable.

Parameters
[in]deviceDevice handle.
[in]spurRejectEnabledEnable/disable.
Returns

◆ smSetRealTimeCenterSpan()

SM_API SmStatus smSetRealTimeCenterSpan ( int  device,
double  centerFreqHz,
double  spanHz 
)

Set the center frequency and span for real-time spectrum analysis.

Parameters
[in]deviceDevice handle.
[in]centerFreqHzCenter frequency in Hz.
[in]spanHzSpan in Hz.
Returns

◆ smSetRealTimeRBW()

SM_API SmStatus smSetRealTimeRBW ( int  device,
double  rbw 
)

Set the resolution bandwidth for real-time spectrum analysis.

Parameters
[in]deviceDevice handle.
[in]rbwResolution bandwidth in Hz.
Returns

◆ smSetRealTimeDetector()

SM_API SmStatus smSetRealTimeDetector ( int  device,
SmDetector  detector 
)

Set the detector for real-time spectrum analysis.

Parameters
[in]deviceDevice handle.
[in]detectorNew detector.
Returns

◆ smSetRealTimeScale()

SM_API SmStatus smSetRealTimeScale ( int  device,
SmScale  scale,
double  frameRef,
double  frameScale 
)

Set the sweep and frame units used in real-time spectrum analysis.

Parameters
[in]deviceDevice handle.
[in]scaleScale for the returned sweeps.
[in]frameRefSets the reference level of the real-time frame, or, the amplitude of the highest pixel in the frame.
[in]frameScaleSpecify the height of the frame in dB. A common value is 100dB.
Returns

◆ smSetRealTimeWindow()

SM_API SmStatus smSetRealTimeWindow ( int  device,
SmWindowType  window 
)

Specify the window function used for real-time spectrum analysis.

Parameters
[in]deviceDevice handle.
[in]windowNew window function.
Returns

◆ smSetIQBaseSampleRate()

SM_API SmStatus smSetIQBaseSampleRate ( int  device,
SmIQStreamSampleRate  sampleRate 
)

Set the base sample rate for I/Q streaming.

Parameters
[in]deviceDevice handle.
[in]sampleRateBase sample rate. Any decimation selected occurs on this sample rate. See I/Q Sample Rates for more information.
Returns

◆ smSetIQDataType()

SM_API SmStatus smSetIQDataType ( int  device,
SmDataType  dataType 
)

Set the I/Q data type of the samples returned for I/Q streaming.

Parameters
[in]deviceDevice handle.
[in]dataTypeData type. See I/Q Data Types for more information.
Returns

◆ smSetIQCenterFreq()

SM_API SmStatus smSetIQCenterFreq ( int  device,
double  centerFreqHz 
)

Set the center frequency for I/Q streaming.

Parameters
[in]deviceDevice handle.
[in]centerFreqHzCenter frequency in Hz.
Returns

◆ smGetIQCenterFreq()

SM_API SmStatus smGetIQCenterFreq ( int  device,
double *  centerFreqHz 
)

Get the I/Q streaming center frequency.

Parameters
[in]deviceDevice handle.
[in]centerFreqHzPointer to double.
Returns

◆ smSetIQSampleRate()

SM_API SmStatus smSetIQSampleRate ( int  device,
int  decimation 
)

Set sample rate for I/Q streaming.

Parameters
[in]deviceDevice handle.
[in]decimationDecimation of the I/Q data as a power of 2. See I/Q Sample Rates for more information.
Returns

◆ smSetIQBandwidth()

SM_API SmStatus smSetIQBandwidth ( int  device,
SmBool  enableSoftwareFilter,
double  bandwidth 
)

Specify the software filter bandwidth in I/Q streaming. See I/Q Sample Rates for more information.

Parameters
[in]deviceDevice handle.
[in]enableSoftwareFilterSet to true to enable software filtering (USB devices only). This values is ignored for 10GbE devices.
[in]bandwidthThe bandwidth in Hz.
Returns

◆ smSetIQExtTriggerEdge()

SM_API SmStatus smSetIQExtTriggerEdge ( int  device,
SmTriggerEdge  edge 
)

Configure the external trigger edge detect in I/Q streaming.

Parameters
[in]deviceDevice handle.
[in]edgeSet the external trigger edge.
Returns

◆ smSetIQTriggerSentinel()

SM_API SmStatus smSetIQTriggerSentinel ( double  sentinelValue)

Configure how external triggers are reported for I/Q streaming.

Parameters
[in]sentinelValueValue used to fill the remainder of the trigger buffer when the trigger buffer provided is larger than the number of triggers returned. The default sentinel value is zero. See the I/Q Streaming section for more information on triggering.
Returns

◆ smSetIQQueueSize()

SM_API SmStatus smSetIQQueueSize ( int  device,
float  ms 
)

Controls the size of the queue of data that is being actively requested by the API. For example, a queue size of 20ms means the API keeps up to 20ms of data requests active. A larger queue size means a greater tolerance to data loss in the event of an interruption. Because once data is requested, it’s transfer must be completed, a smaller queue size can give you faster reconfiguration times. For instance, if you wanted to change frequencies quickly, a smaller queue size would allow this. A default is chosen for the best resistance to data loss for both Linux and Windows. If you are on Linux and you are using multiple devices, please see Linux Notes.

Parameters
[in]deviceDevice handle
[in]msQueue size in ms. Will be clamped to multiples of 2.62ms between 2 * 2.62ms and 16 * 2.62ms.
Returns

◆ smSetIQSweepListDataType()

SM_API SmStatus smSetIQSweepListDataType ( int  device,
SmDataType  dataType 
)

Set the data type for data returned for I/Q sweep list measurements.

Parameters
[in]deviceDevice handle.
[in]dataTypeSee I/Q Data Types for more information.
Returns

◆ smSetIQSweepListCorrected()

SM_API SmStatus smSetIQSweepListCorrected ( int  device,
SmBool  corrected 
)

Set whether the data returns for I/Q sweep list meausurements is full-scale or corrected.

Parameters
[in]deviceDevice handle.
[in]correctedSet to false for the data to be returned as full scale, and true to be returned amplitude corrected. See I/Q Data Types for more information on how to perform these conversions.
Returns

◆ smSetIQSweepListSteps()

SM_API SmStatus smSetIQSweepListSteps ( int  device,
int  steps 
)

Set the number frequency steps for I/Q sweep list measurements.

Parameters
[in]deviceDevice handle.
[in]stepsNumber of frequency steps in I/Q sweep.
Returns

◆ smGetIQSweepListSteps()

SM_API SmStatus smGetIQSweepListSteps ( int  device,
int *  steps 
)

Get the number steps in the I/Q sweep list measurement.

Parameters
[in]deviceDevice handle.
[out]stepsPointer to int.
Returns

◆ smSetIQSweepListFreq()

SM_API SmStatus smSetIQSweepListFreq ( int  device,
int  step,
double  freq 
)

Set the center frequency of the acquisition at a given step for the I/Q sweep list measurement.

Parameters
[in]deviceDevice handle.
[in]stepStep at which to configure the center frequency. Should be between [0, steps-1] where steps is set in the smSetIQSweepListSteps function.
[in]freqCenter frequency in Hz.
Returns

◆ smSetIQSweepListRef()

SM_API SmStatus smSetIQSweepListRef ( int  device,
int  step,
double  level 
)

Set the reference level for a step for the I/Q sweep list measurement.

Parameters
[in]deviceDevice handle.
[in]stepStep at which to configure the center frequency. Should be between [0, steps-1] where steps is set in the smSetIQSweepListSteps function.
[in]levelReference level in dBm. If this is set, attenuation is set to automatic for this step.
Returns

◆ smSetIQSweepListAtten()

SM_API SmStatus smSetIQSweepListAtten ( int  device,
int  step,
int  atten 
)

Set the attenuation for a step for the I/Q sweep list measurement.

Parameters
[in]deviceDevice handle.
[in]stepStep at which to configure the center frequency. Should be between [0, steps-1] where steps is set in the smSetIQSweepListSteps function.
[in]attenAttenuation value between [0,6] representing [0,30] dB of attenuation (5dB steps). Setting the attenuation to -1 forces the attenuation to auto, at which time the reference level is used to control the attenuator instead.
Returns

◆ smSetIQSweepListSampleCount()

SM_API SmStatus smSetIQSweepListSampleCount ( int  device,
int  step,
uint32_t  samples 
)

Set the number of I/Q samples to be collected at each step.

Parameters
[in]deviceDevice handle.
[in]stepStep at which to configure the center frequency. Should be between [0, steps-1] where steps is set in the smSetIQSweepListSteps function.
[in]samplesNumber of samples. Must be greater than 0. There is no upper limit, but keep in mind contiguous memory must be allocated for the capture. Memory allocation for the capture is the responsibility of the user program.
Returns

◆ smSetSegIQDataType()

SM_API SmStatus smSetSegIQDataType ( int  device,
SmDataType  dataType 
)

Set the data type for the data returned for segmented I/Q captures.

Parameters
[in]deviceDevice handle.
[in]dataTypeNew data type.
Returns

◆ smSetSegIQCenterFreq()

SM_API SmStatus smSetSegIQCenterFreq ( int  device,
double  centerFreqHz 
)

Set the center frequency for segmeneted I/Q captures.

Parameters
[in]deviceDevice handle.
[in]centerFreqHzCenter frequency in Hz.
Returns

◆ smSetSegIQVideoTrigger()

SM_API SmStatus smSetSegIQVideoTrigger ( int  device,
double  triggerLevel,
SmTriggerEdge  triggerEdge 
)

Configure the video trigger available in segmented I/Q captures. Only 1 video trigger configuration can be set.

Parameters
[in]deviceDevice handle.
[in]triggerLevelTrigger level in dBm.
[in]triggerEdgeVideo trigger edge type.
Returns

◆ smSetSegIQExtTrigger()

SM_API SmStatus smSetSegIQExtTrigger ( int  device,
SmTriggerEdge  extTriggerEdge 
)

Configure the external trigger available in segmented I/Q captures. Only 1 external trigger configuration can be set.

Parameters
[in]deviceDevice handle.
[in]extTriggerEdgeExternal trigger edge type.
Returns

◆ smSetSegIQFMTParams()

SM_API SmStatus smSetSegIQFMTParams ( int  device,
int  fftSize,
const double *  frequencies,
const double *  ampls,
int  count 
)

Configure the frequency mask trigger available in segmented I/Q captures. Only 1 frequency mask trigger configuration can be set.

Parameters
[in]deviceDevice handle.
[in]fftSizeSize of the FFT used for FMT triggering. This value must be a power of two between 512 and 16384. The frequency/amplitude mask provided by the user is linearly interpolated and tested at each of the FFT result bins. Smaller FFT sizes provide more time resolution at the expense of frequency resolution, while larger FFT sizes improve frequency resolution at the expense of time resolution. The complex FFT is performed at the 250MS/s I/Q samples with a 50% overlap.
[in]frequenciesArray of count frequencies, specified as Hz, specifying the frequency points of the FMT mask.
[in]amplsArray of count amplitudes, specified as dBm, specifying the amplitude threshold limits of the FMT mask.
[in]countNumber of FMT points in the frequencies and ampls arrays.
Returns

◆ smSetSegIQSegmentCount()

SM_API SmStatus smSetSegIQSegmentCount ( int  device,
int  segmentCount 
)

Set the number of segments in the segmented I/Q captures.

Parameters
[in]deviceDevice handle.
[in]segmentCountNumber of segments. Must be set before configuring each segment.
Returns

◆ smSetSegIQSegment()

SM_API SmStatus smSetSegIQSegment ( int  device,
int  segment,
SmTriggerType  triggerType,
int  preTrigger,
int  captureSize,
double  timeoutSeconds 
)

Configure a segment for segmented I/Q captures.

Parameters
[in]deviceDevice handle.
[in]segmentSegment to configure. Must be between [0,segmentCount-1] where segmentCount is set in smSetSegIQSegmentCount.
[in]triggerTypeSpecify the trigger used for this segment.
[in]preTriggerThe number of samples to capture before the trigger event. This is in addition to the capture size. For immediate trigger, pretrigger is added to capture size and then set to zero.
[in]captureSizeThe number of sample to capture after the trigger event. For immediate triggers, pretrigger is added to this value and pretrigger is set to zero.
[in]timeoutSecondsThe amount of time to wait for the trigger before returning. If a timeout occurs, a capture still occurs at the moment of the timeout and the API will report a timeout condition.
Returns

◆ smSetAudioCenterFreq()

SM_API SmStatus smSetAudioCenterFreq ( int  device,
double  centerFreqHz 
)

Set the center frequency for audio demodulation.

Parameters
[in]deviceDevice handle.
[in]centerFreqHzCenter frequency in Hz.
Returns

◆ smSetAudioType()

SM_API SmStatus smSetAudioType ( int  device,
SmAudioType  audioType 
)

Set the audio demodulator for audio demodulation.

Parameters
[in]deviceDevice handle.
[in]audioTypeDemodulator.
Returns

◆ smSetAudioFilters()

SM_API SmStatus smSetAudioFilters ( int  device,
double  ifBandwidth,
double  audioLpf,
double  audioHpf 
)

Set the audio demodulation filters for audio demodulation.

Parameters
[in]deviceDevice handle.
[in]ifBandwidthIF bandwidth (RBW) in Hz.
[in]audioLpfAudio low pass frequency in Hz.
[in]audioHpfAudio high pass frequency in Hz.
Returns

◆ smSetAudioFMDeemphasis()

SM_API SmStatus smSetAudioFMDeemphasis ( int  device,
double  deemphasis 
)

Set the FM deemphasis for audio demodulation.

Parameters
[in]deviceDevice handle.
[in]deemphasisDeemphasis in us.
Returns

◆ smConfigure()

SM_API SmStatus smConfigure ( int  device,
SmMode  mode 
)

This function configures the receiver into a state determined by the mode parameter. All relevant configuration routines must have already been called. This function calls smAbort to end the previous measurement mode before attempting to configure the receiver. If any error occurs attempting to configure the new measurement state, the previous measurement mode will no longer be active.

Parameters
[in]deviceDevice handle.
[in]modeNew measurement mode.
Returns

◆ smGetCurrentMode()

SM_API SmStatus smGetCurrentMode ( int  device,
SmMode mode 
)

Retrieve the current device measurement mode.

Parameters
[in]deviceDevice handle.
[in]modePointer to SmMode.
Returns

◆ smAbort()

SM_API SmStatus smAbort ( int  device)

This function ends the current measurement mode and puts the device into the idle state. Any current measurements are completed and discarded and will not be accessible after this function returns.

Parameters
[in]deviceDevice handle.
Returns

◆ smGetSweepParameters()

SM_API SmStatus smGetSweepParameters ( int  device,
double *  actualRBW,
double *  actualVBW,
double *  actualStartFreq,
double *  binSize,
int *  sweepSize 
)

Retrieves the sweep parameters for an active sweep measurement mode. This function should be called after a successful device configuration to retrieve the sweep characteristics.

Parameters
[in]deviceDevice handle.
[out]actualRBWReturns the RBW being used in Hz. Can be NULL.
[out]actualVBWReturns the VBW being used in Hz. Can be NULL.
[out]actualStartFreqReturns the frequency of the first bin in Hz. Can be NULL.
[out]binSizeReturns the frequency spacing between each frequency bin in the sweep in Hz.
[out]sweepSizeReturns the length of the sweep (number of frequency bins). Can be NULL.
Returns

◆ smGetRealTimeParameters()

SM_API SmStatus smGetRealTimeParameters ( int  device,
double *  actualRBW,
int *  sweepSize,
double *  actualStartFreq,
double *  binSize,
int *  frameWidth,
int *  frameHeight,
double *  poi 
)

Retrieve the real-time measurement mode parameters for an active real-time configuration. This function is typically called after a successful device configuration to retrieve the real-time sweep and frame characteristics.

Parameters
[in]deviceDevice handle.
[out]actualRBWReturns the RBW used in Hz. Can be NULL.
[out]sweepSizeReturns the number of frequency bins in the sweep. Can be NULL.
[out]actualStartFreqReturns the frequency of the first bin in the sweep in Hz. Can be NULL.
[out]binSizeFrequency bin spacing in Hz. Can be NULL.
[out]frameWidthThe width of the real-time frame. Can be NULL.
[out]frameHeightThe height of the real-time frame. Can be NULL.
[out]poi100% probability of intercept of a signal given the current configuration. Can be NULL.
Returns

◆ smGetIQParameters()

SM_API SmStatus smGetIQParameters ( int  device,
double *  sampleRate,
double *  bandwidth 
)

Retrieve the I/Q measurement mode parameters for an active I/Q stream or segmented I/Q capture configuration. This function is called after a successful device configuration.

Parameters
[in]deviceDevice handle.
[out]sampleRateThe sample rate in Hz. Can be NULL.
bandwidthThe bandwidth of the I/Q capture in Hz. Can be NULL.
Returns

◆ smGetIQCorrection()

SM_API SmStatus smGetIQCorrection ( int  device,
float *  scale 
)

Retrieve the I/Q correction factor for an active I/Q stream or segmented I/Q capture. This function is called after a successful device configuration.

Parameters
[in]deviceDevice handle.
[out]scaleAmplitude correction used by the API to convert from full scale I/Q to amplitude corrected I/Q. The formulas for these conversions are in the I/Q Data Types section.
Returns

◆ smIQSweepListGetCorrections()

SM_API SmStatus smIQSweepListGetCorrections ( int  device,
float *  corrections 
)

Retrieve the correctsions used to convert full scale I/Q values to amplitude corrected I/Q values for the I/Q sweep list measurement. A correction is returned for each step configured. The device must be configured for I/Q sweep list measurements before calling this function.

Parameters
[in]deviceDevice handle.
[out]correctionsPointer to an array. Array should length >= number of steps configured for the I/Q sweep list measurement. A correction value will be returned for each step configured.
Returns

◆ smSegIQGetMaxCaptures()

SM_API SmStatus smSegIQGetMaxCaptures ( int  device,
int *  maxCaptures 
)

This function is called after the device is successfully configured for segmented I/Q acquisition. Returns the maximum number of queued captures that can be active. This is calculated with the formula (250 / # of segments in each capture). See I/Q Segmented Captures for more information.

Parameters
[in]deviceDevice handle.
[out]maxCapturesThe maximum number of queued segmented acquisitions that can be active at any time.
Returns

◆ smGetSweep()

SM_API SmStatus smGetSweep ( int  device,
float *  sweepMin,
float *  sweepMax,
int64_t *  nsSinceEpoch 
)

Perform a single sweep. Block until the sweep completes. Internally, this function is implemented as calling smStartSweep followed by smFinishSweep with a sweep position of zero (0). This means that if you want to mix the blocking and queue sweep acquisitions, avoid using index zero for queued sweeps.

Parameters
[in]deviceDevice handle.
[out]sweepMinCan be NULL.
[out]sweepMaxCan be NULL.
[out]nsSinceEpochNanoseconds since epoch. Timestamp representing the end of the sweep. Can be NULL.
Returns

◆ smSetSweepGPIO()

SM_API SmStatus smSetSweepGPIO ( int  device,
int  pos,
uint8_t  data 
)

Set the GPIO setting to use for a queued sweep. The next time this sweep is started, the GPIO will change to this value just prior to the sweep starting.

Parameters
[in]deviceDevice handle.
[in]posSweep queue position.
[in]dataData used to set the GPIO pins. Each bit represents a single GPIO pin.
Returns

◆ smStartSweep()

SM_API SmStatus smStartSweep ( int  device,
int  pos 
)

Start a sweep at the queue position. If successful, this function returns immediately.

Parameters
[in]deviceDevice handle.
[in]posSweep queue position.
Returns

◆ smFinishSweep()

SM_API SmStatus smFinishSweep ( int  device,
int  pos,
float *  sweepMin,
float *  sweepMax,
int64_t *  nsSinceEpoch 
)

Finish a previously started queued sweep. Blocks until the sweep completes.

Parameters
[in]deviceDevice handle.
[in]posSweep queue position.
[out]sweepMinCan be NULL.
[out]sweepMaxCan be NULL.
[out]nsSinceEpochNanoseconds since epoch. Timestamp representing the end of the sweep. Can be NULL.
Returns

◆ smGetRealTimeFrame()

SM_API SmStatus smGetRealTimeFrame ( int  device,
float *  colorFrame,
float *  alphaFrame,
float *  sweepMin,
float *  sweepMax,
int *  frameCount,
int64_t *  nsSinceEpoch 
)

Retrieve a single real-time frame. See Real-Time Spectrum Analysis for more information.

Parameters
[in]deviceDevice handle.
[out]colorFramePointer to memory for the frame. Must be (frameWidth * frameHeight) floats in size. Can be NULL.
[out]alphaFramePointer to memory for the frame. Must be (frameWidth * frameHeight) floats in size. Can be NULL.
[out]sweepMinCan be NULL.
[out]sweepMaxCan be NULL.
[out]frameCountUnique integer which refers to a real-time frame and sweep. The frame count starts at zero following a device reconfigure and increments by one for each frame.
[out]nsSinceEpochNanoseconds since epoch for the returned frame. For real-time mode, this value represents the time at the end of the real-time acquisition and processing of this given frame. It is approximate. Can be NULL.
Returns

◆ smGetIQ()

SM_API SmStatus smGetIQ ( int  device,
void *  iqBuf,
int  iqBufSize,
double *  triggers,
int  triggerBufSize,
int64_t *  nsSinceEpoch,
SmBool  purge,
int *  sampleLoss,
int *  samplesRemaining 
)

Retrieve one block of I/Q data as specified by the user. This function blocks until the data requested is available.

Parameters
[in]deviceDevice handle.
[out]iqBufPointer to user allocated buffer of complex values. The buffer size must be at least (iqBufSize * 2 * sizeof(dataTypeSelected)). Cannot be NULL. Data is returned as interleaved contiguous complex samples. For more information on the data returned and the selectable data types, see I/Q Data Types.
[in]iqBufSizeSpecifies the number of I/Q samples to be retrieves. Must be greater than zero.
[out]triggersPointer to user allocated array of doubles. The buffer must be at least triggerBufSize contiguous doubles. The pointer can also be NULL to indicate you do not wish to receive external trigger information. See I/Q Streaming section for more information on triggers.
[in]triggerBufSizeSpecifies the size of the triggersr array. If the triggers array is NULL, this value should be zero.
[out]nsSinceEpochNanoseconds since epoch. The time of the first I/Q sample returned. Can be NULL. See GPS and Timestamps for more information.
[in]purgeWhen set to smTrue, any buffered I/Q data in the API is purged before returned beginning the I/Q block acquisition.
[out]sampleLossSet by the API when a sample loss condition occurs. If enough I/Q data has accumulated in the internal API circular buffer, the buffer is cleared and the sample loss flag is set. If purge is set to true, the sample flag will always be set to SM_FALSE. Can be NULL.
[out]samplesRemainingSet by the API, returns the number of samples remaining in the I/Q circular buffer. Can be NULL.
Returns

◆ smIQSweepListGetSweep()

SM_API SmStatus smIQSweepListGetSweep ( int  device,
void *  dst,
int64_t *  timestamps 
)

Perform an I/Q sweep. Blocks until the sweep is complete. Can only be called if no sweeps are in the queue.

Parameters
[in]deviceDevice handle.
[out]dstPointer to memory allocated for sweep. The user must allocate this memory before calling this function. Must be large enough to contain all samples for all steps in a sweep. The memory must be contiguous. The samples in the sweep are placed contiguously into the array (step 1 samples follow step 0, step 2 follows step 1, etc). Samples are tightly packed. It is the responsibility of the user to properly index the arrays when finished. The array will be cast to the user selected data type internally in the API.
[out]timestampsPointer to memory allocated for timestamps. The user must allocate this memory before calling these functions. Must be an array of steps int64_t’s, where steps are the number of frequency steps in the sweep. When the sweep completes each timestamp in the array represents the time of the first sample at that frequency in the sweep. Can be NULL.
Returns

◆ smIQSweepListStartSweep()

SM_API SmStatus smIQSweepListStartSweep ( int  device,
int  pos,
void *  dst,
int64_t *  timestamps 
)

Starts an I/Q sweep at the given queue position. Up to 16 sweeps can be queue.

Parameters
[in]deviceDevice handle.
[in]posSweep queue position. Must be between [0,15].
[out]dstPointer to memory allocated for sweep. The user must allocate this memory before calling this function. Must be large enough to contain all samples for all steps in a sweep. The memory must be contiguous. The samples in the sweep are placed contiguously into the array (step 1 samples follow step 0, step 2 follows step 1, etc). Samples are tightly packed. It is the responsibility of the user to properly index the arrays when finished. The array will be cast to the user selected data type internally in the API.
[out]timestampsPointer to memory allocated for timestamps. The user must allocate this memory before calling these functions. Must be an array of steps int64_t’s, where steps are the number of frequency steps in the sweep. When the sweep completes each timestamp in the array represents the time of the first sample at that frequency in the sweep. Can be NULL.
Returns

◆ smIQSweepListFinishSweep()

SM_API SmStatus smIQSweepListFinishSweep ( int  device,
int  pos 
)

Finishes an I/Q sweep at the given queue position. Blocks until the sweep is finished.

Parameters
[in]deviceDevice handle.
[in]posSweep queue position. Must be betwee [0,15].
Returns

◆ smSegIQCaptureStart()

SM_API SmStatus smSegIQCaptureStart ( int  device,
int  capture 
)

Initializes a segmented I/Q capture with the given capture index. If no other captures are active, this capture begins immediately.

Parameters
[in]deviceDevice handle.
[in]captureCapture index, must be between [0, maxCaptures-1].
Returns

◆ smSegIQCaptureWait()

SM_API SmStatus smSegIQCaptureWait ( int  device,
int  capture 
)

Waits for a capture to complete. This is a blocking function. To determine if a capture is complete without blocking, use the smSegIQCaptureWaitAsync function.

Parameters
[in]deviceDevice index.
[in]captureCapture index, must be between [0, maxCaptures-1].
Returns

◆ smSegIQCaptureWaitAsync()

SM_API SmStatus smSegIQCaptureWaitAsync ( int  device,
int  capture,
SmBool completed 
)

Queries whether the capture is completed. This is a non-blocking function.

Parameters
[in]deviceDevice handle.
[in]captureCapture index, must be between [0, maxCaptures-1].
[out]completedReturns true if the capture is completed.
Returns

◆ smSegIQCaptureTimeout()

SM_API SmStatus smSegIQCaptureTimeout ( int  device,
int  capture,
int  segment,
SmBool timedOut 
)

Determines if the capture timed out.

Parameters
[in]deviceDevice handle.
[in]captureCapture index, must be between [0, maxCaptures-1].
[in]segmentSegment index within capture. Must be between [0,segmentCount-1].
[out]timedOutReturns true if the segment was not triggered in time according to the configuration and a timeout occurred.
Returns

◆ smSegIQCaptureTime()

SM_API SmStatus smSegIQCaptureTime ( int  device,
int  capture,
int  segment,
int64_t *  nsSinceEpoch 
)

Retrieve the timestamp of the capture. The capture should be completed before calling this function.

Parameters
[in]deviceDevice handle.
[in]captureCapture index, must be between [0, maxCaptures-1].
[in]segmentSegment index within capture. Must be between [0,segmentCount-1].
[out]nsSinceEpochNanoseconds since epoch of first sample in capture. If the GPS is locked, this time is synchronized to GPS, otherwise the time is synchronized to the system clock and the system sample rate. When using the system clock, the PC system clock is cached for the first time returned, and all subsequent timings are extrapolated from the first clock using the system clock. If over 16 seconds pass between segment acquisitions, a new CPU system clock is cached. This ensures very accurate relative timings for closely spaced acquisitions when a GPS is not present.
Returns

◆ smSegIQCaptureRead()

SM_API SmStatus smSegIQCaptureRead ( int  device,
int  capture,
int  segment,
void *  iq,
int  offset,
int  len 
)

Retrieves the I/Q sampes of the capture. The capture should be completed before calling this function.

Parameters
[in]deviceDevice handle.
[in]captureCapture index, must be between [0, maxCaptures-1].
[in]segmentSegment index within capture. Must be between [0,segmentCount-1].
[out]iqUser provided I/Q buffer of len complex samples. Should be large enough to accommodate 32-bit complex floats or 16-bit complex shorts depending on the data type selected by smSegIQSetDataType.
[in]offsetI/Q sample offset into segment to retrieve.
[in]lenNumber of samples after the offset to retrive.
Returns

◆ smSegIQCaptureFinish()

SM_API SmStatus smSegIQCaptureFinish ( int  device,
int  capture 
)

Frees the capture so that it can be started again.

Parameters
[in]deviceDevice handle.
[in]captureCapture index, must be between [0, maxCaptures-1].
Returns

◆ smSegIQCaptureFull()

SM_API SmStatus smSegIQCaptureFull ( int  device,
int  capture,
void *  iq,
int  offset,
int  len,
int64_t *  nsSinceEpoch,
SmBool timedOut 
)

Convenience function for captures that only have 1 segment. Performs the full start/wait/time/read/finish sequences.

Parameters
[in]deviceDevice handle.
[in]captureCapture index, must be between [0, maxCaptures-1].
[out]iqUser provided I/Q buffer of len complex samples. Should be large enough to accommodate 32-bit complex floats or 16-bit complex shorts depending on the data type selected by smSegIQSetDataType.
[in]offsetI/Q sample offset into segment to retrieve.
[in]lenNumber of samples after the offset to retrive.
[out]nsSinceEpochNanoseconds since epoch of first sample in capture.
[out]timedOutReturns true if the segment was not triggered in time according to the configuration and a timeout occurred.
Returns

◆ smSegIQLTEResample()

SM_API SmStatus smSegIQLTEResample ( float *  input,
int  inputLen,
float *  output,
int *  outputLen,
bool  clearDelayLine 
)

This function is a convenience function for resampling the 250MS/s I/Q output of the segmented I/Q captures to a 245.76MS/s rate required for LTE demodulation. This is a complex to complex resample using a polyphase resample filter with resample fraction 3072/3125. Filter performance is ~24M samples per second. For example, if you provided a 200M sample input, this function would take approximately 8.3 seconds to complete.

Parameters
[in]inputPointer to input array. Input array should be interleaved I/Q samples retrieved from the segmented I/Q capture functions.
[in]inputLenNumber of complex I/Q samples in input.
[out]outputPointer to destination buffer. Should be large enough to accept a resampled input. To guarantee this, a simple approach would be to ensure the output buffer is the same size as the input buffer.
[in,out]outputLenThe integer pointed to by outputLen should initially be the size of the output buffer. If the function returns successfully, the integer pointed to by outputLen will contain the number of I/Q samples in the output buffer.
[in]clearDelayLineSet to true to clear the filter delay line. Set to true when providing the first set of samples in a capture. If the samples provided are a continuation of a capture, set this to false.
Returns

◆ smSetIQFullBandAtten()

SM_API SmStatus smSetIQFullBandAtten ( int  device,
int  atten 
)

Configure the attenuation for the full band I/Q measurement.

Parameters
[in]deviceDevice handle.
[in]attenValue between [0,6]. Sets the attenuator in 5dB steps between [0,30]dB. Cannot be set to auto (-1).
Returns

◆ smSetIQFullBandCorrected()

SM_API SmStatus smSetIQFullBandCorrected ( int  device,
SmBool  corrected 
)

Enable/disable the I/Q flatness and imbalance corrections for full band I/Q measurements.

Parameters
[in]deviceDevice handle.
[in]correctedWhen set to smTrue, the IF image and flatness response is corrected. When set to smFalse, no corrections are applied. RF leveling corrections are not applied at any point. Data returned is full scale.
Returns

◆ smSetIQFullBandSamples()

SM_API SmStatus smSetIQFullBandSamples ( int  device,
int  samples 
)

Set the number of samples to be collected in full band I/Q measurements.

Parameters
[in]deviceDevice handle.
[in]samplesNumber of samples between [2048, 32768]. For full band I/Q sweeps, this is the number of samples to be collected at each freuqency.
Returns

◆ smSetIQFullBandTriggerType()

SM_API SmStatus smSetIQFullBandTriggerType ( int  device,
SmTriggerType  triggerType 
)

Configure the I/Q full band trigger type.

Parameters
[in]deviceDevice handle.
[in]triggerTypeCan be set to immediate, video, or external only. Video trigger is only available for certain devices. See I/Q Full Band for more information.
Returns

◆ smSetIQFullBandVideoTrigger()

SM_API SmStatus smSetIQFullBandVideoTrigger ( int  device,
double  triggerLevel 
)

Configure the video trigger level for full band I/Q measurements.

Parameters
[in]deviceDevice handle.
[in]triggerLevelTrigger level in dBFS.
Returns

◆ smSetIQFullBandTriggerTimeout()

SM_API SmStatus smSetIQFullBandTriggerTimeout ( int  device,
double  triggerTimeout 
)

Specify the video/external trigger timeout for full band I/Q captures. This is how long the device will wait for a trigger. This setting can only be changed for devices that support video triggering. See I/Q Full Band for more information. If the device does not support video triggering, this value is fixed at 1 second.

Parameters
[in]deviceDevice handle.
[in]triggerTimeoutTimeout in seconds. Can be between [0,1].
Returns

◆ smGetIQFullBand()

SM_API SmStatus smGetIQFullBand ( int  device,
float *  iq,
int  freq 
)

The device must be idle to call this function. When this function returns the device is left in the idle state. This function fully configures and performs this measurement before returning. Calling smConfigure is not required.

See smSetIQFullBand*** functions for all configuration parameters associated with this capture.

This function acquires I/Q samples at the baseband 500MS/s sample rate at a single frequency. While the IF flatness and image corrections can be applied, RF leveling corrections are not applied. The I/Q data is in full scale. This function can be useful for measuring short transients or fast rise times.

When external or video trigger is selected, the SM device will wait up to the configured timeout period before capturing. The capture will automatically trigger after this wait period and no trigger has occurred. If the trigger is detected, the capture will return immediately.

There is approximately 48ns of pre-trigger for any video or external trigger capture. This is ~24 samples of pre-trigger.

There is no indication that the trigger occurred. The customer will need to inspect the data to verify if a trigger occurred. One possible way to detect whether a trigger occurred is to time the duration of this function call with a long trigger timeout (for example, 1 second). If the function returns much sooner than the timeout period, a trigger likely occurred.

See the SDK for an example of using this function.

Parameters
[in]deviceDevice handle.
[out]iqPointer to array of interleaved I/Q values. The size of the array should be equal to the number of samples set in the smSetIQFullBandSamples function. When the function returns successfully, this array will contain the captured data.
[in]freqSets the frequency in 39.0625MHz steps. The center frequency of the capture is equal to (freq + 1) * 39.0625MHz.
Returns

◆ smGetIQFullBandSweep()

SM_API SmStatus smGetIQFullBandSweep ( int  device,
float *  iq,
int  startIndex,
int  stepSize,
int  steps 
)

The device must be idle to call this function. When this function returns the device is left in the idle state. This function fully configures and performs this measurement before returning. Calling smConfigure is not required.

See smSetIQFullBand*** functions for all configuration parameters associated with this capture.

This function acquires I/Q samples at the baseband 500MS/s sample rate at several different frequencies.

The frequency indices that data are collected at are equal to

startIndex + N * stepSize

where N is in the range of [0, steps-1]. The center frequency of any given frequency index is,

(index + 1) * 39.0625MHz.

For example, with a startIndex = 26, step = 4, and stepSize = 9, the frequency indices at which data is collected are

(26, 35, 44, 53)

which correspond to the center frequencies,

(1054.6875 MHz, 1406.25 MHz, 1757.8125 MHz, 2070.3125 MHz).

Center frequencies below 650MHz have reduced bandwidth. Above 650MHz, the maximum step size while still maintaining full frequency coverage is 9 (or 351.5625 MHz per step). Reasonable parameters for sweeping from 600MHz to 20GHz with full frequency coverage are startIndex = 16, stepSize = 9, and steps = 56.

While the IF flatness and image corrections can be applied, RF leveling corrections are not applied. The amplitude is in full scale. This function can be useful for measuring short transients or fast rise times.

Full band sweeps cannot be used in conjunction with triggering. For full band sweeps, immediate triggering is used.

See the SDK for an example of using this function.

Parameters
[in]deviceDevice handle.
[out]iqPointer to an array of steps * samplesPerStep number of interleaved complex values, or 2 * steps * samplesPerStep floating point values. When this function returns data will be stored contiguously in this array. The data at step N is in the index range of [N*samplesPerStep, (N+1)*samplesPerStep-1]. (zero-based indexing) Samples per step is determined by the smSetIQFullBandSamples function.
[in]startIndexThe frequency index of the first acquisition. See the description for how the frequencies are determined.
[in]stepSizeDetermines the frequency index step size between each acquisition. Can be zero or negative. See the description for more information.
[in]stepsDetermines the number of steps at which I/Q data is collected. Must be in the range of [1, 64]. See the description for more information.
Returns

◆ smGetAudio()

SM_API SmStatus smGetAudio ( int  device,
float *  audio 
)

If the device is configured to audio demodulation, use this function to retrieve the next 1000 audio samples. This function will block until the data is ready. Minor buffering of audio data is performed in the API, so it is necessary this function is called repeatedly if contiguous audio data is required. The values returned range between [-1.0, 1.0] representing full-scale audio. In FM mode, the audio values will scale with a change in IF bandwidth.

Parameters
[in]deviceDevice handle.
[out]audioPointer to array of 1000 32-bit floats.
Returns

◆ smGetGPSInfo()

SM_API SmStatus smGetGPSInfo ( int  device,
SmBool  refresh,
SmBool updated,
int64_t *  secSinceEpoch,
double *  latitude,
double *  longitude,
double *  altitude,
char *  nmea,
int *  nmeaLen 
)

Acquire the latest GPS information which includes a time stamp, location information, and NMEA sentences. The GPS info is updated once per second at the PPS interval. This function can be called while measurements are active. For devices with GPS write capability (see Writing Messages to the GPS) this function has slightly modified behavior. The nmea data will update once per second even when GPS lock is not present. This allows users to retrieve msg responses as a result of sending a message with the smWriteToGPS function. NMEA data can contain null values. When parsing, do not use the null delimiter to mark the end of the message, use the returned nmeaLen.

Parameters
[in]deviceDevice handle.
[in]refreshWhen set to true and the device is not in a streaming mode, the API will request the latest GPS information. Otherwise the last retrieved data is returned.
[out]updatedWill be set to true if the NMEA data has been updated since the last time the user called this function. Can be set to NULL.
[out]secSinceEpochNumber of seconds since epoch as reported by the GPS NMEA sentences. Last reported value by the GPS. If the GPS is not locked, this value will be set to zero. Can be NULL.
[out]latitudeLatitude in decimal degrees. If the GPS is not locked, this value will be set to zero. Can be NULL.
[out]longitudeLongitude in decimal degrees. If the GPS is not locked, this value will be set to zero. Can be NULL.
[out]altitudeAltitude in meters. If the GPS is not locked, this value will be set to zero. Can be NULL.
[out]nmeaPointer to user allocated array of char. The length of this array is specified by the nmeaLen parameter. Can be set to NULL.
[in,out]nmeaLenPointer to an integer. The integer will initially specify the length of the nmea buffer. If the nmea buffer is shorter than the NMEA sentences to be returned, the API will only copy over nmeaLen characters, including the null terminator. After the function returns, nmeaLen will be the length of the copied nmea data, including the null terminator. Can be set to NULL. If NULL, the nmea parameter is ignored.
Returns

◆ smWriteToGPS()

SM_API SmStatus smWriteToGPS ( int  device,
const uint8_t *  mem,
int  len 
)

Receivers must have GPS write capability to use this function. See Writing Messages to the GPS. Use this function to send messages to the internal u-blox M8 GPS. Messages provided are rounded/padded up to the next multiple of 4 bytes. The padded bytes are set to zero.

Parameters
[in]deviceDevice handle.
[in]memThe message to send to the GPS.
[in]lenThe length of the message in bytes.
Returns

◆ smSetFanThreshold()

SM_API SmStatus smSetFanThreshold ( int  device,
int  temp 
)

Specify the temperature at which the fan should be enabled. This function has no effect if the optional fan assembly is not installed. The available temperature range is between [10-90] degrees. This function must be called when the device is idle (no measurement mode active).

Parameters
[in]deviceDevice handle.
[in]tempTemperature in C.
Returns

◆ smGetFanThreshold()

SM_API SmStatus smGetFanThreshold ( int  device,
int *  temp 
)

Get current fan temperature threshold.

Parameters
[in]deviceDevice handle.
[out]tempTemperature in C.
Returns

◆ smSetIFOutput()

SM_API SmStatus smSetIFOutput ( int  device,
double  frequency 
)

This command configures the down converted IF output. The device must be idle before calling this function. When this function returns successfully, the RF input will be down converted from the specified frequency to 1.5GHz, output on the 10MHz output port. Use smSetAttenuator and smSetRefLevel to adjust device sensitivity. See SM435 IF Output Option for more information.

Parameters
[in]deviceDevice handle.
[in]frequencyInput frequency between [24GHz, 43.5GHz], as Hz.
Returns

◆ smGetCalDate()

SM_API SmStatus smGetCalDate ( int  device,
uint64_t *  lastCalDate 
)

Returns the last device adjustment date.

Parameters
[in]deviceDevice handle.
[out]lastCalDateLast adjustment data as seconds since epoch.
Returns

◆ smBroadcastNetworkConfig()

SM_API SmStatus smBroadcastNetworkConfig ( const char *  hostAddr,
const char *  deviceAddr,
uint16_t  port,
SmBool  nonVolatile 
)

This function is for networked devices only. This function broadcasts a configuration UDP packet on the host network interface with the IP specified by hostAddr. The device will take on the IP address and port specified by deviceAddr and port.

Parameters
[in]hostAddrThis is the host IP address the broadcast message will be sent on.
[in]deviceAddrThis is the address the device will use if it receives the broadcast message.
[in]portThis is the port the device will use if it receives the broadcast message.
[in]nonVolatileIf set to true, the device will use the address and port on future power ups. As this requires a flash erase/write, setting this value to true reduces the life of the flash memory on the device. We recommend either setting this value to false and broadcasting the configuration before each connect, or only setting the device once up front with the nonvolatile flag set to true.
Returns

◆ smNetworkConfigGetDeviceList()

SM_API SmStatus smNetworkConfigGetDeviceList ( int *  serials,
int *  deviceCount 
)

This function is part of a group of functions used to configure the network settings of a networked SM device over the USB 2.0 port. The handle used for these functions can only be used with the other network config functions.

Parameters
[out]serialsArray of ints. Must be as big as deviceCount.
[in,out]deviceCountPoint to int that contains the size of the serials array. When the function returns it will contain the number of devices returned.
Returns

◆ smNetworkConfigOpenDevice()

SM_API SmStatus smNetworkConfigOpenDevice ( int *  device,
int  serialNumber 
)

This function is part of a group of functions used to configure the network settings of a networked SM device over the USB 2.0 port. The handle used for these functions can only be used with the other network config functions.

Parameters
[out]deviceIf successful, device will point to an integer that can be used to
[in]serialNumberSerial number of the device to open. A list of connected serial numbers can be retrieved from the smNetworkConfigGetDeviceList function.
Returns

◆ smNetworkConfigCloseDevice()

SM_API SmStatus smNetworkConfigCloseDevice ( int  device)

This function is part of a group of functions used to configure the network settings of a networked SM device over the USB 2.0 port. The handle used for these functions can only be used with the other network config functions.

Closes the device and frees any resources. The handle should be closed before interfacing the device through the main API interface.

Parameters
[in]deviceDevice handle.
Returns

◆ smNetworkConfigGetMAC()

SM_API SmStatus smNetworkConfigGetMAC ( int  device,
char *  mac 
)

This function is part of a group of functions used to configure the network settings of a networked SM device over the USB 2.0 port. The handle used for these functions can only be used with the other network config functions.

Retrieve the device MAC address.

Parameters
[in]deviceDevice handle.
[out]macPointer to char buffer, to contain the null terminated MAC address string of the unit, with the following format “XX-XX-XX-XX-XX-XX”. Must be large enough to accommodate this string including null termination.
Returns

◆ smNetworkConfigSetIP()

SM_API SmStatus smNetworkConfigSetIP ( int  device,
const char *  addr,
SmBool  nonVolatile 
)

This function is part of a group of functions used to configure the network settings of a networked SM device over the USB 2.0 port. The handle used for these functions can only be used with the other network config functions.

Set device IP address.

Parameters
[in]deviceDevice handle.
[in]addrpointer to char buffer, to contain the null terminated IP address string of the form “xxx.xxx.xxx.xxx”. For functions retrieving the IP address, the buffer must be large enough to hold this string including null termination.
[in]nonVolatileWhen set to smTrue, setting applied will be written to internal flash, which will persist through a device power cycle.
Returns

◆ smNetworkConfigGetIP()

SM_API SmStatus smNetworkConfigGetIP ( int  device,
char *  addr 
)

This function is part of a group of functions used to configure the network settings of a networked SM device over the USB 2.0 port. The handle used for these functions can only be used with the other network config functions.

Get device IP address.

Parameters
[in]deviceDevice handle.
[out]addrpointer to char buffer, to contain the null terminated IP address string of the form “xxx.xxx.xxx.xxx”. For functions retrieving the IP address, the buffer must be large enough to hold this string including null termination.
Returns

◆ smNetworkConfigSetPort()

SM_API SmStatus smNetworkConfigSetPort ( int  device,
int  port,
SmBool  nonVolatile 
)

This function is part of a group of functions used to configure the network settings of a networked SM device over the USB 2.0 port. The handle used for these functions can only be used with the other network config functions.

Set the device IP port.

Parameters
[in]deviceDevice handle.
[in]portPort number.
[in]nonVolatileWhen set to smTrue, setting applied will be written to internal flash, which will persist through a device power cycle.
Returns

◆ smNetworkConfigGetPort()

SM_API SmStatus smNetworkConfigGetPort ( int  device,
int *  port 
)

This function is part of a group of functions used to configure the network settings of a networked SM device over the USB 2.0 port. The handle used for these functions can only be used with the other network config functions.

Get the device IP port.

Parameters
[in]deviceDevice handle.
[out]portPort number.
Returns

◆ smGetAPIVersion()

SM_API const char * smGetAPIVersion ( )

Get the API version.

Returns
The returned string is of the form

major.minor.revision

Ascii periods ('.') separate positive integers. Major/minor/revision are not guaranteed to be a single decimal digit. The string is null terminated. The string should not be modified or freed by the user. An example string is below…

['3' | '.' | '0' | '.' | '1' | '1' | '\0'] = "3.0.11"

◆ smGetErrorString()

SM_API const char * smGetErrorString ( SmStatus  status)

Retrieve a descriptive string of a SmStatus enumeration. Useful for debugging and diagnostic purposes.

Parameters
[in]statusStatus code returned from any API function.
Returns