blob: 342d5e4585d06472fc18dc2835612be199347ec3 [file] [log] [blame]
Neels Hofmeyre25018b2017-11-27 21:29:33 +01001#pragma once
2
3#include <stdbool.h>
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +01004#include <string.h>
Neels Hofmeyre25018b2017-11-27 21:29:33 +01005
6struct vty;
7
8/* handover_cfg is an opaque struct to manage several levels of configuration. There is an overall handover
9 * config on 'network' level and a per-'bts' specific handover config. If the 'bts' level sets no values,
10 * the defaults from 'network' level are used implicitly, and changes take effect immediately. */
11struct handover_cfg;
12
Neels Hofmeyr909e9722017-12-07 03:54:01 +010013#define HO_CFG_CONGESTION_CHECK_DEFAULT 10
14
Neels Hofmeyre25018b2017-11-27 21:29:33 +010015struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg);
16
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010017#define HO_CFG_STR_HANDOVER1 "Handover options for handover decision algorithm 1\n"
18#define HO_CFG_STR_HANDOVER2 "Handover options for handover decision algorithm 2\n"
19#define HO_CFG_STR_WIN "Measurement averaging settings\n"
Neels Hofmeyre25018b2017-11-27 21:29:33 +010020#define HO_CFG_STR_WIN_RXLEV HO_CFG_STR_WIN "Received-Level averaging\n"
21#define HO_CFG_STR_WIN_RXQUAL HO_CFG_STR_WIN "Received-Quality averaging\n"
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010022#define HO_CFG_STR_POWER_BUDGET "Neighbor cell power triggering\n" "Neighbor cell power triggering\n"
Neels Hofmeyre25018b2017-11-27 21:29:33 +010023#define HO_CFG_STR_AVG_COUNT "Number of values to average over\n"
Neels Hofmeyr5a5c7fd2018-11-05 02:49:57 +010024#define HO_CFG_STR_MIN "Minimum Level/Quality thresholds before triggering HO\n"
25#define HO_CFG_STR_AFS_BIAS "Configure bias to prefer AFS (AMR on TCH/F) over other codecs\n"
26#define HO_CFG_STR_MIN_TCH "Minimum free TCH timeslots before cell is considered congested\n"
27#define HO_CFG_STR_PENALTY_TIME "Set penalty times to wait between repeated handovers\n"
Neels Hofmeyre25018b2017-11-27 21:29:33 +010028
29#define as_is(x) (x)
30
31static inline bool a2bool(const char *arg)
32{
33 return (bool)(atoi(arg));
34}
35
36static inline int bool2i(bool arg)
37{
38 return arg? 1 : 0;
39}
40
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +010041static inline bool a2tdma(const char *arg)
42{
43 if (!strcmp(arg, "full"))
44 return true;
45 return false;
46}
47
48static inline const char *tdma2a(bool val)
49{
50 return val? "full" : "subset";
51}
Neels Hofmeyre25018b2017-11-27 21:29:33 +010052
53/* The HO_CFG_ONE_MEMBER macro gets redefined, depending on whether to define struct members,
54 * function declarations or definitions... It is of the format
55 * HO_CFG_ONE_MEMBER(TYPE, NAME, DEFAULT_VAL,
56 * VTY_CMD, VTY_CMD_ARG, VTY_ARG_EVAL,
57 * VTY_WRITE_FMT, VTY_WRITE_CONV,
58 * VTY_DOC)
59 * Then using HO_CFG_ALL_MEMBERS can save a lot of code dup in defining API declaration, API
60 * definitions, VTY commands and VTY write code. Of course this doesn't prevent us from adding manual
61 * members as well, in case future additions don't fit in this scheme.
62 *
63 * TYPE: a type name like int.
64 * NAME: a variable name suitable for a struct member.
65 * DEFAULT_VAL: default value, as passed to the VTY, e.g. '0' or 'foo', without quotes.
Neels Hofmeyr444f9e22018-02-15 03:59:17 +010066 * VTY_CMD_PREFIX: "handover1 ", "handover2 ", ... or just "" for the common general items.
Neels Hofmeyre25018b2017-11-27 21:29:33 +010067 * VTY_CMD: a command string for VTY without any arguments.
68 * VTY_CMD_ARG: VTY value range like '<0-23>' or 'foo|bar', will become '(VTY_CMD_ARG|default)'.
69 * VTY_ARG_EVAL: function name for parsing the VTY arg[0], e.g. 'atoi'.
70 * VTY_WRITE_FMT: printf-like string format for vty_out().
71 * VTY_WRITE_CONV: function name to convert struct value to VTY_WRITE_FMT, e.g. 'as_is'.
72 * VTY_DOC: VTY documentation strings to match VTY_CMD and VTY_CMD_ARGs.
73 */
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010074#define HO_GENERAL_CFG_ALL_MEMBERS \
Neels Hofmeyre25018b2017-11-27 21:29:33 +010075 \
76 HO_CFG_ONE_MEMBER(bool, ho_active, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +010077 "", "handover", "0|1", a2bool, "%d", bool2i, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010078 "Handover general config\n" \
Neels Hofmeyre25018b2017-11-27 21:29:33 +010079 "Disable in-call handover\n" \
80 "Enable in-call handover\n" \
81 "Enable/disable handover: ") \
82 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +010083 HO_CFG_ONE_MEMBER(int, algorithm, 1, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +010084 "", "handover algorithm", "1|2", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010085 "Handover general config\n" \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +010086 "Choose algorithm for handover decision\n" \
87 "Algorithm 1: trigger handover based on comparing current cell and neighbor RxLev and RxQual," \
88 " only.\n" \
89 "Algorithm 2: trigger handover on RxLev/RxQual, and also to balance the load across several" \
90 " cells. Consider available codecs. Prevent repeated handover by penalty timers.\n") \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010091
92
93#define HODEC1_CFG_ALL_MEMBERS \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +010094 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010095 HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxlev_avg_win, 10, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +010096 "handover1 ", "window rxlev averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010097 HO_CFG_STR_HANDOVER1 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +010098 HO_CFG_STR_WIN_RXLEV \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +020099 "How many RxLev measurements to use for averaging\n" \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100100 "RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
101 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100102 HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxqual_avg_win, 1, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100103 "handover1 ", "window rxqual averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100104 HO_CFG_STR_HANDOVER1 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100105 HO_CFG_STR_WIN_RXQUAL \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200106 "How many RxQual measurements to use for averaging\n" \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100107 "RxQual averaging: " HO_CFG_STR_AVG_COUNT) \
108 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100109 HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxlev_neigh_avg_win, 10, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100110 "handover1 ", "window rxlev neighbor averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100111 HO_CFG_STR_HANDOVER1 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100112 HO_CFG_STR_WIN_RXLEV \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200113 "How many Neighbor RxLev measurements to use for averaging\n" \
114 "How many Neighbor RxLev measurements to use for averaging\n" \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100115 "Neighbor RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
116 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100117 HO_CFG_ONE_MEMBER(unsigned int, hodec1_pwr_interval, 6, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100118 "handover1 ", "power budget interval", "<1-99>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100119 HO_CFG_STR_HANDOVER1 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100120 HO_CFG_STR_POWER_BUDGET \
121 "How often to check for a better cell (SACCH frames)\n" \
122 "Check for stronger neighbor every N number of SACCH frames\n") \
123 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100124 HO_CFG_ONE_MEMBER(unsigned int, hodec1_pwr_hysteresis, 3, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100125 "handover1 ", "power budget hysteresis", "<0-999>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100126 HO_CFG_STR_HANDOVER1 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100127 HO_CFG_STR_POWER_BUDGET \
Neels Hofmeyr16dd64a2018-07-19 16:50:14 +0200128 "How many dB stronger must a neighbor be to become a HO candidate\n" \
129 "Neighbor's strength difference in dB\n") \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100130 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100131 HO_CFG_ONE_MEMBER(unsigned int, hodec1_max_distance, 9999, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100132 "handover1 ", "maximum distance" , "<0-9999>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100133 HO_CFG_STR_HANDOVER1 \
134 "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n" \
135 "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n" \
136 "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n") \
137
138
139#define HODEC2_CFG_ALL_MEMBERS \
140 \
141 HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxlev_avg_win, 10, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100142 "handover2 ", "window rxlev averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100143 HO_CFG_STR_HANDOVER2 \
144 HO_CFG_STR_WIN_RXLEV \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200145 "How many RxLev measurements to use for averaging\n" \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100146 "RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
147 \
148 HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxqual_avg_win, 1, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100149 "handover2 ", "window rxqual averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100150 HO_CFG_STR_HANDOVER2 \
151 HO_CFG_STR_WIN_RXQUAL \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200152 "How many RxQual measurements to use for averaging\n" \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100153 "RxQual averaging: " HO_CFG_STR_AVG_COUNT) \
154 \
155 HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxlev_neigh_avg_win, 10, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100156 "handover2 ", "window rxlev neighbor averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100157 HO_CFG_STR_HANDOVER2 \
158 HO_CFG_STR_WIN_RXLEV \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200159 "How many Neighbor RxLev measurements to use for averaging\n" \
160 "How many Neighbor RxLev measurements to use for averaging\n" \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100161 "Neighbor RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
162 \
163 HO_CFG_ONE_MEMBER(unsigned int, hodec2_pwr_interval, 6, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100164 "handover2 ", "power budget interval", "<1-99>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100165 HO_CFG_STR_HANDOVER2 \
166 HO_CFG_STR_POWER_BUDGET \
167 "How often to check for a better cell (SACCH frames)\n" \
168 "Check for stronger neighbor every N number of SACCH frames\n") \
169 \
170 HO_CFG_ONE_MEMBER(unsigned int, hodec2_pwr_hysteresis, 3, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100171 "handover2 ", "power budget hysteresis", "<0-999>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100172 HO_CFG_STR_HANDOVER2 \
173 HO_CFG_STR_POWER_BUDGET \
Neels Hofmeyr16dd64a2018-07-19 16:50:14 +0200174 "How many dB stronger must a neighbor be to become a HO candidate\n" \
175 "Neighbor's strength difference in dB\n") \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100176 \
177 HO_CFG_ONE_MEMBER(unsigned int, hodec2_max_distance, 9999, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100178 "handover2 ", "maximum distance" , "<0-9999>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100179 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100180 "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n" \
181 "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n" \
182 "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n") \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100183 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100184 HO_CFG_ONE_MEMBER(bool, hodec2_as_active, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100185 "handover2 ", "assignment", "0|1", a2bool, "%d", bool2i, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100186 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200187 "Enable or disable in-call channel re-assignment within the same cell\n" \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100188 "Disable in-call assignment\n" \
189 "Enable in-call assignment\n") \
190 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100191 HO_CFG_ONE_MEMBER(bool, hodec2_full_tdma, subset, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100192 "handover2 ", "tdma-measurement", "full|subset", a2tdma, "%s", tdma2a, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100193 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr5a5c7fd2018-11-05 02:49:57 +0100194 "Define measurement set of TDMA frames\n" \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100195 "Full set of 102/104 TDMA frames\n" \
196 "Sub set of 4 TDMA frames (SACCH)\n") \
197 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100198 HO_CFG_ONE_MEMBER(int, hodec2_min_rxlev, -100, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100199 "handover2 ", "min rxlev", "<-110--50>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100200 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100201 HO_CFG_STR_MIN \
202 "How weak may RxLev of an MS become before triggering HO\n" \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200203 "minimum RxLev (dBm; note: negative values)\n") \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100204 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100205 HO_CFG_ONE_MEMBER(int, hodec2_min_rxqual, 5, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100206 "handover2 ", "min rxqual", "<0-7>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100207 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100208 HO_CFG_STR_MIN \
Neels Hofmeyr4d8a4692020-11-11 19:57:51 +0100209 "How bad may RxQual of an MS become before triggering HO," \
210 " where 0 is the best quality (bit error rate < 0.2%) and" \
211 " 7 is the worst quality (bit error rate > 12.8%)," \
212 " see 3GPP TS 45.008 8.2.4.\n" \
213 "worst acceptable RxQual\n") \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100214 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100215 HO_CFG_ONE_MEMBER(int, hodec2_afs_bias_rxlev, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100216 "handover2 ", "afs-bias rxlev", "<0-20>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100217 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100218 HO_CFG_STR_AFS_BIAS \
219 "RxLev improvement bias for AFS over other codecs\n" \
Neels Hofmeyr16dd64a2018-07-19 16:50:14 +0200220 "Virtual RxLev improvement (dB)\n") \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100221 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100222 HO_CFG_ONE_MEMBER(int, hodec2_afs_bias_rxqual, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100223 "handover2 ", "afs-bias rxqual", "<0-7>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100224 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100225 HO_CFG_STR_AFS_BIAS \
226 "RxQual improvement bias for AFS over other codecs\n" \
Neels Hofmeyr16dd64a2018-07-19 16:50:14 +0200227 "Virtual RxQual improvement\n") \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100228 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100229 HO_CFG_ONE_MEMBER(int, hodec2_tchf_min_slots, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100230 "handover2 ", "min-free-slots tch/f", "<0-9999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100231 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100232 HO_CFG_STR_MIN_TCH \
233 "Minimum free TCH/F timeslots before cell is considered congested\n" \
234 "Number of TCH/F slots\n") \
235 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100236 HO_CFG_ONE_MEMBER(int, hodec2_tchh_min_slots, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100237 "handover2 ", "min-free-slots tch/h", "<0-9999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100238 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100239 HO_CFG_STR_MIN_TCH \
240 "Minimum free TCH/H timeslots before cell is considered congested\n" \
241 "Number of TCH/H slots\n") \
242 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100243 HO_CFG_ONE_MEMBER(int, hodec2_ho_max, 9999, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100244 "handover2 ", "max-handovers", "<1-9999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100245 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr5a5c7fd2018-11-05 02:49:57 +0100246 "Maximum number of concurrent handovers allowed per cell\n" \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100247 "Number\n") \
248 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100249 HO_CFG_ONE_MEMBER(int, hodec2_penalty_max_dist, 300, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100250 "handover2 ", "penalty-time max-distance", "<0-99999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100251 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100252 HO_CFG_STR_PENALTY_TIME \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200253 "Time to suspend handover for a subscriber after leaving this cell due to exceeding max distance;" \
254 " see also 'handover2 retries'\n" \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100255 "Seconds\n") \
256 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100257 HO_CFG_ONE_MEMBER(int, hodec2_penalty_failed_ho, 60, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100258 "handover2 ", "penalty-time failed-ho", "<0-99999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100259 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100260 HO_CFG_STR_PENALTY_TIME \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200261 "Time to suspend handover for a subscriber after a failed handover into this cell;" \
262 " see also 'handover2 retries'\n" \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100263 "Seconds\n") \
264 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100265 HO_CFG_ONE_MEMBER(int, hodec2_penalty_failed_as, 60, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100266 "handover2 ", "penalty-time failed-assignment", "<0-99999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100267 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100268 HO_CFG_STR_PENALTY_TIME \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200269 "Time to suspend handover for a subscriber after a failed re-assignment within this cell;" \
270 " see also 'handover2 retries'\n" \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100271 "Seconds\n") \
272 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100273 HO_CFG_ONE_MEMBER(int, hodec2_retries, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100274 "handover2 ", "retries", "<0-9>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100275 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr08371ec2019-06-24 13:43:06 +0200276 "Number of times to immediately retry a failed handover/assignment, before a penalty time is applied\n" \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100277 "Number of retries\n") \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100278
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100279#define HO_CFG_ALL_MEMBERS \
280 HO_GENERAL_CFG_ALL_MEMBERS \
281 HODEC1_CFG_ALL_MEMBERS \
282 HODEC2_CFG_ALL_MEMBERS \
283
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100284
285/* Declare public API for handover cfg parameters... */
286
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100287#define HO_CFG_ONE_MEMBER(TYPE, NAME, DEFAULT_VAL, VTY0, VTY1, VTY2, VTY3, VTY4, VTY5, VTY6) \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100288 TYPE ho_get_##NAME(struct handover_cfg *ho); \
289 void ho_set_##NAME(struct handover_cfg *ho, TYPE val); \
290 bool ho_isset_##NAME(struct handover_cfg *ho); \
291 void ho_clear_##NAME(struct handover_cfg *ho); \
292 bool ho_isset_on_parent_##NAME(struct handover_cfg *ho);
293
294HO_CFG_ALL_MEMBERS
295#undef HO_CFG_ONE_MEMBER