diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-12-26 08:49:29 +0100 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-01-08 02:23:56 +0100 |
commit | 834ba05cd218e0f08685adf259e18a96368285ef (patch) | |
tree | 984869f4500c035417e09579b03853082c575dbb /include/osmo-bts/gsm_data.h | |
parent | e8f857453df56a40be61b17aafc509047e141174 (diff) |
power_control: generalize measurement pre-processing state
This way EWMA based filtering can also be applied to RxQual.
Change-Id: I439c00b394da670e314f217b3246cc85ce8213c6
Related: SYS#4918, SYS#4917
Diffstat (limited to 'include/osmo-bts/gsm_data.h')
-rw-r--r-- | include/osmo-bts/gsm_data.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index 6efc7176..253b115d 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -213,18 +213,28 @@ struct gsm_power_ctrl_params { /* Default MS/BS Power Control parameters */ extern const struct gsm_power_ctrl_params power_ctrl_params_def; +/* Measurement pre-processing state */ +struct gsm_power_ctrl_meas_proc_state { + /* Algorithm specific data */ + union { + struct { + /* Scaled up 100 times average value */ + int Avg100; + } ewma; + }; +}; + struct lchan_power_ctrl_state { /* Dynamic Power Control parameters (NULL in static mode) */ const struct gsm_power_ctrl_params *dpc_params; + /* Measurement pre-processing state (for dynamic mode) */ + struct gsm_power_ctrl_meas_proc_state rxlev_meas_proc; /* Depending on the context (MS or BS power control), fields 'current' and 'max' * reflect either the MS power level (magic numbers), or BS Power reduction level * (attenuation, in dB). */ uint8_t current; uint8_t max; - - /* Scaled up (100 times) average UL/DL RxLev (in dBm) */ - int avg100_rxlev_dbm; }; struct gsm_lchan { |