aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/osmo-trx.cpp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-05-24 16:54:19 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-06-05 12:50:38 +0200
commit4456b6f132437a95833e3a3d3353836331b9c8a0 (patch)
treed23d18e603643d08d821e4ba14a5519b77b379de /Transceiver52M/osmo-trx.cpp
parent76a5013c914a152cd3f7a80488953946ad353441 (diff)
Add rate_ctr support to store/retrieve SDR errors through VTY
Introduce a unified implementation-agnostic interface for radioDevice to signal SDR error counters to upper layers and manage them. This patch only implements counters for osmo-trx-lms (other devices will show all counters unchanged during time). Sample use through VTY: """ OsmoTRX> show rate-counters osmo-trx statistics 0: device:rx_underruns: 0 (0/s 0/m 0/h 0/d) Number of Rx underruns device:rx_overruns: 0 (0/s 0/m 0/h 0/d) Number of Rx overruns device:tx_underruns: 0 (0/s 0/m 0/h 0/d) Number of Tx underruns device:rx_drop_events: 4 (0/s 2/m 3/h 0/d) Number of times Rx samples were dropped by HW device:rx_drop_samples: 513 (0/s 196/m 425/h 0/d) Number of Rx samples dropped by HW """ Change-Id: I78b158141697e5714d04db8b9ccc96f31f34f439
Diffstat (limited to 'Transceiver52M/osmo-trx.cpp')
-rw-r--r--Transceiver52M/osmo-trx.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 8c592aa..a79c26e 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -59,6 +59,7 @@ extern "C" {
#include "trx_vty.h"
#include "debug.h"
#include "osmo_signal.h"
+#include "trx_rate_ctr.h"
}
#define DEFAULT_CONFIG_FILE "osmo-trx.cfg"
@@ -626,6 +627,8 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
+ trx_rate_ctr_init(tall_trx_ctx, g_trx_ctx);
+
srandom(time(NULL));
if(trx_start(g_trx_ctx) < 0)