device_handler
device_handler.h
device_handler::device
device_handler::rfe_device
int int device_handler::open_devices open_devices device_handler::open_devices = 0
bool bool device_handler::list_read list_read device_handler::list_read = false
int int device_handler::device_count device_count device_handler::device_count
struct device_handler::rfe_device struct device_handler::rfe_device device_handler::rfe_device rfe_device device_handler::rfe_device
lms_info_str_t * lms_info_str_t* device_handler::list list device_handler::list = new lms_info_str_t[20]
std::vector< device > std::vector<device> device_handler::device_vector device_vector device_handler::device_vector
bool bool device_handler::close_flag close_flag device_handler::close_flag = false
gr::logger_ptr gr::logger_ptr device_handler::d_logger d_logger device_handler::d_logger
std::recursive_mutex std::recursive_mutex device_handler::block_mutex block_mutex device_handler::block_mutex
device_handler::device_handler
()
device_handler
device_handler::device_handler
device_handler::device_handler
(device_handler const &)
device_handler
device_handler::device_handler
device_handler const &
void void device_handler::operator= (device_handler const &) operator= device_handler::operator= device_handler const &
device_handler & static device_handler & device_handler::getInstance () getInstance device_handler::getInstance
device_handler::~device_handler
()
~device_handler
device_handler::~device_handler
void void device_handler::error (int device_number) error device_handler::error int device_number

Print device error and close all devices.

device_number

Device number from the list of LMS_GetDeviceList.

lms_device_t * lms_device_t * device_handler::get_device (int device_number) get_device device_handler::get_device int device_number

Get device connection handler in order to configure it.

device_number

Device number from the list of LMS_GetDeviceList.

int int device_handler::open_device (std::string &serial) open_device device_handler::open_device std::string & serial

Connect to the device and create singletone.

serial

Device serial from the list of LMS_GetDeviceList.

void void device_handler::close_device (int device_number, int block_type) close_device device_handler::close_device int device_number int block_type

Disconnect from the device.

device_number

Device number from the list of LMS_GetDeviceList.

block_type

Source block(1), Sink block(2).

void void device_handler::close_all_devices () close_all_devices device_handler::close_all_devices

Disconnect from all devices.

void void device_handler::check_blocks (int device_number, int block_type, int channel_mode, const std::string &filename) check_blocks device_handler::check_blocks int device_number int block_type int channel_mode const std::string & filename

Check what blocks are used for single device.

device_number

Device number from the list of LMS_GetDeviceList.

block_type

Source block(1), Sink block(2).

channel_mode

Channel A(0), Channel B(1), MIMO(2)

filename

Path to file if file switch is turned on.

void void device_handler::settings_from_file (int device_number, const std::string &filename, int *antenna_tx) settings_from_file device_handler::settings_from_file int device_number const std::string & filename int * antenna_tx

Load settings from .ini file.

device_number

Device number from the list of LMS_GetDeviceList.

filename

Path to file if file switch is turned on.

antenna_tx

Pointer to TX antenna, so PA path would be updated in sink block

void void device_handler::enable_channels (int device_number, int channel_mode, bool direction) enable_channels device_handler::enable_channels int device_number int channel_mode bool direction

Set used channels

device_number

Device number from the list of LMS_GetDeviceList.

channel_mode

Channel A(0), Channel B(1), MIMO(2)

direction

Direction of samples RX(LMS_CH_RX), TX(LMS_CH_RX).

void void device_handler::set_samp_rate (int device_number, double &rate) set_samp_rate device_handler::set_samp_rate int device_number double & rate

Set the same sample rate for both channels.

device_number

Device number from the list of LMS_GetDeviceList.

rate

Sample rate in S/s.

void void device_handler::set_oversampling (int device_number, int oversample) set_oversampling device_handler::set_oversampling int device_number int oversample

Set oversampling value for both channels

device_number

Device number from the list of LMS_GetDeviceList.

oversample

Oversampling value (0 (default),1,2,4,8,16,32).

double double device_handler::set_rf_freq (int device_number, bool direction, int channel, float rf_freq) set_rf_freq device_handler::set_rf_freq int device_number bool direction int channel float rf_freq

Set RF frequency of both channels (RX and TX separately).

device_number

Device number from the list of LMS_GetDeviceList.

direction

Direction of samples RX(LMS_CH_RX), TX(LMS_CH_TX).

channel

selection: A(LMS_CH_0),B(LMS_CH_1).

rf_freq

RF frequency in Hz.

returns RF frequency in Hz

void void device_handler::calibrate (int device_number, int direction, int channel, double bandwidth) calibrate device_handler::calibrate int device_number int direction int channel double bandwidth

Perform device calibration.

device_number

Device number from the list of LMS_GetDeviceList.

direction

Direction of samples: RX(LMS_CH_RX),TX(LMS_CH_RX).

channel

Channel selection: A(LMS_CH_0),B(LMS_CH_1).

bandwidth

Set calibration bandwidth in Hz.

void void device_handler::set_antenna (int device_number, int channel, int direction, int antenna) set_antenna device_handler::set_antenna int device_number int channel int direction int antenna

Set which antenna is used

device_number

Device number from the list of LMS_GetDeviceList.

channel

Channel selection: A(LMS_CH_0),B(LMS_CH_1).

direction

Direction of samples: RX(LMS_CH_RX),TX(LMS_CH_RX).

antenna

