aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-08-17 12:04:49 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2018-08-20 18:27:28 +0200
commit4553890d702a235aca35b7d3004ac530e1d6da59 (patch)
tree57e59aa3388621a361178360d0e0fd0fd44bbd2c /include
parent9feddb7edfc95b6864e5f594211bd94d54d4ab46 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/gsm_data_shared.h2
-rw-r--r--include/osmo-bts/measurement.h2
2 files changed, 4 insertions, 0 deletions
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