printf("Average UE RX time : %llu\tMax RX time : %llu\tMin RX time : %llu\n",average_rx_time,max_rx_time,min_rx_time);
}
//printf("RX: t1 %llu (time from last send), t2 %llu (sendto of %lu bytes) total time : %llu\n",(long long unsigned int)(time1.tv_nsec - time0.tv_nsec), (long long unsigned int)(time2.tv_nsec - time1.tv_nsec),
// (nsamps<<2)+sizeof(openair0_timestamp),(long long unsigned int)(time2.tv_nsec - time0.tv_nsec));
AssertFatal(rt_period>0,"Invalid rt period !%u\n",rt_period);
LOG_I(RRH,"[eNB] Real time period is set to %u ns\n",rt_period);
}
staticvoidcheck_dev_config(rrh_module_t*mod_enb){
AssertFatal((mod_enb->devs->openair0_cfg->num_rb_dl==100||mod_enb->devs->openair0_cfg->num_rb_dl==50||mod_enb->devs->openair0_cfg->num_rb_dl==25||mod_enb->devs->openair0_cfg->num_rb_dl==6),"Invalid number of resource blocks! %d\n",mod_enb->devs->openair0_cfg->num_rb_dl);
AssertFatal(mod_enb->devs->openair0_cfg->samples_per_frame>0,"Invalid number of samples per frame! %d\n",mod_enb->devs->openair0_cfg->samples_per_frame);
AssertFatal(mod_enb->devs->openair0_cfg->samples_per_packet>0,"Invalid number of samples per packet! %d\n",mod_enb->devs->openair0_cfg->samples_per_packet);
AssertFatal(mod_enb->devs->openair0_cfg->rx_num_channels>0,"Invalid number of RX antennas! %d\n",mod_enb->devs->openair0_cfg->rx_num_channels);
AssertFatal(mod_enb->devs->openair0_cfg->tx_num_channels>0,"Invalid number of TX antennas! %d\n",mod_enb->devs->openair0_cfg->tx_num_channels);
printf("Average UE RX time : %lu\tMax RX time : %lu\tMin RX time : %lu\n",average_rx_time,max_rx_time,min_rx_time);
}
//printf("RX: t1 %llu (time from last send), t2 %llu (sendto of %lu bytes) total time : %llu\n",(long long unsigned int)(time1.tv_nsec - time0.tv_nsec), (long long unsigned int)(time2.tv_nsec - time1.tv_nsec),
// (nsamps<<2)+sizeof(openair0_timestamp),(long long unsigned int)(time2.tv_nsec - time0.tv_nsec));
//rrh_eNB_desc.timestamp_eNB_tx[rrh_eNB_desc.antenna_index_eNB_tx] = *(openair0_timestamp*)(buf+4); //we don't need timestamp when receiving the first command
printf("Average eNB RX time : %lu\tMax RX time : %lu\tMin RX time : %lu\n",average_rx_time,max_rx_time,min_rx_time);
}
//printf("RX: t1 %llu (time from last send), t2 %llu (sendto of %lu bytes) total time : %llu\n",(long long unsigned int)(time1.tv_nsec - time0.tv_nsec), (long long unsigned int)(time2.tv_nsec - time1.tv_nsec),
// (nsamps<<2)+sizeof(openair0_timestamp),(long long unsigned int)(time2.tv_nsec - time0.tv_nsec));
//rrh_eNB_desc.timestamp_eNB_tx[rrh_eNB_desc.antenna_index_eNB_tx] = *(openair0_timestamp*)(buf+4); //we don't need timestamp when receiving the first command
rrh_eNB_desc.nsamps=*(int16_t*)(buf+2);
rrh_eNB_desc.sockid_eNB=sockid;
rrh_eNB_desc.clientaddr=clientaddr;
rrh_eNB_desc.clientaddrlen=clientaddrlen;
//cmd = cmd&1;
cmd=cmd|1;//in order to make cmd evalution dummy (the first message from lte to rrh has changed, see: @ethernet_lib.c trx_start_func has been substituted by trx_request_func )