[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / PTRS-DensityRecommendationUL.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 "PTRS-DensityRecommendationUL.h"
9
10 static int
11 memb_frequencyDensity1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         long value;
14         
15         if(!sptr) {
16                 ASN__CTFAIL(app_key, td, sptr,
17                         "%s: value not given (%s:%d)",
18                         td->name, __FILE__, __LINE__);
19                 return -1;
20         }
21         
22         value = *(const long *)sptr;
23         
24         if((value >= 1 && value <= 276)) {
25                 /* Constraint check succeeded */
26                 return 0;
27         } else {
28                 ASN__CTFAIL(app_key, td, sptr,
29                         "%s: constraint failed (%s:%d)",
30                         td->name, __FILE__, __LINE__);
31                 return -1;
32         }
33 }
34
35 static int
36 memb_frequencyDensity2_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
37                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
38         long value;
39         
40         if(!sptr) {
41                 ASN__CTFAIL(app_key, td, sptr,
42                         "%s: value not given (%s:%d)",
43                         td->name, __FILE__, __LINE__);
44                 return -1;
45         }
46         
47         value = *(const long *)sptr;
48         
49         if((value >= 1 && value <= 276)) {
50                 /* Constraint check succeeded */
51                 return 0;
52         } else {
53                 ASN__CTFAIL(app_key, td, sptr,
54                         "%s: constraint failed (%s:%d)",
55                         td->name, __FILE__, __LINE__);
56                 return -1;
57         }
58 }
59
60 static int
61 memb_timeDensity1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
62                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
63         long value;
64         
65         if(!sptr) {
66                 ASN__CTFAIL(app_key, td, sptr,
67                         "%s: value not given (%s:%d)",
68                         td->name, __FILE__, __LINE__);
69                 return -1;
70         }
71         
72         value = *(const long *)sptr;
73         
74         if((value >= 0 && value <= 29)) {
75                 /* Constraint check succeeded */
76                 return 0;
77         } else {
78                 ASN__CTFAIL(app_key, td, sptr,
79                         "%s: constraint failed (%s:%d)",
80                         td->name, __FILE__, __LINE__);
81                 return -1;
82         }
83 }
84
85 static int
86 memb_timeDensity2_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
87                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
88         long value;
89         
90         if(!sptr) {
91                 ASN__CTFAIL(app_key, td, sptr,
92                         "%s: value not given (%s:%d)",
93                         td->name, __FILE__, __LINE__);
94                 return -1;
95         }
96         
97         value = *(const long *)sptr;
98         
99         if((value >= 0 && value <= 29)) {
100                 /* Constraint check succeeded */
101                 return 0;
102         } else {
103                 ASN__CTFAIL(app_key, td, sptr,
104                         "%s: constraint failed (%s:%d)",
105                         td->name, __FILE__, __LINE__);
106                 return -1;
107         }
108 }
109
110 static int
111 memb_timeDensity3_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
112                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
113         long value;
114         
115         if(!sptr) {
116                 ASN__CTFAIL(app_key, td, sptr,
117                         "%s: value not given (%s:%d)",
118                         td->name, __FILE__, __LINE__);
119                 return -1;
120         }
121         
122         value = *(const long *)sptr;
123         
124         if((value >= 0 && value <= 29)) {
125                 /* Constraint check succeeded */
126                 return 0;
127         } else {
128                 ASN__CTFAIL(app_key, td, sptr,
129                         "%s: constraint failed (%s:%d)",
130                         td->name, __FILE__, __LINE__);
131                 return -1;
132         }
133 }
134
135 static int
136 memb_sampleDensity1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
137                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
138         long value;
139         
140         if(!sptr) {
141                 ASN__CTFAIL(app_key, td, sptr,
142                         "%s: value not given (%s:%d)",
143                         td->name, __FILE__, __LINE__);
144                 return -1;
145         }
146         
147         value = *(const long *)sptr;
148         
149         if((value >= 1 && value <= 276)) {
150                 /* Constraint check succeeded */
151                 return 0;
152         } else {
153                 ASN__CTFAIL(app_key, td, sptr,
154                         "%s: constraint failed (%s:%d)",
155                         td->name, __FILE__, __LINE__);
156                 return -1;
157         }
158 }
159
160 static int
161 memb_sampleDensity2_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
162                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
163         long value;
164         
165         if(!sptr) {
166                 ASN__CTFAIL(app_key, td, sptr,
167                         "%s: value not given (%s:%d)",
168                         td->name, __FILE__, __LINE__);
169                 return -1;
170         }
171         
172         value = *(const long *)sptr;
173         
174         if((value >= 1 && value <= 276)) {
175                 /* Constraint check succeeded */
176                 return 0;
177         } else {
178                 ASN__CTFAIL(app_key, td, sptr,
179                         "%s: constraint failed (%s:%d)",
180                         td->name, __FILE__, __LINE__);
181                 return -1;
182         }
183 }
184
185 static int
186 memb_sampleDensity3_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
187                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
188         long value;
189         
190         if(!sptr) {
191                 ASN__CTFAIL(app_key, td, sptr,
192                         "%s: value not given (%s:%d)",
193                         td->name, __FILE__, __LINE__);
194                 return -1;
195         }
196         
197         value = *(const long *)sptr;
198         
199         if((value >= 1 && value <= 276)) {
200                 /* Constraint check succeeded */
201                 return 0;
202         } else {
203                 ASN__CTFAIL(app_key, td, sptr,
204                         "%s: constraint failed (%s:%d)",
205                         td->name, __FILE__, __LINE__);
206                 return -1;
207         }
208 }
209
210 static int
211 memb_sampleDensity4_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
212                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
213         long value;
214         
215         if(!sptr) {
216                 ASN__CTFAIL(app_key, td, sptr,
217                         "%s: value not given (%s:%d)",
218                         td->name, __FILE__, __LINE__);
219                 return -1;
220         }
221         
222         value = *(const long *)sptr;
223         
224         if((value >= 1 && value <= 276)) {
225                 /* Constraint check succeeded */
226                 return 0;
227         } else {
228                 ASN__CTFAIL(app_key, td, sptr,
229                         "%s: constraint failed (%s:%d)",
230                         td->name, __FILE__, __LINE__);
231                 return -1;
232         }
233 }
234
235 static int
236 memb_sampleDensity5_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
237                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
238         long value;
239         
240         if(!sptr) {
241                 ASN__CTFAIL(app_key, td, sptr,
242                         "%s: value not given (%s:%d)",
243                         td->name, __FILE__, __LINE__);
244                 return -1;
245         }
246         
247         value = *(const long *)sptr;
248         
249         if((value >= 1 && value <= 276)) {
250                 /* Constraint check succeeded */
251                 return 0;
252         } else {
253                 ASN__CTFAIL(app_key, td, sptr,
254                         "%s: constraint failed (%s:%d)",
255                         td->name, __FILE__, __LINE__);
256                 return -1;
257         }
258 }
259
260 static asn_oer_constraints_t asn_OER_memb_frequencyDensity1_constr_2 CC_NOTUSED = {
261         { 2, 1 }        /* (1..276) */,
262         -1};
263 static asn_per_constraints_t asn_PER_memb_frequencyDensity1_constr_2 CC_NOTUSED = {
264         { APC_CONSTRAINED,       9,  9,  1,  276 }      /* (1..276) */,
265         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
266         0, 0    /* No PER value map */
267 };
268 static asn_oer_constraints_t asn_OER_memb_frequencyDensity2_constr_3 CC_NOTUSED = {
269         { 2, 1 }        /* (1..276) */,
270         -1};
271 static asn_per_constraints_t asn_PER_memb_frequencyDensity2_constr_3 CC_NOTUSED = {
272         { APC_CONSTRAINED,       9,  9,  1,  276 }      /* (1..276) */,
273         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
274         0, 0    /* No PER value map */
275 };
276 static asn_oer_constraints_t asn_OER_memb_timeDensity1_constr_4 CC_NOTUSED = {
277         { 1, 1 }        /* (0..29) */,
278         -1};
279 static asn_per_constraints_t asn_PER_memb_timeDensity1_constr_4 CC_NOTUSED = {
280         { APC_CONSTRAINED,       5,  5,  0,  29 }       /* (0..29) */,
281         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
282         0, 0    /* No PER value map */
283 };
284 static asn_oer_constraints_t asn_OER_memb_timeDensity2_constr_5 CC_NOTUSED = {
285         { 1, 1 }        /* (0..29) */,
286         -1};
287 static asn_per_constraints_t asn_PER_memb_timeDensity2_constr_5 CC_NOTUSED = {
288         { APC_CONSTRAINED,       5,  5,  0,  29 }       /* (0..29) */,
289         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
290         0, 0    /* No PER value map */
291 };
292 static asn_oer_constraints_t asn_OER_memb_timeDensity3_constr_6 CC_NOTUSED = {
293         { 1, 1 }        /* (0..29) */,
294         -1};
295 static asn_per_constraints_t asn_PER_memb_timeDensity3_constr_6 CC_NOTUSED = {
296         { APC_CONSTRAINED,       5,  5,  0,  29 }       /* (0..29) */,
297         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
298         0, 0    /* No PER value map */
299 };
300 static asn_oer_constraints_t asn_OER_memb_sampleDensity1_constr_7 CC_NOTUSED = {
301         { 2, 1 }        /* (1..276) */,
302         -1};
303 static asn_per_constraints_t asn_PER_memb_sampleDensity1_constr_7 CC_NOTUSED = {
304         { APC_CONSTRAINED,       9,  9,  1,  276 }      /* (1..276) */,
305         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
306         0, 0    /* No PER value map */
307 };
308 static asn_oer_constraints_t asn_OER_memb_sampleDensity2_constr_8 CC_NOTUSED = {
309         { 2, 1 }        /* (1..276) */,
310         -1};
311 static asn_per_constraints_t asn_PER_memb_sampleDensity2_constr_8 CC_NOTUSED = {
312         { APC_CONSTRAINED,       9,  9,  1,  276 }      /* (1..276) */,
313         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
314         0, 0    /* No PER value map */
315 };
316 static asn_oer_constraints_t asn_OER_memb_sampleDensity3_constr_9 CC_NOTUSED = {
317         { 2, 1 }        /* (1..276) */,
318         -1};
319 static asn_per_constraints_t asn_PER_memb_sampleDensity3_constr_9 CC_NOTUSED = {
320         { APC_CONSTRAINED,       9,  9,  1,  276 }      /* (1..276) */,
321         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
322         0, 0    /* No PER value map */
323 };
324 static asn_oer_constraints_t asn_OER_memb_sampleDensity4_constr_10 CC_NOTUSED = {
325         { 2, 1 }        /* (1..276) */,
326         -1};
327 static asn_per_constraints_t asn_PER_memb_sampleDensity4_constr_10 CC_NOTUSED = {
328         { APC_CONSTRAINED,       9,  9,  1,  276 }      /* (1..276) */,
329         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
330         0, 0    /* No PER value map */
331 };
332 static asn_oer_constraints_t asn_OER_memb_sampleDensity5_constr_11 CC_NOTUSED = {
333         { 2, 1 }        /* (1..276) */,
334         -1};
335 static asn_per_constraints_t asn_PER_memb_sampleDensity5_constr_11 CC_NOTUSED = {
336         { APC_CONSTRAINED,       9,  9,  1,  276 }      /* (1..276) */,
337         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
338         0, 0    /* No PER value map */
339 };
340 asn_TYPE_member_t asn_MBR_PTRS_DensityRecommendationUL_1[] = {
341         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationUL, frequencyDensity1),
342                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
343                 -1,     /* IMPLICIT tag at current level */
344                 &asn_DEF_NativeInteger,
345                 0,
346                 { &asn_OER_memb_frequencyDensity1_constr_2, &asn_PER_memb_frequencyDensity1_constr_2,  memb_frequencyDensity1_constraint_1 },
347                 0, 0, /* No default value */
348                 "frequencyDensity1"
349                 },
350         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationUL, frequencyDensity2),
351                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
352                 -1,     /* IMPLICIT tag at current level */
353                 &asn_DEF_NativeInteger,
354                 0,
355                 { &asn_OER_memb_frequencyDensity2_constr_3, &asn_PER_memb_frequencyDensity2_constr_3,  memb_frequencyDensity2_constraint_1 },
356                 0, 0, /* No default value */
357                 "frequencyDensity2"
358                 },
359         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationUL, timeDensity1),
360                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
361                 -1,     /* IMPLICIT tag at current level */
362                 &asn_DEF_NativeInteger,
363                 0,
364                 { &asn_OER_memb_timeDensity1_constr_4, &asn_PER_memb_timeDensity1_constr_4,  memb_timeDensity1_constraint_1 },
365                 0, 0, /* No default value */
366                 "timeDensity1"
367                 },
368         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationUL, timeDensity2),
369                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
370                 -1,     /* IMPLICIT tag at current level */
371                 &asn_DEF_NativeInteger,
372                 0,
373                 { &asn_OER_memb_timeDensity2_constr_5, &asn_PER_memb_timeDensity2_constr_5,  memb_timeDensity2_constraint_1 },
374                 0, 0, /* No default value */
375                 "timeDensity2"
376                 },
377         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationUL, timeDensity3),
378                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
379                 -1,     /* IMPLICIT tag at current level */
380                 &asn_DEF_NativeInteger,
381                 0,
382                 { &asn_OER_memb_timeDensity3_constr_6, &asn_PER_memb_timeDensity3_constr_6,  memb_timeDensity3_constraint_1 },
383                 0, 0, /* No default value */
384                 "timeDensity3"
385                 },
386         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationUL, sampleDensity1),
387                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
388                 -1,     /* IMPLICIT tag at current level */
389                 &asn_DEF_NativeInteger,
390                 0,
391                 { &asn_OER_memb_sampleDensity1_constr_7, &asn_PER_memb_sampleDensity1_constr_7,  memb_sampleDensity1_constraint_1 },
392                 0, 0, /* No default value */
393                 "sampleDensity1"
394                 },
395         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationUL, sampleDensity2),
396                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
397                 -1,     /* IMPLICIT tag at current level */
398                 &asn_DEF_NativeInteger,
399                 0,
400                 { &asn_OER_memb_sampleDensity2_constr_8, &asn_PER_memb_sampleDensity2_constr_8,  memb_sampleDensity2_constraint_1 },
401                 0, 0, /* No default value */
402                 "sampleDensity2"
403                 },
404         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationUL, sampleDensity3),
405                 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
406                 -1,     /* IMPLICIT tag at current level */
407                 &asn_DEF_NativeInteger,
408                 0,
409                 { &asn_OER_memb_sampleDensity3_constr_9, &asn_PER_memb_sampleDensity3_constr_9,  memb_sampleDensity3_constraint_1 },
410                 0, 0, /* No default value */
411                 "sampleDensity3"
412                 },
413         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationUL, sampleDensity4),
414                 (ASN_TAG_CLASS_CONTEXT | (8 << 2)),
415                 -1,     /* IMPLICIT tag at current level */
416                 &asn_DEF_NativeInteger,
417                 0,
418                 { &asn_OER_memb_sampleDensity4_constr_10, &asn_PER_memb_sampleDensity4_constr_10,  memb_sampleDensity4_constraint_1 },
419                 0, 0, /* No default value */
420                 "sampleDensity4"
421                 },
422         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationUL, sampleDensity5),
423                 (ASN_TAG_CLASS_CONTEXT | (9 << 2)),
424                 -1,     /* IMPLICIT tag at current level */
425                 &asn_DEF_NativeInteger,
426                 0,
427                 { &asn_OER_memb_sampleDensity5_constr_11, &asn_PER_memb_sampleDensity5_constr_11,  memb_sampleDensity5_constraint_1 },
428                 0, 0, /* No default value */
429                 "sampleDensity5"
430                 },
431 };
432 static const ber_tlv_tag_t asn_DEF_PTRS_DensityRecommendationUL_tags_1[] = {
433         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
434 };
435 static const asn_TYPE_tag2member_t asn_MAP_PTRS_DensityRecommendationUL_tag2el_1[] = {
436     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* frequencyDensity1 */
437     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* frequencyDensity2 */
438     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* timeDensity1 */
439     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* timeDensity2 */
440     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* timeDensity3 */
441     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* sampleDensity1 */
442     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* sampleDensity2 */
443     { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* sampleDensity3 */
444     { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* sampleDensity4 */
445     { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* sampleDensity5 */
446 };
447 asn_SEQUENCE_specifics_t asn_SPC_PTRS_DensityRecommendationUL_specs_1 = {
448         sizeof(struct PTRS_DensityRecommendationUL),
449         offsetof(struct PTRS_DensityRecommendationUL, _asn_ctx),
450         asn_MAP_PTRS_DensityRecommendationUL_tag2el_1,
451         10,     /* Count of tags in the map */
452         0, 0, 0,        /* Optional elements (not needed) */
453         -1,     /* First extension addition */
454 };
455 asn_TYPE_descriptor_t asn_DEF_PTRS_DensityRecommendationUL = {
456         "PTRS-DensityRecommendationUL",
457         "PTRS-DensityRecommendationUL",
458         &asn_OP_SEQUENCE,
459         asn_DEF_PTRS_DensityRecommendationUL_tags_1,
460         sizeof(asn_DEF_PTRS_DensityRecommendationUL_tags_1)
461                 /sizeof(asn_DEF_PTRS_DensityRecommendationUL_tags_1[0]), /* 1 */
462         asn_DEF_PTRS_DensityRecommendationUL_tags_1,    /* Same as above */
463         sizeof(asn_DEF_PTRS_DensityRecommendationUL_tags_1)
464                 /sizeof(asn_DEF_PTRS_DensityRecommendationUL_tags_1[0]), /* 1 */
465         { 0, 0, SEQUENCE_constraint },
466         asn_MBR_PTRS_DensityRecommendationUL_1,
467         10,     /* Elements count */
468         &asn_SPC_PTRS_DensityRecommendationUL_specs_1   /* Additional specs */
469 };
470