PCR4200 API
pcr_api.h File Reference

API functions for the PCR4200 spectrum analyzers. More...

Go to the source code of this file.

Data Structures

struct  PCRDeviceDiagnostics
 

Macros

#define PCR_MAX_DEVICES   (4)
 
#define PCR_DEFAULT_HOST_ADDR   ("192.168.2.2")
 
#define PCR_DEFAULT_DEVICE_ADDR   ("192.168.2.10")
 
#define PCR_DEFAULT_PORT   (51665)
 
#define PCR_DEFAULT_STREAM_PORT   (4991)
 
#define PCR_SWEEP_CHANNEL_DISABLED   (-1)
 
#define PCR_AUTO_ATTEN   (-1)
 
#define PCR_MAX_ATTEN   (6)
 
#define PCR_MIN_FREQ   (100.0e3)
 
#define PCR_MAX_FREQ   (20.0e9)
 
#define PCR_SWEEP_MIN_SPAN   (100.0)
 
#define PCR_SWEEP_MIN_RBW   (100.0)
 
#define PCR_SWEEP_MAX_RBW   (10.0e6)
 
#define PCR_MIN_SWEEP_TIME   (1.0e-6)
 
#define PCR_MAX_SWEEP_TIME   (1.0)
 
#define PCR_MIN_REF_LVL   (-130.0)
 
#define PCR_MAX_REF_LVL   (20.0)
 
#define PCR_STREAM_SR   (50.0e6)
 
#define PCR_STREAM_MIN_DECIMATION   (1)
 
#define PCR_STREAM_MAX_DECIMATION   (256)
 
#define PCR_STREAM_MIN_BW   (20.0e3)
 
#define PCR_STREAM_MAX_BW   (40.0e6)
 
#define PCR_MIN_CNTX_INTERVAL   (3)
 
#define PCR_MAX_CNTX_INTERVAL   (4095)
 
#define PCR_VSG_MIN_LEVEL   (-80.0)
 
#define PCR_VSG_MAX_LEVEL   (10.0)
 
#define PCR_VSG_MAX_BUF_LEN   (4096)
 
#define PCR_MIN_FAN_SETPOINT   (5.0)
 
#define PCR_MAX_FAN_SETPOINT   (60.0)
 

Enumerations

enum  PCRBool { PCRBoolFalse = 0 , PCRBoolTrue = 1 }
 
enum  PCRDataType { PCRDataType16sc = 0 , PCRDataType32fc = 1 }
 
enum  PCRReference { PCRReferenceInternal = 0 , PCRReferenceExternal = 1 }
 
enum  PCRGPSState { PCRGPSStateNotPresent = 0 , PCRGPSStateLocked = 1 , PCRGPSStateDisciplined = 2 }
 
enum  PCREndianness { PCREndiannessBig = 0 , PCREndiannessLittle = 1 }
 
enum  PCRSweepDetector { PCRSweepDetectorAvg = 0 , PCRSweepDetectorMin = 1 , PCRSweepDetectorMax = 2 }
 
enum  PCRSweepVideoUnits { PCRSweepVideoUnitsLog = 0 , PCRSweepVideoUnitsVoltage = 1 , PCRSweepVideoUnitsPower = 2 , PCRSweepVideoUnitsSample = 3 }
 
enum  PCRSweepScale { PCRSweepScaleLog = 0 , PCRSweepScaleLin = 1 , PCRSweepScaleFullScale = 2 }
 
enum  PCRSweepWindow { PCRSweepWindowFlattop = 0 , PCRSweepWindowNutall = 1 , PCRSweepWindowGaussian6dB = 2 }
 
enum  PCRTriggerEdge { PCRTriggerEdgeRising = 0 , PCRTriggerEdgeFalling = 1 }
 
enum  PCRStreamMode
 
enum  PCRStatus {
  PCRStatusADCErr = -12 , PCRStatusPairedErr = -11 , PCRStatusSyncErr = -10 , PCRStatusIOErr = -9 ,
  PCRStatusInvalidParameterErr = -8 , PCRStatusInvalidConfigurationErr = -7 , PCRStatusMemoryErr = -6 , PCRStatusMaxDevicesConnectedErr = -5 ,
  PCRStatusInvalidDeviceErr = -4 , PCRStatusNullPtrErr = -3 , PCRStatusDeviceConnectionLostErr = -2 , PCRStatusDeviceNotFoundErr = -1 ,
  PCRStatusNoError = 0 , PCRStatusSettingClamped = 1 , PCRStatusADCOverflow = 2 , PCRStatusUncalData = 3 ,
  PCRStatusTempDriftWarning = 4 , PCRStatusBufferOverflow = 5 , PCRStatusInvalidCalData = 6
}
 

Functions

PCR_API PCRStatus pcrConnectDevice (int *handle, const char *hostAddr, const char *deviceAddr, uint16_t port)
 
PCR_API PCRStatus pcrPairDevice (int handle, const char *hostAddr, const char *deviceAddr, uint16_t port)
 
PCR_API PCRStatus pcrCloseDevice (int handle)
 
PCR_API PCRStatus pcrGetSerialNumber (int handle, int *serialNumber)
 
PCR_API PCRStatus pcrGetFirmwareVersion (int handle, int *major, int *minor, int *revision)
 
PCR_API PCRStatus pcrGetCalDate (int handle, uint32_t *lastCalDate)
 
PCR_API PCRStatus pcrGetDeviceDiagnostics (int handle, float *voltage, float *current, float *temperature)
 
PCR_API PCRStatus pcrGetFullDeviceDiagnostics (int handle, PCRDeviceDiagnostics *diagnostics)
 
PCR_API PCRStatus pcrSetLowPowerState (int handle)
 
PCR_API PCRStatus pcrSetReference (int handle, PCRReference reference)
 
PCR_API PCRStatus pcrGetReference (int handle, PCRReference *reference)
 
PCR_API PCRStatus pcrSetGPSTimebaseUpdate (int handle, PCRBool enabled)
 
PCR_API PCRStatus pcrGetGPSTimebaseUpdate (int handle, PCRBool *enabled)
 
PCR_API PCRStatus pcrGetGPSHoldoverInfo (int handle, PCRBool *usingGPSHoldover, uint64_t *lastHoldoverTime)
 
PCR_API PCRStatus pcrGetGPSState (int handle, PCRGPSState *state)
 pcrGetGPSState Determine the GPS lock state of the PCR4200. More...
 
