mirror of https://github.com/PentHertz/srsLTE.git
add buffer_pool printing option to eNB
This commit is contained in:
parent
718a15608c
commit
9a10f5f6d4
|
@ -126,6 +126,7 @@ typedef struct {
|
|||
mac_args_t mac;
|
||||
uint32_t rrc_inactivity_timer;
|
||||
float metrics_period_secs;
|
||||
bool print_buffer_state;
|
||||
}expert_args_t;
|
||||
|
||||
typedef struct {
|
||||
|
@ -156,6 +157,8 @@ public:
|
|||
|
||||
void start_plot();
|
||||
|
||||
void print_pool();
|
||||
|
||||
static void rf_msg(srslte_rf_error_t error);
|
||||
|
||||
void handle_rf_msg(srslte_rf_error_t error);
|
||||
|
|
|
@ -256,6 +256,10 @@ void enb::start_plot() {
|
|||
phy.start_plot();
|
||||
}
|
||||
|
||||
void enb::print_pool() {
|
||||
srslte::byte_buffer_pool::get_instance()->print_all_buffers();
|
||||
}
|
||||
|
||||
bool enb::get_metrics(enb_metrics_t &m)
|
||||
{
|
||||
m.rf = rf_metrics;
|
||||
|
|
|
@ -184,6 +184,9 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
|
|||
bpo::value<uint32_t>(&args->expert.rrc_inactivity_timer)->default_value(10000),
|
||||
"Inactivity timer in ms")
|
||||
|
||||
("expert.print_buffer_state",
|
||||
bpo::value<bool>(&args->expert.print_buffer_state)->default_value(false),
|
||||
"Prints on the console the buffer state every 10 seconds")
|
||||
|
||||
("rf_calibration.tx_corr_dc_gain", bpo::value<float>(&args->rf_cal.tx_corr_dc_gain)->default_value(0.0), "TX DC offset gain correction")
|
||||
("rf_calibration.tx_corr_dc_phase", bpo::value<float>(&args->rf_cal.tx_corr_dc_phase)->default_value(0.0), "TX DC offset phase correction")
|
||||
|
@ -385,11 +388,21 @@ int main(int argc, char *argv[])
|
|||
|
||||
bool plot_started = false;
|
||||
bool signals_pregenerated = false;
|
||||
while(running) {
|
||||
if(running) {
|
||||
if (!plot_started && args.gui.enable) {
|
||||
enb->start_plot();
|
||||
plot_started = true;
|
||||
}
|
||||
}
|
||||
int cnt=0;
|
||||
while (running) {
|
||||
if (args.expert.print_buffer_state) {
|
||||
cnt++;
|
||||
if (cnt==10) {
|
||||
cnt=0;
|
||||
enb->print_pool();
|
||||
}
|
||||
}
|
||||
sleep(1);
|
||||
}
|
||||
pthread_cancel(input);
|
||||
|
|
Loading…
Reference in New Issue