[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / PTRS-DensityRecommendationDL.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-DensityRecommendationDL.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 asn_oer_constraints_t asn_OER_memb_frequencyDensity1_constr_2 CC_NOTUSED = {
136         { 2, 1 }        /* (1..276) */,
137         -1};
138 static asn_per_constraints_t asn_PER_memb_frequencyDensity1_constr_2 CC_NOTUSED = {
139         { APC_CONSTRAINED,       9,  9,  1,  276 }      /* (1..276) */,
140         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
141         0, 0    /* No PER value map */
142 };
143 static asn_oer_constraints_t asn_OER_memb_frequencyDensity2_constr_3 CC_NOTUSED = {
144         { 2, 1 }        /* (1..276) */,
145         -1};
146 static asn_per_constraints_t asn_PER_memb_frequencyDensity2_constr_3 CC_NOTUSED = {
147         { APC_CONSTRAINED,       9,  9,  1,  276 }      /* (1..276) */,
148         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
149         0, 0    /* No PER value map */
150 };
151 static asn_oer_constraints_t asn_OER_memb_timeDensity1_constr_4 CC_NOTUSED = {
152         { 1, 1 }        /* (0..29) */,
153         -1};
154 static asn_per_constraints_t asn_PER_memb_timeDensity1_constr_4 CC_NOTUSED = {
155         { APC_CONSTRAINED,       5,  5,  0,  29 }       /* (0..29) */,
156         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
157         0, 0    /* No PER value map */
158 };
159 static asn_oer_constraints_t asn_OER_memb_timeDensity2_constr_5 CC_NOTUSED = {
160         { 1, 1 }        /* (0..29) */,
161         -1};
162 static asn_per_constraints_t asn_PER_memb_timeDensity2_constr_5 CC_NOTUSED = {
163         { APC_CONSTRAINED,       5,  5,  0,  29 }       /* (0..29) */,
164         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
165         0, 0    /* No PER value map */
166 };
167 static asn_oer_constraints_t asn_OER_memb_timeDensity3_constr_6 CC_NOTUSED = {
168         { 1, 1 }        /* (0..29) */,
169         -1};
170 static asn_per_constraints_t asn_PER_memb_timeDensity3_constr_6 CC_NOTUSED = {
171         { APC_CONSTRAINED,       5,  5,  0,  29 }       /* (0..29) */,
172         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
173         0, 0    /* No PER value map */
174 };
175 asn_TYPE_member_t asn_MBR_PTRS_DensityRecommendationDL_1[] = {
176         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationDL, frequencyDensity1),
177                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
178                 -1,     /* IMPLICIT tag at current level */
179                 &asn_DEF_NativeInteger,
180                 0,
181                 { &asn_OER_memb_frequencyDensity1_constr_2, &asn_PER_memb_frequencyDensity1_constr_2,  memb_frequencyDensity1_constraint_1 },
182                 0, 0, /* No default value */
183                 "frequencyDensity1"
184                 },
185         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationDL, frequencyDensity2),
186                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
187                 -1,     /* IMPLICIT tag at current level */
188                 &asn_DEF_NativeInteger,
189                 0,
190                 { &asn_OER_memb_frequencyDensity2_constr_3, &asn_PER_memb_frequencyDensity2_constr_3,  memb_frequencyDensity2_constraint_1 },
191                 0, 0, /* No default value */
192                 "frequencyDensity2"
193                 },
194         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationDL, timeDensity1),
195                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
196                 -1,     /* IMPLICIT tag at current level */
197                 &asn_DEF_NativeInteger,
198                 0,
199                 { &asn_OER_memb_timeDensity1_constr_4, &asn_PER_memb_timeDensity1_constr_4,  memb_timeDensity1_constraint_1 },
200                 0, 0, /* No default value */
201                 "timeDensity1"
202                 },
203         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationDL, timeDensity2),
204                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
205                 -1,     /* IMPLICIT tag at current level */
206                 &asn_DEF_NativeInteger,
207                 0,
208                 { &asn_OER_memb_timeDensity2_constr_5, &asn_PER_memb_timeDensity2_constr_5,  memb_timeDensity2_constraint_1 },
209                 0, 0, /* No default value */
210                 "timeDensity2"
211                 },
212         { ATF_NOFLAGS, 0, offsetof(struct PTRS_DensityRecommendationDL, timeDensity3),
213                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
214                 -1,     /* IMPLICIT tag at current level */
215                 &asn_DEF_NativeInteger,
216                 0,
217                 { &asn_OER_memb_timeDensity3_constr_6, &asn_PER_memb_timeDensity3_constr_6,  memb_timeDensity3_constraint_1 },
218                 0, 0, /* No default value */
219                 "timeDensity3"
220                 },
221 };
222 static const ber_tlv_tag_t asn_DEF_PTRS_DensityRecommendationDL_tags_1[] = {
223         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
224 };
225 static const asn_TYPE_tag2member_t asn_MAP_PTRS_DensityRecommendationDL_tag2el_1[] = {
226     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* frequencyDensity1 */
227     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* frequencyDensity2 */
228     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* timeDensity1 */
229     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* timeDensity2 */
230     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* timeDensity3 */
231 };
232 asn_SEQUENCE_specifics_t asn_SPC_PTRS_DensityRecommendationDL_specs_1 = {
233         sizeof(struct PTRS_DensityRecommendationDL),
234         offsetof(struct PTRS_DensityRecommendationDL, _asn_ctx),
235         asn_MAP_PTRS_DensityRecommendationDL_tag2el_1,
236         5,      /* Count of tags in the map */
237         0, 0, 0,        /* Optional elements (not needed) */
238         -1,     /* First extension addition */
239 };
240 asn_TYPE_descriptor_t asn_DEF_PTRS_DensityRecommendationDL = {
241         "PTRS-DensityRecommendationDL",
242         "PTRS-DensityRecommendationDL",
243         &asn_OP_SEQUENCE,
244         asn_DEF_PTRS_DensityRecommendationDL_tags_1,
245         sizeof(asn_DEF_PTRS_DensityRecommendationDL_tags_1)
246                 /sizeof(asn_DEF_PTRS_DensityRecommendationDL_tags_1[0]), /* 1 */
247         asn_DEF_PTRS_DensityRecommendationDL_tags_1,    /* Same as above */
248         sizeof(asn_DEF_PTRS_DensityRecommendationDL_tags_1)
249                 /sizeof(asn_DEF_PTRS_DensityRecommendationDL_tags_1[0]), /* 1 */
250         { 0, 0, SEQUENCE_constraint },
251         asn_MBR_PTRS_DensityRecommendationDL_1,
252         5,      /* Elements count */
253         &asn_SPC_PTRS_DensityRecommendationDL_specs_1   /* Additional specs */
254 };
255