GNU Radio's SDR Package
gr_sdr_sink_impl Class Reference

#include <sink_impl.h>

Inheritance diagram for gr_sdr_sink_impl:
gr::sdr::sink

Public Member Functions

 gr_sdr_sink_impl (SoapySDR::Device *device, SoapySDR::Stream *stream, const std::vector< size_t > &channels, const gr::io_signature::sptr sig)
 
 ~gr_sdr_sink_impl (void)
 
void set_frontend_map (const std::string &mapping)
 
std::string get_frontend_map ()
 
void set_samp_rate (double rate)
 
double get_samp_rate (void)
 
std::vector< double > get_samp_rates (void)
 
void set_center_freq (double freq, size_t chan)
 
double get_center_freq (size_t chan)
 
std::vector< gr::sdr::range_tget_freq_range (size_t chan)
 
void set_gain (double gain, size_t chan)
 
void set_gain (double gain, const std::string &name, size_t chan)
 
double get_gain (size_t chan)
 
double get_gain (const std::string &name, size_t chan)
 
std::vector< std::string > get_gain_names (size_t chan)
 
gr::sdr::range_t get_gain_range (size_t chan)
 
gr::sdr::range_t get_gain_range (const std::string &name, size_t chan)
 
void set_antenna (const std::string &ant, size_t chan)
 
std::string get_antenna (size_t chan)
 
std::vector< std::string > get_antennas (size_t chan)
 
void set_bandwidth (double bandwidth, size_t chan)
 
double get_bandwidth (size_t chan)
 
std::vector< double > get_bandwidth_range (size_t chan)
 
void set_dc_offset (const std::complex< double > &offset, size_t chan)
 
void set_iq_balance (const std::complex< double > &correction, size_t chan)
 
void set_time_source (const std::string &source)
 
std::string get_time_source ()
 
std::vector< std::string > get_time_sources ()
 
void set_clock_source (const std::string &source)
 
std::string get_clock_source ()
 
std::vector< std::string > get_clock_sources ()
 
double get_clock_rate ()
 
void set_clock_rate (double rate)
 
int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
 
bool start (void)
 
bool stop (void)
 

Additional Inherited Members

- Public Types inherited from gr::sdr::sink
typedef boost::shared_ptr< sinksptr
 
- Static Public Member Functions inherited from gr::sdr::sink
static sptr make (const gr::sdr::kwargs_t &addr=gr::sdr::kwargs_t(), const std::string &format="CF32", const std::vector< size_t > &channels=std::vector< size_t >(), const gr::sdr::kwargs_t &args=gr::sdr::kwargs_t())
 Make a new SDR device sink block (usually a radio transmitter). More...
 

Constructor & Destructor Documentation

◆ gr_sdr_sink_impl()

gr_sdr_sink_impl::gr_sdr_sink_impl ( SoapySDR::Device *  device,
SoapySDR::Stream *  stream,
const std::vector< size_t > &  channels,
const gr::io_signature::sptr  sig 
)

◆ ~gr_sdr_sink_impl()

gr_sdr_sink_impl::~gr_sdr_sink_impl ( void  )

Member Function Documentation

◆ get_antenna()

std::string gr_sdr_sink_impl::get_antenna ( size_t  chan)
virtual

Get the antenna in use.

Parameters
chanthe channel index 0 to N-1
Returns
the antenna string

Implements gr::sdr::sink.

◆ get_antennas()

std::vector<std::string> gr_sdr_sink_impl::get_antennas ( size_t  chan)
virtual

Get a list of possible antennas.

Parameters
chanthe channel index 0 to N-1
Returns
a vector of antenna strings

Implements gr::sdr::sink.

◆ get_bandwidth()

double gr_sdr_sink_impl::get_bandwidth ( size_t  chan)
virtual

Get the bandpass filter setting on the RF frontend.

Parameters
chanthe channel index 0 to N-1
Returns
bandwidth of the filter in Hz

Implements gr::sdr::sink.

◆ get_bandwidth_range()

