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 "PRACH-Configuration.h" |
| 9 | |
| 10 | #include "ProtocolExtensionContainer.h" |
| 11 | static int |
| 12 | memb_rootSequenceIndex_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
| 13 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 14 | long value; |
| 15 | |
| 16 | if(!sptr) { |
| 17 | ASN__CTFAIL(app_key, td, sptr, |
| 18 | "%s: value not given (%s:%d)", |
| 19 | td->name, __FILE__, __LINE__); |
| 20 | return -1; |
| 21 | } |
| 22 | |
| 23 | value = *(const long *)sptr; |
| 24 | |
| 25 | if((value >= 0 && value <= 837)) { |
| 26 | /* Constraint check succeeded */ |
| 27 | return 0; |
| 28 | } else { |
| 29 | ASN__CTFAIL(app_key, td, sptr, |
| 30 | "%s: constraint failed (%s:%d)", |
| 31 | td->name, __FILE__, __LINE__); |
| 32 | return -1; |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | static int |
| 37 | memb_zeroCorrelationIndex_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
| 38 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 39 | long value; |
| 40 | |
| 41 | if(!sptr) { |
| 42 | ASN__CTFAIL(app_key, td, sptr, |
| 43 | "%s: value not given (%s:%d)", |
| 44 | td->name, __FILE__, __LINE__); |
| 45 | return -1; |
| 46 | } |
| 47 | |
| 48 | value = *(const long *)sptr; |
| 49 | |
| 50 | if((value >= 0 && value <= 15)) { |
| 51 | /* Constraint check succeeded */ |
| 52 | return 0; |
| 53 | } else { |
| 54 | ASN__CTFAIL(app_key, td, sptr, |
| 55 | "%s: constraint failed (%s:%d)", |
| 56 | td->name, __FILE__, __LINE__); |
| 57 | return -1; |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | static int |
| 62 | memb_prach_FreqOffset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
| 63 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 64 | long value; |
| 65 | |
| 66 | if(!sptr) { |
| 67 | ASN__CTFAIL(app_key, td, sptr, |
| 68 | "%s: value not given (%s:%d)", |
| 69 | td->name, __FILE__, __LINE__); |
| 70 | return -1; |
| 71 | } |
| 72 | |
| 73 | value = *(const long *)sptr; |
| 74 | |
| 75 | if((value >= 0 && value <= 94)) { |
| 76 | /* Constraint check succeeded */ |
| 77 | return 0; |
| 78 | } else { |
| 79 | ASN__CTFAIL(app_key, td, sptr, |
| 80 | "%s: constraint failed (%s:%d)", |
| 81 | td->name, __FILE__, __LINE__); |
| 82 | return -1; |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | static int |
| 87 | memb_prach_ConfigIndex_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
| 88 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 89 | long value; |
| 90 | |
| 91 | if(!sptr) { |
| 92 | ASN__CTFAIL(app_key, td, sptr, |
| 93 | "%s: value not given (%s:%d)", |
| 94 | td->name, __FILE__, __LINE__); |
| 95 | return -1; |
| 96 | } |
| 97 | |
| 98 | value = *(const long *)sptr; |
| 99 | |
| 100 | if((value >= 0 && value <= 63)) { |
| 101 | /* Constraint check succeeded */ |
| 102 | return 0; |
| 103 | } else { |
| 104 | ASN__CTFAIL(app_key, td, sptr, |
| 105 | "%s: constraint failed (%s:%d)", |
| 106 | td->name, __FILE__, __LINE__); |
| 107 | return -1; |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | static asn_per_constraints_t asn_PER_memb_rootSequenceIndex_constr_2 CC_NOTUSED = { |
| 112 | { APC_CONSTRAINED, 10, 10, 0, 837 } /* (0..837) */, |
| 113 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 114 | 0, 0 /* No PER value map */ |
| 115 | }; |
| 116 | static asn_per_constraints_t asn_PER_memb_zeroCorrelationIndex_constr_3 CC_NOTUSED = { |
| 117 | { APC_CONSTRAINED, 4, 4, 0, 15 } /* (0..15) */, |
| 118 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 119 | 0, 0 /* No PER value map */ |
| 120 | }; |
| 121 | static asn_per_constraints_t asn_PER_memb_prach_FreqOffset_constr_5 CC_NOTUSED = { |
| 122 | { APC_CONSTRAINED, 7, 7, 0, 94 } /* (0..94) */, |
| 123 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 124 | 0, 0 /* No PER value map */ |
| 125 | }; |
| 126 | static asn_per_constraints_t asn_PER_memb_prach_ConfigIndex_constr_6 CC_NOTUSED = { |
| 127 | { APC_CONSTRAINED, 6, 6, 0, 63 } /* (0..63) */, |
| 128 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 129 | 0, 0 /* No PER value map */ |
| 130 | }; |
| 131 | static asn_TYPE_member_t asn_MBR_PRACH_Configuration_1[] = { |
| 132 | { ATF_NOFLAGS, 0, offsetof(struct PRACH_Configuration, rootSequenceIndex), |
| 133 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 134 | -1, /* IMPLICIT tag at current level */ |
| 135 | &asn_DEF_NativeInteger, |
| 136 | 0, |
| 137 | { 0, &asn_PER_memb_rootSequenceIndex_constr_2, memb_rootSequenceIndex_constraint_1 }, |
| 138 | 0, 0, /* No default value */ |
| 139 | "rootSequenceIndex" |
| 140 | }, |
| 141 | { ATF_NOFLAGS, 0, offsetof(struct PRACH_Configuration, zeroCorrelationIndex), |
| 142 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 143 | -1, /* IMPLICIT tag at current level */ |
| 144 | &asn_DEF_NativeInteger, |
| 145 | 0, |
| 146 | { 0, &asn_PER_memb_zeroCorrelationIndex_constr_3, memb_zeroCorrelationIndex_constraint_1 }, |
| 147 | 0, 0, /* No default value */ |
| 148 | "zeroCorrelationIndex" |
| 149 | }, |
| 150 | { ATF_NOFLAGS, 0, offsetof(struct PRACH_Configuration, highSpeedFlag), |
| 151 | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 152 | -1, /* IMPLICIT tag at current level */ |
| 153 | &asn_DEF_BOOLEAN, |
| 154 | 0, |
| 155 | { 0, 0, 0 }, |
| 156 | 0, 0, /* No default value */ |
| 157 | "highSpeedFlag" |
| 158 | }, |
| 159 | { ATF_NOFLAGS, 0, offsetof(struct PRACH_Configuration, prach_FreqOffset), |
| 160 | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 161 | -1, /* IMPLICIT tag at current level */ |
| 162 | &asn_DEF_NativeInteger, |
| 163 | 0, |
| 164 | { 0, &asn_PER_memb_prach_FreqOffset_constr_5, memb_prach_FreqOffset_constraint_1 }, |
| 165 | 0, 0, /* No default value */ |
| 166 | "prach-FreqOffset" |
| 167 | }, |
| 168 | { ATF_POINTER, 2, offsetof(struct PRACH_Configuration, prach_ConfigIndex), |
| 169 | (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 170 | -1, /* IMPLICIT tag at current level */ |
| 171 | &asn_DEF_NativeInteger, |
| 172 | 0, |
| 173 | { 0, &asn_PER_memb_prach_ConfigIndex_constr_6, memb_prach_ConfigIndex_constraint_1 }, |
| 174 | 0, 0, /* No default value */ |
| 175 | "prach-ConfigIndex" |
| 176 | }, |
| 177 | { ATF_POINTER, 1, offsetof(struct PRACH_Configuration, iE_Extensions), |
| 178 | (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 179 | -1, /* IMPLICIT tag at current level */ |
| 180 | &asn_DEF_ProtocolExtensionContainer_8858P55, |
| 181 | 0, |
| 182 | { 0, 0, 0 }, |
| 183 | 0, 0, /* No default value */ |
| 184 | "iE-Extensions" |
| 185 | }, |
| 186 | }; |
| 187 | static const int asn_MAP_PRACH_Configuration_oms_1[] = { 4, 5 }; |
| 188 | static const ber_tlv_tag_t asn_DEF_PRACH_Configuration_tags_1[] = { |
| 189 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 190 | }; |
| 191 | static const asn_TYPE_tag2member_t asn_MAP_PRACH_Configuration_tag2el_1[] = { |
| 192 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rootSequenceIndex */ |
| 193 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* zeroCorrelationIndex */ |
| 194 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* highSpeedFlag */ |
| 195 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* prach-FreqOffset */ |
| 196 | { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* prach-ConfigIndex */ |
| 197 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* iE-Extensions */ |
| 198 | }; |
| 199 | static asn_SEQUENCE_specifics_t asn_SPC_PRACH_Configuration_specs_1 = { |
| 200 | sizeof(struct PRACH_Configuration), |
| 201 | offsetof(struct PRACH_Configuration, _asn_ctx), |
| 202 | asn_MAP_PRACH_Configuration_tag2el_1, |
| 203 | 6, /* Count of tags in the map */ |
| 204 | asn_MAP_PRACH_Configuration_oms_1, /* Optional members */ |
| 205 | 2, 0, /* Root/Additions */ |
| 206 | 6, /* First extension addition */ |
| 207 | }; |
| 208 | asn_TYPE_descriptor_t asn_DEF_PRACH_Configuration = { |
| 209 | "PRACH-Configuration", |
| 210 | "PRACH-Configuration", |
| 211 | &asn_OP_SEQUENCE, |
| 212 | asn_DEF_PRACH_Configuration_tags_1, |
| 213 | sizeof(asn_DEF_PRACH_Configuration_tags_1) |
| 214 | /sizeof(asn_DEF_PRACH_Configuration_tags_1[0]), /* 1 */ |
| 215 | asn_DEF_PRACH_Configuration_tags_1, /* Same as above */ |
| 216 | sizeof(asn_DEF_PRACH_Configuration_tags_1) |
| 217 | /sizeof(asn_DEF_PRACH_Configuration_tags_1[0]), /* 1 */ |
| 218 | { 0, 0, SEQUENCE_constraint }, |
| 219 | asn_MBR_PRACH_Configuration_1, |
| 220 | 6, /* Elements count */ |
| 221 | &asn_SPC_PRACH_Configuration_specs_1 /* Additional specs */ |
| 222 | }; |
| 223 | |