8202cd35a9a01d15f291b65572432faac7c6033a
[o-du/l2.git] / src / codec_utils / RRC / PUSCH-ServingCellConfig.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 "PUSCH-ServingCellConfig.h"
9
10 #include "PUSCH-CodeBlockGroupTransmission.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_maxMIMO_Layers_constraint_12(const asn_TYPE_descriptor_t *td, const void *sptr,
21                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
22         long value;
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         value = *(const long *)sptr;
32         
33         if((value >= 1 && value <= 4)) {
34                 /* Constraint check succeeded */
35                 return 0;
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_codeBlockGroupTransmission_constr_2 CC_NOTUSED = {
45         { 0, 0 },
46         -1};
47 static asn_per_constraints_t asn_PER_type_codeBlockGroupTransmission_constr_2 CC_NOTUSED = {
48         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
49         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
50         0, 0    /* No PER value map */
51 };
52 static asn_oer_constraints_t asn_OER_type_rateMatching_constr_5 CC_NOTUSED = {
53         { 0, 0 },
54         -1};
55 static asn_per_constraints_t asn_PER_type_rateMatching_constr_5 CC_NOTUSED = {
56         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
57         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
58         0, 0    /* No PER value map */
59 };
60 static asn_oer_constraints_t asn_OER_type_xOverhead_constr_7 CC_NOTUSED = {
61         { 0, 0 },
62         -1};
63 static asn_per_constraints_t asn_PER_type_xOverhead_constr_7 CC_NOTUSED = {
64         { APC_CONSTRAINED,       2,  2,  0,  2 }        /* (0..2) */,
65         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
66         0, 0    /* No PER value map */
67 };
68 static asn_oer_constraints_t asn_OER_memb_maxMIMO_Layers_constr_13 CC_NOTUSED = {
69         { 1, 1 }        /* (1..4) */,
70         -1};
71 static asn_per_constraints_t asn_PER_memb_maxMIMO_Layers_constr_13 CC_NOTUSED = {
72         { APC_CONSTRAINED,       2,  2,  1,  4 }        /* (1..4) */,
73         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
74         0, 0    /* No PER value map */
75 };
76 static asn_TYPE_member_t asn_MBR_codeBlockGroupTransmission_2[] = {
77         { ATF_NOFLAGS, 0, offsetof(struct PUSCH_ServingCellConfig__codeBlockGroupTransmission, choice.release),
78                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
79                 -1,     /* IMPLICIT tag at current level */
80                 &asn_DEF_NULL,
81                 0,
82                 { 0, 0, 0 },
83                 0, 0, /* No default value */
84                 "release"
85                 },
86         { ATF_POINTER, 0, offsetof(struct PUSCH_ServingCellConfig__codeBlockGroupTransmission, choice.setup),
87                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
88                 -1,     /* IMPLICIT tag at current level */
89                 &asn_DEF_PUSCH_CodeBlockGroupTransmission,
90                 0,
91                 { 0, 0, 0 },
92                 0, 0, /* No default value */
93                 "setup"
94                 },
95 };
96 static const asn_TYPE_tag2member_t asn_MAP_codeBlockGroupTransmission_tag2el_2[] = {
97     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* release */
98     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* setup */
99 };
100 static asn_CHOICE_specifics_t asn_SPC_codeBlockGroupTransmission_specs_2 = {
101         sizeof(struct PUSCH_ServingCellConfig__codeBlockGroupTransmission),
102         offsetof(struct PUSCH_ServingCellConfig__codeBlockGroupTransmission, _asn_ctx),
103         offsetof(struct PUSCH_ServingCellConfig__codeBlockGroupTransmission, present),
104         sizeof(((struct PUSCH_ServingCellConfig__codeBlockGroupTransmission *)0)->present),
105         asn_MAP_codeBlockGroupTransmission_tag2el_2,
106         2,      /* Count of tags in the map */
107         0, 0,
108         -1      /* Extensions start */
109 };
110 static /* Use -fall-defs-global to expose */
111 asn_TYPE_descriptor_t asn_DEF_codeBlockGroupTransmission_2 = {
112         "codeBlockGroupTransmission",
113         "codeBlockGroupTransmission",
114         &asn_OP_CHOICE,
115         0,      /* No effective tags (pointer) */
116         0,      /* No effective tags (count) */
117         0,      /* No tags (pointer) */
118         0,      /* No tags (count) */
119         { &asn_OER_type_codeBlockGroupTransmission_constr_2, &asn_PER_type_codeBlockGroupTransmission_constr_2, CHOICE_constraint },
120         asn_MBR_codeBlockGroupTransmission_2,
121         2,      /* Elements count */
122         &asn_SPC_codeBlockGroupTransmission_specs_2     /* Additional specs */
123 };
124
125 static const asn_INTEGER_enum_map_t asn_MAP_rateMatching_value2enum_5[] = {
126         { 0,    15,     "limitedBufferRM" }
127 };
128 static const unsigned int asn_MAP_rateMatching_enum2value_5[] = {
129         0       /* limitedBufferRM(0) */
130 };
131 static const asn_INTEGER_specifics_t asn_SPC_rateMatching_specs_5 = {
132         asn_MAP_rateMatching_value2enum_5,      /* "tag" => N; sorted by tag */
133         asn_MAP_rateMatching_enum2value_5,      /* N => "tag"; sorted by N */
134         1,      /* Number of elements in the maps */
135         0,      /* Enumeration is not extensible */
136         1,      /* Strict enumeration */
137         0,      /* Native long size */
138         0
139 };
140 static const ber_tlv_tag_t asn_DEF_rateMatching_tags_5[] = {
141         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
142         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
143 };
144 static /* Use -fall-defs-global to expose */
145 asn_TYPE_descriptor_t asn_DEF_rateMatching_5 = {
146         "rateMatching",
147         "rateMatching",
148         &asn_OP_NativeEnumerated,
149         asn_DEF_rateMatching_tags_5,
150         sizeof(asn_DEF_rateMatching_tags_5)
151                 /sizeof(asn_DEF_rateMatching_tags_5[0]) - 1, /* 1 */
152         asn_DEF_rateMatching_tags_5,    /* Same as above */
153         sizeof(asn_DEF_rateMatching_tags_5)
154                 /sizeof(asn_DEF_rateMatching_tags_5[0]), /* 2 */
155         { &asn_OER_type_rateMatching_constr_5, &asn_PER_type_rateMatching_constr_5, NativeEnumerated_constraint },
156         0, 0,   /* Defined elsewhere */
157         &asn_SPC_rateMatching_specs_5   /* Additional specs */
158 };
159
160 static const asn_INTEGER_enum_map_t asn_MAP_xOverhead_value2enum_7[] = {
161         { 0,    4,      "xoh6" },
162         { 1,    5,      "xoh12" },
163         { 2,    5,      "xoh18" }
164 };
165 static const unsigned int asn_MAP_xOverhead_enum2value_7[] = {
166         1,      /* xoh12(1) */
167         2,      /* xoh18(2) */
168         0       /* xoh6(0) */
169 };
170 static const asn_INTEGER_specifics_t asn_SPC_xOverhead_specs_7 = {
171         asn_MAP_xOverhead_value2enum_7, /* "tag" => N; sorted by tag */
172         asn_MAP_xOverhead_enum2value_7, /* N => "tag"; sorted by N */
173         3,      /* Number of elements in the maps */
174         0,      /* Enumeration is not extensible */
175         1,      /* Strict enumeration */
176         0,      /* Native long size */
177         0
178 };
179 static const ber_tlv_tag_t asn_DEF_xOverhead_tags_7[] = {
180         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
181         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
182 };
183 static /* Use -fall-defs-global to expose */
184 asn_TYPE_descriptor_t asn_DEF_xOverhead_7 = {
185         "xOverhead",
186         "xOverhead",
187         &asn_OP_NativeEnumerated,
188         asn_DEF_xOverhead_tags_7,
189         sizeof(asn_DEF_xOverhead_tags_7)
190                 /sizeof(asn_DEF_xOverhead_tags_7[0]) - 1, /* 1 */
191         asn_DEF_xOverhead_tags_7,       /* Same as above */
192         sizeof(asn_DEF_xOverhead_tags_7)
193                 /sizeof(asn_DEF_xOverhead_tags_7[0]), /* 2 */
194         { &asn_OER_type_xOverhead_constr_7, &asn_PER_type_xOverhead_constr_7, NativeEnumerated_constraint },
195         0, 0,   /* Defined elsewhere */
196         &asn_SPC_xOverhead_specs_7      /* Additional specs */
197 };
198
199 static asn_TYPE_member_t asn_MBR_ext1_12[] = {
200         { ATF_POINTER, 2, offsetof(struct PUSCH_ServingCellConfig__ext1, maxMIMO_Layers),
201                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
202                 -1,     /* IMPLICIT tag at current level */
203                 &asn_DEF_NativeInteger,
204                 0,
205                 { &asn_OER_memb_maxMIMO_Layers_constr_13, &asn_PER_memb_maxMIMO_Layers_constr_13,  memb_maxMIMO_Layers_constraint_12 },
206                 0, 0, /* No default value */
207                 "maxMIMO-Layers"
208                 },
209         { ATF_POINTER, 1, offsetof(struct PUSCH_ServingCellConfig__ext1, processingType2Enabled),
210                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
211                 -1,     /* IMPLICIT tag at current level */
212                 &asn_DEF_BOOLEAN,
213                 0,
214                 { 0, 0, 0 },
215                 0, 0, /* No default value */
216                 "processingType2Enabled"
217                 },
218 };
219 static const int asn_MAP_ext1_oms_12[] = { 0, 1 };
220 static const ber_tlv_tag_t asn_DEF_ext1_tags_12[] = {
221         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
222         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
223 };
224 static const asn_TYPE_tag2member_t asn_MAP_ext1_tag2el_12[] = {
225     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* maxMIMO-Layers */
226     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* processingType2Enabled */
227 };
228 static asn_SEQUENCE_specifics_t asn_SPC_ext1_specs_12 = {
229         sizeof(struct PUSCH_ServingCellConfig__ext1),
230         offsetof(struct PUSCH_ServingCellConfig__ext1, _asn_ctx),
231         asn_MAP_ext1_tag2el_12,
232         2,      /* Count of tags in the map */
233         asn_MAP_ext1_oms_12,    /* Optional members */
234         2, 0,   /* Root/Additions */
235         -1,     /* First extension addition */
236 };
237 static /* Use -fall-defs-global to expose */
238 asn_TYPE_descriptor_t asn_DEF_ext1_12 = {
239         "ext1",
240         "ext1",
241         &asn_OP_SEQUENCE,
242         asn_DEF_ext1_tags_12,
243         sizeof(asn_DEF_ext1_tags_12)
244                 /sizeof(asn_DEF_ext1_tags_12[0]) - 1, /* 1 */
245         asn_DEF_ext1_tags_12,   /* Same as above */
246         sizeof(asn_DEF_ext1_tags_12)
247                 /sizeof(asn_DEF_ext1_tags_12[0]), /* 2 */
248         { 0, 0, SEQUENCE_constraint },
249         asn_MBR_ext1_12,
250         2,      /* Elements count */
251         &asn_SPC_ext1_specs_12  /* Additional specs */
252 };
253
254 asn_TYPE_member_t asn_MBR_PUSCH_ServingCellConfig_1[] = {
255         { ATF_POINTER, 4, offsetof(struct PUSCH_ServingCellConfig, codeBlockGroupTransmission),
256                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
257                 +1,     /* EXPLICIT tag at current level */
258                 &asn_DEF_codeBlockGroupTransmission_2,
259                 0,
260                 { 0, 0, 0 },
261                 0, 0, /* No default value */
262                 "codeBlockGroupTransmission"
263                 },
264         { ATF_POINTER, 3, offsetof(struct PUSCH_ServingCellConfig, rateMatching),
265                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
266                 -1,     /* IMPLICIT tag at current level */
267                 &asn_DEF_rateMatching_5,
268                 0,
269                 { 0, 0, 0 },
270                 0, 0, /* No default value */
271                 "rateMatching"
272                 },
273         { ATF_POINTER, 2, offsetof(struct PUSCH_ServingCellConfig, xOverhead),
274                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
275                 -1,     /* IMPLICIT tag at current level */
276                 &asn_DEF_xOverhead_7,
277                 0,
278                 { 0, 0, 0 },
279                 0, 0, /* No default value */
280                 "xOverhead"
281                 },
282         { ATF_POINTER, 1, offsetof(struct PUSCH_ServingCellConfig, ext1),
283                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
284                 0,
285                 &asn_DEF_ext1_12,
286                 0,
287                 { 0, 0, 0 },
288                 0, 0, /* No default value */
289                 "ext1"
290                 },
291 };
292 static const int asn_MAP_PUSCH_ServingCellConfig_oms_1[] = { 0, 1, 2, 3 };
293 static const ber_tlv_tag_t asn_DEF_PUSCH_ServingCellConfig_tags_1[] = {
294         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
295 };
296 static const asn_TYPE_tag2member_t asn_MAP_PUSCH_ServingCellConfig_tag2el_1[] = {
297     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* codeBlockGroupTransmission */
298     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rateMatching */
299     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* xOverhead */
300     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ext1 */
301 };
302 asn_SEQUENCE_specifics_t asn_SPC_PUSCH_ServingCellConfig_specs_1 = {
303         sizeof(struct PUSCH_ServingCellConfig),
304         offsetof(struct PUSCH_ServingCellConfig, _asn_ctx),
305         asn_MAP_PUSCH_ServingCellConfig_tag2el_1,
306         4,      /* Count of tags in the map */
307         asn_MAP_PUSCH_ServingCellConfig_oms_1,  /* Optional members */
308         3, 1,   /* Root/Additions */
309         3,      /* First extension addition */
310 };
311 asn_TYPE_descriptor_t asn_DEF_PUSCH_ServingCellConfig = {
312         "PUSCH-ServingCellConfig",
313         "PUSCH-ServingCellConfig",
314         &asn_OP_SEQUENCE,
315         asn_DEF_PUSCH_ServingCellConfig_tags_1,
316         sizeof(asn_DEF_PUSCH_ServingCellConfig_tags_1)
317                 /sizeof(asn_DEF_PUSCH_ServingCellConfig_tags_1[0]), /* 1 */
318         asn_DEF_PUSCH_ServingCellConfig_tags_1, /* Same as above */
319         sizeof(asn_DEF_PUSCH_ServingCellConfig_tags_1)
320                 /sizeof(asn_DEF_PUSCH_ServingCellConfig_tags_1[0]), /* 1 */
321         { 0, 0, SEQUENCE_constraint },
322         asn_MBR_PUSCH_ServingCellConfig_1,
323         4,      /* Elements count */
324         &asn_SPC_PUSCH_ServingCellConfig_specs_1        /* Additional specs */
325 };
326