blob: 03b85225e89c9a725eccc0e0f8d84c72da366d73 [file] [log] [blame]
Lev Walkin67ec2092004-09-08 00:26:56 +00001
2/*** <<< INCLUDES [Test-structure-1] >>> ***/
3
Lev Walkin67ec2092004-09-08 00:26:56 +00004#include <INTEGER.h>
5#include <asn_SET_OF.h>
6#include <constr_SET_OF.h>
7#include <asn_SEQUENCE_OF.h>
8#include <constr_SEQUENCE_OF.h>
9#include <constr_SEQUENCE.h>
10
Lev Walkinc8285712005-03-04 22:18:20 +000011/*** <<< FWD-DECLS [Test-structure-1] >>> ***/
Lev Walkin1ca69672004-09-29 13:19:12 +000012
Lev Walkinbf56d542005-03-04 23:50:56 +000013struct Test_structure_1;
Lev Walkin67ec2092004-09-08 00:26:56 +000014
15/*** <<< TYPE-DECLS [Test-structure-1] >>> ***/
16
Lev Walkin67ec2092004-09-08 00:26:56 +000017typedef struct Test_structure_1 {
18 struct t_member1 {
19 A_SET_OF(struct Test_structure_1) list;
20
21 /* Context for parsing across buffer boundaries */
Lev Walkin1ca69672004-09-29 13:19:12 +000022 asn_struct_ctx_t _asn_ctx;
Lev Walkin67ec2092004-09-08 00:26:56 +000023 } t_member1;
24 struct t_member2 {
25 A_SEQUENCE_OF(struct Test_structure_1) list;
26
27 /* Context for parsing across buffer boundaries */
Lev Walkin1ca69672004-09-29 13:19:12 +000028 asn_struct_ctx_t _asn_ctx;
Lev Walkin67ec2092004-09-08 00:26:56 +000029 } t_member2;
30 struct Test_structure_1 *t_member3 /* OPTIONAL */;
31 INTEGER_t t_member4;
32
33 /* Context for parsing across buffer boundaries */
Lev Walkin1ca69672004-09-29 13:19:12 +000034 asn_struct_ctx_t _asn_ctx;
Lev Walkin67ec2092004-09-08 00:26:56 +000035} Test_structure_1_t;
36
Lev Walkinc8285712005-03-04 22:18:20 +000037/*** <<< FUNC-DECLS [Test-structure-1] >>> ***/
38
39extern asn_TYPE_descriptor_t asn_DEF_Test_structure_1;
40
41/*** <<< POST-INCLUDE [Test-structure-1] >>> ***/
42
43#include <Test-structure-1.h>
44
Lev Walkin67ec2092004-09-08 00:26:56 +000045/*** <<< STAT-DEFS [Test-structure-1] >>> ***/
46
Lev Walkine0272aa2005-03-04 11:26:08 +000047static asn_TYPE_member_t asn_MBR_t_member1_2[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +000048 { ATF_POINTER, 0, 0,
Lev Walkin67ec2092004-09-08 00:26:56 +000049 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
50 .tag_mode = 0,
Lev Walkin1ca69672004-09-29 13:19:12 +000051 .type = (void *)&asn_DEF_Test_structure_1,
Lev Walkinba58e1b2005-01-17 12:20:19 +000052 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +000053 .name = ""
54 },
55};
Lev Walkine0272aa2005-03-04 11:26:08 +000056static ber_tlv_tag_t asn_DEF_t_member1_2_tags[] = {
Lev Walkin67ec2092004-09-08 00:26:56 +000057 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
58};
Lev Walkine0272aa2005-03-04 11:26:08 +000059static asn_SET_OF_specifics_t asn_SPC_t_member1_2_specs = {
Lev Walkin67ec2092004-09-08 00:26:56 +000060 sizeof(struct t_member1),
Lev Walkin1ca69672004-09-29 13:19:12 +000061 offsetof(struct t_member1, _asn_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +000062 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin67ec2092004-09-08 00:26:56 +000063};
64static /* Use -fall-defs-global to expose */
Lev Walkine0272aa2005-03-04 11:26:08 +000065asn_TYPE_descriptor_t asn_DEF_t_member1_2 = {
Lev Walkin67ec2092004-09-08 00:26:56 +000066 "t-member1",
Lev Walkindc06f6b2004-10-20 15:50:55 +000067 "t-member1",
Lev Walkina9cc46e2004-09-22 16:06:28 +000068 SET_OF_free,
69 SET_OF_print,
Lev Walkin67ec2092004-09-08 00:26:56 +000070 SET_OF_constraint,
71 SET_OF_decode_ber,
72 SET_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +000073 SET_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +000074 SET_OF_encode_xer,
Lev Walkin67ec2092004-09-08 00:26:56 +000075 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +000076 asn_DEF_t_member1_2_tags,
77 sizeof(asn_DEF_t_member1_2_tags)
78 /sizeof(asn_DEF_t_member1_2_tags[0]), /* 1 */
79 asn_DEF_t_member1_2_tags, /* Same as above */
80 sizeof(asn_DEF_t_member1_2_tags)
81 /sizeof(asn_DEF_t_member1_2_tags[0]), /* 1 */
82 asn_MBR_t_member1_2,
Lev Walkin67ec2092004-09-08 00:26:56 +000083 1, /* Single element */
Lev Walkine0272aa2005-03-04 11:26:08 +000084 &asn_SPC_t_member1_2_specs /* Additional specs */
Lev Walkin67ec2092004-09-08 00:26:56 +000085};
86
Lev Walkine8318b82005-03-06 09:29:03 +000087static asn_TYPE_member_t asn_MBR_t_member2_4[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +000088 { ATF_POINTER, 0, 0,
Lev Walkin67ec2092004-09-08 00:26:56 +000089 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
90 .tag_mode = 0,
Lev Walkin1ca69672004-09-29 13:19:12 +000091 .type = (void *)&asn_DEF_Test_structure_1,
Lev Walkinba58e1b2005-01-17 12:20:19 +000092 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +000093 .name = ""
94 },
95};
Lev Walkine8318b82005-03-06 09:29:03 +000096static ber_tlv_tag_t asn_DEF_t_member2_4_tags[] = {
Lev Walkin67ec2092004-09-08 00:26:56 +000097 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
98};
Lev Walkine8318b82005-03-06 09:29:03 +000099static asn_SET_OF_specifics_t asn_SPC_t_member2_4_specs = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000100 sizeof(struct t_member2),
Lev Walkin1ca69672004-09-29 13:19:12 +0000101 offsetof(struct t_member2, _asn_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +0000102 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin67ec2092004-09-08 00:26:56 +0000103};
104static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000105asn_TYPE_descriptor_t asn_DEF_t_member2_4 = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000106 "t-member2",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000107 "t-member2",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000108 SEQUENCE_OF_free,
109 SEQUENCE_OF_print,
Lev Walkin67ec2092004-09-08 00:26:56 +0000110 SEQUENCE_OF_constraint,
111 SEQUENCE_OF_decode_ber,
112 SEQUENCE_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000113 SEQUENCE_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000114 SEQUENCE_OF_encode_xer,
Lev Walkin67ec2092004-09-08 00:26:56 +0000115 0, /* Use generic outmost tag fetcher */
Lev Walkine8318b82005-03-06 09:29:03 +0000116 asn_DEF_t_member2_4_tags,
117 sizeof(asn_DEF_t_member2_4_tags)
118 /sizeof(asn_DEF_t_member2_4_tags[0]), /* 1 */
119 asn_DEF_t_member2_4_tags, /* Same as above */
120 sizeof(asn_DEF_t_member2_4_tags)
121 /sizeof(asn_DEF_t_member2_4_tags[0]), /* 1 */
122 asn_MBR_t_member2_4,
Lev Walkin67ec2092004-09-08 00:26:56 +0000123 1, /* Single element */
Lev Walkine8318b82005-03-06 09:29:03 +0000124 &asn_SPC_t_member2_4_specs /* Additional specs */
Lev Walkin67ec2092004-09-08 00:26:56 +0000125};
126
Lev Walkine0272aa2005-03-04 11:26:08 +0000127static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000128 { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member1),
Lev Walkin67ec2092004-09-08 00:26:56 +0000129 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
130 .tag_mode = 0,
Lev Walkine0272aa2005-03-04 11:26:08 +0000131 .type = (void *)&asn_DEF_t_member1_2,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000132 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000133 .name = "t-member1"
134 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000135 { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member2),
Lev Walkin67ec2092004-09-08 00:26:56 +0000136 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
137 .tag_mode = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000138 .type = (void *)&asn_DEF_t_member2_4,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000139 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000140 .name = "t-member2"
141 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000142 { ATF_POINTER, 1, offsetof(struct Test_structure_1, t_member3),
Lev Walkin67ec2092004-09-08 00:26:56 +0000143 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
144 .tag_mode = 0,
Lev Walkin1ca69672004-09-29 13:19:12 +0000145 .type = (void *)&asn_DEF_Test_structure_1,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000146 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000147 .name = "t-member3"
148 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000149 { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member4),
Lev Walkin67ec2092004-09-08 00:26:56 +0000150 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
151 .tag_mode = 0,
Lev Walkin1ca69672004-09-29 13:19:12 +0000152 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000153 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000154 .name = "t-member4"
155 },
156};
Lev Walkine0272aa2005-03-04 11:26:08 +0000157static ber_tlv_tag_t asn_DEF_Test_structure_1_1_tags[] = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000158 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
159};
Lev Walkine0272aa2005-03-04 11:26:08 +0000160static asn_TYPE_tag2member_t asn_MAP_Test_structure_1_1_tag2el[] = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000161 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* t-member4 at 19 */
162 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* t-member2 at 16 */
163 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 }, /* t-member3 at 17 */
Lev Walkinf82138b2005-02-25 08:20:32 +0000164 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* t-member1 at 15 */
Lev Walkin67ec2092004-09-08 00:26:56 +0000165};
Lev Walkine0272aa2005-03-04 11:26:08 +0000166static asn_SEQUENCE_specifics_t asn_SPC_Test_structure_1_1_specs = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000167 sizeof(struct Test_structure_1),
Lev Walkin1ca69672004-09-29 13:19:12 +0000168 offsetof(struct Test_structure_1, _asn_ctx),
Lev Walkine0272aa2005-03-04 11:26:08 +0000169 asn_MAP_Test_structure_1_1_tag2el,
Lev Walkin67ec2092004-09-08 00:26:56 +0000170 4, /* Count of tags in the map */
171 -1, /* Start extensions */
172 -1 /* Stop extensions */
173};
Lev Walkin1ca69672004-09-29 13:19:12 +0000174asn_TYPE_descriptor_t asn_DEF_Test_structure_1 = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000175 "Test-structure-1",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000176 "Test-structure-1",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000177 SEQUENCE_free,
178 SEQUENCE_print,
Lev Walkin67ec2092004-09-08 00:26:56 +0000179 SEQUENCE_constraint,
180 SEQUENCE_decode_ber,
181 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000182 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000183 SEQUENCE_encode_xer,
Lev Walkin67ec2092004-09-08 00:26:56 +0000184 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000185 asn_DEF_Test_structure_1_1_tags,
186 sizeof(asn_DEF_Test_structure_1_1_tags)
187 /sizeof(asn_DEF_Test_structure_1_1_tags[0]), /* 1 */
188 asn_DEF_Test_structure_1_1_tags, /* Same as above */
189 sizeof(asn_DEF_Test_structure_1_1_tags)
190 /sizeof(asn_DEF_Test_structure_1_1_tags[0]), /* 1 */
191 asn_MBR_Test_structure_1_1,
Lev Walkin67ec2092004-09-08 00:26:56 +0000192 4, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000193 &asn_SPC_Test_structure_1_1_specs /* Additional specs */
Lev Walkin67ec2092004-09-08 00:26:56 +0000194};
195
196
197/*** <<< INCLUDES [Choice-1] >>> ***/
198
Lev Walkin67ec2092004-09-08 00:26:56 +0000199#include <INTEGER.h>
200#include <asn_SET_OF.h>
201#include <constr_SET_OF.h>
202#include <constr_CHOICE.h>
203
204/*** <<< DEPS [Choice-1] >>> ***/
205
206typedef enum Choice_1_PR {
207 Choice_1_PR_NOTHING, /* No components present */
208 Choice_1_PR_and,
209 Choice_1_PR_or,
210 Choice_1_PR_not,
211 Choice_1_PR_other,
212} Choice_1_PR;
Lev Walkin1ca69672004-09-29 13:19:12 +0000213
Lev Walkinc8285712005-03-04 22:18:20 +0000214/*** <<< FWD-DECLS [Choice-1] >>> ***/
Lev Walkin1ca69672004-09-29 13:19:12 +0000215
Lev Walkinbf56d542005-03-04 23:50:56 +0000216struct Choice_1;
Lev Walkin67ec2092004-09-08 00:26:56 +0000217
218/*** <<< TYPE-DECLS [Choice-1] >>> ***/
219
Lev Walkin67ec2092004-09-08 00:26:56 +0000220typedef struct Choice_1 {
221 Choice_1_PR present;
Lev Walkin0f5d74c2005-08-14 15:03:31 +0000222 union Choice_1_u {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000223 struct Choice_1 *and;
Lev Walkin67ec2092004-09-08 00:26:56 +0000224 struct or {
225 A_SET_OF(struct Choice_1) list;
226
227 /* Context for parsing across buffer boundaries */
Lev Walkin1ca69672004-09-29 13:19:12 +0000228 asn_struct_ctx_t _asn_ctx;
Lev Walkin67ec2092004-09-08 00:26:56 +0000229 } or;
Lev Walkincc93b0f2004-09-10 09:18:20 +0000230 struct Choice_1 *not;
Lev Walkin67ec2092004-09-08 00:26:56 +0000231 INTEGER_t other;
232 } choice;
233
234 /* Context for parsing across buffer boundaries */
Lev Walkin1ca69672004-09-29 13:19:12 +0000235 asn_struct_ctx_t _asn_ctx;
Lev Walkin67ec2092004-09-08 00:26:56 +0000236} Choice_1_t;
237
Lev Walkinc8285712005-03-04 22:18:20 +0000238/*** <<< FUNC-DECLS [Choice-1] >>> ***/
239
240extern asn_TYPE_descriptor_t asn_DEF_Choice_1;
241
242/*** <<< POST-INCLUDE [Choice-1] >>> ***/
243
244#include <Choice-1.h>
245
Lev Walkin67ec2092004-09-08 00:26:56 +0000246/*** <<< STAT-DEFS [Choice-1] >>> ***/
247
Lev Walkine8318b82005-03-06 09:29:03 +0000248static asn_TYPE_member_t asn_MBR_or_3[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000249 { ATF_POINTER, 0, 0,
Lev Walkinb9189732004-09-10 09:37:12 +0000250 .tag = -1 /* Ambiguous tag (CHOICE?) */,
Lev Walkin67ec2092004-09-08 00:26:56 +0000251 .tag_mode = 0,
Lev Walkin1ca69672004-09-29 13:19:12 +0000252 .type = (void *)&asn_DEF_Choice_1,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000253 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000254 .name = ""
255 },
256};
Lev Walkine8318b82005-03-06 09:29:03 +0000257static ber_tlv_tag_t asn_DEF_or_3_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000258 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
259 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
Lev Walkin67ec2092004-09-08 00:26:56 +0000260};
Lev Walkine8318b82005-03-06 09:29:03 +0000261static asn_SET_OF_specifics_t asn_SPC_or_3_specs = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000262 sizeof(struct or),
Lev Walkin1ca69672004-09-29 13:19:12 +0000263 offsetof(struct or, _asn_ctx),
Lev Walkind6aa7aa2005-03-10 13:47:58 +0000264 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin67ec2092004-09-08 00:26:56 +0000265};
266static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000267asn_TYPE_descriptor_t asn_DEF_or_3 = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000268 "or",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000269 "or",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000270 SET_OF_free,
271 SET_OF_print,
Lev Walkin67ec2092004-09-08 00:26:56 +0000272 SET_OF_constraint,
273 SET_OF_decode_ber,
274 SET_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000275 SET_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000276 SET_OF_encode_xer,
Lev Walkin67ec2092004-09-08 00:26:56 +0000277 0, /* Use generic outmost tag fetcher */
Lev Walkine8318b82005-03-06 09:29:03 +0000278 asn_DEF_or_3_tags,
279 sizeof(asn_DEF_or_3_tags)
280 /sizeof(asn_DEF_or_3_tags[0]) - 1, /* 1 */
281 asn_DEF_or_3_tags, /* Same as above */
282 sizeof(asn_DEF_or_3_tags)
283 /sizeof(asn_DEF_or_3_tags[0]), /* 2 */
284 asn_MBR_or_3,
Lev Walkin67ec2092004-09-08 00:26:56 +0000285 1, /* Single element */
Lev Walkine8318b82005-03-06 09:29:03 +0000286 &asn_SPC_or_3_specs /* Additional specs */
Lev Walkin67ec2092004-09-08 00:26:56 +0000287};
288
Lev Walkine0272aa2005-03-04 11:26:08 +0000289static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000290 { ATF_POINTER, 0, offsetof(struct Choice_1, choice.and),
Lev Walkin67ec2092004-09-08 00:26:56 +0000291 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
292 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkin1ca69672004-09-29 13:19:12 +0000293 .type = (void *)&asn_DEF_Choice_1,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000294 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000295 .name = "and"
296 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000297 { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.or),
Lev Walkin67ec2092004-09-08 00:26:56 +0000298 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
299 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkine8318b82005-03-06 09:29:03 +0000300 .type = (void *)&asn_DEF_or_3,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000301 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000302 .name = "or"
303 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000304 { ATF_POINTER, 0, offsetof(struct Choice_1, choice.not),
Lev Walkin67ec2092004-09-08 00:26:56 +0000305 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
306 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkin1ca69672004-09-29 13:19:12 +0000307 .type = (void *)&asn_DEF_Choice_1,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000308 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000309 .name = "not"
310 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000311 { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.other),
Lev Walkin67ec2092004-09-08 00:26:56 +0000312 .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
313 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkin1ca69672004-09-29 13:19:12 +0000314 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000315 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000316 .name = "other"
317 },
318};
Lev Walkine0272aa2005-03-04 11:26:08 +0000319static asn_TYPE_tag2member_t asn_MAP_Choice_1_1_tag2el[] = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000320 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* and at 22 */
321 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* or at 23 */
322 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* not at 24 */
Lev Walkinf82138b2005-02-25 08:20:32 +0000323 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* other at 26 */
Lev Walkin67ec2092004-09-08 00:26:56 +0000324};
Lev Walkine0272aa2005-03-04 11:26:08 +0000325static asn_CHOICE_specifics_t asn_SPC_Choice_1_1_specs = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000326 sizeof(struct Choice_1),
Lev Walkin1ca69672004-09-29 13:19:12 +0000327 offsetof(struct Choice_1, _asn_ctx),
Lev Walkin67ec2092004-09-08 00:26:56 +0000328 offsetof(struct Choice_1, present),
329 sizeof(((struct Choice_1 *)0)->present),
Lev Walkine0272aa2005-03-04 11:26:08 +0000330 asn_MAP_Choice_1_1_tag2el,
Lev Walkin67ec2092004-09-08 00:26:56 +0000331 4, /* Count of tags in the map */
332 0 /* Whether extensible */
333};
Lev Walkin1ca69672004-09-29 13:19:12 +0000334asn_TYPE_descriptor_t asn_DEF_Choice_1 = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000335 "Choice-1",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000336 "Choice-1",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000337 CHOICE_free,
338 CHOICE_print,
Lev Walkin67ec2092004-09-08 00:26:56 +0000339 CHOICE_constraint,
340 CHOICE_decode_ber,
341 CHOICE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000342 CHOICE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000343 CHOICE_encode_xer,
Lev Walkin67ec2092004-09-08 00:26:56 +0000344 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000345 0, /* No effective tags (pointer) */
346 0, /* No effective tags (count) */
347 0, /* No tags (pointer) */
348 0, /* No tags (count) */
Lev Walkine0272aa2005-03-04 11:26:08 +0000349 asn_MBR_Choice_1_1,
Lev Walkin67ec2092004-09-08 00:26:56 +0000350 4, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000351 &asn_SPC_Choice_1_1_specs /* Additional specs */
Lev Walkin1ca69672004-09-29 13:19:12 +0000352};
353
354
355/*** <<< INCLUDES [Test-structure-2] >>> ***/
356
Lev Walkin1ca69672004-09-29 13:19:12 +0000357#include <constr_SET.h>
358
359/*** <<< DEPS [Test-structure-2] >>> ***/
360
361
362/*
363 * Method of determining the components presence
364 */
365typedef enum Test_structure_2_PR {
366 Test_structure_2_PR_m1, /* Member m1 is present */
367} Test_structure_2_PR;
368
Lev Walkinc8285712005-03-04 22:18:20 +0000369/*** <<< FWD-DECLS [Test-structure-2] >>> ***/
370
Lev Walkinbf56d542005-03-04 23:50:56 +0000371struct Test_structure_3;
Lev Walkin1ca69672004-09-29 13:19:12 +0000372
373/*** <<< TYPE-DECLS [Test-structure-2] >>> ***/
374
Lev Walkin1ca69672004-09-29 13:19:12 +0000375typedef struct Test_structure_2 {
376 struct Test_structure_3 *m1 /* OPTIONAL */;
377
378 /* Presence bitmask: ASN_SET_ISPRESENT(pTest_structure_2, Test_structure_2_PR_x) */
379 unsigned int _presence_map
380 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
381
382 /* Context for parsing across buffer boundaries */
383 asn_struct_ctx_t _asn_ctx;
384} Test_structure_2_t;
385
Lev Walkinc8285712005-03-04 22:18:20 +0000386/*** <<< FUNC-DECLS [Test-structure-2] >>> ***/
387
388extern asn_TYPE_descriptor_t asn_DEF_Test_structure_2;
389
390/*** <<< POST-INCLUDE [Test-structure-2] >>> ***/
391
392#include <Test-structure-3.h>
393
Lev Walkin1ca69672004-09-29 13:19:12 +0000394/*** <<< STAT-DEFS [Test-structure-2] >>> ***/
395
Lev Walkine0272aa2005-03-04 11:26:08 +0000396static asn_TYPE_member_t asn_MBR_Test_structure_2_1[] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000397 { ATF_POINTER, 1, offsetof(struct Test_structure_2, m1),
398 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
399 .tag_mode = 0,
400 .type = (void *)&asn_DEF_Test_structure_3,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000401 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin1ca69672004-09-29 13:19:12 +0000402 .name = "m1"
403 },
404};
Lev Walkine0272aa2005-03-04 11:26:08 +0000405static ber_tlv_tag_t asn_DEF_Test_structure_2_1_tags[] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000406 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
407};
Lev Walkine0272aa2005-03-04 11:26:08 +0000408static asn_TYPE_tag2member_t asn_MAP_Test_structure_2_1_tag2el[] = {
Lev Walkinf82138b2005-02-25 08:20:32 +0000409 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 at 28 */
Lev Walkin1ca69672004-09-29 13:19:12 +0000410};
Lev Walkine0272aa2005-03-04 11:26:08 +0000411static uint8_t asn_MAP_Test_structure_2_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000412 (0 << 7)
413};
Lev Walkine0272aa2005-03-04 11:26:08 +0000414static asn_SET_specifics_t asn_SPC_Test_structure_2_1_specs = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000415 sizeof(struct Test_structure_2),
416 offsetof(struct Test_structure_2, _asn_ctx),
417 offsetof(struct Test_structure_2, _presence_map),
Lev Walkine0272aa2005-03-04 11:26:08 +0000418 asn_MAP_Test_structure_2_1_tag2el,
Lev Walkin1ca69672004-09-29 13:19:12 +0000419 1, /* Count of tags in the map */
Lev Walkine0272aa2005-03-04 11:26:08 +0000420 asn_MAP_Test_structure_2_1_tag2el, /* Same as above */
Lev Walkinf82138b2005-02-25 08:20:32 +0000421 1, /* Count of tags in the CXER map */
Lev Walkin1ca69672004-09-29 13:19:12 +0000422 0, /* Whether extensible */
Lev Walkine0272aa2005-03-04 11:26:08 +0000423 (unsigned int *)asn_MAP_Test_structure_2_1_mmap /* Mandatory elements map */
Lev Walkin1ca69672004-09-29 13:19:12 +0000424};
425asn_TYPE_descriptor_t asn_DEF_Test_structure_2 = {
426 "Test-structure-2",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000427 "Test-structure-2",
Lev Walkin1ca69672004-09-29 13:19:12 +0000428 SET_free,
429 SET_print,
430 SET_constraint,
431 SET_decode_ber,
432 SET_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000433 SET_decode_xer,
Lev Walkin1ca69672004-09-29 13:19:12 +0000434 SET_encode_xer,
435 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000436 asn_DEF_Test_structure_2_1_tags,
437 sizeof(asn_DEF_Test_structure_2_1_tags)
438 /sizeof(asn_DEF_Test_structure_2_1_tags[0]), /* 1 */
439 asn_DEF_Test_structure_2_1_tags, /* Same as above */
440 sizeof(asn_DEF_Test_structure_2_1_tags)
441 /sizeof(asn_DEF_Test_structure_2_1_tags[0]), /* 1 */
442 asn_MBR_Test_structure_2_1,
Lev Walkin1ca69672004-09-29 13:19:12 +0000443 1, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000444 &asn_SPC_Test_structure_2_1_specs /* Additional specs */
Lev Walkin1ca69672004-09-29 13:19:12 +0000445};
446
447
448/*** <<< INCLUDES [Test-structure-3] >>> ***/
449
Lev Walkin1ca69672004-09-29 13:19:12 +0000450#include <constr_SET.h>
451
452/*** <<< DEPS [Test-structure-3] >>> ***/
453
454
455/*
456 * Method of determining the components presence
457 */
458typedef enum Test_structure_3_PR {
459 Test_structure_3_PR_m1, /* Member m1 is present */
460} Test_structure_3_PR;
461
Lev Walkinc8285712005-03-04 22:18:20 +0000462/*** <<< FWD-DECLS [Test-structure-3] >>> ***/
463
Lev Walkinbf56d542005-03-04 23:50:56 +0000464struct Test_structure_2;
Lev Walkin1ca69672004-09-29 13:19:12 +0000465
466/*** <<< TYPE-DECLS [Test-structure-3] >>> ***/
467
Lev Walkin1ca69672004-09-29 13:19:12 +0000468typedef struct Test_structure_3 {
469 struct Test_structure_2 *m1 /* OPTIONAL */;
470
471 /* Presence bitmask: ASN_SET_ISPRESENT(pTest_structure_3, Test_structure_3_PR_x) */
472 unsigned int _presence_map
473 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
474
475 /* Context for parsing across buffer boundaries */
476 asn_struct_ctx_t _asn_ctx;
477} Test_structure_3_t;
478
Lev Walkinc8285712005-03-04 22:18:20 +0000479/*** <<< FUNC-DECLS [Test-structure-3] >>> ***/
480
481extern asn_TYPE_descriptor_t asn_DEF_Test_structure_3;
482
483/*** <<< POST-INCLUDE [Test-structure-3] >>> ***/
484
485#include <Test-structure-2.h>
486
Lev Walkin1ca69672004-09-29 13:19:12 +0000487/*** <<< STAT-DEFS [Test-structure-3] >>> ***/
488
Lev Walkine0272aa2005-03-04 11:26:08 +0000489static asn_TYPE_member_t asn_MBR_Test_structure_3_1[] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000490 { ATF_POINTER, 1, offsetof(struct Test_structure_3, m1),
491 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
492 .tag_mode = 0,
493 .type = (void *)&asn_DEF_Test_structure_2,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000494 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin1ca69672004-09-29 13:19:12 +0000495 .name = "m1"
496 },
497};
Lev Walkine0272aa2005-03-04 11:26:08 +0000498static ber_tlv_tag_t asn_DEF_Test_structure_3_1_tags[] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000499 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
500};
Lev Walkine0272aa2005-03-04 11:26:08 +0000501static asn_TYPE_tag2member_t asn_MAP_Test_structure_3_1_tag2el[] = {
Lev Walkinf82138b2005-02-25 08:20:32 +0000502 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 at 29 */
Lev Walkin1ca69672004-09-29 13:19:12 +0000503};
Lev Walkine0272aa2005-03-04 11:26:08 +0000504static uint8_t asn_MAP_Test_structure_3_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000505 (0 << 7)
506};
Lev Walkine0272aa2005-03-04 11:26:08 +0000507static asn_SET_specifics_t asn_SPC_Test_structure_3_1_specs = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000508 sizeof(struct Test_structure_3),
509 offsetof(struct Test_structure_3, _asn_ctx),
510 offsetof(struct Test_structure_3, _presence_map),
Lev Walkine0272aa2005-03-04 11:26:08 +0000511 asn_MAP_Test_structure_3_1_tag2el,
Lev Walkin1ca69672004-09-29 13:19:12 +0000512 1, /* Count of tags in the map */
Lev Walkine0272aa2005-03-04 11:26:08 +0000513 asn_MAP_Test_structure_3_1_tag2el, /* Same as above */
Lev Walkinf82138b2005-02-25 08:20:32 +0000514 1, /* Count of tags in the CXER map */
Lev Walkin1ca69672004-09-29 13:19:12 +0000515 0, /* Whether extensible */
Lev Walkine0272aa2005-03-04 11:26:08 +0000516 (unsigned int *)asn_MAP_Test_structure_3_1_mmap /* Mandatory elements map */
Lev Walkin1ca69672004-09-29 13:19:12 +0000517};
518asn_TYPE_descriptor_t asn_DEF_Test_structure_3 = {
519 "Test-structure-3",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000520 "Test-structure-3",
Lev Walkin1ca69672004-09-29 13:19:12 +0000521 SET_free,
522 SET_print,
523 SET_constraint,
524 SET_decode_ber,
525 SET_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000526 SET_decode_xer,
Lev Walkin1ca69672004-09-29 13:19:12 +0000527 SET_encode_xer,
528 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000529 asn_DEF_Test_structure_3_1_tags,
530 sizeof(asn_DEF_Test_structure_3_1_tags)
531 /sizeof(asn_DEF_Test_structure_3_1_tags[0]), /* 1 */
532 asn_DEF_Test_structure_3_1_tags, /* Same as above */
533 sizeof(asn_DEF_Test_structure_3_1_tags)
534 /sizeof(asn_DEF_Test_structure_3_1_tags[0]), /* 1 */
535 asn_MBR_Test_structure_3_1,
Lev Walkin1ca69672004-09-29 13:19:12 +0000536 1, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000537 &asn_SPC_Test_structure_3_1_specs /* Additional specs */
Lev Walkin67ec2092004-09-08 00:26:56 +0000538};
539