[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-483] Memeory related fix in FDD and TDD mode
[o-du/l2.git] / src / codec_utils / RRC / FeatureSets.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 "FeatureSets.h"
9
10 #include "FeatureSetDownlink.h"
11 #include "FeatureSetDownlinkPerCC.h"
12 #include "FeatureSetUplink.h"
13 #include "FeatureSetUplinkPerCC.h"
14 static int
15 memb_featureSetsDownlink_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
16                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
17         size_t size;
18         
19         if(!sptr) {
20                 ASN__CTFAIL(app_key, td, sptr,
21                         "%s: value not given (%s:%d)",
22                         td->name, __FILE__, __LINE__);
23                 return -1;
24         }
25         
26         /* Determine the number of elements */
27         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
28         
29         if((size >= 1 && size <= 1024)) {
30                 /* Perform validation of the inner elements */
31                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
32         } else {
33                 ASN__CTFAIL(app_key, td, sptr,
34                         "%s: constraint failed (%s:%d)",
35                         td->name, __FILE__, __LINE__);
36                 return -1;
37         }
38 }
39
40 static int
41 memb_featureSetsDownlinkPerCC_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
42                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
43         size_t size;
44         
45         if(!sptr) {
46                 ASN__CTFAIL(app_key, td, sptr,
47                         "%s: value not given (%s:%d)",
48                         td->name, __FILE__, __LINE__);
49                 return -1;
50         }
51         
52         /* Determine the number of elements */
53         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
54         
55         if((size >= 1 && size <= 1024)) {
56                 /* Perform validation of the inner elements */
57                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
58         } else {
59                 ASN__CTFAIL(app_key, td, sptr,
60                         "%s: constraint failed (%s:%d)",
61                         td->name, __FILE__, __LINE__);
62                 return -1;
63         }
64 }
65
66 static int
67 memb_featureSetsUplink_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
68                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
69         size_t size;
70         
71         if(!sptr) {
72                 ASN__CTFAIL(app_key, td, sptr,
73                         "%s: value not given (%s:%d)",
74                         td->name, __FILE__, __LINE__);
75                 return -1;
76         }
77         
78         /* Determine the number of elements */
79         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
80         
81         if((size >= 1 && size <= 1024)) {
82                 /* Perform validation of the inner elements */
83                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
84         } else {
85                 ASN__CTFAIL(app_key, td, sptr,
86                         "%s: constraint failed (%s:%d)",
87                         td->name, __FILE__, __LINE__);
88                 return -1;
89         }
90 }
91
92 static int
93 memb_featureSetsUplinkPerCC_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
94                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
95         size_t size;
96         
97         if(!sptr) {
98                 ASN__CTFAIL(app_key, td, sptr,
99                         "%s: value not given (%s:%d)",
100                         td->name, __FILE__, __LINE__);
101                 return -1;
102         }
103         
104         /* Determine the number of elements */
105         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
106         
107         if((size >= 1 && size <= 1024)) {
108                 /* Perform validation of the inner elements */
109                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
110         } else {
111                 ASN__CTFAIL(app_key, td, sptr,
112                         "%s: constraint failed (%s:%d)",
113                         td->name, __FILE__, __LINE__);
114                 return -1;
115         }
116 }
117
118 static asn_oer_constraints_t asn_OER_type_featureSetsDownlink_constr_2 CC_NOTUSED = {
119         { 0, 0 },
120         -1      /* (SIZE(1..1024)) */};
121 static asn_per_constraints_t asn_PER_type_featureSetsDownlink_constr_2 CC_NOTUSED = {
122         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
123         { APC_CONSTRAINED,       10,  10,  1,  1024 }   /* (SIZE(1..1024)) */,
124         0, 0    /* No PER value map */
125 };
126 static asn_oer_constraints_t asn_OER_type_featureSetsDownlinkPerCC_constr_4 CC_NOTUSED = {
127         { 0, 0 },
128         -1      /* (SIZE(1..1024)) */};
129 static asn_per_constraints_t asn_PER_type_featureSetsDownlinkPerCC_constr_4 CC_NOTUSED = {
130         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
131         { APC_CONSTRAINED,       10,  10,  1,  1024 }   /* (SIZE(1..1024)) */,
132         0, 0    /* No PER value map */
133 };
134 static asn_oer_constraints_t asn_OER_type_featureSetsUplink_constr_6 CC_NOTUSED = {
135         { 0, 0 },
136         -1      /* (SIZE(1..1024)) */};
137 static asn_per_constraints_t asn_PER_type_featureSetsUplink_constr_6 CC_NOTUSED = {
138         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
139         { APC_CONSTRAINED,       10,  10,  1,  1024 }   /* (SIZE(1..1024)) */,
140         0, 0    /* No PER value map */
141 };
142 static asn_oer_constraints_t asn_OER_type_featureSetsUplinkPerCC_constr_8 CC_NOTUSED = {
143         { 0, 0 },
144         -1      /* (SIZE(1..1024)) */};
145 static asn_per_constraints_t asn_PER_type_featureSetsUplinkPerCC_constr_8 CC_NOTUSED = {
146         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
147         { APC_CONSTRAINED,       10,  10,  1,  1024 }   /* (SIZE(1..1024)) */,
148         0, 0    /* No PER value map */
149 };
150 static asn_oer_constraints_t asn_OER_memb_featureSetsDownlink_constr_2 CC_NOTUSED = {
151         { 0, 0 },
152         -1      /* (SIZE(1..1024)) */};
153 static asn_per_constraints_t asn_PER_memb_featureSetsDownlink_constr_2 CC_NOTUSED = {
154         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
155         { APC_CONSTRAINED,       10,  10,  1,  1024 }   /* (SIZE(1..1024)) */,
156         0, 0    /* No PER value map */
157 };
158 static asn_oer_constraints_t asn_OER_memb_featureSetsDownlinkPerCC_constr_4 CC_NOTUSED = {
159         { 0, 0 },
160         -1      /* (SIZE(1..1024)) */};
161 static asn_per_constraints_t asn_PER_memb_featureSetsDownlinkPerCC_constr_4 CC_NOTUSED = {
162         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
163         { APC_CONSTRAINED,       10,  10,  1,  1024 }   /* (SIZE(1..1024)) */,
164         0, 0    /* No PER value map */
165 };
166 static asn_oer_constraints_t asn_OER_memb_featureSetsUplink_constr_6 CC_NOTUSED = {
167         { 0, 0 },
168         -1      /* (SIZE(1..1024)) */};
169 static asn_per_constraints_t asn_PER_memb_featureSetsUplink_constr_6 CC_NOTUSED = {
170         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
171         { APC_CONSTRAINED,       10,  10,  1,  1024 }   /* (SIZE(1..1024)) */,
172         0, 0    /* No PER value map */
173 };
174 static asn_oer_constraints_t asn_OER_memb_featureSetsUplinkPerCC_constr_8 CC_NOTUSED = {
175         { 0, 0 },
176         -1      /* (SIZE(1..1024)) */};
177 static asn_per_constraints_t asn_PER_memb_featureSetsUplinkPerCC_constr_8 CC_NOTUSED = {
178         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
179         { APC_CONSTRAINED,       10,  10,  1,  1024 }   /* (SIZE(1..1024)) */,
180         0, 0    /* No PER value map */
181 };
182 static asn_TYPE_member_t asn_MBR_featureSetsDownlink_2[] = {
183         { ATF_POINTER, 0, 0,
184                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
185                 0,
186                 &asn_DEF_FeatureSetDownlink,
187                 0,
188                 { 0, 0, 0 },
189                 0, 0, /* No default value */
190                 ""
191                 },
192 };
193 static const ber_tlv_tag_t asn_DEF_featureSetsDownlink_tags_2[] = {
194         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
195         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
196 };
197 static asn_SET_OF_specifics_t asn_SPC_featureSetsDownlink_specs_2 = {
198         sizeof(struct FeatureSets__featureSetsDownlink),
199         offsetof(struct FeatureSets__featureSetsDownlink, _asn_ctx),
200         0,      /* XER encoding is XMLDelimitedItemList */
201 };
202 static /* Use -fall-defs-global to expose */
203 asn_TYPE_descriptor_t asn_DEF_featureSetsDownlink_2 = {
204         "featureSetsDownlink",
205         "featureSetsDownlink",
206         &asn_OP_SEQUENCE_OF,
207         asn_DEF_featureSetsDownlink_tags_2,
208         sizeof(asn_DEF_featureSetsDownlink_tags_2)
209                 /sizeof(asn_DEF_featureSetsDownlink_tags_2[0]) - 1, /* 1 */
210         asn_DEF_featureSetsDownlink_tags_2,     /* Same as above */
211         sizeof(asn_DEF_featureSetsDownlink_tags_2)
212                 /sizeof(asn_DEF_featureSetsDownlink_tags_2[0]), /* 2 */
213         { &asn_OER_type_featureSetsDownlink_constr_2, &asn_PER_type_featureSetsDownlink_constr_2, SEQUENCE_OF_constraint },
214         asn_MBR_featureSetsDownlink_2,
215         1,      /* Single element */
216         &asn_SPC_featureSetsDownlink_specs_2    /* Additional specs */
217 };
218
219 static asn_TYPE_member_t asn_MBR_featureSetsDownlinkPerCC_4[] = {
220         { ATF_POINTER, 0, 0,
221                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
222                 0,
223                 &asn_DEF_FeatureSetDownlinkPerCC,
224                 0,
225                 { 0, 0, 0 },
226                 0, 0, /* No default value */
227                 ""
228                 },
229 };
230 static const ber_tlv_tag_t asn_DEF_featureSetsDownlinkPerCC_tags_4[] = {
231         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
232         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
233 };
234 static asn_SET_OF_specifics_t asn_SPC_featureSetsDownlinkPerCC_specs_4 = {
235         sizeof(struct FeatureSets__featureSetsDownlinkPerCC),
236         offsetof(struct FeatureSets__featureSetsDownlinkPerCC, _asn_ctx),
237         0,      /* XER encoding is XMLDelimitedItemList */
238 };
239 static /* Use -fall-defs-global to expose */
240 asn_TYPE_descriptor_t asn_DEF_featureSetsDownlinkPerCC_4 = {
241         "featureSetsDownlinkPerCC",
242         "featureSetsDownlinkPerCC",
243         &asn_OP_SEQUENCE_OF,
244         asn_DEF_featureSetsDownlinkPerCC_tags_4,
245         sizeof(asn_DEF_featureSetsDownlinkPerCC_tags_4)
246                 /sizeof(asn_DEF_featureSetsDownlinkPerCC_tags_4[0]) - 1, /* 1 */
247         asn_DEF_featureSetsDownlinkPerCC_tags_4,        /* Same as above */
248         sizeof(asn_DEF_featureSetsDownlinkPerCC_tags_4)
249                 /sizeof(asn_DEF_featureSetsDownlinkPerCC_tags_4[0]), /* 2 */
250         { &asn_OER_type_featureSetsDownlinkPerCC_constr_4, &asn_PER_type_featureSetsDownlinkPerCC_constr_4, SEQUENCE_OF_constraint },
251         asn_MBR_featureSetsDownlinkPerCC_4,
252         1,      /* Single element */
253         &asn_SPC_featureSetsDownlinkPerCC_specs_4       /* Additional specs */
254 };
255
256 static asn_TYPE_member_t asn_MBR_featureSetsUplink_6[] = {
257         { ATF_POINTER, 0, 0,
258                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
259                 0,
260                 &asn_DEF_FeatureSetUplink,
261                 0,
262                 { 0, 0, 0 },
263                 0, 0, /* No default value */
264                 ""
265                 },
266 };
267 static const ber_tlv_tag_t asn_DEF_featureSetsUplink_tags_6[] = {
268         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
269         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
270 };
271 static asn_SET_OF_specifics_t asn_SPC_featureSetsUplink_specs_6 = {
272         sizeof(struct FeatureSets__featureSetsUplink),
273         offsetof(struct FeatureSets__featureSetsUplink, _asn_ctx),
274         0,      /* XER encoding is XMLDelimitedItemList */
275 };
276 static /* Use -fall-defs-global to expose */
277 asn_TYPE_descriptor_t asn_DEF_featureSetsUplink_6 = {
278         "featureSetsUplink",
279         "featureSetsUplink",
280         &asn_OP_SEQUENCE_OF,
281         asn_DEF_featureSetsUplink_tags_6,
282         sizeof(asn_DEF_featureSetsUplink_tags_6)
283                 /sizeof(asn_DEF_featureSetsUplink_tags_6[0]) - 1, /* 1 */
284         asn_DEF_featureSetsUplink_tags_6,       /* Same as above */
285         sizeof(asn_DEF_featureSetsUplink_tags_6)
286                 /sizeof(asn_DEF_featureSetsUplink_tags_6[0]), /* 2 */
287         { &asn_OER_type_featureSetsUplink_constr_6, &asn_PER_type_featureSetsUplink_constr_6, SEQUENCE_OF_constraint },
288         asn_MBR_featureSetsUplink_6,
289         1,      /* Single element */
290         &asn_SPC_featureSetsUplink_specs_6      /* Additional specs */
291 };
292
293 static asn_TYPE_member_t asn_MBR_featureSetsUplinkPerCC_8[] = {
294         { ATF_POINTER, 0, 0,
295                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
296                 0,
297                 &asn_DEF_FeatureSetUplinkPerCC,
298                 0,
299                 { 0, 0, 0 },
300                 0, 0, /* No default value */
301                 ""
302                 },
303 };
304 static const ber_tlv_tag_t asn_DEF_featureSetsUplinkPerCC_tags_8[] = {
305         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
306         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
307 };
308 static asn_SET_OF_specifics_t asn_SPC_featureSetsUplinkPerCC_specs_8 = {
309         sizeof(struct FeatureSets__featureSetsUplinkPerCC),
310         offsetof(struct FeatureSets__featureSetsUplinkPerCC, _asn_ctx),
311         0,      /* XER encoding is XMLDelimitedItemList */
312 };
313 static /* Use -fall-defs-global to expose */
314 asn_TYPE_descriptor_t asn_DEF_featureSetsUplinkPerCC_8 = {
315         "featureSetsUplinkPerCC",
316         "featureSetsUplinkPerCC",
317         &asn_OP_SEQUENCE_OF,
318         asn_DEF_featureSetsUplinkPerCC_tags_8,
319         sizeof(asn_DEF_featureSetsUplinkPerCC_tags_8)
320                 /sizeof(asn_DEF_featureSetsUplinkPerCC_tags_8[0]) - 1, /* 1 */
321         asn_DEF_featureSetsUplinkPerCC_tags_8,  /* Same as above */
322         sizeof(asn_DEF_featureSetsUplinkPerCC_tags_8)
323                 /sizeof(asn_DEF_featureSetsUplinkPerCC_tags_8[0]), /* 2 */
324         { &asn_OER_type_featureSetsUplinkPerCC_constr_8, &asn_PER_type_featureSetsUplinkPerCC_constr_8, SEQUENCE_OF_constraint },
325         asn_MBR_featureSetsUplinkPerCC_8,
326         1,      /* Single element */
327         &asn_SPC_featureSetsUplinkPerCC_specs_8 /* Additional specs */
328 };
329
330 asn_TYPE_member_t asn_MBR_FeatureSets_1[] = {
331         { ATF_POINTER, 4, offsetof(struct FeatureSets, featureSetsDownlink),
332                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
333                 0,
334                 &asn_DEF_featureSetsDownlink_2,
335                 0,
336                 { &asn_OER_memb_featureSetsDownlink_constr_2, &asn_PER_memb_featureSetsDownlink_constr_2,  memb_featureSetsDownlink_constraint_1 },
337                 0, 0, /* No default value */
338                 "featureSetsDownlink"
339                 },
340         { ATF_POINTER, 3, offsetof(struct FeatureSets, featureSetsDownlinkPerCC),
341                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
342                 0,
343                 &asn_DEF_featureSetsDownlinkPerCC_4,
344                 0,
345                 { &asn_OER_memb_featureSetsDownlinkPerCC_constr_4, &asn_PER_memb_featureSetsDownlinkPerCC_constr_4,  memb_featureSetsDownlinkPerCC_constraint_1 },
346                 0, 0, /* No default value */
347                 "featureSetsDownlinkPerCC"
348                 },
349         { ATF_POINTER, 2, offsetof(struct FeatureSets, featureSetsUplink),
350                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
351                 0,
352                 &asn_DEF_featureSetsUplink_6,
353                 0,
354                 { &asn_OER_memb_featureSetsUplink_constr_6, &asn_PER_memb_featureSetsUplink_constr_6,  memb_featureSetsUplink_constraint_1 },
355                 0, 0, /* No default value */
356                 "featureSetsUplink"
357                 },
358         { ATF_POINTER, 1, offsetof(struct FeatureSets, featureSetsUplinkPerCC),
359                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
360                 0,
361                 &asn_DEF_featureSetsUplinkPerCC_8,
362                 0,
363                 { &asn_OER_memb_featureSetsUplinkPerCC_constr_8, &asn_PER_memb_featureSetsUplinkPerCC_constr_8,  memb_featureSetsUplinkPerCC_constraint_1 },
364                 0, 0, /* No default value */
365                 "featureSetsUplinkPerCC"
366                 },
367 };
368 static const int asn_MAP_FeatureSets_oms_1[] = { 0, 1, 2, 3 };
369 static const ber_tlv_tag_t asn_DEF_FeatureSets_tags_1[] = {
370         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
371 };
372 static const asn_TYPE_tag2member_t asn_MAP_FeatureSets_tag2el_1[] = {
373     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* featureSetsDownlink */
374     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* featureSetsDownlinkPerCC */
375     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* featureSetsUplink */
376     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* featureSetsUplinkPerCC */
377 };
378 asn_SEQUENCE_specifics_t asn_SPC_FeatureSets_specs_1 = {
379         sizeof(struct FeatureSets),
380         offsetof(struct FeatureSets, _asn_ctx),
381         asn_MAP_FeatureSets_tag2el_1,
382         4,      /* Count of tags in the map */
383         asn_MAP_FeatureSets_oms_1,      /* Optional members */
384         4, 0,   /* Root/Additions */
385         4,      /* First extension addition */
386 };
387 asn_TYPE_descriptor_t asn_DEF_FeatureSets = {
388         "FeatureSets",
389         "FeatureSets",
390         &asn_OP_SEQUENCE,
391         asn_DEF_FeatureSets_tags_1,
392         sizeof(asn_DEF_FeatureSets_tags_1)
393                 /sizeof(asn_DEF_FeatureSets_tags_1[0]), /* 1 */
394         asn_DEF_FeatureSets_tags_1,     /* Same as above */
395         sizeof(asn_DEF_FeatureSets_tags_1)
396                 /sizeof(asn_DEF_FeatureSets_tags_1[0]), /* 1 */
397         { 0, 0, SEQUENCE_constraint },
398         asn_MBR_FeatureSets_1,
399         4,      /* Elements count */
400         &asn_SPC_FeatureSets_specs_1    /* Additional specs */
401 };
402