Antenna to set: None(0), LNAH(1), LNAL(2), LNAW(3) for RX None(0), BAND1(1), BAND(2), NONE(3) for TX

double double device_handler::set_analog_filter (int device_number, bool direction, int channel, double analog_bandw) set_analog_filter device_handler::set_analog_filter int device_number bool direction int channel double analog_bandw

Set analog filters.

device_number

Device number from the list of LMS_GetDeviceList.

direction

Direction of samples: RX(LMS_CH_RX),TX(LMS_CH_TX).

channel

Channel selection: A(LMS_CH_0),B(LMS_CH_1).

analog_bandw

Channel filter bandwidth in Hz.

double double device_handler::set_digital_filter (int device_number, bool direction, int channel, double digital_bandw) set_digital_filter device_handler::set_digital_filter int device_number bool direction int channel double digital_bandw

Set digital filters (GFIR).

device_number

Device number from the list of LMS_GetDeviceList.

direction

Direction of samples: RX(LMS_CH_RX),TX(LMS_CH_TX).

channel

Channel selection: A(LMS_CH_0),B(LMS_CH_1).

digital_bandw

Channel filter bandwidth in Hz.

unsigned unsigned device_handler::set_gain (int device_number, bool direction, int channel, unsigned gain_dB) set_gain device_handler::set_gain int device_number bool direction int channel unsigned gain_dB

Set the combined gain value in dB This function computes and sets the optimal gain values of various amplifiers that are present in the device based on desired gain value in dB.

actual gain depends on LO frequency and analog LPF configuration and resulting output signal level may be different when those values are changed

device_number

Device number from the list of LMS_GetDeviceList.

direction

Select RX or TX.

channel

Channel selection: A(LMS_CH_0),B(LMS_CH_1).

gain_dB

Desired gain: [0,73] dB

void void device_handler::set_nco (int device_number, bool direction, int channel, float nco_freq) set_nco device_handler::set_nco int device_number bool direction int channel float nco_freq

Set NCO (numerically controlled oscillator). By selecting NCO frequency configure NCO. When NCO frequency is 0, NCO is off.

device_number

Device number from the list of LMS_GetDeviceList.

direction

Select RX or TX.

channel

Channel index.

nco_freq

NCO frequency in Hz.

void void device_handler::disable_DC_corrections (int device_number) disable_DC_corrections device_handler::disable_DC_corrections int device_number

Disables LimeSDR boards DC corrections

void void device_handler::set_tcxo_dac (int device_number, uint16_t dacVal) set_tcxo_dac device_handler::set_tcxo_dac int device_number uint16_t dacVal

Set TCXO DAC.

Care must be taken as this parameter is returned to default value only after power off.

LimeSDR-Mini default value is 180 range is [0,255] LimeSDR-USB default value is 125 range is [0,255] LimeSDR-PCIe default value is 134 range is [0,255] LimeNET-Micro default value is 30714 range is [0,65535]

device_number

Device number from the list of LMS_GetDeviceList.

dacVal

DAC value (0-65535)

void void device_handler::set_rfe_device (rfe_dev_t *rfe_dev) set_rfe_device device_handler::set_rfe_device rfe_dev_t * rfe_dev

Sets up LimeRFE device pointer so that automatic channel configuration could be made rfe_dev

Pointer to LimeRFE device descriptor

void void device_handler::update_rfe_channels () update_rfe_channels device_handler::update_rfe_channels

Assigns configured LimeSDR channels to LimeRFE for automatic channel switching

void void device_handler::write_lms_reg (int device_number, uint32_t address, uint16_t val) write_lms_reg device_handler::write_lms_reg int device_number uint32_t address uint16_t val

Writes an LMS register by calling LMS_WriteLMSReg()

void void device_handler::set_gpio_dir (int device_number, uint8_t dir) set_gpio_dir device_handler::set_gpio_dir int device_number uint8_t dir
void void device_handler::write_gpio (int device_number, uint8_t out) write_gpio device_handler::write_gpio int device_number uint8_t out
uint8_t uint8_t device_handler::read_gpio (int device_number) read_gpio device_handler::read_gpio int device_number
device_handler
block_mutex
std::recursive_mutex
- device_handler
  block_mutex
- device_handler
  calibrate
- device_handler
  check_blocks
- device_handler
  close_all_devices
- device_handler
  close_device
- device_handler
  close_flag
- device_handler
  d_logger
- device_handler
  device_count
- device_handler
  device_handler
- device_handler
  device_handler
- device_handler
  device_vector
- device_handler
  disable_DC_corrections
- device_handler
  enable_channels
- device_handler
  error
- device_handler
  get_device
- device_handler
  getInstance
- device_handler
  list
- device_handler
  list_read
- device_handler
  open_device
- device_handler
  open_devices
- device_handler
  operator=
- device_handler
  read_gpio
- device_handler
  rfe_device
- device_handler
  set_analog_filter
- device_handler
  set_antenna
- device_handler
  set_digital_filter
- device_handler
  set_gain
- device_handler
  set_gpio_dir
- device_handler
  set_nco
- device_handler
  set_oversampling
- device_handler
  set_rf_freq
- device_handler
  set_rfe_device
- device_handler
  set_samp_rate
- device_handler
  set_tcxo_dac
- device_handler
  settings_from_file
- device_handler
  update_rfe_channels
- device_handler
  write_gpio
- device_handler
  write_lms_reg
- device_handler
  ~device_handler