From 7225fe49026bcc8e312ef6e5a2f40f4e385529cf Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 5 Jul 2021 12:59:50 +0200 Subject: 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 --- include/osmocom/bsc/meas_rep.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'include/osmocom/bsc/meas_rep.h') 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, -- cgit v1.2.3