<+description of block+>
More...
#include <source.h>
|
static sptr | make (std::string serial, int channel_mode, const std::string &filename, bool align_ch_phase) |
| Return a shared_ptr to a new instance of limesdr::source.
|
|
◆ sptr
◆ 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, |
|
|
bool |
align_ch_phase |
|
) |
| |
|
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
-
- Returns
- a new limesdr source block object
◆ read_gpio()
virtual uint8_t gr::limesdr::source::read_gpio |
( |
| ) |
|
|
pure virtual |
Read GPIO inputs
Read GPIO inputs by calling LMS_GPIORead()
- Returns
- input level bitmap (eight bits, one for each pin)
Implemented in gr::limesdr::source_impl.
◆ 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_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,73] dB |
channel | Channel selection: A(LMS_CH_0),B(LMS_CH_1). |
- Returns
- actual gain in dB
Implemented in gr::limesdr::source_impl.
◆ set_gpio_dir()
virtual void gr::limesdr::source::set_gpio_dir |
( |
uint8_t |
dir | ) |
|
|
pure virtual |
Set GPIO direction
Set GPIO direction by calling LMS_GPIODirWrite()
- Parameters
-
dir | Direction bitmap (eight bits, one for each pin, 1 = output, 0 = input) |
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
-
- 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.
◆ write_gpio()
virtual void gr::limesdr::source::write_gpio |
( |
uint8_t |
out | ) |
|
|
pure virtual |
Write GPIO outputs
Write GPIO outputs by calling LMS_GPIOWrite()
- Parameters
-
out | Level bitmap (eight bits, one for each pin) |
Implemented in gr::limesdr::source_impl.
◆ write_lms_reg()
virtual void gr::limesdr::source::write_lms_reg |
( |
uint32_t |
address, |
|
|
uint16_t |
val |
|
) |
| |
|
pure virtual |
The documentation for this class was generated from the following file: