[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-483] Memeory related fix in FDD and TDD mode
[o-du/l2.git] / src / codec_utils / RRC / MeasResultEUTRA.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 "MeasResultEUTRA.h"
9
10 #include "MultiBandInfoListEUTRA.h"
11 #include "CellAccessRelatedInfo-EUTRA-EPC.h"
12 #include "CellAccessRelatedInfo-EUTRA-5GC.h"
13 static int
14 memb_cgi_info_EPC_list_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr,
15                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
16         size_t size;
17         
18         if(!sptr) {
19                 ASN__CTFAIL(app_key, td, sptr,
20                         "%s: value not given (%s:%d)",
21                         td->name, __FILE__, __LINE__);
22                 return -1;
23         }
24         
25         /* Determine the number of elements */
26         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
27         
28         if((size >= 1 && size <= 12)) {
29                 /* Perform validation of the inner elements */
30                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
31         } else {
32                 ASN__CTFAIL(app_key, td, sptr,
33                         "%s: constraint failed (%s:%d)",
34                         td->name, __FILE__, __LINE__);
35                 return -1;
36         }
37 }
38
39 /*
40  * This type is implemented using NativeEnumerated,
41  * so here we adjust the DEF accordingly.
42  */
43 static int
44 memb_cgi_info_5GC_constraint_4(const asn_TYPE_descriptor_t *td, const void *sptr,
45                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
46         size_t size;
47         
48         if(!sptr) {
49                 ASN__CTFAIL(app_key, td, sptr,
50                         "%s: value not given (%s:%d)",
51                         td->name, __FILE__, __LINE__);
52                 return -1;
53         }
54         
55         /* Determine the number of elements */
56         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
57         
58         if((size >= 1 && size <= 12)) {
59                 /* Perform validation of the inner elements */
60                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
61         } else {
62                 ASN__CTFAIL(app_key, td, sptr,
63                         "%s: constraint failed (%s:%d)",
64                         td->name, __FILE__, __LINE__);
65                 return -1;
66         }
67 }
68
69 static asn_oer_constraints_t asn_OER_type_cgi_info_EPC_list_constr_7 CC_NOTUSED = {
70         { 0, 0 },
71         -1      /* (SIZE(1..12)) */};
72 static asn_per_constraints_t asn_PER_type_cgi_info_EPC_list_constr_7 CC_NOTUSED = {
73         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
74         { APC_CONSTRAINED,       4,  4,  1,  12 }       /* (SIZE(1..12)) */,
75         0, 0    /* No PER value map */
76 };
77 static asn_oer_constraints_t asn_OER_memb_cgi_info_EPC_list_constr_7 CC_NOTUSED = {
78         { 0, 0 },
79         -1      /* (SIZE(1..12)) */};
80 static asn_per_constraints_t asn_PER_memb_cgi_info_EPC_list_constr_7 CC_NOTUSED = {
81         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
82         { APC_CONSTRAINED,       4,  4,  1,  12 }       /* (SIZE(1..12)) */,
83         0, 0    /* No PER value map */
84 };
85 static asn_oer_constraints_t asn_OER_type_cgi_info_5GC_constr_9 CC_NOTUSED = {
86         { 0, 0 },
87         -1      /* (SIZE(1..12)) */};
88 static asn_per_constraints_t asn_PER_type_cgi_info_5GC_constr_9 CC_NOTUSED = {
89         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
90         { APC_CONSTRAINED,       4,  4,  1,  12 }       /* (SIZE(1..12)) */,
91         0, 0    /* No PER value map */
92 };
93 static asn_oer_constraints_t asn_OER_type_freqBandIndicatorPriority_constr_13 CC_NOTUSED = {
94         { 0, 0 },
95         -1};
96 static asn_per_constraints_t asn_PER_type_freqBandIndicatorPriority_constr_13 CC_NOTUSED = {
97         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
98         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
99         0, 0    /* No PER value map */
100 };
101 static asn_oer_constraints_t asn_OER_memb_cgi_info_5GC_constr_9 CC_NOTUSED = {
102         { 0, 0 },
103         -1      /* (SIZE(1..12)) */};
104 static asn_per_constraints_t asn_PER_memb_cgi_info_5GC_constr_9 CC_NOTUSED = {
105         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
106         { APC_CONSTRAINED,       4,  4,  1,  12 }       /* (SIZE(1..12)) */,
107         0, 0    /* No PER value map */
108 };
109 static asn_TYPE_member_t asn_MBR_cgi_info_EPC_list_7[] = {
110         { ATF_POINTER, 0, 0,
111                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
112                 0,
113                 &asn_DEF_CellAccessRelatedInfo_EUTRA_EPC,
114                 0,
115                 { 0, 0, 0 },
116                 0, 0, /* No default value */
117                 ""
118                 },
119 };
120 static const ber_tlv_tag_t asn_DEF_cgi_info_EPC_list_tags_7[] = {
121         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
122         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
123 };
124 static asn_SET_OF_specifics_t asn_SPC_cgi_info_EPC_list_specs_7 = {
125         sizeof(struct MeasResultEUTRA__cgi_Info__cgi_info_EPC__cgi_info_EPC_list),
126         offsetof(struct MeasResultEUTRA__cgi_Info__cgi_info_EPC__cgi_info_EPC_list, _asn_ctx),
127         0,      /* XER encoding is XMLDelimitedItemList */
128 };
129 static /* Use -fall-defs-global to expose */
130 asn_TYPE_descriptor_t asn_DEF_cgi_info_EPC_list_7 = {
131         "cgi-info-EPC-list",
132         "cgi-info-EPC-list",
133         &asn_OP_SEQUENCE_OF,
134         asn_DEF_cgi_info_EPC_list_tags_7,
135         sizeof(asn_DEF_cgi_info_EPC_list_tags_7)
136                 /sizeof(asn_DEF_cgi_info_EPC_list_tags_7[0]) - 1, /* 1 */
137         asn_DEF_cgi_info_EPC_list_tags_7,       /* Same as above */
138         sizeof(asn_DEF_cgi_info_EPC_list_tags_7)
139                 /sizeof(asn_DEF_cgi_info_EPC_list_tags_7[0]), /* 2 */
140         { &asn_OER_type_cgi_info_EPC_list_constr_7, &asn_PER_type_cgi_info_EPC_list_constr_7, SEQUENCE_OF_constraint },
141         asn_MBR_cgi_info_EPC_list_7,
142         1,      /* Single element */
143         &asn_SPC_cgi_info_EPC_list_specs_7      /* Additional specs */
144 };
145
146 static asn_TYPE_member_t asn_MBR_cgi_info_EPC_5[] = {
147         { ATF_NOFLAGS, 0, offsetof(struct MeasResultEUTRA__cgi_Info__cgi_info_EPC, cgi_info_EPC_legacy),
148                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
149                 -1,     /* IMPLICIT tag at current level */
150                 &asn_DEF_CellAccessRelatedInfo_EUTRA_EPC,
151                 0,
152                 { 0, 0, 0 },
153                 0, 0, /* No default value */
154                 "cgi-info-EPC-legacy"
155                 },
156         { ATF_POINTER, 1, offsetof(struct MeasResultEUTRA__cgi_Info__cgi_info_EPC, cgi_info_EPC_list),
157                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
158                 0,
159                 &asn_DEF_cgi_info_EPC_list_7,
160                 0,
161                 { &asn_OER_memb_cgi_info_EPC_list_constr_7, &asn_PER_memb_cgi_info_EPC_list_constr_7,  memb_cgi_info_EPC_list_constraint_5 },
162                 0, 0, /* No default value */
163                 "cgi-info-EPC-list"
164                 },
165 };
166 static const int asn_MAP_cgi_info_EPC_oms_5[] = { 1 };
167 static const ber_tlv_tag_t asn_DEF_cgi_info_EPC_tags_5[] = {
168         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
169         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
170 };
171 static const asn_TYPE_tag2member_t asn_MAP_cgi_info_EPC_tag2el_5[] = {
172     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cgi-info-EPC-legacy */
173     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cgi-info-EPC-list */
174 };
175 static asn_SEQUENCE_specifics_t asn_SPC_cgi_info_EPC_specs_5 = {
176         sizeof(struct MeasResultEUTRA__cgi_Info__cgi_info_EPC),
177         offsetof(struct MeasResultEUTRA__cgi_Info__cgi_info_EPC, _asn_ctx),
178         asn_MAP_cgi_info_EPC_tag2el_5,
179         2,      /* Count of tags in the map */
180         asn_MAP_cgi_info_EPC_oms_5,     /* Optional members */
181         1, 0,   /* Root/Additions */
182         -1,     /* First extension addition */
183 };
184 static /* Use -fall-defs-global to expose */
185 asn_TYPE_descriptor_t asn_DEF_cgi_info_EPC_5 = {
186         "cgi-info-EPC",
187         "cgi-info-EPC",
188         &asn_OP_SEQUENCE,
189         asn_DEF_cgi_info_EPC_tags_5,
190         sizeof(asn_DEF_cgi_info_EPC_tags_5)
191                 /sizeof(asn_DEF_cgi_info_EPC_tags_5[0]) - 1, /* 1 */
192         asn_DEF_cgi_info_EPC_tags_5,    /* Same as above */
193         sizeof(asn_DEF_cgi_info_EPC_tags_5)
194                 /sizeof(asn_DEF_cgi_info_EPC_tags_5[0]), /* 2 */
195         { 0, 0, SEQUENCE_constraint },
196         asn_MBR_cgi_info_EPC_5,
197         2,      /* Elements count */
198         &asn_SPC_cgi_info_EPC_specs_5   /* Additional specs */
199 };
200
201 static asn_TYPE_member_t asn_MBR_cgi_info_5GC_9[] = {
202         { ATF_POINTER, 0, 0,
203                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
204                 0,
205                 &asn_DEF_CellAccessRelatedInfo_EUTRA_5GC,
206                 0,
207                 { 0, 0, 0 },
208                 0, 0, /* No default value */
209                 ""
210                 },
211 };
212 static const ber_tlv_tag_t asn_DEF_cgi_info_5GC_tags_9[] = {
213         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
214         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
215 };
216 static asn_SET_OF_specifics_t asn_SPC_cgi_info_5GC_specs_9 = {
217         sizeof(struct MeasResultEUTRA__cgi_Info__cgi_info_5GC),
218         offsetof(struct MeasResultEUTRA__cgi_Info__cgi_info_5GC, _asn_ctx),
219         0,      /* XER encoding is XMLDelimitedItemList */
220 };
221 static /* Use -fall-defs-global to expose */
222 asn_TYPE_descriptor_t asn_DEF_cgi_info_5GC_9 = {
223         "cgi-info-5GC",
224         "cgi-info-5GC",
225         &asn_OP_SEQUENCE_OF,
226         asn_DEF_cgi_info_5GC_tags_9,
227         sizeof(asn_DEF_cgi_info_5GC_tags_9)
228                 /sizeof(asn_DEF_cgi_info_5GC_tags_9[0]) - 1, /* 1 */
229         asn_DEF_cgi_info_5GC_tags_9,    /* Same as above */
230         sizeof(asn_DEF_cgi_info_5GC_tags_9)
231                 /sizeof(asn_DEF_cgi_info_5GC_tags_9[0]), /* 2 */
232         { &asn_OER_type_cgi_info_5GC_constr_9, &asn_PER_type_cgi_info_5GC_constr_9, SEQUENCE_OF_constraint },
233         asn_MBR_cgi_info_5GC_9,
234         1,      /* Single element */
235         &asn_SPC_cgi_info_5GC_specs_9   /* Additional specs */
236 };
237
238 static const asn_INTEGER_enum_map_t asn_MAP_freqBandIndicatorPriority_value2enum_13[] = {
239         { 0,    4,      "true" }
240 };
241 static const unsigned int asn_MAP_freqBandIndicatorPriority_enum2value_13[] = {
242         0       /* true(0) */
243 };
244 static const asn_INTEGER_specifics_t asn_SPC_freqBandIndicatorPriority_specs_13 = {
245         asn_MAP_freqBandIndicatorPriority_value2enum_13,        /* "tag" => N; sorted by tag */
246         asn_MAP_freqBandIndicatorPriority_enum2value_13,        /* N => "tag"; sorted by N */
247         1,      /* Number of elements in the maps */
248         0,      /* Enumeration is not extensible */
249         1,      /* Strict enumeration */
250         0,      /* Native long size */
251         0
252 };
253 static const ber_tlv_tag_t asn_DEF_freqBandIndicatorPriority_tags_13[] = {
254         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
255         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
256 };
257 static /* Use -fall-defs-global to expose */
258 asn_TYPE_descriptor_t asn_DEF_freqBandIndicatorPriority_13 = {
259         "freqBandIndicatorPriority",
260         "freqBandIndicatorPriority",
261         &asn_OP_NativeEnumerated,
262         asn_DEF_freqBandIndicatorPriority_tags_13,
263         sizeof(asn_DEF_freqBandIndicatorPriority_tags_13)
264                 /sizeof(asn_DEF_freqBandIndicatorPriority_tags_13[0]) - 1, /* 1 */
265         asn_DEF_freqBandIndicatorPriority_tags_13,      /* Same as above */
266         sizeof(asn_DEF_freqBandIndicatorPriority_tags_13)
267                 /sizeof(asn_DEF_freqBandIndicatorPriority_tags_13[0]), /* 2 */
268         { &asn_OER_type_freqBandIndicatorPriority_constr_13, &asn_PER_type_freqBandIndicatorPriority_constr_13, NativeEnumerated_constraint },
269         0, 0,   /* Defined elsewhere */
270         &asn_SPC_freqBandIndicatorPriority_specs_13     /* Additional specs */
271 };
272
273 static asn_TYPE_member_t asn_MBR_cgi_Info_4[] = {
274         { ATF_POINTER, 2, offsetof(struct MeasResultEUTRA__cgi_Info, cgi_info_EPC),
275                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
276                 0,
277                 &asn_DEF_cgi_info_EPC_5,
278                 0,
279                 { 0, 0, 0 },
280                 0, 0, /* No default value */
281                 "cgi-info-EPC"
282                 },
283         { ATF_POINTER, 1, offsetof(struct MeasResultEUTRA__cgi_Info, cgi_info_5GC),
284                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
285                 0,
286                 &asn_DEF_cgi_info_5GC_9,
287                 0,
288                 { &asn_OER_memb_cgi_info_5GC_constr_9, &asn_PER_memb_cgi_info_5GC_constr_9,  memb_cgi_info_5GC_constraint_4 },
289                 0, 0, /* No default value */
290                 "cgi-info-5GC"
291                 },
292         { ATF_NOFLAGS, 0, offsetof(struct MeasResultEUTRA__cgi_Info, freqBandIndicator),
293                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
294                 -1,     /* IMPLICIT tag at current level */
295                 &asn_DEF_FreqBandIndicatorEUTRA,
296                 0,
297                 { 0, 0, 0 },
298                 0, 0, /* No default value */
299                 "freqBandIndicator"
300                 },
301         { ATF_POINTER, 2, offsetof(struct MeasResultEUTRA__cgi_Info, multiBandInfoList),
302                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
303                 -1,     /* IMPLICIT tag at current level */
304                 &asn_DEF_MultiBandInfoListEUTRA,
305                 0,
306                 { 0, 0, 0 },
307                 0, 0, /* No default value */
308                 "multiBandInfoList"
309                 },
310         { ATF_POINTER, 1, offsetof(struct MeasResultEUTRA__cgi_Info, freqBandIndicatorPriority),
311                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
312                 -1,     /* IMPLICIT tag at current level */
313                 &asn_DEF_freqBandIndicatorPriority_13,
314                 0,
315                 { 0, 0, 0 },
316                 0, 0, /* No default value */
317                 "freqBandIndicatorPriority"
318                 },
319 };
320 static const int asn_MAP_cgi_Info_oms_4[] = { 0, 1, 3, 4 };
321 static const ber_tlv_tag_t asn_DEF_cgi_Info_tags_4[] = {
322         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
323         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
324 };
325 static const asn_TYPE_tag2member_t asn_MAP_cgi_Info_tag2el_4[] = {
326     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cgi-info-EPC */
327     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cgi-info-5GC */
328     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* freqBandIndicator */
329     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* multiBandInfoList */
330     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* freqBandIndicatorPriority */
331 };
332 static asn_SEQUENCE_specifics_t asn_SPC_cgi_Info_specs_4 = {
333         sizeof(struct MeasResultEUTRA__cgi_Info),
334         offsetof(struct MeasResultEUTRA__cgi_Info, _asn_ctx),
335         asn_MAP_cgi_Info_tag2el_4,
336         5,      /* Count of tags in the map */
337         asn_MAP_cgi_Info_oms_4, /* Optional members */
338         4, 0,   /* Root/Additions */
339         -1,     /* First extension addition */
340 };
341 static /* Use -fall-defs-global to expose */
342 asn_TYPE_descriptor_t asn_DEF_cgi_Info_4 = {
343         "cgi-Info",
344         "cgi-Info",
345         &asn_OP_SEQUENCE,
346         asn_DEF_cgi_Info_tags_4,
347         sizeof(asn_DEF_cgi_Info_tags_4)
348                 /sizeof(asn_DEF_cgi_Info_tags_4[0]) - 1, /* 1 */
349         asn_DEF_cgi_Info_tags_4,        /* Same as above */
350         sizeof(asn_DEF_cgi_Info_tags_4)
351                 /sizeof(asn_DEF_cgi_Info_tags_4[0]), /* 2 */
352         { 0, 0, SEQUENCE_constraint },
353         asn_MBR_cgi_Info_4,
354         5,      /* Elements count */
355         &asn_SPC_cgi_Info_specs_4       /* Additional specs */
356 };
357
358 asn_TYPE_member_t asn_MBR_MeasResultEUTRA_1[] = {
359         { ATF_NOFLAGS, 0, offsetof(struct MeasResultEUTRA, eutra_PhysCellId),
360                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
361                 -1,     /* IMPLICIT tag at current level */
362                 &asn_DEF_PhysCellId,
363                 0,
364                 { 0, 0, 0 },
365                 0, 0, /* No default value */
366                 "eutra-PhysCellId"
367                 },
368         { ATF_NOFLAGS, 0, offsetof(struct MeasResultEUTRA, measResult),
369                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
370                 -1,     /* IMPLICIT tag at current level */
371                 &asn_DEF_MeasQuantityResultsEUTRA,
372                 0,
373                 { 0, 0, 0 },
374                 0, 0, /* No default value */
375                 "measResult"
376                 },
377         { ATF_POINTER, 1, offsetof(struct MeasResultEUTRA, cgi_Info),
378                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
379                 0,
380                 &asn_DEF_cgi_Info_4,
381                 0,
382                 { 0, 0, 0 },
383                 0, 0, /* No default value */
384                 "cgi-Info"
385                 },
386 };
387 static const int asn_MAP_MeasResultEUTRA_oms_1[] = { 2 };
388 static const ber_tlv_tag_t asn_DEF_MeasResultEUTRA_tags_1[] = {
389         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
390 };
391 static const asn_TYPE_tag2member_t asn_MAP_MeasResultEUTRA_tag2el_1[] = {
392     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eutra-PhysCellId */
393     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* measResult */
394     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* cgi-Info */
395 };
396 asn_SEQUENCE_specifics_t asn_SPC_MeasResultEUTRA_specs_1 = {
397         sizeof(struct MeasResultEUTRA),
398         offsetof(struct MeasResultEUTRA, _asn_ctx),
399         asn_MAP_MeasResultEUTRA_tag2el_1,
400         3,      /* Count of tags in the map */
401         asn_MAP_MeasResultEUTRA_oms_1,  /* Optional members */
402         1, 0,   /* Root/Additions */
403         3,      /* First extension addition */
404 };
405 asn_TYPE_descriptor_t asn_DEF_MeasResultEUTRA = {
406         "MeasResultEUTRA",
407         "MeasResultEUTRA",
408         &asn_OP_SEQUENCE,
409         asn_DEF_MeasResultEUTRA_tags_1,
410         sizeof(asn_DEF_MeasResultEUTRA_tags_1)
411                 /sizeof(asn_DEF_MeasResultEUTRA_tags_1[0]), /* 1 */
412         asn_DEF_MeasResultEUTRA_tags_1, /* Same as above */
413         sizeof(asn_DEF_MeasResultEUTRA_tags_1)
414                 /sizeof(asn_DEF_MeasResultEUTRA_tags_1[0]), /* 1 */
415         { 0, 0, SEQUENCE_constraint },
416         asn_MBR_MeasResultEUTRA_1,
417         3,      /* Elements count */
418         &asn_SPC_MeasResultEUTRA_specs_1        /* Additional specs */
419 };
420