gr::limesdr::sink_impl Class Reference

`#include <sink_impl.h>`

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

## Public Member Functions

| sink_impl (std::string serial, int channel_mode, const std::string &filename, const std::string &length_tag_name)
| ~sink_impl ()
int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
bool | start (void)
bool | stop (void)
gr::io_signature::sptr | args_to_io_signature (int channel_number)
void | init_stream (int device_number, int channel)
void | release_stream (int device_number, lms_stream_t *stream)
double | set_center_freq (double freq, size_t chan=0)
void | set_antenna (int antenna, int channel=0)
void | toggle_pa_path (int device_number, bool enable)
void | set_nco (float nco_freq, int channel=0)
double | set_bandwidth (double analog_bandw, int channel=0)
void | set_digital_filter (double digital_bandw, int channel=0)
unsigned | set_gain (unsigned gain_dB, int channel=0)
double | set_sample_rate (double rate)
void | set_oversampling (int oversample)
void | set_buffer_size (uint32_t size)
void | calibrate (double bandw, int channel=0)
void | set_tcxo_dac (uint16_t dacVal=125)

## Additional Inherited Members

Public Types inherited from gr::limesdr::sink
typedef boost::shared_ptr< sink > | sptr
Static Public Member Functions inherited from gr::limesdr::sink
static sptr | make (std::string serial, int channel_mode, const std::string &filename, const std::string &length_tag_name)
| Return a shared_ptr to a new instance of sink.

## Constructor & Destructor Documentation

## sink_impl()

gr::limesdr::sink_impl::sink_impl | ( | std::string | serial,
|  | int | channel_mode,
|  | const std::string & | filename,
|  | const std::string & | length_tag_name )

## ~sink_impl()

gr::limesdr::sink_impl::~sink_impl | ( |  | ) |

## Member Function Documentation

## args_to_io_signature()

gr::io_signature::sptr gr::limesdr::sink_impl::args_to_io_signature | ( | int | channel_number | ) |

inline

## calibrate()

void gr::limesdr::sink_impl::calibrate | ( | double | bandw,
|  | int | channel = 0 )

virtual

Perform device calibration.

Parameters

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

Implements gr::limesdr::sink.

## init_stream()

void gr::limesdr::sink_impl::init_stream | ( | int | device_number,
|  | int | channel )

## release_stream()

void gr::limesdr::sink_impl::release_stream | ( | int | device_number,
|  | lms_stream_t * | stream )

## set_antenna()

void gr::limesdr::sink_impl::set_antenna | ( | int | antenna,
|  | int | channel = 0 )

virtual

Set which antenna is used

Note
  setting antenna to BAND1 or BAND2 will enable PA path and because of that Lime boards will transmit CW signal, even when stream is stopped.

Parameters

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

Implements gr::limesdr::sink.

## set_bandwidth()

double gr::limesdr::sink_impl::set_bandwidth | ( | double | analog_bandw,
|  | int | channel = 0 )

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

Implements gr::limesdr::sink.

## set_buffer_size()

void gr::limesdr::sink_impl::set_buffer_size | ( | uint32_t | size | ) |

virtual

Set stream buffer size

Parameters

  size | FIFO buffer size in samples

Implements gr::limesdr::sink.

## set_center_freq()

double gr::limesdr::sink_impl::set_center_freq | ( | double | freq,
|  | size_t | chan = 0 )

virtual

Set center frequency

Parameters

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

Returns
  actual center frequency

Implements gr::limesdr::sink.

## set_digital_filter()

void gr::limesdr::sink_impl::set_digital_filter | ( | double | digital_bandw,
|  | int | channel = 0 )

virtual

Set digital filters (GFIR).

Parameters

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

Implements gr::limesdr::sink.

## set_gain()

unsigned gr::limesdr::sink_impl::set_gain | ( | unsigned | gain_dB,
|  | int | channel = 0 )

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,60]
  channel | Channel selection: A(LMS_CH_0),B(LMS_CH_1).

Returns
  actual gain in dB

Implements gr::limesdr::sink.

## set_nco()

void gr::limesdr::sink_impl::set_nco | ( | float | nco_freq,
|  | int | channel = 0 )

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.

Implements gr::limesdr::sink.

## set_oversampling()

void gr::limesdr::sink_impl::set_oversampling | ( | int | oversample | ) |

virtual

Set oversampling for both channels.

Parameters

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

Implements gr::limesdr::sink.

## set_sample_rate()

double gr::limesdr::sink_impl::set_sample_rate | ( | double | rate | ) |

virtual

Set the same sample rate for both channels.

Parameters

  rate | Sample rate in S/s.

Returns
  actual sample rate in S/s

Implements gr::limesdr::sink.

## set_tcxo_dac()

void gr::limesdr::sink_impl::set_tcxo_dac | ( | uint16_t | dacVal = 125 | ) |

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)

Implements gr::limesdr::sink.

## start()

bool gr::limesdr::sink_impl::start | ( | void |  | ) |

## stop()

bool gr::limesdr::sink_impl::stop | ( | void |  | ) |

## toggle_pa_path()

void gr::limesdr::sink_impl::toggle_pa_path | ( | int | device_number,
|  | bool | enable )

## work()

int gr::limesdr::sink_impl::work | ( | int | noutput_items,
|  | gr_vector_const_void_star & | input_items,
|  | gr_vector_void_star & | output_items )

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

- sink_impl.h