aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc/meas_rep.h
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-07-05 12:59:50 +0200
committerlaforge <laforge@osmocom.org>2021-07-09 11:51:40 +0000
commit7225fe49026bcc8e312ef6e5a2f40f4e385529cf (patch)
tree1eba151542aa0b88b031834d0e2cc56ea6b20988 /include/osmocom/bsc/meas_rep.h
parent25ea643e19c2d95bec07e3ac783c2864afbf350c (diff)
hodec2: [1/2] implement automatic choice between FULL and SUBSET measurements
Cosmetic preparation for enabling automatic choice between FULL and SUBSET measurements depending on DTX in handover decision 2. Change the internal API to pass separate enums for the choices {RXLEV, RXQUAL}, {UL, DL} and {FULL, SUB}. Change-Id: I283e03126a6bc1f5f1b35f9801e841053edd2947
Diffstat (limited to 'include/osmocom/bsc/meas_rep.h')
-rw-r--r--include/osmocom/bsc/meas_rep.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/include/osmocom/bsc/meas_rep.h b/include/osmocom/bsc/meas_rep.h
index 54e0519e8..5cfeb98fb 100644
--- a/include/osmocom/bsc/meas_rep.h
+++ b/include/osmocom/bsc/meas_rep.h
@@ -51,14 +51,32 @@ struct gsm_meas_rep {
struct gsm_meas_rep_cell cell[6];
};
+enum tdma_meas_field {
+ TDMA_MEAS_FIELD_RXLEV = 0,
+ TDMA_MEAS_FIELD_RXQUAL = 1,
+};
+
+enum tdma_meas_dir {
+ TDMA_MEAS_DIR_UL = 0,
+ TDMA_MEAS_DIR_DL = 1,
+};
+
+/* (function choose_meas_rep_field() depends on FULL and SUB being 0 and 1, but doesn't care about AUTO's value) */
+enum tdma_meas_set {
+ TDMA_MEAS_SET_FULL = 0,
+ TDMA_MEAS_SET_SUB = 1,
+ TDMA_MEAS_SET_AUTO,
+};
+
/* obtain an average over the last 'num' fields in the meas reps */
int get_meas_rep_avg(const struct gsm_lchan *lchan,
- enum meas_rep_field field, unsigned int num);
+ enum tdma_meas_field field, enum tdma_meas_dir dir, enum tdma_meas_set set,
+ unsigned int num);
/* Check if N out of M last values for FIELD are >= bd */
int meas_rep_n_out_of_m_be(const struct gsm_lchan *lchan,
- enum meas_rep_field field,
- unsigned int n, unsigned int m, int be);
+ enum tdma_meas_field field, enum tdma_meas_dir dir, enum tdma_meas_set set,
+ unsigned int n, unsigned int m, int be);
unsigned int calc_initial_idx(unsigned int array_size,
unsigned int meas_rep_idx,