mirror of https://github.com/PentHertz/srsLTE.git
Merge branch 'next' into next_novolk
This commit is contained in:
commit
d3e3ecacb6
|
@ -93,7 +93,7 @@ public:
|
||||||
available.pop();
|
available.pop();
|
||||||
|
|
||||||
if (available.size() < capacity/20) {
|
if (available.size() < capacity/20) {
|
||||||
printf("Warning buffer pool capacity is %f %%\n", (float) available.size()/capacity);
|
printf("Warning buffer pool capacity is %f %%\n", (float) 100*available.size()/capacity);
|
||||||
}
|
}
|
||||||
#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED
|
#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED
|
||||||
if (debug_name) {
|
if (debug_name) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ void logger_file::init(std::string file) {
|
||||||
filename = file;
|
filename = file;
|
||||||
logfile = fopen(filename.c_str(), "w");
|
logfile = fopen(filename.c_str(), "w");
|
||||||
if(logfile==NULL) {
|
if(logfile==NULL) {
|
||||||
printf("Error: could not create log file, no messages will be logged");
|
printf("Error: could not create log file, no messages will be logged!\n");
|
||||||
}
|
}
|
||||||
start();
|
start();
|
||||||
inited = true;
|
inited = true;
|
||||||
|
|
|
@ -649,12 +649,14 @@ int rf_uhd_recv_with_time_multi(void *h,
|
||||||
fprintf(stderr, "Error receiving from UHD: %d\n", error);
|
fprintf(stderr, "Error receiving from UHD: %d\n", error);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uhd_rx_metadata_error_code_t error_code = 0;
|
||||||
|
uhd_rx_metadata_error_code(*md, &error_code);
|
||||||
|
|
||||||
md = &handler->rx_md;
|
md = &handler->rx_md;
|
||||||
n += rxd_samples;
|
n += rxd_samples;
|
||||||
trials++;
|
trials++;
|
||||||
|
|
||||||
uhd_rx_metadata_error_code_t error_code;
|
|
||||||
uhd_rx_metadata_error_code(*md, &error_code);
|
|
||||||
if (error_code == UHD_RX_METADATA_ERROR_CODE_OVERFLOW) {
|
if (error_code == UHD_RX_METADATA_ERROR_CODE_OVERFLOW) {
|
||||||
log_overflow(handler);
|
log_overflow(handler);
|
||||||
} else if (error_code == UHD_RX_METADATA_ERROR_CODE_LATE_COMMAND) {
|
} else if (error_code == UHD_RX_METADATA_ERROR_CODE_LATE_COMMAND) {
|
||||||
|
|
|
@ -417,7 +417,7 @@ void mac::get_metrics(mac_metrics_t &m)
|
||||||
metrics.rx_pkts?((float) 100*metrics.rx_errors/metrics.rx_pkts):0.0,
|
metrics.rx_pkts?((float) 100*metrics.rx_errors/metrics.rx_pkts):0.0,
|
||||||
dl_harq.get_average_retx(),
|
dl_harq.get_average_retx(),
|
||||||
metrics.tx_pkts?((float) 100*metrics.tx_errors/metrics.tx_pkts):0.0,
|
metrics.tx_pkts?((float) 100*metrics.tx_errors/metrics.tx_pkts):0.0,
|
||||||
dl_harq.get_average_retx());
|
ul_harq.get_average_retx());
|
||||||
|
|
||||||
metrics.ul_buffer = (int) bsr_procedure.get_buffer_state();
|
metrics.ul_buffer = (int) bsr_procedure.get_buffer_state();
|
||||||
m = metrics;
|
m = metrics;
|
||||||
|
|
|
@ -233,7 +233,6 @@ void rrc::run_thread() {
|
||||||
set_phy_default();
|
set_phy_default();
|
||||||
set_mac_default();
|
set_mac_default();
|
||||||
mac->pcch_start_rx();
|
mac->pcch_start_rx();
|
||||||
mac_timers->timer_get(t311)->run();
|
|
||||||
mac_timers->timer_get(t310)->stop();
|
mac_timers->timer_get(t310)->stop();
|
||||||
mac_timers->timer_get(t311)->stop();
|
mac_timers->timer_get(t311)->stop();
|
||||||
state = RRC_STATE_IDLE;
|
state = RRC_STATE_IDLE;
|
||||||
|
|
|
@ -105,20 +105,18 @@ void usim::stop()
|
||||||
|
|
||||||
void usim::get_imsi_vec(uint8_t* imsi_, uint32_t n)
|
void usim::get_imsi_vec(uint8_t* imsi_, uint32_t n)
|
||||||
{
|
{
|
||||||
if (!initiated)
|
if (!initiated) {
|
||||||
{
|
fprintf(stderr, "USIM not initiated!\n");
|
||||||
usim_log->error("Getting IMSI: USIM not initiated\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(NULL == imsi_ || n < 15)
|
|
||||||
{
|
if(NULL == imsi_ || n < 15) {
|
||||||
usim_log->error("Invalid parameters to get_imsi_vec");
|
usim_log->error("Invalid parameters to get_imsi_vec");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t temp = imsi;
|
uint64_t temp = imsi;
|
||||||
for(int i=14;i>=0;i--)
|
for(int i=14;i>=0;i--) {
|
||||||
{
|
|
||||||
imsi_[i] = temp % 10;
|
imsi_[i] = temp % 10;
|
||||||
temp /= 10;
|
temp /= 10;
|
||||||
}
|
}
|
||||||
|
@ -126,13 +124,12 @@ void usim::get_imsi_vec(uint8_t* imsi_, uint32_t n)
|
||||||
|
|
||||||
void usim::get_imei_vec(uint8_t* imei_, uint32_t n)
|
void usim::get_imei_vec(uint8_t* imei_, uint32_t n)
|
||||||
{
|
{
|
||||||
if (!initiated)
|
if (!initiated) {
|
||||||
{
|
fprintf(stderr, "USIM not initiated!\n");
|
||||||
usim_log->error("Getting IMEI: USIM not initiated\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(NULL == imei_ || n < 15)
|
|
||||||
{
|
if(NULL == imei_ || n < 15) {
|
||||||
usim_log->error("Invalid parameters to get_imei_vec");
|
usim_log->error("Invalid parameters to get_imei_vec");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -147,9 +144,8 @@ void usim::get_imei_vec(uint8_t* imei_, uint32_t n)
|
||||||
|
|
||||||
int usim::get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id)
|
int usim::get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id)
|
||||||
{
|
{
|
||||||
if (!initiated)
|
if (!initiated) {
|
||||||
{
|
fprintf(stderr, "USIM not initiated!\n");
|
||||||
usim_log->error("Getting Home PLMN Id: USIM not initiated\n");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue