[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-483] Memeory related fix in FDD and TDD mode
[o-du/l2.git] / src / codec_utils / RRC / InterFreqCarrierFreqInfo.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "../ASN1_Input/rrc_15_3_asn.asn1"
5  *      `asn1c -D ../RRC_output_14Nov/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER`
6  */
7
8 #include "InterFreqCarrierFreqInfo.h"
9
10 #include "MultiFrequencyBandListNR-SIB.h"
11 #include "ThresholdNR.h"
12 #include "SSB-MTC.h"
13 #include "SSB-ToMeasure.h"
14 #include "SS-RSSI-Measurement.h"
15 #include "SpeedStateScaleFactors.h"
16 #include "InterFreqNeighCellList.h"
17 #include "InterFreqBlackCellList.h"
18 static int
19 memb_nrofSS_BlocksToAverage_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
20                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
21         long value;
22         
23         if(!sptr) {
24                 ASN__CTFAIL(app_key, td, sptr,
25                         "%s: value not given (%s:%d)",
26                         td->name, __FILE__, __LINE__);
27                 return -1;
28         }
29         
30         value = *(const long *)sptr;
31         
32         if((value >= 2 && value <= 16)) {
33                 /* Constraint check succeeded */
34                 return 0;
35         } else {
36                 ASN__CTFAIL(app_key, td, sptr,
37                         "%s: constraint failed (%s:%d)",
38                         td->name, __FILE__, __LINE__);
39                 return -1;
40         }
41 }
42
43 static asn_oer_constraints_t asn_OER_memb_nrofSS_BlocksToAverage_constr_5 CC_NOTUSED = {
44         { 1, 1 }        /* (2..16) */,
45         -1};
46 static asn_per_constraints_t asn_PER_memb_nrofSS_BlocksToAverage_constr_5 CC_NOTUSED = {
47         { APC_CONSTRAINED,       4,  4,  2,  16 }       /* (2..16) */,
48         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
49         0, 0    /* No PER value map */
50 };
51 static asn_TYPE_member_t asn_MBR_threshX_Q_20[] = {
52         { ATF_NOFLAGS, 0, offsetof(struct InterFreqCarrierFreqInfo__threshX_Q, threshX_HighQ),
53                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
54                 -1,     /* IMPLICIT tag at current level */
55                 &asn_DEF_ReselectionThresholdQ,
56                 0,
57                 { 0, 0, 0 },
58                 0, 0, /* No default value */
59                 "threshX-HighQ"
60                 },
61         { ATF_NOFLAGS, 0, offsetof(struct InterFreqCarrierFreqInfo__threshX_Q, threshX_LowQ),
62                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
63                 -1,     /* IMPLICIT tag at current level */
64                 &asn_DEF_ReselectionThresholdQ,
65                 0,
66                 { 0, 0, 0 },
67                 0, 0, /* No default value */
68                 "threshX-LowQ"
69                 },
70 };
71 static const ber_tlv_tag_t asn_DEF_threshX_Q_tags_20[] = {
72         (ASN_TAG_CLASS_CONTEXT | (18 << 2)),
73         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
74 };
75 static const asn_TYPE_tag2member_t asn_MAP_threshX_Q_tag2el_20[] = {
76     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* threshX-HighQ */
77     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* threshX-LowQ */
78 };
79 static asn_SEQUENCE_specifics_t asn_SPC_threshX_Q_specs_20 = {
80         sizeof(struct InterFreqCarrierFreqInfo__threshX_Q),
81         offsetof(struct InterFreqCarrierFreqInfo__threshX_Q, _asn_ctx),
82         asn_MAP_threshX_Q_tag2el_20,
83         2,      /* Count of tags in the map */
84         0, 0, 0,        /* Optional elements (not needed) */
85         -1,     /* First extension addition */
86 };
87 static /* Use -fall-defs-global to expose */
88 asn_TYPE_descriptor_t asn_DEF_threshX_Q_20 = {
89         "threshX-Q",
90         "threshX-Q",
91         &asn_OP_SEQUENCE,
92         asn_DEF_threshX_Q_tags_20,
93         sizeof(asn_DEF_threshX_Q_tags_20)
94                 /sizeof(asn_DEF_threshX_Q_tags_20[0]) - 1, /* 1 */
95         asn_DEF_threshX_Q_tags_20,      /* Same as above */
96         sizeof(asn_DEF_threshX_Q_tags_20)
97                 /sizeof(asn_DEF_threshX_Q_tags_20[0]), /* 2 */
98         { 0, 0, SEQUENCE_constraint },
99         asn_MBR_threshX_Q_20,
100         2,      /* Elements count */
101         &asn_SPC_threshX_Q_specs_20     /* Additional specs */
102 };
103
104 static int asn_DFL_25_cmp_15(const void *sptr) {
105         const Q_OffsetRange_t *st = sptr;
106         
107         if(!st) {
108                 return -1; /* No value is not a default value */
109         }
110         
111         /* Test default value 15 */
112         return (*st != 15);
113 }
114 static int asn_DFL_25_set_15(void **sptr) {
115         Q_OffsetRange_t *st = *sptr;
116         
117         if(!st) {
118                 st = (*sptr = CALLOC(1, sizeof(*st)));
119                 if(!st) return -1;
120         }
121         
122         /* Install default value 15 */
123         *st = 15;
124         return 0;
125 }
126 asn_TYPE_member_t asn_MBR_InterFreqCarrierFreqInfo_1[] = {
127         { ATF_NOFLAGS, 0, offsetof(struct InterFreqCarrierFreqInfo, dl_CarrierFreq),
128                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
129                 -1,     /* IMPLICIT tag at current level */
130                 &asn_DEF_ARFCN_ValueNR,
131                 0,
132                 { 0, 0, 0 },
133                 0, 0, /* No default value */
134                 "dl-CarrierFreq"
135                 },
136         { ATF_POINTER, 5, offsetof(struct InterFreqCarrierFreqInfo, frequencyBandList),
137                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
138                 -1,     /* IMPLICIT tag at current level */
139                 &asn_DEF_MultiFrequencyBandListNR_SIB,
140                 0,
141                 { 0, 0, 0 },
142                 0, 0, /* No default value */
143                 "frequencyBandList"
144                 },
145         { ATF_POINTER, 4, offsetof(struct InterFreqCarrierFreqInfo, frequencyBandListSUL),
146                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
147                 -1,     /* IMPLICIT tag at current level */
148                 &asn_DEF_MultiFrequencyBandListNR_SIB,
149                 0,
150                 { 0, 0, 0 },
151                 0, 0, /* No default value */
152                 "frequencyBandListSUL"
153                 },
154         { ATF_POINTER, 3, offsetof(struct InterFreqCarrierFreqInfo, nrofSS_BlocksToAverage),
155                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
156                 -1,     /* IMPLICIT tag at current level */
157                 &asn_DEF_NativeInteger,
158                 0,
159                 { &asn_OER_memb_nrofSS_BlocksToAverage_constr_5, &asn_PER_memb_nrofSS_BlocksToAverage_constr_5,  memb_nrofSS_BlocksToAverage_constraint_1 },
160                 0, 0, /* No default value */
161                 "nrofSS-BlocksToAverage"
162                 },
163         { ATF_POINTER, 2, offsetof(struct InterFreqCarrierFreqInfo, absThreshSS_BlocksConsolidation),
164                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
165                 -1,     /* IMPLICIT tag at current level */
166                 &asn_DEF_ThresholdNR,
167                 0,
168                 { 0, 0, 0 },
169                 0, 0, /* No default value */
170                 "absThreshSS-BlocksConsolidation"
171                 },
172         { ATF_POINTER, 1, offsetof(struct InterFreqCarrierFreqInfo, smtc),
173                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
174                 -1,     /* IMPLICIT tag at current level */
175                 &asn_DEF_SSB_MTC,
176                 0,
177                 { 0, 0, 0 },
178                 0, 0, /* No default value */
179                 "smtc"
180                 },
181         { ATF_NOFLAGS, 0, offsetof(struct InterFreqCarrierFreqInfo, ssbSubcarrierSpacing),
182                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
183                 -1,     /* IMPLICIT tag at current level */
184                 &asn_DEF_SubcarrierSpacing,
185                 0,
186                 { 0, 0, 0 },
187                 0, 0, /* No default value */
188                 "ssbSubcarrierSpacing"
189                 },
190         { ATF_POINTER, 1, offsetof(struct InterFreqCarrierFreqInfo, ssb_ToMeasure),
191                 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
192                 +1,     /* EXPLICIT tag at current level */
193                 &asn_DEF_SSB_ToMeasure,
194                 0,
195                 { 0, 0, 0 },
196                 0, 0, /* No default value */
197                 "ssb-ToMeasure"
198                 },
199         { ATF_NOFLAGS, 0, offsetof(struct InterFreqCarrierFreqInfo, deriveSSB_IndexFromCell),
200                 (ASN_TAG_CLASS_CONTEXT | (8 << 2)),
201                 -1,     /* IMPLICIT tag at current level */
202                 &asn_DEF_BOOLEAN,
203                 0,
204                 { 0, 0, 0 },
205                 0, 0, /* No default value */
206                 "deriveSSB-IndexFromCell"
207                 },
208         { ATF_POINTER, 1, offsetof(struct InterFreqCarrierFreqInfo, ss_RSSI_Measurement),
209                 (ASN_TAG_CLASS_CONTEXT | (9 << 2)),
210                 -1,     /* IMPLICIT tag at current level */
211                 &asn_DEF_SS_RSSI_Measurement,
212                 0,
213                 { 0, 0, 0 },
214                 0, 0, /* No default value */
215                 "ss-RSSI-Measurement"
216                 },
217         { ATF_NOFLAGS, 0, offsetof(struct InterFreqCarrierFreqInfo, q_RxLevMin),
218                 (ASN_TAG_CLASS_CONTEXT | (10 << 2)),
219                 -1,     /* IMPLICIT tag at current level */
220                 &asn_DEF_Q_RxLevMin,
221                 0,
222                 { 0, 0, 0 },
223                 0, 0, /* No default value */
224                 "q-RxLevMin"
225                 },
226         { ATF_POINTER, 3, offsetof(struct InterFreqCarrierFreqInfo, q_RxLevMinSUL),
227                 (ASN_TAG_CLASS_CONTEXT | (11 << 2)),
228                 -1,     /* IMPLICIT tag at current level */
229                 &asn_DEF_Q_RxLevMin,
230                 0,
231                 { 0, 0, 0 },
232                 0, 0, /* No default value */
233                 "q-RxLevMinSUL"
234                 },
235         { ATF_POINTER, 2, offsetof(struct InterFreqCarrierFreqInfo, q_QualMin),
236                 (ASN_TAG_CLASS_CONTEXT | (12 << 2)),
237                 -1,     /* IMPLICIT tag at current level */
238                 &asn_DEF_Q_QualMin,
239                 0,
240                 { 0, 0, 0 },
241                 0, 0, /* No default value */
242                 "q-QualMin"
243                 },
244         { ATF_POINTER, 1, offsetof(struct InterFreqCarrierFreqInfo, p_Max),
245                 (ASN_TAG_CLASS_CONTEXT | (13 << 2)),
246                 -1,     /* IMPLICIT tag at current level */
247                 &asn_DEF_P_Max,
248                 0,
249                 { 0, 0, 0 },
250                 0, 0, /* No default value */
251                 "p-Max"
252                 },
253         { ATF_NOFLAGS, 0, offsetof(struct InterFreqCarrierFreqInfo, t_ReselectionNR),
254                 (ASN_TAG_CLASS_CONTEXT | (14 << 2)),
255                 -1,     /* IMPLICIT tag at current level */
256                 &asn_DEF_T_Reselection,
257                 0,
258                 { 0, 0, 0 },
259                 0, 0, /* No default value */
260                 "t-ReselectionNR"
261                 },
262         { ATF_POINTER, 1, offsetof(struct InterFreqCarrierFreqInfo, t_ReselectionNR_SF),
263                 (ASN_TAG_CLASS_CONTEXT | (15 << 2)),
264                 -1,     /* IMPLICIT tag at current level */
265                 &asn_DEF_SpeedStateScaleFactors,
266                 0,
267                 { 0, 0, 0 },
268                 0, 0, /* No default value */
269                 "t-ReselectionNR-SF"
270                 },
271         { ATF_NOFLAGS, 0, offsetof(struct InterFreqCarrierFreqInfo, threshX_HighP),
272                 (ASN_TAG_CLASS_CONTEXT | (16 << 2)),
273                 -1,     /* IMPLICIT tag at current level */
274                 &asn_DEF_ReselectionThreshold,
275                 0,
276                 { 0, 0, 0 },
277                 0, 0, /* No default value */
278                 "threshX-HighP"
279                 },
280         { ATF_NOFLAGS, 0, offsetof(struct InterFreqCarrierFreqInfo, threshX_LowP),
281                 (ASN_TAG_CLASS_CONTEXT | (17 << 2)),
282                 -1,     /* IMPLICIT tag at current level */
283                 &asn_DEF_ReselectionThreshold,
284                 0,
285                 { 0, 0, 0 },
286                 0, 0, /* No default value */
287                 "threshX-LowP"
288                 },
289         { ATF_POINTER, 6, offsetof(struct InterFreqCarrierFreqInfo, threshX_Q),
290                 (ASN_TAG_CLASS_CONTEXT | (18 << 2)),
291                 0,
292                 &asn_DEF_threshX_Q_20,
293                 0,
294                 { 0, 0, 0 },
295                 0, 0, /* No default value */
296                 "threshX-Q"
297                 },
298         { ATF_POINTER, 5, offsetof(struct InterFreqCarrierFreqInfo, cellReselectionPriority),
299                 (ASN_TAG_CLASS_CONTEXT | (19 << 2)),
300                 -1,     /* IMPLICIT tag at current level */
301                 &asn_DEF_CellReselectionPriority,
302                 0,
303                 { 0, 0, 0 },
304                 0, 0, /* No default value */
305                 "cellReselectionPriority"
306                 },
307         { ATF_POINTER, 4, offsetof(struct InterFreqCarrierFreqInfo, cellReselectionSubPriority),
308                 (ASN_TAG_CLASS_CONTEXT | (20 << 2)),
309                 -1,     /* IMPLICIT tag at current level */
310                 &asn_DEF_CellReselectionSubPriority,
311                 0,
312                 { 0, 0, 0 },
313                 0, 0, /* No default value */
314                 "cellReselectionSubPriority"
315                 },
316         { ATF_POINTER, 3, offsetof(struct InterFreqCarrierFreqInfo, q_OffsetFreq),
317                 (ASN_TAG_CLASS_CONTEXT | (21 << 2)),
318                 -1,     /* IMPLICIT tag at current level */
319                 &asn_DEF_Q_OffsetRange,
320                 0,
321                 { 0, 0, 0 },
322                 &asn_DFL_25_cmp_15,     /* Compare DEFAULT 15 */
323                 &asn_DFL_25_set_15,     /* Set DEFAULT 15 */
324                 "q-OffsetFreq"
325                 },
326         { ATF_POINTER, 2, offsetof(struct InterFreqCarrierFreqInfo, interFreqNeighCellList),
327                 (ASN_TAG_CLASS_CONTEXT | (22 << 2)),
328                 -1,     /* IMPLICIT tag at current level */
329                 &asn_DEF_InterFreqNeighCellList,
330                 0,
331                 { 0, 0, 0 },
332                 0, 0, /* No default value */
333                 "interFreqNeighCellList"
334                 },
335         { ATF_POINTER, 1, offsetof(struct InterFreqCarrierFreqInfo, interFreqBlackCellList),
336                 (ASN_TAG_CLASS_CONTEXT | (23 << 2)),
337                 -1,     /* IMPLICIT tag at current level */
338                 &asn_DEF_InterFreqBlackCellList,
339                 0,
340                 { 0, 0, 0 },
341                 0, 0, /* No default value */
342                 "interFreqBlackCellList"
343                 },
344 };
345 static const int asn_MAP_InterFreqCarrierFreqInfo_oms_1[] = { 1, 2, 3, 4, 5, 7, 9, 11, 12, 13, 15, 18, 19, 20, 21, 22, 23 };
346 static const ber_tlv_tag_t asn_DEF_InterFreqCarrierFreqInfo_tags_1[] = {
347         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
348 };
349 static const asn_TYPE_tag2member_t asn_MAP_InterFreqCarrierFreqInfo_tag2el_1[] = {
350     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* dl-CarrierFreq */
351     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* frequencyBandList */
352     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* frequencyBandListSUL */
353     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* nrofSS-BlocksToAverage */
354     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* absThreshSS-BlocksConsolidation */
355     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* smtc */
356     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* ssbSubcarrierSpacing */
357     { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* ssb-ToMeasure */
358     { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* deriveSSB-IndexFromCell */
359     { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* ss-RSSI-Measurement */
360     { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* q-RxLevMin */
361     { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* q-RxLevMinSUL */
362     { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* q-QualMin */
363     { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 }, /* p-Max */
364     { (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 14, 0, 0 }, /* t-ReselectionNR */
365     { (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 15, 0, 0 }, /* t-ReselectionNR-SF */
366     { (ASN_TAG_CLASS_CONTEXT | (16 << 2)), 16, 0, 0 }, /* threshX-HighP */
367     { (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 17, 0, 0 }, /* threshX-LowP */
368     { (ASN_TAG_CLASS_CONTEXT | (18 << 2)), 18, 0, 0 }, /* threshX-Q */
369     { (ASN_TAG_CLASS_CONTEXT | (19 << 2)), 19, 0, 0 }, /* cellReselectionPriority */
370     { (ASN_TAG_CLASS_CONTEXT | (20 << 2)), 20, 0, 0 }, /* cellReselectionSubPriority */
371     { (ASN_TAG_CLASS_CONTEXT | (21 << 2)), 21, 0, 0 }, /* q-OffsetFreq */
372     { (ASN_TAG_CLASS_CONTEXT | (22 << 2)), 22, 0, 0 }, /* interFreqNeighCellList */
373     { (ASN_TAG_CLASS_CONTEXT | (23 << 2)), 23, 0, 0 } /* interFreqBlackCellList */
374 };
375 asn_SEQUENCE_specifics_t asn_SPC_InterFreqCarrierFreqInfo_specs_1 = {
376         sizeof(struct InterFreqCarrierFreqInfo),
377         offsetof(struct InterFreqCarrierFreqInfo, _asn_ctx),
378         asn_MAP_InterFreqCarrierFreqInfo_tag2el_1,
379         24,     /* Count of tags in the map */
380         asn_MAP_InterFreqCarrierFreqInfo_oms_1, /* Optional members */
381         17, 0,  /* Root/Additions */
382         24,     /* First extension addition */
383 };
384 asn_TYPE_descriptor_t asn_DEF_InterFreqCarrierFreqInfo = {
385         "InterFreqCarrierFreqInfo",
386         "InterFreqCarrierFreqInfo",
387         &asn_OP_SEQUENCE,
388         asn_DEF_InterFreqCarrierFreqInfo_tags_1,
389         sizeof(asn_DEF_InterFreqCarrierFreqInfo_tags_1)
390                 /sizeof(asn_DEF_InterFreqCarrierFreqInfo_tags_1[0]), /* 1 */
391         asn_DEF_InterFreqCarrierFreqInfo_tags_1,        /* Same as above */
392         sizeof(asn_DEF_InterFreqCarrierFreqInfo_tags_1)
393                 /sizeof(asn_DEF_InterFreqCarrierFreqInfo_tags_1[0]), /* 1 */
394         { 0, 0, SEQUENCE_constraint },
395         asn_MBR_InterFreqCarrierFreqInfo_1,
396         24,     /* Elements count */
397         &asn_SPC_InterFreqCarrierFreqInfo_specs_1       /* Additional specs */
398 };
399