Harry Tran | 1f1098a | 2020-03-10 10:40:10 -0400 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | # * |
| 3 | # Copyright 2019 AT&T Intellectual Property * |
| 4 | # * |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); * |
| 6 | # you may not use this file except in compliance with the License. * |
| 7 | # You may obtain a copy of the License at * |
| 8 | # * |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 * |
| 10 | # * |
| 11 | # Unless required by applicable law or agreed to in writing, software * |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, * |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * |
| 14 | # See the License for the specific language governing permissions and * |
| 15 | # limitations under the License. * |
| 16 | # * |
| 17 | ******************************************************************************/ |
| 18 | |
| 19 | /* |
| 20 | * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) |
| 21 | * From ASN.1 module "X2AP-IEs" |
| 22 | * found in "../../asnFiles/X2AP-IEs.asn" |
| 23 | * `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.` |
| 24 | */ |
| 25 | |
| 26 | #include "Subscription-Based-UE-DifferentiationInfo.h" |
| 27 | |
| 28 | #include "ScheduledCommunicationTime.h" |
| 29 | #include "ProtocolExtensionContainer.h" |
| 30 | /* |
| 31 | * This type is implemented using NativeEnumerated, |
| 32 | * so here we adjust the DEF accordingly. |
| 33 | */ |
| 34 | /* |
| 35 | * This type is implemented using NativeEnumerated, |
| 36 | * so here we adjust the DEF accordingly. |
| 37 | */ |
| 38 | /* |
| 39 | * This type is implemented using NativeEnumerated, |
| 40 | * so here we adjust the DEF accordingly. |
| 41 | */ |
| 42 | /* |
| 43 | * This type is implemented using NativeEnumerated, |
| 44 | * so here we adjust the DEF accordingly. |
| 45 | */ |
| 46 | static int |
| 47 | memb_periodicTime_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
| 48 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 49 | long value; |
| 50 | |
| 51 | if(!sptr) { |
| 52 | ASN__CTFAIL(app_key, td, sptr, |
| 53 | "%s: value not given (%s:%d)", |
| 54 | td->name, __FILE__, __LINE__); |
| 55 | return -1; |
| 56 | } |
| 57 | |
| 58 | value = *(const long *)sptr; |
| 59 | |
| 60 | if((value >= 1 && value <= 3600)) { |
| 61 | /* Constraint check succeeded */ |
| 62 | return 0; |
| 63 | } else { |
| 64 | ASN__CTFAIL(app_key, td, sptr, |
| 65 | "%s: constraint failed (%s:%d)", |
| 66 | td->name, __FILE__, __LINE__); |
| 67 | return -1; |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | static asn_per_constraints_t asn_PER_type_periodicCommunicationIndicator_constr_2 CC_NOTUSED = { |
| 72 | { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, |
| 73 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 74 | 0, 0 /* No PER value map */ |
| 75 | }; |
| 76 | static asn_per_constraints_t asn_PER_type_stationaryIndication_constr_8 CC_NOTUSED = { |
| 77 | { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, |
| 78 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 79 | 0, 0 /* No PER value map */ |
| 80 | }; |
| 81 | static asn_per_constraints_t asn_PER_type_trafficProfile_constr_12 CC_NOTUSED = { |
| 82 | { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, |
| 83 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 84 | 0, 0 /* No PER value map */ |
| 85 | }; |
| 86 | static asn_per_constraints_t asn_PER_type_batteryIndication_constr_17 CC_NOTUSED = { |
| 87 | { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, |
| 88 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 89 | 0, 0 /* No PER value map */ |
| 90 | }; |
| 91 | static asn_per_constraints_t asn_PER_memb_periodicTime_constr_6 CC_NOTUSED = { |
| 92 | { APC_CONSTRAINED | APC_EXTENSIBLE, 12, 12, 1, 3600 } /* (1..3600,...) */, |
| 93 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 94 | 0, 0 /* No PER value map */ |
| 95 | }; |
| 96 | static const asn_INTEGER_enum_map_t asn_MAP_periodicCommunicationIndicator_value2enum_2[] = { |
| 97 | { 0, 12, "periodically" }, |
| 98 | { 1, 8, "ondemand" } |
| 99 | /* This list is extensible */ |
| 100 | }; |
| 101 | static const unsigned int asn_MAP_periodicCommunicationIndicator_enum2value_2[] = { |
| 102 | 1, /* ondemand(1) */ |
| 103 | 0 /* periodically(0) */ |
| 104 | /* This list is extensible */ |
| 105 | }; |
| 106 | static const asn_INTEGER_specifics_t asn_SPC_periodicCommunicationIndicator_specs_2 = { |
| 107 | asn_MAP_periodicCommunicationIndicator_value2enum_2, /* "tag" => N; sorted by tag */ |
| 108 | asn_MAP_periodicCommunicationIndicator_enum2value_2, /* N => "tag"; sorted by N */ |
| 109 | 2, /* Number of elements in the maps */ |
| 110 | 3, /* Extensions before this member */ |
| 111 | 1, /* Strict enumeration */ |
| 112 | 0, /* Native long size */ |
| 113 | 0 |
| 114 | }; |
| 115 | static const ber_tlv_tag_t asn_DEF_periodicCommunicationIndicator_tags_2[] = { |
| 116 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 117 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 118 | }; |
| 119 | static /* Use -fall-defs-global to expose */ |
| 120 | asn_TYPE_descriptor_t asn_DEF_periodicCommunicationIndicator_2 = { |
| 121 | "periodicCommunicationIndicator", |
| 122 | "periodicCommunicationIndicator", |
| 123 | &asn_OP_NativeEnumerated, |
| 124 | asn_DEF_periodicCommunicationIndicator_tags_2, |
| 125 | sizeof(asn_DEF_periodicCommunicationIndicator_tags_2) |
| 126 | /sizeof(asn_DEF_periodicCommunicationIndicator_tags_2[0]) - 1, /* 1 */ |
| 127 | asn_DEF_periodicCommunicationIndicator_tags_2, /* Same as above */ |
| 128 | sizeof(asn_DEF_periodicCommunicationIndicator_tags_2) |
| 129 | /sizeof(asn_DEF_periodicCommunicationIndicator_tags_2[0]), /* 2 */ |
| 130 | { 0, &asn_PER_type_periodicCommunicationIndicator_constr_2, NativeEnumerated_constraint }, |
| 131 | 0, 0, /* Defined elsewhere */ |
| 132 | &asn_SPC_periodicCommunicationIndicator_specs_2 /* Additional specs */ |
| 133 | }; |
| 134 | |
| 135 | static const asn_INTEGER_enum_map_t asn_MAP_stationaryIndication_value2enum_8[] = { |
| 136 | { 0, 10, "stationary" }, |
| 137 | { 1, 6, "mobile" } |
| 138 | /* This list is extensible */ |
| 139 | }; |
| 140 | static const unsigned int asn_MAP_stationaryIndication_enum2value_8[] = { |
| 141 | 1, /* mobile(1) */ |
| 142 | 0 /* stationary(0) */ |
| 143 | /* This list is extensible */ |
| 144 | }; |
| 145 | static const asn_INTEGER_specifics_t asn_SPC_stationaryIndication_specs_8 = { |
| 146 | asn_MAP_stationaryIndication_value2enum_8, /* "tag" => N; sorted by tag */ |
| 147 | asn_MAP_stationaryIndication_enum2value_8, /* N => "tag"; sorted by N */ |
| 148 | 2, /* Number of elements in the maps */ |
| 149 | 3, /* Extensions before this member */ |
| 150 | 1, /* Strict enumeration */ |
| 151 | 0, /* Native long size */ |
| 152 | 0 |
| 153 | }; |
| 154 | static const ber_tlv_tag_t asn_DEF_stationaryIndication_tags_8[] = { |
| 155 | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 156 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 157 | }; |
| 158 | static /* Use -fall-defs-global to expose */ |
| 159 | asn_TYPE_descriptor_t asn_DEF_stationaryIndication_8 = { |
| 160 | "stationaryIndication", |
| 161 | "stationaryIndication", |
| 162 | &asn_OP_NativeEnumerated, |
| 163 | asn_DEF_stationaryIndication_tags_8, |
| 164 | sizeof(asn_DEF_stationaryIndication_tags_8) |
| 165 | /sizeof(asn_DEF_stationaryIndication_tags_8[0]) - 1, /* 1 */ |
| 166 | asn_DEF_stationaryIndication_tags_8, /* Same as above */ |
| 167 | sizeof(asn_DEF_stationaryIndication_tags_8) |
| 168 | /sizeof(asn_DEF_stationaryIndication_tags_8[0]), /* 2 */ |
| 169 | { 0, &asn_PER_type_stationaryIndication_constr_8, NativeEnumerated_constraint }, |
| 170 | 0, 0, /* Defined elsewhere */ |
| 171 | &asn_SPC_stationaryIndication_specs_8 /* Additional specs */ |
| 172 | }; |
| 173 | |
| 174 | static const asn_INTEGER_enum_map_t asn_MAP_trafficProfile_value2enum_12[] = { |
| 175 | { 0, 13, "single-packet" }, |
| 176 | { 1, 12, "dual-packets" }, |
| 177 | { 2, 16, "multiple-packets" } |
| 178 | /* This list is extensible */ |
| 179 | }; |
| 180 | static const unsigned int asn_MAP_trafficProfile_enum2value_12[] = { |
| 181 | 1, /* dual-packets(1) */ |
| 182 | 2, /* multiple-packets(2) */ |
| 183 | 0 /* single-packet(0) */ |
| 184 | /* This list is extensible */ |
| 185 | }; |
| 186 | static const asn_INTEGER_specifics_t asn_SPC_trafficProfile_specs_12 = { |
| 187 | asn_MAP_trafficProfile_value2enum_12, /* "tag" => N; sorted by tag */ |
| 188 | asn_MAP_trafficProfile_enum2value_12, /* N => "tag"; sorted by N */ |
| 189 | 3, /* Number of elements in the maps */ |
| 190 | 4, /* Extensions before this member */ |
| 191 | 1, /* Strict enumeration */ |
| 192 | 0, /* Native long size */ |
| 193 | 0 |
| 194 | }; |
| 195 | static const ber_tlv_tag_t asn_DEF_trafficProfile_tags_12[] = { |
| 196 | (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 197 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 198 | }; |
| 199 | static /* Use -fall-defs-global to expose */ |
| 200 | asn_TYPE_descriptor_t asn_DEF_trafficProfile_12 = { |
| 201 | "trafficProfile", |
| 202 | "trafficProfile", |
| 203 | &asn_OP_NativeEnumerated, |
| 204 | asn_DEF_trafficProfile_tags_12, |
| 205 | sizeof(asn_DEF_trafficProfile_tags_12) |
| 206 | /sizeof(asn_DEF_trafficProfile_tags_12[0]) - 1, /* 1 */ |
| 207 | asn_DEF_trafficProfile_tags_12, /* Same as above */ |
| 208 | sizeof(asn_DEF_trafficProfile_tags_12) |
| 209 | /sizeof(asn_DEF_trafficProfile_tags_12[0]), /* 2 */ |
| 210 | { 0, &asn_PER_type_trafficProfile_constr_12, NativeEnumerated_constraint }, |
| 211 | 0, 0, /* Defined elsewhere */ |
| 212 | &asn_SPC_trafficProfile_specs_12 /* Additional specs */ |
| 213 | }; |
| 214 | |
| 215 | static const asn_INTEGER_enum_map_t asn_MAP_batteryIndication_value2enum_17[] = { |
| 216 | { 0, 15, "battery-powered" }, |
| 217 | { 1, 47, "battery-powered-not-rechargeable-or-replaceable" }, |
| 218 | { 2, 19, "not-battery-powered" } |
| 219 | /* This list is extensible */ |
| 220 | }; |
| 221 | static const unsigned int asn_MAP_batteryIndication_enum2value_17[] = { |
| 222 | 0, /* battery-powered(0) */ |
| 223 | 1, /* battery-powered-not-rechargeable-or-replaceable(1) */ |
| 224 | 2 /* not-battery-powered(2) */ |
| 225 | /* This list is extensible */ |
| 226 | }; |
| 227 | static const asn_INTEGER_specifics_t asn_SPC_batteryIndication_specs_17 = { |
| 228 | asn_MAP_batteryIndication_value2enum_17, /* "tag" => N; sorted by tag */ |
| 229 | asn_MAP_batteryIndication_enum2value_17, /* N => "tag"; sorted by N */ |
| 230 | 3, /* Number of elements in the maps */ |
| 231 | 4, /* Extensions before this member */ |
| 232 | 1, /* Strict enumeration */ |
| 233 | 0, /* Native long size */ |
| 234 | 0 |
| 235 | }; |
| 236 | static const ber_tlv_tag_t asn_DEF_batteryIndication_tags_17[] = { |
| 237 | (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 238 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 239 | }; |
| 240 | static /* Use -fall-defs-global to expose */ |
| 241 | asn_TYPE_descriptor_t asn_DEF_batteryIndication_17 = { |
| 242 | "batteryIndication", |
| 243 | "batteryIndication", |
| 244 | &asn_OP_NativeEnumerated, |
| 245 | asn_DEF_batteryIndication_tags_17, |
| 246 | sizeof(asn_DEF_batteryIndication_tags_17) |
| 247 | /sizeof(asn_DEF_batteryIndication_tags_17[0]) - 1, /* 1 */ |
| 248 | asn_DEF_batteryIndication_tags_17, /* Same as above */ |
| 249 | sizeof(asn_DEF_batteryIndication_tags_17) |
| 250 | /sizeof(asn_DEF_batteryIndication_tags_17[0]), /* 2 */ |
| 251 | { 0, &asn_PER_type_batteryIndication_constr_17, NativeEnumerated_constraint }, |
| 252 | 0, 0, /* Defined elsewhere */ |
| 253 | &asn_SPC_batteryIndication_specs_17 /* Additional specs */ |
| 254 | }; |
| 255 | |
| 256 | asn_TYPE_member_t asn_MBR_Subscription_Based_UE_DifferentiationInfo_1[] = { |
| 257 | { ATF_POINTER, 7, offsetof(struct Subscription_Based_UE_DifferentiationInfo, periodicCommunicationIndicator), |
| 258 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 259 | -1, /* IMPLICIT tag at current level */ |
| 260 | &asn_DEF_periodicCommunicationIndicator_2, |
| 261 | 0, |
| 262 | { 0, 0, 0 }, |
| 263 | 0, 0, /* No default value */ |
| 264 | "periodicCommunicationIndicator" |
| 265 | }, |
| 266 | { ATF_POINTER, 6, offsetof(struct Subscription_Based_UE_DifferentiationInfo, periodicTime), |
| 267 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 268 | -1, /* IMPLICIT tag at current level */ |
| 269 | &asn_DEF_NativeInteger, |
| 270 | 0, |
| 271 | { 0, &asn_PER_memb_periodicTime_constr_6, memb_periodicTime_constraint_1 }, |
| 272 | 0, 0, /* No default value */ |
| 273 | "periodicTime" |
| 274 | }, |
| 275 | { ATF_POINTER, 5, offsetof(struct Subscription_Based_UE_DifferentiationInfo, scheduledCommunicationTime), |
| 276 | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 277 | -1, /* IMPLICIT tag at current level */ |
| 278 | &asn_DEF_ScheduledCommunicationTime, |
| 279 | 0, |
| 280 | { 0, 0, 0 }, |
| 281 | 0, 0, /* No default value */ |
| 282 | "scheduledCommunicationTime" |
| 283 | }, |
| 284 | { ATF_POINTER, 4, offsetof(struct Subscription_Based_UE_DifferentiationInfo, stationaryIndication), |
| 285 | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 286 | -1, /* IMPLICIT tag at current level */ |
| 287 | &asn_DEF_stationaryIndication_8, |
| 288 | 0, |
| 289 | { 0, 0, 0 }, |
| 290 | 0, 0, /* No default value */ |
| 291 | "stationaryIndication" |
| 292 | }, |
| 293 | { ATF_POINTER, 3, offsetof(struct Subscription_Based_UE_DifferentiationInfo, trafficProfile), |
| 294 | (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 295 | -1, /* IMPLICIT tag at current level */ |
| 296 | &asn_DEF_trafficProfile_12, |
| 297 | 0, |
| 298 | { 0, 0, 0 }, |
| 299 | 0, 0, /* No default value */ |
| 300 | "trafficProfile" |
| 301 | }, |
| 302 | { ATF_POINTER, 2, offsetof(struct Subscription_Based_UE_DifferentiationInfo, batteryIndication), |
| 303 | (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 304 | -1, /* IMPLICIT tag at current level */ |
| 305 | &asn_DEF_batteryIndication_17, |
| 306 | 0, |
| 307 | { 0, 0, 0 }, |
| 308 | 0, 0, /* No default value */ |
| 309 | "batteryIndication" |
| 310 | }, |
| 311 | { ATF_POINTER, 1, offsetof(struct Subscription_Based_UE_DifferentiationInfo, iE_Extensions), |
| 312 | (ASN_TAG_CLASS_CONTEXT | (6 << 2)), |
| 313 | -1, /* IMPLICIT tag at current level */ |
| 314 | &asn_DEF_ProtocolExtensionContainer_170P196, |
| 315 | 0, |
| 316 | { 0, 0, 0 }, |
| 317 | 0, 0, /* No default value */ |
| 318 | "iE-Extensions" |
| 319 | }, |
| 320 | }; |
| 321 | static const int asn_MAP_Subscription_Based_UE_DifferentiationInfo_oms_1[] = { 0, 1, 2, 3, 4, 5, 6 }; |
| 322 | static const ber_tlv_tag_t asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1[] = { |
| 323 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 324 | }; |
| 325 | static const asn_TYPE_tag2member_t asn_MAP_Subscription_Based_UE_DifferentiationInfo_tag2el_1[] = { |
| 326 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* periodicCommunicationIndicator */ |
| 327 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* periodicTime */ |
| 328 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* scheduledCommunicationTime */ |
| 329 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* stationaryIndication */ |
| 330 | { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* trafficProfile */ |
| 331 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* batteryIndication */ |
| 332 | { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* iE-Extensions */ |
| 333 | }; |
| 334 | asn_SEQUENCE_specifics_t asn_SPC_Subscription_Based_UE_DifferentiationInfo_specs_1 = { |
| 335 | sizeof(struct Subscription_Based_UE_DifferentiationInfo), |
| 336 | offsetof(struct Subscription_Based_UE_DifferentiationInfo, _asn_ctx), |
| 337 | asn_MAP_Subscription_Based_UE_DifferentiationInfo_tag2el_1, |
| 338 | 7, /* Count of tags in the map */ |
| 339 | asn_MAP_Subscription_Based_UE_DifferentiationInfo_oms_1, /* Optional members */ |
| 340 | 7, 0, /* Root/Additions */ |
| 341 | 7, /* First extension addition */ |
| 342 | }; |
| 343 | asn_TYPE_descriptor_t asn_DEF_Subscription_Based_UE_DifferentiationInfo = { |
| 344 | "Subscription-Based-UE-DifferentiationInfo", |
| 345 | "Subscription-Based-UE-DifferentiationInfo", |
| 346 | &asn_OP_SEQUENCE, |
| 347 | asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1, |
| 348 | sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1) |
| 349 | /sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1[0]), /* 1 */ |
| 350 | asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1, /* Same as above */ |
| 351 | sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1) |
| 352 | /sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1[0]), /* 1 */ |
| 353 | { 0, 0, SEQUENCE_constraint }, |
| 354 | asn_MBR_Subscription_Based_UE_DifferentiationInfo_1, |
| 355 | 7, /* Elements count */ |
| 356 | &asn_SPC_Subscription_Based_UE_DifferentiationInfo_specs_1 /* Additional specs */ |
| 357 | }; |
| 358 | |