[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / MIB.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 "MIB.h"
9
10 /*
11  * This type is implemented using NativeEnumerated,
12  * so here we adjust the DEF accordingly.
13  */
14 /*
15  * This type is implemented using NativeEnumerated,
16  * so here we adjust the DEF accordingly.
17  */
18 /*
19  * This type is implemented using NativeEnumerated,
20  * so here we adjust the DEF accordingly.
21  */
22 /*
23  * This type is implemented using NativeEnumerated,
24  * so here we adjust the DEF accordingly.
25  */
26 static int
27 memb_systemFrameNumber_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
28                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
29         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
30         size_t size;
31         
32         if(!sptr) {
33                 ASN__CTFAIL(app_key, td, sptr,
34                         "%s: value not given (%s:%d)",
35                         td->name, __FILE__, __LINE__);
36                 return -1;
37         }
38         
39         if(st->size > 0) {
40                 /* Size in bits */
41                 size = 8 * st->size - (st->bits_unused & 0x07);
42         } else {
43                 size = 0;
44         }
45         
46         if((size == 6)) {
47                 /* Constraint check succeeded */
48                 return 0;
49         } else {
50                 ASN__CTFAIL(app_key, td, sptr,
51                         "%s: constraint failed (%s:%d)",
52                         td->name, __FILE__, __LINE__);
53                 return -1;
54         }
55 }
56
57 static int
58 memb_ssb_SubcarrierOffset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
59                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
60         long value;
61         
62         if(!sptr) {
63                 ASN__CTFAIL(app_key, td, sptr,
64                         "%s: value not given (%s:%d)",
65                         td->name, __FILE__, __LINE__);
66                 return -1;
67         }
68         
69         value = *(const long *)sptr;
70         
71         if((value >= 0 && value <= 15)) {
72                 /* Constraint check succeeded */
73                 return 0;
74         } else {
75                 ASN__CTFAIL(app_key, td, sptr,
76                         "%s: constraint failed (%s:%d)",
77                         td->name, __FILE__, __LINE__);
78                 return -1;
79         }
80 }
81
82 static int
83 memb_spare_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
84                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
85         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
86         size_t size;
87         
88         if(!sptr) {
89                 ASN__CTFAIL(app_key, td, sptr,
90                         "%s: value not given (%s:%d)",
91                         td->name, __FILE__, __LINE__);
92                 return -1;
93         }
94         
95         if(st->size > 0) {
96                 /* Size in bits */
97                 size = 8 * st->size - (st->bits_unused & 0x07);
98         } else {
99                 size = 0;
100         }
101         
102         if((size == 1)) {
103                 /* Constraint check succeeded */
104                 return 0;
105         } else {
106                 ASN__CTFAIL(app_key, td, sptr,
107                         "%s: constraint failed (%s:%d)",
108                         td->name, __FILE__, __LINE__);
109                 return -1;
110         }
111 }
112
113 static asn_oer_constraints_t asn_OER_type_subCarrierSpacingCommon_constr_3 CC_NOTUSED = {
114         { 0, 0 },
115         -1};
116 static asn_per_constraints_t asn_PER_type_subCarrierSpacingCommon_constr_3 CC_NOTUSED = {
117         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
118         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
119         0, 0    /* No PER value map */
120 };
121 static asn_oer_constraints_t asn_OER_type_dmrs_TypeA_Position_constr_7 CC_NOTUSED = {
122         { 0, 0 },
123         -1};
124 static asn_per_constraints_t asn_PER_type_dmrs_TypeA_Position_constr_7 CC_NOTUSED = {
125         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
126         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
127         0, 0    /* No PER value map */
128 };
129 static asn_oer_constraints_t asn_OER_type_cellBarred_constr_11 CC_NOTUSED = {
130         { 0, 0 },
131         -1};
132 static asn_per_constraints_t asn_PER_type_cellBarred_constr_11 CC_NOTUSED = {
133         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
134         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
135         0, 0    /* No PER value map */
136 };
137 static asn_oer_constraints_t asn_OER_type_intraFreqReselection_constr_14 CC_NOTUSED = {
138         { 0, 0 },
139         -1};
140 static asn_per_constraints_t asn_PER_type_intraFreqReselection_constr_14 CC_NOTUSED = {
141         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
142         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
143         0, 0    /* No PER value map */
144 };
145 static asn_oer_constraints_t asn_OER_memb_systemFrameNumber_constr_2 CC_NOTUSED = {
146         { 0, 0 },
147         6       /* (SIZE(6..6)) */};
148 static asn_per_constraints_t asn_PER_memb_systemFrameNumber_constr_2 CC_NOTUSED = {
149         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
150         { APC_CONSTRAINED,       0,  0,  6,  6 }        /* (SIZE(6..6)) */,
151         0, 0    /* No PER value map */
152 };
153 static asn_oer_constraints_t asn_OER_memb_ssb_SubcarrierOffset_constr_6 CC_NOTUSED = {
154         { 1, 1 }        /* (0..15) */,
155         -1};
156 static asn_per_constraints_t asn_PER_memb_ssb_SubcarrierOffset_constr_6 CC_NOTUSED = {
157         { APC_CONSTRAINED,       4,  4,  0,  15 }       /* (0..15) */,
158         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
159         0, 0    /* No PER value map */
160 };
161 static asn_oer_constraints_t asn_OER_memb_spare_constr_17 CC_NOTUSED = {
162         { 0, 0 },
163         1       /* (SIZE(1..1)) */};
164 static asn_per_constraints_t asn_PER_memb_spare_constr_17 CC_NOTUSED = {
165         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
166         { APC_CONSTRAINED,       0,  0,  1,  1 }        /* (SIZE(1..1)) */,
167         0, 0    /* No PER value map */
168 };
169 static const asn_INTEGER_enum_map_t asn_MAP_subCarrierSpacingCommon_value2enum_3[] = {
170         { 0,    9,      "scs15or60" },
171         { 1,    10,     "scs30or120" }
172 };
173 static const unsigned int asn_MAP_subCarrierSpacingCommon_enum2value_3[] = {
174         0,      /* scs15or60(0) */
175         1       /* scs30or120(1) */
176 };
177 static const asn_INTEGER_specifics_t asn_SPC_subCarrierSpacingCommon_specs_3 = {
178         asn_MAP_subCarrierSpacingCommon_value2enum_3,   /* "tag" => N; sorted by tag */
179         asn_MAP_subCarrierSpacingCommon_enum2value_3,   /* N => "tag"; sorted by N */
180         2,      /* Number of elements in the maps */
181         0,      /* Enumeration is not extensible */
182         1,      /* Strict enumeration */
183         0,      /* Native long size */
184         0
185 };
186 static const ber_tlv_tag_t asn_DEF_subCarrierSpacingCommon_tags_3[] = {
187         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
188         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
189 };
190 static /* Use -fall-defs-global to expose */
191 asn_TYPE_descriptor_t asn_DEF_subCarrierSpacingCommon_3 = {
192         "subCarrierSpacingCommon",
193         "subCarrierSpacingCommon",
194         &asn_OP_NativeEnumerated,
195         asn_DEF_subCarrierSpacingCommon_tags_3,
196         sizeof(asn_DEF_subCarrierSpacingCommon_tags_3)
197                 /sizeof(asn_DEF_subCarrierSpacingCommon_tags_3[0]) - 1, /* 1 */
198         asn_DEF_subCarrierSpacingCommon_tags_3, /* Same as above */
199         sizeof(asn_DEF_subCarrierSpacingCommon_tags_3)
200                 /sizeof(asn_DEF_subCarrierSpacingCommon_tags_3[0]), /* 2 */
201         { &asn_OER_type_subCarrierSpacingCommon_constr_3, &asn_PER_type_subCarrierSpacingCommon_constr_3, NativeEnumerated_constraint },
202         0, 0,   /* Defined elsewhere */
203         &asn_SPC_subCarrierSpacingCommon_specs_3        /* Additional specs */
204 };
205
206 static const asn_INTEGER_enum_map_t asn_MAP_dmrs_TypeA_Position_value2enum_7[] = {
207         { 0,    4,      "pos2" },
208         { 1,    4,      "pos3" }
209 };
210 static const unsigned int asn_MAP_dmrs_TypeA_Position_enum2value_7[] = {
211         0,      /* pos2(0) */
212         1       /* pos3(1) */
213 };
214 static const asn_INTEGER_specifics_t asn_SPC_dmrs_TypeA_Position_specs_7 = {
215         asn_MAP_dmrs_TypeA_Position_value2enum_7,       /* "tag" => N; sorted by tag */
216         asn_MAP_dmrs_TypeA_Position_enum2value_7,       /* N => "tag"; sorted by N */
217         2,      /* Number of elements in the maps */
218         0,      /* Enumeration is not extensible */
219         1,      /* Strict enumeration */
220         0,      /* Native long size */
221         0
222 };
223 static const ber_tlv_tag_t asn_DEF_dmrs_TypeA_Position_tags_7[] = {
224         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
225         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
226 };
227 static /* Use -fall-defs-global to expose */
228 asn_TYPE_descriptor_t asn_DEF_dmrs_TypeA_Position_7 = {
229         "dmrs-TypeA-Position",
230         "dmrs-TypeA-Position",
231         &asn_OP_NativeEnumerated,
232         asn_DEF_dmrs_TypeA_Position_tags_7,
233         sizeof(asn_DEF_dmrs_TypeA_Position_tags_7)
234                 /sizeof(asn_DEF_dmrs_TypeA_Position_tags_7[0]) - 1, /* 1 */
235         asn_DEF_dmrs_TypeA_Position_tags_7,     /* Same as above */
236         sizeof(asn_DEF_dmrs_TypeA_Position_tags_7)
237                 /sizeof(asn_DEF_dmrs_TypeA_Position_tags_7[0]), /* 2 */
238         { &asn_OER_type_dmrs_TypeA_Position_constr_7, &asn_PER_type_dmrs_TypeA_Position_constr_7, NativeEnumerated_constraint },
239         0, 0,   /* Defined elsewhere */
240         &asn_SPC_dmrs_TypeA_Position_specs_7    /* Additional specs */
241 };
242
243 static const asn_INTEGER_enum_map_t asn_MAP_cellBarred_value2enum_11[] = {
244         { 0,    6,      "barred" },
245         { 1,    9,      "notBarred" }
246 };
247 static const unsigned int asn_MAP_cellBarred_enum2value_11[] = {
248         0,      /* barred(0) */
249         1       /* notBarred(1) */
250 };
251 static const asn_INTEGER_specifics_t asn_SPC_cellBarred_specs_11 = {
252         asn_MAP_cellBarred_value2enum_11,       /* "tag" => N; sorted by tag */
253         asn_MAP_cellBarred_enum2value_11,       /* N => "tag"; sorted by N */
254         2,      /* Number of elements in the maps */
255         0,      /* Enumeration is not extensible */
256         1,      /* Strict enumeration */
257         0,      /* Native long size */
258         0
259 };
260 static const ber_tlv_tag_t asn_DEF_cellBarred_tags_11[] = {
261         (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
262         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
263 };
264 static /* Use -fall-defs-global to expose */
265 asn_TYPE_descriptor_t asn_DEF_cellBarred_11 = {
266         "cellBarred",
267         "cellBarred",
268         &asn_OP_NativeEnumerated,
269         asn_DEF_cellBarred_tags_11,
270         sizeof(asn_DEF_cellBarred_tags_11)
271                 /sizeof(asn_DEF_cellBarred_tags_11[0]) - 1, /* 1 */
272         asn_DEF_cellBarred_tags_11,     /* Same as above */
273         sizeof(asn_DEF_cellBarred_tags_11)
274                 /sizeof(asn_DEF_cellBarred_tags_11[0]), /* 2 */
275         { &asn_OER_type_cellBarred_constr_11, &asn_PER_type_cellBarred_constr_11, NativeEnumerated_constraint },
276         0, 0,   /* Defined elsewhere */
277         &asn_SPC_cellBarred_specs_11    /* Additional specs */
278 };
279
280 static const asn_INTEGER_enum_map_t asn_MAP_intraFreqReselection_value2enum_14[] = {
281         { 0,    7,      "allowed" },
282         { 1,    10,     "notAllowed" }
283 };
284 static const unsigned int asn_MAP_intraFreqReselection_enum2value_14[] = {
285         0,      /* allowed(0) */
286         1       /* notAllowed(1) */
287 };
288 static const asn_INTEGER_specifics_t asn_SPC_intraFreqReselection_specs_14 = {
289         asn_MAP_intraFreqReselection_value2enum_14,     /* "tag" => N; sorted by tag */
290         asn_MAP_intraFreqReselection_enum2value_14,     /* N => "tag"; sorted by N */
291         2,      /* Number of elements in the maps */
292         0,      /* Enumeration is not extensible */
293         1,      /* Strict enumeration */
294         0,      /* Native long size */
295         0
296 };
297 static const ber_tlv_tag_t asn_DEF_intraFreqReselection_tags_14[] = {
298         (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
299         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
300 };
301 static /* Use -fall-defs-global to expose */
302 asn_TYPE_descriptor_t asn_DEF_intraFreqReselection_14 = {
303         "intraFreqReselection",
304         "intraFreqReselection",
305         &asn_OP_NativeEnumerated,
306         asn_DEF_intraFreqReselection_tags_14,
307         sizeof(asn_DEF_intraFreqReselection_tags_14)
308                 /sizeof(asn_DEF_intraFreqReselection_tags_14[0]) - 1, /* 1 */
309         asn_DEF_intraFreqReselection_tags_14,   /* Same as above */
310         sizeof(asn_DEF_intraFreqReselection_tags_14)
311                 /sizeof(asn_DEF_intraFreqReselection_tags_14[0]), /* 2 */
312         { &asn_OER_type_intraFreqReselection_constr_14, &asn_PER_type_intraFreqReselection_constr_14, NativeEnumerated_constraint },
313         0, 0,   /* Defined elsewhere */
314         &asn_SPC_intraFreqReselection_specs_14  /* Additional specs */
315 };
316
317 asn_TYPE_member_t asn_MBR_MIB_1[] = {
318         { ATF_NOFLAGS, 0, offsetof(struct MIB, systemFrameNumber),
319                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
320                 -1,     /* IMPLICIT tag at current level */
321                 &asn_DEF_BIT_STRING,
322                 0,
323                 { &asn_OER_memb_systemFrameNumber_constr_2, &asn_PER_memb_systemFrameNumber_constr_2,  memb_systemFrameNumber_constraint_1 },
324                 0, 0, /* No default value */
325                 "systemFrameNumber"
326                 },
327         { ATF_NOFLAGS, 0, offsetof(struct MIB, subCarrierSpacingCommon),
328                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
329                 -1,     /* IMPLICIT tag at current level */
330                 &asn_DEF_subCarrierSpacingCommon_3,
331                 0,
332                 { 0, 0, 0 },
333                 0, 0, /* No default value */
334                 "subCarrierSpacingCommon"
335                 },
336         { ATF_NOFLAGS, 0, offsetof(struct MIB, ssb_SubcarrierOffset),
337                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
338                 -1,     /* IMPLICIT tag at current level */
339                 &asn_DEF_NativeInteger,
340                 0,
341                 { &asn_OER_memb_ssb_SubcarrierOffset_constr_6, &asn_PER_memb_ssb_SubcarrierOffset_constr_6,  memb_ssb_SubcarrierOffset_constraint_1 },
342                 0, 0, /* No default value */
343                 "ssb-SubcarrierOffset"
344                 },
345         { ATF_NOFLAGS, 0, offsetof(struct MIB, dmrs_TypeA_Position),
346                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
347                 -1,     /* IMPLICIT tag at current level */
348                 &asn_DEF_dmrs_TypeA_Position_7,
349                 0,
350                 { 0, 0, 0 },
351                 0, 0, /* No default value */
352                 "dmrs-TypeA-Position"
353                 },
354         { ATF_NOFLAGS, 0, offsetof(struct MIB, pdcch_ConfigSIB1),
355                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
356                 -1,     /* IMPLICIT tag at current level */
357                 &asn_DEF_PDCCH_ConfigSIB1,
358                 0,
359                 { 0, 0, 0 },
360                 0, 0, /* No default value */
361                 "pdcch-ConfigSIB1"
362                 },
363         { ATF_NOFLAGS, 0, offsetof(struct MIB, cellBarred),
364                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
365                 -1,     /* IMPLICIT tag at current level */
366                 &asn_DEF_cellBarred_11,
367                 0,
368                 { 0, 0, 0 },
369                 0, 0, /* No default value */
370                 "cellBarred"
371                 },
372         { ATF_NOFLAGS, 0, offsetof(struct MIB, intraFreqReselection),
373                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
374                 -1,     /* IMPLICIT tag at current level */
375                 &asn_DEF_intraFreqReselection_14,
376                 0,
377                 { 0, 0, 0 },
378                 0, 0, /* No default value */
379                 "intraFreqReselection"
380                 },
381         { ATF_NOFLAGS, 0, offsetof(struct MIB, spare),
382                 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
383                 -1,     /* IMPLICIT tag at current level */
384                 &asn_DEF_BIT_STRING,
385                 0,
386                 { &asn_OER_memb_spare_constr_17, &asn_PER_memb_spare_constr_17,  memb_spare_constraint_1 },
387                 0, 0, /* No default value */
388                 "spare"
389                 },
390 };
391 static const ber_tlv_tag_t asn_DEF_MIB_tags_1[] = {
392         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
393 };
394 static const asn_TYPE_tag2member_t asn_MAP_MIB_tag2el_1[] = {
395     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* systemFrameNumber */
396     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* subCarrierSpacingCommon */
397     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ssb-SubcarrierOffset */
398     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* dmrs-TypeA-Position */
399     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* pdcch-ConfigSIB1 */
400     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* cellBarred */
401     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* intraFreqReselection */
402     { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* spare */
403 };
404 asn_SEQUENCE_specifics_t asn_SPC_MIB_specs_1 = {
405         sizeof(struct MIB),
406         offsetof(struct MIB, _asn_ctx),
407         asn_MAP_MIB_tag2el_1,
408         8,      /* Count of tags in the map */
409         0, 0, 0,        /* Optional elements (not needed) */
410         -1,     /* First extension addition */
411 };
412 asn_TYPE_descriptor_t asn_DEF_MIB = {
413         "MIB",
414         "MIB",
415         &asn_OP_SEQUENCE,
416         asn_DEF_MIB_tags_1,
417         sizeof(asn_DEF_MIB_tags_1)
418                 /sizeof(asn_DEF_MIB_tags_1[0]), /* 1 */
419         asn_DEF_MIB_tags_1,     /* Same as above */
420         sizeof(asn_DEF_MIB_tags_1)
421                 /sizeof(asn_DEF_MIB_tags_1[0]), /* 1 */
422         { 0, 0, SEQUENCE_constraint },
423         asn_MBR_MIB_1,
424         8,      /* Elements count */
425         &asn_SPC_MIB_specs_1    /* Additional specs */
426 };
427