PCR_API PCRStatus pcrGetGPSInfo (int handle, PCRBool refresh, PCRBool *updated, int64_t *secSinceEpoch, double *latitude, double *longitude, double *altitude)
 
PCR_API PCRStatus pcrSetFanEnabled (int handle, PCRBool enabled)
 
PCR_API PCRStatus pcrGetFanEnabled (int handle, PCRBool *enabled)
 
PCR_API PCRStatus pcrSetFanSetPoint (int handle, float setPoint)
 
PCR_API PCRStatus pcrGetFanSetPoint (int handle, float *setPoint)
 
PCR_API PCRStatus pcrGetChannelCount (int handle, int *channelCount)
 
PCR_API PCRStatus pcrSetChannelConfig (int handle, int *enabled, int sweepChannel)
 
PCR_API PCRStatus pcrGetChannelConfig (int handle, int *enabled, int *sweepChannel)
 
PCR_API PCRStatus pcrSetChannelShared (int handle, int channel, PCRBool useSharedLO)
 
PCR_API PCRStatus pcrGetChannelShared (int handle, int channel, PCRBool *useSharedLO)
 
PCR_API PCRStatus pcrSetChannelFreq (int handle, int channel, double freqHz)
 
PCR_API PCRStatus pcrGetChannelFreq (int handle, int channel, double *freqHz)
 
PCR_API PCRStatus pcrSetChannelPhaseOffset (int handle, int channel, double phaseOffset)
 
PCR_API PCRStatus pcrGetChannelPhaseOffset (int handle, int channel, double *phaseOffset)
 
PCR_API PCRStatus pcrSetChannelDelay (int handle, int channel, double delay)
 
PCR_API PCRStatus pcrGetChannelDelay (int handle, int channel, double *delay)
 
PCR_API PCRStatus pcrSetSharedFreq (int handle, double freqHz)
 
PCR_API PCRStatus pcrGetSharedFreq (int handle, double *freqHz)
 
PCR_API PCRStatus pcrSetStreamDataType (int handle, PCRDataType dataType)
 
PCR_API PCRStatus pcrSetStreamFullScale (int handle, PCRBool fullScale)
 
PCR_API PCRStatus pcrSetStreamRefLevel (int handle, double refLevel)
 
PCR_API PCRStatus pcrSetStreamAtten (int handle, int atten)
 
PCR_API PCRStatus pcrSetStreamSampleRate (int handle, int decimation)
 
PCR_API PCRStatus pcrSetStreamBandwidth (int handle, double bandwidth)
 
PCR_API PCRStatus pcrSetStreamTriggerEdge (int handle, PCRTriggerEdge edge)
 
PCR_API PCRStatus pcrSetStreamMode (int handle, PCRStreamMode mode)
 
PCR_API PCRStatus pcrSetStreamLocalAddr (int handle, uint16_t port)
 
PCR_API PCRStatus pcrSetStreamVrtAddr (int handle, int channel, const char *dstAddr, uint16_t dstPort, uint64_t dstMACAddr)
 
PCR_API PCRStatus pcrSetStreamVrtChannelID (int handle, int channel, int streamID)
 
PCR_API PCRStatus pcrSetStreamVrtCntxInterval (int handle, PCRBool enabled, int interval)
 
PCR_API PCRStatus pcrSetStreamVrtEndianness (int handle, PCREndianness endianness)
 
PCR_API PCRStatus pcrSetSweepRefLevel (int handle, double refLevel)
 
PCR_API PCRStatus pcrSetSweepAtten (int handle, int atten)
 
PCR_API PCRStatus pcrSetSweepCenterSpan (int handle, double centerHz, double spanHz)
 
PCR_API PCRStatus pcrSetSweepStartStop (int handle, double startHz, double stopHz)
 
PCR_API PCRStatus pcrSetSweepCoupling (int handle, double rbw, double vbw, double sweepTime)
 
PCR_API PCRStatus pcrSetSweepDetector (int handle, PCRSweepDetector detector, PCRSweepVideoUnits videoUnits)
 
PCR_API PCRStatus pcrSetSweepScale (int handle, PCRSweepScale scale)
 
PCR_API PCRStatus pcrSetSweepWindow (int handle, PCRSweepWindow window)
 
PCR_API PCRStatus pcrSetVSGEnabled (int handle, PCRBool enabled)
 
PCR_API PCRStatus pcrSetVSGLevel (int handle, double level)
 
PCR_API PCRStatus pcrSetVSGPattern (int handle, void *iq, int len, PCRDataType dataType)
 
PCR_API PCRStatus pcrInitiate (int handle)
 
PCR_API PCRStatus pcrAbort (int handle)
 
PCR_API PCRStatus pcrStreamParameters (int handle, int *channelCount, double *sampleRate, double *bandwidth)
 
PCR_API PCRStatus pcrStreamCorrection (int handle, int channel, float *correction)
 
PCR_API PCRStatus pcrStreamRecv (int handle, void **buffers, int samples, int64_t *nsSinceEpoch, PCRBool purge, int *sampleLoss, int *samplesRemaining, double *triggers, int triggerBufSize)
 
PCR_API PCRStatus pcrSweepGetParameters (int handle, double *actualRBW, double *actualVBW, double *actualStartFreq, double *binSize, int *sweepSize)
 
PCR_API PCRStatus pcrGetSweep (int handle, float *sweep)
 
PCR_API PCRStatus pcrSweepStart (int handle)
 
PCR_API PCRStatus pcrSweepFinish (int handle, float *sweep)
 
PCR_API PCRStatus pcrNetworkConfigGetDeviceList (int *serials, int *deviceCount)
 
PCR_API PCRStatus pcrNetworkConfigOpenDevice (int *handle, int serialNumber)
 
PCR_API PCRStatus pcrNetworkConfigCloseDevice (int handle)
 
PCR_API PCRStatus pcrNetworkConfigGetMAC (int handle, char *mac)
 
PCR_API PCRStatus pcrNetworkConfigSetIP (int handle, const char *addr, PCRBool nonVolatile)
 
PCR_API PCRStatus pcrNetworkConfigGetIP (int handle, char *addr)
 
PCR_API PCRStatus pcrNetworkConfigSetPort (int handle, int port, PCRBool nonVolatile)
 
PCR_API PCRStatus pcrNetworkConfigGetPort (int handle, int *port)
 
PCR_API const char * pcrGetAPIVersion ()
 
PCR_API const char * pcrGetErrorString (PCRStatus status)
 
