blob: 8334d949cc6fcb5bb1ef007a1df879481ded4ec4 [file] [log] [blame]
Lev Walkin8bb57a22007-12-03 13:41:36 +00001
2/*** <<< INCLUDES [T] >>> ***/
3
4#include <NativeInteger.h>
5#include <constr_SEQUENCE.h>
6
7/*** <<< TYPE-DECLS [T] >>> ***/
8
9typedef struct T {
10 long small32range;
11 long full32range;
12 unsigned long unsigned32;
13 unsigned long unsplit32;
14
15 /* Context for parsing across buffer boundaries */
16 asn_struct_ctx_t _asn_ctx;
17} T_t;
18
19/*** <<< FUNC-DECLS [T] >>> ***/
20
21/* extern asn_TYPE_descriptor_t asn_DEF_unsigned32_4; // (Use -fall-defs-global to expose) */
22/* extern asn_TYPE_descriptor_t asn_DEF_unsplit32_5; // (Use -fall-defs-global to expose) */
23extern asn_TYPE_descriptor_t asn_DEF_T;
24
25/*** <<< CODE [T] >>> ***/
26
27static int
28unsigned32_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
29 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +000030
31 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -070032 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +000033 "%s: value not given (%s:%d)",
34 td->name, __FILE__, __LINE__);
35 return -1;
36 }
37
Lev Walkin8bb57a22007-12-03 13:41:36 +000038
39 /* Constraint check succeeded */
40 return 0;
41}
42
43/*
44 * This type is implemented using NativeInteger,
45 * so here we adjust the DEF accordingly.
46 */
47static void
48unsigned32_4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
49 td->free_struct = asn_DEF_NativeInteger.free_struct;
50 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -080051 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +000052 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
53 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
54 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
55 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
56 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
57 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -070058 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
59 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +040060 if(!td->oer_constraints)
61 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +000062 if(!td->per_constraints)
63 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
64 td->elements = asn_DEF_NativeInteger.elements;
65 td->elements_count = asn_DEF_NativeInteger.elements_count;
66 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
67}
68
69static void
70unsigned32_4_free(asn_TYPE_descriptor_t *td,
71 void *struct_ptr, int contents_only) {
72 unsigned32_4_inherit_TYPE_descriptor(td);
73 td->free_struct(td, struct_ptr, contents_only);
74}
75
76static int
77unsigned32_4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
78 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
79 unsigned32_4_inherit_TYPE_descriptor(td);
80 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
81}
82
83static asn_dec_rval_t
84unsigned32_4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
85 void **structure, const void *bufptr, size_t size, int tag_mode) {
86 unsigned32_4_inherit_TYPE_descriptor(td);
87 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
88}
89
90static asn_enc_rval_t
91unsigned32_4_encode_der(asn_TYPE_descriptor_t *td,
92 void *structure, int tag_mode, ber_tlv_tag_t tag,
93 asn_app_consume_bytes_f *cb, void *app_key) {
94 unsigned32_4_inherit_TYPE_descriptor(td);
95 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
96}
97
98static asn_dec_rval_t
99unsigned32_4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
100 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
101 unsigned32_4_inherit_TYPE_descriptor(td);
102 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
103}
104
105static asn_enc_rval_t
106unsigned32_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
107 int ilevel, enum xer_encoder_flags_e flags,
108 asn_app_consume_bytes_f *cb, void *app_key) {
109 unsigned32_4_inherit_TYPE_descriptor(td);
110 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
111}
112
113static asn_dec_rval_t
114unsigned32_4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
115 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
116 unsigned32_4_inherit_TYPE_descriptor(td);
117 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
118}
119
120static asn_enc_rval_t
121unsigned32_4_encode_uper(asn_TYPE_descriptor_t *td,
122 asn_per_constraints_t *constraints,
123 void *structure, asn_per_outp_t *per_out) {
124 unsigned32_4_inherit_TYPE_descriptor(td);
125 return td->uper_encoder(td, constraints, structure, per_out);
126}
127
128static int
129unsplit32_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
130 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
131 unsigned long value;
132
133 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700134 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000135 "%s: value not given (%s:%d)",
136 td->name, __FILE__, __LINE__);
137 return -1;
138 }
139
140 value = *(const unsigned long *)sptr;
141
142 if(((value >= 5 && value <= 500) || (value >= 600 && value <= 4294967290))) {
143 /* Constraint check succeeded */
144 return 0;
145 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700146 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000147 "%s: constraint failed (%s:%d)",
148 td->name, __FILE__, __LINE__);
149 return -1;
150 }
151}
152
153/*
154 * This type is implemented using NativeInteger,
155 * so here we adjust the DEF accordingly.
156 */
157static void
158unsplit32_5_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
159 td->free_struct = asn_DEF_NativeInteger.free_struct;
160 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800161 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +0000162 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
163 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
164 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
165 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
166 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
167 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700168 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
169 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400170 if(!td->oer_constraints)
171 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +0000172 if(!td->per_constraints)
173 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
174 td->elements = asn_DEF_NativeInteger.elements;
175 td->elements_count = asn_DEF_NativeInteger.elements_count;
176 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
177}
178
179static void
180unsplit32_5_free(asn_TYPE_descriptor_t *td,
181 void *struct_ptr, int contents_only) {
182 unsplit32_5_inherit_TYPE_descriptor(td);
183 td->free_struct(td, struct_ptr, contents_only);
184}
185
186static int
187unsplit32_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
188 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
189 unsplit32_5_inherit_TYPE_descriptor(td);
190 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
191}
192
193static asn_dec_rval_t
194unsplit32_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
195 void **structure, const void *bufptr, size_t size, int tag_mode) {
196 unsplit32_5_inherit_TYPE_descriptor(td);
197 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
198}
199
200static asn_enc_rval_t
201unsplit32_5_encode_der(asn_TYPE_descriptor_t *td,
202 void *structure, int tag_mode, ber_tlv_tag_t tag,
203 asn_app_consume_bytes_f *cb, void *app_key) {
204 unsplit32_5_inherit_TYPE_descriptor(td);
205 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
206}
207
208static asn_dec_rval_t
209unsplit32_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
210 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
211 unsplit32_5_inherit_TYPE_descriptor(td);
212 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
213}
214
215static asn_enc_rval_t
216unsplit32_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
217 int ilevel, enum xer_encoder_flags_e flags,
218 asn_app_consume_bytes_f *cb, void *app_key) {
219 unsplit32_5_inherit_TYPE_descriptor(td);
220 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
221}
222
223static asn_dec_rval_t
224unsplit32_5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
225 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
226 unsplit32_5_inherit_TYPE_descriptor(td);
227 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
228}
229
230static asn_enc_rval_t
231unsplit32_5_encode_uper(asn_TYPE_descriptor_t *td,
232 asn_per_constraints_t *constraints,
233 void *structure, asn_per_outp_t *per_out) {
234 unsplit32_5_inherit_TYPE_descriptor(td);
235 return td->uper_encoder(td, constraints, structure, per_out);
236}
237
238static int
239memb_small32range_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
240 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
241 long value;
242
243 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700244 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000245 "%s: value not given (%s:%d)",
246 td->name, __FILE__, __LINE__);
247 return -1;
248 }
249
250 value = *(const long *)sptr;
251
252 if((value >= -2000000000 && value <= 2000000000)) {
253 /* Constraint check succeeded */
254 return 0;
255 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700256 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000257 "%s: constraint failed (%s:%d)",
258 td->name, __FILE__, __LINE__);
259 return -1;
260 }
261}
262
263static int
264memb_full32range_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
265 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
266 long value;
267
268 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700269 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000270 "%s: value not given (%s:%d)",
271 td->name, __FILE__, __LINE__);
272 return -1;
273 }
274
275 value = *(const long *)sptr;
276
277 if((value >= (-2147483647L - 1) && value <= 2147483647)) {
278 /* Constraint check succeeded */
279 return 0;
280 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700281 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000282 "%s: constraint failed (%s:%d)",
283 td->name, __FILE__, __LINE__);
284 return -1;
285 }
286}
287
288static int
289memb_unsigned32_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
290 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000291
292 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700293 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000294 "%s: value not given (%s:%d)",
295 td->name, __FILE__, __LINE__);
296 return -1;
297 }
298
Lev Walkin8bb57a22007-12-03 13:41:36 +0000299
300 /* Constraint check succeeded */
301 return 0;
302}
303
304static int
305memb_unsplit32_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
306 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
307 unsigned long value;
308
309 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700310 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000311 "%s: value not given (%s:%d)",
312 td->name, __FILE__, __LINE__);
313 return -1;
314 }
315
316 value = *(const unsigned long *)sptr;
317
318 if(((value >= 5 && value <= 500) || (value >= 600 && value <= 4294967290))) {
319 /* Constraint check succeeded */
320 return 0;
321 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700322 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000323 "%s: constraint failed (%s:%d)",
324 td->name, __FILE__, __LINE__);
325 return -1;
326 }
327}
328
329
330/*** <<< CTDEFS [T] >>> ***/
331
Lev Walkin2fce55d2013-03-28 05:00:39 -0700332static asn_per_constraints_t asn_PER_type_unsigned32_constr_4 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000333 { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */,
334 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
335 0, 0 /* No PER value map */
336};
Lev Walkin2fce55d2013-03-28 05:00:39 -0700337static asn_per_constraints_t asn_PER_type_unsplit32_constr_5 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000338 { APC_CONSTRAINED, 32, -1, 5, 4294967290 } /* (5..4294967290) */,
339 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
340 0, 0 /* No PER value map */
341};
Lev Walkin2fce55d2013-03-28 05:00:39 -0700342static asn_per_constraints_t asn_PER_memb_small32range_constr_2 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000343 { APC_CONSTRAINED, 32, -1, -2000000000, 2000000000 } /* (-2000000000..2000000000) */,
344 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
345 0, 0 /* No PER value map */
346};
Lev Walkin2fce55d2013-03-28 05:00:39 -0700347static asn_per_constraints_t asn_PER_memb_full32range_constr_3 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000348 { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */,
349 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
350 0, 0 /* No PER value map */
351};
Lev Walkin2fce55d2013-03-28 05:00:39 -0700352static asn_per_constraints_t asn_PER_memb_unsigned32_constr_4 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000353 { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */,
354 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
355 0, 0 /* No PER value map */
356};
Lev Walkin2fce55d2013-03-28 05:00:39 -0700357static asn_per_constraints_t asn_PER_memb_unsplit32_constr_5 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000358 { APC_CONSTRAINED, 32, -1, 5, 4294967290 } /* (5..4294967290) */,
359 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
360 0, 0 /* No PER value map */
361};
362
363/*** <<< STAT-DEFS [T] >>> ***/
364
johvike70c4072017-05-09 11:06:12 +0200365static asn_INTEGER_specifics_t asn_SPC_unsigned32_specs_4 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000366 0, 0, 0, 0, 0,
367 0, /* Native long size */
368 1 /* Unsigned representation */
369};
Lev Walkina7591b52014-10-12 18:37:35 -0700370static const ber_tlv_tag_t asn_DEF_unsigned32_tags_4[] = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000371 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
372 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
373};
374static /* Use -fall-defs-global to expose */
375asn_TYPE_descriptor_t asn_DEF_unsigned32_4 = {
376 "unsigned32",
377 "unsigned32",
378 unsigned32_4_free,
379 unsigned32_4_print,
380 unsigned32_4_constraint,
381 unsigned32_4_decode_ber,
382 unsigned32_4_encode_der,
383 unsigned32_4_decode_xer,
384 unsigned32_4_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400385 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000386 unsigned32_4_decode_uper,
387 unsigned32_4_encode_uper,
388 0, /* Use generic outmost tag fetcher */
389 asn_DEF_unsigned32_tags_4,
390 sizeof(asn_DEF_unsigned32_tags_4)
391 /sizeof(asn_DEF_unsigned32_tags_4[0]) - 1, /* 1 */
392 asn_DEF_unsigned32_tags_4, /* Same as above */
393 sizeof(asn_DEF_unsigned32_tags_4)
394 /sizeof(asn_DEF_unsigned32_tags_4[0]), /* 2 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400395 0, /* No OER visible constraints */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000396 &asn_PER_type_unsigned32_constr_4,
397 0, 0, /* No members */
398 &asn_SPC_unsigned32_specs_4 /* Additional specs */
399};
400
johvike70c4072017-05-09 11:06:12 +0200401static asn_INTEGER_specifics_t asn_SPC_unsplit32_specs_5 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000402 0, 0, 0, 0, 0,
403 0, /* Native long size */
404 1 /* Unsigned representation */
405};
Lev Walkina7591b52014-10-12 18:37:35 -0700406static const ber_tlv_tag_t asn_DEF_unsplit32_tags_5[] = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000407 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
408 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
409};
410static /* Use -fall-defs-global to expose */
411asn_TYPE_descriptor_t asn_DEF_unsplit32_5 = {
412 "unsplit32",
413 "unsplit32",
414 unsplit32_5_free,
415 unsplit32_5_print,
416 unsplit32_5_constraint,
417 unsplit32_5_decode_ber,
418 unsplit32_5_encode_der,
419 unsplit32_5_decode_xer,
420 unsplit32_5_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400421 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000422 unsplit32_5_decode_uper,
423 unsplit32_5_encode_uper,
424 0, /* Use generic outmost tag fetcher */
425 asn_DEF_unsplit32_tags_5,
426 sizeof(asn_DEF_unsplit32_tags_5)
427 /sizeof(asn_DEF_unsplit32_tags_5[0]) - 1, /* 1 */
428 asn_DEF_unsplit32_tags_5, /* Same as above */
429 sizeof(asn_DEF_unsplit32_tags_5)
430 /sizeof(asn_DEF_unsplit32_tags_5[0]), /* 2 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400431 0, /* No OER visible constraints */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000432 &asn_PER_type_unsplit32_constr_5,
433 0, 0, /* No members */
434 &asn_SPC_unsplit32_specs_5 /* Additional specs */
435};
436
437static asn_TYPE_member_t asn_MBR_T_1[] = {
438 { ATF_NOFLAGS, 0, offsetof(struct T, small32range),
439 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
440 .tag_mode = -1, /* IMPLICIT tag at current level */
441 .type = &asn_DEF_NativeInteger,
442 .memb_constraints = memb_small32range_constraint_1,
Lev Walkinb33425f2017-07-14 14:59:52 +0400443 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000444 .per_constraints = &asn_PER_memb_small32range_constr_2,
445 .default_value = 0,
446 .name = "small32range"
447 },
448 { ATF_NOFLAGS, 0, offsetof(struct T, full32range),
449 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
450 .tag_mode = -1, /* IMPLICIT tag at current level */
451 .type = &asn_DEF_NativeInteger,
452 .memb_constraints = memb_full32range_constraint_1,
Lev Walkinb33425f2017-07-14 14:59:52 +0400453 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000454 .per_constraints = &asn_PER_memb_full32range_constr_3,
455 .default_value = 0,
456 .name = "full32range"
457 },
458 { ATF_NOFLAGS, 0, offsetof(struct T, unsigned32),
459 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
460 .tag_mode = -1, /* IMPLICIT tag at current level */
461 .type = &asn_DEF_unsigned32_4,
462 .memb_constraints = memb_unsigned32_constraint_1,
Lev Walkinb33425f2017-07-14 14:59:52 +0400463 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000464 .per_constraints = &asn_PER_memb_unsigned32_constr_4,
465 .default_value = 0,
466 .name = "unsigned32"
467 },
468 { ATF_NOFLAGS, 0, offsetof(struct T, unsplit32),
469 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
470 .tag_mode = -1, /* IMPLICIT tag at current level */
471 .type = &asn_DEF_unsplit32_5,
472 .memb_constraints = memb_unsplit32_constraint_1,
Lev Walkinb33425f2017-07-14 14:59:52 +0400473 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000474 .per_constraints = &asn_PER_memb_unsplit32_constr_5,
475 .default_value = 0,
476 .name = "unsplit32"
477 },
478};
Lev Walkina7591b52014-10-12 18:37:35 -0700479static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000480 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
481};
Lev Walkina7591b52014-10-12 18:37:35 -0700482static const asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700483 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* small32range */
484 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* full32range */
485 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* unsigned32 */
486 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* unsplit32 */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000487};
488static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
489 sizeof(struct T),
490 offsetof(struct T, _asn_ctx),
491 asn_MAP_T_tag2el_1,
492 4, /* Count of tags in the map */
493 0, 0, 0, /* Optional elements (not needed) */
494 -1, /* Start extensions */
495 -1 /* Stop extensions */
496};
497asn_TYPE_descriptor_t asn_DEF_T = {
498 "T",
499 "T",
500 SEQUENCE_free,
501 SEQUENCE_print,
502 SEQUENCE_constraint,
503 SEQUENCE_decode_ber,
504 SEQUENCE_encode_der,
505 SEQUENCE_decode_xer,
506 SEQUENCE_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400507 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000508 SEQUENCE_decode_uper,
509 SEQUENCE_encode_uper,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000510 0, /* Use generic outmost tag fetcher */
511 asn_DEF_T_tags_1,
512 sizeof(asn_DEF_T_tags_1)
513 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
514 asn_DEF_T_tags_1, /* Same as above */
515 sizeof(asn_DEF_T_tags_1)
516 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400517 0, /* No OER visible constraints */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000518 0, /* No PER visible constraints */
519 asn_MBR_T_1,
520 4, /* Elements count */
521 &asn_SPC_T_specs_1 /* Additional specs */
522};
523