GNU Radio's SDR Package
gr::sdr::sink Class Referenceabstract

#include <sink.h>

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

Public Types

typedef boost::shared_ptr< sinksptr
 

Public Member Functions

virtual void set_frontend_map (const std::string &mapping)=0
 
virtual std::string get_frontend_map ()=0
 
virtual void set_samp_rate (double rate)=0
 
virtual double get_samp_rate (void)=0
 
virtual std::vector< double > get_samp_rates (void)=0
 
virtual void set_center_freq (double freq, size_t chan=0)=0
 
virtual double get_center_freq (size_t chan=0)=0
 
virtual std::vector< gr::sdr::range_tget_freq_range (size_t chan=0)=0
 
virtual void set_gain (double gain, size_t chan=0)=0
 
virtual void set_gain (double gain, const std::string &name, size_t chan=0)=0
 
virtual double get_gain (size_t chan=0)=0
 
virtual double get_gain (const std::string &name, size_t chan=0)=0
 
virtual std::vector< std::string > get_gain_names (size_t chan=0)=0
 
virtual gr::sdr::range_t get_gain_range (size_t chan=0)=0
 
virtual gr::sdr::range_t get_gain_range (const std::string &name, size_t chan=0)=0
 
virtual void set_antenna (const std::string &ant, size_t chan=0)=0
 
virtual std::string get_antenna (size_t chan=0)=0
 
virtual std::vector< std::string > get_antennas (size_t chan=0)=0
 
virtual void set_bandwidth (double bandwidth, size_t chan=0)=0
 
virtual double get_bandwidth (size_t chan=0)=0
 
virtual std::vector< double > get_bandwidth_range (size_t chan=0)=0
 
virtual void set_dc_offset (const std::complex< double > &offset, size_t chan=0)=0
 
virtual void set_iq_balance (const std::complex< double > &correction, size_t chan=0)=0
 
virtual void set_time_source (const std::string &source)=0
 
virtual std::string get_time_source ()=0
 
virtual std::vector< std::string > get_time_sources ()=0
 
virtual void set_clock_source (const std::string &source)=0
 
virtual std::string get_clock_source ()=0
 
virtual std::vector< std::string > get_clock_sources ()=0
 
virtual double get_clock_rate ()=0
 
virtual void set_clock_rate (double rate)=0
 

Static Public Member Functions

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...
 

Member Typedef Documentation

◆ sptr

typedef boost::shared_ptr<sink> gr::sdr::sink::sptr

Member Function Documentation

◆ get_antenna()

virtual std::string gr::sdr::sink::get_antenna ( size_t  chan = 0)
pure virtual

Get the antenna in use.

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

Implemented in gr_sdr_sink_impl.

◆ get_antennas()

virtual std::vector<std::string> gr::sdr::sink::get_antennas ( size_t  chan = 0)
pure virtual

Get a list of possible antennas.

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

Implemented in gr_sdr_sink_impl.

◆ get_bandwidth()

virtual double gr::sdr::sink::get_bandwidth ( size_t  chan = 0)
pure 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

Implemented in gr_sdr_sink_impl.

◆ get_bandwidth_range()

virtual std::vector<double> gr::sdr::sink::get_bandwidth_range ( size_t  chan = 0)
pure 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

Implemented in gr_sdr_sink_impl.

◆ get_center_freq()

virtual double gr::sdr::sink::get_center_freq ( size_t  chan = 0)
pure virtual

Get the center frequency.

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

Implemented in gr_sdr_sink_impl.

◆ get_clock_rate()

virtual double gr::sdr::sink::get_clock_rate ( )
pure virtual

Get the master clock rate.

Returns
the clock rate in Hz

Implemented in gr_sdr_sink_impl.

◆ get_clock_source()

virtual std::string gr::sdr::sink::get_clock_source ( )
pure virtual

Get the currently set clock source.

Returns
the string representing the clock source

Implemented in gr_sdr_sink_impl.

◆ get_clock_sources()

virtual std::vector<std::string> gr::sdr::sink::get_clock_sources ( )
pure virtual

Get a list of possible clock sources.

Returns
a vector of strings for possible settings

Implemented in gr_sdr_sink_impl.

◆ get_freq_range()

virtual std::vector<gr::sdr::range_t> gr::sdr::sink::get_freq_range ( size_t  chan = 0)
pure virtual

Get the tunable frequency range.

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

Implemented in gr_sdr_sink_impl.

◆ get_frontend_map()

virtual std::string gr::sdr::sink::get_frontend_map ( )
pure virtual

Get the TX frontend mapping.

Returns
the frontend mapping in use

Implemented in gr_sdr_sink_impl.

◆ get_gain() [1/2]

virtual double gr::sdr::sink::get_gain ( size_t  chan = 0)
pure virtual

Get the actual dboard gain setting.

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

Implemented in gr_sdr_sink_impl.

◆ get_gain() [2/2]

virtual double gr::sdr::sink::get_gain ( const std::string &  name,
size_t  chan = 0 
)
pure 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

Implemented in gr_sdr_sink_impl.

◆ get_gain_names()

virtual std::vector<std::string> gr::sdr::sink::get_gain_names ( size_t  chan = 0)
pure virtual

Get the actual dboard gain setting of named stage.

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

Implemented in gr_sdr_sink_impl.

◆ get_gain_range() [1/2]

virtual gr::sdr::range_t gr::sdr::sink::get_gain_range ( size_t  chan = 0)
pure virtual

Get the settable gain range.

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

Implemented in gr_sdr_sink_impl.

◆ get_gain_range() [2/2]

virtual gr::sdr::range_t gr::sdr::sink::get_gain_range ( const std::string &  name,
size_t  chan = 0 
)
pure 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

Implemented in gr_sdr_sink_impl.

◆ get_samp_rate()

virtual double gr::sdr::sink::get_samp_rate ( void  )
pure 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

Implemented in gr_sdr_sink_impl.

◆ get_samp_rates()

virtual std::vector<double> gr::sdr::sink::get_samp_rates ( void  )
pure virtual

Get the possible sample rates for the SDR device.

Returns
a range of rates in Sps

Implemented in gr_sdr_sink_impl.

◆ get_time_source()

virtual std::string gr::sdr::sink::get_time_source ( )
pure virtual

Get the currently set time source.

Returns
the string representing the time source

Implemented in gr_sdr_sink_impl.

◆ get_time_sources()

virtual std::vector<std::string> gr::sdr::sink::get_time_sources ( )
pure virtual

Get a list of possible time sources.

Returns
a vector of strings for possible settings

Implemented in gr_sdr_sink_impl.

◆ make()

static sptr gr::sdr::sink::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() 
)
static

Make a new SDR device sink block (usually a radio transmitter).

The SDR device sink block reads a stream and transmits the samples. The sink block also provides API calls for transmitter settings.

Parameters
addrthe address args to identify the hardware
formatthe host sample format markup string
channelsa list of channels on the device to use
argsoptional special key/value arguments
Returns
a new SDR device sink block object

◆ set_antenna()

virtual void gr::sdr::sink::set_antenna ( const std::string &  ant,
size_t  chan = 0 
)
pure virtual

Set the antenna to use.

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

Implemented in gr_sdr_sink_impl.

◆ set_bandwidth()

virtual void gr::sdr::sink::set_bandwidth ( double  bandwidth,
size_t  chan = 0 
)
pure virtual

Set the bandpass filter on the RF frontend.

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

Implemented in gr_sdr_sink_impl.

◆ set_center_freq()

virtual void gr::sdr::sink::set_center_freq ( double  freq,
size_t  chan = 0 
)
pure 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

Implemented in gr_sdr_sink_impl.

◆ set_clock_rate()

virtual void gr::sdr::sink::set_clock_rate ( double  rate)
pure virtual

Set the master clock rate.

Parameters
ratethe new rate in Hz

Implemented in gr_sdr_sink_impl.

◆ set_clock_source()

virtual void gr::sdr::sink::set_clock_source ( const std::string &  source)
pure 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

Implemented in gr_sdr_sink_impl.

◆ set_dc_offset()

virtual void gr::sdr::sink::set_dc_offset ( const std::complex< double > &  offset,
size_t  chan = 0 
)
pure 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

Implemented in gr_sdr_sink_impl.

◆ set_frontend_map()

virtual void gr::sdr::sink::set_frontend_map ( const std::string &  mapping)
pure virtual

Set the frontend mapping.

Parameters
mappingthe mapping markup string

Implemented in gr_sdr_sink_impl.

◆ set_gain() [1/2]

virtual void gr::sdr::sink::set_gain ( double  gain,
size_t  chan = 0 
)
pure virtual

Set the gain for the dboard.

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

Implemented in gr_sdr_sink_impl.

◆ set_gain() [2/2]

virtual void gr::sdr::sink::set_gain ( double  gain,
const std::string &  name,
size_t  chan = 0 
)
pure 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

Implemented in gr_sdr_sink_impl.

◆ set_iq_balance()

virtual void gr::sdr::sink::set_iq_balance ( const std::complex< double > &  correction,
size_t  chan = 0 
)
pure 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

Implemented in gr_sdr_sink_impl.

◆ set_samp_rate()

virtual void gr::sdr::sink::set_samp_rate ( double  rate)
pure virtual

Set the sample rate for the SDR device.

Parameters
ratea new rate in Sps

Implemented in gr_sdr_sink_impl.

◆ set_time_source()

virtual void gr::sdr::sink::set_time_source ( const std::string &  source)
pure 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

Implemented in gr_sdr_sink_impl.


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