PCR_API PCRStatus pcrWriteMessageToGPS (int handle, uint32_t key, uint64_t value, int valueSizeBytes)
 

Detailed Description

API functions for the PCR4200 spectrum analyzers.

This is the main file for user accessible functions for controlling the PCR4200 reciever.

Macro Definition Documentation

◆ PCR_MAX_DEVICES

#define PCR_MAX_DEVICES   (4)

Maximum number of device that can be interfaced by the API

◆ PCR_DEFAULT_HOST_ADDR

#define PCR_DEFAULT_HOST_ADDR   ("192.168.2.2")

Convenience host address

◆ PCR_DEFAULT_DEVICE_ADDR

#define PCR_DEFAULT_DEVICE_ADDR   ("192.168.2.10")

Default PCR IP address

◆ PCR_DEFAULT_PORT

#define PCR_DEFAULT_PORT   (51665)

Default PCR port

◆ PCR_DEFAULT_STREAM_PORT

#define PCR_DEFAULT_STREAM_PORT   (4991)

Default streaming port

◆ PCR_SWEEP_CHANNEL_DISABLED

#define PCR_SWEEP_CHANNEL_DISABLED   (-1)

Used in pcrSetChannelConfig to indicate no sweep channel

◆ PCR_AUTO_ATTEN

#define PCR_AUTO_ATTEN   (-1)

Indicates the API should use the reference level to control sensitivity. Default

◆ PCR_MAX_ATTEN

#define PCR_MAX_ATTEN   (6)

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

◆ PCR_MIN_FREQ

#define PCR_MIN_FREQ   (100.0e3)

Minimum configurable frequency

◆ PCR_MAX_FREQ

#define PCR_MAX_FREQ   (20.0e9)

Maximum configurable frequency

◆ PCR_SWEEP_MIN_SPAN

#define PCR_SWEEP_MIN_SPAN   (100.0)

Minimum configurable sweep span

◆ PCR_SWEEP_MIN_RBW

#define PCR_SWEEP_MIN_RBW   (100.0)

Minimum configurable sweep RBW

◆ PCR_SWEEP_MAX_RBW

#define PCR_SWEEP_MAX_RBW   (10.0e6)

Maximum configurable sweep RBW

◆ PCR_MIN_SWEEP_TIME

#define PCR_MIN_SWEEP_TIME   (1.0e-6)

Minimum configurable sweep time

◆ PCR_MAX_SWEEP_TIME

#define PCR_MAX_SWEEP_TIME   (1.0)

Maximum configurable sweep time

◆ PCR_MIN_REF_LVL

#define PCR_MIN_REF_LVL   (-130.0)

Minimum configurable reference level, for sweeps and I/Q streaming

◆ PCR_MAX_REF_LVL

#define PCR_MAX_REF_LVL   (20.0)

Maximum configurable reference level, for sweeps and I/Q streaming

◆ PCR_STREAM_SR

#define PCR_STREAM_SR   (50.0e6)

The maximum I/Q stream sample rate, decimation = 1

◆ PCR_STREAM_MIN_DECIMATION

#define PCR_STREAM_MIN_DECIMATION   (1)

Minimum configurable I/Q stream decimation

◆ PCR_STREAM_MAX_DECIMATION

#define PCR_STREAM_MAX_DECIMATION   (256)

Maximum configurable I/Q stream decimation

◆ PCR_STREAM_MIN_BW

#define PCR_STREAM_MIN_BW   (20.0e3)

Minimum configurable I/Q stream bandwidth

◆ PCR_STREAM_MAX_BW

#define PCR_STREAM_MAX_BW   (40.0e6)

Maximum configurable I/Q stream bandwidth

◆ PCR_MIN_CNTX_INTERVAL

#define PCR_MIN_CNTX_INTERVAL   (3)

Minimum Vita49 stream mode context interval

◆ PCR_MAX_CNTX_INTERVAL

#define PCR_MAX_CNTX_INTERVAL   (4095)

Maximum Vita49 stream mode context interval

◆ PCR_VSG_MIN_LEVEL

#define PCR_VSG_MIN_LEVEL   (-80.0)

Minimum VSG output level (dBm)

◆ PCR_VSG_MAX_LEVEL

#define PCR_VSG_MAX_LEVEL   (10.0)

Maximum VSG output level (dBm)

◆ PCR_VSG_MAX_BUF_LEN

#define PCR_VSG_MAX_BUF_LEN   (4096)

Maximum VSG pattern buffer length (complex samples)

◆ PCR_MIN_FAN_SETPOINT

#define PCR_MIN_FAN_SETPOINT   (5.0)

Minimum fan setpoint in C

◆ PCR_MAX_FAN_SETPOINT

#define PCR_MAX_FAN_SETPOINT   (60.0)

Maximum fan setpoint in C

Enumeration Type Documentation

◆ PCRBool

enum PCRBool

Boolean data type

Enumerator
PCRBoolFalse 

False

PCRBoolTrue 

True

◆ PCRDataType

Controls the I/Q data type returned from the pcrStreamRecv function.

Enumerator
PCRDataType16sc 

16-bit interleaved complex integers.

PCRDataType32fc 

32-bit interleaved complex floating point.

◆ PCRReference

Controls the timebase reference clock of the system.

Enumerator
PCRReferenceInternal 

Use the internal 10MHz reference clock.

PCRReferenceExternal 

Use 10MHz reference connected to the reference input RF port.

◆ PCRGPSState

Specifies the current state of GPS lock.

Enumerator
PCRGPSStateNotPresent 

No GPS lock detected.

PCRGPSStateLocked 

GPS is locked.

PCRGPSStateDisciplined 

GPS is locked and disciplining the system. Disciplining must be explictely enabled to get to this state.

◆ PCREndianness

Controls the bit endianness of the Vita49 data stream when in Vita49 streaming mode.

Enumerator
PCREndiannessBig 

Big endian, default.

PCREndiannessLittle 

Little endian.

◆ PCRSweepDetector

Controls the detector used on sweep.

Enumerator
PCRSweepDetectorAvg 

Average detector.

PCRSweepDetectorMin 

Min hold detector.

PCRSweepDetectorMax 

Max hold detector.

◆ PCRSweepVideoUnits

Controls the video processing (VBW) units on sweeps.

Enumerator
PCRSweepVideoUnitsLog 

dBm

PCRSweepVideoUnitsVoltage 

Linear voltage

PCRSweepVideoUnitsPower 

Linear power