std::vector<double> gr_sdr_sink_impl::get_bandwidth_range ( size_t  chan)
virtual

Get the bandpass filter range of the RF frontend.

Parameters
chanthe channel index 0 to N-1
Returns
the range of the filter bandwidth in Hz

Implements gr::sdr::sink.

◆ get_center_freq()

double gr_sdr_sink_impl::get_center_freq ( size_t  chan)
virtual

Get the center frequency.

Parameters
chanthe channel index 0 to N-1
Returns
the frequency in Hz

Implements gr::sdr::sink.

◆ get_clock_rate()

double gr_sdr_sink_impl::get_clock_rate ( )
virtual

Get the master clock rate.

Returns
the clock rate in Hz

Implements gr::sdr::sink.

◆ get_clock_source()

std::string gr_sdr_sink_impl::get_clock_source ( )
virtual

Get the currently set clock source.

Returns
the string representing the clock source

Implements gr::sdr::sink.

◆ get_clock_sources()

std::vector<std::string> gr_sdr_sink_impl::get_clock_sources ( )
virtual

Get a list of possible clock sources.

Returns
a vector of strings for possible settings

Implements gr::sdr::sink.

◆ get_freq_range()

std::vector<gr::sdr::range_t> gr_sdr_sink_impl::get_freq_range ( size_t  chan)
virtual

Get the tunable frequency range.

Parameters
chanthe channel index 0 to N-1
Returns
the frequency range in Hz

Implements gr::sdr::sink.

◆ get_frontend_map()

std::string gr_sdr_sink_impl::get_frontend_map ( )
virtual

Get the TX frontend mapping.

Returns
the frontend mapping in use

Implements gr::sdr::sink.

◆ get_gain() [1/2]

double gr_sdr_sink_impl::get_gain ( size_t  chan)
virtual

Get the actual dboard gain setting.

Parameters
chanthe channel index 0 to N-1
Returns
the actual gain in dB

Implements gr::sdr::sink.

◆ get_gain() [2/2]

double gr_sdr_sink_impl::get_gain ( const std::string &  name,
size_t  chan 
)
virtual

Get the actual dboard gain setting of named stage.

Parameters
namethe name of the gain stage
chanthe channel index 0 to N-1
Returns
the actual gain in dB

Implements gr::sdr::sink.

◆ get_gain_names()

std::vector<std::string> gr_sdr_sink_impl::get_gain_names ( size_t  chan)
virtual

Get the actual dboard gain setting of named stage.

Parameters
chanthe channel index 0 to N-1
Returns
the actual gain in dB

Implements gr::sdr::sink.

◆ get_gain_range() [1/2]

gr::sdr::range_t gr_sdr_sink_impl::get_gain_range ( size_t  chan)
virtual

Get the settable gain range.

Parameters
chanthe channel index 0 to N-1
Returns
the gain range in dB

Implements gr::sdr::sink.

◆ get_gain_range() [2/2]

gr::sdr::range_t gr_sdr_sink_impl::get_gain_range ( const std::string &  name,
size_t  chan 
)
virtual

Get the settable gain range.

Parameters
namethe name of the gain stage
chanthe channel index 0 to N-1
Returns
the gain range in dB

Implements gr::sdr::sink.

◆ get_samp_rate()

double gr_sdr_sink_impl::get_samp_rate ( void  )
virtual

Get the sample rate for the SDR device. This is the actual sample rate and may differ from the rate set.

Returns
the actual rate in Sps

Implements gr::sdr::sink.

◆ get_samp_rates()

std::vector<double> gr_sdr_sink_impl::get_samp_rates ( void  )
virtual

Get the possible sample rates for the SDR device.

Returns
a range of rates in Sps

Implements gr::sdr::sink.

◆ get_time_source()

std::string gr_sdr_sink_impl::get_time_source ( )
virtual

Get the currently set time source.

Returns
the string representing the time source

Implements gr::sdr::sink.

◆ get_time_sources()

std::vector<std::string> gr_sdr_sink_impl::get_time_sources ( )
virtual

Get a list of possible time sources.

Returns
a vector of strings for possible settings

Implements gr::sdr::sink.

◆ set_antenna()

void gr_sdr_sink_impl::set_antenna ( const std::string &  ant,
size_t  chan 
)
virtual

Set the antenna to use.

Parameters
antthe antenna string
chanthe channel index 0 to N-1

Implements gr::sdr::sink.

◆ set_bandwidth()

void gr_sdr_sink_impl::set_bandwidth ( double  bandwidth,
size_t  chan 
)
virtual

Set the bandpass filter on the RF frontend.

Parameters
bandwidththe filter bandwidth in Hz
chanthe channel index 0 to N-1

Implements gr::sdr::sink.

◆ set_center_freq()

void gr_sdr_sink_impl::set_center_freq ( double  freq,
size_t  chan 
)
virtual

Tune the SDR device to the desired center frequency. This is a wrapper around set center freq so that in this case, the user can pass a single frequency in the call through swig.

Parameters
freqthe desired frequency in Hz
chanthe channel index 0 to N-1
Returns
a tune result with the actual frequencies

Implements gr::sdr::sink.

◆ set_clock_rate()

void gr_sdr_sink_impl::set_clock_rate ( double  rate)
virtual

Set the master clock rate.

Parameters
ratethe new rate in Hz

Implements gr::sdr::sink.

◆ set_clock_source()

void gr_sdr_sink_impl::set_clock_source ( const std::string &  source)
virtual

Set the clock source for the SDR device. This sets the source for a 10 Mhz reference clock. Typical options for source: internal, external, MIMO.

Parameters
sourcea string representing the clock source

Implements gr::sdr::sink.

◆ set_dc_offset()

void gr_sdr_sink_impl::set_dc_offset ( const std::complex< double > &  offset,
size_t  chan 
)
virtual

Set a constant DC offset value. The value is complex to control both I and Q.

Parameters
offsetthe dc offset (1.0 is full-scale)
chanthe channel index 0 to N-1

Implements gr::sdr::sink.

◆ set_frontend_map()

void gr_sdr_sink_impl::set_frontend_map ( const std::string &  mapping)
virtual

Set the frontend mapping.

Parameters
mappingthe mapping markup string

Implements gr::sdr::sink.

◆ set_gain() [1/2]

void gr_sdr_sink_impl::set_gain ( double  gain,
size_t  chan 
)
virtual

Set the gain for the dboard.

Parameters
gainthe gain in dB
chanthe channel index 0 to N-1

Implements gr::sdr::sink.

◆ set_gain() [2/2]

void gr_sdr_sink_impl::set_gain ( double  gain,
const std::string &  name,
size_t  chan 
)
virtual

Set the named gain on the dboard.

Parameters
gainthe gain in dB
namethe name of the gain stage
chanthe channel index 0 to N-1

Implements gr::sdr::sink.

◆ set_iq_balance()

void gr_sdr_sink_impl::set_iq_balance ( const std::complex< double > &  correction,
size_t  chan 
)
virtual

Set the RX frontend IQ imbalance correction. Use this to adjust the magnitude and phase of I and Q.

Parameters
correctionthe complex correction (1.0 is full-scale)
chanthe channel index 0 to N-1

Implements gr::sdr::sink.

◆ set_samp_rate()

void gr_sdr_sink_impl::set_samp_rate ( double  rate)
virtual

Set the sample rate for the SDR device.

Parameters
ratea new rate in Sps

Implements gr::sdr::sink.

◆ set_time_source()

void gr_sdr_sink_impl::set_time_source ( const std::string &  source)
virtual

Set the time source for the SDR device. This sets the method of time synchronization, typically a pulse per second or an encoded time. Typical options for source: external, MIMO.

Parameters
sourcea string representing the time source

Implements gr::sdr::sink.

◆ start()

bool gr_sdr_sink_impl::start ( void  )

◆ stop()

bool gr_sdr_sink_impl::stop ( void  )

◆ work()

int gr_sdr_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: