b80d500003d4fa67f57f231ce374c9bca7d28bb1
[o-du/l2.git] / src / codec_utils / RRC / SystemInformation-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 "SystemInformation-IEs.h"
9
10 #include "SIB2.h"
11 #include "SIB3.h"
12 #include "SIB4.h"
13 #include "SIB5.h"
14 #include "SIB6.h"
15 #include "SIB7.h"
16 #include "SIB8.h"
17 #include "SIB9.h"
18 static int
19 memb_sib_TypeAndInfo_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
20                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
21         size_t size;
22         
23         if(!sptr) {
24                 ASN__CTFAIL(app_key, td, sptr,
25                         "%s: value not given (%s:%d)",
26                         td->name, __FILE__, __LINE__);
27                 return -1;
28         }
29         
30         /* Determine the number of elements */
31         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
32         
33         if((size >= 1 && size <= 32)) {
34                 /* Perform validation of the inner elements */
35                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
36         } else {
37                 ASN__CTFAIL(app_key, td, sptr,
38                         "%s: constraint failed (%s:%d)",
39                         td->name, __FILE__, __LINE__);
40                 return -1;
41         }
42 }
43
44 static asn_oer_constraints_t asn_OER_type_Member_constr_3 CC_NOTUSED = {
45         { 0, 0 },
46         -1};
47 static asn_per_constraints_t asn_PER_type_Member_constr_3 CC_NOTUSED = {
48         { APC_CONSTRAINED | APC_EXTENSIBLE,  3,  3,  0,  7 }    /* (0..7,...) */,
49         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
50         0, 0    /* No PER value map */
51 };
52 static asn_oer_constraints_t asn_OER_type_sib_TypeAndInfo_constr_2 CC_NOTUSED = {
53         { 0, 0 },
54         -1      /* (SIZE(1..32)) */};
55 static asn_per_constraints_t asn_PER_type_sib_TypeAndInfo_constr_2 CC_NOTUSED = {
56         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
57         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
58         0, 0    /* No PER value map */
59 };
60 static asn_oer_constraints_t asn_OER_memb_sib_TypeAndInfo_constr_2 CC_NOTUSED = {
61         { 0, 0 },
62         -1      /* (SIZE(1..32)) */};
63 static asn_per_constraints_t asn_PER_memb_sib_TypeAndInfo_constr_2 CC_NOTUSED = {
64         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
65         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
66         0, 0    /* No PER value map */
67 };
68 static asn_TYPE_member_t asn_MBR_Member_3[] = {
69         { ATF_POINTER, 0, offsetof(struct SystemInformation_IEs__sib_TypeAndInfo__Member, choice.sib2),
70                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
71                 -1,     /* IMPLICIT tag at current level */
72                 &asn_DEF_SIB2,
73                 0,
74                 { 0, 0, 0 },
75                 0, 0, /* No default value */
76                 "sib2"
77                 },
78         { ATF_POINTER, 0, offsetof(struct SystemInformation_IEs__sib_TypeAndInfo__Member, choice.sib3),
79                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
80                 -1,     /* IMPLICIT tag at current level */
81                 &asn_DEF_SIB3,
82                 0,
83                 { 0, 0, 0 },
84                 0, 0, /* No default value */
85                 "sib3"
86                 },
87         { ATF_POINTER, 0, offsetof(struct SystemInformation_IEs__sib_TypeAndInfo__Member, choice.sib4),
88                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
89                 -1,     /* IMPLICIT tag at current level */
90                 &asn_DEF_SIB4,
91                 0,
92                 { 0, 0, 0 },
93                 0, 0, /* No default value */
94                 "sib4"
95                 },
96         { ATF_POINTER, 0, offsetof(struct SystemInformation_IEs__sib_TypeAndInfo__Member, choice.sib5),
97                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
98                 -1,     /* IMPLICIT tag at current level */
99                 &asn_DEF_SIB5,
100                 0,
101                 { 0, 0, 0 },
102                 0, 0, /* No default value */
103                 "sib5"
104                 },
105         { ATF_POINTER, 0, offsetof(struct SystemInformation_IEs__sib_TypeAndInfo__Member, choice.sib6),
106                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
107                 -1,     /* IMPLICIT tag at current level */
108                 &asn_DEF_SIB6,
109                 0,
110                 { 0, 0, 0 },
111                 0, 0, /* No default value */
112                 "sib6"
113                 },
114         { ATF_POINTER, 0, offsetof(struct SystemInformation_IEs__sib_TypeAndInfo__Member, choice.sib7),
115                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
116                 -1,     /* IMPLICIT tag at current level */
117                 &asn_DEF_SIB7,
118                 0,
119                 { 0, 0, 0 },
120                 0, 0, /* No default value */
121                 "sib7"
122                 },
123         { ATF_POINTER, 0, offsetof(struct SystemInformation_IEs__sib_TypeAndInfo__Member, choice.sib8),
124                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
125                 -1,     /* IMPLICIT tag at current level */
126                 &asn_DEF_SIB8,
127                 0,
128                 { 0, 0, 0 },
129                 0, 0, /* No default value */
130                 "sib8"
131                 },
132         { ATF_POINTER, 0, offsetof(struct SystemInformation_IEs__sib_TypeAndInfo__Member, choice.sib9),
133                 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
134                 -1,     /* IMPLICIT tag at current level */
135                 &asn_DEF_SIB9,
136                 0,
137                 { 0, 0, 0 },
138                 0, 0, /* No default value */
139                 "sib9"
140                 },
141 };
142 static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_3[] = {
143     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sib2 */
144     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sib3 */
145     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sib4 */
146     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* sib5 */
147     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* sib6 */
148     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* sib7 */
149     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* sib8 */
150     { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* sib9 */
151 };
152 static asn_CHOICE_specifics_t asn_SPC_Member_specs_3 = {
153         sizeof(struct SystemInformation_IEs__sib_TypeAndInfo__Member),
154         offsetof(struct SystemInformation_IEs__sib_TypeAndInfo__Member, _asn_ctx),
155         offsetof(struct SystemInformation_IEs__sib_TypeAndInfo__Member, present),
156         sizeof(((struct SystemInformation_IEs__sib_TypeAndInfo__Member *)0)->present),
157         asn_MAP_Member_tag2el_3,
158         8,      /* Count of tags in the map */
159         0, 0,
160         8       /* Extensions start */
161 };
162 static /* Use -fall-defs-global to expose */
163 asn_TYPE_descriptor_t asn_DEF_Member_3 = {
164         "CHOICE",
165         "CHOICE",
166         &asn_OP_CHOICE,
167         0,      /* No effective tags (pointer) */
168         0,      /* No effective tags (count) */
169         0,      /* No tags (pointer) */
170         0,      /* No tags (count) */
171         { &asn_OER_type_Member_constr_3, &asn_PER_type_Member_constr_3, CHOICE_constraint },
172         asn_MBR_Member_3,
173         8,      /* Elements count */
174         &asn_SPC_Member_specs_3 /* Additional specs */
175 };
176
177 static asn_TYPE_member_t asn_MBR_sib_TypeAndInfo_2[] = {
178         { ATF_POINTER, 0, 0,
179                 -1 /* Ambiguous tag (CHOICE?) */,
180                 0,
181                 &asn_DEF_Member_3,
182                 0,
183                 { 0, 0, 0 },
184                 0, 0, /* No default value */
185                 ""
186                 },
187 };
188 static const ber_tlv_tag_t asn_DEF_sib_TypeAndInfo_tags_2[] = {
189         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
190         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
191 };
192 static asn_SET_OF_specifics_t asn_SPC_sib_TypeAndInfo_specs_2 = {
193         sizeof(struct SystemInformation_IEs__sib_TypeAndInfo),
194         offsetof(struct SystemInformation_IEs__sib_TypeAndInfo, _asn_ctx),
195         2,      /* XER encoding is XMLValueList */
196 };
197 static /* Use -fall-defs-global to expose */
198 asn_TYPE_descriptor_t asn_DEF_sib_TypeAndInfo_2 = {
199         "sib-TypeAndInfo",
200         "sib-TypeAndInfo",
201         &asn_OP_SEQUENCE_OF,
202         asn_DEF_sib_TypeAndInfo_tags_2,
203         sizeof(asn_DEF_sib_TypeAndInfo_tags_2)
204                 /sizeof(asn_DEF_sib_TypeAndInfo_tags_2[0]) - 1, /* 1 */
205         asn_DEF_sib_TypeAndInfo_tags_2, /* Same as above */
206         sizeof(asn_DEF_sib_TypeAndInfo_tags_2)
207                 /sizeof(asn_DEF_sib_TypeAndInfo_tags_2[0]), /* 2 */
208         { &asn_OER_type_sib_TypeAndInfo_constr_2, &asn_PER_type_sib_TypeAndInfo_constr_2, SEQUENCE_OF_constraint },
209         asn_MBR_sib_TypeAndInfo_2,
210         1,      /* Single element */
211         &asn_SPC_sib_TypeAndInfo_specs_2        /* Additional specs */
212 };
213
214 static const ber_tlv_tag_t asn_DEF_nonCriticalExtension_tags_14[] = {
215         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
216         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
217 };
218 static asn_SEQUENCE_specifics_t asn_SPC_nonCriticalExtension_specs_14 = {
219         sizeof(struct SystemInformation_IEs__nonCriticalExtension),
220         offsetof(struct SystemInformation_IEs__nonCriticalExtension, _asn_ctx),
221         0,      /* No top level tags */
222         0,      /* No tags in the map */
223         0, 0, 0,        /* Optional elements (not needed) */
224         -1,     /* First extension addition */
225 };
226 static /* Use -fall-defs-global to expose */
227 asn_TYPE_descriptor_t asn_DEF_nonCriticalExtension_14 = {
228         "nonCriticalExtension",
229         "nonCriticalExtension",
230         &asn_OP_SEQUENCE,
231         asn_DEF_nonCriticalExtension_tags_14,
232         sizeof(asn_DEF_nonCriticalExtension_tags_14)
233                 /sizeof(asn_DEF_nonCriticalExtension_tags_14[0]) - 1, /* 1 */
234         asn_DEF_nonCriticalExtension_tags_14,   /* Same as above */
235         sizeof(asn_DEF_nonCriticalExtension_tags_14)
236                 /sizeof(asn_DEF_nonCriticalExtension_tags_14[0]), /* 2 */
237         { 0, 0, SEQUENCE_constraint },
238         0, 0,   /* No members */
239         &asn_SPC_nonCriticalExtension_specs_14  /* Additional specs */
240 };
241
242 asn_TYPE_member_t asn_MBR_SystemInformation_IEs_1[] = {
243         { ATF_NOFLAGS, 0, offsetof(struct SystemInformation_IEs, sib_TypeAndInfo),
244                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
245                 0,
246                 &asn_DEF_sib_TypeAndInfo_2,
247                 0,
248                 { &asn_OER_memb_sib_TypeAndInfo_constr_2, &asn_PER_memb_sib_TypeAndInfo_constr_2,  memb_sib_TypeAndInfo_constraint_1 },
249                 0, 0, /* No default value */
250                 "sib-TypeAndInfo"
251                 },
252         { ATF_POINTER, 2, offsetof(struct SystemInformation_IEs, lateNonCriticalExtension),
253                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
254                 -1,     /* IMPLICIT tag at current level */
255                 &asn_DEF_OCTET_STRING,
256                 0,
257                 { 0, 0, 0 },
258                 0, 0, /* No default value */
259                 "lateNonCriticalExtension"
260                 },
261         { ATF_POINTER, 1, offsetof(struct SystemInformation_IEs, nonCriticalExtension),
262                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
263                 0,
264                 &asn_DEF_nonCriticalExtension_14,
265                 0,
266                 { 0, 0, 0 },
267                 0, 0, /* No default value */
268                 "nonCriticalExtension"
269                 },
270 };
271 static const int asn_MAP_SystemInformation_IEs_oms_1[] = { 1, 2 };
272 static const ber_tlv_tag_t asn_DEF_SystemInformation_IEs_tags_1[] = {
273         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
274 };
275 static const asn_TYPE_tag2member_t asn_MAP_SystemInformation_IEs_tag2el_1[] = {
276     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sib-TypeAndInfo */
277     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* lateNonCriticalExtension */
278     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* nonCriticalExtension */
279 };
280 asn_SEQUENCE_specifics_t asn_SPC_SystemInformation_IEs_specs_1 = {
281         sizeof(struct SystemInformation_IEs),
282         offsetof(struct SystemInformation_IEs, _asn_ctx),
283         asn_MAP_SystemInformation_IEs_tag2el_1,
284         3,      /* Count of tags in the map */
285         asn_MAP_SystemInformation_IEs_oms_1,    /* Optional members */
286         2, 0,   /* Root/Additions */
287         -1,     /* First extension addition */
288 };
289 asn_TYPE_descriptor_t asn_DEF_SystemInformation_IEs = {
290         "SystemInformation-IEs",
291         "SystemInformation-IEs",
292         &asn_OP_SEQUENCE,
293         asn_DEF_SystemInformation_IEs_tags_1,
294         sizeof(asn_DEF_SystemInformation_IEs_tags_1)
295                 /sizeof(asn_DEF_SystemInformation_IEs_tags_1[0]), /* 1 */
296         asn_DEF_SystemInformation_IEs_tags_1,   /* Same as above */
297         sizeof(asn_DEF_SystemInformation_IEs_tags_1)
298                 /sizeof(asn_DEF_SystemInformation_IEs_tags_1[0]), /* 1 */
299         { 0, 0, SEQUENCE_constraint },
300         asn_MBR_SystemInformation_IEs_1,
301         3,      /* Elements count */
302         &asn_SPC_SystemInformation_IEs_specs_1  /* Additional specs */
303 };
304