Agora  1.2.0
Agora project
RadioSoapySdr Class Reference

#include <radio_soapysdr.h>

Inheritance diagram for RadioSoapySdr:
Collaboration diagram for RadioSoapySdr:

Public Member Functions

 RadioSoapySdr (RadioDataPlane::DataPlaneType rx_dp_type)
 
 ~RadioSoapySdr () final
 
void Init (const Config *cfg, size_t id, const std::string &serial, const std::vector< size_t > &enabled_channels, bool hw_framer) final
 
void Setup (const std::vector< double > &tx_gains, const std::vector< double > &rx_gains) final
 
void Activate (Radio::ActivationTypes type=Radio::ActivationTypes::kActivate, long long act_time_ns=0, size_t samples=0) final
 
void Deactivate () final
 
void Close () final
 
void Flush () final
 
int Tx (const void *const *tx_buffs, size_t tx_size, Radio::TxFlags tx_flags, long long &tx_time_ns) final
 
int Rx (std::vector< std::vector< std::complex< int16_t >>> &rx_data, size_t rx_size, RxFlags &out_flags, long long &rx_time_ns) final
 
int Rx (std::vector< std::vector< std::complex< int16_t >> * > &rx_buffs, size_t rx_size, RxFlags &out_flags, long long &rx_time_ns) final
 
int Rx (std::vector< void * > &rx_locs, size_t rx_size, RxFlags &out_flags, long long &rx_time_ns) final
 
void SetTimeAtTrigger (long long time_ns=0) final
 
long long GetTimeNs () final
 
void ConfigureTddModeBs (bool is_ref_radio) final
 
void ConfigureTddModeUe () final
 
void ClearSyncDelay () final
 
void PrintSettings () const final
 
void Trigger () final
 
void ReadSensor () const final
 
void AdjustDelay (const std::string &delay) final
 
void InitRefTx (size_t channel, double freq)
 
void InitCalRx (size_t channel, double center_freq)
 
void ResetTxGains ()
 
void ResetRxGains ()
 
void SetTxCalGain (size_t channel)
 
void SetRxGain (size_t channel, const std::string &gain_stage, double value)
 
void SetTxGain (size_t channel, const std::string &gain_stage, double value)
 
void StartRefTx (size_t channel)
 
void StopRefTx (size_t channel)
 
void SetDcOffset (int direction, size_t channel, std::complex< double > dc_corr)
 
void SetIQBalance (int direction, size_t channel, std::complex< double > i_qcorr)
 
void SetFreqBb (size_t channel, double freq)
 
void SetFreqRf (size_t channel, double freq)
 
void InitAgc (bool enabled, size_t setting)
 
std::vector< std::complex< float > > SnoopSamples (size_t channel, size_t read_size)
 
SoapySDR::Device * SoapyDevice () const
 
const std::string & IpAddress () const
 
- Public Member Functions inherited from Radio
virtual ~Radio ()
 
size_t Id () const
 
const std::string & SerialNumber () const
 
bool HwFramer () const
 
virtual void ConfigureTddModeBs ([[maybe_unused]] bool is_ref_radio)
 
virtual void AdjustDelay ([[maybe_unused]] const std::string &delay)
 
const std::vector< size_t > & EnabledChannels () const
 

Private Member Functions

void Correlator (bool enable)
 

Private Attributes

SoapySDR::Device * dev_
 
std::string ip_address_
 
std::unique_ptr< RadioDataPlanerxp_
 
SoapySDR::Stream * txs_
 
bool correlator_enabled_
 

Additional Inherited Members

- Public Types inherited from Radio
enum  RadioType { kSoapySdrStream, kSoapySdrSocket }
 
enum  RxFlags { kRxFlagNone = 0, kEndReceive = 1 }
 
enum  TxFlags { kTxFlagNone = 0, kEndTransmit = 1, kTxWaitTrigger = 2 }
 
enum  ActivationTypes { kActivate, kActivateWaitTrigger }
 
- Static Public Member Functions inherited from Radio
static std::unique_ptr< RadioCreate (RadioType type)
 
- Protected Member Functions inherited from Radio
 Radio ()
 
- Protected Attributes inherited from Radio
const Configcfg_ {nullptr}
 

Constructor & Destructor Documentation

◆ RadioSoapySdr()

RadioSoapySdr::RadioSoapySdr ( RadioDataPlane::DataPlaneType  rx_dp_type)
explicit
Here is the call graph for this function:

◆ ~RadioSoapySdr()

RadioSoapySdr::~RadioSoapySdr ( )
final
Here is the call graph for this function:

Member Function Documentation

◆ Activate()

void RadioSoapySdr::Activate ( Radio::ActivationTypes  type = Radio::ActivationTypes::kActivate,
long long  act_time_ns = 0,
size_t  samples = 0 
)
finalvirtual

Implements Radio.

Here is the call graph for this function:

◆ AdjustDelay()

void RadioSoapySdr::AdjustDelay ( const std::string &  delay)
final

◆ ClearSyncDelay()

void RadioSoapySdr::ClearSyncDelay ( )
finalvirtual

Reimplemented from Radio.

◆ Close()

void RadioSoapySdr::Close ( )
finalvirtual

Implements Radio.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConfigureTddModeBs()

void RadioSoapySdr::ConfigureTddModeBs ( bool  is_ref_radio)
final
Here is the call graph for this function:

◆ ConfigureTddModeUe()

void RadioSoapySdr::ConfigureTddModeUe ( )
finalvirtual

Reimplemented from Radio.

Here is the call graph for this function:

◆ Correlator()

void RadioSoapySdr::Correlator ( bool  enable)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Deactivate()

