blob: 2321fcf52cf996b1cceca9a7a2f52be97cc3afdb [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 Hofmeyr87b5eb62017-12-07 01:55:58 +010024#define HO_CFG_STR_2 " (HO algo 2 only)\n"
25#define HO_CFG_STR_MIN "Minimum Level/Quality thresholds before triggering HO" HO_CFG_STR_2
26#define HO_CFG_STR_AFS_BIAS "Configure bias to prefer AFS (AMR on TCH/F) over other codecs" HO_CFG_STR_2
27#define HO_CFG_STR_MIN_TCH "Minimum free TCH timeslots before cell is considered congested" HO_CFG_STR_2
28#define HO_CFG_STR_PENALTY_TIME "Set penalty times to wait between repeated handovers" HO_CFG_STR_2
Neels Hofmeyre25018b2017-11-27 21:29:33 +010029
30#define as_is(x) (x)
31
32static inline bool a2bool(const char *arg)
33{
34 return (bool)(atoi(arg));
35}
36
37static inline int bool2i(bool arg)
38{
39 return arg? 1 : 0;
40}
41
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +010042static inline bool a2tdma(const char *arg)
43{
44 if (!strcmp(arg, "full"))
45 return true;
46 return false;
47}
48
49static inline const char *tdma2a(bool val)
50{
51 return val? "full" : "subset";
52}
Neels Hofmeyre25018b2017-11-27 21:29:33 +010053
54/* The HO_CFG_ONE_MEMBER macro gets redefined, depending on whether to define struct members,
55 * function declarations or definitions... It is of the format
56 * HO_CFG_ONE_MEMBER(TYPE, NAME, DEFAULT_VAL,
57 * VTY_CMD, VTY_CMD_ARG, VTY_ARG_EVAL,
58 * VTY_WRITE_FMT, VTY_WRITE_CONV,
59 * VTY_DOC)
60 * Then using HO_CFG_ALL_MEMBERS can save a lot of code dup in defining API declaration, API
61 * definitions, VTY commands and VTY write code. Of course this doesn't prevent us from adding manual
62 * members as well, in case future additions don't fit in this scheme.
63 *
64 * TYPE: a type name like int.
65 * NAME: a variable name suitable for a struct member.
66 * DEFAULT_VAL: default value, as passed to the VTY, e.g. '0' or 'foo', without quotes.
Neels Hofmeyr444f9e22018-02-15 03:59:17 +010067 * VTY_CMD_PREFIX: "handover1 ", "handover2 ", ... or just "" for the common general items.
Neels Hofmeyre25018b2017-11-27 21:29:33 +010068 * VTY_CMD: a command string for VTY without any arguments.
69 * VTY_CMD_ARG: VTY value range like '<0-23>' or 'foo|bar', will become '(VTY_CMD_ARG|default)'.
70 * VTY_ARG_EVAL: function name for parsing the VTY arg[0], e.g. 'atoi'.
71 * VTY_WRITE_FMT: printf-like string format for vty_out().
72 * VTY_WRITE_CONV: function name to convert struct value to VTY_WRITE_FMT, e.g. 'as_is'.
73 * VTY_DOC: VTY documentation strings to match VTY_CMD and VTY_CMD_ARGs.
74 */
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010075#define HO_GENERAL_CFG_ALL_MEMBERS \
Neels Hofmeyre25018b2017-11-27 21:29:33 +010076 \
77 HO_CFG_ONE_MEMBER(bool, ho_active, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +010078 "", "handover", "0|1", a2bool, "%d", bool2i, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010079 "Handover general config\n" \
Neels Hofmeyre25018b2017-11-27 21:29:33 +010080 "Disable in-call handover\n" \
81 "Enable in-call handover\n" \
82 "Enable/disable handover: ") \
83 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +010084 HO_CFG_ONE_MEMBER(int, algorithm, 1, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +010085 "", "handover algorithm", "1|2", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010086 "Handover general config\n" \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +010087 "Choose algorithm for handover decision\n" \
88 "Algorithm 1: trigger handover based on comparing current cell and neighbor RxLev and RxQual," \
89 " only.\n" \
90 "Algorithm 2: trigger handover on RxLev/RxQual, and also to balance the load across several" \
91 " cells. Consider available codecs. Prevent repeated handover by penalty timers.\n") \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010092
93
94#define HODEC1_CFG_ALL_MEMBERS \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +010095 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010096 HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxlev_avg_win, 10, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +010097 "handover1 ", "window rxlev averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +010098 HO_CFG_STR_HANDOVER1 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +010099 HO_CFG_STR_WIN_RXLEV \
100 "How many RxLev measurements are used for averaging\n" \
101 "RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
102 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100103 HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxqual_avg_win, 1, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100104 "handover1 ", "window rxqual averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100105 HO_CFG_STR_HANDOVER1 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100106 HO_CFG_STR_WIN_RXQUAL \
107 "How many RxQual measurements are used for averaging\n" \
108 "RxQual averaging: " HO_CFG_STR_AVG_COUNT) \
109 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100110 HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxlev_neigh_avg_win, 10, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100111 "handover1 ", "window rxlev neighbor averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100112 HO_CFG_STR_HANDOVER1 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100113 HO_CFG_STR_WIN_RXLEV \
114 "How many Neighbor RxLev measurements are used for averaging\n" \
115 "How many Neighbor RxLev measurements are used for averaging\n" \
116 "Neighbor RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
117 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100118 HO_CFG_ONE_MEMBER(unsigned int, hodec1_pwr_interval, 6, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100119 "handover1 ", "power budget interval", "<1-99>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100120 HO_CFG_STR_HANDOVER1 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100121 HO_CFG_STR_POWER_BUDGET \
122 "How often to check for a better cell (SACCH frames)\n" \
123 "Check for stronger neighbor every N number of SACCH frames\n") \
124 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100125 HO_CFG_ONE_MEMBER(unsigned int, hodec1_pwr_hysteresis, 3, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100126 "handover1 ", "power budget hysteresis", "<0-999>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100127 HO_CFG_STR_HANDOVER1 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100128 HO_CFG_STR_POWER_BUDGET \
129 "How many dBm stronger must a neighbor be to become a HO candidate\n" \
130 "Neighbor's strength difference in dBm\n") \
131 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100132 HO_CFG_ONE_MEMBER(unsigned int, hodec1_max_distance, 9999, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100133 "handover1 ", "maximum distance" , "<0-9999>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100134 HO_CFG_STR_HANDOVER1 \
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 "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n") \
138
139
140#define HODEC2_CFG_ALL_MEMBERS \
141 \
142 HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxlev_avg_win, 10, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100143 "handover2 ", "window rxlev averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100144 HO_CFG_STR_HANDOVER2 \
145 HO_CFG_STR_WIN_RXLEV \
146 "How many RxLev measurements are used for averaging\n" \
147 "RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
148 \
149 HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxqual_avg_win, 1, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100150 "handover2 ", "window rxqual averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100151 HO_CFG_STR_HANDOVER2 \
152 HO_CFG_STR_WIN_RXQUAL \
153 "How many RxQual measurements are used for averaging\n" \
154 "RxQual averaging: " HO_CFG_STR_AVG_COUNT) \
155 \
156 HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxlev_neigh_avg_win, 10, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100157 "handover2 ", "window rxlev neighbor averaging", "<1-10>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100158 HO_CFG_STR_HANDOVER2 \
159 HO_CFG_STR_WIN_RXLEV \
160 "How many Neighbor RxLev measurements are used for averaging\n" \
161 "How many Neighbor RxLev measurements are used for averaging\n" \
162 "Neighbor RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
163 \
164 HO_CFG_ONE_MEMBER(unsigned int, hodec2_pwr_interval, 6, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100165 "handover2 ", "power budget interval", "<1-99>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100166 HO_CFG_STR_HANDOVER2 \
167 HO_CFG_STR_POWER_BUDGET \
168 "How often to check for a better cell (SACCH frames)\n" \
169 "Check for stronger neighbor every N number of SACCH frames\n") \
170 \
171 HO_CFG_ONE_MEMBER(unsigned int, hodec2_pwr_hysteresis, 3, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100172 "handover2 ", "power budget hysteresis", "<0-999>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100173 HO_CFG_STR_HANDOVER2 \
174 HO_CFG_STR_POWER_BUDGET \
175 "How many dBm stronger must a neighbor be to become a HO candidate\n" \
176 "Neighbor's strength difference in dBm\n") \
177 \
178 HO_CFG_ONE_MEMBER(unsigned int, hodec2_max_distance, 9999, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100179 "handover2 ", "maximum distance" , "<0-9999>", atoi, "%u", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100180 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100181 "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" \
183 "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n") \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100184 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100185 HO_CFG_ONE_MEMBER(bool, hodec2_as_active, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100186 "handover2 ", "assignment", "0|1", a2bool, "%d", bool2i, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100187 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100188 "Enable or disable in-call channel re-assignment" HO_CFG_STR_2 \
189 "Disable in-call assignment\n" \
190 "Enable in-call assignment\n") \
191 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100192 HO_CFG_ONE_MEMBER(bool, hodec2_full_tdma, subset, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100193 "handover2 ", "tdma-measurement", "full|subset", a2tdma, "%s", tdma2a, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100194 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100195 "Define measurement set of TDMA frames" HO_CFG_STR_2 \
196 "Full set of 102/104 TDMA frames\n" \
197 "Sub set of 4 TDMA frames (SACCH)\n") \
198 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100199 HO_CFG_ONE_MEMBER(int, hodec2_min_rxlev, -100, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100200 "handover2 ", "min rxlev", "<-110--50>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100201 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100202 HO_CFG_STR_MIN \
203 "How weak may RxLev of an MS become before triggering HO\n" \
204 "minimum RxLev (dBm)\n") \
205 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100206 HO_CFG_ONE_MEMBER(int, hodec2_min_rxqual, 5, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100207 "handover2 ", "min rxqual", "<0-7>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100208 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100209 HO_CFG_STR_MIN \
210 "How bad may RxQual of an MS become before triggering HO\n" \
211 "minimum RxQual (dBm)\n") \
212 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100213 HO_CFG_ONE_MEMBER(int, hodec2_afs_bias_rxlev, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100214 "handover2 ", "afs-bias rxlev", "<0-20>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100215 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100216 HO_CFG_STR_AFS_BIAS \
217 "RxLev improvement bias for AFS over other codecs\n" \
218 "Virtual RxLev improvement (dBm)\n") \
219 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100220 HO_CFG_ONE_MEMBER(int, hodec2_afs_bias_rxqual, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100221 "handover2 ", "afs-bias rxqual", "<0-7>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100222 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100223 HO_CFG_STR_AFS_BIAS \
224 "RxQual improvement bias for AFS over other codecs\n" \
225 "Virtual RxQual improvement (dBm)\n") \
226 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100227 HO_CFG_ONE_MEMBER(int, hodec2_tchf_min_slots, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100228 "handover2 ", "min-free-slots tch/f", "<0-9999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100229 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100230 HO_CFG_STR_MIN_TCH \
231 "Minimum free TCH/F timeslots before cell is considered congested\n" \
232 "Number of TCH/F slots\n") \
233 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100234 HO_CFG_ONE_MEMBER(int, hodec2_tchh_min_slots, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100235 "handover2 ", "min-free-slots tch/h", "<0-9999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100236 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100237 HO_CFG_STR_MIN_TCH \
238 "Minimum free TCH/H timeslots before cell is considered congested\n" \
239 "Number of TCH/H slots\n") \
240 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100241 HO_CFG_ONE_MEMBER(int, hodec2_ho_max, 9999, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100242 "handover2 ", "max-handovers", "<1-9999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100243 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100244 "Maximum number of concurrent handovers allowed per cell" HO_CFG_STR_2 \
245 "Number\n") \
246 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100247 HO_CFG_ONE_MEMBER(int, hodec2_penalty_max_dist, 300, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100248 "handover2 ", "penalty-time max-distance", "<0-99999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100249 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100250 HO_CFG_STR_PENALTY_TIME \
251 "Time to suspend handovers after leaving this cell due to exceeding max distance\n" \
252 "Seconds\n") \
253 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100254 HO_CFG_ONE_MEMBER(int, hodec2_penalty_failed_ho, 60, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100255 "handover2 ", "penalty-time failed-ho", "<0-99999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100256 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100257 HO_CFG_STR_PENALTY_TIME \
258 "Time to suspend handovers after handover failure to this cell\n" \
259 "Seconds\n") \
260 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100261 HO_CFG_ONE_MEMBER(int, hodec2_penalty_failed_as, 60, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100262 "handover2 ", "penalty-time failed-assignment", "<0-99999>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100263 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100264 HO_CFG_STR_PENALTY_TIME \
265 "Time to suspend handovers after assignment failure in this cell\n" \
266 "Seconds\n") \
267 \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100268 HO_CFG_ONE_MEMBER(int, hodec2_retries, 0, \
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100269 "handover2 ", "retries", "<0-9>", atoi, "%d", as_is, \
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100270 HO_CFG_STR_HANDOVER2 \
Neels Hofmeyr87b5eb62017-12-07 01:55:58 +0100271 "Immediately retry on handover/assignment failure" HO_CFG_STR_2 \
272 "Number of retries\n") \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100273
Neels Hofmeyrdd42eb92018-02-14 19:56:23 +0100274#define HO_CFG_ALL_MEMBERS \
275 HO_GENERAL_CFG_ALL_MEMBERS \
276 HODEC1_CFG_ALL_MEMBERS \
277 HODEC2_CFG_ALL_MEMBERS \
278
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100279
280/* Declare public API for handover cfg parameters... */
281
Neels Hofmeyr444f9e22018-02-15 03:59:17 +0100282#define HO_CFG_ONE_MEMBER(TYPE, NAME, DEFAULT_VAL, VTY0, VTY1, VTY2, VTY3, VTY4, VTY5, VTY6) \
Neels Hofmeyre25018b2017-11-27 21:29:33 +0100283 TYPE ho_get_##NAME(struct handover_cfg *ho); \
284 void ho_set_##NAME(struct handover_cfg *ho, TYPE val); \
285 bool ho_isset_##NAME(struct handover_cfg *ho); \
286 void ho_clear_##NAME(struct handover_cfg *ho); \
287 bool ho_isset_on_parent_##NAME(struct handover_cfg *ho);
288
289HO_CFG_ALL_MEMBERS
290#undef HO_CFG_ONE_MEMBER