blob: 5319d50e5e0c28177799a4c6f48e352ffd152ad6 [file] [log] [blame]
Lev Walkin906654e2004-09-10 15:49:15 +00001
2/*** <<< INCLUDES [T1] >>> ***/
3
4#include <T2.h>
5
6/*** <<< TYPE-DECLS [T1] >>> ***/
7
8
9typedef T2_t T1_t;
10
11/*** <<< FUNC-DECLS [T1] >>> ***/
12
Lev Walkindfae9752004-09-29 13:19:37 +000013extern asn_TYPE_descriptor_t asn_DEF_T1;
Lev Walkina9cc46e2004-09-22 16:06:28 +000014asn_struct_free_f T1_free;
15asn_struct_print_f T1_print;
Lev Walkin906654e2004-09-10 15:49:15 +000016asn_constr_check_f T1_constraint;
17ber_type_decoder_f T1_decode_ber;
18der_type_encoder_f T1_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +000019xer_type_decoder_f T1_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +000020xer_type_encoder_f T1_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +000021
22/*** <<< CODE [T1] >>> ***/
23
24int
Lev Walkindfae9752004-09-29 13:19:37 +000025T1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +000026 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +000027 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +000028 td->check_constraints = asn_DEF_T2.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +000029 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +000030}
31
32/*
33 * This type is implemented using T2,
Lev Walkinc3808c12004-09-23 22:14:58 +000034 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +000035 */
36static void
Lev Walkindfae9752004-09-29 13:19:37 +000037T1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
38 td->free_struct = asn_DEF_T2.free_struct;
39 td->print_struct = asn_DEF_T2.print_struct;
40 td->ber_decoder = asn_DEF_T2.ber_decoder;
41 td->der_encoder = asn_DEF_T2.der_encoder;
42 td->xer_decoder = asn_DEF_T2.xer_decoder;
43 td->xer_encoder = asn_DEF_T2.xer_encoder;
44 td->elements = asn_DEF_T2.elements;
45 td->elements_count = asn_DEF_T2.elements_count;
46 td->specifics = asn_DEF_T2.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +000047}
48
Lev Walkina9cc46e2004-09-22 16:06:28 +000049void
Lev Walkindfae9752004-09-29 13:19:37 +000050T1_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +000051 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +000052 T1_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +000053 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +000054}
55
56int
Lev Walkindfae9752004-09-29 13:19:37 +000057T1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +000058 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
59 T1_inherit_TYPE_descriptor(td);
60 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
61}
62
Lev Walkindc06f6b2004-10-20 15:50:55 +000063asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +000064T1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +000065 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +000066 T1_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +000067 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +000068}
69
70asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +000071T1_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +000072 void *structure, int tag_mode, ber_tlv_tag_t tag,
73 asn_app_consume_bytes_f *cb, void *app_key) {
74 T1_inherit_TYPE_descriptor(td);
75 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
76}
77
Lev Walkin0ebe8b32004-10-23 13:26:56 +000078asn_dec_rval_t
79T1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
80 void **structure, const char *opt_mname, void *bufptr, size_t size) {
81 T1_inherit_TYPE_descriptor(td);
82 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
83}
84
Lev Walkina9cc46e2004-09-22 16:06:28 +000085asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +000086T1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +000087 int ilevel, enum xer_encoder_flags_e flags,
88 asn_app_consume_bytes_f *cb, void *app_key) {
89 T1_inherit_TYPE_descriptor(td);
90 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +000091}
92
93
94/*** <<< STAT-DEFS [T1] >>> ***/
95
Lev Walkindfae9752004-09-29 13:19:37 +000096static ber_tlv_tag_t asn_DEF_T1_tags[] = {
Lev Walkin906654e2004-09-10 15:49:15 +000097 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
98 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
99 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
100 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
101};
Lev Walkindfae9752004-09-29 13:19:37 +0000102static ber_tlv_tag_t asn_DEF_T1_all_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000103 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
104 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
105 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
106 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
107 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
Lev Walkin2888f272004-09-14 12:46:58 +0000108 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
Lev Walkin188ed2c2004-09-13 08:31:01 +0000109};
Lev Walkindfae9752004-09-29 13:19:37 +0000110asn_TYPE_descriptor_t asn_DEF_T1 = {
Lev Walkin906654e2004-09-10 15:49:15 +0000111 "T1",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000112 "T1",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000113 T1_free,
114 T1_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000115 T1_constraint,
116 T1_decode_ber,
117 T1_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000118 T1_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000119 T1_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000120 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000121 asn_DEF_T1_tags,
122 sizeof(asn_DEF_T1_tags)
123 /sizeof(asn_DEF_T1_tags[0]), /* 4 */
124 asn_DEF_T1_all_tags,
125 sizeof(asn_DEF_T1_all_tags)
126 /sizeof(asn_DEF_T1_all_tags[0]), /* 6 */
Lev Walkin906654e2004-09-10 15:49:15 +0000127 0, 0, /* No members */
128 0 /* No specifics */
129};
130
131
132/*** <<< INCLUDES [T2] >>> ***/
133
134#include <T3.h>
135
136/*** <<< TYPE-DECLS [T2] >>> ***/
137
138
139typedef T3_t T2_t;
140
141/*** <<< FUNC-DECLS [T2] >>> ***/
142
Lev Walkindfae9752004-09-29 13:19:37 +0000143extern asn_TYPE_descriptor_t asn_DEF_T2;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000144asn_struct_free_f T2_free;
145asn_struct_print_f T2_print;
Lev Walkin906654e2004-09-10 15:49:15 +0000146asn_constr_check_f T2_constraint;
147ber_type_decoder_f T2_decode_ber;
148der_type_encoder_f T2_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000149xer_type_decoder_f T2_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000150xer_type_encoder_f T2_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +0000151
152/*** <<< CODE [T2] >>> ***/
153
154int
Lev Walkindfae9752004-09-29 13:19:37 +0000155T2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000156 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000157 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000158 td->check_constraints = asn_DEF_T3.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000159 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000160}
161
162/*
163 * This type is implemented using T3,
Lev Walkinc3808c12004-09-23 22:14:58 +0000164 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +0000165 */
166static void
Lev Walkindfae9752004-09-29 13:19:37 +0000167T2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
168 td->free_struct = asn_DEF_T3.free_struct;
169 td->print_struct = asn_DEF_T3.print_struct;
170 td->ber_decoder = asn_DEF_T3.ber_decoder;
171 td->der_encoder = asn_DEF_T3.der_encoder;
172 td->xer_decoder = asn_DEF_T3.xer_decoder;
173 td->xer_encoder = asn_DEF_T3.xer_encoder;
174 td->elements = asn_DEF_T3.elements;
175 td->elements_count = asn_DEF_T3.elements_count;
176 td->specifics = asn_DEF_T3.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +0000177}
178
Lev Walkina9cc46e2004-09-22 16:06:28 +0000179void
Lev Walkindfae9752004-09-29 13:19:37 +0000180T2_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000181 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +0000182 T2_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000183 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +0000184}
185
186int
Lev Walkindfae9752004-09-29 13:19:37 +0000187T2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000188 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
189 T2_inherit_TYPE_descriptor(td);
190 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
191}
192
Lev Walkindc06f6b2004-10-20 15:50:55 +0000193asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000194T2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000195 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +0000196 T2_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000197 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000198}
199
200asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000201T2_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000202 void *structure, int tag_mode, ber_tlv_tag_t tag,
203 asn_app_consume_bytes_f *cb, void *app_key) {
204 T2_inherit_TYPE_descriptor(td);
205 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
206}
207
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000208asn_dec_rval_t
209T2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
210 void **structure, const char *opt_mname, void *bufptr, size_t size) {
211 T2_inherit_TYPE_descriptor(td);
212 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
213}
214
Lev Walkina9cc46e2004-09-22 16:06:28 +0000215asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000216T2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000217 int ilevel, enum xer_encoder_flags_e flags,
218 asn_app_consume_bytes_f *cb, void *app_key) {
219 T2_inherit_TYPE_descriptor(td);
220 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000221}
222
223
224/*** <<< STAT-DEFS [T2] >>> ***/
225
Lev Walkindfae9752004-09-29 13:19:37 +0000226static ber_tlv_tag_t asn_DEF_T2_tags[] = {
Lev Walkin906654e2004-09-10 15:49:15 +0000227 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
228 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
229 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
230};
Lev Walkindfae9752004-09-29 13:19:37 +0000231static ber_tlv_tag_t asn_DEF_T2_all_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000232 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
233 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
234 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
235 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
Lev Walkin2888f272004-09-14 12:46:58 +0000236 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
Lev Walkin188ed2c2004-09-13 08:31:01 +0000237};
Lev Walkindfae9752004-09-29 13:19:37 +0000238asn_TYPE_descriptor_t asn_DEF_T2 = {
Lev Walkin906654e2004-09-10 15:49:15 +0000239 "T2",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000240 "T2",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000241 T2_free,
242 T2_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000243 T2_constraint,
244 T2_decode_ber,
245 T2_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000246 T2_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000247 T2_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000248 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000249 asn_DEF_T2_tags,
250 sizeof(asn_DEF_T2_tags)
251 /sizeof(asn_DEF_T2_tags[0]), /* 3 */
252 asn_DEF_T2_all_tags,
253 sizeof(asn_DEF_T2_all_tags)
254 /sizeof(asn_DEF_T2_all_tags[0]), /* 5 */
Lev Walkin906654e2004-09-10 15:49:15 +0000255 0, 0, /* No members */
256 0 /* No specifics */
257};
258
259
260/*** <<< INCLUDES [T3] >>> ***/
261
262#include <T4.h>
263
264/*** <<< TYPE-DECLS [T3] >>> ***/
265
266
267typedef T4_t T3_t;
268
269/*** <<< FUNC-DECLS [T3] >>> ***/
270
Lev Walkindfae9752004-09-29 13:19:37 +0000271extern asn_TYPE_descriptor_t asn_DEF_T3;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000272asn_struct_free_f T3_free;
273asn_struct_print_f T3_print;
Lev Walkin906654e2004-09-10 15:49:15 +0000274asn_constr_check_f T3_constraint;
275ber_type_decoder_f T3_decode_ber;
276der_type_encoder_f T3_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000277xer_type_decoder_f T3_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000278xer_type_encoder_f T3_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +0000279
280/*** <<< CODE [T3] >>> ***/
281
282int
Lev Walkindfae9752004-09-29 13:19:37 +0000283T3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000284 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000285 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000286 td->check_constraints = asn_DEF_T4.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000287 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000288}
289
290/*
291 * This type is implemented using T4,
Lev Walkinc3808c12004-09-23 22:14:58 +0000292 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +0000293 */
294static void
Lev Walkindfae9752004-09-29 13:19:37 +0000295T3_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
296 td->free_struct = asn_DEF_T4.free_struct;
297 td->print_struct = asn_DEF_T4.print_struct;
298 td->ber_decoder = asn_DEF_T4.ber_decoder;
299 td->der_encoder = asn_DEF_T4.der_encoder;
300 td->xer_decoder = asn_DEF_T4.xer_decoder;
301 td->xer_encoder = asn_DEF_T4.xer_encoder;
302 td->elements = asn_DEF_T4.elements;
303 td->elements_count = asn_DEF_T4.elements_count;
304 td->specifics = asn_DEF_T4.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +0000305}
306
Lev Walkina9cc46e2004-09-22 16:06:28 +0000307void
Lev Walkindfae9752004-09-29 13:19:37 +0000308T3_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000309 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +0000310 T3_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000311 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +0000312}
313
314int
Lev Walkindfae9752004-09-29 13:19:37 +0000315T3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000316 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
317 T3_inherit_TYPE_descriptor(td);
318 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
319}
320
Lev Walkindc06f6b2004-10-20 15:50:55 +0000321asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000322T3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000323 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +0000324 T3_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000325 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000326}
327
328asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000329T3_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000330 void *structure, int tag_mode, ber_tlv_tag_t tag,
331 asn_app_consume_bytes_f *cb, void *app_key) {
332 T3_inherit_TYPE_descriptor(td);
333 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
334}
335
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000336asn_dec_rval_t
337T3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
338 void **structure, const char *opt_mname, void *bufptr, size_t size) {
339 T3_inherit_TYPE_descriptor(td);
340 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
341}
342
Lev Walkina9cc46e2004-09-22 16:06:28 +0000343asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000344T3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000345 int ilevel, enum xer_encoder_flags_e flags,
346 asn_app_consume_bytes_f *cb, void *app_key) {
347 T3_inherit_TYPE_descriptor(td);
348 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000349}
350
351
352/*** <<< STAT-DEFS [T3] >>> ***/
353
Lev Walkindfae9752004-09-29 13:19:37 +0000354static ber_tlv_tag_t asn_DEF_T3_tags[] = {
Lev Walkin906654e2004-09-10 15:49:15 +0000355 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
356 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
357};
Lev Walkindfae9752004-09-29 13:19:37 +0000358static ber_tlv_tag_t asn_DEF_T3_all_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000359 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
360 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
361 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
Lev Walkin2888f272004-09-14 12:46:58 +0000362 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
Lev Walkin188ed2c2004-09-13 08:31:01 +0000363};
Lev Walkindfae9752004-09-29 13:19:37 +0000364asn_TYPE_descriptor_t asn_DEF_T3 = {
Lev Walkin906654e2004-09-10 15:49:15 +0000365 "T3",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000366 "T3",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000367 T3_free,
368 T3_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000369 T3_constraint,
370 T3_decode_ber,
371 T3_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000372 T3_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000373 T3_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000374 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000375 asn_DEF_T3_tags,
376 sizeof(asn_DEF_T3_tags)
377 /sizeof(asn_DEF_T3_tags[0]), /* 2 */
378 asn_DEF_T3_all_tags,
379 sizeof(asn_DEF_T3_all_tags)
380 /sizeof(asn_DEF_T3_all_tags[0]), /* 4 */
Lev Walkin906654e2004-09-10 15:49:15 +0000381 0, 0, /* No members */
382 0 /* No specifics */
383};
384
385
386/*** <<< INCLUDES [T4] >>> ***/
387
388#include <T5.h>
389
390/*** <<< TYPE-DECLS [T4] >>> ***/
391
392
393typedef T5_t T4_t;
394
395/*** <<< FUNC-DECLS [T4] >>> ***/
396
Lev Walkindfae9752004-09-29 13:19:37 +0000397extern asn_TYPE_descriptor_t asn_DEF_T4;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000398asn_struct_free_f T4_free;
399asn_struct_print_f T4_print;
Lev Walkin906654e2004-09-10 15:49:15 +0000400asn_constr_check_f T4_constraint;
401ber_type_decoder_f T4_decode_ber;
402der_type_encoder_f T4_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000403xer_type_decoder_f T4_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000404xer_type_encoder_f T4_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +0000405
406/*** <<< CODE [T4] >>> ***/
407
408int
Lev Walkindfae9752004-09-29 13:19:37 +0000409T4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000410 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000411 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000412 td->check_constraints = asn_DEF_T5.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000413 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000414}
415
416/*
417 * This type is implemented using T5,
Lev Walkinc3808c12004-09-23 22:14:58 +0000418 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +0000419 */
420static void
Lev Walkindfae9752004-09-29 13:19:37 +0000421T4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
422 td->free_struct = asn_DEF_T5.free_struct;
423 td->print_struct = asn_DEF_T5.print_struct;
424 td->ber_decoder = asn_DEF_T5.ber_decoder;
425 td->der_encoder = asn_DEF_T5.der_encoder;
426 td->xer_decoder = asn_DEF_T5.xer_decoder;
427 td->xer_encoder = asn_DEF_T5.xer_encoder;
428 td->elements = asn_DEF_T5.elements;
429 td->elements_count = asn_DEF_T5.elements_count;
430 td->specifics = asn_DEF_T5.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +0000431}
432
Lev Walkina9cc46e2004-09-22 16:06:28 +0000433void
Lev Walkindfae9752004-09-29 13:19:37 +0000434T4_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000435 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +0000436 T4_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000437 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +0000438}
439
440int
Lev Walkindfae9752004-09-29 13:19:37 +0000441T4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000442 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
443 T4_inherit_TYPE_descriptor(td);
444 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
445}
446
Lev Walkindc06f6b2004-10-20 15:50:55 +0000447asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000448T4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000449 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +0000450 T4_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000451 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000452}
453
454asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000455T4_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000456 void *structure, int tag_mode, ber_tlv_tag_t tag,
457 asn_app_consume_bytes_f *cb, void *app_key) {
458 T4_inherit_TYPE_descriptor(td);
459 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
460}
461
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000462asn_dec_rval_t
463T4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
464 void **structure, const char *opt_mname, void *bufptr, size_t size) {
465 T4_inherit_TYPE_descriptor(td);
466 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
467}
468
Lev Walkina9cc46e2004-09-22 16:06:28 +0000469asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000470T4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000471 int ilevel, enum xer_encoder_flags_e flags,
472 asn_app_consume_bytes_f *cb, void *app_key) {
473 T4_inherit_TYPE_descriptor(td);
474 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000475}
476
477
478/*** <<< STAT-DEFS [T4] >>> ***/
479
Lev Walkindfae9752004-09-29 13:19:37 +0000480static ber_tlv_tag_t asn_DEF_T4_tags[] = {
Lev Walkin906654e2004-09-10 15:49:15 +0000481 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
Lev Walkin188ed2c2004-09-13 08:31:01 +0000482 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
Lev Walkin2888f272004-09-14 12:46:58 +0000483 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
Lev Walkin906654e2004-09-10 15:49:15 +0000484};
Lev Walkindfae9752004-09-29 13:19:37 +0000485asn_TYPE_descriptor_t asn_DEF_T4 = {
Lev Walkin906654e2004-09-10 15:49:15 +0000486 "T4",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000487 "T4",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000488 T4_free,
489 T4_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000490 T4_constraint,
491 T4_decode_ber,
492 T4_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000493 T4_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000494 T4_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000495 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000496 asn_DEF_T4_tags,
497 sizeof(asn_DEF_T4_tags)
498 /sizeof(asn_DEF_T4_tags[0]) - 1, /* 2 */
499 asn_DEF_T4_tags, /* Same as above */
500 sizeof(asn_DEF_T4_tags)
501 /sizeof(asn_DEF_T4_tags[0]), /* 3 */
Lev Walkin906654e2004-09-10 15:49:15 +0000502 0, 0, /* No members */
503 0 /* No specifics */
504};
505
506
507/*** <<< INCLUDES [T5] >>> ***/
508
509#include <T6.h>
510
511/*** <<< TYPE-DECLS [T5] >>> ***/
512
513
514typedef T6_t T5_t;
515
516/*** <<< FUNC-DECLS [T5] >>> ***/
517
Lev Walkindfae9752004-09-29 13:19:37 +0000518extern asn_TYPE_descriptor_t asn_DEF_T5;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000519asn_struct_free_f T5_free;
520asn_struct_print_f T5_print;
Lev Walkin906654e2004-09-10 15:49:15 +0000521asn_constr_check_f T5_constraint;
522ber_type_decoder_f T5_decode_ber;
523der_type_encoder_f T5_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000524xer_type_decoder_f T5_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000525xer_type_encoder_f T5_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +0000526
527/*** <<< CODE [T5] >>> ***/
528
529int
Lev Walkindfae9752004-09-29 13:19:37 +0000530T5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000531 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000532 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000533 td->check_constraints = asn_DEF_T6.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000534 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000535}
536
537/*
538 * This type is implemented using T6,
Lev Walkinc3808c12004-09-23 22:14:58 +0000539 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +0000540 */
541static void
Lev Walkindfae9752004-09-29 13:19:37 +0000542T5_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
543 td->free_struct = asn_DEF_T6.free_struct;
544 td->print_struct = asn_DEF_T6.print_struct;
545 td->ber_decoder = asn_DEF_T6.ber_decoder;
546 td->der_encoder = asn_DEF_T6.der_encoder;
547 td->xer_decoder = asn_DEF_T6.xer_decoder;
548 td->xer_encoder = asn_DEF_T6.xer_encoder;
549 td->elements = asn_DEF_T6.elements;
550 td->elements_count = asn_DEF_T6.elements_count;
551 td->specifics = asn_DEF_T6.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +0000552}
553
Lev Walkina9cc46e2004-09-22 16:06:28 +0000554void
Lev Walkindfae9752004-09-29 13:19:37 +0000555T5_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000556 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +0000557 T5_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000558 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +0000559}
560
561int
Lev Walkindfae9752004-09-29 13:19:37 +0000562T5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000563 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
564 T5_inherit_TYPE_descriptor(td);
565 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
566}
567
Lev Walkindc06f6b2004-10-20 15:50:55 +0000568asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000569T5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000570 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +0000571 T5_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000572 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000573}
574
575asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000576T5_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000577 void *structure, int tag_mode, ber_tlv_tag_t tag,
578 asn_app_consume_bytes_f *cb, void *app_key) {
579 T5_inherit_TYPE_descriptor(td);
580 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
581}
582
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000583asn_dec_rval_t
584T5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
585 void **structure, const char *opt_mname, void *bufptr, size_t size) {
586 T5_inherit_TYPE_descriptor(td);
587 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
588}
589
Lev Walkina9cc46e2004-09-22 16:06:28 +0000590asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000591T5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000592 int ilevel, enum xer_encoder_flags_e flags,
593 asn_app_consume_bytes_f *cb, void *app_key) {
594 T5_inherit_TYPE_descriptor(td);
595 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000596}
597
598
599/*** <<< STAT-DEFS [T5] >>> ***/
600
Lev Walkindfae9752004-09-29 13:19:37 +0000601static ber_tlv_tag_t asn_DEF_T5_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000602 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
Lev Walkin2888f272004-09-14 12:46:58 +0000603 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
Lev Walkin906654e2004-09-10 15:49:15 +0000604};
Lev Walkindfae9752004-09-29 13:19:37 +0000605asn_TYPE_descriptor_t asn_DEF_T5 = {
Lev Walkin906654e2004-09-10 15:49:15 +0000606 "T5",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000607 "T5",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000608 T5_free,
609 T5_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000610 T5_constraint,
611 T5_decode_ber,
612 T5_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000613 T5_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000614 T5_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000615 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000616 asn_DEF_T5_tags,
617 sizeof(asn_DEF_T5_tags)
618 /sizeof(asn_DEF_T5_tags[0]) - 1, /* 1 */
619 asn_DEF_T5_tags, /* Same as above */
620 sizeof(asn_DEF_T5_tags)
621 /sizeof(asn_DEF_T5_tags[0]), /* 2 */
Lev Walkin906654e2004-09-10 15:49:15 +0000622 0, 0, /* No members */
623 0 /* No specifics */
624};
625
626
627/*** <<< INCLUDES [T6] >>> ***/
628
Lev Walkin2888f272004-09-14 12:46:58 +0000629#include <REAL.h>
Lev Walkin906654e2004-09-10 15:49:15 +0000630
631/*** <<< TYPE-DECLS [T6] >>> ***/
632
633
Lev Walkin2888f272004-09-14 12:46:58 +0000634typedef REAL_t T6_t;
Lev Walkin906654e2004-09-10 15:49:15 +0000635
636/*** <<< FUNC-DECLS [T6] >>> ***/
637
Lev Walkin154aa182004-09-26 13:12:56 +0000638/* This type is equivalent to REAL */
Lev Walkindfae9752004-09-29 13:19:37 +0000639#define asn_DEF_T6 asn_DEF_REAL
Lev Walkin906654e2004-09-10 15:49:15 +0000640
641/*** <<< CODE [T6] >>> ***/
642
Lev Walkin154aa182004-09-26 13:12:56 +0000643/* This type is equivalent to REAL */
Lev Walkin906654e2004-09-10 15:49:15 +0000644
645
646/*** <<< INCLUDES [T] >>> ***/
647
648#include <Ts.h>
649
650/*** <<< TYPE-DECLS [T] >>> ***/
651
652
653typedef Ts_t T_t;
654
655/*** <<< FUNC-DECLS [T] >>> ***/
656
Lev Walkindfae9752004-09-29 13:19:37 +0000657extern asn_TYPE_descriptor_t asn_DEF_T;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000658asn_struct_free_f T_free;
659asn_struct_print_f T_print;
Lev Walkin906654e2004-09-10 15:49:15 +0000660asn_constr_check_f T_constraint;
661ber_type_decoder_f T_decode_ber;
662der_type_encoder_f T_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000663xer_type_decoder_f T_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000664xer_type_encoder_f T_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +0000665
666/*** <<< CODE [T] >>> ***/
667
668int
Lev Walkindfae9752004-09-29 13:19:37 +0000669T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000670 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000671 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000672 td->check_constraints = asn_DEF_Ts.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000673 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000674}
675
676/*
677 * This type is implemented using Ts,
Lev Walkinc3808c12004-09-23 22:14:58 +0000678 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +0000679 */
680static void
Lev Walkindfae9752004-09-29 13:19:37 +0000681T_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
682 td->free_struct = asn_DEF_Ts.free_struct;
683 td->print_struct = asn_DEF_Ts.print_struct;
684 td->ber_decoder = asn_DEF_Ts.ber_decoder;
685 td->der_encoder = asn_DEF_Ts.der_encoder;
686 td->xer_decoder = asn_DEF_Ts.xer_decoder;
687 td->xer_encoder = asn_DEF_Ts.xer_encoder;
688 td->elements = asn_DEF_Ts.elements;
689 td->elements_count = asn_DEF_Ts.elements_count;
690 td->specifics = asn_DEF_Ts.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +0000691}
692
Lev Walkina9cc46e2004-09-22 16:06:28 +0000693void
Lev Walkindfae9752004-09-29 13:19:37 +0000694T_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000695 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +0000696 T_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000697 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +0000698}
699
700int
Lev Walkindfae9752004-09-29 13:19:37 +0000701T_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000702 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
703 T_inherit_TYPE_descriptor(td);
704 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
705}
706
Lev Walkindc06f6b2004-10-20 15:50:55 +0000707asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000708T_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000709 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +0000710 T_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000711 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000712}
713
714asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000715T_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000716 void *structure, int tag_mode, ber_tlv_tag_t tag,
717 asn_app_consume_bytes_f *cb, void *app_key) {
718 T_inherit_TYPE_descriptor(td);
719 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
720}
721
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000722asn_dec_rval_t
723T_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
724 void **structure, const char *opt_mname, void *bufptr, size_t size) {
725 T_inherit_TYPE_descriptor(td);
726 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
727}
728
Lev Walkina9cc46e2004-09-22 16:06:28 +0000729asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000730T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000731 int ilevel, enum xer_encoder_flags_e flags,
732 asn_app_consume_bytes_f *cb, void *app_key) {
733 T_inherit_TYPE_descriptor(td);
734 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000735}
736
737
738/*** <<< STAT-DEFS [T] >>> ***/
739
Lev Walkindfae9752004-09-29 13:19:37 +0000740static ber_tlv_tag_t asn_DEF_T_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000741 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
742 (ASN_TAG_CLASS_CONTEXT | (123 << 2)),
743 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
Lev Walkin906654e2004-09-10 15:49:15 +0000744};
Lev Walkindfae9752004-09-29 13:19:37 +0000745asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkin906654e2004-09-10 15:49:15 +0000746 "T",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000747 "T",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000748 T_free,
749 T_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000750 T_constraint,
751 T_decode_ber,
752 T_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000753 T_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000754 T_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000755 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000756 asn_DEF_T_tags,
757 sizeof(asn_DEF_T_tags)
758 /sizeof(asn_DEF_T_tags[0]) - 2, /* 1 */
759 asn_DEF_T_tags, /* Same as above */
760 sizeof(asn_DEF_T_tags)
761 /sizeof(asn_DEF_T_tags[0]), /* 3 */
Lev Walkin906654e2004-09-10 15:49:15 +0000762 0, 0, /* Defined elsewhere */
763 0 /* No specifics */
764};
765
766
767/*** <<< INCLUDES [Ts] >>> ***/
768
769#include <T2.h>
770#include <T3.h>
771#include <constr_SEQUENCE.h>
772
773/*** <<< DEPS [Ts] >>> ***/
774
Lev Walkindfae9752004-09-29 13:19:37 +0000775extern asn_TYPE_descriptor_t asn_DEF_Ts;
Lev Walkin906654e2004-09-10 15:49:15 +0000776
777/*** <<< TYPE-DECLS [Ts] >>> ***/
778
779
780typedef struct Ts {
781 T2_t m1;
782 T3_t *m2 /* OPTIONAL */;
783 T3_t m3;
784
785 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000786 asn_struct_ctx_t _asn_ctx;
Lev Walkin906654e2004-09-10 15:49:15 +0000787} Ts_t;
788
789/*** <<< STAT-DEFS [Ts] >>> ***/
790
Lev Walkindfae9752004-09-29 13:19:37 +0000791static asn_TYPE_member_t asn_MBR_Ts[] = {
Lev Walkin906654e2004-09-10 15:49:15 +0000792 { ATF_NOFLAGS, 0, offsetof(struct Ts, m1),
793 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
794 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000795 .type = (void *)&asn_DEF_T2,
Lev Walkin906654e2004-09-10 15:49:15 +0000796 .memb_constraints = 0, /* Defer to actual type */
797 .name = "m1"
798 },
799 { ATF_POINTER, 1, offsetof(struct Ts, m2),
800 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
801 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000802 .type = (void *)&asn_DEF_T3,
Lev Walkin906654e2004-09-10 15:49:15 +0000803 .memb_constraints = 0, /* Defer to actual type */
804 .name = "m2"
805 },
806 { ATF_NOFLAGS, 0, offsetof(struct Ts, m3),
807 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
808 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000809 .type = (void *)&asn_DEF_T3,
Lev Walkin906654e2004-09-10 15:49:15 +0000810 .memb_constraints = 0, /* Defer to actual type */
811 .name = "m3"
812 },
813};
Lev Walkindfae9752004-09-29 13:19:37 +0000814static ber_tlv_tag_t asn_DEF_Ts_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000815 (ASN_TAG_CLASS_CONTEXT | (123 << 2)),
816 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
Lev Walkin906654e2004-09-10 15:49:15 +0000817};
Lev Walkindfae9752004-09-29 13:19:37 +0000818static asn_TYPE_tag2member_t asn_DEF_Ts_tag2el[] = {
Lev Walkin906654e2004-09-10 15:49:15 +0000819 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* m1 at 24 */
820 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* m2 at 25 */
821 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* m3 at 27 */
822};
Lev Walkindfae9752004-09-29 13:19:37 +0000823static asn_SEQUENCE_specifics_t asn_DEF_Ts_specs = {
Lev Walkin906654e2004-09-10 15:49:15 +0000824 sizeof(struct Ts),
Lev Walkindfae9752004-09-29 13:19:37 +0000825 offsetof(struct Ts, _asn_ctx),
826 asn_DEF_Ts_tag2el,
Lev Walkin906654e2004-09-10 15:49:15 +0000827 3, /* Count of tags in the map */
828 -1, /* Start extensions */
829 -1 /* Stop extensions */
830};
Lev Walkindfae9752004-09-29 13:19:37 +0000831asn_TYPE_descriptor_t asn_DEF_Ts = {
Lev Walkin906654e2004-09-10 15:49:15 +0000832 "Ts",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000833 "Ts",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000834 SEQUENCE_free,
835 SEQUENCE_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000836 SEQUENCE_constraint,
837 SEQUENCE_decode_ber,
838 SEQUENCE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000839 0, /* Not implemented yet */
840 SEQUENCE_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000841 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000842 asn_DEF_Ts_tags,
843 sizeof(asn_DEF_Ts_tags)
844 /sizeof(asn_DEF_Ts_tags[0]) - 1, /* 1 */
845 asn_DEF_Ts_tags, /* Same as above */
846 sizeof(asn_DEF_Ts_tags)
847 /sizeof(asn_DEF_Ts_tags[0]), /* 2 */
848 asn_MBR_Ts,
Lev Walkin906654e2004-09-10 15:49:15 +0000849 3, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000850 &asn_DEF_Ts_specs /* Additional specs */
Lev Walkin906654e2004-09-10 15:49:15 +0000851};
852