Juha Hyttinen | ff8dccd | 2019-12-10 14:34:07 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) |
| 3 | * From ASN.1 module "X2AP-IEs" |
| 4 | * found in "Spec/e2_and_x2-combined-and-minimized.asn1" |
| 5 | * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` |
| 6 | */ |
| 7 | |
| 8 | #include "ABSInformationFDD.h" |
| 9 | |
| 10 | #include "ProtocolExtensionContainer.h" |
| 11 | /* |
| 12 | * This type is implemented using NativeEnumerated, |
| 13 | * so here we adjust the DEF accordingly. |
| 14 | */ |
| 15 | static int |
| 16 | memb_abs_pattern_info_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
| 17 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 18 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
| 19 | size_t size; |
| 20 | |
| 21 | if(!sptr) { |
| 22 | ASN__CTFAIL(app_key, td, sptr, |
| 23 | "%s: value not given (%s:%d)", |
| 24 | td->name, __FILE__, __LINE__); |
| 25 | return -1; |
| 26 | } |
| 27 | |
| 28 | if(st->size > 0) { |
| 29 | /* Size in bits */ |
| 30 | size = 8 * st->size - (st->bits_unused & 0x07); |
| 31 | } else { |
| 32 | size = 0; |
| 33 | } |
| 34 | |
| 35 | if((size == 40)) { |
| 36 | /* Constraint check succeeded */ |
| 37 | return 0; |
| 38 | } else { |
| 39 | ASN__CTFAIL(app_key, td, sptr, |
| 40 | "%s: constraint failed (%s:%d)", |
| 41 | td->name, __FILE__, __LINE__); |
| 42 | return -1; |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | static int |
| 47 | memb_measurement_subset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
| 48 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 49 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
| 50 | size_t size; |
| 51 | |
| 52 | if(!sptr) { |
| 53 | ASN__CTFAIL(app_key, td, sptr, |
| 54 | "%s: value not given (%s:%d)", |
| 55 | td->name, __FILE__, __LINE__); |
| 56 | return -1; |
| 57 | } |
| 58 | |
| 59 | if(st->size > 0) { |
| 60 | /* Size in bits */ |
| 61 | size = 8 * st->size - (st->bits_unused & 0x07); |
| 62 | } else { |
| 63 | size = 0; |
| 64 | } |
| 65 | |
| 66 | if((size == 40)) { |
| 67 | /* Constraint check succeeded */ |
| 68 | return 0; |
| 69 | } else { |
| 70 | ASN__CTFAIL(app_key, td, sptr, |
| 71 | "%s: constraint failed (%s:%d)", |
| 72 | td->name, __FILE__, __LINE__); |
| 73 | return -1; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | static asn_per_constraints_t asn_PER_type_numberOfCellSpecificAntennaPorts_constr_3 CC_NOTUSED = { |
| 78 | { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, |
| 79 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 80 | 0, 0 /* No PER value map */ |
| 81 | }; |
| 82 | static asn_per_constraints_t asn_PER_memb_abs_pattern_info_constr_2 CC_NOTUSED = { |
| 83 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 84 | { APC_CONSTRAINED, 0, 0, 40, 40 } /* (SIZE(40..40)) */, |
| 85 | 0, 0 /* No PER value map */ |
| 86 | }; |
| 87 | static asn_per_constraints_t asn_PER_memb_measurement_subset_constr_8 CC_NOTUSED = { |
| 88 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 89 | { APC_CONSTRAINED, 0, 0, 40, 40 } /* (SIZE(40..40)) */, |
| 90 | 0, 0 /* No PER value map */ |
| 91 | }; |
| 92 | static const asn_INTEGER_enum_map_t asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_3[] = { |
| 93 | { 0, 3, "one" }, |
| 94 | { 1, 3, "two" }, |
| 95 | { 2, 4, "four" } |
| 96 | /* This list is extensible */ |
| 97 | }; |
| 98 | static const unsigned int asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_3[] = { |
| 99 | 2, /* four(2) */ |
| 100 | 0, /* one(0) */ |
| 101 | 1 /* two(1) */ |
| 102 | /* This list is extensible */ |
| 103 | }; |
| 104 | static const asn_INTEGER_specifics_t asn_SPC_numberOfCellSpecificAntennaPorts_specs_3 = { |
| 105 | asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_3, /* "tag" => N; sorted by tag */ |
| 106 | asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_3, /* N => "tag"; sorted by N */ |
| 107 | 3, /* Number of elements in the maps */ |
| 108 | 4, /* Extensions before this member */ |
| 109 | 1, /* Strict enumeration */ |
| 110 | 0, /* Native long size */ |
| 111 | 0 |
| 112 | }; |
| 113 | static const ber_tlv_tag_t asn_DEF_numberOfCellSpecificAntennaPorts_tags_3[] = { |
| 114 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 115 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 116 | }; |
| 117 | static /* Use -fall-defs-global to expose */ |
| 118 | asn_TYPE_descriptor_t asn_DEF_numberOfCellSpecificAntennaPorts_3 = { |
| 119 | "numberOfCellSpecificAntennaPorts", |
| 120 | "numberOfCellSpecificAntennaPorts", |
| 121 | &asn_OP_NativeEnumerated, |
| 122 | asn_DEF_numberOfCellSpecificAntennaPorts_tags_3, |
| 123 | sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3) |
| 124 | /sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3[0]) - 1, /* 1 */ |
| 125 | asn_DEF_numberOfCellSpecificAntennaPorts_tags_3, /* Same as above */ |
| 126 | sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3) |
| 127 | /sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3[0]), /* 2 */ |
| 128 | { 0, &asn_PER_type_numberOfCellSpecificAntennaPorts_constr_3, NativeEnumerated_constraint }, |
| 129 | 0, 0, /* Defined elsewhere */ |
| 130 | &asn_SPC_numberOfCellSpecificAntennaPorts_specs_3 /* Additional specs */ |
| 131 | }; |
| 132 | |
| 133 | asn_TYPE_member_t asn_MBR_ABSInformationFDD_1[] = { |
| 134 | { ATF_NOFLAGS, 0, offsetof(struct ABSInformationFDD, abs_pattern_info), |
| 135 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 136 | -1, /* IMPLICIT tag at current level */ |
| 137 | &asn_DEF_BIT_STRING, |
| 138 | 0, |
| 139 | { 0, &asn_PER_memb_abs_pattern_info_constr_2, memb_abs_pattern_info_constraint_1 }, |
| 140 | 0, 0, /* No default value */ |
| 141 | "abs-pattern-info" |
| 142 | }, |
| 143 | { ATF_NOFLAGS, 0, offsetof(struct ABSInformationFDD, numberOfCellSpecificAntennaPorts), |
| 144 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 145 | -1, /* IMPLICIT tag at current level */ |
| 146 | &asn_DEF_numberOfCellSpecificAntennaPorts_3, |
| 147 | 0, |
| 148 | { 0, 0, 0 }, |
| 149 | 0, 0, /* No default value */ |
| 150 | "numberOfCellSpecificAntennaPorts" |
| 151 | }, |
| 152 | { ATF_NOFLAGS, 0, offsetof(struct ABSInformationFDD, measurement_subset), |
| 153 | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 154 | -1, /* IMPLICIT tag at current level */ |
| 155 | &asn_DEF_BIT_STRING, |
| 156 | 0, |
| 157 | { 0, &asn_PER_memb_measurement_subset_constr_8, memb_measurement_subset_constraint_1 }, |
| 158 | 0, 0, /* No default value */ |
| 159 | "measurement-subset" |
| 160 | }, |
| 161 | { ATF_POINTER, 1, offsetof(struct ABSInformationFDD, iE_Extensions), |
| 162 | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 163 | -1, /* IMPLICIT tag at current level */ |
| 164 | &asn_DEF_ProtocolExtensionContainer_8858P20, |
| 165 | 0, |
| 166 | { 0, 0, 0 }, |
| 167 | 0, 0, /* No default value */ |
| 168 | "iE-Extensions" |
| 169 | }, |
| 170 | }; |
| 171 | static const int asn_MAP_ABSInformationFDD_oms_1[] = { 3 }; |
| 172 | static const ber_tlv_tag_t asn_DEF_ABSInformationFDD_tags_1[] = { |
| 173 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 174 | }; |
| 175 | static const asn_TYPE_tag2member_t asn_MAP_ABSInformationFDD_tag2el_1[] = { |
| 176 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* abs-pattern-info */ |
| 177 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* numberOfCellSpecificAntennaPorts */ |
| 178 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* measurement-subset */ |
| 179 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ |
| 180 | }; |
| 181 | asn_SEQUENCE_specifics_t asn_SPC_ABSInformationFDD_specs_1 = { |
| 182 | sizeof(struct ABSInformationFDD), |
| 183 | offsetof(struct ABSInformationFDD, _asn_ctx), |
| 184 | asn_MAP_ABSInformationFDD_tag2el_1, |
| 185 | 4, /* Count of tags in the map */ |
| 186 | asn_MAP_ABSInformationFDD_oms_1, /* Optional members */ |
| 187 | 1, 0, /* Root/Additions */ |
| 188 | 4, /* First extension addition */ |
| 189 | }; |
| 190 | asn_TYPE_descriptor_t asn_DEF_ABSInformationFDD = { |
| 191 | "ABSInformationFDD", |
| 192 | "ABSInformationFDD", |
| 193 | &asn_OP_SEQUENCE, |
| 194 | asn_DEF_ABSInformationFDD_tags_1, |
| 195 | sizeof(asn_DEF_ABSInformationFDD_tags_1) |
| 196 | /sizeof(asn_DEF_ABSInformationFDD_tags_1[0]), /* 1 */ |
| 197 | asn_DEF_ABSInformationFDD_tags_1, /* Same as above */ |
| 198 | sizeof(asn_DEF_ABSInformationFDD_tags_1) |
| 199 | /sizeof(asn_DEF_ABSInformationFDD_tags_1[0]), /* 1 */ |
| 200 | { 0, 0, SEQUENCE_constraint }, |
| 201 | asn_MBR_ABSInformationFDD_1, |
| 202 | 4, /* Elements count */ |
| 203 | &asn_SPC_ABSInformationFDD_specs_1 /* Additional specs */ |
| 204 | }; |
| 205 | |