GNU Radio's LIMESDR Package

Public Types | Public Member Functions | Static Public Member Functions | List of all members
gr::limesdr::source Class Referenceabstract

<+description of block+> More...

`#include <source.h>`

Inheritance diagram for gr::limesdr::source:
[legend]

## Public Types
typedef boost::shared_ptr< source > | sptr

## Public Member Functions
virtual double | set_center_freq (double freq, size_t chan=0)=0
virtual void | set_antenna (int antenna, int channel=0)=0
virtual void | set_nco (float nco_freq, int channel)=0
virtual double | set_bandwidth (double analog_bandw, int channel=0)=0
virtual void | set_digital_filter (double digital_bandw, int channel)=0
virtual unsigned | set_gain (unsigned gain_dB, int channel=0)=0
virtual double | set_sample_rate (double rate)=0
virtual void | set_oversampling (int oversample)=0
virtual void | calibrate (double bandw, int channel=0)=0
virtual void | set_buffer_size (uint32_t size)=0
virtual void | set_tcxo_dac (uint16_t dacVal=125)=0

## Static Public Member Functions
static sptr | make (std::string serial, int channel_mode, const std::string &filename)
| Return a shared_ptr to a new instance of limesdr::source. More...

## Detailed Description

<+description of block+>

## Member Typedef Documentation

## ◆ sptr

typedef boost::shared_ptr<source> gr::limesdr::source::sptr

## Member Function Documentation

## ◆ calibrate()

virtual void gr::limesdr::source::calibrate | ( | double | bandw,
|  | int | channel = `0`
| ) |  |
| pure virtual

Perform device calibration.

Parameters

  bandw | Set calibration bandwidth in Hz.
  channel | Channel selection: A(LMS_CH_0),B(LMS_CH_1).

Implemented in gr::limesdr::source_impl.

## ◆ make()

static sptr gr::limesdr::source::make | ( | std::string | serial,
|  | int | channel_mode,
|  | const std::string & | filename
| ) |  |
| static

Return a shared_ptr to a new instance of limesdr::source.

To avoid accidental use of raw pointers, limesdr::source's constructor is in a private implementation class. limesdr::source::make is the public interface for creating new instances.

Parameters

  serial | Device serial number. Cannot be left blank.
  channel_mode | Channel and mode selection A(1), B(2), (A+B)MIMO(3).
  filename | Path to file if file switch is turned on.

Returns
  a new limesdr source block object

## ◆ set_antenna()

virtual void gr::limesdr::source::set_antenna | ( | int | antenna,
|  | int | channel = `0`
| ) |  |
| pure virtual

Set which antenna is used

Parameters

  antenna | Antenna to set: None(0), LNAH(1), LNAL(2), LNAW(3), AUTO(255)
  channel | Channel selection: A(LMS_CH_0),B(LMS_CH_1).

Implemented in gr::limesdr::source_impl.

## ◆ set_bandwidth()

virtual double gr::limesdr::source::set_bandwidth | ( | double | analog_bandw,
|  | int | channel = `0`
| ) |  |
| pure virtual

Set analog filters.

Parameters

  analog_bandw | Channel filter bandwidth in Hz.
  channel | Channel selection: A(LMS_CH_0),B(LMS_CH_1).

Returns
  actual filter bandwidth in Hz

Implemented in gr::limesdr::source_impl.

## ◆ set_buffer_size()

virtual void gr::limesdr::source::set_buffer_size | ( | uint32_t | size | ) |
| pure virtual

Set stream buffer size

Parameters

  size | FIFO buffer size in samples

Implemented in gr::limesdr::source_impl.

## ◆ set_center_freq()

virtual double gr::limesdr::source::set_center_freq | ( | double | freq,
|  | size_t | chan = `0`
| ) |  |
| pure virtual

Set center frequency

Parameters

  freq | Frequency to set in Hz
  chan | Channel (not used)

Returns
  actual center frequency in Hz

Implemented in gr::limesdr::source_impl.

## ◆ set_digital_filter()

virtual void gr::limesdr::source::set_digital_filter | ( | double | digital_bandw,
|  | int | channel
| ) |  |
| pure virtual

Set digital filters (GFIR).

Parameters

  digital_bandw | Channel filter bandwidth in Hz.
  channel | Channel selection: A(LMS_CH_0),B(LMS_CH_1).

Implemented in gr::limesdr::source_impl.

## ◆ set_gain()

virtual unsigned gr::limesdr::source::set_gain | ( | unsigned | gain_dB,
|  | int | channel = `0`
| ) |  |
| pure virtual

Set the combined gain value in dB

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

Parameters

  gain_dB | Desired gain: [0,70] RX
  channel | Channel selection: A(LMS_CH_0),B(LMS_CH_1).

Returns
  actual gain in dB

Implemented in gr::limesdr::source_impl.

## ◆ set_nco()

virtual void gr::limesdr::source::set_nco | ( | float | nco_freq,
|  | int | channel
| ) |  |
| pure virtual

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

Parameters

  nco_freq | NCO frequency in Hz.
  channel | Channel index.

Implemented in gr::limesdr::source_impl.

## ◆ set_oversampling()

virtual void gr::limesdr::source::set_oversampling | ( | int | oversample | ) |
| pure virtual

Set oversampling for both channels.

Parameters

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

Implemented in gr::limesdr::source_impl.

## ◆ set_sample_rate()

virtual double gr::limesdr::source::set_sample_rate | ( | double | rate | ) |
| pure virtual

Set the same sample rate for both channels.

Parameters

  rate | Sample rate in S/s.

Returns
  actual sample rate in S/s

Implemented in gr::limesdr::source_impl.

## ◆ set_tcxo_dac()

virtual void gr::limesdr::source::set_tcxo_dac | ( | uint16_t | dacVal = `125` | ) |
| pure virtual

Set TCXO DAC.

Note
  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]

Parameters

  dacVal | DAC value (0-65535)

Implemented in gr::limesdr::source_impl.

The documentation for this class was generated from the following file:

- source.h