[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / DMRS-DownlinkConfig.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 "DMRS-DownlinkConfig.h"
9
10 #include "PTRS-DownlinkConfig.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 /*
20  * This type is implemented using NativeEnumerated,
21  * so here we adjust the DEF accordingly.
22  */
23 static int
24 memb_scramblingID0_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
25                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
26         long value;
27         
28         if(!sptr) {
29                 ASN__CTFAIL(app_key, td, sptr,
30                         "%s: value not given (%s:%d)",
31                         td->name, __FILE__, __LINE__);
32                 return -1;
33         }
34         
35         value = *(const long *)sptr;
36         
37         if((value >= 0 && value <= 65535)) {
38                 /* Constraint check succeeded */
39                 return 0;
40         } else {
41                 ASN__CTFAIL(app_key, td, sptr,
42                         "%s: constraint failed (%s:%d)",
43                         td->name, __FILE__, __LINE__);
44                 return -1;
45         }
46 }
47
48 static int
49 memb_scramblingID1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
50                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
51         long value;
52         
53         if(!sptr) {
54                 ASN__CTFAIL(app_key, td, sptr,
55                         "%s: value not given (%s:%d)",
56                         td->name, __FILE__, __LINE__);
57                 return -1;
58         }
59         
60         value = *(const long *)sptr;
61         
62         if((value >= 0 && value <= 65535)) {
63                 /* Constraint check succeeded */
64                 return 0;
65         } else {
66                 ASN__CTFAIL(app_key, td, sptr,
67                         "%s: constraint failed (%s:%d)",
68                         td->name, __FILE__, __LINE__);
69                 return -1;
70         }
71 }
72
73 static asn_oer_constraints_t asn_OER_type_dmrs_Type_constr_2 CC_NOTUSED = {
74         { 0, 0 },
75         -1};
76 static asn_per_constraints_t asn_PER_type_dmrs_Type_constr_2 CC_NOTUSED = {
77         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
78         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
79         0, 0    /* No PER value map */
80 };
81 static asn_oer_constraints_t asn_OER_type_dmrs_AdditionalPosition_constr_4 CC_NOTUSED = {
82         { 0, 0 },
83         -1};
84 static asn_per_constraints_t asn_PER_type_dmrs_AdditionalPosition_constr_4 CC_NOTUSED = {
85         { APC_CONSTRAINED,       2,  2,  0,  2 }        /* (0..2) */,
86         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
87         0, 0    /* No PER value map */
88 };
89 static asn_oer_constraints_t asn_OER_type_maxLength_constr_8 CC_NOTUSED = {
90         { 0, 0 },
91         -1};
92 static asn_per_constraints_t asn_PER_type_maxLength_constr_8 CC_NOTUSED = {
93         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
94         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
95         0, 0    /* No PER value map */
96 };
97 static asn_oer_constraints_t asn_OER_type_phaseTrackingRS_constr_12 CC_NOTUSED = {
98         { 0, 0 },
99         -1};
100 static asn_per_constraints_t asn_PER_type_phaseTrackingRS_constr_12 CC_NOTUSED = {
101         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
102         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
103         0, 0    /* No PER value map */
104 };
105 static asn_oer_constraints_t asn_OER_memb_scramblingID0_constr_10 CC_NOTUSED = {
106         { 2, 1 }        /* (0..65535) */,
107         -1};
108 static asn_per_constraints_t asn_PER_memb_scramblingID0_constr_10 CC_NOTUSED = {
109         { APC_CONSTRAINED,       16,  16,  0,  65535 }  /* (0..65535) */,
110         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
111         0, 0    /* No PER value map */
112 };
113 static asn_oer_constraints_t asn_OER_memb_scramblingID1_constr_11 CC_NOTUSED = {
114         { 2, 1 }        /* (0..65535) */,
115         -1};
116 static asn_per_constraints_t asn_PER_memb_scramblingID1_constr_11 CC_NOTUSED = {
117         { APC_CONSTRAINED,       16,  16,  0,  65535 }  /* (0..65535) */,
118         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
119         0, 0    /* No PER value map */
120 };
121 static const asn_INTEGER_enum_map_t asn_MAP_dmrs_Type_value2enum_2[] = {
122         { 0,    5,      "type2" }
123 };
124 static const unsigned int asn_MAP_dmrs_Type_enum2value_2[] = {
125         0       /* type2(0) */
126 };
127 static const asn_INTEGER_specifics_t asn_SPC_dmrs_Type_specs_2 = {
128         asn_MAP_dmrs_Type_value2enum_2, /* "tag" => N; sorted by tag */
129         asn_MAP_dmrs_Type_enum2value_2, /* N => "tag"; sorted by N */
130         1,      /* Number of elements in the maps */
131         0,      /* Enumeration is not extensible */
132         1,      /* Strict enumeration */
133         0,      /* Native long size */
134         0
135 };
136 static const ber_tlv_tag_t asn_DEF_dmrs_Type_tags_2[] = {
137         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
138         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
139 };
140 static /* Use -fall-defs-global to expose */
141 asn_TYPE_descriptor_t asn_DEF_dmrs_Type_2 = {
142         "dmrs-Type",
143         "dmrs-Type",
144         &asn_OP_NativeEnumerated,
145         asn_DEF_dmrs_Type_tags_2,
146         sizeof(asn_DEF_dmrs_Type_tags_2)
147                 /sizeof(asn_DEF_dmrs_Type_tags_2[0]) - 1, /* 1 */
148         asn_DEF_dmrs_Type_tags_2,       /* Same as above */
149         sizeof(asn_DEF_dmrs_Type_tags_2)
150                 /sizeof(asn_DEF_dmrs_Type_tags_2[0]), /* 2 */
151         { &asn_OER_type_dmrs_Type_constr_2, &asn_PER_type_dmrs_Type_constr_2, NativeEnumerated_constraint },
152         0, 0,   /* Defined elsewhere */
153         &asn_SPC_dmrs_Type_specs_2      /* Additional specs */
154 };
155
156 static const asn_INTEGER_enum_map_t asn_MAP_dmrs_AdditionalPosition_value2enum_4[] = {
157         { 0,    4,      "pos0" },
158         { 1,    4,      "pos1" },
159         { 2,    4,      "pos3" }
160 };
161 static const unsigned int asn_MAP_dmrs_AdditionalPosition_enum2value_4[] = {
162         0,      /* pos0(0) */
163         1,      /* pos1(1) */
164         2       /* pos3(2) */
165 };
166 static const asn_INTEGER_specifics_t asn_SPC_dmrs_AdditionalPosition_specs_4 = {
167         asn_MAP_dmrs_AdditionalPosition_value2enum_4,   /* "tag" => N; sorted by tag */
168         asn_MAP_dmrs_AdditionalPosition_enum2value_4,   /* N => "tag"; sorted by N */
169         3,      /* Number of elements in the maps */
170         0,      /* Enumeration is not extensible */
171         1,      /* Strict enumeration */
172         0,      /* Native long size */
173         0
174 };
175 static const ber_tlv_tag_t asn_DEF_dmrs_AdditionalPosition_tags_4[] = {
176         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
177         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
178 };
179 static /* Use -fall-defs-global to expose */
180 asn_TYPE_descriptor_t asn_DEF_dmrs_AdditionalPosition_4 = {
181         "dmrs-AdditionalPosition",
182         "dmrs-AdditionalPosition",
183         &asn_OP_NativeEnumerated,
184         asn_DEF_dmrs_AdditionalPosition_tags_4,
185         sizeof(asn_DEF_dmrs_AdditionalPosition_tags_4)
186                 /sizeof(asn_DEF_dmrs_AdditionalPosition_tags_4[0]) - 1, /* 1 */
187         asn_DEF_dmrs_AdditionalPosition_tags_4, /* Same as above */
188         sizeof(asn_DEF_dmrs_AdditionalPosition_tags_4)
189                 /sizeof(asn_DEF_dmrs_AdditionalPosition_tags_4[0]), /* 2 */
190         { &asn_OER_type_dmrs_AdditionalPosition_constr_4, &asn_PER_type_dmrs_AdditionalPosition_constr_4, NativeEnumerated_constraint },
191         0, 0,   /* Defined elsewhere */
192         &asn_SPC_dmrs_AdditionalPosition_specs_4        /* Additional specs */
193 };
194
195 static const asn_INTEGER_enum_map_t asn_MAP_maxLength_value2enum_8[] = {
196         { 0,    4,      "len2" }
197 };
198 static const unsigned int asn_MAP_maxLength_enum2value_8[] = {
199         0       /* len2(0) */
200 };
201 static const asn_INTEGER_specifics_t asn_SPC_maxLength_specs_8 = {
202         asn_MAP_maxLength_value2enum_8, /* "tag" => N; sorted by tag */
203         asn_MAP_maxLength_enum2value_8, /* N => "tag"; sorted by N */
204         1,      /* Number of elements in the maps */
205         0,      /* Enumeration is not extensible */
206         1,      /* Strict enumeration */
207         0,      /* Native long size */
208         0
209 };
210 static const ber_tlv_tag_t asn_DEF_maxLength_tags_8[] = {
211         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
212         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
213 };
214 static /* Use -fall-defs-global to expose */
215 asn_TYPE_descriptor_t asn_DEF_maxLength_8 = {
216         "maxLength",
217         "maxLength",
218         &asn_OP_NativeEnumerated,
219         asn_DEF_maxLength_tags_8,
220         sizeof(asn_DEF_maxLength_tags_8)
221                 /sizeof(asn_DEF_maxLength_tags_8[0]) - 1, /* 1 */
222         asn_DEF_maxLength_tags_8,       /* Same as above */
223         sizeof(asn_DEF_maxLength_tags_8)
224                 /sizeof(asn_DEF_maxLength_tags_8[0]), /* 2 */
225         { &asn_OER_type_maxLength_constr_8, &asn_PER_type_maxLength_constr_8, NativeEnumerated_constraint },
226         0, 0,   /* Defined elsewhere */
227         &asn_SPC_maxLength_specs_8      /* Additional specs */
228 };
229
230 static asn_TYPE_member_t asn_MBR_phaseTrackingRS_12[] = {
231         { ATF_NOFLAGS, 0, offsetof(struct DMRS_DownlinkConfig__phaseTrackingRS, choice.release),
232                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
233                 -1,     /* IMPLICIT tag at current level */
234                 &asn_DEF_NULL,
235                 0,
236                 { 0, 0, 0 },
237                 0, 0, /* No default value */
238                 "release"
239                 },
240         { ATF_POINTER, 0, offsetof(struct DMRS_DownlinkConfig__phaseTrackingRS, choice.setup),
241                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
242                 -1,     /* IMPLICIT tag at current level */
243                 &asn_DEF_PTRS_DownlinkConfig,
244                 0,
245                 { 0, 0, 0 },
246                 0, 0, /* No default value */
247                 "setup"
248                 },
249 };
250 static const asn_TYPE_tag2member_t asn_MAP_phaseTrackingRS_tag2el_12[] = {
251     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* release */
252     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* setup */
253 };
254 static asn_CHOICE_specifics_t asn_SPC_phaseTrackingRS_specs_12 = {
255         sizeof(struct DMRS_DownlinkConfig__phaseTrackingRS),
256         offsetof(struct DMRS_DownlinkConfig__phaseTrackingRS, _asn_ctx),
257         offsetof(struct DMRS_DownlinkConfig__phaseTrackingRS, present),
258         sizeof(((struct DMRS_DownlinkConfig__phaseTrackingRS *)0)->present),
259         asn_MAP_phaseTrackingRS_tag2el_12,
260         2,      /* Count of tags in the map */
261         0, 0,
262         -1      /* Extensions start */
263 };
264 static /* Use -fall-defs-global to expose */
265 asn_TYPE_descriptor_t asn_DEF_phaseTrackingRS_12 = {
266         "phaseTrackingRS",
267         "phaseTrackingRS",
268         &asn_OP_CHOICE,
269         0,      /* No effective tags (pointer) */
270         0,      /* No effective tags (count) */
271         0,      /* No tags (pointer) */
272         0,      /* No tags (count) */
273         { &asn_OER_type_phaseTrackingRS_constr_12, &asn_PER_type_phaseTrackingRS_constr_12, CHOICE_constraint },
274         asn_MBR_phaseTrackingRS_12,
275         2,      /* Elements count */
276         &asn_SPC_phaseTrackingRS_specs_12       /* Additional specs */
277 };
278
279 asn_TYPE_member_t asn_MBR_DMRS_DownlinkConfig_1[] = {
280         { ATF_POINTER, 6, offsetof(struct DMRS_DownlinkConfig, dmrs_Type),
281                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
282                 -1,     /* IMPLICIT tag at current level */
283                 &asn_DEF_dmrs_Type_2,
284                 0,
285                 { 0, 0, 0 },
286                 0, 0, /* No default value */
287                 "dmrs-Type"
288                 },
289         { ATF_POINTER, 5, offsetof(struct DMRS_DownlinkConfig, dmrs_AdditionalPosition),
290                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
291                 -1,     /* IMPLICIT tag at current level */
292                 &asn_DEF_dmrs_AdditionalPosition_4,
293                 0,
294                 { 0, 0, 0 },
295                 0, 0, /* No default value */
296                 "dmrs-AdditionalPosition"
297                 },
298         { ATF_POINTER, 4, offsetof(struct DMRS_DownlinkConfig, maxLength),
299                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
300                 -1,     /* IMPLICIT tag at current level */
301                 &asn_DEF_maxLength_8,
302                 0,
303                 { 0, 0, 0 },
304                 0, 0, /* No default value */
305                 "maxLength"
306                 },
307         { ATF_POINTER, 3, offsetof(struct DMRS_DownlinkConfig, scramblingID0),
308                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
309                 -1,     /* IMPLICIT tag at current level */
310                 &asn_DEF_NativeInteger,
311                 0,
312                 { &asn_OER_memb_scramblingID0_constr_10, &asn_PER_memb_scramblingID0_constr_10,  memb_scramblingID0_constraint_1 },
313                 0, 0, /* No default value */
314                 "scramblingID0"
315                 },
316         { ATF_POINTER, 2, offsetof(struct DMRS_DownlinkConfig, scramblingID1),
317                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
318                 -1,     /* IMPLICIT tag at current level */
319                 &asn_DEF_NativeInteger,
320                 0,
321                 { &asn_OER_memb_scramblingID1_constr_11, &asn_PER_memb_scramblingID1_constr_11,  memb_scramblingID1_constraint_1 },
322                 0, 0, /* No default value */
323                 "scramblingID1"
324                 },
325         { ATF_POINTER, 1, offsetof(struct DMRS_DownlinkConfig, phaseTrackingRS),
326                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
327                 +1,     /* EXPLICIT tag at current level */
328                 &asn_DEF_phaseTrackingRS_12,
329                 0,
330                 { 0, 0, 0 },
331                 0, 0, /* No default value */
332                 "phaseTrackingRS"
333                 },
334 };
335 static const int asn_MAP_DMRS_DownlinkConfig_oms_1[] = { 0, 1, 2, 3, 4, 5 };
336 static const ber_tlv_tag_t asn_DEF_DMRS_DownlinkConfig_tags_1[] = {
337         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
338 };
339 static const asn_TYPE_tag2member_t asn_MAP_DMRS_DownlinkConfig_tag2el_1[] = {
340     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* dmrs-Type */
341     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dmrs-AdditionalPosition */
342     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* maxLength */
343     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* scramblingID0 */
344     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* scramblingID1 */
345     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* phaseTrackingRS */
346 };
347 asn_SEQUENCE_specifics_t asn_SPC_DMRS_DownlinkConfig_specs_1 = {
348         sizeof(struct DMRS_DownlinkConfig),
349         offsetof(struct DMRS_DownlinkConfig, _asn_ctx),
350         asn_MAP_DMRS_DownlinkConfig_tag2el_1,
351         6,      /* Count of tags in the map */
352         asn_MAP_DMRS_DownlinkConfig_oms_1,      /* Optional members */
353         6, 0,   /* Root/Additions */
354         6,      /* First extension addition */
355 };
356 asn_TYPE_descriptor_t asn_DEF_DMRS_DownlinkConfig = {
357         "DMRS-DownlinkConfig",
358         "DMRS-DownlinkConfig",
359         &asn_OP_SEQUENCE,
360         asn_DEF_DMRS_DownlinkConfig_tags_1,
361         sizeof(asn_DEF_DMRS_DownlinkConfig_tags_1)
362                 /sizeof(asn_DEF_DMRS_DownlinkConfig_tags_1[0]), /* 1 */
363         asn_DEF_DMRS_DownlinkConfig_tags_1,     /* Same as above */
364         sizeof(asn_DEF_DMRS_DownlinkConfig_tags_1)
365                 /sizeof(asn_DEF_DMRS_DownlinkConfig_tags_1[0]), /* 1 */
366         { 0, 0, SEQUENCE_constraint },
367         asn_MBR_DMRS_DownlinkConfig_1,
368         6,      /* Elements count */
369         &asn_SPC_DMRS_DownlinkConfig_specs_1    /* Additional specs */
370 };
371