2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "NR-RRC-Definitions"
4 * found in "../../../rrc_15.5.1_asn.asn1"
5 * `asn1c -D ./rrc_out -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
8 #include "PTRS-DownlinkConfig.h"
11 memb_NativeInteger_constraint_2(const asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
16 ASN__CTFAIL(app_key, td, sptr,
17 "%s: value not given (%s:%d)",
18 td->name, __FILE__, __LINE__);
22 value = *(const long *)sptr;
24 if((value >= 1 && value <= 276)) {
25 /* Constraint check succeeded */
28 ASN__CTFAIL(app_key, td, sptr,
29 "%s: constraint failed (%s:%d)",
30 td->name, __FILE__, __LINE__);
36 memb_NativeInteger_constraint_4(const asn_TYPE_descriptor_t *td, const void *sptr,
37 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
41 ASN__CTFAIL(app_key, td, sptr,
42 "%s: value not given (%s:%d)",
43 td->name, __FILE__, __LINE__);
47 value = *(const long *)sptr;
49 if((value >= 0 && value <= 29)) {
50 /* Constraint check succeeded */
53 ASN__CTFAIL(app_key, td, sptr,
54 "%s: constraint failed (%s:%d)",
55 td->name, __FILE__, __LINE__);
61 * This type is implemented using NativeEnumerated,
62 * so here we adjust the DEF accordingly.
65 memb_frequencyDensity_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
66 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
70 ASN__CTFAIL(app_key, td, sptr,
71 "%s: value not given (%s:%d)",
72 td->name, __FILE__, __LINE__);
76 /* Determine the number of elements */
77 size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
80 /* Perform validation of the inner elements */
81 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
83 ASN__CTFAIL(app_key, td, sptr,
84 "%s: constraint failed (%s:%d)",
85 td->name, __FILE__, __LINE__);
91 memb_timeDensity_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
92 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
96 ASN__CTFAIL(app_key, td, sptr,
97 "%s: value not given (%s:%d)",
98 td->name, __FILE__, __LINE__);
102 /* Determine the number of elements */
103 size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
106 /* Perform validation of the inner elements */
107 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
109 ASN__CTFAIL(app_key, td, sptr,
110 "%s: constraint failed (%s:%d)",
111 td->name, __FILE__, __LINE__);
117 memb_epre_Ratio_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
118 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
122 ASN__CTFAIL(app_key, td, sptr,
123 "%s: value not given (%s:%d)",
124 td->name, __FILE__, __LINE__);
128 value = *(const long *)sptr;
130 if((value >= 0 && value <= 3)) {
131 /* Constraint check succeeded */
134 ASN__CTFAIL(app_key, td, sptr,
135 "%s: constraint failed (%s:%d)",
136 td->name, __FILE__, __LINE__);
141 static asn_oer_constraints_t asn_OER_memb_Member_constr_3 CC_NOTUSED = {
142 { 2, 1 } /* (1..276) */,
144 static asn_per_constraints_t asn_PER_memb_Member_constr_3 CC_NOTUSED = {
145 { APC_CONSTRAINED, 9, 9, 1, 276 } /* (1..276) */,
146 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
147 0, 0 /* No PER value map */
149 static asn_oer_constraints_t asn_OER_type_frequencyDensity_constr_2 CC_NOTUSED = {
151 2 /* (SIZE(2..2)) */};
152 static asn_per_constraints_t asn_PER_type_frequencyDensity_constr_2 CC_NOTUSED = {
153 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
154 { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */,
155 0, 0 /* No PER value map */
157 static asn_oer_constraints_t asn_OER_memb_Member_constr_5 CC_NOTUSED = {
158 { 1, 1 } /* (0..29) */,
160 static asn_per_constraints_t asn_PER_memb_Member_constr_5 CC_NOTUSED = {
161 { APC_CONSTRAINED, 5, 5, 0, 29 } /* (0..29) */,
162 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
163 0, 0 /* No PER value map */
165 static asn_oer_constraints_t asn_OER_type_timeDensity_constr_4 CC_NOTUSED = {
167 3 /* (SIZE(3..3)) */};
168 static asn_per_constraints_t asn_PER_type_timeDensity_constr_4 CC_NOTUSED = {
169 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
170 { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */,
171 0, 0 /* No PER value map */
173 static asn_oer_constraints_t asn_OER_type_resourceElementOffset_constr_7 CC_NOTUSED = {
176 static asn_per_constraints_t asn_PER_type_resourceElementOffset_constr_7 CC_NOTUSED = {
177 { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
178 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
179 0, 0 /* No PER value map */
181 static asn_oer_constraints_t asn_OER_memb_frequencyDensity_constr_2 CC_NOTUSED = {
183 2 /* (SIZE(2..2)) */};
184 static asn_per_constraints_t asn_PER_memb_frequencyDensity_constr_2 CC_NOTUSED = {
185 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
186 { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */,
187 0, 0 /* No PER value map */
189 static asn_oer_constraints_t asn_OER_memb_timeDensity_constr_4 CC_NOTUSED = {
191 3 /* (SIZE(3..3)) */};
192 static asn_per_constraints_t asn_PER_memb_timeDensity_constr_4 CC_NOTUSED = {
193 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
194 { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */,
195 0, 0 /* No PER value map */
197 static asn_oer_constraints_t asn_OER_memb_epre_Ratio_constr_6 CC_NOTUSED = {
198 { 1, 1 } /* (0..3) */,
200 static asn_per_constraints_t asn_PER_memb_epre_Ratio_constr_6 CC_NOTUSED = {
201 { APC_CONSTRAINED, 2, 2, 0, 3 } /* (0..3) */,
202 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
203 0, 0 /* No PER value map */
205 static asn_TYPE_member_t asn_MBR_frequencyDensity_2[] = {
207 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
209 &asn_DEF_NativeInteger,
211 { &asn_OER_memb_Member_constr_3, &asn_PER_memb_Member_constr_3, memb_NativeInteger_constraint_2 },
212 0, 0, /* No default value */
216 static const ber_tlv_tag_t asn_DEF_frequencyDensity_tags_2[] = {
217 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
218 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
220 static asn_SET_OF_specifics_t asn_SPC_frequencyDensity_specs_2 = {
221 sizeof(struct PTRS_DownlinkConfig__frequencyDensity),
222 offsetof(struct PTRS_DownlinkConfig__frequencyDensity, _asn_ctx),
223 0, /* XER encoding is XMLDelimitedItemList */
225 static /* Use -fall-defs-global to expose */
226 asn_TYPE_descriptor_t asn_DEF_frequencyDensity_2 = {
230 asn_DEF_frequencyDensity_tags_2,
231 sizeof(asn_DEF_frequencyDensity_tags_2)
232 /sizeof(asn_DEF_frequencyDensity_tags_2[0]) - 1, /* 1 */
233 asn_DEF_frequencyDensity_tags_2, /* Same as above */
234 sizeof(asn_DEF_frequencyDensity_tags_2)
235 /sizeof(asn_DEF_frequencyDensity_tags_2[0]), /* 2 */
236 { &asn_OER_type_frequencyDensity_constr_2, &asn_PER_type_frequencyDensity_constr_2, SEQUENCE_OF_constraint },
237 asn_MBR_frequencyDensity_2,
238 1, /* Single element */
239 &asn_SPC_frequencyDensity_specs_2 /* Additional specs */
242 static asn_TYPE_member_t asn_MBR_timeDensity_4[] = {
244 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
246 &asn_DEF_NativeInteger,
248 { &asn_OER_memb_Member_constr_5, &asn_PER_memb_Member_constr_5, memb_NativeInteger_constraint_4 },
249 0, 0, /* No default value */
253 static const ber_tlv_tag_t asn_DEF_timeDensity_tags_4[] = {
254 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
255 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
257 static asn_SET_OF_specifics_t asn_SPC_timeDensity_specs_4 = {
258 sizeof(struct PTRS_DownlinkConfig__timeDensity),
259 offsetof(struct PTRS_DownlinkConfig__timeDensity, _asn_ctx),
260 0, /* XER encoding is XMLDelimitedItemList */
262 static /* Use -fall-defs-global to expose */
263 asn_TYPE_descriptor_t asn_DEF_timeDensity_4 = {
267 asn_DEF_timeDensity_tags_4,
268 sizeof(asn_DEF_timeDensity_tags_4)
269 /sizeof(asn_DEF_timeDensity_tags_4[0]) - 1, /* 1 */
270 asn_DEF_timeDensity_tags_4, /* Same as above */
271 sizeof(asn_DEF_timeDensity_tags_4)
272 /sizeof(asn_DEF_timeDensity_tags_4[0]), /* 2 */
273 { &asn_OER_type_timeDensity_constr_4, &asn_PER_type_timeDensity_constr_4, SEQUENCE_OF_constraint },
274 asn_MBR_timeDensity_4,
275 1, /* Single element */
276 &asn_SPC_timeDensity_specs_4 /* Additional specs */
279 static const asn_INTEGER_enum_map_t asn_MAP_resourceElementOffset_value2enum_7[] = {
280 { 0, 8, "offset01" },
281 { 1, 8, "offset10" },
284 static const unsigned int asn_MAP_resourceElementOffset_enum2value_7[] = {
289 static const asn_INTEGER_specifics_t asn_SPC_resourceElementOffset_specs_7 = {
290 asn_MAP_resourceElementOffset_value2enum_7, /* "tag" => N; sorted by tag */
291 asn_MAP_resourceElementOffset_enum2value_7, /* N => "tag"; sorted by N */
292 3, /* Number of elements in the maps */
293 0, /* Enumeration is not extensible */
294 1, /* Strict enumeration */
295 0, /* Native long size */
298 static const ber_tlv_tag_t asn_DEF_resourceElementOffset_tags_7[] = {
299 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
300 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
302 static /* Use -fall-defs-global to expose */
303 asn_TYPE_descriptor_t asn_DEF_resourceElementOffset_7 = {
304 "resourceElementOffset",
305 "resourceElementOffset",
306 &asn_OP_NativeEnumerated,
307 asn_DEF_resourceElementOffset_tags_7,
308 sizeof(asn_DEF_resourceElementOffset_tags_7)
309 /sizeof(asn_DEF_resourceElementOffset_tags_7[0]) - 1, /* 1 */
310 asn_DEF_resourceElementOffset_tags_7, /* Same as above */
311 sizeof(asn_DEF_resourceElementOffset_tags_7)
312 /sizeof(asn_DEF_resourceElementOffset_tags_7[0]), /* 2 */
313 { &asn_OER_type_resourceElementOffset_constr_7, &asn_PER_type_resourceElementOffset_constr_7, NativeEnumerated_constraint },
314 0, 0, /* Defined elsewhere */
315 &asn_SPC_resourceElementOffset_specs_7 /* Additional specs */
318 asn_TYPE_member_t asn_MBR_PTRS_DownlinkConfig_1[] = {
319 { ATF_POINTER, 4, offsetof(struct PTRS_DownlinkConfig, frequencyDensity),
320 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
322 &asn_DEF_frequencyDensity_2,
324 { &asn_OER_memb_frequencyDensity_constr_2, &asn_PER_memb_frequencyDensity_constr_2, memb_frequencyDensity_constraint_1 },
325 0, 0, /* No default value */
328 { ATF_POINTER, 3, offsetof(struct PTRS_DownlinkConfig, timeDensity),
329 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
331 &asn_DEF_timeDensity_4,
333 { &asn_OER_memb_timeDensity_constr_4, &asn_PER_memb_timeDensity_constr_4, memb_timeDensity_constraint_1 },
334 0, 0, /* No default value */
337 { ATF_POINTER, 2, offsetof(struct PTRS_DownlinkConfig, epre_Ratio),
338 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
339 -1, /* IMPLICIT tag at current level */
340 &asn_DEF_NativeInteger,
342 { &asn_OER_memb_epre_Ratio_constr_6, &asn_PER_memb_epre_Ratio_constr_6, memb_epre_Ratio_constraint_1 },
343 0, 0, /* No default value */
346 { ATF_POINTER, 1, offsetof(struct PTRS_DownlinkConfig, resourceElementOffset),
347 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
348 -1, /* IMPLICIT tag at current level */
349 &asn_DEF_resourceElementOffset_7,
352 0, 0, /* No default value */
353 "resourceElementOffset"
356 static const int asn_MAP_PTRS_DownlinkConfig_oms_1[] = { 0, 1, 2, 3 };
357 static const ber_tlv_tag_t asn_DEF_PTRS_DownlinkConfig_tags_1[] = {
358 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
360 static const asn_TYPE_tag2member_t asn_MAP_PTRS_DownlinkConfig_tag2el_1[] = {
361 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* frequencyDensity */
362 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* timeDensity */
363 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* epre-Ratio */
364 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* resourceElementOffset */
366 asn_SEQUENCE_specifics_t asn_SPC_PTRS_DownlinkConfig_specs_1 = {
367 sizeof(struct PTRS_DownlinkConfig),
368 offsetof(struct PTRS_DownlinkConfig, _asn_ctx),
369 asn_MAP_PTRS_DownlinkConfig_tag2el_1,
370 4, /* Count of tags in the map */
371 asn_MAP_PTRS_DownlinkConfig_oms_1, /* Optional members */
372 4, 0, /* Root/Additions */
373 4, /* First extension addition */
375 asn_TYPE_descriptor_t asn_DEF_PTRS_DownlinkConfig = {
376 "PTRS-DownlinkConfig",
377 "PTRS-DownlinkConfig",
379 asn_DEF_PTRS_DownlinkConfig_tags_1,
380 sizeof(asn_DEF_PTRS_DownlinkConfig_tags_1)
381 /sizeof(asn_DEF_PTRS_DownlinkConfig_tags_1[0]), /* 1 */
382 asn_DEF_PTRS_DownlinkConfig_tags_1, /* Same as above */
383 sizeof(asn_DEF_PTRS_DownlinkConfig_tags_1)
384 /sizeof(asn_DEF_PTRS_DownlinkConfig_tags_1[0]), /* 1 */
385 { 0, 0, SEQUENCE_constraint },
386 asn_MBR_PTRS_DownlinkConfig_1,
387 4, /* Elements count */
388 &asn_SPC_PTRS_DownlinkConfig_specs_1 /* Additional specs */