[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / SDAP-Config.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "../../../rrc_15.3_asn.asn1"
5  *      `asn1c -D ./25_02_2022_RRC/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "SDAP-Config.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 static int
19 memb_mappedQoS_FlowsToAdd_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 <= 64)) {
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 int
45 memb_mappedQoS_FlowsToRelease_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
46                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
47         size_t size;
48         
49         if(!sptr) {
50                 ASN__CTFAIL(app_key, td, sptr,
51                         "%s: value not given (%s:%d)",
52                         td->name, __FILE__, __LINE__);
53                 return -1;
54         }
55         
56         /* Determine the number of elements */
57         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
58         
59         if((size >= 1 && size <= 64)) {
60                 /* Perform validation of the inner elements */
61                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
62         } else {
63                 ASN__CTFAIL(app_key, td, sptr,
64                         "%s: constraint failed (%s:%d)",
65                         td->name, __FILE__, __LINE__);
66                 return -1;
67         }
68 }
69
70 static asn_oer_constraints_t asn_OER_type_sdap_HeaderDL_constr_3 CC_NOTUSED = {
71         { 0, 0 },
72         -1};
73 static asn_per_constraints_t asn_PER_type_sdap_HeaderDL_constr_3 CC_NOTUSED = {
74         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
75         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
76         0, 0    /* No PER value map */
77 };
78 static asn_oer_constraints_t asn_OER_type_sdap_HeaderUL_constr_6 CC_NOTUSED = {
79         { 0, 0 },
80         -1};
81 static asn_per_constraints_t asn_PER_type_sdap_HeaderUL_constr_6 CC_NOTUSED = {
82         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
83         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
84         0, 0    /* No PER value map */
85 };
86 static asn_oer_constraints_t asn_OER_type_mappedQoS_FlowsToAdd_constr_10 CC_NOTUSED = {
87         { 0, 0 },
88         -1      /* (SIZE(1..64)) */};
89 static asn_per_constraints_t asn_PER_type_mappedQoS_FlowsToAdd_constr_10 CC_NOTUSED = {
90         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
91         { APC_CONSTRAINED,       6,  6,  1,  64 }       /* (SIZE(1..64)) */,
92         0, 0    /* No PER value map */
93 };
94 static asn_oer_constraints_t asn_OER_type_mappedQoS_FlowsToRelease_constr_12 CC_NOTUSED = {
95         { 0, 0 },
96         -1      /* (SIZE(1..64)) */};
97 static asn_per_constraints_t asn_PER_type_mappedQoS_FlowsToRelease_constr_12 CC_NOTUSED = {
98         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
99         { APC_CONSTRAINED,       6,  6,  1,  64 }       /* (SIZE(1..64)) */,
100         0, 0    /* No PER value map */
101 };
102 static asn_oer_constraints_t asn_OER_memb_mappedQoS_FlowsToAdd_constr_10 CC_NOTUSED = {
103         { 0, 0 },
104         -1      /* (SIZE(1..64)) */};
105 static asn_per_constraints_t asn_PER_memb_mappedQoS_FlowsToAdd_constr_10 CC_NOTUSED = {
106         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
107         { APC_CONSTRAINED,       6,  6,  1,  64 }       /* (SIZE(1..64)) */,
108         0, 0    /* No PER value map */
109 };
110 static asn_oer_constraints_t asn_OER_memb_mappedQoS_FlowsToRelease_constr_12 CC_NOTUSED = {
111         { 0, 0 },
112         -1      /* (SIZE(1..64)) */};
113 static asn_per_constraints_t asn_PER_memb_mappedQoS_FlowsToRelease_constr_12 CC_NOTUSED = {
114         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
115         { APC_CONSTRAINED,       6,  6,  1,  64 }       /* (SIZE(1..64)) */,
116         0, 0    /* No PER value map */
117 };
118 static const asn_INTEGER_enum_map_t asn_MAP_sdap_HeaderDL_value2enum_3[] = {
119         { 0,    7,      "present" },
120         { 1,    6,      "absent" }
121 };
122 static const unsigned int asn_MAP_sdap_HeaderDL_enum2value_3[] = {
123         1,      /* absent(1) */
124         0       /* present(0) */
125 };
126 static const asn_INTEGER_specifics_t asn_SPC_sdap_HeaderDL_specs_3 = {
127         asn_MAP_sdap_HeaderDL_value2enum_3,     /* "tag" => N; sorted by tag */
128         asn_MAP_sdap_HeaderDL_enum2value_3,     /* N => "tag"; sorted by N */
129         2,      /* Number of elements in the maps */
130         0,      /* Enumeration is not extensible */
131         1,      /* Strict enumeration */
132         0,      /* Native long size */
133         0
134 };
135 static const ber_tlv_tag_t asn_DEF_sdap_HeaderDL_tags_3[] = {
136         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
137         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
138 };
139 static /* Use -fall-defs-global to expose */
140 asn_TYPE_descriptor_t asn_DEF_sdap_HeaderDL_3 = {
141         "sdap-HeaderDL",
142         "sdap-HeaderDL",
143         &asn_OP_NativeEnumerated,
144         asn_DEF_sdap_HeaderDL_tags_3,
145         sizeof(asn_DEF_sdap_HeaderDL_tags_3)
146                 /sizeof(asn_DEF_sdap_HeaderDL_tags_3[0]) - 1, /* 1 */
147         asn_DEF_sdap_HeaderDL_tags_3,   /* Same as above */
148         sizeof(asn_DEF_sdap_HeaderDL_tags_3)
149                 /sizeof(asn_DEF_sdap_HeaderDL_tags_3[0]), /* 2 */
150         { &asn_OER_type_sdap_HeaderDL_constr_3, &asn_PER_type_sdap_HeaderDL_constr_3, NativeEnumerated_constraint },
151         0, 0,   /* Defined elsewhere */
152         &asn_SPC_sdap_HeaderDL_specs_3  /* Additional specs */
153 };
154
155 static const asn_INTEGER_enum_map_t asn_MAP_sdap_HeaderUL_value2enum_6[] = {
156         { 0,    7,      "present" },
157         { 1,    6,      "absent" }
158 };
159 static const unsigned int asn_MAP_sdap_HeaderUL_enum2value_6[] = {
160         1,      /* absent(1) */
161         0       /* present(0) */
162 };
163 static const asn_INTEGER_specifics_t asn_SPC_sdap_HeaderUL_specs_6 = {
164         asn_MAP_sdap_HeaderUL_value2enum_6,     /* "tag" => N; sorted by tag */
165         asn_MAP_sdap_HeaderUL_enum2value_6,     /* N => "tag"; sorted by N */
166         2,      /* Number of elements in the maps */
167         0,      /* Enumeration is not extensible */
168         1,      /* Strict enumeration */
169         0,      /* Native long size */
170         0
171 };
172 static const ber_tlv_tag_t asn_DEF_sdap_HeaderUL_tags_6[] = {
173         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
174         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
175 };
176 static /* Use -fall-defs-global to expose */
177 asn_TYPE_descriptor_t asn_DEF_sdap_HeaderUL_6 = {
178         "sdap-HeaderUL",
179         "sdap-HeaderUL",
180         &asn_OP_NativeEnumerated,
181         asn_DEF_sdap_HeaderUL_tags_6,
182         sizeof(asn_DEF_sdap_HeaderUL_tags_6)
183                 /sizeof(asn_DEF_sdap_HeaderUL_tags_6[0]) - 1, /* 1 */
184         asn_DEF_sdap_HeaderUL_tags_6,   /* Same as above */
185         sizeof(asn_DEF_sdap_HeaderUL_tags_6)
186                 /sizeof(asn_DEF_sdap_HeaderUL_tags_6[0]), /* 2 */
187         { &asn_OER_type_sdap_HeaderUL_constr_6, &asn_PER_type_sdap_HeaderUL_constr_6, NativeEnumerated_constraint },
188         0, 0,   /* Defined elsewhere */
189         &asn_SPC_sdap_HeaderUL_specs_6  /* Additional specs */
190 };
191
192 static asn_TYPE_member_t asn_MBR_mappedQoS_FlowsToAdd_10[] = {
193         { ATF_POINTER, 0, 0,
194                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
195                 0,
196                 &asn_DEF_QFI,
197                 0,
198                 { 0, 0, 0 },
199                 0, 0, /* No default value */
200                 ""
201                 },
202 };
203 static const ber_tlv_tag_t asn_DEF_mappedQoS_FlowsToAdd_tags_10[] = {
204         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
205         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
206 };
207 static asn_SET_OF_specifics_t asn_SPC_mappedQoS_FlowsToAdd_specs_10 = {
208         sizeof(struct SDAP_Config__mappedQoS_FlowsToAdd),
209         offsetof(struct SDAP_Config__mappedQoS_FlowsToAdd, _asn_ctx),
210         0,      /* XER encoding is XMLDelimitedItemList */
211 };
212 static /* Use -fall-defs-global to expose */
213 asn_TYPE_descriptor_t asn_DEF_mappedQoS_FlowsToAdd_10 = {
214         "mappedQoS-FlowsToAdd",
215         "mappedQoS-FlowsToAdd",
216         &asn_OP_SEQUENCE_OF,
217         asn_DEF_mappedQoS_FlowsToAdd_tags_10,
218         sizeof(asn_DEF_mappedQoS_FlowsToAdd_tags_10)
219                 /sizeof(asn_DEF_mappedQoS_FlowsToAdd_tags_10[0]) - 1, /* 1 */
220         asn_DEF_mappedQoS_FlowsToAdd_tags_10,   /* Same as above */
221         sizeof(asn_DEF_mappedQoS_FlowsToAdd_tags_10)
222                 /sizeof(asn_DEF_mappedQoS_FlowsToAdd_tags_10[0]), /* 2 */
223         { &asn_OER_type_mappedQoS_FlowsToAdd_constr_10, &asn_PER_type_mappedQoS_FlowsToAdd_constr_10, SEQUENCE_OF_constraint },
224         asn_MBR_mappedQoS_FlowsToAdd_10,
225         1,      /* Single element */
226         &asn_SPC_mappedQoS_FlowsToAdd_specs_10  /* Additional specs */
227 };
228
229 static asn_TYPE_member_t asn_MBR_mappedQoS_FlowsToRelease_12[] = {
230         { ATF_POINTER, 0, 0,
231                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
232                 0,
233                 &asn_DEF_QFI,
234                 0,
235                 { 0, 0, 0 },
236                 0, 0, /* No default value */
237                 ""
238                 },
239 };
240 static const ber_tlv_tag_t asn_DEF_mappedQoS_FlowsToRelease_tags_12[] = {
241         (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
242         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
243 };
244 static asn_SET_OF_specifics_t asn_SPC_mappedQoS_FlowsToRelease_specs_12 = {
245         sizeof(struct SDAP_Config__mappedQoS_FlowsToRelease),
246         offsetof(struct SDAP_Config__mappedQoS_FlowsToRelease, _asn_ctx),
247         0,      /* XER encoding is XMLDelimitedItemList */
248 };
249 static /* Use -fall-defs-global to expose */
250 asn_TYPE_descriptor_t asn_DEF_mappedQoS_FlowsToRelease_12 = {
251         "mappedQoS-FlowsToRelease",
252         "mappedQoS-FlowsToRelease",
253         &asn_OP_SEQUENCE_OF,
254         asn_DEF_mappedQoS_FlowsToRelease_tags_12,
255         sizeof(asn_DEF_mappedQoS_FlowsToRelease_tags_12)
256                 /sizeof(asn_DEF_mappedQoS_FlowsToRelease_tags_12[0]) - 1, /* 1 */
257         asn_DEF_mappedQoS_FlowsToRelease_tags_12,       /* Same as above */
258         sizeof(asn_DEF_mappedQoS_FlowsToRelease_tags_12)
259                 /sizeof(asn_DEF_mappedQoS_FlowsToRelease_tags_12[0]), /* 2 */
260         { &asn_OER_type_mappedQoS_FlowsToRelease_constr_12, &asn_PER_type_mappedQoS_FlowsToRelease_constr_12, SEQUENCE_OF_constraint },
261         asn_MBR_mappedQoS_FlowsToRelease_12,
262         1,      /* Single element */
263         &asn_SPC_mappedQoS_FlowsToRelease_specs_12      /* Additional specs */
264 };
265
266 asn_TYPE_member_t asn_MBR_SDAP_Config_1[] = {
267         { ATF_NOFLAGS, 0, offsetof(struct SDAP_Config, pdu_Session),
268                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
269                 -1,     /* IMPLICIT tag at current level */
270                 &asn_DEF_PDU_SessionID,
271                 0,
272                 { 0, 0, 0 },
273                 0, 0, /* No default value */
274                 "pdu-Session"
275                 },
276         { ATF_NOFLAGS, 0, offsetof(struct SDAP_Config, sdap_HeaderDL),
277                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
278                 -1,     /* IMPLICIT tag at current level */
279                 &asn_DEF_sdap_HeaderDL_3,
280                 0,
281                 { 0, 0, 0 },
282                 0, 0, /* No default value */
283                 "sdap-HeaderDL"
284                 },
285         { ATF_NOFLAGS, 0, offsetof(struct SDAP_Config, sdap_HeaderUL),
286                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
287                 -1,     /* IMPLICIT tag at current level */
288                 &asn_DEF_sdap_HeaderUL_6,
289                 0,
290                 { 0, 0, 0 },
291                 0, 0, /* No default value */
292                 "sdap-HeaderUL"
293                 },
294         { ATF_NOFLAGS, 0, offsetof(struct SDAP_Config, defaultDRB),
295                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
296                 -1,     /* IMPLICIT tag at current level */
297                 &asn_DEF_BOOLEAN,
298                 0,
299                 { 0, 0, 0 },
300                 0, 0, /* No default value */
301                 "defaultDRB"
302                 },
303         { ATF_POINTER, 2, offsetof(struct SDAP_Config, mappedQoS_FlowsToAdd),
304                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
305                 0,
306                 &asn_DEF_mappedQoS_FlowsToAdd_10,
307                 0,
308                 { &asn_OER_memb_mappedQoS_FlowsToAdd_constr_10, &asn_PER_memb_mappedQoS_FlowsToAdd_constr_10,  memb_mappedQoS_FlowsToAdd_constraint_1 },
309                 0, 0, /* No default value */
310                 "mappedQoS-FlowsToAdd"
311                 },
312         { ATF_POINTER, 1, offsetof(struct SDAP_Config, mappedQoS_FlowsToRelease),
313                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
314                 0,
315                 &asn_DEF_mappedQoS_FlowsToRelease_12,
316                 0,
317                 { &asn_OER_memb_mappedQoS_FlowsToRelease_constr_12, &asn_PER_memb_mappedQoS_FlowsToRelease_constr_12,  memb_mappedQoS_FlowsToRelease_constraint_1 },
318                 0, 0, /* No default value */
319                 "mappedQoS-FlowsToRelease"
320                 },
321 };
322 static const int asn_MAP_SDAP_Config_oms_1[] = { 4, 5 };
323 static const ber_tlv_tag_t asn_DEF_SDAP_Config_tags_1[] = {
324         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
325 };
326 static const asn_TYPE_tag2member_t asn_MAP_SDAP_Config_tag2el_1[] = {
327     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pdu-Session */
328     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sdap-HeaderDL */
329     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sdap-HeaderUL */
330     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* defaultDRB */
331     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* mappedQoS-FlowsToAdd */
332     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* mappedQoS-FlowsToRelease */
333 };
334 asn_SEQUENCE_specifics_t asn_SPC_SDAP_Config_specs_1 = {
335         sizeof(struct SDAP_Config),
336         offsetof(struct SDAP_Config, _asn_ctx),
337         asn_MAP_SDAP_Config_tag2el_1,
338         6,      /* Count of tags in the map */
339         asn_MAP_SDAP_Config_oms_1,      /* Optional members */
340         2, 0,   /* Root/Additions */
341         6,      /* First extension addition */
342 };
343 asn_TYPE_descriptor_t asn_DEF_SDAP_Config = {
344         "SDAP-Config",
345         "SDAP-Config",
346         &asn_OP_SEQUENCE,
347         asn_DEF_SDAP_Config_tags_1,
348         sizeof(asn_DEF_SDAP_Config_tags_1)
349                 /sizeof(asn_DEF_SDAP_Config_tags_1[0]), /* 1 */
350         asn_DEF_SDAP_Config_tags_1,     /* Same as above */
351         sizeof(asn_DEF_SDAP_Config_tags_1)
352                 /sizeof(asn_DEF_SDAP_Config_tags_1[0]), /* 1 */
353         { 0, 0, SEQUENCE_constraint },
354         asn_MBR_SDAP_Config_1,
355         6,      /* Elements count */
356         &asn_SPC_SDAP_Config_specs_1    /* Additional specs */
357 };
358