Agora  1.2.0
Agora project
RadioConfig Class Reference

#include <radio_lib.h>

Collaboration diagram for RadioConfig:

Public Member Functions

 RadioConfig (Config *cfg, Radio::RadioType radio_type)
 
 ~RadioConfig ()
 
bool RadioStart ()
 
void RadioStop ()
 
void ReadSensors ()
 
int RadioTx (size_t radio_id, const void *const *buffs, Radio::TxFlags flags, long long &tx_time)
 
int RadioTx (size_t radio_id, const std::vector< std::vector< std::complex< int16_t >>> &tx_data, Radio::TxFlags flags, long long &tx_time_ns)
 
int RadioRx (size_t radio_id, std::vector< std::vector< std::complex< int16_t >>> &rx_data, size_t rx_size, Radio::RxFlags &out_flags, long long &rx_time_ns)
 
int RadioRx (size_t radio_id, std::vector< std::vector< std::complex< int16_t >> * > &rx_buffs, size_t rx_size, Radio::RxFlags &out_flags, long long &rx_time_ns)
 
int RadioRx (size_t radio_id, std::vector< void * > &rx_locs, size_t rx_size, Radio::RxFlags &out_flags, long long &rx_time_ns)
 
bool DoCalib () const
 
void Go ()
 
arma::cx_float * GetCalibUl ()
 
arma::cx_float * GetCalibDl ()
 
void InitBsRadio (size_t radio_id)
 
void ConfigureBsRadio (size_t radio_id)
 

Private Member Functions

long long SyncArrayTime ()
 
void CalibrateSampleOffset ()
 
bool CalibrateSampleOffsetUplink (size_t max_attempts)
 
bool CalibrateSampleOffsetDownlink (size_t max_attempts)
 
auto TxArrayToRef (const std::vector< std::complex< int16_t >> &tx_vec)
 
auto TxRefToArray (const std::vector< std::complex< int16_t >> &tx_vec)
 
bool FindTimeOffset (const std::vector< std::vector< std::complex< int16_t >>> &rx_mat, std::vector< int > &offset)
 
bool InitialCalib ()
 
void AdjustDelays (const std::vector< int > &ch0_offsets)
 
void DciqCalibrationProc (size_t channel)
 

Static Private Member Functions

static void DciqMinimize (Radio *target_dev, Radio *ref_dev, int direction, size_t channel, double rx_center_tone, double tx_center_tone)
 
static void SetIqBalance (Radio *dev, int direction, size_t channel, int gcorr, int iqcorr)
 
static void AdjustCalibrationGains (std::vector< Radio * > &rx_devs, Radio *tx_dev, size_t channel, double fft_bin, bool plot=false)
 

Private Attributes

Configcfg_
 
std::vector< SoapySDR::Device * > hubs_
 
std::vector< std::unique_ptr< Radio > > radios_
 
arma::cx_float * init_calib_ul_processed_
 
arma::cx_float * init_calib_dl_processed_
 
Table< arma::cx_float > init_calib_ul_
 
Table< arma::cx_float > init_calib_dl_
 
size_t radio_num_
 
size_t antenna_num_
 
bool calib_
 
size_t calib_meas_num_
 
std::atomic< size_t > num_radios_initialized_
 
std::atomic< size_t > num_radios_configured_
 

Constructor & Destructor Documentation

◆ RadioConfig()

RadioConfig::RadioConfig ( Config cfg,
Radio::RadioType  radio_type 
)
Here is the call graph for this function:

◆ ~RadioConfig()

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

Member Function Documentation

◆ AdjustCalibrationGains()

void RadioConfig::AdjustCalibrationGains ( std::vector< Radio * > &  rx_devs,
Radio tx_dev,
size_t  channel,
double  fft_bin,
bool  plot = false 
)
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AdjustDelays()

void RadioConfig::AdjustDelays ( const std::vector< int > &  ch0_offsets)
private
Here is the caller graph for this function:

◆ CalibrateSampleOffset()

void RadioConfig::CalibrateSampleOffset ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalibrateSampleOffsetDownlink()

bool RadioConfig::CalibrateSampleOffsetDownlink ( size_t  max_attempts)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalibrateSampleOffsetUplink()

bool RadioConfig::CalibrateSampleOffsetUplink ( size_t  max_attempts)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConfigureBsRadio()

