From 4553890d702a235aca35b7d3004ac530e1d6da59 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 17 Aug 2018 12:04:49 +0200 Subject: measurement: make sure measurement interval end is detected the measurement interval end is detected by using the measurement indication that is related to the SACCH block as a trigger to start the computation. If the measurement indication for the SACCH gets lost because the block could not be received then the processing is not executed. This may cause wrong results or when it happens condecutively an overflow of the measurement sample buffer. - Store the frame number of the last received measurement indication - Use the stored frame number to check if an interval was crossed when the next measurement indication is received. If we detect that we missed the interval, catch up by running the computation and start the next interval. Change-Id: I3a86cd8185cc6b94258373fe929f0c2f1cf27cfa Related: OS#2975 --- include/osmo-bts/gsm_data_shared.h | 2 ++ include/osmo-bts/measurement.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index baa01454..794eaeae 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -260,6 +260,8 @@ struct gsm_lchan { uint8_t l1_info[2]; struct gsm_meas_rep_unidir ul_res; int16_t ms_toa256; + /* Frame number of the last measurement indication receceived */ + uint32_t last_fn; /* Osmocom extended measurement results, see LC_UL_M_F_EXTD_VALID */ struct { /* minimum value of toa256 during measurement period */ diff --git a/include/osmo-bts/measurement.h b/include/osmo-bts/measurement.h index d98e9f0b..57eeef5b 100644 --- a/include/osmo-bts/measurement.h +++ b/include/osmo-bts/measurement.h @@ -12,4 +12,6 @@ void lchan_meas_process_measurement(struct gsm_lchan *lchan, struct bts_ul_meas void lchan_meas_reset(struct gsm_lchan *lchan); +bool is_meas_overdue(struct gsm_lchan *lchan, uint32_t *fn_missed_end, uint32_t fn); + #endif -- cgit v1.2.3