|
|
@ -39,32 +39,40 @@ namespace srslte {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class radio {
|
|
|
|
class radio {
|
|
|
|
public:
|
|
|
|
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), zeros(NULL)
|
|
|
|
bzero(&rf_device, sizeof(srslte_rf_t));
|
|
|
|
{
|
|
|
|
bzero(&end_of_burst_time, sizeof(srslte_timestamp_t));
|
|
|
|
bzero(&rf_device, sizeof(srslte_rf_t));
|
|
|
|
zeros = (cf_t *) srslte_vec_malloc(burst_preamble_max_samples * sizeof (cf_t));
|
|
|
|
bzero(&end_of_burst_time, sizeof(srslte_timestamp_t));
|
|
|
|
bzero(zeros, burst_preamble_max_samples * sizeof(cf_t));
|
|
|
|
zeros = (cf_t*)srslte_vec_malloc(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;
|
|
|
|
burst_preamble_sec = 0;
|
|
|
|
burst_preamble_samples = 0;
|
|
|
|
is_start_of_burst = false;
|
|
|
|
burst_preamble_time_rounded = 0;
|
|
|
|
burst_preamble_samples = 0;
|
|
|
|
|
|
|
|
burst_preamble_time_rounded = 0;
|
|
|
|
cur_tx_srate = 0;
|
|
|
|
|
|
|
|
tx_adv_sec = 0;
|
|
|
|
cur_tx_srate = 0;
|
|
|
|
tx_adv_nsamples = 0;
|
|
|
|
tx_adv_sec = 0;
|
|
|
|
tx_adv_auto = false;
|
|
|
|
tx_adv_nsamples = 0;
|
|
|
|
tx_adv_negative = false;
|
|
|
|
tx_adv_auto = false;
|
|
|
|
tx_freq = 0;
|
|
|
|
tx_adv_negative = false;
|
|
|
|
rx_freq = 0;
|
|
|
|
tx_freq = 0;
|
|
|
|
trace_enabled = false;
|
|
|
|
rx_freq = 0;
|
|
|
|
tti = 0;
|
|
|
|
trace_enabled = false;
|
|
|
|
agc_enabled = false;
|
|
|
|
tti = 0;
|
|
|
|
radio_is_streaming = false;
|
|
|
|
agc_enabled = false;
|
|
|
|
is_initialized = false;
|
|
|
|
radio_is_streaming = false;
|
|
|
|
continuous_tx = false;
|
|
|
|
is_initialized = false;
|
|
|
|
|
|
|
|
continuous_tx = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~radio()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (zeros) {
|
|
|
|
|
|
|
|
free(zeros);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool init(char *args = NULL, char *devname = NULL, uint32_t nof_channels = 1);
|
|
|
|
bool init(char *args = NULL, char *devname = NULL, uint32_t nof_channels = 1);
|
|
|
|
void stop();
|
|
|
|
void stop();
|
|
|
|
void reset();
|
|
|
|
void reset();
|
|
|
|