blob: 9bd39a9b2d78a24217ad6781ed13a5e962f3f766 [file] [log] [blame]
Lev Walkin171487e2006-03-21 07:25:18 +00001
2/*** <<< INCLUDES [Flag] >>> ***/
3
4#include <INTEGER.h>
5#include <constr_SEQUENCE.h>
6#include <ENUMERATED.h>
7
8/*** <<< DEPS [Flag] >>> ***/
9
10typedef enum field {
11 field_red = 0,
12 field_green = 1,
13 field_blue = 5
14} e_field;
15typedef enum field {
16 field_red = 3,
17 field_green = 4,
18 field_blue = 5
19} e_field;
20
21/*** <<< TYPE-DECLS [Flag] >>> ***/
22
23typedef struct Flag_16P0 {
24 INTEGER_t *field /* DEFAULT 5 */;
25
26 /* Context for parsing across buffer boundaries */
27 asn_struct_ctx_t _asn_ctx;
28} Flag_16P0_t;
29typedef struct Flag_16P1 {
30 ENUMERATED_t *field /* DEFAULT 5 */;
31
32 /* Context for parsing across buffer boundaries */
33 asn_struct_ctx_t _asn_ctx;
34} Flag_16P1_t;
35
36/*** <<< FUNC-DECLS [Flag] >>> ***/
37
38extern asn_TYPE_descriptor_t asn_DEF_Flag_16P0;
39/* extern asn_TYPE_descriptor_t asn_DEF_field_7; // (Use -fall-defs-global to expose) */
40extern asn_TYPE_descriptor_t asn_DEF_Flag_16P1;
41
42/*** <<< CODE [Flag] >>> ***/
43
44static int
45field_7_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +000046 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin171487e2006-03-21 07:25:18 +000047 /* Replace with underlying type checker */
48 td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +000049 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin171487e2006-03-21 07:25:18 +000050}
51
52/*
53 * This type is implemented using ENUMERATED,
54 * so here we adjust the DEF accordingly.
55 */
56static void
57field_7_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
58 td->free_struct = asn_DEF_ENUMERATED.free_struct;
59 td->print_struct = asn_DEF_ENUMERATED.print_struct;
60 td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
61 td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
62 td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
63 td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
64 td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000065 td->uper_encoder = asn_DEF_ENUMERATED.uper_encoder;
Lev Walkin171487e2006-03-21 07:25:18 +000066 if(!td->per_constraints)
67 td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
68 td->elements = asn_DEF_ENUMERATED.elements;
69 td->elements_count = asn_DEF_ENUMERATED.elements_count;
70 /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
71}
72
73static void
74field_7_free(asn_TYPE_descriptor_t *td,
75 void *struct_ptr, int contents_only) {
76 field_7_inherit_TYPE_descriptor(td);
77 td->free_struct(td, struct_ptr, contents_only);
78}
79
80static int
81field_7_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
82 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
83 field_7_inherit_TYPE_descriptor(td);
84 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
85}
86
87static asn_dec_rval_t
88field_7_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
89 void **structure, const void *bufptr, size_t size, int tag_mode) {
90 field_7_inherit_TYPE_descriptor(td);
91 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
92}
93
94static asn_enc_rval_t
95field_7_encode_der(asn_TYPE_descriptor_t *td,
96 void *structure, int tag_mode, ber_tlv_tag_t tag,
97 asn_app_consume_bytes_f *cb, void *app_key) {
98 field_7_inherit_TYPE_descriptor(td);
99 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
100}
101
102static asn_dec_rval_t
103field_7_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
104 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
105 field_7_inherit_TYPE_descriptor(td);
106 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
107}
108
109static asn_enc_rval_t
110field_7_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
111 int ilevel, enum xer_encoder_flags_e flags,
112 asn_app_consume_bytes_f *cb, void *app_key) {
113 field_7_inherit_TYPE_descriptor(td);
114 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
115}
116
117
118/*** <<< STAT-DEFS [Flag] >>> ***/
119
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000120static int asn_DFL_2_set_5(int set_value, void **sptr) {
Lev Walkin171487e2006-03-21 07:25:18 +0000121 INTEGER_t *st = *sptr;
122
123 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000124 if(!set_value) return -1; /* Not a default value */
Lev Walkin171487e2006-03-21 07:25:18 +0000125 st = (*sptr = CALLOC(1, sizeof(*st)));
126 if(!st) return -1;
127 }
128
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000129 if(set_value) {
130 /* Install default value 5 */
131 return asn_long2INTEGER(st, 5);
132 } else {
133 /* Test default value 5 */
134 long value;
135 if(asn_INTEGER2long(st, &value))
136 return -1;
137 return (value == 5);
138 }
Lev Walkin171487e2006-03-21 07:25:18 +0000139}
140static asn_TYPE_member_t asn_MBR_Flag_16P0_1[] = {
141 { ATF_POINTER, 1, offsetof(struct Flag_16P0, field),
142 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
143 .tag_mode = 0,
144 .type = &asn_DEF_INTEGER,
145 .memb_constraints = 0, /* Defer constraints checking to the member type */
146 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
147 .default_value = asn_DFL_2_set_5, /* DEFAULT 5 */
148 .name = "field"
149 },
150};
151static ber_tlv_tag_t asn_DEF_Flag_16P0_tags_1[] = {
152 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
153};
154static asn_TYPE_tag2member_t asn_MAP_Flag_16P0_tag2el_1[] = {
155 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* field at 18 */
156};
157static asn_SEQUENCE_specifics_t asn_SPC_Flag_16P0_specs_1 = {
158 sizeof(struct Flag_16P0),
159 offsetof(struct Flag_16P0, _asn_ctx),
160 asn_MAP_Flag_16P0_tag2el_1,
161 1, /* Count of tags in the map */
162 0, 0, 0, /* Optional elements (not needed) */
163 -1, /* Start extensions */
164 -1 /* Stop extensions */
165};
166asn_TYPE_descriptor_t asn_DEF_Flag_16P0 = {
167 "Flag",
168 "Flag",
169 SEQUENCE_free,
170 SEQUENCE_print,
171 SEQUENCE_constraint,
172 SEQUENCE_decode_ber,
173 SEQUENCE_encode_der,
174 SEQUENCE_decode_xer,
175 SEQUENCE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000176 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin171487e2006-03-21 07:25:18 +0000177 0, /* Use generic outmost tag fetcher */
178 asn_DEF_Flag_16P0_tags_1,
179 sizeof(asn_DEF_Flag_16P0_tags_1)
180 /sizeof(asn_DEF_Flag_16P0_tags_1[0]), /* 1 */
181 asn_DEF_Flag_16P0_tags_1, /* Same as above */
182 sizeof(asn_DEF_Flag_16P0_tags_1)
183 /sizeof(asn_DEF_Flag_16P0_tags_1[0]), /* 1 */
184 0, /* No PER visible constraints */
185 asn_MBR_Flag_16P0_1,
186 1, /* Elements count */
187 &asn_SPC_Flag_16P0_specs_1 /* Additional specs */
188};
189
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000190static int asn_DFL_7_set_5(int set_value, void **sptr) {
Lev Walkin171487e2006-03-21 07:25:18 +0000191 ENUMERATED_t *st = *sptr;
192
193 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000194 if(!set_value) return -1; /* Not a default value */
Lev Walkin171487e2006-03-21 07:25:18 +0000195 st = (*sptr = CALLOC(1, sizeof(*st)));
196 if(!st) return -1;
197 }
198
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000199 if(set_value) {
200 /* Install default value 5 */
201 return asn_long2INTEGER(st, 5);
202 } else {
203 /* Test default value 5 */
204 long value;
205 if(asn_INTEGER2long(st, &value))
206 return -1;
207 return (value == 5);
208 }
Lev Walkin171487e2006-03-21 07:25:18 +0000209}
210static asn_INTEGER_enum_map_t asn_MAP_field_value2enum_7[] = {
211 { 3, 3, "red" },
212 { 4, 5, "green" },
213 { 5, 4, "blue" }
214};
215static unsigned int asn_MAP_field_enum2value_7[] = {
216 2, /* blue(5) */
217 1, /* green(4) */
218 0 /* red(3) */
219};
220static asn_INTEGER_specifics_t asn_SPC_field_specs_7 = {
221 asn_MAP_field_value2enum_7, /* "tag" => N; sorted by tag */
222 asn_MAP_field_enum2value_7, /* N => "tag"; sorted by N */
223 3, /* Number of elements in the maps */
224 0, /* Enumeration is not extensible */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000225 1, /* Strict enumeration */
226 0, /* Native long size */
227 0
Lev Walkin171487e2006-03-21 07:25:18 +0000228};
229static ber_tlv_tag_t asn_DEF_field_tags_7[] = {
230 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
231};
232static /* Use -fall-defs-global to expose */
233asn_TYPE_descriptor_t asn_DEF_field_7 = {
234 "field",
235 "field",
236 field_7_free,
237 field_7_print,
238 field_7_constraint,
239 field_7_decode_ber,
240 field_7_encode_der,
241 field_7_decode_xer,
242 field_7_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000243 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin171487e2006-03-21 07:25:18 +0000244 0, /* Use generic outmost tag fetcher */
245 asn_DEF_field_tags_7,
246 sizeof(asn_DEF_field_tags_7)
247 /sizeof(asn_DEF_field_tags_7[0]), /* 1 */
248 asn_DEF_field_tags_7, /* Same as above */
249 sizeof(asn_DEF_field_tags_7)
250 /sizeof(asn_DEF_field_tags_7[0]), /* 1 */
251 0, /* No PER visible constraints */
252 0, 0, /* Defined elsewhere */
253 &asn_SPC_field_specs_7 /* Additional specs */
254};
255
256static asn_TYPE_member_t asn_MBR_Flag_16P1_6[] = {
257 { ATF_POINTER, 1, offsetof(struct Flag_16P1, field),
258 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
259 .tag_mode = 0,
260 .type = &asn_DEF_field_7,
261 .memb_constraints = 0, /* Defer constraints checking to the member type */
262 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
263 .default_value = asn_DFL_7_set_5, /* DEFAULT 5 */
264 .name = "field"
265 },
266};
267static ber_tlv_tag_t asn_DEF_Flag_16P1_tags_6[] = {
268 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
269};
270static asn_TYPE_tag2member_t asn_MAP_Flag_16P1_tag2el_6[] = {
271 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* field at 19 */
272};
273static asn_SEQUENCE_specifics_t asn_SPC_Flag_16P1_specs_6 = {
274 sizeof(struct Flag_16P1),
275 offsetof(struct Flag_16P1, _asn_ctx),
276 asn_MAP_Flag_16P1_tag2el_6,
277 1, /* Count of tags in the map */
278 0, 0, 0, /* Optional elements (not needed) */
279 -1, /* Start extensions */
280 -1 /* Stop extensions */
281};
282asn_TYPE_descriptor_t asn_DEF_Flag_16P1 = {
283 "Flag",
284 "Flag",
285 SEQUENCE_free,
286 SEQUENCE_print,
287 SEQUENCE_constraint,
288 SEQUENCE_decode_ber,
289 SEQUENCE_encode_der,
290 SEQUENCE_decode_xer,
291 SEQUENCE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000292 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin171487e2006-03-21 07:25:18 +0000293 0, /* Use generic outmost tag fetcher */
294 asn_DEF_Flag_16P1_tags_6,
295 sizeof(asn_DEF_Flag_16P1_tags_6)
296 /sizeof(asn_DEF_Flag_16P1_tags_6[0]), /* 1 */
297 asn_DEF_Flag_16P1_tags_6, /* Same as above */
298 sizeof(asn_DEF_Flag_16P1_tags_6)
299 /sizeof(asn_DEF_Flag_16P1_tags_6[0]), /* 1 */
300 0, /* No PER visible constraints */
301 asn_MBR_Flag_16P1_6,
302 1, /* Elements count */
303 &asn_SPC_Flag_16P1_specs_6 /* Additional specs */
304};
305
306
307/*** <<< INCLUDES [IntegerColorFlag] >>> ***/
308
Lev Walkin22b5ed42006-09-13 02:51:20 +0000309#include "Flag.h"
Lev Walkin171487e2006-03-21 07:25:18 +0000310
311/*** <<< TYPE-DECLS [IntegerColorFlag] >>> ***/
312
313typedef Flag_16P0_t IntegerColorFlag_t;
314
315/*** <<< FUNC-DECLS [IntegerColorFlag] >>> ***/
316
317extern asn_TYPE_descriptor_t asn_DEF_IntegerColorFlag;
318asn_struct_free_f IntegerColorFlag_free;
319asn_struct_print_f IntegerColorFlag_print;
320asn_constr_check_f IntegerColorFlag_constraint;
321ber_type_decoder_f IntegerColorFlag_decode_ber;
322der_type_encoder_f IntegerColorFlag_encode_der;
323xer_type_decoder_f IntegerColorFlag_decode_xer;
324xer_type_encoder_f IntegerColorFlag_encode_xer;
325
326/*** <<< CODE [IntegerColorFlag] >>> ***/
327
328int
329IntegerColorFlag_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000330 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin171487e2006-03-21 07:25:18 +0000331 /* Replace with underlying type checker */
332 td->check_constraints = asn_DEF_Flag_16P0.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +0000333 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin171487e2006-03-21 07:25:18 +0000334}
335
336/*
337 * This type is implemented using Flag_16P0,
338 * so here we adjust the DEF accordingly.
339 */
340static void
341IntegerColorFlag_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
342 td->free_struct = asn_DEF_Flag_16P0.free_struct;
343 td->print_struct = asn_DEF_Flag_16P0.print_struct;
344 td->ber_decoder = asn_DEF_Flag_16P0.ber_decoder;
345 td->der_encoder = asn_DEF_Flag_16P0.der_encoder;
346 td->xer_decoder = asn_DEF_Flag_16P0.xer_decoder;
347 td->xer_encoder = asn_DEF_Flag_16P0.xer_encoder;
348 td->uper_decoder = asn_DEF_Flag_16P0.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000349 td->uper_encoder = asn_DEF_Flag_16P0.uper_encoder;
Lev Walkin171487e2006-03-21 07:25:18 +0000350 if(!td->per_constraints)
351 td->per_constraints = asn_DEF_Flag_16P0.per_constraints;
352 td->elements = asn_DEF_Flag_16P0.elements;
353 td->elements_count = asn_DEF_Flag_16P0.elements_count;
354 td->specifics = asn_DEF_Flag_16P0.specifics;
355}
356
357void
358IntegerColorFlag_free(asn_TYPE_descriptor_t *td,
359 void *struct_ptr, int contents_only) {
360 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
361 td->free_struct(td, struct_ptr, contents_only);
362}
363
364int
365IntegerColorFlag_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
366 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
367 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
368 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
369}
370
371asn_dec_rval_t
372IntegerColorFlag_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
373 void **structure, const void *bufptr, size_t size, int tag_mode) {
374 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
375 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
376}
377
378asn_enc_rval_t
379IntegerColorFlag_encode_der(asn_TYPE_descriptor_t *td,
380 void *structure, int tag_mode, ber_tlv_tag_t tag,
381 asn_app_consume_bytes_f *cb, void *app_key) {
382 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
383 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
384}
385
386asn_dec_rval_t
387IntegerColorFlag_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
388 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
389 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
390 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
391}
392
393asn_enc_rval_t
394IntegerColorFlag_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
395 int ilevel, enum xer_encoder_flags_e flags,
396 asn_app_consume_bytes_f *cb, void *app_key) {
397 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
398 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
399}
400
401
402/*** <<< STAT-DEFS [IntegerColorFlag] >>> ***/
403
404static ber_tlv_tag_t asn_DEF_IntegerColorFlag_tags_1[] = {
405 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
406};
407asn_TYPE_descriptor_t asn_DEF_IntegerColorFlag = {
408 "IntegerColorFlag",
409 "IntegerColorFlag",
410 IntegerColorFlag_free,
411 IntegerColorFlag_print,
412 IntegerColorFlag_constraint,
413 IntegerColorFlag_decode_ber,
414 IntegerColorFlag_encode_der,
415 IntegerColorFlag_decode_xer,
416 IntegerColorFlag_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000417 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin171487e2006-03-21 07:25:18 +0000418 0, /* Use generic outmost tag fetcher */
419 asn_DEF_IntegerColorFlag_tags_1,
420 sizeof(asn_DEF_IntegerColorFlag_tags_1)
421 /sizeof(asn_DEF_IntegerColorFlag_tags_1[0]), /* 1 */
422 asn_DEF_IntegerColorFlag_tags_1, /* Same as above */
423 sizeof(asn_DEF_IntegerColorFlag_tags_1)
424 /sizeof(asn_DEF_IntegerColorFlag_tags_1[0]), /* 1 */
425 0, /* No PER visible constraints */
426 0, 0, /* Defined elsewhere */
427 0 /* No specifics */
428};
429
430
431/*** <<< INCLUDES [EnumeratedColorFlag] >>> ***/
432
Lev Walkin22b5ed42006-09-13 02:51:20 +0000433#include "Flag.h"
Lev Walkin171487e2006-03-21 07:25:18 +0000434
435/*** <<< TYPE-DECLS [EnumeratedColorFlag] >>> ***/
436
437typedef Flag_16P1_t EnumeratedColorFlag_t;
438
439/*** <<< FUNC-DECLS [EnumeratedColorFlag] >>> ***/
440
441extern asn_TYPE_descriptor_t asn_DEF_EnumeratedColorFlag;
442asn_struct_free_f EnumeratedColorFlag_free;
443asn_struct_print_f EnumeratedColorFlag_print;
444asn_constr_check_f EnumeratedColorFlag_constraint;
445ber_type_decoder_f EnumeratedColorFlag_decode_ber;
446der_type_encoder_f EnumeratedColorFlag_encode_der;
447xer_type_decoder_f EnumeratedColorFlag_decode_xer;
448xer_type_encoder_f EnumeratedColorFlag_encode_xer;
449
450/*** <<< CODE [EnumeratedColorFlag] >>> ***/
451
452int
453EnumeratedColorFlag_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000454 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin171487e2006-03-21 07:25:18 +0000455 /* Replace with underlying type checker */
456 td->check_constraints = asn_DEF_Flag_16P1.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +0000457 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin171487e2006-03-21 07:25:18 +0000458}
459
460/*
461 * This type is implemented using Flag_16P1,
462 * so here we adjust the DEF accordingly.
463 */
464static void
465EnumeratedColorFlag_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
466 td->free_struct = asn_DEF_Flag_16P1.free_struct;
467 td->print_struct = asn_DEF_Flag_16P1.print_struct;
468 td->ber_decoder = asn_DEF_Flag_16P1.ber_decoder;
469 td->der_encoder = asn_DEF_Flag_16P1.der_encoder;
470 td->xer_decoder = asn_DEF_Flag_16P1.xer_decoder;
471 td->xer_encoder = asn_DEF_Flag_16P1.xer_encoder;
472 td->uper_decoder = asn_DEF_Flag_16P1.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000473 td->uper_encoder = asn_DEF_Flag_16P1.uper_encoder;
Lev Walkin171487e2006-03-21 07:25:18 +0000474 if(!td->per_constraints)
475 td->per_constraints = asn_DEF_Flag_16P1.per_constraints;
476 td->elements = asn_DEF_Flag_16P1.elements;
477 td->elements_count = asn_DEF_Flag_16P1.elements_count;
478 td->specifics = asn_DEF_Flag_16P1.specifics;
479}
480
481void
482EnumeratedColorFlag_free(asn_TYPE_descriptor_t *td,
483 void *struct_ptr, int contents_only) {
484 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
485 td->free_struct(td, struct_ptr, contents_only);
486}
487
488int
489EnumeratedColorFlag_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
490 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
491 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
492 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
493}
494
495asn_dec_rval_t
496EnumeratedColorFlag_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
497 void **structure, const void *bufptr, size_t size, int tag_mode) {
498 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
499 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
500}
501
502asn_enc_rval_t
503EnumeratedColorFlag_encode_der(asn_TYPE_descriptor_t *td,
504 void *structure, int tag_mode, ber_tlv_tag_t tag,
505 asn_app_consume_bytes_f *cb, void *app_key) {
506 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
507 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
508}
509
510asn_dec_rval_t
511EnumeratedColorFlag_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
512 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
513 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
514 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
515}
516
517asn_enc_rval_t
518EnumeratedColorFlag_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
519 int ilevel, enum xer_encoder_flags_e flags,
520 asn_app_consume_bytes_f *cb, void *app_key) {
521 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
522 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
523}
524
525
526/*** <<< STAT-DEFS [EnumeratedColorFlag] >>> ***/
527
528static ber_tlv_tag_t asn_DEF_EnumeratedColorFlag_tags_1[] = {
529 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
530};
531asn_TYPE_descriptor_t asn_DEF_EnumeratedColorFlag = {
532 "EnumeratedColorFlag",
533 "EnumeratedColorFlag",
534 EnumeratedColorFlag_free,
535 EnumeratedColorFlag_print,
536 EnumeratedColorFlag_constraint,
537 EnumeratedColorFlag_decode_ber,
538 EnumeratedColorFlag_encode_der,
539 EnumeratedColorFlag_decode_xer,
540 EnumeratedColorFlag_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000541 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin171487e2006-03-21 07:25:18 +0000542 0, /* Use generic outmost tag fetcher */
543 asn_DEF_EnumeratedColorFlag_tags_1,
544 sizeof(asn_DEF_EnumeratedColorFlag_tags_1)
545 /sizeof(asn_DEF_EnumeratedColorFlag_tags_1[0]), /* 1 */
546 asn_DEF_EnumeratedColorFlag_tags_1, /* Same as above */
547 sizeof(asn_DEF_EnumeratedColorFlag_tags_1)
548 /sizeof(asn_DEF_EnumeratedColorFlag_tags_1[0]), /* 1 */
549 0, /* No PER visible constraints */
550 0, 0, /* Defined elsewhere */
551 0 /* No specifics */
552};
553