void RadioSoapySdr::Deactivate ( )
finalvirtual

Implements Radio.

Here is the call graph for this function:

◆ Flush()

void RadioSoapySdr::Flush ( )
finalvirtual

Implements Radio.

Here is the call graph for this function:

◆ GetTimeNs()

long long RadioSoapySdr::GetTimeNs ( )
finalvirtual

Reimplemented from Radio.

Here is the call graph for this function:

◆ Init()

void RadioSoapySdr::Init ( const Config cfg,
size_t  id,
const std::string &  serial,
const std::vector< size_t > &  enabled_channels,
bool  hw_framer 
)
finalvirtual

Implements Radio.

Here is the call graph for this function:

◆ InitAgc()

void RadioSoapySdr::InitAgc ( bool  enabled,
size_t  setting 
)
Here is the call graph for this function:

◆ InitCalRx()

void RadioSoapySdr::InitCalRx ( size_t  channel,
double  center_freq 
)
Here is the caller graph for this function:

◆ InitRefTx()

void RadioSoapySdr::InitRefTx ( size_t  channel,
double  freq 
)
Here is the caller graph for this function:

◆ IpAddress()

const std::string& RadioSoapySdr::IpAddress ( ) const
inline

◆ PrintSettings()

void RadioSoapySdr::PrintSettings ( ) const
finalvirtual

Reimplemented from Radio.

Here is the call graph for this function:

◆ ReadSensor()

void RadioSoapySdr::ReadSensor ( ) const
finalvirtual

Reimplemented from Radio.

Here is the call graph for this function:

◆ ResetRxGains()

void RadioSoapySdr::ResetRxGains ( )
Here is the call graph for this function:

◆ ResetTxGains()

void RadioSoapySdr::ResetTxGains ( )
Todo:
should this do all channels or enabled channels?
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Rx() [1/3]

int RadioSoapySdr::Rx ( std::vector< std::vector< std::complex< int16_t >> * > &  rx_buffs,
size_t  rx_size,
Radio::RxFlags out_flags,
long long &  rx_time_ns 
)
finalvirtual

Implements Radio.

◆ Rx() [2/3]

int RadioSoapySdr::Rx ( std::vector< std::vector< std::complex< int16_t >>> &  rx_data,
size_t  rx_size,
Radio::RxFlags out_flags,
long long &  rx_time_ns 
)
finalvirtual

Implements Radio.

◆ Rx() [3/3]

int RadioSoapySdr::Rx ( std::vector< void * > &  rx_locs,
size_t  rx_size,
Radio::RxFlags out_flags,
long long &  rx_time_ns 
)
finalvirtual

Implements Radio.

◆ SetDcOffset()

void RadioSoapySdr::SetDcOffset ( int  direction,
size_t  channel,
std::complex< double >  dc_corr 
)

◆ SetFreqBb()

void RadioSoapySdr::SetFreqBb ( size_t  channel,
double  freq 
)

◆ SetFreqRf()

void RadioSoapySdr::SetFreqRf ( size_t  channel,
double  freq 
)
Here is the caller graph for this function:

◆ SetIQBalance()

void RadioSoapySdr::SetIQBalance ( int  direction,
size_t  channel,
std::complex< double >  i_qcorr 
)
Here is the caller graph for this function:

◆ SetRxGain()

void RadioSoapySdr::SetRxGain ( size_t  channel,
const std::string &  gain_stage,
double  value 
)
Here is the call graph for this function:

◆ SetTimeAtTrigger()

void RadioSoapySdr::SetTimeAtTrigger ( long long  time_ns = 0)
finalvirtual

Reimplemented from Radio.

Here is the call graph for this function:

◆ SetTxCalGain()

void RadioSoapySdr::SetTxCalGain ( size_t  channel)
Here is the caller graph for this function:

◆ SetTxGain()

void RadioSoapySdr::SetTxGain ( size_t  channel,
const std::string &  gain_stage,
double  value 
)
Here is the call graph for this function:

◆ Setup()

void RadioSoapySdr::Setup ( const std::vector< double > &  tx_gains,
const std::vector< double > &  rx_gains 
)
finalvirtual
Todo:
Check to see if this is correct for kUseUhd == false (BwFilter)

Implements Radio.

Here is the call graph for this function:

◆ SnoopSamples()

std::vector< std::complex< float > > RadioSoapySdr::SnoopSamples ( size_t  channel,
size_t  read_size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SoapyDevice()

SoapySDR::Device* RadioSoapySdr::SoapyDevice ( ) const
inline
Here is the caller graph for this function:

◆ StartRefTx()

void RadioSoapySdr::StartRefTx ( size_t  channel)
Here is the call graph for this function:

◆ StopRefTx()

void RadioSoapySdr::StopRefTx ( size_t  channel)

◆ Trigger()

void RadioSoapySdr::Trigger ( )
finalvirtual

Reimplemented from Radio.

◆ Tx()

int RadioSoapySdr::Tx ( const void *const *  tx_buffs,
size_t  tx_size,
Radio::TxFlags  tx_flags,
long long &  tx_time_ns 
)
finalvirtual

Implements Radio.

Here is the call graph for this function:

Member Data Documentation

◆ correlator_enabled_

bool RadioSoapySdr::correlator_enabled_
private

◆ dev_

SoapySDR::Device* RadioSoapySdr::dev_
private

◆ ip_address_

std::string RadioSoapySdr::ip_address_
private

◆ rxp_

std::unique_ptr<RadioDataPlane> RadioSoapySdr::rxp_
private

◆ txs_

SoapySDR::Stream* RadioSoapySdr::txs_
private

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