blob: 6a35789bb4add26f7dee098fd558c0c5d17cf62c [file] [log] [blame]
Lev Walkin2888f272004-09-14 12:46:58 +00001
2/*** <<< INCLUDES [T1] >>> ***/
3
4#include <T2.h>
5
6/*** <<< TYPE-DECLS [T1] >>> ***/
7
Lev Walkin2888f272004-09-14 12:46:58 +00008typedef T2_t T1_t;
9
10/*** <<< FUNC-DECLS [T1] >>> ***/
11
Lev Walkindfae9752004-09-29 13:19:37 +000012extern asn_TYPE_descriptor_t asn_DEF_T1;
Lev Walkina9cc46e2004-09-22 16:06:28 +000013asn_struct_free_f T1_free;
14asn_struct_print_f T1_print;
Lev Walkin2888f272004-09-14 12:46:58 +000015asn_constr_check_f T1_constraint;
16ber_type_decoder_f T1_decode_ber;
17der_type_encoder_f T1_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +000018xer_type_decoder_f T1_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +000019xer_type_encoder_f T1_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +000020
21/*** <<< CODE [T1] >>> ***/
22
23int
Lev Walkindfae9752004-09-29 13:19:37 +000024T1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +000025 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +000026 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +000027 td->check_constraints = asn_DEF_T2.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +000028 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +000029}
30
31/*
32 * This type is implemented using T2,
Lev Walkinc3808c12004-09-23 22:14:58 +000033 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +000034 */
35static void
Lev Walkine0272aa2005-03-04 11:26:08 +000036T1_0_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkindfae9752004-09-29 13:19:37 +000037 td->free_struct = asn_DEF_T2.free_struct;
38 td->print_struct = asn_DEF_T2.print_struct;
39 td->ber_decoder = asn_DEF_T2.ber_decoder;
40 td->der_encoder = asn_DEF_T2.der_encoder;
41 td->xer_decoder = asn_DEF_T2.xer_decoder;
42 td->xer_encoder = asn_DEF_T2.xer_encoder;
43 td->elements = asn_DEF_T2.elements;
44 td->elements_count = asn_DEF_T2.elements_count;
45 td->specifics = asn_DEF_T2.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +000046}
47
Lev Walkina9cc46e2004-09-22 16:06:28 +000048void
Lev Walkindfae9752004-09-29 13:19:37 +000049T1_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +000050 void *struct_ptr, int contents_only) {
Lev Walkine0272aa2005-03-04 11:26:08 +000051 T1_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +000052 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +000053}
54
55int
Lev Walkindfae9752004-09-29 13:19:37 +000056T1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +000057 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +000058 T1_0_inherit_TYPE_descriptor(td);
Lev Walkin2888f272004-09-14 12:46:58 +000059 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
60}
61
Lev Walkindc06f6b2004-10-20 15:50:55 +000062asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +000063T1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +000064 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkine0272aa2005-03-04 11:26:08 +000065 T1_0_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +000066 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +000067}
68
69asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +000070T1_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +000071 void *structure, int tag_mode, ber_tlv_tag_t tag,
72 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +000073 T1_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +000074 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
75}
76
Lev Walkin0ebe8b32004-10-23 13:26:56 +000077asn_dec_rval_t
78T1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
79 void **structure, const char *opt_mname, void *bufptr, size_t size) {
Lev Walkine0272aa2005-03-04 11:26:08 +000080 T1_0_inherit_TYPE_descriptor(td);
Lev Walkin0ebe8b32004-10-23 13:26:56 +000081 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
82}
83
Lev Walkina9cc46e2004-09-22 16:06:28 +000084asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +000085T1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +000086 int ilevel, enum xer_encoder_flags_e flags,
87 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +000088 T1_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +000089 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +000090}
91
92
93/*** <<< STAT-DEFS [T1] >>> ***/
94
Lev Walkine0272aa2005-03-04 11:26:08 +000095static ber_tlv_tag_t asn_DEF_T1_0_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +000096 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
97 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
98 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
99 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
100};
Lev Walkine0272aa2005-03-04 11:26:08 +0000101static ber_tlv_tag_t asn_DEF_T1_0_all_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000102 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
103 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
104 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
105 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
106 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
107 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
108};
Lev Walkindfae9752004-09-29 13:19:37 +0000109asn_TYPE_descriptor_t asn_DEF_T1 = {
Lev Walkin2888f272004-09-14 12:46:58 +0000110 "T1",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000111 "T1",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000112 T1_free,
113 T1_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000114 T1_constraint,
115 T1_decode_ber,
116 T1_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000117 T1_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000118 T1_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000119 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000120 asn_DEF_T1_0_tags,
121 sizeof(asn_DEF_T1_0_tags)
122 /sizeof(asn_DEF_T1_0_tags[0]), /* 4 */
123 asn_DEF_T1_0_all_tags,
124 sizeof(asn_DEF_T1_0_all_tags)
125 /sizeof(asn_DEF_T1_0_all_tags[0]), /* 6 */
Lev Walkin2888f272004-09-14 12:46:58 +0000126 0, 0, /* No members */
127 0 /* No specifics */
128};
129
130
131/*** <<< INCLUDES [T2] >>> ***/
132
133#include <T3.h>
134
135/*** <<< TYPE-DECLS [T2] >>> ***/
136
Lev Walkin2888f272004-09-14 12:46:58 +0000137typedef T3_t T2_t;
138
139/*** <<< FUNC-DECLS [T2] >>> ***/
140
Lev Walkindfae9752004-09-29 13:19:37 +0000141extern asn_TYPE_descriptor_t asn_DEF_T2;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000142asn_struct_free_f T2_free;
143asn_struct_print_f T2_print;
Lev Walkin2888f272004-09-14 12:46:58 +0000144asn_constr_check_f T2_constraint;
145ber_type_decoder_f T2_decode_ber;
146der_type_encoder_f T2_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000147xer_type_decoder_f T2_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000148xer_type_encoder_f T2_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +0000149
150/*** <<< CODE [T2] >>> ***/
151
152int
Lev Walkindfae9752004-09-29 13:19:37 +0000153T2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000154 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000155 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000156 td->check_constraints = asn_DEF_T3.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000157 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000158}
159
160/*
161 * This type is implemented using T3,
Lev Walkinc3808c12004-09-23 22:14:58 +0000162 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +0000163 */
164static void
Lev Walkine0272aa2005-03-04 11:26:08 +0000165T2_0_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkindfae9752004-09-29 13:19:37 +0000166 td->free_struct = asn_DEF_T3.free_struct;
167 td->print_struct = asn_DEF_T3.print_struct;
168 td->ber_decoder = asn_DEF_T3.ber_decoder;
169 td->der_encoder = asn_DEF_T3.der_encoder;
170 td->xer_decoder = asn_DEF_T3.xer_decoder;
171 td->xer_encoder = asn_DEF_T3.xer_encoder;
172 td->elements = asn_DEF_T3.elements;
173 td->elements_count = asn_DEF_T3.elements_count;
174 td->specifics = asn_DEF_T3.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +0000175}
176
Lev Walkina9cc46e2004-09-22 16:06:28 +0000177void
Lev Walkindfae9752004-09-29 13:19:37 +0000178T2_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000179 void *struct_ptr, int contents_only) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000180 T2_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000181 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +0000182}
183
184int
Lev Walkindfae9752004-09-29 13:19:37 +0000185T2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000186 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000187 T2_0_inherit_TYPE_descriptor(td);
Lev Walkin2888f272004-09-14 12:46:58 +0000188 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
189}
190
Lev Walkindc06f6b2004-10-20 15:50:55 +0000191asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000192T2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000193 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000194 T2_0_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000195 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000196}
197
198asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000199T2_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000200 void *structure, int tag_mode, ber_tlv_tag_t tag,
201 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000202 T2_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000203 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
204}
205
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000206asn_dec_rval_t
207T2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
208 void **structure, const char *opt_mname, void *bufptr, size_t size) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000209 T2_0_inherit_TYPE_descriptor(td);
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000210 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
211}
212
Lev Walkina9cc46e2004-09-22 16:06:28 +0000213asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000214T2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000215 int ilevel, enum xer_encoder_flags_e flags,
216 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000217 T2_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000218 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000219}
220
221
222/*** <<< STAT-DEFS [T2] >>> ***/
223
Lev Walkine0272aa2005-03-04 11:26:08 +0000224static ber_tlv_tag_t asn_DEF_T2_0_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000225 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
226 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
227 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
228};
Lev Walkine0272aa2005-03-04 11:26:08 +0000229static ber_tlv_tag_t asn_DEF_T2_0_all_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000230 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
231 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
232 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
233 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
234 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
235};
Lev Walkindfae9752004-09-29 13:19:37 +0000236asn_TYPE_descriptor_t asn_DEF_T2 = {
Lev Walkin2888f272004-09-14 12:46:58 +0000237 "T2",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000238 "T2",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000239 T2_free,
240 T2_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000241 T2_constraint,
242 T2_decode_ber,
243 T2_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000244 T2_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000245 T2_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000246 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000247 asn_DEF_T2_0_tags,
248 sizeof(asn_DEF_T2_0_tags)
249 /sizeof(asn_DEF_T2_0_tags[0]), /* 3 */
250 asn_DEF_T2_0_all_tags,
251 sizeof(asn_DEF_T2_0_all_tags)
252 /sizeof(asn_DEF_T2_0_all_tags[0]), /* 5 */
Lev Walkin2888f272004-09-14 12:46:58 +0000253 0, 0, /* No members */
254 0 /* No specifics */
255};
256
257
258/*** <<< INCLUDES [T3] >>> ***/
259
260#include <T4.h>
261
262/*** <<< TYPE-DECLS [T3] >>> ***/
263
Lev Walkin2888f272004-09-14 12:46:58 +0000264typedef T4_t T3_t;
265
266/*** <<< FUNC-DECLS [T3] >>> ***/
267
Lev Walkindfae9752004-09-29 13:19:37 +0000268extern asn_TYPE_descriptor_t asn_DEF_T3;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000269asn_struct_free_f T3_free;
270asn_struct_print_f T3_print;
Lev Walkin2888f272004-09-14 12:46:58 +0000271asn_constr_check_f T3_constraint;
272ber_type_decoder_f T3_decode_ber;
273der_type_encoder_f T3_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000274xer_type_decoder_f T3_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000275xer_type_encoder_f T3_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +0000276
277/*** <<< CODE [T3] >>> ***/
278
279int
Lev Walkindfae9752004-09-29 13:19:37 +0000280T3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000281 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000282 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000283 td->check_constraints = asn_DEF_T4.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000284 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000285}
286
287/*
288 * This type is implemented using T4,
Lev Walkinc3808c12004-09-23 22:14:58 +0000289 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +0000290 */
291static void
Lev Walkine0272aa2005-03-04 11:26:08 +0000292T3_0_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkindfae9752004-09-29 13:19:37 +0000293 td->free_struct = asn_DEF_T4.free_struct;
294 td->print_struct = asn_DEF_T4.print_struct;
295 td->ber_decoder = asn_DEF_T4.ber_decoder;
296 td->der_encoder = asn_DEF_T4.der_encoder;
297 td->xer_decoder = asn_DEF_T4.xer_decoder;
298 td->xer_encoder = asn_DEF_T4.xer_encoder;
299 td->elements = asn_DEF_T4.elements;
300 td->elements_count = asn_DEF_T4.elements_count;
301 td->specifics = asn_DEF_T4.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +0000302}
303
Lev Walkina9cc46e2004-09-22 16:06:28 +0000304void
Lev Walkindfae9752004-09-29 13:19:37 +0000305T3_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000306 void *struct_ptr, int contents_only) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000307 T3_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000308 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +0000309}
310
311int
Lev Walkindfae9752004-09-29 13:19:37 +0000312T3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000313 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000314 T3_0_inherit_TYPE_descriptor(td);
Lev Walkin2888f272004-09-14 12:46:58 +0000315 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
316}
317
Lev Walkindc06f6b2004-10-20 15:50:55 +0000318asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000319T3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000320 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000321 T3_0_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000322 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000323}
324
325asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000326T3_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000327 void *structure, int tag_mode, ber_tlv_tag_t tag,
328 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000329 T3_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000330 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
331}
332
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000333asn_dec_rval_t
334T3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
335 void **structure, const char *opt_mname, void *bufptr, size_t size) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000336 T3_0_inherit_TYPE_descriptor(td);
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000337 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
338}
339
Lev Walkina9cc46e2004-09-22 16:06:28 +0000340asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000341T3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000342 int ilevel, enum xer_encoder_flags_e flags,
343 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000344 T3_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000345 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000346}
347
348
349/*** <<< STAT-DEFS [T3] >>> ***/
350
Lev Walkine0272aa2005-03-04 11:26:08 +0000351static ber_tlv_tag_t asn_DEF_T3_0_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000352 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
353 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
354};
Lev Walkine0272aa2005-03-04 11:26:08 +0000355static ber_tlv_tag_t asn_DEF_T3_0_all_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000356 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
357 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
358 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
359 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
360};
Lev Walkindfae9752004-09-29 13:19:37 +0000361asn_TYPE_descriptor_t asn_DEF_T3 = {
Lev Walkin2888f272004-09-14 12:46:58 +0000362 "T3",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000363 "T3",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000364 T3_free,
365 T3_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000366 T3_constraint,
367 T3_decode_ber,
368 T3_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000369 T3_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000370 T3_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000371 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000372 asn_DEF_T3_0_tags,
373 sizeof(asn_DEF_T3_0_tags)
374 /sizeof(asn_DEF_T3_0_tags[0]), /* 2 */
375 asn_DEF_T3_0_all_tags,
376 sizeof(asn_DEF_T3_0_all_tags)
377 /sizeof(asn_DEF_T3_0_all_tags[0]), /* 4 */
Lev Walkin2888f272004-09-14 12:46:58 +0000378 0, 0, /* No members */
379 0 /* No specifics */
380};
381
382
383/*** <<< INCLUDES [T4] >>> ***/
384
385#include <T5.h>
386
387/*** <<< TYPE-DECLS [T4] >>> ***/
388
Lev Walkin2888f272004-09-14 12:46:58 +0000389typedef T5_t T4_t;
390
391/*** <<< FUNC-DECLS [T4] >>> ***/
392
Lev Walkindfae9752004-09-29 13:19:37 +0000393extern asn_TYPE_descriptor_t asn_DEF_T4;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000394asn_struct_free_f T4_free;
395asn_struct_print_f T4_print;
Lev Walkin2888f272004-09-14 12:46:58 +0000396asn_constr_check_f T4_constraint;
397ber_type_decoder_f T4_decode_ber;
398der_type_encoder_f T4_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000399xer_type_decoder_f T4_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000400xer_type_encoder_f T4_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +0000401
402/*** <<< CODE [T4] >>> ***/
403
404int
Lev Walkindfae9752004-09-29 13:19:37 +0000405T4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000406 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000407 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000408 td->check_constraints = asn_DEF_T5.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000409 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000410}
411
412/*
413 * This type is implemented using T5,
Lev Walkinc3808c12004-09-23 22:14:58 +0000414 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +0000415 */
416static void
Lev Walkine0272aa2005-03-04 11:26:08 +0000417T4_0_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkindfae9752004-09-29 13:19:37 +0000418 td->free_struct = asn_DEF_T5.free_struct;
419 td->print_struct = asn_DEF_T5.print_struct;
420 td->ber_decoder = asn_DEF_T5.ber_decoder;
421 td->der_encoder = asn_DEF_T5.der_encoder;
422 td->xer_decoder = asn_DEF_T5.xer_decoder;
423 td->xer_encoder = asn_DEF_T5.xer_encoder;
424 td->elements = asn_DEF_T5.elements;
425 td->elements_count = asn_DEF_T5.elements_count;
426 td->specifics = asn_DEF_T5.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +0000427}
428
Lev Walkina9cc46e2004-09-22 16:06:28 +0000429void
Lev Walkindfae9752004-09-29 13:19:37 +0000430T4_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000431 void *struct_ptr, int contents_only) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000432 T4_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000433 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +0000434}
435
436int
Lev Walkindfae9752004-09-29 13:19:37 +0000437T4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000438 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000439 T4_0_inherit_TYPE_descriptor(td);
Lev Walkin2888f272004-09-14 12:46:58 +0000440 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
441}
442
Lev Walkindc06f6b2004-10-20 15:50:55 +0000443asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000444T4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000445 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000446 T4_0_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000447 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000448}
449
450asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000451T4_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000452 void *structure, int tag_mode, ber_tlv_tag_t tag,
453 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000454 T4_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000455 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
456}
457
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000458asn_dec_rval_t
459T4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
460 void **structure, const char *opt_mname, void *bufptr, size_t size) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000461 T4_0_inherit_TYPE_descriptor(td);
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000462 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
463}
464
Lev Walkina9cc46e2004-09-22 16:06:28 +0000465asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000466T4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000467 int ilevel, enum xer_encoder_flags_e flags,
468 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000469 T4_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000470 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000471}
472
473
474/*** <<< STAT-DEFS [T4] >>> ***/
475
Lev Walkine0272aa2005-03-04 11:26:08 +0000476static ber_tlv_tag_t asn_DEF_T4_0_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000477 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
478 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
479 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
480};
Lev Walkindfae9752004-09-29 13:19:37 +0000481asn_TYPE_descriptor_t asn_DEF_T4 = {
Lev Walkin2888f272004-09-14 12:46:58 +0000482 "T4",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000483 "T4",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000484 T4_free,
485 T4_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000486 T4_constraint,
487 T4_decode_ber,
488 T4_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000489 T4_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000490 T4_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000491 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000492 asn_DEF_T4_0_tags,
493 sizeof(asn_DEF_T4_0_tags)
494 /sizeof(asn_DEF_T4_0_tags[0]) - 1, /* 2 */
495 asn_DEF_T4_0_tags, /* Same as above */
496 sizeof(asn_DEF_T4_0_tags)
497 /sizeof(asn_DEF_T4_0_tags[0]), /* 3 */
Lev Walkin2888f272004-09-14 12:46:58 +0000498 0, 0, /* No members */
499 0 /* No specifics */
500};
501
502
503/*** <<< INCLUDES [T5] >>> ***/
504
505#include <T6.h>
506
507/*** <<< TYPE-DECLS [T5] >>> ***/
508
Lev Walkin2888f272004-09-14 12:46:58 +0000509typedef T6_t T5_t;
510
511/*** <<< FUNC-DECLS [T5] >>> ***/
512
Lev Walkindfae9752004-09-29 13:19:37 +0000513extern asn_TYPE_descriptor_t asn_DEF_T5;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000514asn_struct_free_f T5_free;
515asn_struct_print_f T5_print;
Lev Walkin2888f272004-09-14 12:46:58 +0000516asn_constr_check_f T5_constraint;
517ber_type_decoder_f T5_decode_ber;
518der_type_encoder_f T5_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000519xer_type_decoder_f T5_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000520xer_type_encoder_f T5_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +0000521
522/*** <<< CODE [T5] >>> ***/
523
524int
Lev Walkindfae9752004-09-29 13:19:37 +0000525T5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000526 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000527 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000528 td->check_constraints = asn_DEF_T6.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000529 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000530}
531
532/*
533 * This type is implemented using T6,
Lev Walkinc3808c12004-09-23 22:14:58 +0000534 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +0000535 */
536static void
Lev Walkine0272aa2005-03-04 11:26:08 +0000537T5_0_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkindfae9752004-09-29 13:19:37 +0000538 td->free_struct = asn_DEF_T6.free_struct;
539 td->print_struct = asn_DEF_T6.print_struct;
540 td->ber_decoder = asn_DEF_T6.ber_decoder;
541 td->der_encoder = asn_DEF_T6.der_encoder;
542 td->xer_decoder = asn_DEF_T6.xer_decoder;
543 td->xer_encoder = asn_DEF_T6.xer_encoder;
544 td->elements = asn_DEF_T6.elements;
545 td->elements_count = asn_DEF_T6.elements_count;
546 td->specifics = asn_DEF_T6.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +0000547}
548
Lev Walkina9cc46e2004-09-22 16:06:28 +0000549void
Lev Walkindfae9752004-09-29 13:19:37 +0000550T5_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000551 void *struct_ptr, int contents_only) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000552 T5_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000553 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +0000554}
555
556int
Lev Walkindfae9752004-09-29 13:19:37 +0000557T5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000558 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000559 T5_0_inherit_TYPE_descriptor(td);
Lev Walkin2888f272004-09-14 12:46:58 +0000560 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
561}
562
Lev Walkindc06f6b2004-10-20 15:50:55 +0000563asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000564T5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000565 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000566 T5_0_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000567 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000568}
569
570asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000571T5_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000572 void *structure, int tag_mode, ber_tlv_tag_t tag,
573 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000574 T5_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000575 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
576}
577
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000578asn_dec_rval_t
579T5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
580 void **structure, const char *opt_mname, void *bufptr, size_t size) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000581 T5_0_inherit_TYPE_descriptor(td);
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000582 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
583}
584
Lev Walkina9cc46e2004-09-22 16:06:28 +0000585asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000586T5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000587 int ilevel, enum xer_encoder_flags_e flags,
588 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000589 T5_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000590 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000591}
592
593
594/*** <<< STAT-DEFS [T5] >>> ***/
595
Lev Walkine0272aa2005-03-04 11:26:08 +0000596static ber_tlv_tag_t asn_DEF_T5_0_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000597 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
598 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
599};
Lev Walkindfae9752004-09-29 13:19:37 +0000600asn_TYPE_descriptor_t asn_DEF_T5 = {
Lev Walkin2888f272004-09-14 12:46:58 +0000601 "T5",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000602 "T5",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000603 T5_free,
604 T5_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000605 T5_constraint,
606 T5_decode_ber,
607 T5_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000608 T5_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000609 T5_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000610 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000611 asn_DEF_T5_0_tags,
612 sizeof(asn_DEF_T5_0_tags)
613 /sizeof(asn_DEF_T5_0_tags[0]) - 1, /* 1 */
614 asn_DEF_T5_0_tags, /* Same as above */
615 sizeof(asn_DEF_T5_0_tags)
616 /sizeof(asn_DEF_T5_0_tags[0]), /* 2 */
Lev Walkin2888f272004-09-14 12:46:58 +0000617 0, 0, /* No members */
618 0 /* No specifics */
619};
620
621
622/*** <<< INCLUDES [T6] >>> ***/
623
624#include <NativeReal.h>
625
626/*** <<< TYPE-DECLS [T6] >>> ***/
627
Lev Walkin2888f272004-09-14 12:46:58 +0000628typedef double T6_t;
629
630/*** <<< FUNC-DECLS [T6] >>> ***/
631
Lev Walkin154aa182004-09-26 13:12:56 +0000632/* This type is equivalent to NativeReal */
Lev Walkindfae9752004-09-29 13:19:37 +0000633#define asn_DEF_T6 asn_DEF_NativeReal
Lev Walkin2888f272004-09-14 12:46:58 +0000634
635/*** <<< CODE [T6] >>> ***/
636
Lev Walkin154aa182004-09-26 13:12:56 +0000637/* This type is equivalent to NativeReal */
Lev Walkin2888f272004-09-14 12:46:58 +0000638
639
640/*** <<< INCLUDES [T] >>> ***/
641
642#include <Ts.h>
643
644/*** <<< TYPE-DECLS [T] >>> ***/
645
Lev Walkin2888f272004-09-14 12:46:58 +0000646typedef Ts_t T_t;
647
648/*** <<< FUNC-DECLS [T] >>> ***/
649
Lev Walkindfae9752004-09-29 13:19:37 +0000650extern asn_TYPE_descriptor_t asn_DEF_T;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000651asn_struct_free_f T_free;
652asn_struct_print_f T_print;
Lev Walkin2888f272004-09-14 12:46:58 +0000653asn_constr_check_f T_constraint;
654ber_type_decoder_f T_decode_ber;
655der_type_encoder_f T_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000656xer_type_decoder_f T_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000657xer_type_encoder_f T_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +0000658
659/*** <<< CODE [T] >>> ***/
660
661int
Lev Walkindfae9752004-09-29 13:19:37 +0000662T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000663 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000664 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000665 td->check_constraints = asn_DEF_Ts.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000666 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000667}
668
669/*
670 * This type is implemented using Ts,
Lev Walkinc3808c12004-09-23 22:14:58 +0000671 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +0000672 */
673static void
Lev Walkine0272aa2005-03-04 11:26:08 +0000674T_0_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkindfae9752004-09-29 13:19:37 +0000675 td->free_struct = asn_DEF_Ts.free_struct;
676 td->print_struct = asn_DEF_Ts.print_struct;
677 td->ber_decoder = asn_DEF_Ts.ber_decoder;
678 td->der_encoder = asn_DEF_Ts.der_encoder;
679 td->xer_decoder = asn_DEF_Ts.xer_decoder;
680 td->xer_encoder = asn_DEF_Ts.xer_encoder;
681 td->elements = asn_DEF_Ts.elements;
682 td->elements_count = asn_DEF_Ts.elements_count;
683 td->specifics = asn_DEF_Ts.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +0000684}
685
Lev Walkina9cc46e2004-09-22 16:06:28 +0000686void
Lev Walkindfae9752004-09-29 13:19:37 +0000687T_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000688 void *struct_ptr, int contents_only) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000689 T_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000690 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +0000691}
692
693int
Lev Walkindfae9752004-09-29 13:19:37 +0000694T_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000695 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000696 T_0_inherit_TYPE_descriptor(td);
Lev Walkin2888f272004-09-14 12:46:58 +0000697 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
698}
699
Lev Walkindc06f6b2004-10-20 15:50:55 +0000700asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000701T_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000702 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000703 T_0_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000704 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000705}
706
707asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000708T_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000709 void *structure, int tag_mode, ber_tlv_tag_t tag,
710 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000711 T_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000712 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
713}
714
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000715asn_dec_rval_t
716T_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
717 void **structure, const char *opt_mname, void *bufptr, size_t size) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000718 T_0_inherit_TYPE_descriptor(td);
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000719 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
720}
721
Lev Walkina9cc46e2004-09-22 16:06:28 +0000722asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000723T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000724 int ilevel, enum xer_encoder_flags_e flags,
725 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000726 T_0_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000727 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000728}
729
730
731/*** <<< STAT-DEFS [T] >>> ***/
732
Lev Walkine0272aa2005-03-04 11:26:08 +0000733static ber_tlv_tag_t asn_DEF_T_0_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000734 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
735 (ASN_TAG_CLASS_CONTEXT | (123 << 2)),
736 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
737};
Lev Walkindfae9752004-09-29 13:19:37 +0000738asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkin2888f272004-09-14 12:46:58 +0000739 "T",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000740 "T",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000741 T_free,
742 T_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000743 T_constraint,
744 T_decode_ber,
745 T_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000746 T_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000747 T_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000748 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000749 asn_DEF_T_0_tags,
750 sizeof(asn_DEF_T_0_tags)
751 /sizeof(asn_DEF_T_0_tags[0]) - 2, /* 1 */
752 asn_DEF_T_0_tags, /* Same as above */
753 sizeof(asn_DEF_T_0_tags)
754 /sizeof(asn_DEF_T_0_tags[0]), /* 3 */
Lev Walkin2888f272004-09-14 12:46:58 +0000755 0, 0, /* Defined elsewhere */
756 0 /* No specifics */
757};
758
759
760/*** <<< INCLUDES [Ts] >>> ***/
761
762#include <T2.h>
763#include <T3.h>
764#include <constr_SEQUENCE.h>
765
Lev Walkin2888f272004-09-14 12:46:58 +0000766/*** <<< TYPE-DECLS [Ts] >>> ***/
767
Lev Walkin2888f272004-09-14 12:46:58 +0000768typedef struct Ts {
769 T2_t m1;
770 T3_t *m2 /* OPTIONAL */;
771 T3_t m3;
772
773 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000774 asn_struct_ctx_t _asn_ctx;
Lev Walkin2888f272004-09-14 12:46:58 +0000775} Ts_t;
776
Lev Walkinc8285712005-03-04 22:18:20 +0000777/*** <<< FUNC-DECLS [Ts] >>> ***/
778
779extern asn_TYPE_descriptor_t asn_DEF_Ts;
780
Lev Walkin2888f272004-09-14 12:46:58 +0000781/*** <<< STAT-DEFS [Ts] >>> ***/
782
Lev Walkine0272aa2005-03-04 11:26:08 +0000783static asn_TYPE_member_t asn_MBR_Ts_1[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000784 { ATF_NOFLAGS, 0, offsetof(struct Ts, m1),
785 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
786 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000787 .type = (void *)&asn_DEF_T2,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000788 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2888f272004-09-14 12:46:58 +0000789 .name = "m1"
790 },
791 { ATF_POINTER, 1, offsetof(struct Ts, m2),
792 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
793 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000794 .type = (void *)&asn_DEF_T3,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000795 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2888f272004-09-14 12:46:58 +0000796 .name = "m2"
797 },
798 { ATF_NOFLAGS, 0, offsetof(struct Ts, m3),
799 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
800 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000801 .type = (void *)&asn_DEF_T3,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000802 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2888f272004-09-14 12:46:58 +0000803 .name = "m3"
804 },
805};
Lev Walkine0272aa2005-03-04 11:26:08 +0000806static ber_tlv_tag_t asn_DEF_Ts_1_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000807 (ASN_TAG_CLASS_CONTEXT | (123 << 2)),
808 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
809};
Lev Walkine0272aa2005-03-04 11:26:08 +0000810static asn_TYPE_tag2member_t asn_MAP_Ts_1_tag2el[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000811 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* m1 at 24 */
812 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* m2 at 25 */
Lev Walkin55236182005-02-25 08:24:19 +0000813 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 } /* m3 at 27 */
Lev Walkin2888f272004-09-14 12:46:58 +0000814};
Lev Walkine0272aa2005-03-04 11:26:08 +0000815static asn_SEQUENCE_specifics_t asn_SPC_Ts_1_specs = {
Lev Walkin2888f272004-09-14 12:46:58 +0000816 sizeof(struct Ts),
Lev Walkindfae9752004-09-29 13:19:37 +0000817 offsetof(struct Ts, _asn_ctx),
Lev Walkine0272aa2005-03-04 11:26:08 +0000818 asn_MAP_Ts_1_tag2el,
Lev Walkin2888f272004-09-14 12:46:58 +0000819 3, /* Count of tags in the map */
820 -1, /* Start extensions */
821 -1 /* Stop extensions */
822};
Lev Walkindfae9752004-09-29 13:19:37 +0000823asn_TYPE_descriptor_t asn_DEF_Ts = {
Lev Walkin2888f272004-09-14 12:46:58 +0000824 "Ts",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000825 "Ts",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000826 SEQUENCE_free,
827 SEQUENCE_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000828 SEQUENCE_constraint,
829 SEQUENCE_decode_ber,
830 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000831 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000832 SEQUENCE_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000833 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000834 asn_DEF_Ts_1_tags,
835 sizeof(asn_DEF_Ts_1_tags)
836 /sizeof(asn_DEF_Ts_1_tags[0]) - 1, /* 1 */
837 asn_DEF_Ts_1_tags, /* Same as above */
838 sizeof(asn_DEF_Ts_1_tags)
839 /sizeof(asn_DEF_Ts_1_tags[0]), /* 2 */
840 asn_MBR_Ts_1,
Lev Walkin2888f272004-09-14 12:46:58 +0000841 3, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000842 &asn_SPC_Ts_1_specs /* Additional specs */
Lev Walkin2888f272004-09-14 12:46:58 +0000843};
844