void RadioConfig::ConfigureBsRadio ( size_t  radio_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DciqCalibrationProc()

void RadioConfig::DciqCalibrationProc ( size_t  channel)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DciqMinimize()

void RadioConfig::DciqMinimize ( Radio target_dev,
Radio ref_dev,
int  direction,
size_t  channel,
double  rx_center_tone,
double  tx_center_tone 
)
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoCalib()

bool RadioConfig::DoCalib ( ) const
inline

◆ FindTimeOffset()

bool RadioConfig::FindTimeOffset ( const std::vector< std::vector< std::complex< int16_t >>> &  rx_mat,
std::vector< int > &  offset 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCalibDl()

arma::cx_float* RadioConfig::GetCalibDl ( )
inline

◆ GetCalibUl()

arma::cx_float* RadioConfig::GetCalibUl ( )
inline

◆ Go()

void RadioConfig::Go ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitBsRadio()

void RadioConfig::InitBsRadio ( size_t  radio_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitialCalib()

bool RadioConfig::InitialCalib ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RadioRx() [1/3]

int RadioConfig::RadioRx ( size_t  radio_id,
std::vector< std::vector< std::complex< int16_t >> * > &  rx_buffs,
size_t  rx_size,
Radio::RxFlags out_flags,
long long &  rx_time_ns 
)

◆ RadioRx() [2/3]

int RadioConfig::RadioRx ( size_t  radio_id,
std::vector< std::vector< std::complex< int16_t >>> &  rx_data,
size_t  rx_size,
Radio::RxFlags out_flags,
long long &  rx_time_ns 
)
Here is the caller graph for this function:

◆ RadioRx() [3/3]

int RadioConfig::RadioRx ( size_t  radio_id,
std::vector< void * > &  rx_locs,
size_t  rx_size,
Radio::RxFlags out_flags,
long long &  rx_time_ns 
)

◆ RadioStart()

bool RadioConfig::RadioStart ( )
Here is the call graph for this function:

◆ RadioStop()

void RadioConfig::RadioStop ( )
Here is the call graph for this function:

◆ RadioTx() [1/2]

int RadioConfig::RadioTx ( size_t  radio_id,
const std::vector< std::vector< std::complex< int16_t >>> &  tx_data,
Radio::TxFlags  flags,
long long &  tx_time_ns 
)
Here is the call graph for this function:

◆ RadioTx() [2/2]

int RadioConfig::RadioTx ( size_t  radio_id,
const void *const *  buffs,
Radio::TxFlags  flags,
long long &  tx_time 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadSensors()

void RadioConfig::ReadSensors ( )

◆ SetIqBalance()

void RadioConfig::SetIqBalance ( Radio dev,
int  direction,
size_t  channel,
int  gcorr,
int  iqcorr 
)
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SyncArrayTime()

long long RadioConfig::SyncArrayTime ( )
private

Wait for enough time for the boards to update

Here is the call graph for this function:

◆ TxArrayToRef()

auto RadioConfig::TxArrayToRef ( const std::vector< std::complex< int16_t >> &  tx_vec)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TxRefToArray()

auto RadioConfig::TxRefToArray ( const std::vector< std::complex< int16_t >> &  tx_vec)
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ antenna_num_

size_t RadioConfig::antenna_num_
private

◆ calib_

bool RadioConfig::calib_
private

◆ calib_meas_num_

size_t RadioConfig::calib_meas_num_
private

◆ cfg_

Config* RadioConfig::cfg_
private

◆ hubs_

std::vector<SoapySDR::Device*> RadioConfig::hubs_
private

◆ init_calib_dl_

Table<arma::cx_float> RadioConfig::init_calib_dl_
private

◆ init_calib_dl_processed_

arma::cx_float* RadioConfig::init_calib_dl_processed_
private

◆ init_calib_ul_

Table<arma::cx_float> RadioConfig::init_calib_ul_
private

◆ init_calib_ul_processed_

arma::cx_float* RadioConfig::init_calib_ul_processed_
private

◆ num_radios_configured_

std::atomic<size_t> RadioConfig::num_radios_configured_
private

◆ num_radios_initialized_

std::atomic<size_t> RadioConfig::num_radios_initialized_
private

◆ radio_num_

size_t RadioConfig::radio_num_
private

◆ radios_

std::vector<std::unique_ptr<Radio> > RadioConfig::radios_
private

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