I/Q Streaming Example - Signal Hound BB60C Programmer's Reference Manual

Application programming interface
Hide thumbs Also See for BB60C:
Table of Contents

Advertisement

// Configure a 27MHz real-time stream at a 2.44GHz center
bbConfigureAcquisition(handle, BB_MIN_AND_MAX, BB_LOG_SCALE);
bbConfigureCenterSpan(handle, 2.44e9, 20.0e6);
bbConfigureLevel(handle, -20.0, BB_AUTO_ATTEN);
bbConfigureGain(handle, BB_AUTO_GAIN);
// 9.8kHz RBW, for real-time must specify a native BW value
bbConfigureSweepCoupling(handle, 9863.28125, 9863.28125, 0.001,
bbConfigureRealTime(handle, 100.0, 30);
// Initialize the device for real-time
if(bbInitiate(handle, BB_REAL_TIME, 0)) {
myErrorRoutine("Device couldn't
}
// Get sweep characteristics and allocate memory for sweep
unsigned int
sweepSize;
double
binSize, startFreq;
bbQueryTraceInfo(handle, &sweepSize, &binSize, &startFreq);
int
frameWidth, frameHeight;
bbQueryRealTimeInfo(handle, &frameWidth, &frameHeight);
float
*sweep
=
new
float
*frame
=
new
// Retrieve 1 real-time sweep/frame
bbFetchRealTimeFrame(handle, sweep, frame);
// Finished/close device
bbCloseDevice(handle);

I/Q Streaming Example

Below is the smallest example of using the BB60 and API for streaming I/Q data. The code snippet opens
the device, fully configures the device for I/Q data streaming, initializes the device for streaming,
retrieves one packet of data and then closes the device.
int
handle;
bbOpenDevice(&handle);
// Configure an I/Q data stream
bbConfigureCenterSpan(handle, 2400.0e6, 20.0e6);
bbConfigureLevel(handle,
bbConfigureGain(handle, BB_AUTO_GAIN);
// Set a sample rate of 20.0e6 MS/s and bandwidth of 15 MHz
bbConfigureIQ(handle, 2, 15.0e6);
// Initialize the device
bbInitiate(handle, BB_STREAMING, BB_STREAM_IQ);
// Allocate an array large enough for the I/Q stream configured
int
buffer_len;
bbQueryStreamInfo(handle, &buffer_len, 0, 0);
float
*iq_buffer;
// Allocate an array for 'buffer_len' alternating I/Q complex values
iq_buffer
=
new
float[buffer_len
// Retrieve I/Q data packet
Signal Hound | Appendix
BB_NATIVE_RBW, BB_NO_SPUR_REJECT);
float[sweepSize];
float[frameWidth
-20.0
BB_AUTO_ATTEN);
* 2];
initialize");
* frameHeight];
43

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BB60C and is the answer not in the manual?

This manual is also suitable for:

Bb60a

Table of Contents