@ -42,20 +42,18 @@ typedef struct {
float rx_corr_dc_phase ;
float rx_corr_iq_i ;
float rx_corr_iq_q ;
} rf_cal_t ;
} rf_cal_t ;
namespace srslte {
/* Interface to the RF frontend.
*/
class radio
{
class radio {
public :
radio ( ) : tr_local_time ( 1024 * 10 ) , tr_usrp_time ( 1024 * 10 ) , tr_tx_time ( 1024 * 10 ) , tr_is_eob ( 1024 * 10 ) {
radio ( ) : tr_local_time ( 1024 * 10 ) , tr_usrp_time ( 1024 * 10 ) , tr_tx_time ( 1024 * 10 ) , tr_is_eob ( 1024 * 10 ) {
bzero ( & rf_device , sizeof ( srslte_rf_t ) ) ;
bzero ( & end_of_burst_time , sizeof ( srslte_timestamp_t ) ) ;
bzero ( zeros , burst_preamble_max_samples * sizeof ( cf_t ) ) ;
bzero ( zeros , burst_preamble_max_samples * sizeof ( cf_t ) ) ;
burst_preamble_sec = 0 ;
is_start_of_burst = false ;
@ -74,6 +72,7 @@ namespace srslte {
agc_enabled = false ;
radio_is_streaming = false ;
is_initialized = false ;
continuous_tx = false ;
} ;
bool init ( char * args = NULL , char * devname = NULL , uint32_t nof_channels = 1 ) ;
@ -87,6 +86,9 @@ namespace srslte {
void set_manual_calibration ( rf_cal_t * calibration ) ;
bool is_continuous_tx ( ) ;
void set_continuous_tx ( bool enable ) ;
void get_time ( srslte_timestamp_t * now ) ;
bool tx_single ( void * buffer , uint32_t nof_samples , srslte_timestamp_t tx_time ) ;
bool tx ( void * buffer [ SRSLTE_MAX_PORTS ] , uint32_t nof_samples , srslte_timestamp_t tx_time ) ;
@ -136,7 +138,6 @@ namespace srslte {
srslte_rf_t rf_device ;
const static uint32_t burst_preamble_max_samples = 30720000 ; // 30.72 MHz is maximum frequency
double burst_preamble_sec ; // Start of burst preamble time (off->on RF transition time)
srslte_timestamp_t end_of_burst_time ;
@ -152,9 +153,9 @@ namespace srslte {
// Define default values for known radios
bool tx_adv_auto ;
bool tx_adv_negative ;
const static double uhd_default_burst_preamble_sec = 600 * 1e-6 ;
const static double uhd_default_burst_preamble_sec = 600 * 1e-6 ;
const static double uhd_default_tx_adv_samples = 98 ;
const static double uhd_default_tx_adv_offset_sec = 4 * 1e-6 ;
const static double uhd_default_tx_adv_offset_sec = 4 * 1e-6 ;
const static double blade_default_burst_preamble_sec = 0.0 ;
const static double blade_default_tx_adv_samples = 27 ;
@ -170,14 +171,15 @@ namespace srslte {
uint32_t tti ;
bool agc_enabled ;
bool is_initialized = true ; ;
bool continuous_tx ;
bool is_initialized ;
bool radio_is_streaming ;
uint32_t saved_nof_channels ;
char saved_args [ 128 ] ;
char saved_devname [ 128 ] ;
} ;
} ;
}
# endif // SRSLTE_RADIO_H