[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / CSI-ReportPeriodicityAndOffset.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "./22April22_Paging/rrc_15.3_asn.asn1"
5  *      `asn1c -D ./22April22_Paging -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "CSI-ReportPeriodicityAndOffset.h"
9
10 static int
11 memb_slots4_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         long value;
14         
15         if(!sptr) {
16                 ASN__CTFAIL(app_key, td, sptr,
17                         "%s: value not given (%s:%d)",
18                         td->name, __FILE__, __LINE__);
19                 return -1;
20         }
21         
22         value = *(const long *)sptr;
23         
24         if((value >= 0 && value <= 3)) {
25                 /* Constraint check succeeded */
26                 return 0;
27         } else {
28                 ASN__CTFAIL(app_key, td, sptr,
29                         "%s: constraint failed (%s:%d)",
30                         td->name, __FILE__, __LINE__);
31                 return -1;
32         }
33 }
34
35 static int
36 memb_slots5_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
37                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
38         long value;
39         
40         if(!sptr) {
41                 ASN__CTFAIL(app_key, td, sptr,
42                         "%s: value not given (%s:%d)",
43                         td->name, __FILE__, __LINE__);
44                 return -1;
45         }
46         
47         value = *(const long *)sptr;
48         
49         if((value >= 0 && value <= 4)) {
50                 /* Constraint check succeeded */
51                 return 0;
52         } else {
53                 ASN__CTFAIL(app_key, td, sptr,
54                         "%s: constraint failed (%s:%d)",
55                         td->name, __FILE__, __LINE__);
56                 return -1;
57         }
58 }
59
60 static int
61 memb_slots8_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
62                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
63         long value;
64         
65         if(!sptr) {
66                 ASN__CTFAIL(app_key, td, sptr,
67                         "%s: value not given (%s:%d)",
68                         td->name, __FILE__, __LINE__);
69                 return -1;
70         }
71         
72         value = *(const long *)sptr;
73         
74         if((value >= 0 && value <= 7)) {
75                 /* Constraint check succeeded */
76                 return 0;
77         } else {
78                 ASN__CTFAIL(app_key, td, sptr,
79                         "%s: constraint failed (%s:%d)",
80                         td->name, __FILE__, __LINE__);
81                 return -1;
82         }
83 }
84
85 static int
86 memb_slots10_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
87                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
88         long value;
89         
90         if(!sptr) {
91                 ASN__CTFAIL(app_key, td, sptr,
92                         "%s: value not given (%s:%d)",
93                         td->name, __FILE__, __LINE__);
94                 return -1;
95         }
96         
97         value = *(const long *)sptr;
98         
99         if((value >= 0 && value <= 9)) {
100                 /* Constraint check succeeded */
101                 return 0;
102         } else {
103                 ASN__CTFAIL(app_key, td, sptr,
104                         "%s: constraint failed (%s:%d)",
105                         td->name, __FILE__, __LINE__);
106                 return -1;
107         }
108 }
109
110 static int
111 memb_slots16_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
112                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
113         long value;
114         
115         if(!sptr) {
116                 ASN__CTFAIL(app_key, td, sptr,
117                         "%s: value not given (%s:%d)",
118                         td->name, __FILE__, __LINE__);
119                 return -1;
120         }
121         
122         value = *(const long *)sptr;
123         
124         if((value >= 0 && value <= 15)) {
125                 /* Constraint check succeeded */
126                 return 0;
127         } else {
128                 ASN__CTFAIL(app_key, td, sptr,
129                         "%s: constraint failed (%s:%d)",
130                         td->name, __FILE__, __LINE__);
131                 return -1;
132         }
133 }
134
135 static int
136 memb_slots20_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
137                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
138         long value;
139         
140         if(!sptr) {
141                 ASN__CTFAIL(app_key, td, sptr,
142                         "%s: value not given (%s:%d)",
143                         td->name, __FILE__, __LINE__);
144                 return -1;
145         }
146         
147         value = *(const long *)sptr;
148         
149         if((value >= 0 && value <= 19)) {
150                 /* Constraint check succeeded */
151                 return 0;
152         } else {
153                 ASN__CTFAIL(app_key, td, sptr,
154                         "%s: constraint failed (%s:%d)",
155                         td->name, __FILE__, __LINE__);
156                 return -1;
157         }
158 }
159
160 static int
161 memb_slots40_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
162                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
163         long value;
164         
165         if(!sptr) {
166                 ASN__CTFAIL(app_key, td, sptr,
167                         "%s: value not given (%s:%d)",
168                         td->name, __FILE__, __LINE__);
169                 return -1;
170         }
171         
172         value = *(const long *)sptr;
173         
174         if((value >= 0 && value <= 39)) {
175                 /* Constraint check succeeded */
176                 return 0;
177         } else {
178                 ASN__CTFAIL(app_key, td, sptr,
179                         "%s: constraint failed (%s:%d)",
180                         td->name, __FILE__, __LINE__);
181                 return -1;
182         }
183 }
184
185 static int
186 memb_slots80_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
187                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
188         long value;
189         
190         if(!sptr) {
191                 ASN__CTFAIL(app_key, td, sptr,
192                         "%s: value not given (%s:%d)",
193                         td->name, __FILE__, __LINE__);
194                 return -1;
195         }
196         
197         value = *(const long *)sptr;
198         
199         if((value >= 0 && value <= 79)) {
200                 /* Constraint check succeeded */
201                 return 0;
202         } else {
203                 ASN__CTFAIL(app_key, td, sptr,
204                         "%s: constraint failed (%s:%d)",
205                         td->name, __FILE__, __LINE__);
206                 return -1;
207         }
208 }
209
210 static int
211 memb_slots160_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
212                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
213         long value;
214         
215         if(!sptr) {
216                 ASN__CTFAIL(app_key, td, sptr,
217                         "%s: value not given (%s:%d)",
218                         td->name, __FILE__, __LINE__);
219                 return -1;
220         }
221         
222         value = *(const long *)sptr;
223         
224         if((value >= 0 && value <= 159)) {
225                 /* Constraint check succeeded */
226                 return 0;
227         } else {
228                 ASN__CTFAIL(app_key, td, sptr,
229                         "%s: constraint failed (%s:%d)",
230                         td->name, __FILE__, __LINE__);
231                 return -1;
232         }
233 }
234
235 static int
236 memb_slots320_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
237                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
238         long value;
239         
240         if(!sptr) {
241                 ASN__CTFAIL(app_key, td, sptr,
242                         "%s: value not given (%s:%d)",
243                         td->name, __FILE__, __LINE__);
244                 return -1;
245         }
246         
247         value = *(const long *)sptr;
248         
249         if((value >= 0 && value <= 319)) {
250                 /* Constraint check succeeded */
251                 return 0;
252         } else {
253                 ASN__CTFAIL(app_key, td, sptr,
254                         "%s: constraint failed (%s:%d)",
255                         td->name, __FILE__, __LINE__);
256                 return -1;
257         }
258 }
259
260 static asn_oer_constraints_t asn_OER_memb_slots4_constr_2 CC_NOTUSED = {
261         { 1, 1 }        /* (0..3) */,
262         -1};
263 static asn_per_constraints_t asn_PER_memb_slots4_constr_2 CC_NOTUSED = {
264         { APC_CONSTRAINED,       2,  2,  0,  3 }        /* (0..3) */,
265         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
266         0, 0    /* No PER value map */
267 };
268 static asn_oer_constraints_t asn_OER_memb_slots5_constr_3 CC_NOTUSED = {
269         { 1, 1 }        /* (0..4) */,
270         -1};
271 static asn_per_constraints_t asn_PER_memb_slots5_constr_3 CC_NOTUSED = {
272         { APC_CONSTRAINED,       3,  3,  0,  4 }        /* (0..4) */,
273         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
274         0, 0    /* No PER value map */
275 };
276 static asn_oer_constraints_t asn_OER_memb_slots8_constr_4 CC_NOTUSED = {
277         { 1, 1 }        /* (0..7) */,
278         -1};
279 static asn_per_constraints_t asn_PER_memb_slots8_constr_4 CC_NOTUSED = {
280         { APC_CONSTRAINED,       3,  3,  0,  7 }        /* (0..7) */,
281         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
282         0, 0    /* No PER value map */
283 };
284 static asn_oer_constraints_t asn_OER_memb_slots10_constr_5 CC_NOTUSED = {
285         { 1, 1 }        /* (0..9) */,
286         -1};
287 static asn_per_constraints_t asn_PER_memb_slots10_constr_5 CC_NOTUSED = {
288         { APC_CONSTRAINED,       4,  4,  0,  9 }        /* (0..9) */,
289         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
290         0, 0    /* No PER value map */
291 };
292 static asn_oer_constraints_t asn_OER_memb_slots16_constr_6 CC_NOTUSED = {
293         { 1, 1 }        /* (0..15) */,
294         -1};
295 static asn_per_constraints_t asn_PER_memb_slots16_constr_6 CC_NOTUSED = {
296         { APC_CONSTRAINED,       4,  4,  0,  15 }       /* (0..15) */,
297         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
298         0, 0    /* No PER value map */
299 };
300 static asn_oer_constraints_t asn_OER_memb_slots20_constr_7 CC_NOTUSED = {
301         { 1, 1 }        /* (0..19) */,
302         -1};
303 static asn_per_constraints_t asn_PER_memb_slots20_constr_7 CC_NOTUSED = {
304         { APC_CONSTRAINED,       5,  5,  0,  19 }       /* (0..19) */,
305         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
306         0, 0    /* No PER value map */
307 };
308 static asn_oer_constraints_t asn_OER_memb_slots40_constr_8 CC_NOTUSED = {
309         { 1, 1 }        /* (0..39) */,
310         -1};
311 static asn_per_constraints_t asn_PER_memb_slots40_constr_8 CC_NOTUSED = {
312         { APC_CONSTRAINED,       6,  6,  0,  39 }       /* (0..39) */,
313         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
314         0, 0    /* No PER value map */
315 };
316 static asn_oer_constraints_t asn_OER_memb_slots80_constr_9 CC_NOTUSED = {
317         { 1, 1 }        /* (0..79) */,
318         -1};
319 static asn_per_constraints_t asn_PER_memb_slots80_constr_9 CC_NOTUSED = {
320         { APC_CONSTRAINED,       7,  7,  0,  79 }       /* (0..79) */,
321         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
322         0, 0    /* No PER value map */
323 };
324 static asn_oer_constraints_t asn_OER_memb_slots160_constr_10 CC_NOTUSED = {
325         { 1, 1 }        /* (0..159) */,
326         -1};
327 static asn_per_constraints_t asn_PER_memb_slots160_constr_10 CC_NOTUSED = {
328         { APC_CONSTRAINED,       8,  8,  0,  159 }      /* (0..159) */,
329         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
330         0, 0    /* No PER value map */
331 };
332 static asn_oer_constraints_t asn_OER_memb_slots320_constr_11 CC_NOTUSED = {
333         { 2, 1 }        /* (0..319) */,
334         -1};
335 static asn_per_constraints_t asn_PER_memb_slots320_constr_11 CC_NOTUSED = {
336         { APC_CONSTRAINED,       9,  9,  0,  319 }      /* (0..319) */,
337         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
338         0, 0    /* No PER value map */
339 };
340 static asn_oer_constraints_t asn_OER_type_CSI_ReportPeriodicityAndOffset_constr_1 CC_NOTUSED = {
341         { 0, 0 },
342         -1};
343 asn_per_constraints_t asn_PER_type_CSI_ReportPeriodicityAndOffset_constr_1 CC_NOTUSED = {
344         { APC_CONSTRAINED,       4,  4,  0,  9 }        /* (0..9) */,
345         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
346         0, 0    /* No PER value map */
347 };
348 asn_TYPE_member_t asn_MBR_CSI_ReportPeriodicityAndOffset_1[] = {
349         { ATF_NOFLAGS, 0, offsetof(struct CSI_ReportPeriodicityAndOffset, choice.slots4),
350                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
351                 -1,     /* IMPLICIT tag at current level */
352                 &asn_DEF_NativeInteger,
353                 0,
354                 { &asn_OER_memb_slots4_constr_2, &asn_PER_memb_slots4_constr_2,  memb_slots4_constraint_1 },
355                 0, 0, /* No default value */
356                 "slots4"
357                 },
358         { ATF_NOFLAGS, 0, offsetof(struct CSI_ReportPeriodicityAndOffset, choice.slots5),
359                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
360                 -1,     /* IMPLICIT tag at current level */
361                 &asn_DEF_NativeInteger,
362                 0,
363                 { &asn_OER_memb_slots5_constr_3, &asn_PER_memb_slots5_constr_3,  memb_slots5_constraint_1 },
364                 0, 0, /* No default value */
365                 "slots5"
366                 },
367         { ATF_NOFLAGS, 0, offsetof(struct CSI_ReportPeriodicityAndOffset, choice.slots8),
368                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
369                 -1,     /* IMPLICIT tag at current level */
370                 &asn_DEF_NativeInteger,
371                 0,
372                 { &asn_OER_memb_slots8_constr_4, &asn_PER_memb_slots8_constr_4,  memb_slots8_constraint_1 },
373                 0, 0, /* No default value */
374                 "slots8"
375                 },
376         { ATF_NOFLAGS, 0, offsetof(struct CSI_ReportPeriodicityAndOffset, choice.slots10),
377                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
378                 -1,     /* IMPLICIT tag at current level */
379                 &asn_DEF_NativeInteger,
380                 0,
381                 { &asn_OER_memb_slots10_constr_5, &asn_PER_memb_slots10_constr_5,  memb_slots10_constraint_1 },
382                 0, 0, /* No default value */
383                 "slots10"
384                 },
385         { ATF_NOFLAGS, 0, offsetof(struct CSI_ReportPeriodicityAndOffset, choice.slots16),
386                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
387                 -1,     /* IMPLICIT tag at current level */
388                 &asn_DEF_NativeInteger,
389                 0,
390                 { &asn_OER_memb_slots16_constr_6, &asn_PER_memb_slots16_constr_6,  memb_slots16_constraint_1 },
391                 0, 0, /* No default value */
392                 "slots16"
393                 },
394         { ATF_NOFLAGS, 0, offsetof(struct CSI_ReportPeriodicityAndOffset, choice.slots20),
395                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
396                 -1,     /* IMPLICIT tag at current level */
397                 &asn_DEF_NativeInteger,
398                 0,
399                 { &asn_OER_memb_slots20_constr_7, &asn_PER_memb_slots20_constr_7,  memb_slots20_constraint_1 },
400                 0, 0, /* No default value */
401                 "slots20"
402                 },
403         { ATF_NOFLAGS, 0, offsetof(struct CSI_ReportPeriodicityAndOffset, choice.slots40),
404                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
405                 -1,     /* IMPLICIT tag at current level */
406                 &asn_DEF_NativeInteger,
407                 0,
408                 { &asn_OER_memb_slots40_constr_8, &asn_PER_memb_slots40_constr_8,  memb_slots40_constraint_1 },
409                 0, 0, /* No default value */
410                 "slots40"
411                 },
412         { ATF_NOFLAGS, 0, offsetof(struct CSI_ReportPeriodicityAndOffset, choice.slots80),
413                 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
414                 -1,     /* IMPLICIT tag at current level */
415                 &asn_DEF_NativeInteger,
416                 0,
417                 { &asn_OER_memb_slots80_constr_9, &asn_PER_memb_slots80_constr_9,  memb_slots80_constraint_1 },
418                 0, 0, /* No default value */
419                 "slots80"
420                 },
421         { ATF_NOFLAGS, 0, offsetof(struct CSI_ReportPeriodicityAndOffset, choice.slots160),
422                 (ASN_TAG_CLASS_CONTEXT | (8 << 2)),
423                 -1,     /* IMPLICIT tag at current level */
424                 &asn_DEF_NativeInteger,
425                 0,
426                 { &asn_OER_memb_slots160_constr_10, &asn_PER_memb_slots160_constr_10,  memb_slots160_constraint_1 },
427                 0, 0, /* No default value */
428                 "slots160"
429                 },
430         { ATF_NOFLAGS, 0, offsetof(struct CSI_ReportPeriodicityAndOffset, choice.slots320),
431                 (ASN_TAG_CLASS_CONTEXT | (9 << 2)),
432                 -1,     /* IMPLICIT tag at current level */
433                 &asn_DEF_NativeInteger,
434                 0,
435                 { &asn_OER_memb_slots320_constr_11, &asn_PER_memb_slots320_constr_11,  memb_slots320_constraint_1 },
436                 0, 0, /* No default value */
437                 "slots320"
438                 },
439 };
440 static const asn_TYPE_tag2member_t asn_MAP_CSI_ReportPeriodicityAndOffset_tag2el_1[] = {
441     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* slots4 */
442     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* slots5 */
443     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* slots8 */
444     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* slots10 */
445     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* slots16 */
446     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* slots20 */
447     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* slots40 */
448     { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* slots80 */
449     { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* slots160 */
450     { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* slots320 */
451 };
452 asn_CHOICE_specifics_t asn_SPC_CSI_ReportPeriodicityAndOffset_specs_1 = {
453         sizeof(struct CSI_ReportPeriodicityAndOffset),
454         offsetof(struct CSI_ReportPeriodicityAndOffset, _asn_ctx),
455         offsetof(struct CSI_ReportPeriodicityAndOffset, present),
456         sizeof(((struct CSI_ReportPeriodicityAndOffset *)0)->present),
457         asn_MAP_CSI_ReportPeriodicityAndOffset_tag2el_1,
458         10,     /* Count of tags in the map */
459         0, 0,
460         -1      /* Extensions start */
461 };
462 asn_TYPE_descriptor_t asn_DEF_CSI_ReportPeriodicityAndOffset = {
463         "CSI-ReportPeriodicityAndOffset",
464         "CSI-ReportPeriodicityAndOffset",
465         &asn_OP_CHOICE,
466         0,      /* No effective tags (pointer) */
467         0,      /* No effective tags (count) */
468         0,      /* No tags (pointer) */
469         0,      /* No tags (count) */
470         { &asn_OER_type_CSI_ReportPeriodicityAndOffset_constr_1, &asn_PER_type_CSI_ReportPeriodicityAndOffset_constr_1, CHOICE_constraint },
471         asn_MBR_CSI_ReportPeriodicityAndOffset_1,
472         10,     /* Elements count */
473         &asn_SPC_CSI_ReportPeriodicityAndOffset_specs_1 /* Additional specs */
474 };
475