2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "NR-RRC-Definitions"
4 * found in "../ASN1_Input/rrc_15_3_asn.asn1"
5 * `asn1c -D ../RRC_output_14Nov/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER`
8 #include "CSI-IM-Resource.h"
10 #include "CSI-FrequencyOccupation.h"
11 #include "CSI-ResourcePeriodicityAndOffset.h"
13 * This type is implemented using NativeEnumerated,
14 * so here we adjust the DEF accordingly.
17 memb_symbolLocation_p0_constraint_4(const asn_TYPE_descriptor_t *td, const void *sptr,
18 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
22 ASN__CTFAIL(app_key, td, sptr,
23 "%s: value not given (%s:%d)",
24 td->name, __FILE__, __LINE__);
28 value = *(const long *)sptr;
30 if((value >= 0 && value <= 12)) {
31 /* Constraint check succeeded */
34 ASN__CTFAIL(app_key, td, sptr,
35 "%s: constraint failed (%s:%d)",
36 td->name, __FILE__, __LINE__);
42 * This type is implemented using NativeEnumerated,
43 * so here we adjust the DEF accordingly.
46 memb_symbolLocation_p1_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr,
47 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
51 ASN__CTFAIL(app_key, td, sptr,
52 "%s: value not given (%s:%d)",
53 td->name, __FILE__, __LINE__);
57 value = *(const long *)sptr;
59 if((value >= 0 && value <= 13)) {
60 /* Constraint check succeeded */
63 ASN__CTFAIL(app_key, td, sptr,
64 "%s: constraint failed (%s:%d)",
65 td->name, __FILE__, __LINE__);
70 static asn_oer_constraints_t asn_OER_type_subcarrierLocation_p0_constr_5 CC_NOTUSED = {
73 static asn_per_constraints_t asn_PER_type_subcarrierLocation_p0_constr_5 CC_NOTUSED = {
74 { APC_CONSTRAINED, 3, 3, 0, 5 } /* (0..5) */,
75 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
76 0, 0 /* No PER value map */
78 static asn_oer_constraints_t asn_OER_memb_symbolLocation_p0_constr_12 CC_NOTUSED = {
79 { 1, 1 } /* (0..12) */,
81 static asn_per_constraints_t asn_PER_memb_symbolLocation_p0_constr_12 CC_NOTUSED = {
82 { APC_CONSTRAINED, 4, 4, 0, 12 } /* (0..12) */,
83 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
84 0, 0 /* No PER value map */
86 static asn_oer_constraints_t asn_OER_type_subcarrierLocation_p1_constr_14 CC_NOTUSED = {
89 static asn_per_constraints_t asn_PER_type_subcarrierLocation_p1_constr_14 CC_NOTUSED = {
90 { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
91 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
92 0, 0 /* No PER value map */
94 static asn_oer_constraints_t asn_OER_memb_symbolLocation_p1_constr_18 CC_NOTUSED = {
95 { 1, 1 } /* (0..13) */,
97 static asn_per_constraints_t asn_PER_memb_symbolLocation_p1_constr_18 CC_NOTUSED = {
98 { APC_CONSTRAINED, 4, 4, 0, 13 } /* (0..13) */,
99 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
100 0, 0 /* No PER value map */
102 static asn_oer_constraints_t asn_OER_type_csi_IM_ResourceElementPattern_constr_3 CC_NOTUSED = {
105 static asn_per_constraints_t asn_PER_type_csi_IM_ResourceElementPattern_constr_3 CC_NOTUSED = {
106 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
107 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
108 0, 0 /* No PER value map */
110 static const asn_INTEGER_enum_map_t asn_MAP_subcarrierLocation_p0_value2enum_5[] = {
118 static const unsigned int asn_MAP_subcarrierLocation_p0_enum2value_5[] = {
126 static const asn_INTEGER_specifics_t asn_SPC_subcarrierLocation_p0_specs_5 = {
127 asn_MAP_subcarrierLocation_p0_value2enum_5, /* "tag" => N; sorted by tag */
128 asn_MAP_subcarrierLocation_p0_enum2value_5, /* N => "tag"; sorted by N */
129 6, /* Number of elements in the maps */
130 0, /* Enumeration is not extensible */
131 1, /* Strict enumeration */
132 0, /* Native long size */
135 static const ber_tlv_tag_t asn_DEF_subcarrierLocation_p0_tags_5[] = {
136 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
137 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
139 static /* Use -fall-defs-global to expose */
140 asn_TYPE_descriptor_t asn_DEF_subcarrierLocation_p0_5 = {
141 "subcarrierLocation-p0",
142 "subcarrierLocation-p0",
143 &asn_OP_NativeEnumerated,
144 asn_DEF_subcarrierLocation_p0_tags_5,
145 sizeof(asn_DEF_subcarrierLocation_p0_tags_5)
146 /sizeof(asn_DEF_subcarrierLocation_p0_tags_5[0]) - 1, /* 1 */
147 asn_DEF_subcarrierLocation_p0_tags_5, /* Same as above */
148 sizeof(asn_DEF_subcarrierLocation_p0_tags_5)
149 /sizeof(asn_DEF_subcarrierLocation_p0_tags_5[0]), /* 2 */
150 { &asn_OER_type_subcarrierLocation_p0_constr_5, &asn_PER_type_subcarrierLocation_p0_constr_5, NativeEnumerated_constraint },
151 0, 0, /* Defined elsewhere */
152 &asn_SPC_subcarrierLocation_p0_specs_5 /* Additional specs */
155 static asn_TYPE_member_t asn_MBR_pattern0_4[] = {
156 { ATF_NOFLAGS, 0, offsetof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern__pattern0, subcarrierLocation_p0),
157 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
158 -1, /* IMPLICIT tag at current level */
159 &asn_DEF_subcarrierLocation_p0_5,
162 0, 0, /* No default value */
163 "subcarrierLocation-p0"
165 { ATF_NOFLAGS, 0, offsetof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern__pattern0, symbolLocation_p0),
166 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
167 -1, /* IMPLICIT tag at current level */
168 &asn_DEF_NativeInteger,
170 { &asn_OER_memb_symbolLocation_p0_constr_12, &asn_PER_memb_symbolLocation_p0_constr_12, memb_symbolLocation_p0_constraint_4 },
171 0, 0, /* No default value */
175 static const ber_tlv_tag_t asn_DEF_pattern0_tags_4[] = {
176 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
177 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
179 static const asn_TYPE_tag2member_t asn_MAP_pattern0_tag2el_4[] = {
180 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* subcarrierLocation-p0 */
181 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* symbolLocation-p0 */
183 static asn_SEQUENCE_specifics_t asn_SPC_pattern0_specs_4 = {
184 sizeof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern__pattern0),
185 offsetof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern__pattern0, _asn_ctx),
186 asn_MAP_pattern0_tag2el_4,
187 2, /* Count of tags in the map */
188 0, 0, 0, /* Optional elements (not needed) */
189 -1, /* First extension addition */
191 static /* Use -fall-defs-global to expose */
192 asn_TYPE_descriptor_t asn_DEF_pattern0_4 = {
196 asn_DEF_pattern0_tags_4,
197 sizeof(asn_DEF_pattern0_tags_4)
198 /sizeof(asn_DEF_pattern0_tags_4[0]) - 1, /* 1 */
199 asn_DEF_pattern0_tags_4, /* Same as above */
200 sizeof(asn_DEF_pattern0_tags_4)
201 /sizeof(asn_DEF_pattern0_tags_4[0]), /* 2 */
202 { 0, 0, SEQUENCE_constraint },
204 2, /* Elements count */
205 &asn_SPC_pattern0_specs_4 /* Additional specs */
208 static const asn_INTEGER_enum_map_t asn_MAP_subcarrierLocation_p1_value2enum_14[] = {
213 static const unsigned int asn_MAP_subcarrierLocation_p1_enum2value_14[] = {
218 static const asn_INTEGER_specifics_t asn_SPC_subcarrierLocation_p1_specs_14 = {
219 asn_MAP_subcarrierLocation_p1_value2enum_14, /* "tag" => N; sorted by tag */
220 asn_MAP_subcarrierLocation_p1_enum2value_14, /* N => "tag"; sorted by N */
221 3, /* Number of elements in the maps */
222 0, /* Enumeration is not extensible */
223 1, /* Strict enumeration */
224 0, /* Native long size */
227 static const ber_tlv_tag_t asn_DEF_subcarrierLocation_p1_tags_14[] = {
228 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
229 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
231 static /* Use -fall-defs-global to expose */
232 asn_TYPE_descriptor_t asn_DEF_subcarrierLocation_p1_14 = {
233 "subcarrierLocation-p1",
234 "subcarrierLocation-p1",
235 &asn_OP_NativeEnumerated,
236 asn_DEF_subcarrierLocation_p1_tags_14,
237 sizeof(asn_DEF_subcarrierLocation_p1_tags_14)
238 /sizeof(asn_DEF_subcarrierLocation_p1_tags_14[0]) - 1, /* 1 */
239 asn_DEF_subcarrierLocation_p1_tags_14, /* Same as above */
240 sizeof(asn_DEF_subcarrierLocation_p1_tags_14)
241 /sizeof(asn_DEF_subcarrierLocation_p1_tags_14[0]), /* 2 */
242 { &asn_OER_type_subcarrierLocation_p1_constr_14, &asn_PER_type_subcarrierLocation_p1_constr_14, NativeEnumerated_constraint },
243 0, 0, /* Defined elsewhere */
244 &asn_SPC_subcarrierLocation_p1_specs_14 /* Additional specs */
247 static asn_TYPE_member_t asn_MBR_pattern1_13[] = {
248 { ATF_NOFLAGS, 0, offsetof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern__pattern1, subcarrierLocation_p1),
249 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
250 -1, /* IMPLICIT tag at current level */
251 &asn_DEF_subcarrierLocation_p1_14,
254 0, 0, /* No default value */
255 "subcarrierLocation-p1"
257 { ATF_NOFLAGS, 0, offsetof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern__pattern1, symbolLocation_p1),
258 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
259 -1, /* IMPLICIT tag at current level */
260 &asn_DEF_NativeInteger,
262 { &asn_OER_memb_symbolLocation_p1_constr_18, &asn_PER_memb_symbolLocation_p1_constr_18, memb_symbolLocation_p1_constraint_13 },
263 0, 0, /* No default value */
267 static const ber_tlv_tag_t asn_DEF_pattern1_tags_13[] = {
268 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
269 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
271 static const asn_TYPE_tag2member_t asn_MAP_pattern1_tag2el_13[] = {
272 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* subcarrierLocation-p1 */
273 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* symbolLocation-p1 */
275 static asn_SEQUENCE_specifics_t asn_SPC_pattern1_specs_13 = {
276 sizeof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern__pattern1),
277 offsetof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern__pattern1, _asn_ctx),
278 asn_MAP_pattern1_tag2el_13,
279 2, /* Count of tags in the map */
280 0, 0, 0, /* Optional elements (not needed) */
281 -1, /* First extension addition */
283 static /* Use -fall-defs-global to expose */
284 asn_TYPE_descriptor_t asn_DEF_pattern1_13 = {
288 asn_DEF_pattern1_tags_13,
289 sizeof(asn_DEF_pattern1_tags_13)
290 /sizeof(asn_DEF_pattern1_tags_13[0]) - 1, /* 1 */
291 asn_DEF_pattern1_tags_13, /* Same as above */
292 sizeof(asn_DEF_pattern1_tags_13)
293 /sizeof(asn_DEF_pattern1_tags_13[0]), /* 2 */
294 { 0, 0, SEQUENCE_constraint },
296 2, /* Elements count */
297 &asn_SPC_pattern1_specs_13 /* Additional specs */
300 static asn_TYPE_member_t asn_MBR_csi_IM_ResourceElementPattern_3[] = {
301 { ATF_POINTER, 0, offsetof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern, choice.pattern0),
302 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
307 0, 0, /* No default value */
310 { ATF_POINTER, 0, offsetof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern, choice.pattern1),
311 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
313 &asn_DEF_pattern1_13,
316 0, 0, /* No default value */
320 static const asn_TYPE_tag2member_t asn_MAP_csi_IM_ResourceElementPattern_tag2el_3[] = {
321 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pattern0 */
322 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* pattern1 */
324 static asn_CHOICE_specifics_t asn_SPC_csi_IM_ResourceElementPattern_specs_3 = {
325 sizeof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern),
326 offsetof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern, _asn_ctx),
327 offsetof(struct CSI_IM_Resource__csi_IM_ResourceElementPattern, present),
328 sizeof(((struct CSI_IM_Resource__csi_IM_ResourceElementPattern *)0)->present),
329 asn_MAP_csi_IM_ResourceElementPattern_tag2el_3,
330 2, /* Count of tags in the map */
332 -1 /* Extensions start */
334 static /* Use -fall-defs-global to expose */
335 asn_TYPE_descriptor_t asn_DEF_csi_IM_ResourceElementPattern_3 = {
336 "csi-IM-ResourceElementPattern",
337 "csi-IM-ResourceElementPattern",
339 0, /* No effective tags (pointer) */
340 0, /* No effective tags (count) */
341 0, /* No tags (pointer) */
342 0, /* No tags (count) */
343 { &asn_OER_type_csi_IM_ResourceElementPattern_constr_3, &asn_PER_type_csi_IM_ResourceElementPattern_constr_3, CHOICE_constraint },
344 asn_MBR_csi_IM_ResourceElementPattern_3,
345 2, /* Elements count */
346 &asn_SPC_csi_IM_ResourceElementPattern_specs_3 /* Additional specs */
349 asn_TYPE_member_t asn_MBR_CSI_IM_Resource_1[] = {
350 { ATF_NOFLAGS, 0, offsetof(struct CSI_IM_Resource, csi_IM_ResourceId),
351 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
352 -1, /* IMPLICIT tag at current level */
353 &asn_DEF_CSI_IM_ResourceId,
356 0, 0, /* No default value */
359 { ATF_POINTER, 3, offsetof(struct CSI_IM_Resource, csi_IM_ResourceElementPattern),
360 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
361 +1, /* EXPLICIT tag at current level */
362 &asn_DEF_csi_IM_ResourceElementPattern_3,
365 0, 0, /* No default value */
366 "csi-IM-ResourceElementPattern"
368 { ATF_POINTER, 2, offsetof(struct CSI_IM_Resource, freqBand),
369 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
370 -1, /* IMPLICIT tag at current level */
371 &asn_DEF_CSI_FrequencyOccupation,
374 0, 0, /* No default value */
377 { ATF_POINTER, 1, offsetof(struct CSI_IM_Resource, periodicityAndOffset),
378 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
379 +1, /* EXPLICIT tag at current level */
380 &asn_DEF_CSI_ResourcePeriodicityAndOffset,
383 0, 0, /* No default value */
384 "periodicityAndOffset"
387 static const int asn_MAP_CSI_IM_Resource_oms_1[] = { 1, 2, 3 };
388 static const ber_tlv_tag_t asn_DEF_CSI_IM_Resource_tags_1[] = {
389 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
391 static const asn_TYPE_tag2member_t asn_MAP_CSI_IM_Resource_tag2el_1[] = {
392 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* csi-IM-ResourceId */
393 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* csi-IM-ResourceElementPattern */
394 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* freqBand */
395 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* periodicityAndOffset */
397 asn_SEQUENCE_specifics_t asn_SPC_CSI_IM_Resource_specs_1 = {
398 sizeof(struct CSI_IM_Resource),
399 offsetof(struct CSI_IM_Resource, _asn_ctx),
400 asn_MAP_CSI_IM_Resource_tag2el_1,
401 4, /* Count of tags in the map */
402 asn_MAP_CSI_IM_Resource_oms_1, /* Optional members */
403 3, 0, /* Root/Additions */
404 4, /* First extension addition */
406 asn_TYPE_descriptor_t asn_DEF_CSI_IM_Resource = {
410 asn_DEF_CSI_IM_Resource_tags_1,
411 sizeof(asn_DEF_CSI_IM_Resource_tags_1)
412 /sizeof(asn_DEF_CSI_IM_Resource_tags_1[0]), /* 1 */
413 asn_DEF_CSI_IM_Resource_tags_1, /* Same as above */
414 sizeof(asn_DEF_CSI_IM_Resource_tags_1)
415 /sizeof(asn_DEF_CSI_IM_Resource_tags_1[0]), /* 1 */
416 { 0, 0, SEQUENCE_constraint },
417 asn_MBR_CSI_IM_Resource_1,
418 4, /* Elements count */
419 &asn_SPC_CSI_IM_Resource_specs_1 /* Additional specs */