aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_l1_if.cpp
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-07-28 14:54:13 +0200
committerHarald Welte <laforge@gnumonks.org>2016-08-04 15:06:12 +0000
commitcbf9a721d669ef0c724553f4604aee89f8e723dc (patch)
tree2d11c67e4bc3515e85551c21963bc454cd0950ad /src/pcu_l1_if.cpp
parent505a86d396d4ee6e821e8337056e85362a55848f (diff)
Extend BTS <-> PCU protocol with measurement
Note: this increases the version of BTS <-> PCU protocol and thus requires corresponding change in BTS. Change-Id: Ide0e29b668ee38516605c1763fda85e87e867813 Related: OS#1616
Diffstat (limited to 'src/pcu_l1_if.cpp')
-rw-r--r--src/pcu_l1_if.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 36cf9adc..14342136 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -214,7 +214,15 @@ static int pcu_rx_data_ind(struct gsm_pcu_if_data *data_ind, struct gsmtap_inst
int rc;
pcu_l1_meas meas;
meas.set_rssi(data_ind->rssi);
-
+#ifndef ENABLE_DIRECT_PHY
+ /* convert BER to % value */
+ meas.set_ber(data_ind->ber10k / 100);
+ meas.set_bto(data_ind->ta_offs_qbits);
+ meas.set_link_qual(data_ind->lqual_cb / 10);
+ LOGP(DL1IF, LOGL_DEBUG, "Data indication with raw measurements "
+ "received: BER10k = %d, BTO = %d, Q = %d\n", data_ind->ber10k,
+ data_ind->ta_offs_qbits, data_ind->lqual_cb);
+#endif
LOGP(DL1IF, LOGL_DEBUG, "Data indication received: sapi=%d arfcn=%d "
"block=%d data=%s\n", data_ind->sapi,
data_ind->arfcn, data_ind->block_nr,