ing IF Sample Data File Format............................................................................................106
Table of Content
s
API Referencei
Preface
Preface
This document describes the RSA API function calls to interface with the RSA306, RSA306B, RSA500A Series, and
RSA600A Series Spectrum Analyzers through Microsoft Windows.
The RSA API driver software allows user-developed programs to directly control Tektronix RSA USB devices. The API
software is designed to be used with PCs running the Microsoft Windows operating system. To use the API software, it must
be installed on the PC to which the RSA device is connected. The API software installer can be accessed as follows:
To access driver from the USB memory device that shipped with your instrument: Open the USB drive, navigate to the
API installer, and install the driver.
To access driver from www.Tek.com: Search for “RSA API” and filter the results on “Software”. Download and install the
latest driver.
Programing languages supported by this driver include: C, C++, and Python. An example program written in Python is
provided. (See page 105, Programming file attachment.)
The main API interface DLL file is RSA_API.dll. It is a C-language Win32 DLL file created in Microsoft Visual Studio. The API
uses standard Windows C-runtime libraries which must also be installed on the PC. A linker library file (RSA_API.lib) is
provided to support static linking of the API to user C/C++ programs.
This document supports API version 2. A compatibility chart from API version 1 to version 2 is provided. (See page 111, RSAAPI version compatibility.)
iiAPI Reference
API function gro
ups
API function g
This section contains the available function calls. The functions are grouped into the following categories:
Alignment (See page 2.)
Audio (See page 3.)
Configure (See page 7.)
Device (See page 21.)
DPX (See page 28.)
GNSS (See page 40.)
IF streaming (See page 45.)
IQ block (See page 55.)
IQ streaming (See page 63.)
Playback (See page 84.)
Power (See page 86.)
Spectrum (See page 87.)
Time (See page 94.)
roups
Tracking generator (See page 98.)
Trigger (See page 100.)
API Reference1
Alignment funct
ions
Alignment fun
ALIGN_GetAli
Declaration:
Parameters:
Return Values:
Addition
ALIGN_Ge
Declaration:
Parameters:
Return Values:
Additional Detail:
gnmentNeeded
needed:Pointer to a bool. True indicates an alignment is needed. False indicates an
noError:
errorNotConnected:
al Detail:
tWarmupStatus
warmedUp:Pointer to a bool.
noError:
ctions
Determines if
ReturnStatu
alignment is not needed.
The function has completed successfully.
The device
It is based on the difference between the current temperature and the
temperature from the last alignment.
Reports device warm-up status.
ReturnS
True indicates the device's warm-up interval has been reached. False indicates
the war
The function has completed successfully.
Devices start in the "warm-up" state after initial power up until the internal
erature stabilizes. The warm-up interval is different for different devices.
temp
an alignment is needed or not.
s ALIGN_GetAlignmentNeeded(bool* needed);
is not connected.
tatus ALIGN_GetWarmupStatus(bool* warmedUp);
m-up interval has not been reached.
ALIGN_RunAlignment
aration:
Decl
urn Values:
Ret
noError:The alignment has succeeded.
errorDataNotReady:
the device alignment process.
Runs
ReturnStatus ALIGN_RunAlignment();
The alignment operation failed.
2API Reference
Audio functions
Audio functio
AUDIO_SetFre
Declaration:
Parameters:
Return Values:
Additional Detail:
AUDIO_GetFrequencyOffsetQueries the audio carrier frequency offset from the Center Frequency.
Declar
Parame
Retur
quencyOffset
freqOffsetHz:Amount of frequency offset from the Center Frequency.
noError:
errorParameter:
ation:
ters:
ffsetHz:
freqO
n Values:
noError:
ns
Sets the audio
ReturnStatu
Range: –20e
The function completed successfully.
Input parameter out of range.
This function allows the audio demodulation carrier frequency to be offset from
the devic
without changing the Center Frequency. The audio demodulation is performed
at a carrier frequency of (Center Frequency + freqOffsetHz). The freqOffsetHz
is set to
Pointer to variable to return current Frequency Reference source selection. See
CONFIG_SetFr
The function has completed successfully.
The device is not connected.
This function can (and should) be used in place of
CONFIG_Ge
CONFIG_GetExternalRefEnable() only indicates if the EXTREF is chosen or
not while this function indicates a ll available sources.
equencyReferenceSource for the list of result values.
tExternalRefEnable() to query the Frequency Reference source.
CONFIG_Ge
CONFI
tMaxCenterFreq
Declaration:
Parameters:
maxCF:Pointer to a double. Contains the maximum center frequency when the function
Return Values:
noError:
errorNotConnected:
Additional Detail:
G_GetMinCenterFreq
Declaration:
Parameters:
minCF:Pointer to a double. Contains the m in imum center frequency when the function
Return Values:
noError:
errorNotConnected:
Additional Detail:
Queries th
ReturnSt
complet
The maximum center frequency value has been queried.
The device is not connected.
The value is stored in the maxCF parameter.
Queri
Retu
com
The minimum center frequency value has been queried.
The device is not connected.
The value is stored in the minCF parameter.
e maximum center frequency.
atus CONFIG_GetMaxCenterFreq(double* maxCF);
es.
es the minimum center frequency.
rnStatus CONFIG_GetMinCenterFreq(double* minCF);
pletes.
8API Reference
Configure functi
ons
CONFIG_GetMod
rection
Declaration:
Parameters:
mode:
Return V
noError:
errorN
Additional Detail:
CONFIG_GetReferenceLevelQueries the reference level.
Decla
meters:
Para
refL
urn Values:
Ret
noError:
er
Additional Detail:
eGnssFreqRefCor-
alues:
otConnected:
ration:
evel:
rorNotConnected:
This command is
Queries the operating mode of the GNSS Frequency Reference correction.
ReturnStatus CONFIG_GetModeGnssFreqRefCorrection(GFR_MODE* mode);
True means the time reference setting is enabled. False means the time
reference setting is disabled.
The function completed successfully.
The device
The GNSS receiver must be enabled to use this function.
This command is for RSA500A Series and RSA600A Se ries instruments only.
Controls the API Time Reference alignment from the internal GNSS receiver.
ReturnStatus CONFIG_SetEnableGnssTimeRefAlign (bool enable);
True enables setting time reference. False disables setting time reference.
The setting time reference has been enabled or disabled.
The device is not connected.
The GNSS receiver must be enabled to use this function.
The default control setting of “true” enables the API time reference system to be
aligned precisely to UTC time from the GNSS navigation message and 1PPS
signal. The GNSS receiver must achieve navigation lock for the time reference
alignment to occur. While GNSS is locked, the time reference is updated every
10 seconds to keep close synchronization with GNSS time. Setting the control to
“false” disables the time reference updating from GNSS, but retains the current
time reference setting. This control allows the user application to independently
set the time reference, or simply prevent time updates from the GNSS.
for RSA500A Series and RSA600A Series instruments only.
is not connected.
CONFIG_SetExternalRefEnableEnables or disables the external reference.
Declaration:
Parameters:
exRefEn:Enables or disables the external reference.
True enables the external reference. False disables the external reference.
The external reference has been enabled or disabled.
The device is not connected.
The operation has not finished after 2 seconds.
When the external reference is enabled, an external reference signal must be
connected to the “Ref In” port. The signal must have a frequency of 10 MHz
with a +10 dBm maximum amplitude. This signal is used by the local oscillators
to mix with the input signal.
When the external reference is disabled, an internal reference source is used.
Frequency Reference source selection. Valid settings are:
FREQREF_SOURCE
FRS_INTERNAL
FRS_EXTREF
FRS_GNSS
FRS_USER
NOTE. RSA306B and RSA306 support only INTERNAL and EXTREF sources.
The fun
The device is not connected.
d to lock to External Reference input.
Faile
This function can (and should) be used in place of CONFIG_Se-
ernalRefEnable() to control the Frequency Reference source.
tExt
CONFIG_SetExternalRefEnable() only allows selecting the INTERNAL or
EXTREF sources, while this function allows choice of all available sources.
INTERNAL source is always a valid selection, and is never switched out
The
of automatically.
The EXTREF source uses the signal input to the Ref In connector as frequency
erence for the internal oscillators. If EXTREF is selected without a valid
ref
signal connected to Ref In, the source automatically switches to USER if
available, or to INTERNAL otherwise. If lock fails, an error status indicating
e failure is returned.
th
The GNSS source uses the internal GNSS receiver to discipline (adjust) the
internal reference oscillator. If GNSS source is selected, the GNSS receiver
ust be enabled. If the GNSS receiver is not enabled, the source selection
m
remains GNSS, but no frequency correction is done. G NS S disciplining only
occurs when the GNSS receiver has navigation lock. When the receiver is
nlocked, the adjustment setting is retained unchanged until receiver lock is
u
achieved or the source is switched to another selection.
If USER source is selected, the previously set USER setting is used. If the
USER setting has not been set, the source switches automatically to INTERNAL.
ice Frequency Reference source.
Value
0
1
2
3
ction completed successfully.
12API Reference
Configure functi
ons
CONFIG_GetSta
rection
Declaration:
Parameters:
state:
quality:
turn Values:
Re
noError:
rrorNotConnected:
e
Additional Detail:
tusGnssFreqRefCor-
This command is
for RSA500A Series and RSA600A Series instruments only.
Queries the status of the GNSS Frequency Reference correction.
ReturnStatus CONFIG_GetStatusGnssFreqRefCorrection(GFR_STATE* state,
GFR_QUALITY* quality);
Pointer to variable to return the GNSS Frequency Reference correction state.
Valid settings are:
Pointer to variable to return the GNSS Frequency Reference correction tracking
y.
qualit
UALITY
GFR_Q
INVALID
GFRS_
_LOW
GFRS
_MEDIUM
GFRS
S_HIGH
GFR
TE. INVALID quality is returned if state is not FREQTRACKING or
NO
Value
0
1
2
3
PHASETRACKING.
he function completed successfully.
T
The device is not connected.
The GNSS receiver must be enabled and selected as the Frequency Reference
source (FRS_GNSS) to use this function.
The “state” value indicates the current internal state of the GNSS Frequency
Reference adjustment system. The states mostly correspond to the possible
control modes, but also indicate how initialization and/or tracking is going.
GRFS_OFF: GNSS not selected as Frequency Reference source.
GFRS_ACQUIRING: Initial synchronization and alignment of the oscillator
is occurring. This is the first state entered when GNSS source is selected. It
remains in this state until the GNSS receiver achieves navigation lock. Until
the receiver locks, no frequency adjustments are done. It continues in this
state until oscillator adjustments bring the internal oscillator frequency within
-6
±1x10
(1 ppm) of the ideal GNSS 1PPS frequency.
GRFS_FREQTRACKING: Fine adjustment of the reference oscillator
is occurring. Only small adjustments are allowed in this state. The
adjustments attempt to minimize the difference between the 1PPS pulse
frequency and the internal oscillator frequency.
GRFS_PHASETRACKING: Fine adjustment of the reference oscillator is
occurring. Only small adjustments are allowed in this state. The adjustments
attempt to maintain the sample timing at a consistent relationship to the
1PPS signal interval. If the timing c annot be maintained within ±100 μsec
range, the state will transition to GRFS_FREQTRACKING.
API Reference13
Configure functi
ons
GFRS_HOLDING
: Frequency adjustments are disabled. This may be
caused by intentionally setting the mode to GFRM_HOLD. It may also occur
if GNSS navigation lock is lost. During the unlock interval, the HOLDING
stateisineff
ect and the most recent adjustment setting is maintained.
The “quality” indicates how well the frequency adjustment is performing. It is valid
only when “state” is GRFS_FREQTRACKING or GRFS_PHASETRACKING;
otherwise, i
t returns INVALID. The quality state values are:
GFRQ_LOW: Frequency error is > ±0.2 x 10
6
GFRQ_MEDIUM:±0.2 x 10
(0.2 ppm) > Frequency error > ±0.025 x 10
6
(0.2 ppm)
6
(0.025 ppm)
GFRQ_HIGH: Frequency error < ±0.025 x 10
6
(0.025 ppm)
14API Reference
Configure functi
ons
CONFIG_SetMod
rection
Declaration:
Parameters:
mode:
Return Values:
noError:
errorNotConnected:
errorParameter:
Additional Detail:
eGnssFreqRefCor-
This command is
Controls the operating mode of the GNSS Frequency Reference correction.
ReturnStatus CONFIG_SetModeGnssFreqRefCorrection(GFR_MODE mode);
GNSS Frequen
GFR_MODE
GFRM_FREQT
GFRM_PHAS
GFRM_HOL
NOTE. GFR
The function completed successfully.
The device is not connected.
Invalid input parameter or GNSS not selected as Frequency Reference source.
The GNSS receiver must be enabled and selected as the Frequency Reference
e (FRS_GNSS) to use this function. An error status is returned if it is
sourc
not selected.
The default mode is FREQTRACK. When the GNSS source is selected, this
is always set initially. O ther modes must be set explicitly after selecting
mode
GNSS source. If the GNSS source is deselected and later reselected, the mode
is set to FREQTRACK. There is no memory of previous mode settings. The
setting may be changed at any time while GNSS is selected. However,
mode
control changes may take up to 50 msec to be processed, so should not be
posted at a high rate. If multiple control changes are posted quickly, the function
l “stall” after the first one until each change is accepted and processed, taking
wil
50 msec per change.
FREQTRACK mode uses the GNS S internal 1PPS pulse as a high-accuracy
equency source to correct the internal reference oscillator frequency. It adjusts
fr
the oscillator to minimize the frequency difference between it and the 1PPS
signal. This is the normal operating mode, and can usually be left in this mode
less special conditions call for switching to the other modes. When need for
un
the other modes is over, FREQT RA CK mode should be restored.
PHASETRACK mode is similar to FREQTRACK mode, as it adjusts the
eference oscillator based on the 1PPS signal. However, it attempts to maintain,
r
on average, a consistent number of oscillator cycles within a 1PPS interval.
This is useful when recording long IF or IQ data records, as it keeps the data
ample timing aligned over the record, to within +/-100 nsec of the 1PPS
s
time location when the mode is initiated. PHASETRACK mode does more
oscillator adjustments than FREQTRACK mode, so it should only be used
when specifically needed for long-term recording. When GNSS source is first
selected, FREQTRACK mode should be selected until the tracking quality has
reached MEDIUM, before using PHASETRACK mode.
HOLD mode pauses the oscillator adjustments w ithout stopping the GNSS
monitoring. This can be used to prevent oscillator adjustments during
acquisitions. Remember that the mode change can take up to 50 msec to be
accepted.
for RSA500A Series and RSA600A Series instruments only.
cy Reference operating mode. Valid settings are:
Value
RACK
ETRACK
D
M_OFF (0) is not a valid mode setting.
2
3
4
API Reference15
Configure functi
ons
CONFIG_GetSta
fAlign
Declaration:
Parameters:
enable:
Return Values:
noError:
errorNotConnected:
Additional Detail:
CONFIG_
GetFreqRefUserSetting
Declaration:
Parameters:
o_usstr:
tusGnssTimeRe-
This command is
Queries the status of API Time Reference alignment from the internal GNSS
Pointer to a char array to return the formatted user setting string:
$FRU,<devType>,<devSN>,<dacVal>,<dateTime>,<devTemp>*<CS>
Where
<devType> : device type
<devSN> : device serial number
<dac
<dateTime> : date and time of creation, fmt: YYYY-MM-DDThh:mm:ss
<devTemp> : device temperature (degC) at creation
<CS
mand is for RSA500A Series and RSA600A Series instruments only.
:
Val> : integer DAC value
> : integer checksum of chars before ‘*’ char
for RSA500A Series and RSA600A Series instruments only.
reference has not been set from GNSS receiver.
me reference setting is disabled (see CONFIG_GetEnableG-
he User setting is not valid,then the user string result returns the string
If t
“Invalid User Setting”.
turn Values:
Re
noError:
rrorNotConnected:
e
Additional Detail:
16API Reference
e function completed successfully.
Th
The device is not connected.
This function is normally only used when creating a User setting string
for external non-volatile storage. It can also be used to query the current
User setting data in case the ancillary information is desired. The
CONFIG_DecodeFreqRefUserSettingString() function can then be used to
extract the individual items.
Configure functi
ons
CONFIG_SetFre
Declaration:
Parameters:
i_usstr:
Return Values:
noError:
errorNotConnected:
errorPar
nal Detail:
Additio
qRefUserSetting
ameter:
This command is
Sets the Frequency Reference User-source setting value.
CONFIG_SetFreqRefUserSetting(const char* i_usstr);
If i_usstr is
User setting memory.
Otherwise, the input pointer must point to a char string as formatted by the
CONFIG_Get
decodes correctly and matches device), it is used to set the User setting
memory. If the string is invalid, the User setting is not changed.
The function completed successfully.
The devic
The input string is invalid (incorrect device or format)
This function is provided to support store and recall of User Frequency
Reference setting. This function only sets the User setting value used during
ent device Connect session. The value is lost at Disconnect.
the curr
With a NULL argument, the function causes the current Frequency
Reference control setting to be copied to the internal User setting memory.
e User setting can be retrieved as a formatted string using the
Then th
CONFIG_GetFreqRefUserSetting() function, for storage by the user
application. These operations are normally done only after GNSS Frequency
ence correction has been used to produce an improved Frequency
Refer
Reference setting which the user wishes to use in place of the default
INTERNAL factory setting. After CONFIG_SetFreqRefUserSetting() i s used,
G_SetFrequencyReferenceSource() can be used to select the new User
CONFI
setting for use as the Frequency Reference.
The function can be used to set the internal User setting memory to the
es in a valid previously-generated formatted string argument. This allows
valu
applications to recall previously stored User Frequency Reference settings as
desired. The CONFIG_SetFrequencyReferenceSource() function should then
ed to select the USER source.
be us
The formatted user setting string is specific to the device it was generated on
and will not be accepted if input to this function on another device.
for RSA500A Series and RSA600A Series instruments only.
NULL, the current Frequency Reference setting is copied to the
FreqRefUserSetting() function. If the string is valid (format
e is not connected.
API Reference17
Configure functi
ons
CONFIG_SetRef
Declaration:
Parameters:
Return Values:
Additional Detail:
CONFIG_GetAutoAttenuationEnableThis command is for RSA500A Series and RSA600A Series instruments only.
Declaration:
Parameters:
Return Values:
Additional Detail:
erenceLevel
refLevel:Reference level measured in dBm.
noError:
errorNotConnected:
enable:Pointer to a bool. True indicates that auto-attenuation operation is enabled.
noError:
errorNotConnected:
Sets the refere
ReturnStatus
Range: –130 d
The reference level value has been set.
The device is not connected.
The reference level setting controls the signal path gain and attenuation
settings
level, in dBm. Setting the value too low may result in over-driving the signal path
and ADC, while setting it too high results in excess noise in the signal.
Queries signal path auto-attenuation enable state.
ReturnStatus CONFIG_GetAutoAttenuationEnable(bool *enable);
False indicates it is disabled.
The function completed successfully.
The device is not connected.
This function returns the enable state value set by the last call to
CONFIG_SetAutoAttenuationEnable(), regardless of whether it has
applied to the hardware yet.
nce level.
CONFIG_SetReferenceLevel(double refLevel);
Bm to 30 dBm.
. The value should be set to the maximum expected signal input power
been
CONFIG_SetAutoAttenuationEnableThis command is for RSA500A Series and RSA600A Series instruments only.
Sets the signal path auto-attenuation enable state.
Declaration:
Parameters:
enable:True enables auto-attenuation operation. False disables it.
Return Values:
noError:
errorNotConnected:
Additional Detail:When auto-attenuation operation is enabled, the RF Input Attenuator is
The function completed successfully.
The device is not connected.
automatically configured to an optimal value which accommodates input
signal levels up to the Reference Level. Auto-attenuation operation bases the
attenuator setting on the current Reference Level, Center Frequency and RF
Preamplifier state. When the RF Preamplifier is enabled, the RF Attenuator
setting is adjusted to account for the additional gain. Note that auto-attenuation
state does not affect the RF Preamplifier state.
The device Run state must be re-applied to apply the new state value to the
hardware. At device connect time, the auto-attenuation state is initialized to
enabled (true).
18API Reference
Configure functi
ons
CONFIG_GetRFP
Declaration:
Parameters:
Return Valu
Additional Detail:
CONFIG_SetRFPreampEnableThis command is for RSA500A Series and RSA600A Se ries instruments only.
Declaration:
Parameters:
Return Values:
Additional Detail:
reampEnable
enable:
es:
noError:
errorNotC
enable:
noError:
errorNotConnected:
onnected:
This command is
Queries the state of the RF Preamplifier.
ReturnStatus CONFIG_GetPreampEnable(bool *enable);
Pointer to a b
it is disabled.
The functio
The device is not connected.
This func
call to CONFIG_SetRFPreampEnable(), regardless of w hether it has been
applied to the hardware yet.
Sets the RF Preamplifier enable state.
ReturnStatus CONFIG_SetRFPreampEnable(bool enable);
True enables the RF Preamplifier. False disables it.
The function completed successfully.
The device is not connected.
This function provides direct control of the RF Preamplifier. The Preamplifier
state is independent of the auto-attenuation s tate or RF Attenuator setting.
The Preamplifier provides nominally 25 dB of gain when enabled, with gain
varying over the device RF frequency range (refer to the device data sheet for
detailed preamp response specifications). When the Preamplifier is enabled,
the device R eference Level setting should be –15 dBm or lower to avoid
saturating internal signal path components.
The device Run state must be r e-applied to cause a new state value to be
applied to the hardware.
tion returns the RF Preamplifier enable state value set by the last
for RSA500A Series and RSA600A Series instruments only.
ool. True indicates the RF Preamplifier is enabled. False indicates
n completed successfully.
CONFIG_GetRFAttenuatorThis command is for RSA500A Series and RSA600A Se ries instruments only.
Queries the setting of the RF Input Attenuator.
Declaration:
Parameters:
value:Pointer to a double. Returns the RF Input Attenu
The function completed successfully.
The device is not connected.
If auto-attenuation is enabled, the returned value is the current RF attenuator
hardware configuration. If auto-attenuati
mode), the returned value is the last value set by CONFIG_SetRFAttenuator(),
regardless of whether it has been applied to the hardware.
on is disabled (manual attenuation
Configure functi
ons
CONFIG_SetRFA
Declaration:
Parameters:
value:
Return Values:
noError:
errorNotConnected:
Additional Detail:
ttenuator
This command is
Sets the RF Input Attenuator value manually.
ReturnStatus CONFIG_SetRFAttenuator(double value);
Setting to co
The function completed s uccessfully
The device is not connected.
This function allows direct control of the RF Input Attenuator setting. The
attenuat
outside the range are converted to the closest legal value. Input values with
fractional parts are rounded to the nearest integer value, giving 1 dB steps.
The devic
effect. Setting the attenuator value with this function does not change the
auto-attenuation state. Use CONFIG_SetAutoAttenuationEnable() to change
the auto
The device Run state must be re-applied to cause a new setting value to be
applied to the hardware.
Improp
in degraded performance. This is particularly true if the RF Preamplifier state is
changed. When making significant attenuator or preamp setting changes, i t is
recomm
for a desired Reference Level, then query the attenuator setting to determine
reasonable values for further manual control.
or can be set in 1 dB steps, over the range –51 dB to 0 dB. Input values
-attenuation state.
er manual attenuator setting may cause signal path saturation, resulting
ended to use auto-attenuation mode to set the initial R F Attenuator level
for RSA500A Series and RSA600A Series instruments only.
nfigure the RF Input Attenuator, in dB units.
e auto-attenuation state must be disabled for this control to have
20API Reference
Device function
s
Device functi
DEVICE_ConnectConnects to a device specified by the deviceID parameter.
Declaration:
Parameters:
deviceID:
Return Values:
noError:The device has been connected.
errorTransfer:The POST status could not be retrieved from the device.
errorIncompatibleFirmware:
errorNotConnected:
Additional Detail:
DEVICE_DisconnectStops data acquisition and disconnects from the connected device.
Declaration:
Return Values:
noError:The device has been disconnected.
errorDisconnectFailure:
ons
ReturnStatus DEVICE_Connect(int deviceID);
Device ID found during the Search function call.
The firmware version is incompatible wi th the API version.
The device is not connected.
The deviceID value must be found by the Search function call.
ReturnStatus DEVICE_Disconnect();
The disconnect failed.
DEVICE_GetEnableQueries the run state.
Declaration:
Parameters:
enable:Pointer to a bool variable. Returns the device run state.
Return Values:
noError:The run state has been queried.
errorNotConnected:
Additional Detail:The value is stored in the enable parameter.
DEVICE_GetErrorStringReturns a string that corresponds to the ReturnStatus value s pecified by the
Declaration:
Parameters:
status:
Return Values:
ReturnStatus DEVICE_GetEnable(bool* enable);
True indicates the device is in the Run state. False indicates it is in the Stop
state.
The device is not connected.
The device only produces data results when in the Run state, when signal
samples flow from the device to the host API.
status parameter.
ReturnStatus const char* DEVICE_GetErrorString(ReturnStatus status);
A ReturnStatus value.
Pointer to a string corresponding to the status input value. ReturnStatus error
codes are listed in the RSA_API.h interface file.
API Reference21
Device function
s
DEVICE_GetFPG
Declaration:
Parameters:
Return Values:
Additiona
DEVICE_GetFWVersionStores the firmware version number in the fwVersion parameter.
Declaration:
Parameters:
Return Values:
Additional Detail:
AVersion
fpgaVersion:String that contains the FGPA version number when the function completes.
noError:
errorNotConnected:
l Detail:
fwVersion:String that contains the firmware version number when the function completes.
noError:
errorNotConnected:
Stores the FPGA
ReturnStatus
The FPGA version number has been stored in the variable.
The device i
The FPGAVersion has the form: “Vmajor.minor”.
For example:
The firmware version has been stored in the variable.
The device is not connected.
The firmware version number has the form: “Vmajor.minor”.
For example:
“V3.4”: major = 3, minor = 4
version number in the fpgaVersion parameter.
DEVICE_GetFPGAVersion(char* fpgaVersion);
s not connected.
ajor = 3, minor = 4
DEVICE_GetHWVersionStores the hardware version in a string. It has the form: “V versionNumber”.
Declaration:
Parameters:
hwVersion:
Return Values:
noError:The HW version number is stored in the hwVersion parameter.
errorNotConnected:
Obtaining a device’s nomenclature can be accomplished with similar functions. These functions are grouped together.
DEVICE_GetNomenclatureStores the name of the device in the nomenclature parameter.
Declaration:
DEVICE_GetNomenclatureWStores the name of the device in the nomenclatureW parameter.
String that contains the API version number when the function completes.
The API version number has been successfully stored in the a piVersion
parameter.
The API version number has the form: “majorNumber.minorNumber.revisionNumber”.
For example:
“3.4.0145”: 3 = major number, 4 = minor number, 0145 = revision number
ready to stream data, but does not actually initiate data transfer.
ReturnStatus DEVICE_PrepareForRun();
During file playback mode, this is useful to allow other parts of your
application to prepare to receive data before starting the transfer. (See
DEVICE_StartFrameTransfer). This is in comparison to the Run() function,
which immediately starts data streaming without waiting for a Go signal.
al number of the device in the serialNum parameter.
DEVICE_GetSerialNumber(char* serialNum);
erial number has been set.
DEVICE_GetInfoRetrieves multiple device and version information strings.
Declaration:
Parameters:
devInfo:Pointer to DEVICE_INFO structure which contains the device and version
The function has successfully completed.
A device is not connected.
The device must be connected to perform this operation. The device
Nomenclature, Serial Number, FW version, FPGA version, HW version, and the
API SW version are returned in strings within the DEVICE_INFO structure.
The caller must create an instance of this structure and pass a pointer to the
function. The format of each information string is the same as those described
in the individual DEV ICE_G et... functions.
Device function
s
DEVICE_GetOve
Declaration:
Parameters:
Return Valu
Additional Detail:
DEVICE_ResetReboots the specified device.
Declara
Return V
rTemperatureStatus
overTemperature:Pointer to a bool variable. Returns over-temperature status.
es:
noError:
errorNotC
noError:The device has been rebooted.
errorRebootFailure:
onnected:
tion:
alues:
Queries for dev
ReturnStatus
True indicates the internal device temperature is above nominal safe operating
range, and ma
indicates the device temperature is within the safe operating range.
The functio
A device is not connected.
This funct
when operating in high-temperature environments. If the over-temperature
condition is detected, the device should be powered down or moved to a lower
temperat
Pointer to an
search call. A returned value of 0 indicates no devices found.
Returns an array of device ID numbers, numDevicesFound entries.
char or wchar_t strings are returned depending on the function used.
Returns an array of strings of device types, numDevicesFound entries.
char or wc
Valid device type strings are: "RSA306", "RSA306B", "RSA503A",
"RSA507A","RSA603A","RSA607A"
The sear
The num
value is 0, the other returned items a re not defined and should not be used.
Search functions with "Int" in their name return array items in static internal
array b
result buffers remain valid until the next search operation is performed. Search
functions without "Int" in the name require the caller to allocate external storage
sult arrays.
for re
Usage
int n
{char|wchar_t} devSN[RSA_API::DEVSRCH_MAX_NUM_DEVICES][RSA_API::DEVSRCH_SERIAL_MAX_STRLEN];
{ch
VICES][RSA_API::DEVSRCH_TYPE_MAX_STRLEN];
// Results returned in user-supplied buffers
rs =
age with internal result buffers ("Int" functions):
Us
int numDevices;
t* devID; // ptr to devID array
in
const {char|wchar_t}** devSN; // ptr to array of ptrs to devSN strings
const {char|wchar_t}** devType; // ptr to array of ptrs to devType strings
noError:
errorTransfer:Data transfer could not be initiated.
Additional Detail:
DEVICE_St
op
Declaration:
Return Values:
noError:The data acquisition has stopped.
errorTransfer:
errorNotConnected:
onal Detail:
Additi
rameTransfer
Starts data tra
ReturnStatus
System transfer has started.
This is typically used as the trigger to start data streaming after a call to
DEVICE_Pre
back into the run state with no changes to any internal data or settings, and data
streaming will begin assuming there are no errors.
Stops data
ReturnSt
The devi
The devi
This function must be called when changes are made to values that affect the
signal.
nsfer.
DEVICE_StartFrameTransfer();
pareForRun. If the system is in the stopped state, this call places it
acquisition.
atus DEVICE_Stop();
ce did not receive the command.
ce is not connected.
26API Reference
Loading...
+ 89 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.