PCRSweepVideoUnitsSample 

No VBW processing

◆ PCRSweepScale

Controls the units of the returned sweep data.

Enumerator
PCRSweepScaleLog 

dBm

PCRSweepScaleLin 

mV

PCRSweepScaleFullScale 

dBFS, no corrections

◆ PCRSweepWindow

Controls the window used for sweeps.

Enumerator
PCRSweepWindowFlattop 

SRS flattop

PCRSweepWindowNutall 

Nutall window

PCRSweepWindowGaussian6dB 

Gaussian 6dB window used for EMC measurements and CISPR compatibility.

◆ PCRTriggerEdge

Controls which trigger edge events to mark in the I/Q data stream.

Enumerator
PCRTriggerEdgeRising 

Rising edge triggering.

PCRTriggerEdgeFalling 

Falling edge triggering.

◆ PCRStreamMode

Controls the I/Q stream mode. See I/Q Streaming Mode.

◆ PCRStatus

enum PCRStatus

Status code returned from all PCR API functions.

Enumerator
PCRStatusADCErr 

Returned when the device detects issues on ADC clocks and sample alignment. Indicates possible hardware failure. Contact Signal Hound.

PCRStatusPairedErr 

Returned when performing an invalid operation on a multi-receiver/paired system.

PCRStatusSyncErr 

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

PCRStatusIOErr 

Internal error.

PCRStatusInvalidParameterErr 

One or more parameters provided were invalid.

PCRStatusInvalidConfigurationErr 

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.

PCRStatusMemoryErr 

Out of memory.

PCRStatusMaxDevicesConnectedErr 

No more devices can be interfaced. A device needs to be closed before another can be connected.

PCRStatusInvalidDeviceErr 

Device index specified is invalid.

PCRStatusNullPtrErr 

One or more required pointer parameters are NULL.

PCRStatusDeviceConnectionLostErr 

Device disconnected. Usually the result of network errors or UDP packet loss.

PCRStatusDeviceNotFoundErr 

Unable to open device.

PCRStatusNoError 

Function returned successfully.

PCRStatusSettingClamped 

One or more parameters were clamped to a valid range.

PCRStatusADCOverflow 

Measurement includes data subject to an ADC overload (clipping/compression)

PCRStatusUncalData 

Measurement uncalibrated. Overrides ADC overflow. Often the result of data loss.

PCRStatusTempDriftWarning 

Temperature drift has occured since last configured. Measurement error may be present. Reinitialize the measurement to resolve.

PCRStatusBufferOverflow 

Indicates internal buffer wrap due to network throughput. Data may be invalid

PCRStatusInvalidCalData 

Calibration data potentially corrupt.

Function Documentation

◆ pcrConnectDevice()

PCR_API PCRStatus pcrConnectDevice ( int *  handle,
const char *  hostAddr,
const char *  deviceAddr,
uint16_t  port 
)

Attempts to connect to a 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 PCR 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]handleReturns handle that can be used to interface the device. Handle is only valid if this function returns successfully.
[in]hostAddrHost interface IP on which the networked device is connected, provided as a string. 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

◆ pcrPairDevice()

PCR_API PCRStatus pcrPairDevice ( int  handle,
const char *  hostAddr,
const char *  deviceAddr,
uint16_t  port 
)

Pairs a secondary device to a primary device to create a multi-receiver system. The network parameters specified in this function are for the secondary device. The secondary device should not be connected by the API before calling this funciton. After this function returns successfully, the secondary device should not be opened separately via the pcrConnectDevice function, or be paired again.

See Multi-Receiver Operation for more information.

Parameters
[in]handleDevice on which the secondary unit will be paired.
[in]hostAddrHost interface IP on which the networked device is connected, provided as a string. 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

◆ pcrCloseDevice()

PCR_API PCRStatus pcrCloseDevice ( int  handle)

Closes an open device. This function will release all resources for an open device. When this function completes the handle parameter will no longer point to a valid device. The device needs to be opened again to continue using. All devices should be closed prior to the process exiting, but is not strictly necessary.

If the handle refers to a primary device in a multi-receiver configuration, all devices in that system are closed.

Parameters
[in]handleDevice handle.
Returns

◆ pcrGetSerialNumber()

PCR_API PCRStatus pcrGetSerialNumber ( int  handle,
int *  serialNumber 
)

Retreive the device serial number.

Parameters
[in]handleDevice handle.
serialNumberPointer to integer which will contain 8 digit serial number if this function returns successfully.
Returns

◆ pcrGetFirmwareVersion()

PCR_API PCRStatus pcrGetFirmwareVersion ( int  handle,
int *  major,
int *  minor,
int *  revision 
)

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

Parameters
[in]handleDevice handle.
[out]majorVersion return as integer. Can be NULL.
[out]minorVersion return as integer.. Can be NULL.
[out]revisionVersion return as integer. Can be NULL.
Returns

◆ pcrGetCalDate()

PCR_API PCRStatus pcrGetCalDate ( int  handle,
uint32_t *  lastCalDate 
)

Returns the calibration date of the device. This is the date the unit was factory adjusted. This value is primarily used for troubleshooting.

Parameters
[in]handleDevice handle.
lastCalDateCalibration date returned as seconds since epoch.
Returns

◆ pcrGetDeviceDiagnostics()

PCR_API PCRStatus pcrGetDeviceDiagnostics ( int  handle,
float *  voltage,
float *  current,
float *  temperature 
)

Returns diagnostic information about a device.

Parameters
[in]handleDevice handle.
[out]voltageVoltage returned in Volts. Can be NULL.
[out]currentCurrent returned in Amps. Can be NULL.
[out]temperatureTemperature returned as Celcius. Can be NULL.
Returns

◆ pcrGetFullDeviceDiagnostics()

PCR_API PCRStatus pcrGetFullDeviceDiagnostics ( int  handle,
PCRDeviceDiagnostics diagnostics 
)

Returns extended diagnostic information.

Parameters
[in]handleDevice handle.
diagnosticsPointer to extended diagnostic struct.
Returns

◆ pcrSetLowPowerState()

PCR_API PCRStatus pcrSetLowPowerState ( int  handle)

Set the device into a lower power state. The device will typically consume ~30W in the low power state.

The device should be idle before calling this function. This function will fail silently otherwise.

See Low Power State for more information.

Parameters
[in]handleDevice handle.
Returns

◆ pcrSetReference()

PCR_API PCRStatus pcrSetReference ( int  handle,
PCRReference  reference 
)

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

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

