blob: b4aec3d8c97234fadefb0a7369428faf825e31d2 [file] [log] [blame]
Lev Walkin5bbff1e2004-06-28 21:13:22 +00001
Lev Walkinb47ddce2004-08-11 05:25:47 +00002/*** <<< INCLUDES [PrimitiveType] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +00003
4#include <OCTET_STRING.h>
5
6/*** <<< TYPE-DECLS [PrimitiveType] >>> ***/
7
Lev Walkin5bbff1e2004-06-28 21:13:22 +00008typedef OCTET_STRING_t PrimitiveType_t;
9
Lev Walkin5bbff1e2004-06-28 21:13:22 +000010/*** <<< FUNC-DECLS [PrimitiveType] >>> ***/
11
Lev Walkincaf0d5a2005-03-04 23:48:19 +000012extern asn_TYPE_descriptor_t asn_DEF_PrimitiveType;
13asn_struct_free_f PrimitiveType_free;
14asn_struct_print_f PrimitiveType_print;
15asn_constr_check_f PrimitiveType_constraint;
16ber_type_decoder_f PrimitiveType_decode_ber;
17der_type_encoder_f PrimitiveType_encode_der;
18xer_type_decoder_f PrimitiveType_decode_xer;
19xer_type_encoder_f PrimitiveType_encode_xer;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000020
Lev Walkin2e3055d2004-08-20 13:36:32 +000021/*** <<< CODE [PrimitiveType] >>> ***/
22
Lev Walkincaf0d5a2005-03-04 23:48:19 +000023int
24PrimitiveType_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +000025 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkincaf0d5a2005-03-04 23:48:19 +000026 /* Replace with underlying type checker */
27 td->check_constraints = asn_DEF_OCTET_STRING.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +000028 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkincaf0d5a2005-03-04 23:48:19 +000029}
30
31/*
32 * This type is implemented using OCTET_STRING,
33 * so here we adjust the DEF accordingly.
34 */
35static void
Lev Walkine8318b82005-03-06 09:29:03 +000036PrimitiveType_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkincaf0d5a2005-03-04 23:48:19 +000037 td->free_struct = asn_DEF_OCTET_STRING.free_struct;
38 td->print_struct = asn_DEF_OCTET_STRING.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -080039 td->check_constraints = asn_DEF_OCTET_STRING.check_constraints;
Lev Walkincaf0d5a2005-03-04 23:48:19 +000040 td->ber_decoder = asn_DEF_OCTET_STRING.ber_decoder;
41 td->der_encoder = asn_DEF_OCTET_STRING.der_encoder;
42 td->xer_decoder = asn_DEF_OCTET_STRING.xer_decoder;
43 td->xer_encoder = asn_DEF_OCTET_STRING.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +000044 td->uper_decoder = asn_DEF_OCTET_STRING.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000045 td->uper_encoder = asn_DEF_OCTET_STRING.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -070046 td->oer_decoder = asn_DEF_OCTET_STRING.oer_decoder;
47 td->oer_encoder = asn_DEF_OCTET_STRING.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +040048 if(!td->oer_constraints)
49 td->oer_constraints = asn_DEF_OCTET_STRING.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +000050 if(!td->per_constraints)
51 td->per_constraints = asn_DEF_OCTET_STRING.per_constraints;
Lev Walkincaf0d5a2005-03-04 23:48:19 +000052 td->elements = asn_DEF_OCTET_STRING.elements;
53 td->elements_count = asn_DEF_OCTET_STRING.elements_count;
54 td->specifics = asn_DEF_OCTET_STRING.specifics;
55}
56
57void
58PrimitiveType_free(asn_TYPE_descriptor_t *td,
59 void *struct_ptr, int contents_only) {
Lev Walkine8318b82005-03-06 09:29:03 +000060 PrimitiveType_1_inherit_TYPE_descriptor(td);
Lev Walkincaf0d5a2005-03-04 23:48:19 +000061 td->free_struct(td, struct_ptr, contents_only);
62}
63
64int
65PrimitiveType_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
66 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +000067 PrimitiveType_1_inherit_TYPE_descriptor(td);
Lev Walkincaf0d5a2005-03-04 23:48:19 +000068 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
69}
70
71asn_dec_rval_t
72PrimitiveType_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin3ebc65a2005-03-17 21:57:19 +000073 void **structure, const void *bufptr, size_t size, int tag_mode) {
Lev Walkine8318b82005-03-06 09:29:03 +000074 PrimitiveType_1_inherit_TYPE_descriptor(td);
Lev Walkincaf0d5a2005-03-04 23:48:19 +000075 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
76}
77
78asn_enc_rval_t
79PrimitiveType_encode_der(asn_TYPE_descriptor_t *td,
80 void *structure, int tag_mode, ber_tlv_tag_t tag,
81 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +000082 PrimitiveType_1_inherit_TYPE_descriptor(td);
Lev Walkincaf0d5a2005-03-04 23:48:19 +000083 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
84}
85
86asn_dec_rval_t
87PrimitiveType_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin3ebc65a2005-03-17 21:57:19 +000088 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
Lev Walkine8318b82005-03-06 09:29:03 +000089 PrimitiveType_1_inherit_TYPE_descriptor(td);
Lev Walkincaf0d5a2005-03-04 23:48:19 +000090 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
91}
92
93asn_enc_rval_t
94PrimitiveType_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
95 int ilevel, enum xer_encoder_flags_e flags,
96 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +000097 PrimitiveType_1_inherit_TYPE_descriptor(td);
Lev Walkincaf0d5a2005-03-04 23:48:19 +000098 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
99}
100
101
102/*** <<< STAT-DEFS [PrimitiveType] >>> ***/
103
Lev Walkina7591b52014-10-12 18:37:35 -0700104static const ber_tlv_tag_t asn_DEF_PrimitiveType_tags_1[] = {
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000105 (ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
106};
107asn_TYPE_descriptor_t asn_DEF_PrimitiveType = {
108 "PrimitiveType",
109 "PrimitiveType",
110 PrimitiveType_free,
111 PrimitiveType_print,
112 PrimitiveType_constraint,
113 PrimitiveType_decode_ber,
114 PrimitiveType_encode_der,
115 PrimitiveType_decode_xer,
116 PrimitiveType_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700117 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400118 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000119 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000120 asn_DEF_PrimitiveType_tags_1,
121 sizeof(asn_DEF_PrimitiveType_tags_1)
122 /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
123 asn_DEF_PrimitiveType_tags_1, /* Same as above */
124 sizeof(asn_DEF_PrimitiveType_tags_1)
125 /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400126 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000127 0, /* No PER visible constraints */
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000128 0, 0, /* No members */
129 0 /* No specifics */
130};
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000131
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000132
Lev Walkinb47ddce2004-08-11 05:25:47 +0000133/*** <<< INCLUDES [ConstructedType] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000134
Lev Walkin22b5ed42006-09-13 02:51:20 +0000135#include "PrimitiveType.h"
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000136#include <constr_SEQUENCE.h>
137
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000138/*** <<< TYPE-DECLS [ConstructedType] >>> ***/
139
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000140typedef struct ConstructedType {
141 PrimitiveType_t field;
142
143 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000144 asn_struct_ctx_t _asn_ctx;
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000145} ConstructedType_t;
146
Lev Walkinc8285712005-03-04 22:18:20 +0000147/*** <<< FUNC-DECLS [ConstructedType] >>> ***/
148
149extern asn_TYPE_descriptor_t asn_DEF_ConstructedType;
150
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000151/*** <<< STAT-DEFS [ConstructedType] >>> ***/
152
Lev Walkine0272aa2005-03-04 11:26:08 +0000153static asn_TYPE_member_t asn_MBR_ConstructedType_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000154 { ATF_NOFLAGS, 0, offsetof(struct ConstructedType, field),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000155 .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
156 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000157 .type = &asn_DEF_PrimitiveType,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000158 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400159 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000160 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
161 .default_value = 0,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000162 .name = "field"
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000163 },
164};
Lev Walkina7591b52014-10-12 18:37:35 -0700165static const ber_tlv_tag_t asn_DEF_ConstructedType_tags_1[] = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000166 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
167};
Lev Walkina7591b52014-10-12 18:37:35 -0700168static const asn_TYPE_tag2member_t asn_MAP_ConstructedType_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700169 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 } /* field */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000170};
Lev Walkin59b176e2005-11-26 11:25:14 +0000171static asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1 = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000172 sizeof(struct ConstructedType),
Lev Walkindfae9752004-09-29 13:19:37 +0000173 offsetof(struct ConstructedType, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +0000174 asn_MAP_ConstructedType_tag2el_1,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000175 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000176 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000177 -1, /* Start extensions */
178 -1 /* Stop extensions */
179};
Lev Walkindfae9752004-09-29 13:19:37 +0000180asn_TYPE_descriptor_t asn_DEF_ConstructedType = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000181 "ConstructedType",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000182 "ConstructedType",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000183 SEQUENCE_free,
184 SEQUENCE_print,
Lev Walkin5bbff1e2004-06-28 21:13:22 +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 Walkinba68c912017-07-06 07:52:39 -0700190 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400191 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000192 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000193 asn_DEF_ConstructedType_tags_1,
194 sizeof(asn_DEF_ConstructedType_tags_1)
195 /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
196 asn_DEF_ConstructedType_tags_1, /* Same as above */
197 sizeof(asn_DEF_ConstructedType_tags_1)
198 /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400199 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000200 0, /* No PER visible constraints */
Lev Walkine0272aa2005-03-04 11:26:08 +0000201 asn_MBR_ConstructedType_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000202 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000203 &asn_SPC_ConstructedType_specs_1 /* Additional specs */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000204};
205
206
Lev Walkinb47ddce2004-08-11 05:25:47 +0000207/*** <<< INCLUDES [T] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000208
Lev Walkin22b5ed42006-09-13 02:51:20 +0000209#include "ConstructedType.h"
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000210
211/*** <<< TYPE-DECLS [T] >>> ***/
212
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000213typedef ConstructedType_t T_t;
214
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000215/*** <<< FUNC-DECLS [T] >>> ***/
216
Lev Walkindfae9752004-09-29 13:19:37 +0000217extern asn_TYPE_descriptor_t asn_DEF_T;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000218asn_struct_free_f T_free;
219asn_struct_print_f T_print;
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000220asn_constr_check_f T_constraint;
221ber_type_decoder_f T_decode_ber;
222der_type_encoder_f T_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000223xer_type_decoder_f T_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000224xer_type_encoder_f T_encode_xer;
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000225
Lev Walkin2e3055d2004-08-20 13:36:32 +0000226/*** <<< CODE [T] >>> ***/
227
228int
Lev Walkindfae9752004-09-29 13:19:37 +0000229T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000230 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000231 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000232 td->check_constraints = asn_DEF_ConstructedType.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +0000233 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000234}
235
236/*
237 * This type is implemented using ConstructedType,
Lev Walkinc3808c12004-09-23 22:14:58 +0000238 * so here we adjust the DEF accordingly.
Lev Walkin2e3055d2004-08-20 13:36:32 +0000239 */
240static void
Lev Walkine8318b82005-03-06 09:29:03 +0000241T_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkindfae9752004-09-29 13:19:37 +0000242 td->free_struct = asn_DEF_ConstructedType.free_struct;
243 td->print_struct = asn_DEF_ConstructedType.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800244 td->check_constraints = asn_DEF_ConstructedType.check_constraints;
Lev Walkindfae9752004-09-29 13:19:37 +0000245 td->ber_decoder = asn_DEF_ConstructedType.ber_decoder;
246 td->der_encoder = asn_DEF_ConstructedType.der_encoder;
247 td->xer_decoder = asn_DEF_ConstructedType.xer_decoder;
248 td->xer_encoder = asn_DEF_ConstructedType.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000249 td->uper_decoder = asn_DEF_ConstructedType.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000250 td->uper_encoder = asn_DEF_ConstructedType.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700251 td->oer_decoder = asn_DEF_ConstructedType.oer_decoder;
252 td->oer_encoder = asn_DEF_ConstructedType.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400253 if(!td->oer_constraints)
254 td->oer_constraints = asn_DEF_ConstructedType.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +0000255 if(!td->per_constraints)
256 td->per_constraints = asn_DEF_ConstructedType.per_constraints;
Lev Walkindfae9752004-09-29 13:19:37 +0000257 td->elements = asn_DEF_ConstructedType.elements;
258 td->elements_count = asn_DEF_ConstructedType.elements_count;
259 td->specifics = asn_DEF_ConstructedType.specifics;
Lev Walkin2e3055d2004-08-20 13:36:32 +0000260}
261
Lev Walkina9cc46e2004-09-22 16:06:28 +0000262void
Lev Walkindfae9752004-09-29 13:19:37 +0000263T_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000264 void *struct_ptr, int contents_only) {
Lev Walkine8318b82005-03-06 09:29:03 +0000265 T_1_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000266 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000267}
268
269int
Lev Walkindfae9752004-09-29 13:19:37 +0000270T_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000271 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +0000272 T_1_inherit_TYPE_descriptor(td);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000273 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
274}
275
Lev Walkindc06f6b2004-10-20 15:50:55 +0000276asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000277T_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin3ebc65a2005-03-17 21:57:19 +0000278 void **structure, const void *bufptr, size_t size, int tag_mode) {
Lev Walkine8318b82005-03-06 09:29:03 +0000279 T_1_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000280 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000281}
282
283asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000284T_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000285 void *structure, int tag_mode, ber_tlv_tag_t tag,
286 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +0000287 T_1_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000288 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
289}
290
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000291asn_dec_rval_t
292T_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin3ebc65a2005-03-17 21:57:19 +0000293 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
Lev Walkine8318b82005-03-06 09:29:03 +0000294 T_1_inherit_TYPE_descriptor(td);
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000295 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
296}
297
Lev Walkina9cc46e2004-09-22 16:06:28 +0000298asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000299T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000300 int ilevel, enum xer_encoder_flags_e flags,
301 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +0000302 T_1_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000303 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000304}
305
306
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000307/*** <<< STAT-DEFS [T] >>> ***/
308
Lev Walkina7591b52014-10-12 18:37:35 -0700309static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000310 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
311 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000312};
Lev Walkindfae9752004-09-29 13:19:37 +0000313asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000314 "T",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000315 "T",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000316 T_free,
317 T_print,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000318 T_constraint,
319 T_decode_ber,
320 T_encode_der,
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000321 T_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000322 T_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700323 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400324 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000325 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000326 asn_DEF_T_tags_1,
327 sizeof(asn_DEF_T_tags_1)
328 /sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */
329 asn_DEF_T_tags_1, /* Same as above */
330 sizeof(asn_DEF_T_tags_1)
331 /sizeof(asn_DEF_T_tags_1[0]), /* 2 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400332 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000333 0, /* No PER visible constraints */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000334 0, 0, /* Defined elsewhere */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000335 0 /* No specifics */
336};
337