GNU Radio's TEST Package
|
#include <bladerf_common.h>
Public Member Functions | |
bladerf_common () | |
Protected Member Functions | |
void | init (dict_t const &dict, bladerf_direction direction) |
bladerf_board_type | get_board_type () |
size_t | get_max_channels (bladerf_direction direction) |
void | set_channel_enable (bladerf_channel ch, bool enable) |
bool | get_channel_enable (bladerf_channel ch) |
void | set_verbosity (std::string const &verbosity) |
bladerf_channel | str2channel (std::string const &ch) |
std::string | channel2str (bladerf_channel ch) |
int | channel2rfport (bladerf_channel ch) |
bladerf_channel | chan2channel (bladerf_direction direction, size_t chan=0) |
osmosdr::meta_range_t | sample_rates (bladerf_channel ch) |
double | set_sample_rate (double rate, bladerf_channel ch) |
double | get_sample_rate (bladerf_channel ch) |
osmosdr::freq_range_t | freq_range (bladerf_channel ch) |
double | set_center_freq (double freq, bladerf_channel ch) |
double | get_center_freq (bladerf_channel ch) |
osmosdr::freq_range_t | filter_bandwidths (bladerf_channel ch) |
double | set_bandwidth (double bandwidth, bladerf_channel ch) |
double | get_bandwidth (bladerf_channel ch) |
std::vector< std::string > | get_gain_names (bladerf_channel ch) |
osmosdr::gain_range_t | get_gain_range (bladerf_channel ch) |
osmosdr::gain_range_t | get_gain_range (std::string const &name, bladerf_channel ch) |
bool | set_gain_mode (bool automatic, bladerf_channel ch, bladerf_gain_mode agc_mode=BLADERF_GAIN_DEFAULT) |
bool | get_gain_mode (bladerf_channel ch) |
double | set_gain (double gain, bladerf_channel ch) |
double | set_gain (double gain, std::string const &name, bladerf_channel ch) |
double | get_gain (bladerf_channel ch) |
double | get_gain (std::string const &name, bladerf_channel ch) |
std::vector< std::string > | get_antennas (bladerf_direction dir) |
bool | set_antenna (bladerf_direction dir, size_t chan, const std::string &antenna) |
int | set_dc_offset (std::complex< double > const &offset, bladerf_channel ch) |
int | set_iq_balance (std::complex< double > const &balance, bladerf_channel ch) |
std::vector< std::string > | get_clock_sources (size_t mboard=0) |
void | set_clock_source (std::string const &source, size_t mboard=0) |
std::string | get_clock_source (size_t mboard=0) |
void | set_smb_frequency (double frequency) |
double | get_smb_frequency () |
Static Protected Member Functions | |
static std::vector< std::string > | devices () |
Protected Attributes | |
bladerf_sptr | _dev |
std::string | _pfx |
unsigned int | _failures |
size_t | _num_buffers |
size_t | _samples_per_buffer |
size_t | _num_transfers |
unsigned int | _stream_timeout |
bladerf_format | _format |
bladerf_channel_map | _chanmap |
bladerf_channel_enable_map | _enables |
Static Protected Attributes | |
static const unsigned int | MAX_CONSECUTIVE_FAILURES = 3 |
static const int16_t | DCOFF_SCALE = 2048 |
static const int16_t | GAIN_SCALE = 4096 |
static const int16_t | PHASE_SCALE = 4096 |
Common class for bladeRF interaction
bladerf_common::bladerf_common | ( | ) |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Handle initialization and parameters common to both source & sink
Specify arguments in key=value,key=value format, e.g. bladerf=0,buffers=512
Recognized arguments:
REQUIRED: bladerf a valid instance or serial number USB INTERFACE CONTROL: buffers (default: NUM_BUFFERS) buflen (default: NUM_SAMPLES_PER_BUFFER) stream_timeout valid time in milliseconds (default: 3000) transfers (default: NUM_TRANSFERS) FPGA CONTROL: enable_metadata 1 to enable metadata fpga a path to a valid .rbf file fpga-reload 1 to force reloading the FPGA unconditionally RF CONTROL: agc 1 to enable, 0 to disable (default: hardware-dependent) agc_mode default, manual, fast, slow, hybrid (default: default) loopback bb_txlpf_rxvga2, bb_txlpf_rxlpf, bb_txvga1_rxvga2, bb_txvga1_rxlpf, rf_lna1, rf_lna2, rf_lna3, firmware, ad9361_bist, none (default: none) ** Note: valid on receive channels only rxmux baseband, 12bit, 32bit, digital (default: baseband) ** Note: valid on receive channels only smb a valid frequency tamer internal, external_1pps, external (default: internal) xb200 auto, auto3db, 50M, 144M, 222M, custom (default: auto) MISC: verbosity verbose, debug, info, warning, error, critical, silent (default: info) ** Note: applies only to libbladeRF logging
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
map of antennas to channels
|
protected |
shared pointer for the active device
|
protected |
enabled channels
|
protected |
counter for consecutive rx/tx failures
|
protected |
sample format to use
|
protected |
number of buffers to allocate
|
protected |
number of active backend transfers
|
protected |
prefix for console messages
|
protected |
how many samples per buffer
|
protected |
timeout for backend transfers
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |