Peter Szilagyi | fbc56f9 | 2019-07-23 19:29:46 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) |
| 3 | * From ASN.1 module "X2AP-IEs" |
kalnagy | 1455c85 | 2019-10-21 13:06:23 +0200 | [diff] [blame] | 4 | * found in "X2AP-15-4-0.asn1" |
| 5 | * `asn1c -D ./asn1_n1 -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` |
Peter Szilagyi | fbc56f9 | 2019-07-23 19:29:46 +0000 | [diff] [blame] | 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_oer_constraints_t asn_OER_memb_rootSequenceIndex_constr_2 CC_NOTUSED = { |
| 112 | { 2, 1 } /* (0..837) */, |
| 113 | -1}; |
| 114 | static asn_per_constraints_t asn_PER_memb_rootSequenceIndex_constr_2 CC_NOTUSED = { |
| 115 | { APC_CONSTRAINED, 10, 10, 0, 837 } /* (0..837) */, |
| 116 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 117 | 0, 0 /* No PER value map */ |
| 118 | }; |
| 119 | static asn_oer_constraints_t asn_OER_memb_zeroCorrelationIndex_constr_3 CC_NOTUSED = { |
| 120 | { 1, 1 } /* (0..15) */, |
| 121 | -1}; |
| 122 | static asn_per_constraints_t asn_PER_memb_zeroCorrelationIndex_constr_3 CC_NOTUSED = { |
| 123 | { APC_CONSTRAINED, 4, 4, 0, 15 } /* (0..15) */, |
| 124 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 125 | 0, 0 /* No PER value map */ |
| 126 | }; |
| 127 | static asn_oer_constraints_t asn_OER_memb_prach_FreqOffset_constr_5 CC_NOTUSED = { |
| 128 | { 1, 1 } /* (0..94) */, |
| 129 | -1}; |
| 130 | static asn_per_constraints_t asn_PER_memb_prach_FreqOffset_constr_5 CC_NOTUSED = { |
| 131 | { APC_CONSTRAINED, 7, 7, 0, 94 } /* (0..94) */, |
| 132 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 133 | 0, 0 /* No PER value map */ |
| 134 | }; |
| 135 | static asn_oer_constraints_t asn_OER_memb_prach_ConfigIndex_constr_6 CC_NOTUSED = { |
| 136 | { 1, 1 } /* (0..63) */, |
| 137 | -1}; |
| 138 | static asn_per_constraints_t asn_PER_memb_prach_ConfigIndex_constr_6 CC_NOTUSED = { |
| 139 | { APC_CONSTRAINED, 6, 6, 0, 63 } /* (0..63) */, |
| 140 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 141 | 0, 0 /* No PER value map */ |
| 142 | }; |
| 143 | static asn_TYPE_member_t asn_MBR_PRACH_Configuration_1[] = { |
| 144 | { ATF_NOFLAGS, 0, offsetof(struct PRACH_Configuration, rootSequenceIndex), |
| 145 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 146 | -1, /* IMPLICIT tag at current level */ |
| 147 | &asn_DEF_NativeInteger, |
| 148 | 0, |
| 149 | { &asn_OER_memb_rootSequenceIndex_constr_2, &asn_PER_memb_rootSequenceIndex_constr_2, memb_rootSequenceIndex_constraint_1 }, |
| 150 | 0, 0, /* No default value */ |
| 151 | "rootSequenceIndex" |
| 152 | }, |
| 153 | { ATF_NOFLAGS, 0, offsetof(struct PRACH_Configuration, zeroCorrelationIndex), |
| 154 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 155 | -1, /* IMPLICIT tag at current level */ |
| 156 | &asn_DEF_NativeInteger, |
| 157 | 0, |
| 158 | { &asn_OER_memb_zeroCorrelationIndex_constr_3, &asn_PER_memb_zeroCorrelationIndex_constr_3, memb_zeroCorrelationIndex_constraint_1 }, |
| 159 | 0, 0, /* No default value */ |
| 160 | "zeroCorrelationIndex" |
| 161 | }, |
| 162 | { ATF_NOFLAGS, 0, offsetof(struct PRACH_Configuration, highSpeedFlag), |
| 163 | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 164 | -1, /* IMPLICIT tag at current level */ |
| 165 | &asn_DEF_BOOLEAN, |
| 166 | 0, |
| 167 | { 0, 0, 0 }, |
| 168 | 0, 0, /* No default value */ |
| 169 | "highSpeedFlag" |
| 170 | }, |
| 171 | { ATF_NOFLAGS, 0, offsetof(struct PRACH_Configuration, prach_FreqOffset), |
| 172 | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 173 | -1, /* IMPLICIT tag at current level */ |
| 174 | &asn_DEF_NativeInteger, |
| 175 | 0, |
| 176 | { &asn_OER_memb_prach_FreqOffset_constr_5, &asn_PER_memb_prach_FreqOffset_constr_5, memb_prach_FreqOffset_constraint_1 }, |
| 177 | 0, 0, /* No default value */ |
| 178 | "prach-FreqOffset" |
| 179 | }, |
| 180 | { ATF_POINTER, 2, offsetof(struct PRACH_Configuration, prach_ConfigIndex), |
| 181 | (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 182 | -1, /* IMPLICIT tag at current level */ |
| 183 | &asn_DEF_NativeInteger, |
| 184 | 0, |
| 185 | { &asn_OER_memb_prach_ConfigIndex_constr_6, &asn_PER_memb_prach_ConfigIndex_constr_6, memb_prach_ConfigIndex_constraint_1 }, |
| 186 | 0, 0, /* No default value */ |
| 187 | "prach-ConfigIndex" |
| 188 | }, |
| 189 | { ATF_POINTER, 1, offsetof(struct PRACH_Configuration, iE_Extensions), |
| 190 | (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 191 | -1, /* IMPLICIT tag at current level */ |
kalnagy | 1455c85 | 2019-10-21 13:06:23 +0200 | [diff] [blame] | 192 | &asn_DEF_ProtocolExtensionContainer_7683P177, |
Peter Szilagyi | fbc56f9 | 2019-07-23 19:29:46 +0000 | [diff] [blame] | 193 | 0, |
| 194 | { 0, 0, 0 }, |
| 195 | 0, 0, /* No default value */ |
| 196 | "iE-Extensions" |
| 197 | }, |
| 198 | }; |
| 199 | static const int asn_MAP_PRACH_Configuration_oms_1[] = { 4, 5 }; |
| 200 | static const ber_tlv_tag_t asn_DEF_PRACH_Configuration_tags_1[] = { |
| 201 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 202 | }; |
| 203 | static const asn_TYPE_tag2member_t asn_MAP_PRACH_Configuration_tag2el_1[] = { |
| 204 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rootSequenceIndex */ |
| 205 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* zeroCorrelationIndex */ |
| 206 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* highSpeedFlag */ |
| 207 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* prach-FreqOffset */ |
| 208 | { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* prach-ConfigIndex */ |
| 209 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* iE-Extensions */ |
| 210 | }; |
| 211 | static asn_SEQUENCE_specifics_t asn_SPC_PRACH_Configuration_specs_1 = { |
| 212 | sizeof(struct PRACH_Configuration), |
| 213 | offsetof(struct PRACH_Configuration, _asn_ctx), |
| 214 | asn_MAP_PRACH_Configuration_tag2el_1, |
| 215 | 6, /* Count of tags in the map */ |
| 216 | asn_MAP_PRACH_Configuration_oms_1, /* Optional members */ |
| 217 | 2, 0, /* Root/Additions */ |
| 218 | 6, /* First extension addition */ |
| 219 | }; |
| 220 | asn_TYPE_descriptor_t asn_DEF_PRACH_Configuration = { |
| 221 | "PRACH-Configuration", |
| 222 | "PRACH-Configuration", |
| 223 | &asn_OP_SEQUENCE, |
| 224 | asn_DEF_PRACH_Configuration_tags_1, |
| 225 | sizeof(asn_DEF_PRACH_Configuration_tags_1) |
| 226 | /sizeof(asn_DEF_PRACH_Configuration_tags_1[0]), /* 1 */ |
| 227 | asn_DEF_PRACH_Configuration_tags_1, /* Same as above */ |
| 228 | sizeof(asn_DEF_PRACH_Configuration_tags_1) |
| 229 | /sizeof(asn_DEF_PRACH_Configuration_tags_1[0]), /* 1 */ |
| 230 | { 0, 0, SEQUENCE_constraint }, |
| 231 | asn_MBR_PRACH_Configuration_1, |
| 232 | 6, /* Elements count */ |
| 233 | &asn_SPC_PRACH_Configuration_specs_1 /* Additional specs */ |
| 234 | }; |
| 235 | |