Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 1 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2 | /*** <<< INCLUDES [TestType] >>> ***/ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 3 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 4 | #include <NativeInteger.h> |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 5 | #include <constr_SEQUENCE.h> |
| 6 | #include <BOOLEAN.h> |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 7 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 8 | /*** <<< TYPE-DECLS [TestType] >>> ***/ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 9 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 10 | typedef struct TestType_16P0 { |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 11 | long common /* DEFAULT 0 */; |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 12 | |
| 13 | /* Context for parsing across buffer boundaries */ |
| 14 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 15 | } TestType_16P0_t; |
| 16 | typedef struct TestType_16P1 { |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 17 | BOOLEAN_t common /* DEFAULT 0 */; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 18 | |
| 19 | /* Context for parsing across buffer boundaries */ |
| 20 | asn_struct_ctx_t _asn_ctx; |
| 21 | } TestType_16P1_t; |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 22 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 23 | /*** <<< FUNC-DECLS [TestType] >>> ***/ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 24 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 25 | extern asn_TYPE_descriptor_t asn_DEF_TestType_16P0; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 26 | extern asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1; |
| 27 | extern asn_TYPE_member_t asn_MBR_TestType_16P0_1[1]; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 28 | extern asn_TYPE_descriptor_t asn_DEF_TestType_16P1; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 29 | extern asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3; |
| 30 | extern asn_TYPE_member_t asn_MBR_TestType_16P1_3[1]; |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 31 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 32 | /*** <<< CODE [TestType] >>> ***/ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 33 | |
| 34 | static int |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 35 | memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 36 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 37 | long value; |
| 38 | |
| 39 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 40 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 41 | "%s: value not given (%s:%d)", |
| 42 | td->name, __FILE__, __LINE__); |
| 43 | return -1; |
| 44 | } |
| 45 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 46 | value = *(const long *)sptr; |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 47 | |
| 48 | if((value >= 1 && value <= 10)) { |
| 49 | /* Constraint check succeeded */ |
| 50 | return 0; |
| 51 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 52 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 53 | "%s: constraint failed (%s:%d)", |
| 54 | td->name, __FILE__, __LINE__); |
| 55 | return -1; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 60 | /*** <<< STAT-DEFS [TestType] >>> ***/ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 61 | |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 62 | static int asn_DFL_2_set_0(int set_value, void **sptr) { |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 63 | long *st = *sptr; |
| 64 | |
| 65 | if(!st) { |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 66 | if(!set_value) return -1; /* Not a default value */ |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 67 | st = (*sptr = CALLOC(1, sizeof(*st))); |
| 68 | if(!st) return -1; |
| 69 | } |
| 70 | |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 71 | if(set_value) { |
| 72 | /* Install default value 0 */ |
| 73 | *st = 0; |
| 74 | return 0; |
| 75 | } else { |
| 76 | /* Test default value 0 */ |
| 77 | return (*st == 0); |
| 78 | } |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 79 | } |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 80 | asn_TYPE_member_t asn_MBR_TestType_16P0_1[] = { |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 81 | { ATF_NOFLAGS, 1, offsetof(struct TestType_16P0, common), |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 82 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 83 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 84 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 85 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 86 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_1 }, |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 87 | .default_value = asn_DFL_2_set_0, /* DEFAULT 0 */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 88 | .name = "common" |
| 89 | }, |
| 90 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 91 | static const ber_tlv_tag_t asn_DEF_TestType_16P0_tags_1[] = { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 92 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 93 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 94 | static const asn_TYPE_tag2member_t asn_MAP_TestType_16P0_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 95 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 96 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 97 | asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1 = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 98 | sizeof(struct TestType_16P0), |
| 99 | offsetof(struct TestType_16P0, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 100 | .tag2el = asn_MAP_TestType_16P0_tag2el_1, |
| 101 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 102 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 103 | -1, /* Start extensions */ |
| 104 | -1 /* Stop extensions */ |
| 105 | }; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 106 | asn_TYPE_descriptor_t asn_DEF_TestType_16P0 = { |
| 107 | "TestType", |
| 108 | "TestType", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 109 | &asn_OP_SEQUENCE, |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 110 | asn_DEF_TestType_16P0_tags_1, |
| 111 | sizeof(asn_DEF_TestType_16P0_tags_1) |
| 112 | /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */ |
| 113 | asn_DEF_TestType_16P0_tags_1, /* Same as above */ |
| 114 | sizeof(asn_DEF_TestType_16P0_tags_1) |
| 115 | /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 116 | { 0, 0, SEQUENCE_constraint }, |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 117 | asn_MBR_TestType_16P0_1, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 118 | 1, /* Elements count */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 119 | &asn_SPC_TestType_16P0_specs_1 /* Additional specs */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 120 | }; |
| 121 | |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 122 | static int asn_DFL_4_set_0(int set_value, void **sptr) { |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 123 | BOOLEAN_t *st = *sptr; |
| 124 | |
| 125 | if(!st) { |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 126 | if(!set_value) return -1; /* Not a default value */ |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 127 | st = (*sptr = CALLOC(1, sizeof(*st))); |
| 128 | if(!st) return -1; |
| 129 | } |
| 130 | |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 131 | if(set_value) { |
| 132 | /* Install default value 0 */ |
| 133 | *st = 0; |
| 134 | return 0; |
| 135 | } else { |
| 136 | /* Test default value 0 */ |
| 137 | return (*st == 0); |
| 138 | } |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 139 | } |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 140 | asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = { |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 141 | { ATF_NOFLAGS, 1, offsetof(struct TestType_16P1, common), |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 142 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), |
| 143 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 144 | .type = &asn_DEF_BOOLEAN, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 145 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 146 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 0c0bca6 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 147 | .default_value = asn_DFL_4_set_0, /* DEFAULT 0 */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 148 | .name = "common" |
| 149 | }, |
| 150 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 151 | static const ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 152 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 153 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 154 | static const asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 155 | { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 156 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 157 | asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3 = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 158 | sizeof(struct TestType_16P1), |
| 159 | offsetof(struct TestType_16P1, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 160 | .tag2el = asn_MAP_TestType_16P1_tag2el_3, |
| 161 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 162 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 163 | -1, /* Start extensions */ |
| 164 | -1 /* Stop extensions */ |
| 165 | }; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 166 | asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = { |
| 167 | "TestType", |
| 168 | "TestType", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 169 | &asn_OP_SEQUENCE, |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 170 | asn_DEF_TestType_16P1_tags_3, |
| 171 | sizeof(asn_DEF_TestType_16P1_tags_3) |
| 172 | /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */ |
| 173 | asn_DEF_TestType_16P1_tags_3, /* Same as above */ |
| 174 | sizeof(asn_DEF_TestType_16P1_tags_3) |
| 175 | /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 176 | { 0, 0, SEQUENCE_constraint }, |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 177 | asn_MBR_TestType_16P1_3, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 178 | 1, /* Elements count */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 179 | &asn_SPC_TestType_16P1_specs_3 /* Additional specs */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 180 | }; |
| 181 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 182 | |
| 183 | /*** <<< INCLUDES [TestChoice] >>> ***/ |
| 184 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 185 | #include "TestType.h" |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 186 | #include <constr_CHOICE.h> |
| 187 | |
| 188 | /*** <<< DEPS [TestChoice] >>> ***/ |
| 189 | |
| 190 | typedef enum TestChoice_PR { |
| 191 | TestChoice_PR_NOTHING, /* No components present */ |
| 192 | TestChoice_PR_type1, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 193 | TestChoice_PR_type2 |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 194 | } TestChoice_PR; |
| 195 | |
| 196 | /*** <<< TYPE-DECLS [TestChoice] >>> ***/ |
| 197 | |
| 198 | typedef struct TestChoice { |
| 199 | TestChoice_PR present; |
| 200 | union TestChoice_u { |
| 201 | TestType_16P0_t type1; |
| 202 | TestType_16P1_t type2; |
| 203 | } choice; |
| 204 | |
| 205 | /* Context for parsing across buffer boundaries */ |
| 206 | asn_struct_ctx_t _asn_ctx; |
| 207 | } TestChoice_t; |
| 208 | |
| 209 | /*** <<< FUNC-DECLS [TestChoice] >>> ***/ |
| 210 | |
| 211 | extern asn_TYPE_descriptor_t asn_DEF_TestChoice; |
| 212 | |
| 213 | /*** <<< STAT-DEFS [TestChoice] >>> ***/ |
| 214 | |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 215 | static asn_TYPE_member_t asn_MBR_TestChoice_1[] = { |
| 216 | { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type1), |
| 217 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 218 | .tag_mode = 0, |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 219 | .type = &asn_DEF_TestType_16P0, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 220 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 221 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 222 | .default_value = 0, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 223 | .name = "type1" |
| 224 | }, |
| 225 | { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2), |
| 226 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 227 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 228 | .type = &asn_DEF_TestType_16P1, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 229 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 230 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 231 | .default_value = 0, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 232 | .name = "type2" |
| 233 | }, |
| 234 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 235 | static const asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 236 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 */ |
| 237 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 238 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 239 | static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 240 | sizeof(struct TestChoice), |
| 241 | offsetof(struct TestChoice, _asn_ctx), |
| 242 | offsetof(struct TestChoice, present), |
| 243 | sizeof(((struct TestChoice *)0)->present), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 244 | .tag2el = asn_MAP_TestChoice_tag2el_1, |
| 245 | .tag2el_count = 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 246 | .canonical_order = 0, |
| 247 | .ext_start = -1 /* Extensions start */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 248 | }; |
| 249 | asn_TYPE_descriptor_t asn_DEF_TestChoice = { |
| 250 | "TestChoice", |
| 251 | "TestChoice", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 252 | &asn_OP_CHOICE, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 253 | 0, /* No effective tags (pointer) */ |
| 254 | 0, /* No effective tags (count) */ |
| 255 | 0, /* No tags (pointer) */ |
| 256 | 0, /* No tags (count) */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 257 | { 0, 0, CHOICE_constraint }, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 258 | asn_MBR_TestChoice_1, |
| 259 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 260 | &asn_SPC_TestChoice_specs_1 /* Additional specs */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 261 | }; |
| 262 | |
| 263 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 264 | /*** <<< INCLUDES [AutoType] >>> ***/ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 265 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 266 | #include <NativeInteger.h> |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 267 | #include <constr_SEQUENCE.h> |
| 268 | #include <BOOLEAN.h> |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 269 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 270 | /*** <<< TYPE-DECLS [AutoType] >>> ***/ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 271 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 272 | typedef struct AutoType_34P0 { |
| 273 | long common; |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 274 | |
| 275 | /* Context for parsing across buffer boundaries */ |
| 276 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 277 | } AutoType_34P0_t; |
| 278 | typedef struct AutoType_34P1 { |
| 279 | BOOLEAN_t common; |
| 280 | |
| 281 | /* Context for parsing across buffer boundaries */ |
| 282 | asn_struct_ctx_t _asn_ctx; |
| 283 | } AutoType_34P1_t; |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 284 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 285 | /*** <<< FUNC-DECLS [AutoType] >>> ***/ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 286 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 287 | extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P0; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 288 | extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1; |
| 289 | extern asn_TYPE_member_t asn_MBR_AutoType_34P0_1[1]; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 290 | extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 291 | extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3; |
| 292 | extern asn_TYPE_member_t asn_MBR_AutoType_34P1_3[1]; |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 293 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 294 | /*** <<< CODE [AutoType] >>> ***/ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 295 | |
| 296 | static int |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 297 | memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 298 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 299 | long value; |
| 300 | |
| 301 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 302 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 303 | "%s: value not given (%s:%d)", |
| 304 | td->name, __FILE__, __LINE__); |
| 305 | return -1; |
| 306 | } |
| 307 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 308 | value = *(const long *)sptr; |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 309 | |
| 310 | if((value == 0)) { |
| 311 | /* Constraint check succeeded */ |
| 312 | return 0; |
| 313 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 314 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 315 | "%s: constraint failed (%s:%d)", |
| 316 | td->name, __FILE__, __LINE__); |
| 317 | return -1; |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | static int |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 322 | memb_common_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 323 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 324 | BOOLEAN_t value; |
| 325 | |
| 326 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 327 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 328 | "%s: value not given (%s:%d)", |
| 329 | td->name, __FILE__, __LINE__); |
| 330 | return -1; |
| 331 | } |
| 332 | |
| 333 | value = (*(const long *)sptr) ? 1 : 0; |
| 334 | |
| 335 | if((value <= 0)) { |
| 336 | /* Constraint check succeeded */ |
| 337 | return 0; |
| 338 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 339 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 340 | "%s: constraint failed (%s:%d)", |
| 341 | td->name, __FILE__, __LINE__); |
| 342 | return -1; |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 347 | /*** <<< STAT-DEFS [AutoType] >>> ***/ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 348 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 349 | asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 350 | { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common), |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 351 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 352 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 353 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 354 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 355 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_1 }, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 356 | .default_value = 0, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 357 | .name = "common" |
| 358 | }, |
| 359 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 360 | static const ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 361 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 362 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 363 | static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 364 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 365 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 366 | asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1 = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 367 | sizeof(struct AutoType_34P0), |
| 368 | offsetof(struct AutoType_34P0, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 369 | .tag2el = asn_MAP_AutoType_34P0_tag2el_1, |
| 370 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 371 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 372 | -1, /* Start extensions */ |
| 373 | -1 /* Stop extensions */ |
| 374 | }; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 375 | asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = { |
| 376 | "AutoType", |
| 377 | "AutoType", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 378 | &asn_OP_SEQUENCE, |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 379 | asn_DEF_AutoType_34P0_tags_1, |
| 380 | sizeof(asn_DEF_AutoType_34P0_tags_1) |
| 381 | /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */ |
| 382 | asn_DEF_AutoType_34P0_tags_1, /* Same as above */ |
| 383 | sizeof(asn_DEF_AutoType_34P0_tags_1) |
| 384 | /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 385 | { 0, 0, SEQUENCE_constraint }, |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 386 | asn_MBR_AutoType_34P0_1, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 387 | 1, /* Elements count */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 388 | &asn_SPC_AutoType_34P0_specs_1 /* Additional specs */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 389 | }; |
| 390 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 391 | asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 392 | { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common), |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 393 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 394 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 395 | .type = &asn_DEF_BOOLEAN, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 396 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 397 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_3 }, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 398 | .default_value = 0, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 399 | .name = "common" |
| 400 | }, |
| 401 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 402 | static const ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 403 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 404 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 405 | static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 406 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 407 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 408 | asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3 = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 409 | sizeof(struct AutoType_34P1), |
| 410 | offsetof(struct AutoType_34P1, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 411 | .tag2el = asn_MAP_AutoType_34P1_tag2el_3, |
| 412 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 413 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 414 | -1, /* Start extensions */ |
| 415 | -1 /* Stop extensions */ |
| 416 | }; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 417 | asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = { |
| 418 | "AutoType", |
| 419 | "AutoType", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 420 | &asn_OP_SEQUENCE, |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 421 | asn_DEF_AutoType_34P1_tags_3, |
| 422 | sizeof(asn_DEF_AutoType_34P1_tags_3) |
| 423 | /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */ |
| 424 | asn_DEF_AutoType_34P1_tags_3, /* Same as above */ |
| 425 | sizeof(asn_DEF_AutoType_34P1_tags_3) |
| 426 | /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 427 | { 0, 0, SEQUENCE_constraint }, |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 428 | asn_MBR_AutoType_34P1_3, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 429 | 1, /* Elements count */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 430 | &asn_SPC_AutoType_34P1_specs_3 /* Additional specs */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 431 | }; |
| 432 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 433 | |
| 434 | /*** <<< INCLUDES [AutoChoice] >>> ***/ |
| 435 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 436 | #include "AutoType.h" |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 437 | #include <constr_CHOICE.h> |
| 438 | |
| 439 | /*** <<< DEPS [AutoChoice] >>> ***/ |
| 440 | |
| 441 | typedef enum AutoChoice_PR { |
| 442 | AutoChoice_PR_NOTHING, /* No components present */ |
| 443 | AutoChoice_PR_type1, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 444 | AutoChoice_PR_type2 |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 445 | } AutoChoice_PR; |
| 446 | |
| 447 | /*** <<< TYPE-DECLS [AutoChoice] >>> ***/ |
| 448 | |
| 449 | typedef struct AutoChoice { |
| 450 | AutoChoice_PR present; |
| 451 | union AutoChoice_u { |
| 452 | AutoType_34P0_t type1; |
| 453 | AutoType_34P1_t type2; |
| 454 | } choice; |
| 455 | |
| 456 | /* Context for parsing across buffer boundaries */ |
| 457 | asn_struct_ctx_t _asn_ctx; |
| 458 | } AutoChoice_t; |
| 459 | |
| 460 | /*** <<< FUNC-DECLS [AutoChoice] >>> ***/ |
| 461 | |
| 462 | extern asn_TYPE_descriptor_t asn_DEF_AutoChoice; |
| 463 | |
| 464 | /*** <<< STAT-DEFS [AutoChoice] >>> ***/ |
| 465 | |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 466 | static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = { |
| 467 | { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type1), |
| 468 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 469 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 470 | .type = &asn_DEF_AutoType_34P0, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 471 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 472 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 473 | .default_value = 0, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 474 | .name = "type1" |
| 475 | }, |
| 476 | { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2), |
| 477 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 478 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 479 | .type = &asn_DEF_AutoType_34P1, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 480 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 481 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 482 | .default_value = 0, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 483 | .name = "type2" |
| 484 | }, |
| 485 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 486 | static const asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 487 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 */ |
| 488 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 489 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 490 | static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 491 | sizeof(struct AutoChoice), |
| 492 | offsetof(struct AutoChoice, _asn_ctx), |
| 493 | offsetof(struct AutoChoice, present), |
| 494 | sizeof(((struct AutoChoice *)0)->present), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 495 | .tag2el = asn_MAP_AutoChoice_tag2el_1, |
| 496 | .tag2el_count = 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 497 | .canonical_order = 0, |
| 498 | .ext_start = -1 /* Extensions start */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 499 | }; |
| 500 | asn_TYPE_descriptor_t asn_DEF_AutoChoice = { |
| 501 | "AutoChoice", |
| 502 | "AutoChoice", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 503 | &asn_OP_CHOICE, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 504 | 0, /* No effective tags (pointer) */ |
| 505 | 0, /* No effective tags (count) */ |
| 506 | 0, /* No tags (pointer) */ |
| 507 | 0, /* No tags (count) */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 508 | { 0, 0, CHOICE_constraint }, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 509 | asn_MBR_AutoChoice_1, |
| 510 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 511 | &asn_SPC_AutoChoice_specs_1 /* Additional specs */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 512 | }; |
| 513 | |