sjana | 76e88d2 | 2020-03-19 13:24:39 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Generated by asn1c-0.9.29 n1 (http://lionet.info/asn1c) |
| 3 | * From ASN.1 module "X2AP-IEs" |
| 4 | * found in "../../asn_defs/asn1/x2ap-15-04.asn" |
| 5 | * `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-OER` |
| 6 | */ |
| 7 | |
| 8 | #include "X2N_WidebandCQI.h" |
| 9 | |
| 10 | #include "X2N_WidebandCQICodeword1.h" |
| 11 | #include "X2N_ProtocolExtensionContainer.h" |
| 12 | static int |
| 13 | memb_X2N_widebandCQICodeword0_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
| 14 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 15 | long value; |
| 16 | |
| 17 | if(!sptr) { |
| 18 | ASN__CTFAIL(app_key, td, sptr, |
| 19 | "%s: value not given (%s:%d)", |
| 20 | td->name, __FILE__, __LINE__); |
| 21 | return -1; |
| 22 | } |
| 23 | |
| 24 | value = *(const long *)sptr; |
| 25 | |
| 26 | if((value >= 0 && value <= 15)) { |
| 27 | /* Constraint check succeeded */ |
| 28 | return 0; |
| 29 | } else { |
| 30 | ASN__CTFAIL(app_key, td, sptr, |
| 31 | "%s: constraint failed (%s:%d)", |
| 32 | td->name, __FILE__, __LINE__); |
| 33 | return -1; |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | static asn_per_constraints_t asn_PER_memb_X2N_widebandCQICodeword0_constr_2 CC_NOTUSED = { |
| 38 | { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 15 } /* (0..15,...) */, |
| 39 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 40 | 0, 0 /* No PER value map */ |
| 41 | }; |
| 42 | asn_TYPE_member_t asn_MBR_X2N_WidebandCQI_1[] = { |
| 43 | { ATF_NOFLAGS, 0, offsetof(struct X2N_WidebandCQI, widebandCQICodeword0), |
| 44 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 45 | -1, /* IMPLICIT tag at current level */ |
| 46 | &asn_DEF_NativeInteger, |
| 47 | 0, |
| 48 | { 0, &asn_PER_memb_X2N_widebandCQICodeword0_constr_2, memb_X2N_widebandCQICodeword0_constraint_1 }, |
| 49 | 0, 0, /* No default value */ |
| 50 | "widebandCQICodeword0" |
| 51 | }, |
| 52 | { ATF_POINTER, 2, offsetof(struct X2N_WidebandCQI, widebandCQICodeword1), |
| 53 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 54 | +1, /* EXPLICIT tag at current level */ |
| 55 | &asn_DEF_X2N_WidebandCQICodeword1, |
| 56 | 0, |
| 57 | { 0, 0, 0 }, |
| 58 | 0, 0, /* No default value */ |
| 59 | "widebandCQICodeword1" |
| 60 | }, |
| 61 | { ATF_POINTER, 1, offsetof(struct X2N_WidebandCQI, iE_Extensions), |
| 62 | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 63 | -1, /* IMPLICIT tag at current level */ |
| 64 | &asn_DEF_X2N_ProtocolExtensionContainer_8231P221, |
| 65 | 0, |
| 66 | { 0, 0, 0 }, |
| 67 | 0, 0, /* No default value */ |
| 68 | "iE-Extensions" |
| 69 | }, |
| 70 | }; |
| 71 | static const int asn_MAP_X2N_WidebandCQI_oms_1[] = { 1, 2 }; |
| 72 | static const ber_tlv_tag_t asn_DEF_X2N_WidebandCQI_tags_1[] = { |
| 73 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 74 | }; |
| 75 | static const asn_TYPE_tag2member_t asn_MAP_X2N_WidebandCQI_tag2el_1[] = { |
| 76 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* widebandCQICodeword0 */ |
| 77 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* widebandCQICodeword1 */ |
| 78 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ |
| 79 | }; |
| 80 | asn_SEQUENCE_specifics_t asn_SPC_X2N_WidebandCQI_specs_1 = { |
| 81 | sizeof(struct X2N_WidebandCQI), |
| 82 | offsetof(struct X2N_WidebandCQI, _asn_ctx), |
| 83 | asn_MAP_X2N_WidebandCQI_tag2el_1, |
| 84 | 3, /* Count of tags in the map */ |
| 85 | asn_MAP_X2N_WidebandCQI_oms_1, /* Optional members */ |
| 86 | 2, 0, /* Root/Additions */ |
| 87 | 3, /* First extension addition */ |
| 88 | }; |
| 89 | asn_TYPE_descriptor_t asn_DEF_X2N_WidebandCQI = { |
| 90 | "WidebandCQI", |
| 91 | "WidebandCQI", |
| 92 | &asn_OP_SEQUENCE, |
| 93 | asn_DEF_X2N_WidebandCQI_tags_1, |
| 94 | sizeof(asn_DEF_X2N_WidebandCQI_tags_1) |
| 95 | /sizeof(asn_DEF_X2N_WidebandCQI_tags_1[0]), /* 1 */ |
| 96 | asn_DEF_X2N_WidebandCQI_tags_1, /* Same as above */ |
| 97 | sizeof(asn_DEF_X2N_WidebandCQI_tags_1) |
| 98 | /sizeof(asn_DEF_X2N_WidebandCQI_tags_1[0]), /* 1 */ |
| 99 | { 0, 0, SEQUENCE_constraint }, |
| 100 | asn_MBR_X2N_WidebandCQI_1, |
| 101 | 3, /* Elements count */ |
| 102 | &asn_SPC_X2N_WidebandCQI_specs_1 /* Additional specs */ |
| 103 | }; |
| 104 | |