b9adc95a3e2f199b719d5354076e7b13c5d28e6e
[o-du/l2.git] / src / codec_utils / RRC / RRCReconfiguration-v1530-IEs.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "/home/labadmin/hlal/rrc_15.3_asn.asn1"
5  *      `asn1c -D ./15_3_rrc/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "RRCReconfiguration-v1530-IEs.h"
9
10 #include "MasterKeyUpdate.h"
11 #include "OtherConfig.h"
12 /*
13  * This type is implemented using NativeEnumerated,
14  * so here we adjust the DEF accordingly.
15  */
16 static int
17 memb_masterCellGroup_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
18                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
19         const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
20         
21         if(!sptr) {
22                 ASN__CTFAIL(app_key, td, sptr,
23                         "%s: value not given (%s:%d)",
24                         td->name, __FILE__, __LINE__);
25                 return -1;
26         }
27         
28         
29         if(1 /* No applicable constraints whatsoever */) {
30                 (void)st; /* Unused variable */
31                 /* Nothing is here. See below */
32         }
33         
34         return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
35 }
36
37 static int
38 memb_dedicatedNAS_MessageList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
39                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
40         size_t size;
41         
42         if(!sptr) {
43                 ASN__CTFAIL(app_key, td, sptr,
44                         "%s: value not given (%s:%d)",
45                         td->name, __FILE__, __LINE__);
46                 return -1;
47         }
48         
49         /* Determine the number of elements */
50         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
51         
52         if((size >= 1 && size <= 29)) {
53                 /* Perform validation of the inner elements */
54                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
55         } else {
56                 ASN__CTFAIL(app_key, td, sptr,
57                         "%s: constraint failed (%s:%d)",
58                         td->name, __FILE__, __LINE__);
59                 return -1;
60         }
61 }
62
63 static int
64 memb_dedicatedSIB1_Delivery_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
65                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
66         const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
67         
68         if(!sptr) {
69                 ASN__CTFAIL(app_key, td, sptr,
70                         "%s: value not given (%s:%d)",
71                         td->name, __FILE__, __LINE__);
72                 return -1;
73         }
74         
75         
76         if(1 /* No applicable constraints whatsoever */) {
77                 (void)st; /* Unused variable */
78                 /* Nothing is here. See below */
79         }
80         
81         return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
82 }
83
84 static int
85 memb_dedicatedSystemInformationDelivery_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
86                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
87         const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
88         
89         if(!sptr) {
90                 ASN__CTFAIL(app_key, td, sptr,
91                         "%s: value not given (%s:%d)",
92                         td->name, __FILE__, __LINE__);
93                 return -1;
94         }
95         
96         
97         if(1 /* No applicable constraints whatsoever */) {
98                 (void)st; /* Unused variable */
99                 /* Nothing is here. See below */
100         }
101         
102         return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
103 }
104
105 static asn_oer_constraints_t asn_OER_type_fullConfig_constr_3 CC_NOTUSED = {
106         { 0, 0 },
107         -1};
108 static asn_per_constraints_t asn_PER_type_fullConfig_constr_3 CC_NOTUSED = {
109         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
110         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
111         0, 0    /* No PER value map */
112 };
113 static asn_oer_constraints_t asn_OER_type_dedicatedNAS_MessageList_constr_5 CC_NOTUSED = {
114         { 0, 0 },
115         -1      /* (SIZE(1..29)) */};
116 static asn_per_constraints_t asn_PER_type_dedicatedNAS_MessageList_constr_5 CC_NOTUSED = {
117         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
118         { APC_CONSTRAINED,       5,  5,  1,  29 }       /* (SIZE(1..29)) */,
119         0, 0    /* No PER value map */
120 };
121 static asn_oer_constraints_t asn_OER_memb_masterCellGroup_constr_2 CC_NOTUSED = {
122         { 0, 0 },
123         -1      /* (SIZE(0..MAX)) */};
124 static asn_per_constraints_t asn_PER_memb_masterCellGroup_constr_2 CC_NOTUSED = {
125         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
126         { APC_SEMI_CONSTRAINED, -1, -1,  0,  0 }        /* (SIZE(0..MAX)) */,
127         0, 0    /* No PER value map */
128 };
129 static asn_oer_constraints_t asn_OER_memb_dedicatedNAS_MessageList_constr_5 CC_NOTUSED = {
130         { 0, 0 },
131         -1      /* (SIZE(1..29)) */};
132 static asn_per_constraints_t asn_PER_memb_dedicatedNAS_MessageList_constr_5 CC_NOTUSED = {
133         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
134         { APC_CONSTRAINED,       5,  5,  1,  29 }       /* (SIZE(1..29)) */,
135         0, 0    /* No PER value map */
136 };
137 static asn_oer_constraints_t asn_OER_memb_dedicatedSIB1_Delivery_constr_8 CC_NOTUSED = {
138         { 0, 0 },
139         -1      /* (SIZE(0..MAX)) */};
140 static asn_per_constraints_t asn_PER_memb_dedicatedSIB1_Delivery_constr_8 CC_NOTUSED = {
141         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
142         { APC_SEMI_CONSTRAINED, -1, -1,  0,  0 }        /* (SIZE(0..MAX)) */,
143         0, 0    /* No PER value map */
144 };
145 static asn_oer_constraints_t asn_OER_memb_dedicatedSystemInformationDelivery_constr_9 CC_NOTUSED = {
146         { 0, 0 },
147         -1      /* (SIZE(0..MAX)) */};
148 static asn_per_constraints_t asn_PER_memb_dedicatedSystemInformationDelivery_constr_9 CC_NOTUSED = {
149         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
150         { APC_SEMI_CONSTRAINED, -1, -1,  0,  0 }        /* (SIZE(0..MAX)) */,
151         0, 0    /* No PER value map */
152 };
153 static const asn_INTEGER_enum_map_t asn_MAP_fullConfig_value2enum_3[] = {
154         { 0,    4,      "true" }
155 };
156 static const unsigned int asn_MAP_fullConfig_enum2value_3[] = {
157         0       /* true(0) */
158 };
159 static const asn_INTEGER_specifics_t asn_SPC_fullConfig_specs_3 = {
160         asn_MAP_fullConfig_value2enum_3,        /* "tag" => N; sorted by tag */
161         asn_MAP_fullConfig_enum2value_3,        /* N => "tag"; sorted by N */
162         1,      /* Number of elements in the maps */
163         0,      /* Enumeration is not extensible */
164         1,      /* Strict enumeration */
165         0,      /* Native long size */
166         0
167 };
168 static const ber_tlv_tag_t asn_DEF_fullConfig_tags_3[] = {
169         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
170         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
171 };
172 static /* Use -fall-defs-global to expose */
173 asn_TYPE_descriptor_t asn_DEF_fullConfig_3 = {
174         "fullConfig",
175         "fullConfig",
176         &asn_OP_NativeEnumerated,
177         asn_DEF_fullConfig_tags_3,
178         sizeof(asn_DEF_fullConfig_tags_3)
179                 /sizeof(asn_DEF_fullConfig_tags_3[0]) - 1, /* 1 */
180         asn_DEF_fullConfig_tags_3,      /* Same as above */
181         sizeof(asn_DEF_fullConfig_tags_3)
182                 /sizeof(asn_DEF_fullConfig_tags_3[0]), /* 2 */
183         { &asn_OER_type_fullConfig_constr_3, &asn_PER_type_fullConfig_constr_3, NativeEnumerated_constraint },
184         0, 0,   /* Defined elsewhere */
185         &asn_SPC_fullConfig_specs_3     /* Additional specs */
186 };
187
188 static asn_TYPE_member_t asn_MBR_dedicatedNAS_MessageList_5[] = {
189         { ATF_POINTER, 0, 0,
190                 (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
191                 0,
192                 &asn_DEF_DedicatedNAS_Message,
193                 0,
194                 { 0, 0, 0 },
195                 0, 0, /* No default value */
196                 ""
197                 },
198 };
199 static const ber_tlv_tag_t asn_DEF_dedicatedNAS_MessageList_tags_5[] = {
200         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
201         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
202 };
203 static asn_SET_OF_specifics_t asn_SPC_dedicatedNAS_MessageList_specs_5 = {
204         sizeof(struct RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList),
205         offsetof(struct RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList, _asn_ctx),
206         0,      /* XER encoding is XMLDelimitedItemList */
207 };
208 static /* Use -fall-defs-global to expose */
209 asn_TYPE_descriptor_t asn_DEF_dedicatedNAS_MessageList_5 = {
210         "dedicatedNAS-MessageList",
211         "dedicatedNAS-MessageList",
212         &asn_OP_SEQUENCE_OF,
213         asn_DEF_dedicatedNAS_MessageList_tags_5,
214         sizeof(asn_DEF_dedicatedNAS_MessageList_tags_5)
215                 /sizeof(asn_DEF_dedicatedNAS_MessageList_tags_5[0]) - 1, /* 1 */
216         asn_DEF_dedicatedNAS_MessageList_tags_5,        /* Same as above */
217         sizeof(asn_DEF_dedicatedNAS_MessageList_tags_5)
218                 /sizeof(asn_DEF_dedicatedNAS_MessageList_tags_5[0]), /* 2 */
219         { &asn_OER_type_dedicatedNAS_MessageList_constr_5, &asn_PER_type_dedicatedNAS_MessageList_constr_5, SEQUENCE_OF_constraint },
220         asn_MBR_dedicatedNAS_MessageList_5,
221         1,      /* Single element */
222         &asn_SPC_dedicatedNAS_MessageList_specs_5       /* Additional specs */
223 };
224
225 static const ber_tlv_tag_t asn_DEF_nonCriticalExtension_tags_11[] = {
226         (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
227         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
228 };
229 static asn_SEQUENCE_specifics_t asn_SPC_nonCriticalExtension_specs_11 = {
230         sizeof(struct RRCReconfiguration_v1530_IEs__nonCriticalExtension),
231         offsetof(struct RRCReconfiguration_v1530_IEs__nonCriticalExtension, _asn_ctx),
232         0,      /* No top level tags */
233         0,      /* No tags in the map */
234         0, 0, 0,        /* Optional elements (not needed) */
235         -1,     /* First extension addition */
236 };
237 static /* Use -fall-defs-global to expose */
238 asn_TYPE_descriptor_t asn_DEF_nonCriticalExtension_11 = {
239         "nonCriticalExtension",
240         "nonCriticalExtension",
241         &asn_OP_SEQUENCE,
242         asn_DEF_nonCriticalExtension_tags_11,
243         sizeof(asn_DEF_nonCriticalExtension_tags_11)
244                 /sizeof(asn_DEF_nonCriticalExtension_tags_11[0]) - 1, /* 1 */
245         asn_DEF_nonCriticalExtension_tags_11,   /* Same as above */
246         sizeof(asn_DEF_nonCriticalExtension_tags_11)
247                 /sizeof(asn_DEF_nonCriticalExtension_tags_11[0]), /* 2 */
248         { 0, 0, SEQUENCE_constraint },
249         0, 0,   /* No members */
250         &asn_SPC_nonCriticalExtension_specs_11  /* Additional specs */
251 };
252
253 asn_TYPE_member_t asn_MBR_RRCReconfiguration_v1530_IEs_1[] = {
254         { ATF_POINTER, 8, offsetof(struct RRCReconfiguration_v1530_IEs, masterCellGroup),
255                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
256                 -1,     /* IMPLICIT tag at current level */
257                 &asn_DEF_OCTET_STRING,
258                 0,
259                 { &asn_OER_memb_masterCellGroup_constr_2, &asn_PER_memb_masterCellGroup_constr_2,  memb_masterCellGroup_constraint_1 },
260                 0, 0, /* No default value */
261                 "masterCellGroup"
262                 },
263         { ATF_POINTER, 7, offsetof(struct RRCReconfiguration_v1530_IEs, fullConfig),
264                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
265                 -1,     /* IMPLICIT tag at current level */
266                 &asn_DEF_fullConfig_3,
267                 0,
268                 { 0, 0, 0 },
269                 0, 0, /* No default value */
270                 "fullConfig"
271                 },
272         { ATF_POINTER, 6, offsetof(struct RRCReconfiguration_v1530_IEs, dedicatedNAS_MessageList),
273                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
274                 0,
275                 &asn_DEF_dedicatedNAS_MessageList_5,
276                 0,
277                 { &asn_OER_memb_dedicatedNAS_MessageList_constr_5, &asn_PER_memb_dedicatedNAS_MessageList_constr_5,  memb_dedicatedNAS_MessageList_constraint_1 },
278                 0, 0, /* No default value */
279                 "dedicatedNAS-MessageList"
280                 },
281         { ATF_POINTER, 5, offsetof(struct RRCReconfiguration_v1530_IEs, masterKeyUpdate),
282                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
283                 -1,     /* IMPLICIT tag at current level */
284                 &asn_DEF_MasterKeyUpdate,
285                 0,
286                 { 0, 0, 0 },
287                 0, 0, /* No default value */
288                 "masterKeyUpdate"
289                 },
290         { ATF_POINTER, 4, offsetof(struct RRCReconfiguration_v1530_IEs, dedicatedSIB1_Delivery),
291                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
292                 -1,     /* IMPLICIT tag at current level */
293                 &asn_DEF_OCTET_STRING,
294                 0,
295                 { &asn_OER_memb_dedicatedSIB1_Delivery_constr_8, &asn_PER_memb_dedicatedSIB1_Delivery_constr_8,  memb_dedicatedSIB1_Delivery_constraint_1 },
296                 0, 0, /* No default value */
297                 "dedicatedSIB1-Delivery"
298                 },
299         { ATF_POINTER, 3, offsetof(struct RRCReconfiguration_v1530_IEs, dedicatedSystemInformationDelivery),
300                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
301                 -1,     /* IMPLICIT tag at current level */
302                 &asn_DEF_OCTET_STRING,
303                 0,
304                 { &asn_OER_memb_dedicatedSystemInformationDelivery_constr_9, &asn_PER_memb_dedicatedSystemInformationDelivery_constr_9,  memb_dedicatedSystemInformationDelivery_constraint_1 },
305                 0, 0, /* No default value */
306                 "dedicatedSystemInformationDelivery"
307                 },
308         { ATF_POINTER, 2, offsetof(struct RRCReconfiguration_v1530_IEs, otherConfig),
309                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
310                 -1,     /* IMPLICIT tag at current level */
311                 &asn_DEF_OtherConfig,
312                 0,
313                 { 0, 0, 0 },
314                 0, 0, /* No default value */
315                 "otherConfig"
316                 },
317         { ATF_POINTER, 1, offsetof(struct RRCReconfiguration_v1530_IEs, nonCriticalExtension),
318                 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
319                 0,
320                 &asn_DEF_nonCriticalExtension_11,
321                 0,
322                 { 0, 0, 0 },
323                 0, 0, /* No default value */
324                 "nonCriticalExtension"
325                 },
326 };
327 static const int asn_MAP_RRCReconfiguration_v1530_IEs_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
328 static const ber_tlv_tag_t asn_DEF_RRCReconfiguration_v1530_IEs_tags_1[] = {
329         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
330 };
331 static const asn_TYPE_tag2member_t asn_MAP_RRCReconfiguration_v1530_IEs_tag2el_1[] = {
332     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* masterCellGroup */
333     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* fullConfig */
334     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* dedicatedNAS-MessageList */
335     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* masterKeyUpdate */
336     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* dedicatedSIB1-Delivery */
337     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* dedicatedSystemInformationDelivery */
338     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* otherConfig */
339     { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* nonCriticalExtension */
340 };
341 asn_SEQUENCE_specifics_t asn_SPC_RRCReconfiguration_v1530_IEs_specs_1 = {
342         sizeof(struct RRCReconfiguration_v1530_IEs),
343         offsetof(struct RRCReconfiguration_v1530_IEs, _asn_ctx),
344         asn_MAP_RRCReconfiguration_v1530_IEs_tag2el_1,
345         8,      /* Count of tags in the map */
346         asn_MAP_RRCReconfiguration_v1530_IEs_oms_1,     /* Optional members */
347         8, 0,   /* Root/Additions */
348         -1,     /* First extension addition */
349 };
350 asn_TYPE_descriptor_t asn_DEF_RRCReconfiguration_v1530_IEs = {
351         "RRCReconfiguration-v1530-IEs",
352         "RRCReconfiguration-v1530-IEs",
353         &asn_OP_SEQUENCE,
354         asn_DEF_RRCReconfiguration_v1530_IEs_tags_1,
355         sizeof(asn_DEF_RRCReconfiguration_v1530_IEs_tags_1)
356                 /sizeof(asn_DEF_RRCReconfiguration_v1530_IEs_tags_1[0]), /* 1 */
357         asn_DEF_RRCReconfiguration_v1530_IEs_tags_1,    /* Same as above */
358         sizeof(asn_DEF_RRCReconfiguration_v1530_IEs_tags_1)
359                 /sizeof(asn_DEF_RRCReconfiguration_v1530_IEs_tags_1[0]), /* 1 */
360         { 0, 0, SEQUENCE_constraint },
361         asn_MBR_RRCReconfiguration_v1530_IEs_1,
362         8,      /* Elements count */
363         &asn_SPC_RRCReconfiguration_v1530_IEs_specs_1   /* Additional specs */
364 };
365