[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / SI-RequestConfig.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 "SI-RequestConfig.h"
9
10 #include "SI-RequestResources.h"
11 /*
12  * This type is implemented using NativeEnumerated,
13  * so here we adjust the DEF accordingly.
14  */
15 /*
16  * This type is implemented using NativeEnumerated,
17  * so here we adjust the DEF accordingly.
18  */
19 static int
20 memb_si_RequestResources_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
21                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
22         size_t size;
23         
24         if(!sptr) {
25                 ASN__CTFAIL(app_key, td, sptr,
26                         "%s: value not given (%s:%d)",
27                         td->name, __FILE__, __LINE__);
28                 return -1;
29         }
30         
31         /* Determine the number of elements */
32         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
33         
34         if((size >= 1 && size <= 32)) {
35                 /* Perform validation of the inner elements */
36                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
37         } else {
38                 ASN__CTFAIL(app_key, td, sptr,
39                         "%s: constraint failed (%s:%d)",
40                         td->name, __FILE__, __LINE__);
41                 return -1;
42         }
43 }
44
45 static asn_oer_constraints_t asn_OER_type_ssb_perRACH_Occasion_constr_4 CC_NOTUSED = {
46         { 0, 0 },
47         -1};
48 static asn_per_constraints_t asn_PER_type_ssb_perRACH_Occasion_constr_4 CC_NOTUSED = {
49         { APC_CONSTRAINED,       3,  3,  0,  7 }        /* (0..7) */,
50         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
51         0, 0    /* No PER value map */
52 };
53 static asn_oer_constraints_t asn_OER_type_si_RequestPeriod_constr_13 CC_NOTUSED = {
54         { 0, 0 },
55         -1};
56 static asn_per_constraints_t asn_PER_type_si_RequestPeriod_constr_13 CC_NOTUSED = {
57         { APC_CONSTRAINED,       3,  3,  0,  7 }        /* (0..7) */,
58         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
59         0, 0    /* No PER value map */
60 };
61 static asn_oer_constraints_t asn_OER_type_si_RequestResources_constr_22 CC_NOTUSED = {
62         { 0, 0 },
63         -1      /* (SIZE(1..32)) */};
64 static asn_per_constraints_t asn_PER_type_si_RequestResources_constr_22 CC_NOTUSED = {
65         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
66         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
67         0, 0    /* No PER value map */
68 };
69 static asn_oer_constraints_t asn_OER_memb_si_RequestResources_constr_22 CC_NOTUSED = {
70         { 0, 0 },
71         -1      /* (SIZE(1..32)) */};
72 static asn_per_constraints_t asn_PER_memb_si_RequestResources_constr_22 CC_NOTUSED = {
73         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
74         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
75         0, 0    /* No PER value map */
76 };
77 static const asn_INTEGER_enum_map_t asn_MAP_ssb_perRACH_Occasion_value2enum_4[] = {
78         { 0,    9,      "oneEighth" },
79         { 1,    9,      "oneFourth" },
80         { 2,    7,      "oneHalf" },
81         { 3,    3,      "one" },
82         { 4,    3,      "two" },
83         { 5,    4,      "four" },
84         { 6,    5,      "eight" },
85         { 7,    7,      "sixteen" }
86 };
87 static const unsigned int asn_MAP_ssb_perRACH_Occasion_enum2value_4[] = {
88         6,      /* eight(6) */
89         5,      /* four(5) */
90         3,      /* one(3) */
91         0,      /* oneEighth(0) */
92         1,      /* oneFourth(1) */
93         2,      /* oneHalf(2) */
94         7,      /* sixteen(7) */
95         4       /* two(4) */
96 };
97 static const asn_INTEGER_specifics_t asn_SPC_ssb_perRACH_Occasion_specs_4 = {
98         asn_MAP_ssb_perRACH_Occasion_value2enum_4,      /* "tag" => N; sorted by tag */
99         asn_MAP_ssb_perRACH_Occasion_enum2value_4,      /* N => "tag"; sorted by N */
100         8,      /* Number of elements in the maps */
101         0,      /* Enumeration is not extensible */
102         1,      /* Strict enumeration */
103         0,      /* Native long size */
104         0
105 };
106 static const ber_tlv_tag_t asn_DEF_ssb_perRACH_Occasion_tags_4[] = {
107         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
108         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
109 };
110 static /* Use -fall-defs-global to expose */
111 asn_TYPE_descriptor_t asn_DEF_ssb_perRACH_Occasion_4 = {
112         "ssb-perRACH-Occasion",
113         "ssb-perRACH-Occasion",
114         &asn_OP_NativeEnumerated,
115         asn_DEF_ssb_perRACH_Occasion_tags_4,
116         sizeof(asn_DEF_ssb_perRACH_Occasion_tags_4)
117                 /sizeof(asn_DEF_ssb_perRACH_Occasion_tags_4[0]) - 1, /* 1 */
118         asn_DEF_ssb_perRACH_Occasion_tags_4,    /* Same as above */
119         sizeof(asn_DEF_ssb_perRACH_Occasion_tags_4)
120                 /sizeof(asn_DEF_ssb_perRACH_Occasion_tags_4[0]), /* 2 */
121         { &asn_OER_type_ssb_perRACH_Occasion_constr_4, &asn_PER_type_ssb_perRACH_Occasion_constr_4, NativeEnumerated_constraint },
122         0, 0,   /* Defined elsewhere */
123         &asn_SPC_ssb_perRACH_Occasion_specs_4   /* Additional specs */
124 };
125
126 static asn_TYPE_member_t asn_MBR_rach_OccasionsSI_2[] = {
127         { ATF_NOFLAGS, 0, offsetof(struct SI_RequestConfig__rach_OccasionsSI, rach_ConfigSI),
128                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
129                 -1,     /* IMPLICIT tag at current level */
130                 &asn_DEF_RACH_ConfigGeneric,
131                 0,
132                 { 0, 0, 0 },
133                 0, 0, /* No default value */
134                 "rach-ConfigSI"
135                 },
136         { ATF_NOFLAGS, 0, offsetof(struct SI_RequestConfig__rach_OccasionsSI, ssb_perRACH_Occasion),
137                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
138                 -1,     /* IMPLICIT tag at current level */
139                 &asn_DEF_ssb_perRACH_Occasion_4,
140                 0,
141                 { 0, 0, 0 },
142                 0, 0, /* No default value */
143                 "ssb-perRACH-Occasion"
144                 },
145 };
146 static const ber_tlv_tag_t asn_DEF_rach_OccasionsSI_tags_2[] = {
147         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
148         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
149 };
150 static const asn_TYPE_tag2member_t asn_MAP_rach_OccasionsSI_tag2el_2[] = {
151     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rach-ConfigSI */
152     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ssb-perRACH-Occasion */
153 };
154 static asn_SEQUENCE_specifics_t asn_SPC_rach_OccasionsSI_specs_2 = {
155         sizeof(struct SI_RequestConfig__rach_OccasionsSI),
156         offsetof(struct SI_RequestConfig__rach_OccasionsSI, _asn_ctx),
157         asn_MAP_rach_OccasionsSI_tag2el_2,
158         2,      /* Count of tags in the map */
159         0, 0, 0,        /* Optional elements (not needed) */
160         -1,     /* First extension addition */
161 };
162 static /* Use -fall-defs-global to expose */
163 asn_TYPE_descriptor_t asn_DEF_rach_OccasionsSI_2 = {
164         "rach-OccasionsSI",
165         "rach-OccasionsSI",
166         &asn_OP_SEQUENCE,
167         asn_DEF_rach_OccasionsSI_tags_2,
168         sizeof(asn_DEF_rach_OccasionsSI_tags_2)
169                 /sizeof(asn_DEF_rach_OccasionsSI_tags_2[0]) - 1, /* 1 */
170         asn_DEF_rach_OccasionsSI_tags_2,        /* Same as above */
171         sizeof(asn_DEF_rach_OccasionsSI_tags_2)
172                 /sizeof(asn_DEF_rach_OccasionsSI_tags_2[0]), /* 2 */
173         { 0, 0, SEQUENCE_constraint },
174         asn_MBR_rach_OccasionsSI_2,
175         2,      /* Elements count */
176         &asn_SPC_rach_OccasionsSI_specs_2       /* Additional specs */
177 };
178
179 static const asn_INTEGER_enum_map_t asn_MAP_si_RequestPeriod_value2enum_13[] = {
180         { 0,    3,      "one" },
181         { 1,    3,      "two" },
182         { 2,    4,      "four" },
183         { 3,    3,      "six" },
184         { 4,    5,      "eight" },
185         { 5,    3,      "ten" },
186         { 6,    6,      "twelve" },
187         { 7,    7,      "sixteen" }
188 };
189 static const unsigned int asn_MAP_si_RequestPeriod_enum2value_13[] = {
190         4,      /* eight(4) */
191         2,      /* four(2) */
192         0,      /* one(0) */
193         3,      /* six(3) */
194         7,      /* sixteen(7) */
195         5,      /* ten(5) */
196         6,      /* twelve(6) */
197         1       /* two(1) */
198 };
199 static const asn_INTEGER_specifics_t asn_SPC_si_RequestPeriod_specs_13 = {
200         asn_MAP_si_RequestPeriod_value2enum_13, /* "tag" => N; sorted by tag */
201         asn_MAP_si_RequestPeriod_enum2value_13, /* N => "tag"; sorted by N */
202         8,      /* Number of elements in the maps */
203         0,      /* Enumeration is not extensible */
204         1,      /* Strict enumeration */
205         0,      /* Native long size */
206         0
207 };
208 static const ber_tlv_tag_t asn_DEF_si_RequestPeriod_tags_13[] = {
209         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
210         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
211 };
212 static /* Use -fall-defs-global to expose */
213 asn_TYPE_descriptor_t asn_DEF_si_RequestPeriod_13 = {
214         "si-RequestPeriod",
215         "si-RequestPeriod",
216         &asn_OP_NativeEnumerated,
217         asn_DEF_si_RequestPeriod_tags_13,
218         sizeof(asn_DEF_si_RequestPeriod_tags_13)
219                 /sizeof(asn_DEF_si_RequestPeriod_tags_13[0]) - 1, /* 1 */
220         asn_DEF_si_RequestPeriod_tags_13,       /* Same as above */
221         sizeof(asn_DEF_si_RequestPeriod_tags_13)
222                 /sizeof(asn_DEF_si_RequestPeriod_tags_13[0]), /* 2 */
223         { &asn_OER_type_si_RequestPeriod_constr_13, &asn_PER_type_si_RequestPeriod_constr_13, NativeEnumerated_constraint },
224         0, 0,   /* Defined elsewhere */
225         &asn_SPC_si_RequestPeriod_specs_13      /* Additional specs */
226 };
227
228 static asn_TYPE_member_t asn_MBR_si_RequestResources_22[] = {
229         { ATF_POINTER, 0, 0,
230                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
231                 0,
232                 &asn_DEF_SI_RequestResources,
233                 0,
234                 { 0, 0, 0 },
235                 0, 0, /* No default value */
236                 ""
237                 },
238 };
239 static const ber_tlv_tag_t asn_DEF_si_RequestResources_tags_22[] = {
240         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
241         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
242 };
243 static asn_SET_OF_specifics_t asn_SPC_si_RequestResources_specs_22 = {
244         sizeof(struct SI_RequestConfig__si_RequestResources),
245         offsetof(struct SI_RequestConfig__si_RequestResources, _asn_ctx),
246         0,      /* XER encoding is XMLDelimitedItemList */
247 };
248 static /* Use -fall-defs-global to expose */
249 asn_TYPE_descriptor_t asn_DEF_si_RequestResources_22 = {
250         "si-RequestResources",
251         "si-RequestResources",
252         &asn_OP_SEQUENCE_OF,
253         asn_DEF_si_RequestResources_tags_22,
254         sizeof(asn_DEF_si_RequestResources_tags_22)
255                 /sizeof(asn_DEF_si_RequestResources_tags_22[0]) - 1, /* 1 */
256         asn_DEF_si_RequestResources_tags_22,    /* Same as above */
257         sizeof(asn_DEF_si_RequestResources_tags_22)
258                 /sizeof(asn_DEF_si_RequestResources_tags_22[0]), /* 2 */
259         { &asn_OER_type_si_RequestResources_constr_22, &asn_PER_type_si_RequestResources_constr_22, SEQUENCE_OF_constraint },
260         asn_MBR_si_RequestResources_22,
261         1,      /* Single element */
262         &asn_SPC_si_RequestResources_specs_22   /* Additional specs */
263 };
264
265 asn_TYPE_member_t asn_MBR_SI_RequestConfig_1[] = {
266         { ATF_POINTER, 2, offsetof(struct SI_RequestConfig, rach_OccasionsSI),
267                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
268                 0,
269                 &asn_DEF_rach_OccasionsSI_2,
270                 0,
271                 { 0, 0, 0 },
272                 0, 0, /* No default value */
273                 "rach-OccasionsSI"
274                 },
275         { ATF_POINTER, 1, offsetof(struct SI_RequestConfig, si_RequestPeriod),
276                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
277                 -1,     /* IMPLICIT tag at current level */
278                 &asn_DEF_si_RequestPeriod_13,
279                 0,
280                 { 0, 0, 0 },
281                 0, 0, /* No default value */
282                 "si-RequestPeriod"
283                 },
284         { ATF_NOFLAGS, 0, offsetof(struct SI_RequestConfig, si_RequestResources),
285                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
286                 0,
287                 &asn_DEF_si_RequestResources_22,
288                 0,
289                 { &asn_OER_memb_si_RequestResources_constr_22, &asn_PER_memb_si_RequestResources_constr_22,  memb_si_RequestResources_constraint_1 },
290                 0, 0, /* No default value */
291                 "si-RequestResources"
292                 },
293 };
294 static const int asn_MAP_SI_RequestConfig_oms_1[] = { 0, 1 };
295 static const ber_tlv_tag_t asn_DEF_SI_RequestConfig_tags_1[] = {
296         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
297 };
298 static const asn_TYPE_tag2member_t asn_MAP_SI_RequestConfig_tag2el_1[] = {
299     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rach-OccasionsSI */
300     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* si-RequestPeriod */
301     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* si-RequestResources */
302 };
303 asn_SEQUENCE_specifics_t asn_SPC_SI_RequestConfig_specs_1 = {
304         sizeof(struct SI_RequestConfig),
305         offsetof(struct SI_RequestConfig, _asn_ctx),
306         asn_MAP_SI_RequestConfig_tag2el_1,
307         3,      /* Count of tags in the map */
308         asn_MAP_SI_RequestConfig_oms_1, /* Optional members */
309         2, 0,   /* Root/Additions */
310         -1,     /* First extension addition */
311 };
312 asn_TYPE_descriptor_t asn_DEF_SI_RequestConfig = {
313         "SI-RequestConfig",
314         "SI-RequestConfig",
315         &asn_OP_SEQUENCE,
316         asn_DEF_SI_RequestConfig_tags_1,
317         sizeof(asn_DEF_SI_RequestConfig_tags_1)
318                 /sizeof(asn_DEF_SI_RequestConfig_tags_1[0]), /* 1 */
319         asn_DEF_SI_RequestConfig_tags_1,        /* Same as above */
320         sizeof(asn_DEF_SI_RequestConfig_tags_1)
321                 /sizeof(asn_DEF_SI_RequestConfig_tags_1[0]), /* 1 */
322         { 0, 0, SEQUENCE_constraint },
323         asn_MBR_SI_RequestConfig_1,
324         3,      /* Elements count */
325         &asn_SPC_SI_RequestConfig_specs_1       /* Additional specs */
326 };
327