[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / CA-ParametersEUTRA.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 "CA-ParametersEUTRA.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_supportedNAICS_2CRS_AP_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 >= 1 && size <= 8)) {
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_supportedBandwidthCombinationSetEUTRA_v1530_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
59                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
60         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
61         size_t size;
62         
63         if(!sptr) {
64                 ASN__CTFAIL(app_key, td, sptr,
65                         "%s: value not given (%s:%d)",
66                         td->name, __FILE__, __LINE__);
67                 return -1;
68         }
69         
70         if(st->size > 0) {
71                 /* Size in bits */
72                 size = 8 * st->size - (st->bits_unused & 0x07);
73         } else {
74                 size = 0;
75         }
76         
77         if((size >= 1 && size <= 32)) {
78                 /* Constraint check succeeded */
79                 return 0;
80         } else {
81                 ASN__CTFAIL(app_key, td, sptr,
82                         "%s: constraint failed (%s:%d)",
83                         td->name, __FILE__, __LINE__);
84                 return -1;
85         }
86 }
87
88 static asn_oer_constraints_t asn_OER_type_multipleTimingAdvance_constr_2 CC_NOTUSED = {
89         { 0, 0 },
90         -1};
91 static asn_per_constraints_t asn_PER_type_multipleTimingAdvance_constr_2 CC_NOTUSED = {
92         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
93         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
94         0, 0    /* No PER value map */
95 };
96 static asn_oer_constraints_t asn_OER_type_simultaneousRx_Tx_constr_4 CC_NOTUSED = {
97         { 0, 0 },
98         -1};
99 static asn_per_constraints_t asn_PER_type_simultaneousRx_Tx_constr_4 CC_NOTUSED = {
100         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
101         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
102         0, 0    /* No PER value map */
103 };
104 static asn_oer_constraints_t asn_OER_type_additionalRx_Tx_PerformanceReq_constr_7 CC_NOTUSED = {
105         { 0, 0 },
106         -1};
107 static asn_per_constraints_t asn_PER_type_additionalRx_Tx_PerformanceReq_constr_7 CC_NOTUSED = {
108         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
109         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
110         0, 0    /* No PER value map */
111 };
112 static asn_oer_constraints_t asn_OER_type_ue_CA_PowerClass_N_constr_9 CC_NOTUSED = {
113         { 0, 0 },
114         -1};
115 static asn_per_constraints_t asn_PER_type_ue_CA_PowerClass_N_constr_9 CC_NOTUSED = {
116         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
117         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
118         0, 0    /* No PER value map */
119 };
120 static asn_oer_constraints_t asn_OER_memb_supportedNAICS_2CRS_AP_constr_6 CC_NOTUSED = {
121         { 0, 0 },
122         -1      /* (SIZE(1..8)) */};
123 static asn_per_constraints_t asn_PER_memb_supportedNAICS_2CRS_AP_constr_6 CC_NOTUSED = {
124         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
125         { APC_CONSTRAINED,       3,  3,  1,  8 }        /* (SIZE(1..8)) */,
126         0, 0    /* No PER value map */
127 };
128 static asn_oer_constraints_t asn_OER_memb_supportedBandwidthCombinationSetEUTRA_v1530_constr_11 CC_NOTUSED = {
129         { 0, 0 },
130         -1      /* (SIZE(1..32)) */};
131 static asn_per_constraints_t asn_PER_memb_supportedBandwidthCombinationSetEUTRA_v1530_constr_11 CC_NOTUSED = {
132         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
133         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
134         0, 0    /* No PER value map */
135 };
136 static const asn_INTEGER_enum_map_t asn_MAP_multipleTimingAdvance_value2enum_2[] = {
137         { 0,    9,      "supported" }
138 };
139 static const unsigned int asn_MAP_multipleTimingAdvance_enum2value_2[] = {
140         0       /* supported(0) */
141 };
142 static const asn_INTEGER_specifics_t asn_SPC_multipleTimingAdvance_specs_2 = {
143         asn_MAP_multipleTimingAdvance_value2enum_2,     /* "tag" => N; sorted by tag */
144         asn_MAP_multipleTimingAdvance_enum2value_2,     /* N => "tag"; sorted by N */
145         1,      /* Number of elements in the maps */
146         0,      /* Enumeration is not extensible */
147         1,      /* Strict enumeration */
148         0,      /* Native long size */
149         0
150 };
151 static const ber_tlv_tag_t asn_DEF_multipleTimingAdvance_tags_2[] = {
152         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
153         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
154 };
155 static /* Use -fall-defs-global to expose */
156 asn_TYPE_descriptor_t asn_DEF_multipleTimingAdvance_2 = {
157         "multipleTimingAdvance",
158         "multipleTimingAdvance",
159         &asn_OP_NativeEnumerated,
160         asn_DEF_multipleTimingAdvance_tags_2,
161         sizeof(asn_DEF_multipleTimingAdvance_tags_2)
162                 /sizeof(asn_DEF_multipleTimingAdvance_tags_2[0]) - 1, /* 1 */
163         asn_DEF_multipleTimingAdvance_tags_2,   /* Same as above */
164         sizeof(asn_DEF_multipleTimingAdvance_tags_2)
165                 /sizeof(asn_DEF_multipleTimingAdvance_tags_2[0]), /* 2 */
166         { &asn_OER_type_multipleTimingAdvance_constr_2, &asn_PER_type_multipleTimingAdvance_constr_2, NativeEnumerated_constraint },
167         0, 0,   /* Defined elsewhere */
168         &asn_SPC_multipleTimingAdvance_specs_2  /* Additional specs */
169 };
170
171 static const asn_INTEGER_enum_map_t asn_MAP_simultaneousRx_Tx_value2enum_4[] = {
172         { 0,    9,      "supported" }
173 };
174 static const unsigned int asn_MAP_simultaneousRx_Tx_enum2value_4[] = {
175         0       /* supported(0) */
176 };
177 static const asn_INTEGER_specifics_t asn_SPC_simultaneousRx_Tx_specs_4 = {
178         asn_MAP_simultaneousRx_Tx_value2enum_4, /* "tag" => N; sorted by tag */
179         asn_MAP_simultaneousRx_Tx_enum2value_4, /* N => "tag"; sorted by N */
180         1,      /* 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_simultaneousRx_Tx_tags_4[] = {
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_simultaneousRx_Tx_4 = {
192         "simultaneousRx-Tx",
193         "simultaneousRx-Tx",
194         &asn_OP_NativeEnumerated,
195         asn_DEF_simultaneousRx_Tx_tags_4,
196         sizeof(asn_DEF_simultaneousRx_Tx_tags_4)
197                 /sizeof(asn_DEF_simultaneousRx_Tx_tags_4[0]) - 1, /* 1 */
198         asn_DEF_simultaneousRx_Tx_tags_4,       /* Same as above */
199         sizeof(asn_DEF_simultaneousRx_Tx_tags_4)
200                 /sizeof(asn_DEF_simultaneousRx_Tx_tags_4[0]), /* 2 */
201         { &asn_OER_type_simultaneousRx_Tx_constr_4, &asn_PER_type_simultaneousRx_Tx_constr_4, NativeEnumerated_constraint },
202         0, 0,   /* Defined elsewhere */
203         &asn_SPC_simultaneousRx_Tx_specs_4      /* Additional specs */
204 };
205
206 static const asn_INTEGER_enum_map_t asn_MAP_additionalRx_Tx_PerformanceReq_value2enum_7[] = {
207         { 0,    9,      "supported" }
208 };
209 static const unsigned int asn_MAP_additionalRx_Tx_PerformanceReq_enum2value_7[] = {
210         0       /* supported(0) */
211 };
212 static const asn_INTEGER_specifics_t asn_SPC_additionalRx_Tx_PerformanceReq_specs_7 = {
213         asn_MAP_additionalRx_Tx_PerformanceReq_value2enum_7,    /* "tag" => N; sorted by tag */
214         asn_MAP_additionalRx_Tx_PerformanceReq_enum2value_7,    /* N => "tag"; sorted by N */
215         1,      /* Number of elements in the maps */
216         0,      /* Enumeration is not extensible */
217         1,      /* Strict enumeration */
218         0,      /* Native long size */
219         0
220 };
221 static const ber_tlv_tag_t asn_DEF_additionalRx_Tx_PerformanceReq_tags_7[] = {
222         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
223         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
224 };
225 static /* Use -fall-defs-global to expose */
226 asn_TYPE_descriptor_t asn_DEF_additionalRx_Tx_PerformanceReq_7 = {
227         "additionalRx-Tx-PerformanceReq",
228         "additionalRx-Tx-PerformanceReq",
229         &asn_OP_NativeEnumerated,
230         asn_DEF_additionalRx_Tx_PerformanceReq_tags_7,
231         sizeof(asn_DEF_additionalRx_Tx_PerformanceReq_tags_7)
232                 /sizeof(asn_DEF_additionalRx_Tx_PerformanceReq_tags_7[0]) - 1, /* 1 */
233         asn_DEF_additionalRx_Tx_PerformanceReq_tags_7,  /* Same as above */
234         sizeof(asn_DEF_additionalRx_Tx_PerformanceReq_tags_7)
235                 /sizeof(asn_DEF_additionalRx_Tx_PerformanceReq_tags_7[0]), /* 2 */
236         { &asn_OER_type_additionalRx_Tx_PerformanceReq_constr_7, &asn_PER_type_additionalRx_Tx_PerformanceReq_constr_7, NativeEnumerated_constraint },
237         0, 0,   /* Defined elsewhere */
238         &asn_SPC_additionalRx_Tx_PerformanceReq_specs_7 /* Additional specs */
239 };
240
241 static const asn_INTEGER_enum_map_t asn_MAP_ue_CA_PowerClass_N_value2enum_9[] = {
242         { 0,    6,      "class2" }
243 };
244 static const unsigned int asn_MAP_ue_CA_PowerClass_N_enum2value_9[] = {
245         0       /* class2(0) */
246 };
247 static const asn_INTEGER_specifics_t asn_SPC_ue_CA_PowerClass_N_specs_9 = {
248         asn_MAP_ue_CA_PowerClass_N_value2enum_9,        /* "tag" => N; sorted by tag */
249         asn_MAP_ue_CA_PowerClass_N_enum2value_9,        /* N => "tag"; sorted by N */
250         1,      /* Number of elements in the maps */
251         0,      /* Enumeration is not extensible */
252         1,      /* Strict enumeration */
253         0,      /* Native long size */
254         0
255 };
256 static const ber_tlv_tag_t asn_DEF_ue_CA_PowerClass_N_tags_9[] = {
257         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
258         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
259 };
260 static /* Use -fall-defs-global to expose */
261 asn_TYPE_descriptor_t asn_DEF_ue_CA_PowerClass_N_9 = {
262         "ue-CA-PowerClass-N",
263         "ue-CA-PowerClass-N",
264         &asn_OP_NativeEnumerated,
265         asn_DEF_ue_CA_PowerClass_N_tags_9,
266         sizeof(asn_DEF_ue_CA_PowerClass_N_tags_9)
267                 /sizeof(asn_DEF_ue_CA_PowerClass_N_tags_9[0]) - 1, /* 1 */
268         asn_DEF_ue_CA_PowerClass_N_tags_9,      /* Same as above */
269         sizeof(asn_DEF_ue_CA_PowerClass_N_tags_9)
270                 /sizeof(asn_DEF_ue_CA_PowerClass_N_tags_9[0]), /* 2 */
271         { &asn_OER_type_ue_CA_PowerClass_N_constr_9, &asn_PER_type_ue_CA_PowerClass_N_constr_9, NativeEnumerated_constraint },
272         0, 0,   /* Defined elsewhere */
273         &asn_SPC_ue_CA_PowerClass_N_specs_9     /* Additional specs */
274 };
275
276 asn_TYPE_member_t asn_MBR_CA_ParametersEUTRA_1[] = {
277         { ATF_POINTER, 6, offsetof(struct CA_ParametersEUTRA, multipleTimingAdvance),
278                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
279                 -1,     /* IMPLICIT tag at current level */
280                 &asn_DEF_multipleTimingAdvance_2,
281                 0,
282                 { 0, 0, 0 },
283                 0, 0, /* No default value */
284                 "multipleTimingAdvance"
285                 },
286         { ATF_POINTER, 5, offsetof(struct CA_ParametersEUTRA, simultaneousRx_Tx),
287                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
288                 -1,     /* IMPLICIT tag at current level */
289                 &asn_DEF_simultaneousRx_Tx_4,
290                 0,
291                 { 0, 0, 0 },
292                 0, 0, /* No default value */
293                 "simultaneousRx-Tx"
294                 },
295         { ATF_POINTER, 4, offsetof(struct CA_ParametersEUTRA, supportedNAICS_2CRS_AP),
296                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
297                 -1,     /* IMPLICIT tag at current level */
298                 &asn_DEF_BIT_STRING,
299                 0,
300                 { &asn_OER_memb_supportedNAICS_2CRS_AP_constr_6, &asn_PER_memb_supportedNAICS_2CRS_AP_constr_6,  memb_supportedNAICS_2CRS_AP_constraint_1 },
301                 0, 0, /* No default value */
302                 "supportedNAICS-2CRS-AP"
303                 },
304         { ATF_POINTER, 3, offsetof(struct CA_ParametersEUTRA, additionalRx_Tx_PerformanceReq),
305                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
306                 -1,     /* IMPLICIT tag at current level */
307                 &asn_DEF_additionalRx_Tx_PerformanceReq_7,
308                 0,
309                 { 0, 0, 0 },
310                 0, 0, /* No default value */
311                 "additionalRx-Tx-PerformanceReq"
312                 },
313         { ATF_POINTER, 2, offsetof(struct CA_ParametersEUTRA, ue_CA_PowerClass_N),
314                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
315                 -1,     /* IMPLICIT tag at current level */
316                 &asn_DEF_ue_CA_PowerClass_N_9,
317                 0,
318                 { 0, 0, 0 },
319                 0, 0, /* No default value */
320                 "ue-CA-PowerClass-N"
321                 },
322         { ATF_POINTER, 1, offsetof(struct CA_ParametersEUTRA, supportedBandwidthCombinationSetEUTRA_v1530),
323                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
324                 -1,     /* IMPLICIT tag at current level */
325                 &asn_DEF_BIT_STRING,
326                 0,
327                 { &asn_OER_memb_supportedBandwidthCombinationSetEUTRA_v1530_constr_11, &asn_PER_memb_supportedBandwidthCombinationSetEUTRA_v1530_constr_11,  memb_supportedBandwidthCombinationSetEUTRA_v1530_constraint_1 },
328                 0, 0, /* No default value */
329                 "supportedBandwidthCombinationSetEUTRA-v1530"
330                 },
331 };
332 static const int asn_MAP_CA_ParametersEUTRA_oms_1[] = { 0, 1, 2, 3, 4, 5 };
333 static const ber_tlv_tag_t asn_DEF_CA_ParametersEUTRA_tags_1[] = {
334         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
335 };
336 static const asn_TYPE_tag2member_t asn_MAP_CA_ParametersEUTRA_tag2el_1[] = {
337     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* multipleTimingAdvance */
338     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* simultaneousRx-Tx */
339     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* supportedNAICS-2CRS-AP */
340     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* additionalRx-Tx-PerformanceReq */
341     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ue-CA-PowerClass-N */
342     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* supportedBandwidthCombinationSetEUTRA-v1530 */
343 };
344 asn_SEQUENCE_specifics_t asn_SPC_CA_ParametersEUTRA_specs_1 = {
345         sizeof(struct CA_ParametersEUTRA),
346         offsetof(struct CA_ParametersEUTRA, _asn_ctx),
347         asn_MAP_CA_ParametersEUTRA_tag2el_1,
348         6,      /* Count of tags in the map */
349         asn_MAP_CA_ParametersEUTRA_oms_1,       /* Optional members */
350         6, 0,   /* Root/Additions */
351         6,      /* First extension addition */
352 };
353 asn_TYPE_descriptor_t asn_DEF_CA_ParametersEUTRA = {
354         "CA-ParametersEUTRA",
355         "CA-ParametersEUTRA",
356         &asn_OP_SEQUENCE,
357         asn_DEF_CA_ParametersEUTRA_tags_1,
358         sizeof(asn_DEF_CA_ParametersEUTRA_tags_1)
359                 /sizeof(asn_DEF_CA_ParametersEUTRA_tags_1[0]), /* 1 */
360         asn_DEF_CA_ParametersEUTRA_tags_1,      /* Same as above */
361         sizeof(asn_DEF_CA_ParametersEUTRA_tags_1)
362                 /sizeof(asn_DEF_CA_ParametersEUTRA_tags_1[0]), /* 1 */
363         { 0, 0, SEQUENCE_constraint },
364         asn_MBR_CA_ParametersEUTRA_1,
365         6,      /* Elements count */
366         &asn_SPC_CA_ParametersEUTRA_specs_1     /* Additional specs */
367 };
368