blob: 5acc77019e511dd3af468236334e5309ce06b4be [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001
Lev Walkin5d5e6522004-08-11 05:22:22 +00002/*** <<< INCLUDES [T] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +00003
Lev Walkinf15320b2004-06-03 03:38:44 +00004#include <INTEGER.h>
Lev Walkinf15320b2004-06-03 03:38:44 +00005#include <T2.h>
6#include <asn_SEQUENCE_OF.h>
Lev Walkin5d5e6522004-08-11 05:22:22 +00007#include <constr_SEQUENCE_OF.h>
Lev Walkinf15320b2004-06-03 03:38:44 +00008#include <constr_SEQUENCE.h>
9
Lev Walkin5d5e6522004-08-11 05:22:22 +000010/*** <<< DEPS [T] >>> ***/
11
Lev Walkindfae9752004-09-29 13:19:37 +000012extern asn_TYPE_descriptor_t asn_DEF_T;
Lev Walkinf15320b2004-06-03 03:38:44 +000013
14/*** <<< TYPE-DECLS [T] >>> ***/
15
16
17typedef struct T {
Lev Walkin64d99e92005-01-30 18:34:07 +000018 INTEGER_t Int;
Lev Walkinf15320b2004-06-03 03:38:44 +000019 struct collection {
Lev Walkin8dd0eed2004-09-17 06:32:12 +000020 A_SEQUENCE_OF(T2_t) list;
Lev Walkinf15320b2004-06-03 03:38:44 +000021
22 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000023 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +000024 } collection;
25
26 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000027 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +000028} T_t;
29
30/*** <<< STAT-DEFS [T] >>> ***/
31
Lev Walkindfae9752004-09-29 13:19:37 +000032static asn_TYPE_member_t asn_MBR_collection[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000033 { ATF_NOFLAGS, 0, 0,
Lev Walkin2e3055d2004-08-20 13:36:32 +000034 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
35 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000036 .type = (void *)&asn_DEF_T2,
Lev Walkinba58e1b2005-01-17 12:20:19 +000037 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +000038 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +000039 },
Lev Walkin2e3055d2004-08-20 13:36:32 +000040};
Lev Walkindfae9752004-09-29 13:19:37 +000041static ber_tlv_tag_t asn_DEF_collection_tags[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +000042 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
43};
Lev Walkindfae9752004-09-29 13:19:37 +000044static asn_SET_OF_specifics_t asn_DEF_collection_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +000045 sizeof(struct collection),
Lev Walkindfae9752004-09-29 13:19:37 +000046 offsetof(struct collection, _asn_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +000047 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin2e3055d2004-08-20 13:36:32 +000048};
Lev Walkind04430c2004-09-07 06:44:29 +000049static /* Use -fall-defs-global to expose */
Lev Walkindfae9752004-09-29 13:19:37 +000050asn_TYPE_descriptor_t asn_DEF_collection = {
Lev Walkin2e3055d2004-08-20 13:36:32 +000051 "collection",
Lev Walkindc06f6b2004-10-20 15:50:55 +000052 "collection",
Lev Walkina9cc46e2004-09-22 16:06:28 +000053 SEQUENCE_OF_free,
54 SEQUENCE_OF_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +000055 SEQUENCE_OF_constraint,
56 SEQUENCE_OF_decode_ber,
57 SEQUENCE_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +000058 SEQUENCE_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +000059 SEQUENCE_OF_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +000060 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +000061 asn_DEF_collection_tags,
62 sizeof(asn_DEF_collection_tags)
63 /sizeof(asn_DEF_collection_tags[0]), /* 1 */
64 asn_DEF_collection_tags, /* Same as above */
65 sizeof(asn_DEF_collection_tags)
66 /sizeof(asn_DEF_collection_tags[0]), /* 1 */
67 asn_MBR_collection,
Lev Walkin2e3055d2004-08-20 13:36:32 +000068 1, /* Single element */
Lev Walkindfae9752004-09-29 13:19:37 +000069 &asn_DEF_collection_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +000070};
71
Lev Walkindfae9752004-09-29 13:19:37 +000072static asn_TYPE_member_t asn_MBR_T[] = {
Lev Walkin64d99e92005-01-30 18:34:07 +000073 { ATF_NOFLAGS, 0, offsetof(struct T, Int),
Lev Walkin2e3055d2004-08-20 13:36:32 +000074 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
75 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000076 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +000077 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +000078 .name = "int"
79 },
Lev Walkincc93b0f2004-09-10 09:18:20 +000080 { ATF_NOFLAGS, 0, offsetof(struct T, collection),
Lev Walkin2e3055d2004-08-20 13:36:32 +000081 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
82 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000083 .type = (void *)&asn_DEF_collection,
Lev Walkinba58e1b2005-01-17 12:20:19 +000084 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +000085 .name = "collection"
Lev Walkinf15320b2004-06-03 03:38:44 +000086 },
87};
Lev Walkindfae9752004-09-29 13:19:37 +000088static ber_tlv_tag_t asn_DEF_T_tags[] = {
Lev Walkinf15320b2004-06-03 03:38:44 +000089 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
90};
Lev Walkindfae9752004-09-29 13:19:37 +000091static asn_TYPE_tag2member_t asn_DEF_T_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +000092 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int at 15 */
93 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* collection at 17 */
Lev Walkincda6b8a2004-06-06 07:20:52 +000094};
Lev Walkindfae9752004-09-29 13:19:37 +000095static asn_SEQUENCE_specifics_t asn_DEF_T_specs = {
Lev Walkinf15320b2004-06-03 03:38:44 +000096 sizeof(struct T),
Lev Walkindfae9752004-09-29 13:19:37 +000097 offsetof(struct T, _asn_ctx),
98 asn_DEF_T_tag2el,
Lev Walkincda6b8a2004-06-06 07:20:52 +000099 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000100 -1, /* Start extensions */
101 -1 /* Stop extensions */
102};
Lev Walkindfae9752004-09-29 13:19:37 +0000103asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000104 "T",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000105 "T",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000106 SEQUENCE_free,
107 SEQUENCE_print,
Lev Walkinf15320b2004-06-03 03:38:44 +0000108 SEQUENCE_constraint,
109 SEQUENCE_decode_ber,
110 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000111 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000112 SEQUENCE_encode_xer,
Lev Walkinf15320b2004-06-03 03:38:44 +0000113 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000114 asn_DEF_T_tags,
115 sizeof(asn_DEF_T_tags)
116 /sizeof(asn_DEF_T_tags[0]), /* 1 */
117 asn_DEF_T_tags, /* Same as above */
118 sizeof(asn_DEF_T_tags)
119 /sizeof(asn_DEF_T_tags[0]), /* 1 */
120 asn_MBR_T,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000121 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000122 &asn_DEF_T_specs /* Additional specs */
Lev Walkinf15320b2004-06-03 03:38:44 +0000123};
124
125
Lev Walkin5d5e6522004-08-11 05:22:22 +0000126/*** <<< INCLUDES [T2] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000127
Lev Walkinf15320b2004-06-03 03:38:44 +0000128#include <BOOLEAN.h>
129#include <UTF8String.h>
Lev Walkinf15320b2004-06-03 03:38:44 +0000130#include <constr_SEQUENCE.h>
131
Lev Walkin5d5e6522004-08-11 05:22:22 +0000132/*** <<< DEPS [T2] >>> ***/
133
Lev Walkindfae9752004-09-29 13:19:37 +0000134extern asn_TYPE_descriptor_t asn_DEF_T2;
Lev Walkinf15320b2004-06-03 03:38:44 +0000135
136/*** <<< TYPE-DECLS [T2] >>> ***/
137
138
139typedef struct T2 {
140 BOOLEAN_t flag;
141 UTF8String_t str;
142
143 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000144 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +0000145} T2_t;
146
147/*** <<< STAT-DEFS [T2] >>> ***/
148
Lev Walkindfae9752004-09-29 13:19:37 +0000149static asn_TYPE_member_t asn_MBR_T2[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000150 { ATF_NOFLAGS, 0, offsetof(struct T2, flag),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000151 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
152 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000153 .type = (void *)&asn_DEF_BOOLEAN,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000154 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000155 .name = "flag"
Lev Walkinf15320b2004-06-03 03:38:44 +0000156 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000157 { ATF_NOFLAGS, 0, offsetof(struct T2, str),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000158 .tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
159 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000160 .type = (void *)&asn_DEF_UTF8String,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000161 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000162 .name = "str"
Lev Walkinf15320b2004-06-03 03:38:44 +0000163 },
164};
Lev Walkindfae9752004-09-29 13:19:37 +0000165static ber_tlv_tag_t asn_DEF_T2_tags[] = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000166 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
167};
Lev Walkindfae9752004-09-29 13:19:37 +0000168static asn_TYPE_tag2member_t asn_DEF_T2_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000169 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* flag at 20 */
170 { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* str at 21 */
Lev Walkincda6b8a2004-06-06 07:20:52 +0000171};
Lev Walkindfae9752004-09-29 13:19:37 +0000172static asn_SEQUENCE_specifics_t asn_DEF_T2_specs = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000173 sizeof(struct T2),
Lev Walkindfae9752004-09-29 13:19:37 +0000174 offsetof(struct T2, _asn_ctx),
175 asn_DEF_T2_tag2el,
Lev Walkincda6b8a2004-06-06 07:20:52 +0000176 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000177 -1, /* Start extensions */
178 -1 /* Stop extensions */
179};
Lev Walkindfae9752004-09-29 13:19:37 +0000180asn_TYPE_descriptor_t asn_DEF_T2 = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000181 "T2",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000182 "T2",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000183 SEQUENCE_free,
184 SEQUENCE_print,
Lev Walkinf15320b2004-06-03 03:38:44 +0000185 SEQUENCE_constraint,
186 SEQUENCE_decode_ber,
187 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000188 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000189 SEQUENCE_encode_xer,
Lev Walkinf15320b2004-06-03 03:38:44 +0000190 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000191 asn_DEF_T2_tags,
192 sizeof(asn_DEF_T2_tags)
193 /sizeof(asn_DEF_T2_tags[0]), /* 1 */
194 asn_DEF_T2_tags, /* Same as above */
195 sizeof(asn_DEF_T2_tags)
196 /sizeof(asn_DEF_T2_tags[0]), /* 1 */
197 asn_MBR_T2,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000198 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000199 &asn_DEF_T2_specs /* Additional specs */
Lev Walkinf15320b2004-06-03 03:38:44 +0000200};
201