blob: 747d9624087179fae88ed0d2769f50b97a614315 [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
13struct Test_structure_1; /* Forward declaration */
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 Walkincc93b0f2004-09-10 09:18:20 +000048 { ATF_NOFLAGS, 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 Walkine0272aa2005-03-04 11:26:08 +000087static asn_TYPE_member_t asn_MBR_t_member2_3[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000088 { ATF_NOFLAGS, 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 Walkine0272aa2005-03-04 11:26:08 +000096static ber_tlv_tag_t asn_DEF_t_member2_3_tags[] = {
Lev Walkin67ec2092004-09-08 00:26:56 +000097 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
98};
Lev Walkine0272aa2005-03-04 11:26:08 +000099static asn_SET_OF_specifics_t asn_SPC_t_member2_3_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 Walkine0272aa2005-03-04 11:26:08 +0000105asn_TYPE_descriptor_t asn_DEF_t_member2_3 = {
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 Walkine0272aa2005-03-04 11:26:08 +0000116 asn_DEF_t_member2_3_tags,
117 sizeof(asn_DEF_t_member2_3_tags)
118 /sizeof(asn_DEF_t_member2_3_tags[0]), /* 1 */
119 asn_DEF_t_member2_3_tags, /* Same as above */
120 sizeof(asn_DEF_t_member2_3_tags)
121 /sizeof(asn_DEF_t_member2_3_tags[0]), /* 1 */
122 asn_MBR_t_member2_3,
Lev Walkin67ec2092004-09-08 00:26:56 +0000123 1, /* Single element */
Lev Walkine0272aa2005-03-04 11:26:08 +0000124 &asn_SPC_t_member2_3_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 Walkine0272aa2005-03-04 11:26:08 +0000138 .type = (void *)&asn_DEF_t_member2_3,
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
199#include <Choice-1.h>
200#include <INTEGER.h>
201#include <asn_SET_OF.h>
202#include <constr_SET_OF.h>
203#include <constr_CHOICE.h>
204
205/*** <<< DEPS [Choice-1] >>> ***/
206
207typedef enum Choice_1_PR {
208 Choice_1_PR_NOTHING, /* No components present */
209 Choice_1_PR_and,
210 Choice_1_PR_or,
211 Choice_1_PR_not,
212 Choice_1_PR_other,
213} Choice_1_PR;
Lev Walkin1ca69672004-09-29 13:19:12 +0000214
Lev Walkinc8285712005-03-04 22:18:20 +0000215/*** <<< FWD-DECLS [Choice-1] >>> ***/
Lev Walkin1ca69672004-09-29 13:19:12 +0000216
217struct Choice_1; /* Forward declaration */
Lev Walkin67ec2092004-09-08 00:26:56 +0000218
219/*** <<< TYPE-DECLS [Choice-1] >>> ***/
220
Lev Walkin67ec2092004-09-08 00:26:56 +0000221typedef struct Choice_1 {
222 Choice_1_PR present;
223 union {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000224 struct Choice_1 *and;
Lev Walkin67ec2092004-09-08 00:26:56 +0000225 struct or {
226 A_SET_OF(struct Choice_1) list;
227
228 /* Context for parsing across buffer boundaries */
Lev Walkin1ca69672004-09-29 13:19:12 +0000229 asn_struct_ctx_t _asn_ctx;
Lev Walkin67ec2092004-09-08 00:26:56 +0000230 } or;
Lev Walkincc93b0f2004-09-10 09:18:20 +0000231 struct Choice_1 *not;
Lev Walkin67ec2092004-09-08 00:26:56 +0000232 INTEGER_t other;
233 } choice;
234
235 /* Context for parsing across buffer boundaries */
Lev Walkin1ca69672004-09-29 13:19:12 +0000236 asn_struct_ctx_t _asn_ctx;
Lev Walkin67ec2092004-09-08 00:26:56 +0000237} Choice_1_t;
238
Lev Walkinc8285712005-03-04 22:18:20 +0000239/*** <<< FUNC-DECLS [Choice-1] >>> ***/
240
241extern asn_TYPE_descriptor_t asn_DEF_Choice_1;
242
243/*** <<< POST-INCLUDE [Choice-1] >>> ***/
244
245#include <Choice-1.h>
246
Lev Walkin67ec2092004-09-08 00:26:56 +0000247/*** <<< STAT-DEFS [Choice-1] >>> ***/
248
Lev Walkine0272aa2005-03-04 11:26:08 +0000249static asn_TYPE_member_t asn_MBR_or_2[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000250 { ATF_NOFLAGS, 0, 0,
Lev Walkinb9189732004-09-10 09:37:12 +0000251 .tag = -1 /* Ambiguous tag (CHOICE?) */,
Lev Walkin67ec2092004-09-08 00:26:56 +0000252 .tag_mode = 0,
Lev Walkin1ca69672004-09-29 13:19:12 +0000253 .type = (void *)&asn_DEF_Choice_1,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000254 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000255 .name = ""
256 },
257};
Lev Walkine0272aa2005-03-04 11:26:08 +0000258static ber_tlv_tag_t asn_DEF_or_2_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000259 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
260 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
Lev Walkin67ec2092004-09-08 00:26:56 +0000261};
Lev Walkine0272aa2005-03-04 11:26:08 +0000262static asn_SET_OF_specifics_t asn_SPC_or_2_specs = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000263 sizeof(struct or),
Lev Walkin1ca69672004-09-29 13:19:12 +0000264 offsetof(struct or, _asn_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +0000265 1, /* XER encoding is XMLValueList */
Lev Walkin67ec2092004-09-08 00:26:56 +0000266};
267static /* Use -fall-defs-global to expose */
Lev Walkine0272aa2005-03-04 11:26:08 +0000268asn_TYPE_descriptor_t asn_DEF_or_2 = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000269 "or",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000270 "or",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000271 SET_OF_free,
272 SET_OF_print,
Lev Walkin67ec2092004-09-08 00:26:56 +0000273 SET_OF_constraint,
274 SET_OF_decode_ber,
275 SET_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000276 SET_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000277 SET_OF_encode_xer,
Lev Walkin67ec2092004-09-08 00:26:56 +0000278 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000279 asn_DEF_or_2_tags,
280 sizeof(asn_DEF_or_2_tags)
281 /sizeof(asn_DEF_or_2_tags[0]) - 1, /* 1 */
282 asn_DEF_or_2_tags, /* Same as above */
283 sizeof(asn_DEF_or_2_tags)
284 /sizeof(asn_DEF_or_2_tags[0]), /* 2 */
285 asn_MBR_or_2,
Lev Walkin67ec2092004-09-08 00:26:56 +0000286 1, /* Single element */
Lev Walkine0272aa2005-03-04 11:26:08 +0000287 &asn_SPC_or_2_specs /* Additional specs */
Lev Walkin67ec2092004-09-08 00:26:56 +0000288};
289
Lev Walkine0272aa2005-03-04 11:26:08 +0000290static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000291 { ATF_POINTER, 0, offsetof(struct Choice_1, choice.and),
Lev Walkin67ec2092004-09-08 00:26:56 +0000292 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
293 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkin1ca69672004-09-29 13:19:12 +0000294 .type = (void *)&asn_DEF_Choice_1,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000295 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000296 .name = "and"
297 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000298 { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.or),
Lev Walkin67ec2092004-09-08 00:26:56 +0000299 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
300 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkine0272aa2005-03-04 11:26:08 +0000301 .type = (void *)&asn_DEF_or_2,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000302 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000303 .name = "or"
304 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000305 { ATF_POINTER, 0, offsetof(struct Choice_1, choice.not),
Lev Walkin67ec2092004-09-08 00:26:56 +0000306 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
307 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkin1ca69672004-09-29 13:19:12 +0000308 .type = (void *)&asn_DEF_Choice_1,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000309 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000310 .name = "not"
311 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000312 { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.other),
Lev Walkin67ec2092004-09-08 00:26:56 +0000313 .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
314 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkin1ca69672004-09-29 13:19:12 +0000315 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000316 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin67ec2092004-09-08 00:26:56 +0000317 .name = "other"
318 },
319};
Lev Walkine0272aa2005-03-04 11:26:08 +0000320static asn_TYPE_tag2member_t asn_MAP_Choice_1_1_tag2el[] = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000321 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* and at 22 */
322 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* or at 23 */
323 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* not at 24 */
Lev Walkinf82138b2005-02-25 08:20:32 +0000324 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* other at 26 */
Lev Walkin67ec2092004-09-08 00:26:56 +0000325};
Lev Walkine0272aa2005-03-04 11:26:08 +0000326static asn_CHOICE_specifics_t asn_SPC_Choice_1_1_specs = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000327 sizeof(struct Choice_1),
Lev Walkin1ca69672004-09-29 13:19:12 +0000328 offsetof(struct Choice_1, _asn_ctx),
Lev Walkin67ec2092004-09-08 00:26:56 +0000329 offsetof(struct Choice_1, present),
330 sizeof(((struct Choice_1 *)0)->present),
Lev Walkine0272aa2005-03-04 11:26:08 +0000331 asn_MAP_Choice_1_1_tag2el,
Lev Walkin67ec2092004-09-08 00:26:56 +0000332 4, /* Count of tags in the map */
333 0 /* Whether extensible */
334};
Lev Walkin1ca69672004-09-29 13:19:12 +0000335asn_TYPE_descriptor_t asn_DEF_Choice_1 = {
Lev Walkin67ec2092004-09-08 00:26:56 +0000336 "Choice-1",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000337 "Choice-1",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000338 CHOICE_free,
339 CHOICE_print,
Lev Walkin67ec2092004-09-08 00:26:56 +0000340 CHOICE_constraint,
341 CHOICE_decode_ber,
342 CHOICE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000343 CHOICE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000344 CHOICE_encode_xer,
Lev Walkin67ec2092004-09-08 00:26:56 +0000345 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000346 0, /* No effective tags (pointer) */
347 0, /* No effective tags (count) */
348 0, /* No tags (pointer) */
349 0, /* No tags (count) */
Lev Walkine0272aa2005-03-04 11:26:08 +0000350 asn_MBR_Choice_1_1,
Lev Walkin67ec2092004-09-08 00:26:56 +0000351 4, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000352 &asn_SPC_Choice_1_1_specs /* Additional specs */
Lev Walkin1ca69672004-09-29 13:19:12 +0000353};
354
355
356/*** <<< INCLUDES [Test-structure-2] >>> ***/
357
Lev Walkin1ca69672004-09-29 13:19:12 +0000358#include <constr_SET.h>
359
360/*** <<< DEPS [Test-structure-2] >>> ***/
361
362
363/*
364 * Method of determining the components presence
365 */
366typedef enum Test_structure_2_PR {
367 Test_structure_2_PR_m1, /* Member m1 is present */
368} Test_structure_2_PR;
369
Lev Walkinc8285712005-03-04 22:18:20 +0000370/*** <<< FWD-DECLS [Test-structure-2] >>> ***/
371
Lev Walkin1ca69672004-09-29 13:19:12 +0000372struct Test_structure_3; /* Forward declaration */
Lev Walkin1ca69672004-09-29 13:19:12 +0000373
374/*** <<< TYPE-DECLS [Test-structure-2] >>> ***/
375
Lev Walkin1ca69672004-09-29 13:19:12 +0000376typedef struct Test_structure_2 {
377 struct Test_structure_3 *m1 /* OPTIONAL */;
378
379 /* Presence bitmask: ASN_SET_ISPRESENT(pTest_structure_2, Test_structure_2_PR_x) */
380 unsigned int _presence_map
381 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
382
383 /* Context for parsing across buffer boundaries */
384 asn_struct_ctx_t _asn_ctx;
385} Test_structure_2_t;
386
Lev Walkinc8285712005-03-04 22:18:20 +0000387/*** <<< FUNC-DECLS [Test-structure-2] >>> ***/
388
389extern asn_TYPE_descriptor_t asn_DEF_Test_structure_2;
390
391/*** <<< POST-INCLUDE [Test-structure-2] >>> ***/
392
393#include <Test-structure-3.h>
394
Lev Walkin1ca69672004-09-29 13:19:12 +0000395/*** <<< STAT-DEFS [Test-structure-2] >>> ***/
396
Lev Walkine0272aa2005-03-04 11:26:08 +0000397static asn_TYPE_member_t asn_MBR_Test_structure_2_1[] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000398 { ATF_POINTER, 1, offsetof(struct Test_structure_2, m1),
399 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
400 .tag_mode = 0,
401 .type = (void *)&asn_DEF_Test_structure_3,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000402 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin1ca69672004-09-29 13:19:12 +0000403 .name = "m1"
404 },
405};
Lev Walkine0272aa2005-03-04 11:26:08 +0000406static ber_tlv_tag_t asn_DEF_Test_structure_2_1_tags[] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000407 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
408};
Lev Walkine0272aa2005-03-04 11:26:08 +0000409static asn_TYPE_tag2member_t asn_MAP_Test_structure_2_1_tag2el[] = {
Lev Walkinf82138b2005-02-25 08:20:32 +0000410 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 at 28 */
Lev Walkin1ca69672004-09-29 13:19:12 +0000411};
Lev Walkine0272aa2005-03-04 11:26:08 +0000412static uint8_t asn_MAP_Test_structure_2_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000413 (0 << 7)
414};
Lev Walkine0272aa2005-03-04 11:26:08 +0000415static asn_SET_specifics_t asn_SPC_Test_structure_2_1_specs = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000416 sizeof(struct Test_structure_2),
417 offsetof(struct Test_structure_2, _asn_ctx),
418 offsetof(struct Test_structure_2, _presence_map),
Lev Walkine0272aa2005-03-04 11:26:08 +0000419 asn_MAP_Test_structure_2_1_tag2el,
Lev Walkin1ca69672004-09-29 13:19:12 +0000420 1, /* Count of tags in the map */
Lev Walkine0272aa2005-03-04 11:26:08 +0000421 asn_MAP_Test_structure_2_1_tag2el, /* Same as above */
Lev Walkinf82138b2005-02-25 08:20:32 +0000422 1, /* Count of tags in the CXER map */
Lev Walkin1ca69672004-09-29 13:19:12 +0000423 0, /* Whether extensible */
Lev Walkine0272aa2005-03-04 11:26:08 +0000424 (unsigned int *)asn_MAP_Test_structure_2_1_mmap /* Mandatory elements map */
Lev Walkin1ca69672004-09-29 13:19:12 +0000425};
426asn_TYPE_descriptor_t asn_DEF_Test_structure_2 = {
427 "Test-structure-2",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000428 "Test-structure-2",
Lev Walkin1ca69672004-09-29 13:19:12 +0000429 SET_free,
430 SET_print,
431 SET_constraint,
432 SET_decode_ber,
433 SET_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000434 SET_decode_xer,
Lev Walkin1ca69672004-09-29 13:19:12 +0000435 SET_encode_xer,
436 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000437 asn_DEF_Test_structure_2_1_tags,
438 sizeof(asn_DEF_Test_structure_2_1_tags)
439 /sizeof(asn_DEF_Test_structure_2_1_tags[0]), /* 1 */
440 asn_DEF_Test_structure_2_1_tags, /* Same as above */
441 sizeof(asn_DEF_Test_structure_2_1_tags)
442 /sizeof(asn_DEF_Test_structure_2_1_tags[0]), /* 1 */
443 asn_MBR_Test_structure_2_1,
Lev Walkin1ca69672004-09-29 13:19:12 +0000444 1, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000445 &asn_SPC_Test_structure_2_1_specs /* Additional specs */
Lev Walkin1ca69672004-09-29 13:19:12 +0000446};
447
448
449/*** <<< INCLUDES [Test-structure-3] >>> ***/
450
Lev Walkin1ca69672004-09-29 13:19:12 +0000451#include <constr_SET.h>
452
453/*** <<< DEPS [Test-structure-3] >>> ***/
454
455
456/*
457 * Method of determining the components presence
458 */
459typedef enum Test_structure_3_PR {
460 Test_structure_3_PR_m1, /* Member m1 is present */
461} Test_structure_3_PR;
462
Lev Walkinc8285712005-03-04 22:18:20 +0000463/*** <<< FWD-DECLS [Test-structure-3] >>> ***/
464
Lev Walkin1ca69672004-09-29 13:19:12 +0000465struct Test_structure_2; /* Forward declaration */
Lev Walkin1ca69672004-09-29 13:19:12 +0000466
467/*** <<< TYPE-DECLS [Test-structure-3] >>> ***/
468
Lev Walkin1ca69672004-09-29 13:19:12 +0000469typedef struct Test_structure_3 {
470 struct Test_structure_2 *m1 /* OPTIONAL */;
471
472 /* Presence bitmask: ASN_SET_ISPRESENT(pTest_structure_3, Test_structure_3_PR_x) */
473 unsigned int _presence_map
474 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
475
476 /* Context for parsing across buffer boundaries */
477 asn_struct_ctx_t _asn_ctx;
478} Test_structure_3_t;
479
Lev Walkinc8285712005-03-04 22:18:20 +0000480/*** <<< FUNC-DECLS [Test-structure-3] >>> ***/
481
482extern asn_TYPE_descriptor_t asn_DEF_Test_structure_3;
483
484/*** <<< POST-INCLUDE [Test-structure-3] >>> ***/
485
486#include <Test-structure-2.h>
487
Lev Walkin1ca69672004-09-29 13:19:12 +0000488/*** <<< STAT-DEFS [Test-structure-3] >>> ***/
489
Lev Walkine0272aa2005-03-04 11:26:08 +0000490static asn_TYPE_member_t asn_MBR_Test_structure_3_1[] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000491 { ATF_POINTER, 1, offsetof(struct Test_structure_3, m1),
492 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
493 .tag_mode = 0,
494 .type = (void *)&asn_DEF_Test_structure_2,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000495 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin1ca69672004-09-29 13:19:12 +0000496 .name = "m1"
497 },
498};
Lev Walkine0272aa2005-03-04 11:26:08 +0000499static ber_tlv_tag_t asn_DEF_Test_structure_3_1_tags[] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000500 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
501};
Lev Walkine0272aa2005-03-04 11:26:08 +0000502static asn_TYPE_tag2member_t asn_MAP_Test_structure_3_1_tag2el[] = {
Lev Walkinf82138b2005-02-25 08:20:32 +0000503 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 at 29 */
Lev Walkin1ca69672004-09-29 13:19:12 +0000504};
Lev Walkine0272aa2005-03-04 11:26:08 +0000505static uint8_t asn_MAP_Test_structure_3_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000506 (0 << 7)
507};
Lev Walkine0272aa2005-03-04 11:26:08 +0000508static asn_SET_specifics_t asn_SPC_Test_structure_3_1_specs = {
Lev Walkin1ca69672004-09-29 13:19:12 +0000509 sizeof(struct Test_structure_3),
510 offsetof(struct Test_structure_3, _asn_ctx),
511 offsetof(struct Test_structure_3, _presence_map),
Lev Walkine0272aa2005-03-04 11:26:08 +0000512 asn_MAP_Test_structure_3_1_tag2el,
Lev Walkin1ca69672004-09-29 13:19:12 +0000513 1, /* Count of tags in the map */
Lev Walkine0272aa2005-03-04 11:26:08 +0000514 asn_MAP_Test_structure_3_1_tag2el, /* Same as above */
Lev Walkinf82138b2005-02-25 08:20:32 +0000515 1, /* Count of tags in the CXER map */
Lev Walkin1ca69672004-09-29 13:19:12 +0000516 0, /* Whether extensible */
Lev Walkine0272aa2005-03-04 11:26:08 +0000517 (unsigned int *)asn_MAP_Test_structure_3_1_mmap /* Mandatory elements map */
Lev Walkin1ca69672004-09-29 13:19:12 +0000518};
519asn_TYPE_descriptor_t asn_DEF_Test_structure_3 = {
520 "Test-structure-3",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000521 "Test-structure-3",
Lev Walkin1ca69672004-09-29 13:19:12 +0000522 SET_free,
523 SET_print,
524 SET_constraint,
525 SET_decode_ber,
526 SET_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000527 SET_decode_xer,
Lev Walkin1ca69672004-09-29 13:19:12 +0000528 SET_encode_xer,
529 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000530 asn_DEF_Test_structure_3_1_tags,
531 sizeof(asn_DEF_Test_structure_3_1_tags)
532 /sizeof(asn_DEF_Test_structure_3_1_tags[0]), /* 1 */
533 asn_DEF_Test_structure_3_1_tags, /* Same as above */
534 sizeof(asn_DEF_Test_structure_3_1_tags)
535 /sizeof(asn_DEF_Test_structure_3_1_tags[0]), /* 1 */
536 asn_MBR_Test_structure_3_1,
Lev Walkin1ca69672004-09-29 13:19:12 +0000537 1, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000538 &asn_SPC_Test_structure_3_1_specs /* Additional specs */
Lev Walkin67ec2092004-09-08 00:26:56 +0000539};
540