GNU Radio's SOAPY Package
gr::soapy::source Class Referenceabstract

#include <source.h>

Inheritance diagram for gr::soapy::source:
gr::soapy::source_impl

Public Types

typedef boost::shared_ptr< sourcesptr
 

Public Member Functions

virtual std::vector< std::string > get_antennas (int channel)=0
 
virtual void set_gain (size_t channel, float gain)=0
 
virtual void set_gain (size_t channel, const std::string name, float gain)=0
 
virtual void set_frequency (size_t channel, double freq)=0
 
virtual void set_frequency (size_t channel, const std::string &name, double frequency)=0
 
virtual void set_agc (size_t channel, bool enable)=0
 
virtual void set_sample_rate (size_t channel, double sample_rate)=0
 
virtual void set_bandwidth (size_t channel, double bandwidth)=0
 
virtual void set_antenna (size_t channel, const std::string &name)=0
 
virtual void set_dc_offset (size_t channel, gr_complexd dc_offset)=0
 
virtual void set_dc_removal (size_t channel, bool automatic)=0
 
virtual void set_frequency_correction (size_t channel, double freq_correction)=0
 
virtual void set_iq_balance (size_t channel, gr_complexd iq_balance)=0
 
virtual void set_master_clock_rate (double clock_rate)=0
 
virtual void set_clock_source (const std::string &clock_source)=0
 

Static Public Member Functions

static sptr make (size_t nchan, const std::string &device, const std::string &dev_args, const std::string &stream_args, const std::vector< std::string > &tune_args, const std::vector< std::string > &other_settings, double sampling_rate, const std::string &type)
 Return a shared_ptr to a new instance of soapy::source. More...
 

Member Typedef Documentation

◆ sptr

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

Member Function Documentation

◆ get_antennas()

virtual std::vector<std::string> gr::soapy::source::get_antennas ( int  channel)
pure virtual

Returns a list with the available antennas for a specific channel

Parameters
channelthe channel index
Returns
the available antenna names

Implemented in gr::soapy::source_impl.

◆ make()

static sptr gr::soapy::source::make ( size_t  nchan,
const std::string &  device,
const std::string &  dev_args,
const std::string &  stream_args,
const std::vector< std::string > &  tune_args,
const std::vector< std::string > &  other_settings,
double  sampling_rate,
const std::string &  type 
)
static

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

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

Parameters
nchannumber of channels
devicethe device driver and type
dev_argsdevice specific arguments
stream_argsstream arguments. Same for all enabled channels
tune_argslist with tuning specific arguments, one entry for every enabled channel
other_settingslist with general settings, one entry for every enabled channel. Supports also specific gain settings.
sampling_ratethe sampling rate of the device
typeoutput stream format

Driver name can be any of "uhd", "lime", "airspy", "rtlsdr" or others

◆ set_agc()

virtual void gr::soapy::source::set_agc ( size_t  channel,
bool  enable 
)
pure virtual

Callback to set automatic gain control (AGC)

Parameters
channelan available channel on the device
enabletrue to enable AGC

Implemented in gr::soapy::source_impl.

◆ set_antenna()

virtual void gr::soapy::source::set_antenna ( size_t  channel,
const std::string &  name 
)
pure virtual

Callback to set antenna for RF chain

Parameters
channelan available channel of the device
namean available antenna string name

Implemented in gr::soapy::source_impl.

◆ set_bandwidth()

virtual void gr::soapy::source::set_bandwidth ( size_t  channel,
double  bandwidth 
)
pure virtual

Callback to set digital filter bandwidth

Parameters
channelan available channel on the device
bandwidthfilter width in Hz

Implemented in gr::soapy::source_impl.

◆ set_clock_source()

virtual void gr::soapy::source::set_clock_source ( const std::string &  clock_source)
pure virtual

Callback to set the clock source

Parameters
clock_sourcean available clock source

Implemented in gr::soapy::source_impl.

◆ set_dc_offset()

virtual void gr::soapy::source::set_dc_offset ( size_t  channel,
gr_complexd  dc_offset 
)
pure virtual

Callback to set dc offset correction and mode

Parameters
channelan available channel of the device
dc_offsetcomplex for dc offset correction

Implemented in gr::soapy::source_impl.

◆ set_dc_removal()

virtual void gr::soapy::source::set_dc_removal ( size_t  channel,
bool  automatic 
)
pure virtual

Callback to set automatic DC removal

Parameters
channelan available channel of the device
automatictrue to set the automatic DC removal

Implemented in gr::soapy::source_impl.

◆ set_frequency() [1/2]

virtual void gr::soapy::source::set_frequency ( size_t  channel,
double  freq 
)
pure virtual

Callback to change the RF frequency of the device

Parameters
channelan available channel of the device
freqthe frequency to be set in Hz

Implemented in gr::soapy::source_impl.

◆ set_frequency() [2/2]

virtual void gr::soapy::source::set_frequency ( size_t  channel,
const std::string &  name,
double  frequency 
)
pure virtual

Callback to change center frequency of a tunable element

Parameters
channelan available channel of the device
namean available element name
frequencythe frequency to be set in Hz

Implemented in gr::soapy::source_impl.

◆ set_frequency_correction()

virtual void gr::soapy::source::set_frequency_correction ( size_t  channel,
double  freq_correction 
)
pure virtual

Callback to set frequency correction

Parameters
channelan available channel of the device
freq_correctionrelative value for frequency correction (1.0 max)

Implemented in gr::soapy::source_impl.

◆ set_gain() [1/2]

virtual void gr::soapy::source::set_gain ( size_t  channel,
float  gain 
)
pure virtual

Callback to set overall gain

Parameters
channelan available channel of the device
gainthe overall gain value

Implemented in gr::soapy::source_impl.

◆ set_gain() [2/2]

virtual void gr::soapy::source::set_gain ( size_t  channel,
const std::string  name,
float  gain 
)
pure virtual

Callback to set specific gain value

Parameters
channelan available channel on the device
namethe gain name to set value
gainthe gain value

Implemented in gr::soapy::source_impl.

◆ set_iq_balance()

virtual void gr::soapy::source::set_iq_balance ( size_t  channel,
gr_complexd  iq_balance 
)
pure virtual

Callback to set iq balance correction

Parameters
channelan available channel of the device
iq_balancecomplex value for iq balance correction

Implemented in gr::soapy::source_impl.

◆ set_master_clock_rate()

virtual void gr::soapy::source::set_master_clock_rate ( double  clock_rate)
pure virtual

Callback to change master clock rate

Parameters
clock_ratethe clock rate in Hz

Implemented in gr::soapy::source_impl.

◆ set_sample_rate()

virtual void gr::soapy::source::set_sample_rate ( size_t  channel,
double  sample_rate 
)
pure virtual

Callback to set sample rate

Parameters
channelan available channel of the device
sample_ratenumber of samples in samples per second

Implemented in gr::soapy::source_impl.


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