◆ pcrGetReference()

PCR_API PCRStatus pcrGetReference ( int  handle,
PCRReference reference 
)

Get the current reference state.

Parameters
[in]handleDevice handle.
[out]referenceCurrent reference configuration.
Returns

◆ pcrSetGPSTimebaseUpdate()

PCR_API PCRStatus pcrSetGPSTimebaseUpdate ( int  handle,
PCRBool  enabled 
)

Set whether the GPS is allowed to discipline the timebased of the PCR. Disabled by default. This function must be called in an idle state. See Automatic GPS Timebase Discipline for more information.

Parameters
[in]handleDevice handle.
[in]enabledTrue to enable GPS disciplining.
Returns

◆ pcrGetGPSTimebaseUpdate()

PCR_API PCRStatus pcrGetGPSTimebaseUpdate ( int  handle,
PCRBool enabled 
)

Get the current auto GPS disciplining state.

Parameters
handleDevice handle.
enabledReturns true if GPS disciplining enabled.
Returns

◆ pcrGetGPSHoldoverInfo()

PCR_API PCRStatus pcrGetGPSHoldoverInfo ( int  handle,
PCRBool usingGPSHoldover,
uint64_t *  lastHoldoverTime 
)

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

Parameters
[in]handleDevice 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 pcrGetGPSState. 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

◆ pcrGetGPSState()

PCR_API PCRStatus pcrGetGPSState ( int  handle,
PCRGPSState state 
)

pcrGetGPSState Determine the GPS lock state of the PCR4200.

Parameters
[in]handleDevice handle
[out]statePointer to instance of PCRGPSState.

◆ pcrGetGPSInfo()

PCR_API PCRStatus pcrGetGPSInfo ( int  handle,
PCRBool  refresh,
PCRBool updated,
int64_t *  secSinceEpoch,
double *  latitude,
double *  longitude,
double *  altitude 
)

Acquire the latest GPS information. The GPS info is updated once per second at the PPS interval. This function can be called while measurements are active.

Parameters
[in]handleDevice 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.
Returns

◆ pcrSetFanEnabled()

PCR_API PCRStatus pcrSetFanEnabled ( int  handle,
PCRBool  enabled 
)

Enable the fan. See Fan Control.

Parameters
[in]handleDevice handle.
[in]enabledTrue to enable fan.
Returns

◆ pcrGetFanEnabled()

PCR_API PCRStatus pcrGetFanEnabled ( int  handle,
PCRBool enabled 
)

Return whether the fan is enabled.

Parameters
[in]handleDevice handle.
[out]enabledReturns true if enabled.
Returns

◆ pcrSetFanSetPoint()

PCR_API PCRStatus pcrSetFanSetPoint ( int  handle,
float  setPoint 
)

Configures the temperature/fan setpoint. See Fan Control. The setpoint is clamped to PCR_MIN_FAN_SETPOINT and PCR_MAX_FAN_SETPOINT.

Parameters
[in]handleDevice handle.
setPointNew fan setpoint in C.
Returns

◆ pcrGetFanSetPoint()

PCR_API PCRStatus pcrGetFanSetPoint ( int  handle,
float *  setPoint 
)

Returns the configured fan setpoint.

Parameters
[in]handleDevice handle.
[out]setPointReturns the current fan setpoint in C.
Returns

◆ pcrGetChannelCount()

PCR_API PCRStatus pcrGetChannelCount ( int  handle,
int *  channelCount 
)

Helper function which returns the number of channels that can be configured. This is equal to the number of devices in the system * 4.

Parameters
[in]handleDevice handle.
[out]channelCountNumber of channels in system.
Returns

◆ pcrSetChannelConfig()

PCR_API PCRStatus pcrSetChannelConfig ( int  handle,
int *  enabled,
int  sweepChannel 
)

Configure the receiver channels. This function configures whether a channel will be enabled for measurements, and whether one of those channels will be used for sweeps.

Parameters
[in]handleDevice handle.
[in]enabledAn array of integers equal in length to the number of channels in the system. For each index in the array, a 0 or 1 indicates whether that channel will be enabled in the measurements.

For example, enabling channels (zero-based) 0,2,3 or (one-based) 1,3,4, the array you provide to this parameter will look like [1,0,1,1]. If a channel is designated as the sweep channel, it must also be enabled in this list. Every channel enabled but not designated as the sweep channel will be an I/Q streaming channel.

Parameters
[in]sweepChannelSpecify a channel on which to perform sweeps. If no channel is to perform sweeps, pass PCR_SWEEP_CHANNEL_DISABLED(-1) to this parameter.
Returns

◆ pcrGetChannelConfig()

PCR_API PCRStatus pcrGetChannelConfig ( int  handle,
int *  enabled,
int *  sweepChannel 
)

Returns the current channel configuration.

Parameters
[in]handleDevice handle.
[out]enabledA pointer to an array of integers, equal in size to the number of channels in the system. For each enabled channel, a 1 will be set in that index, otherwise if that channel is disabled, a zero will be set. For example, if channels (one-based) 1 & 2 are enabled, the array will be set to {1,1,0,0}.
[out]sweepChannelReturns which channel (if enabled) is set as the sweeping channel. If no channel is set to sweep, -1 is returned.
Returns

◆ pcrSetChannelShared()

PCR_API PCRStatus pcrSetChannelShared ( int  handle,
int  channel,
PCRBool  useSharedLO 
)

Set whether a specific channel should use the shared LO. This configuration is independent of whether or not the channel is enabled. This setting only affects channels enabled for I/Q streaming. A sweeping channel cannot use the shared LO.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[in]useSharedLOTrue to use shared LO.
Returns

◆ pcrGetChannelShared()

PCR_API PCRStatus pcrGetChannelShared ( int  handle,
int  channel,
PCRBool useSharedLO 
)

Returns whether a channel is configured to use the shared LO.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[out]useSharedLOReturns true if the specified channel is configured to use the shared LO.
Returns

◆ pcrSetChannelFreq()

PCR_API PCRStatus pcrSetChannelFreq ( int  handle,
int  channel,
double  freqHz 
)

Set a channel frequency. This frequency affects a channel that is configured for I/Q streaming and to use the independent LO (not shared). This setting persists independently of the other channel settings.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[in]freqHzFrequency of specified channel in Hz.
Returns

◆ pcrGetChannelFreq()

PCR_API PCRStatus pcrGetChannelFreq ( int  handle,
int  channel,
double *  freqHz 
)

Returns a channels configured frequency. This is the frequency of a channel that is configured for I/Q streaming and to use the independent LO.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[out]freqHzReturns the frequency of the specified channel in Hz.
Returns

◆ pcrSetChannelPhaseOffset()

PCR_API PCRStatus pcrSetChannelPhaseOffset ( int  handle,
int  channel,
double  phaseOffset 
)

Sets a fixed phase offset for a single channel. This offset is applied as a complex phase rotation on each sample. This offset can be used to provide phase alignment between multiple channels. The default offset for each channel is 0 radians.

See Phase Coherence and the Shared LO for more information.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[in]phaseOffsetSets a fixed phase offset to apply to the specified channel. This offset is only applied when streaming I/Q data. This offset is specified in radians.
Returns

◆ pcrGetChannelPhaseOffset()

PCR_API PCRStatus pcrGetChannelPhaseOffset ( int  handle,
int  channel,
double *  phaseOffset 
)

Get the phase offset current applied to a channel.

See Phase Coherence and the Shared LO for more information.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[out]phaseOffsetReturns the phase offset set for the specified channel as radians.
Returns

◆ pcrSetChannelDelay()

PCR_API PCRStatus pcrSetChannelDelay ( int  handle,
int  channel,
double  delay 
)

Set a channels timing delay. This delay is specified as a fraction of a sample, and is applied as part of an interpolating FIR filter. This delay can be used as part of a system requiring high precision phase alignment between multiple channels.

See Phase Coherence and the Shared LO for more information.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[in]delayDelay specified as fraction of a sample.
Returns

◆ pcrGetChannelDelay()

PCR_API PCRStatus pcrGetChannelDelay ( int  handle,
int  channel,
double *  delay 
)

Retrieve a configured channels timing delay.

See Phase Coherence and the Shared LO for more information.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[out]delayReturns the delay as a fraction of a sample.
Returns

◆ pcrSetSharedFreq()

PCR_API PCRStatus pcrSetSharedFreq ( int  handle,
double  freqHz 
)

Sets the frequency of the measurement to be used for all streaming I/Q channels that are using the shared LO. This frequency is also shared with the VSG.

Parameters
[in]handleDevice handle.
[in]freqHzFrequency specified in Hz.
Returns

◆ pcrGetSharedFreq()

PCR_API PCRStatus pcrGetSharedFreq ( int  handle,
double *  freqHz 
)

Retrieve the frequency of channels using the shared LO.

Parameters
[in]handleDevice handle.
[out]freqHzReturns the frequency specified in Hz.
Returns

◆ pcrSetStreamDataType()

PCR_API PCRStatus pcrSetStreamDataType ( int  handle,
PCRDataType  dataType 
)

Sets the I/Q stream data type. See I/Q Data Types for more information.

Parameters
[in]handleDevice handle.
[in]dataTypeData type.
Returns

◆ pcrSetStreamFullScale()

PCR_API PCRStatus pcrSetStreamFullScale ( int  handle,
PCRBool  fullScale 
)

Sets whether the data returned is in the units of dBm or dBFS. This only applies for local streaming mode and 32-bit data types. 16-bit data types are always returned as full scale. Full scale is disabled by default.

Parameters
[in]handleDevice handle.
[in]fullScaleTrue if data should be returned as full scale.
Returns

◆ pcrSetStreamRefLevel()

PCR_API PCRStatus pcrSetStreamRefLevel ( int  handle,
double  refLevel 
)

Set the reference level of the I/Q data streams. This reference level is used for all streaming channels. See Reference Level and Sensitivity for more information. If attenuation is not set to auto, this value is ignored.

Parameters
[in]handleDevice handle.
[in]refLevelReference level specified as dBm.
Returns

◆ pcrSetStreamAtten()

PCR_API PCRStatus pcrSetStreamAtten ( int  handle,
int  atten 
)

Set the attenuation for the I/Q data streams. This applies to all streaming channels. See Reference Level and Sensitivity for more information. Attenuation is set to auto by default.

Parameters
[in]handleDevice handle.
[in]attenAttenuation between [0,6], or -1 for auto (use reference level).
Returns

◆ pcrSetStreamSampleRate()

PCR_API PCRStatus pcrSetStreamSampleRate ( int  handle,
int  decimation 
)

Set the sample rate for the I/Q data streams. This applies to all streaming channels. See I/Q Sample Rates for more information.

Parameters
[in]handleDevice handle.
[in]decimationSets the sample rate to 50MS/s / decimation. Decimation must be a power of 2, and must be between 1 and 256.
Returns

◆ pcrSetStreamBandwidth()

PCR_API PCRStatus pcrSetStreamBandwidth ( int  handle,
double  bandwidth 
)

Set the streaming bandwidth. This setting applies to all streaming channels. See I/Q Sample Rates for more information.

Parameters
[in]handleDevice handle.
[in]bandwidthBandwidth specified in Hz.
Returns

◆ pcrSetStreamTriggerEdge()

PCR_API PCRStatus pcrSetStreamTriggerEdge ( int  handle,
PCRTriggerEdge  edge 
)

Set the streaming external trigger edge. External triggers will appear only for the specified edges.

Parameters
[in]handleDevice handle.
[in]edgeTrigger edge.
Returns

◆ pcrSetStreamMode()

PCR_API PCRStatus pcrSetStreamMode ( int  handle,
PCRStreamMode  mode 
)

Set the I/Q stream mode. See I/Q Streaming Mode for more information.

Parameters
[in]handleDevice handle.
[in]modeMode.
Returns

◆ pcrSetStreamLocalAddr()

PCR_API PCRStatus pcrSetStreamLocalAddr ( int  handle,
uint16_t  port 
)

Set the I/Q streaming port used for local streaming. By default, it's set to

  1. For customers using the local stream mode, this function should usually not need to be called, unless the default port conflicts with another application.

For multi-PCR systems, incrementing port values are used, for example, Primary Device : port N Secondary Device 1 : port N + 1 Secondary Device 2 : port N + 2 Etc.

See I/Q Streaming Mode for more information.

Parameters
[in]handleDevice handle.
[in]portNetwork port.
Returns

◆ pcrSetStreamVrtAddr()

PCR_API PCRStatus pcrSetStreamVrtAddr ( int  handle,
int  channel,
const char *  dstAddr,
uint16_t  dstPort,
uint64_t  dstMACAddr 
)

Set the destination network addess for the I/Q data in Vita49 streaming mode for all channels.

See I/Q Streaming Mode for more information.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[in]dstAddrIP address specified as a string, for example "192.168.3.10".
[in]dstPortNetwork port.
[in]dstMACAddrMAC address.
Returns

◆ pcrSetStreamVrtChannelID()

PCR_API PCRStatus pcrSetStreamVrtChannelID ( int  handle,
int  channel,
int  streamID 
)

Set the stream ID of the Vita49 stream. This is the ID returned in the streams context packet. Each channel will have it's own stream ID.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[in]streamIDStreamID.
Returns

◆ pcrSetStreamVrtCntxInterval()

PCR_API PCRStatus pcrSetStreamVrtCntxInterval ( int  handle,
PCRBool  enabled,
int  interval 
)

Sets the interval for the context packets sent in Vita49 stream mode. All channels will adhere to the context interval.

Parameters
[in]handleDevice handle.
[in]enabledEnables context packets. Enabled by default.
[in]intervalSets the interval. 64 by default.
Returns

◆ pcrSetStreamVrtEndianness()

PCR_API PCRStatus pcrSetStreamVrtEndianness ( int  handle,
PCREndianness  endianness 
)

Set the endianness of the Vita49 data. Vita49 data is big endian by default. Many modern PCs are little endian. A PC that is receiving and processing the Vita49 data may want to eliminate the need to change the byte ordering.

Parameters
[in]handleDevice handle.
[in]endiannessThe endianness to use.
Returns

◆ pcrSetSweepRefLevel()

PCR_API PCRStatus pcrSetSweepRefLevel ( int  handle,
double  refLevel 
)

The reference level controls the sensitivity of the receiver by setting the attenuation 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.

This function sets the reference level for sweeps only.

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

◆ pcrSetSweepAtten()

PCR_API PCRStatus pcrSetSweepAtten ( int  handle,
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 PCR_AUTO_ATTEN macro for -1.

This function sets the attenuation for sweeps only.

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

◆ pcrSetSweepCenterSpan()

PCR_API PCRStatus pcrSetSweepCenterSpan ( int  handle,
double  centerHz,
double  spanHz 
)

Set the sweep center and span frequencies. The new configuration cannot cause the sweep to exceed the frequency range of the instrument. If that occurs, the settings will be clamped to the range of the instrument.

Parameters
[in]handleDevice handle.
[in]centerHzCenter frequency in Hz.
[in]spanHzSpan in Hz.
Returns

◆ pcrSetSweepStartStop()

PCR_API PCRStatus pcrSetSweepStartStop ( int  handle,
double  startHz,
double  stopHz 
)

Set the sweep start and stop frequency. The new configuration cannot cause the sweep to exceed the frequency range of the instrument. If that occurs, the settings will be clamped to the range of the instrument.

Parameters
[in]handleDevice handle.
[in]startHzStart frequency in Hz.
[in]stopHzStop frequency in Hz.
Returns

◆ pcrSetSweepCoupling()

PCR_API PCRStatus pcrSetSweepCoupling ( int  handle,
double  rbw,
double  vbw,
double  sweepTime 
)

Set sweep resolution and video bandwidth.

Parameters
[in]handleDevice 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

◆ pcrSetSweepDetector()

PCR_API PCRStatus pcrSetSweepDetector ( int  handle,
PCRSweepDetector  detector,
PCRSweepVideoUnits  videoUnits 
)

Set sweep detector.

Parameters
[in]handleDevice handle.
[in]detectorSweep detector.
[in]videoUnitsVideo processing units.
Returns

◆ pcrSetSweepScale()

PCR_API PCRStatus pcrSetSweepScale ( int  handle,
PCRSweepScale  scale 
)

Set the sweep mode output unit type.

Parameters
[in]handleDevice handle.
[in]scaleSweep units.
Returns

◆ pcrSetSweepWindow()

PCR_API PCRStatus pcrSetSweepWindow ( int  handle,
PCRSweepWindow  window 
)

Set sweep mode window function.

Parameters
[in]handleDevice handle.
[in]windowWindow function.
Returns

◆ pcrSetVSGEnabled()

PCR_API PCRStatus pcrSetVSGEnabled ( int  handle,
PCRBool  enabled 
)

Enable/disable the VSG output. See VSG for more information.

Parameters
[in]handleDevice handle.
[in]enabledTrue to enable.
Returns

◆ pcrSetVSGLevel()

PCR_API PCRStatus pcrSetVSGLevel ( int  handle,
double  level 
)

Set the VSG output level.

Parameters
[in]handleDevice handle.
[in]levelOutput level in dBm.
Returns

◆ pcrSetVSGPattern()

PCR_API PCRStatus pcrSetVSGPattern ( int  handle,
void *  iq,
int  len,
PCRDataType  dataType 
)

Set the VSG output pattern. See VSG for more information

Parameters
[in]handleDevice handle.
[in]iqThe pattern supplied as complex values in the data type specified by dataType.
[in]lenThe length of the pattern in complex samples.
[in]dataTypeSpecifies the data type of the provided pattern. Choices are 16-bit interleaved complex integers and 32-bit complex interleaved floating point values.
Returns

◆ pcrInitiate()

PCR_API PCRStatus pcrInitiate ( int  handle)

Start the measurement. At this point, all configuration routines must be completed. Any change to the measurement configuration after calling this function will not affect the measurement until the measurement is restarted.

This function can be called while the measurements are active, and it will have the affect of calling pcrAbort and pcrInitiate.

Parameters
[in]handleDevice handle.
Returns

◆ pcrAbort()

PCR_API PCRStatus pcrAbort ( int  handle)

Stops the active measurement. All function calls to request data must be completed before calling this function. When this function returns, the device will be in an idle state.

Parameters
[in]handleDevice handle.
Returns

◆ pcrStreamParameters()

PCR_API PCRStatus pcrStreamParameters ( int  handle,
int *  channelCount,
double *  sampleRate,
double *  bandwidth 
)

Retrieve the I/Q measurement parameters for an active I/Q stream. This function can only be called if the measurement is active.

Parameters
[in]handleDevice handle.
[out]channelCountReturns the number of streaming channels. Can be NULL.
[out]sampleRateThe sample rate in Hz. Can be NULL.
[out]bandwidthThe bandwidth of the I/Q capture in Hz. Can be NULL.
Returns

◆ pcrStreamCorrection()

PCR_API PCRStatus pcrStreamCorrection ( int  handle,
int  channel,
float *  correction 
)

Retrieve the I/Q correction factor for an active I/Q stream. Each channel will have it's own correction factor. See I/Q Data Types for more information.

Parameters
[in]handleDevice handle.
[in]channelChannel between [0, channelCount-1].
[out]correctionAmplitude correction used by the API to convert from full scale I/Q to amplitude corrected I/Q.
Returns

◆ pcrStreamRecv()

PCR_API PCRStatus pcrStreamRecv ( int  handle,
void **  buffers,
int  samples,
int64_t *  nsSinceEpoch,
PCRBool  purge,
int *  sampleLoss,
int *  samplesRemaining,
double *  triggers,
int  triggerBufSize 
)

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

This function should only be used when in local I/Q stream mode.

Parameters
[in]handleDevice handle.
[out]buffersPointer to user allocated buffers to recieve data. buffers should point to an array of pointers, and that array should be equal to the number of active I/Q channels. Each pointer in that buffer should point to an array large enough to received the I/Q data specified by both the iqBufSize and iqDataType parameter.
[in]samplesSpecifies the number of I/Q samples, per channel, to be retrieved. Must be greater than zero.
[out]nsSinceEpochNanoseconds since epoch. The time of the first I/Q sample returned. Can be NULL. See GPS I/Q Time Stamping for more information.
[in]purgeWhen set to true, 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 false. Can be NULL.
[out]samplesRemainingSet by the API, returns the number of samples remaining in the internal I/Q circular buffer. Can be NULL.
[out]triggersPointer to user allocated array of trigger indices. 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.
Returns

◆ pcrSweepGetParameters()

PCR_API PCRStatus pcrSweepGetParameters ( int  handle,
double *  actualRBW,
double *  actualVBW,
double *  actualStartFreq,
double *  binSize,
int *  sweepSize 
)

Retrieves the sweep parameters for an active sweep measurement. This function can only be called if the measurement is active.

Parameters
[in]handleDevice 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

◆ pcrGetSweep()

PCR_API PCRStatus pcrGetSweep ( int  handle,
float *  sweep 
)

Perform a single sweep. Block until the sweep completes. Internally, this function is implemented as calling pcrSweepStart followed by pcrSweepFinish. Do not mix calls to this function and the asynchronous versions.

Parameters
[in]handleDevice handle.
[out]sweepPointer to array equal in length to the sweep size.
Returns

◆ pcrSweepStart()

PCR_API PCRStatus pcrSweepStart ( int  handle)

Start a sweep. If successful, this function returns immediately.

Parameters
[in]handleDevice handle.
Returns

◆ pcrSweepFinish()

PCR_API PCRStatus pcrSweepFinish ( int  handle,
float *  sweep 
)

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

Parameters
[in]handleDevice handle.
[out]sweepPointer to array equal in length to the sweep size.
Returns

◆ pcrNetworkConfigGetDeviceList()

PCR_API PCRStatus pcrNetworkConfigGetDeviceList ( int *  serials,
int *  deviceCount 
)

This function is part of a group of functions used to configure the network settings of the 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. Returns a list of all PCR devices connected to the PC over USB.
[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

◆ pcrNetworkConfigOpenDevice()

PCR_API PCRStatus pcrNetworkConfigOpenDevice ( int *  handle,
int  serialNumber 
)

This function is part of a group of functions used to configure the network settings of the 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]handleIf successful, handle will return an integer handle that can be used to configure the network configuration through the pcrNetworkConfig*** functions.
[in]serialNumberSerial number of the device to open. A list of connected serial numbers can be retrieved from the pcrNetworkConfigGetDeviceList function.
Returns

◆ pcrNetworkConfigCloseDevice()

PCR_API PCRStatus pcrNetworkConfigCloseDevice ( int  handle)

This function is part of a group of functions used to configure the network settings of the 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]handleDevice handle returned from pcrNetworkConfigOpenDevice.
Returns

◆ pcrNetworkConfigGetMAC()

PCR_API PCRStatus pcrNetworkConfigGetMAC ( int  handle,
char *  mac 
)

This function is part of a group of functions used to configure the network settings of the 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]handleDevice handle returned from pcrNetworkConfigOpenDevice.
[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

◆ pcrNetworkConfigSetIP()

PCR_API PCRStatus pcrNetworkConfigSetIP ( int  handle,
const char *  addr,
PCRBool  nonVolatile 
)

This function is part of a group of functions used to configure the network settings of the 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]handleDevice handle returned from pcrNetworkConfigOpenDevice.
[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 true, setting applied will be written to internal flash, which will persist through a device power cycle.
Returns

◆ pcrNetworkConfigGetIP()

PCR_API PCRStatus pcrNetworkConfigGetIP ( int  handle,
char *  addr 
)

This function is part of a group of functions used to configure the network settings of the 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 address.

Parameters
[in]handleDevice handle returned from pcrNetworkConfigOpenDevice.
[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

◆ pcrNetworkConfigSetPort()

PCR_API PCRStatus pcrNetworkConfigSetPort ( int  handle,
int  port,
PCRBool  nonVolatile 
)

This function is part of a group of functions used to configure the network settings of the 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 network port number.

Parameters
[in]handleDevice handle returned from pcrNetworkConfigOpenDevice.
[out]portPort number.
[in]nonVolatileWhen set to true, setting applied will be written to internal flash, which will persist through a device power cycle.
Returns

◆ pcrNetworkConfigGetPort()

PCR_API PCRStatus pcrNetworkConfigGetPort ( int  handle,
int *  port 
)

This function is part of a group of functions used to configure the network settings of the 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 network port number.

Parameters
[in]handleDevice handle returned from pcrNetworkConfigOpenDevice.
[out]portPort number.
Returns

◆ pcrGetAPIVersion()

PCR_API const char * pcrGetAPIVersion ( )

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"

◆ pcrGetErrorString()

PCR_API const char * pcrGetErrorString ( PCRStatus  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

◆ pcrWriteMessageToGPS()

PCR_API PCRStatus pcrWriteMessageToGPS ( int  handle,
uint32_t  key,
uint64_t  value,
int  valueSizeBytes 
)

Set a custom key value pair for the U-blox F9 GPS Reciever

Parameters
[in]handleDevice handle returned from pcrNetworkConfigOpenDevice.
[in]keyKey used for configuring the F9 GPS Reciever
[in]valueValue used for configuring the F9 GPS Reciever
[in]valueSizeBytesSize of the field being configured in bytes
Returns