Harald Welte | ee09189 | 2015-09-10 10:22:03 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Generated by asn1c-0.9.28 (http://lionet.info/asn1c) |
| 3 | * From ASN.1 module "RANAP-IEs" |
| 4 | * found in "../../asn1/ranap/RANAP-IEs.asn" |
| 5 | */ |
| 6 | |
Neels Hofmeyr | f1f2d7c | 2016-01-05 12:00:06 +0100 | [diff] [blame] | 7 | #include <osmocom/ranap/RANAP_IRAT-Measurement-Configuration.h> |
Harald Welte | ee09189 | 2015-09-10 10:22:03 +0200 | [diff] [blame] | 8 | |
| 9 | static int |
| 10 | memb_rSRP_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 11 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 12 | long value; |
| 13 | |
| 14 | if(!sptr) { |
| 15 | _ASN_CTFAIL(app_key, td, sptr, |
| 16 | "%s: value not given (%s:%d)", |
| 17 | td->name, __FILE__, __LINE__); |
| 18 | return -1; |
| 19 | } |
| 20 | |
| 21 | value = *(const long *)sptr; |
| 22 | |
| 23 | if((value >= 0l && value <= 97l)) { |
| 24 | /* Constraint check succeeded */ |
| 25 | return 0; |
| 26 | } else { |
| 27 | _ASN_CTFAIL(app_key, td, sptr, |
| 28 | "%s: constraint failed (%s:%d)", |
| 29 | td->name, __FILE__, __LINE__); |
| 30 | return -1; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | static int |
| 35 | memb_rSRQ_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 36 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 37 | long value; |
| 38 | |
| 39 | if(!sptr) { |
| 40 | _ASN_CTFAIL(app_key, td, sptr, |
| 41 | "%s: value not given (%s:%d)", |
| 42 | td->name, __FILE__, __LINE__); |
| 43 | return -1; |
| 44 | } |
| 45 | |
| 46 | value = *(const long *)sptr; |
| 47 | |
| 48 | if((value >= 0l && value <= 34l)) { |
| 49 | /* Constraint check succeeded */ |
| 50 | return 0; |
| 51 | } else { |
| 52 | _ASN_CTFAIL(app_key, td, sptr, |
| 53 | "%s: constraint failed (%s:%d)", |
| 54 | td->name, __FILE__, __LINE__); |
| 55 | return -1; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | static asn_per_constraints_t asn_PER_memb_rSRP_constr_2 GCC_NOTUSED = { |
| 60 | { APC_CONSTRAINED, 7, 7, 0l, 97l } /* (0..97) */, |
| 61 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 62 | 0, 0 /* No PER value map */ |
| 63 | }; |
| 64 | static asn_per_constraints_t asn_PER_memb_rSRQ_constr_3 GCC_NOTUSED = { |
| 65 | { APC_CONSTRAINED, 6, 6, 0l, 34l } /* (0..34) */, |
| 66 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 67 | 0, 0 /* No PER value map */ |
| 68 | }; |
| 69 | static asn_TYPE_member_t asn_MBR_RANAP_IRAT_Measurement_Configuration_1[] = { |
| 70 | { ATF_POINTER, 2, offsetof(struct RANAP_IRAT_Measurement_Configuration, rSRP), |
| 71 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 72 | -1, /* IMPLICIT tag at current level */ |
| 73 | &asn_DEF_NativeInteger, |
| 74 | memb_rSRP_constraint_1, |
| 75 | &asn_PER_memb_rSRP_constr_2, |
| 76 | 0, |
| 77 | "rSRP" |
| 78 | }, |
| 79 | { ATF_POINTER, 1, offsetof(struct RANAP_IRAT_Measurement_Configuration, rSRQ), |
| 80 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 81 | -1, /* IMPLICIT tag at current level */ |
| 82 | &asn_DEF_NativeInteger, |
| 83 | memb_rSRQ_constraint_1, |
| 84 | &asn_PER_memb_rSRQ_constr_3, |
| 85 | 0, |
| 86 | "rSRQ" |
| 87 | }, |
| 88 | { ATF_NOFLAGS, 0, offsetof(struct RANAP_IRAT_Measurement_Configuration, iRATmeasurementParameters), |
| 89 | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 90 | -1, /* IMPLICIT tag at current level */ |
| 91 | &asn_DEF_RANAP_IRATmeasurementParameters, |
| 92 | 0, /* Defer constraints checking to the member type */ |
| 93 | 0, /* No PER visible constraints */ |
| 94 | 0, |
| 95 | "iRATmeasurementParameters" |
| 96 | }, |
| 97 | { ATF_POINTER, 1, offsetof(struct RANAP_IRAT_Measurement_Configuration, iE_Extensions), |
| 98 | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 99 | -1, /* IMPLICIT tag at current level */ |
| 100 | &asn_DEF_RANAP_IE_Extensions, |
| 101 | 0, /* Defer constraints checking to the member type */ |
| 102 | 0, /* No PER visible constraints */ |
| 103 | 0, |
| 104 | "iE-Extensions" |
| 105 | }, |
| 106 | }; |
| 107 | static const int asn_MAP_RANAP_IRAT_Measurement_Configuration_oms_1[] = { 0, 1, 3 }; |
| 108 | static const ber_tlv_tag_t asn_DEF_RANAP_IRAT_Measurement_Configuration_tags_1[] = { |
| 109 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 110 | }; |
| 111 | static const asn_TYPE_tag2member_t asn_MAP_RANAP_IRAT_Measurement_Configuration_tag2el_1[] = { |
| 112 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rSRP */ |
| 113 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rSRQ */ |
| 114 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* iRATmeasurementParameters */ |
| 115 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ |
| 116 | }; |
| 117 | static asn_SEQUENCE_specifics_t asn_SPC_RANAP_IRAT_Measurement_Configuration_specs_1 = { |
| 118 | sizeof(struct RANAP_IRAT_Measurement_Configuration), |
| 119 | offsetof(struct RANAP_IRAT_Measurement_Configuration, _asn_ctx), |
| 120 | asn_MAP_RANAP_IRAT_Measurement_Configuration_tag2el_1, |
| 121 | 4, /* Count of tags in the map */ |
| 122 | asn_MAP_RANAP_IRAT_Measurement_Configuration_oms_1, /* Optional members */ |
| 123 | 3, 0, /* Root/Additions */ |
| 124 | -1, /* Start extensions */ |
| 125 | -1 /* Stop extensions */ |
| 126 | }; |
| 127 | asn_TYPE_descriptor_t asn_DEF_RANAP_IRAT_Measurement_Configuration = { |
| 128 | "RANAP_IRAT-Measurement-Configuration", |
| 129 | "RANAP_IRAT-Measurement-Configuration", |
| 130 | SEQUENCE_free, |
| 131 | SEQUENCE_print, |
| 132 | SEQUENCE_constraint, |
| 133 | SEQUENCE_decode_ber, |
| 134 | SEQUENCE_encode_der, |
| 135 | SEQUENCE_decode_xer, |
| 136 | SEQUENCE_encode_xer, |
| 137 | SEQUENCE_decode_uper, |
| 138 | SEQUENCE_encode_uper, |
| 139 | SEQUENCE_decode_aper, |
| 140 | SEQUENCE_encode_aper, |
| 141 | 0, /* Use generic outmost tag fetcher */ |
| 142 | asn_DEF_RANAP_IRAT_Measurement_Configuration_tags_1, |
| 143 | sizeof(asn_DEF_RANAP_IRAT_Measurement_Configuration_tags_1) |
| 144 | /sizeof(asn_DEF_RANAP_IRAT_Measurement_Configuration_tags_1[0]), /* 1 */ |
| 145 | asn_DEF_RANAP_IRAT_Measurement_Configuration_tags_1, /* Same as above */ |
| 146 | sizeof(asn_DEF_RANAP_IRAT_Measurement_Configuration_tags_1) |
| 147 | /sizeof(asn_DEF_RANAP_IRAT_Measurement_Configuration_tags_1[0]), /* 1 */ |
| 148 | 0, /* No PER visible constraints */ |
| 149 | asn_MBR_RANAP_IRAT_Measurement_Configuration_1, |
| 150 | 4, /* Elements count */ |
| 151 | &asn_SPC_RANAP_IRAT_Measurement_Configuration_specs_1 /* Additional specs */ |
| 152 | }; |
| 153 | |