blob: 3cb1058b53c0ccbae735b5cdb0195207f15016e1 [file] [log] [blame]
vlm7c8aa5e2006-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,
vlmaf68ef52006-07-13 11:19:01 +000046 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm7c8aa5e2006-03-21 07:25:18 +000047 /* Replace with underlying type checker */
48 td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
vlmaf68ef52006-07-13 11:19:01 +000049 return td->check_constraints(td, sptr, ctfailcb, app_key);
vlm7c8aa5e2006-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;
vlmb1b193e2006-08-18 01:46:46 +000065 td->uper_encoder = asn_DEF_ENUMERATED.uper_encoder;
vlm7c8aa5e2006-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
vlmb1b193e2006-08-18 01:46:46 +0000120static int asn_DFL_2_set_5(int set_value, void **sptr) {
vlm7c8aa5e2006-03-21 07:25:18 +0000121 INTEGER_t *st = *sptr;
122
123 if(!st) {
vlmb1b193e2006-08-18 01:46:46 +0000124 if(!set_value) return -1; /* Not a default value */
vlm7c8aa5e2006-03-21 07:25:18 +0000125 st = (*sptr = CALLOC(1, sizeof(*st)));
126 if(!st) return -1;
127 }
128
vlmb1b193e2006-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 }
vlm7c8aa5e2006-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,
vlmb1b193e2006-08-18 01:46:46 +0000176 0, 0, /* No PER support, use "-gen-PER" to enable */
vlm7c8aa5e2006-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
vlmb1b193e2006-08-18 01:46:46 +0000190static int asn_DFL_7_set_5(int set_value, void **sptr) {
vlm7c8aa5e2006-03-21 07:25:18 +0000191 ENUMERATED_t *st = *sptr;
192
193 if(!st) {
vlmb1b193e2006-08-18 01:46:46 +0000194 if(!set_value) return -1; /* Not a default value */
vlm7c8aa5e2006-03-21 07:25:18 +0000195 st = (*sptr = CALLOC(1, sizeof(*st)));
196 if(!st) return -1;
197 }
198
vlmb1b193e2006-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 }
vlm7c8aa5e2006-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 */
225 1 /* Strict enumeration */
226};
227static ber_tlv_tag_t asn_DEF_field_tags_7[] = {
228 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
229};
230static /* Use -fall-defs-global to expose */
231asn_TYPE_descriptor_t asn_DEF_field_7 = {
232 "field",
233 "field",
234 field_7_free,
235 field_7_print,
236 field_7_constraint,
237 field_7_decode_ber,
238 field_7_encode_der,
239 field_7_decode_xer,
240 field_7_encode_xer,
vlmb1b193e2006-08-18 01:46:46 +0000241 0, 0, /* No PER support, use "-gen-PER" to enable */
vlm7c8aa5e2006-03-21 07:25:18 +0000242 0, /* Use generic outmost tag fetcher */
243 asn_DEF_field_tags_7,
244 sizeof(asn_DEF_field_tags_7)
245 /sizeof(asn_DEF_field_tags_7[0]), /* 1 */
246 asn_DEF_field_tags_7, /* Same as above */
247 sizeof(asn_DEF_field_tags_7)
248 /sizeof(asn_DEF_field_tags_7[0]), /* 1 */
249 0, /* No PER visible constraints */
250 0, 0, /* Defined elsewhere */
251 &asn_SPC_field_specs_7 /* Additional specs */
252};
253
254static asn_TYPE_member_t asn_MBR_Flag_16P1_6[] = {
255 { ATF_POINTER, 1, offsetof(struct Flag_16P1, field),
256 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
257 .tag_mode = 0,
258 .type = &asn_DEF_field_7,
259 .memb_constraints = 0, /* Defer constraints checking to the member type */
260 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
261 .default_value = asn_DFL_7_set_5, /* DEFAULT 5 */
262 .name = "field"
263 },
264};
265static ber_tlv_tag_t asn_DEF_Flag_16P1_tags_6[] = {
266 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
267};
268static asn_TYPE_tag2member_t asn_MAP_Flag_16P1_tag2el_6[] = {
269 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* field at 19 */
270};
271static asn_SEQUENCE_specifics_t asn_SPC_Flag_16P1_specs_6 = {
272 sizeof(struct Flag_16P1),
273 offsetof(struct Flag_16P1, _asn_ctx),
274 asn_MAP_Flag_16P1_tag2el_6,
275 1, /* Count of tags in the map */
276 0, 0, 0, /* Optional elements (not needed) */
277 -1, /* Start extensions */
278 -1 /* Stop extensions */
279};
280asn_TYPE_descriptor_t asn_DEF_Flag_16P1 = {
281 "Flag",
282 "Flag",
283 SEQUENCE_free,
284 SEQUENCE_print,
285 SEQUENCE_constraint,
286 SEQUENCE_decode_ber,
287 SEQUENCE_encode_der,
288 SEQUENCE_decode_xer,
289 SEQUENCE_encode_xer,
vlmb1b193e2006-08-18 01:46:46 +0000290 0, 0, /* No PER support, use "-gen-PER" to enable */
vlm7c8aa5e2006-03-21 07:25:18 +0000291 0, /* Use generic outmost tag fetcher */
292 asn_DEF_Flag_16P1_tags_6,
293 sizeof(asn_DEF_Flag_16P1_tags_6)
294 /sizeof(asn_DEF_Flag_16P1_tags_6[0]), /* 1 */
295 asn_DEF_Flag_16P1_tags_6, /* Same as above */
296 sizeof(asn_DEF_Flag_16P1_tags_6)
297 /sizeof(asn_DEF_Flag_16P1_tags_6[0]), /* 1 */
298 0, /* No PER visible constraints */
299 asn_MBR_Flag_16P1_6,
300 1, /* Elements count */
301 &asn_SPC_Flag_16P1_specs_6 /* Additional specs */
302};
303
304
305/*** <<< INCLUDES [IntegerColorFlag] >>> ***/
306
vlmea226772006-09-13 02:51:20 +0000307#include "Flag.h"
vlm7c8aa5e2006-03-21 07:25:18 +0000308
309/*** <<< TYPE-DECLS [IntegerColorFlag] >>> ***/
310
311typedef Flag_16P0_t IntegerColorFlag_t;
312
313/*** <<< FUNC-DECLS [IntegerColorFlag] >>> ***/
314
315extern asn_TYPE_descriptor_t asn_DEF_IntegerColorFlag;
316asn_struct_free_f IntegerColorFlag_free;
317asn_struct_print_f IntegerColorFlag_print;
318asn_constr_check_f IntegerColorFlag_constraint;
319ber_type_decoder_f IntegerColorFlag_decode_ber;
320der_type_encoder_f IntegerColorFlag_encode_der;
321xer_type_decoder_f IntegerColorFlag_decode_xer;
322xer_type_encoder_f IntegerColorFlag_encode_xer;
323
324/*** <<< CODE [IntegerColorFlag] >>> ***/
325
326int
327IntegerColorFlag_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +0000328 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm7c8aa5e2006-03-21 07:25:18 +0000329 /* Replace with underlying type checker */
330 td->check_constraints = asn_DEF_Flag_16P0.check_constraints;
vlmaf68ef52006-07-13 11:19:01 +0000331 return td->check_constraints(td, sptr, ctfailcb, app_key);
vlm7c8aa5e2006-03-21 07:25:18 +0000332}
333
334/*
335 * This type is implemented using Flag_16P0,
336 * so here we adjust the DEF accordingly.
337 */
338static void
339IntegerColorFlag_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
340 td->free_struct = asn_DEF_Flag_16P0.free_struct;
341 td->print_struct = asn_DEF_Flag_16P0.print_struct;
342 td->ber_decoder = asn_DEF_Flag_16P0.ber_decoder;
343 td->der_encoder = asn_DEF_Flag_16P0.der_encoder;
344 td->xer_decoder = asn_DEF_Flag_16P0.xer_decoder;
345 td->xer_encoder = asn_DEF_Flag_16P0.xer_encoder;
346 td->uper_decoder = asn_DEF_Flag_16P0.uper_decoder;
vlmb1b193e2006-08-18 01:46:46 +0000347 td->uper_encoder = asn_DEF_Flag_16P0.uper_encoder;
vlm7c8aa5e2006-03-21 07:25:18 +0000348 if(!td->per_constraints)
349 td->per_constraints = asn_DEF_Flag_16P0.per_constraints;
350 td->elements = asn_DEF_Flag_16P0.elements;
351 td->elements_count = asn_DEF_Flag_16P0.elements_count;
352 td->specifics = asn_DEF_Flag_16P0.specifics;
353}
354
355void
356IntegerColorFlag_free(asn_TYPE_descriptor_t *td,
357 void *struct_ptr, int contents_only) {
358 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
359 td->free_struct(td, struct_ptr, contents_only);
360}
361
362int
363IntegerColorFlag_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
364 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
365 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
366 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
367}
368
369asn_dec_rval_t
370IntegerColorFlag_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
371 void **structure, const void *bufptr, size_t size, int tag_mode) {
372 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
373 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
374}
375
376asn_enc_rval_t
377IntegerColorFlag_encode_der(asn_TYPE_descriptor_t *td,
378 void *structure, int tag_mode, ber_tlv_tag_t tag,
379 asn_app_consume_bytes_f *cb, void *app_key) {
380 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
381 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
382}
383
384asn_dec_rval_t
385IntegerColorFlag_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
386 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
387 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
388 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
389}
390
391asn_enc_rval_t
392IntegerColorFlag_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
393 int ilevel, enum xer_encoder_flags_e flags,
394 asn_app_consume_bytes_f *cb, void *app_key) {
395 IntegerColorFlag_1_inherit_TYPE_descriptor(td);
396 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
397}
398
399
400/*** <<< STAT-DEFS [IntegerColorFlag] >>> ***/
401
402static ber_tlv_tag_t asn_DEF_IntegerColorFlag_tags_1[] = {
403 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
404};
405asn_TYPE_descriptor_t asn_DEF_IntegerColorFlag = {
406 "IntegerColorFlag",
407 "IntegerColorFlag",
408 IntegerColorFlag_free,
409 IntegerColorFlag_print,
410 IntegerColorFlag_constraint,
411 IntegerColorFlag_decode_ber,
412 IntegerColorFlag_encode_der,
413 IntegerColorFlag_decode_xer,
414 IntegerColorFlag_encode_xer,
vlmb1b193e2006-08-18 01:46:46 +0000415 0, 0, /* No PER support, use "-gen-PER" to enable */
vlm7c8aa5e2006-03-21 07:25:18 +0000416 0, /* Use generic outmost tag fetcher */
417 asn_DEF_IntegerColorFlag_tags_1,
418 sizeof(asn_DEF_IntegerColorFlag_tags_1)
419 /sizeof(asn_DEF_IntegerColorFlag_tags_1[0]), /* 1 */
420 asn_DEF_IntegerColorFlag_tags_1, /* Same as above */
421 sizeof(asn_DEF_IntegerColorFlag_tags_1)
422 /sizeof(asn_DEF_IntegerColorFlag_tags_1[0]), /* 1 */
423 0, /* No PER visible constraints */
424 0, 0, /* Defined elsewhere */
425 0 /* No specifics */
426};
427
428
429/*** <<< INCLUDES [EnumeratedColorFlag] >>> ***/
430
vlmea226772006-09-13 02:51:20 +0000431#include "Flag.h"
vlm7c8aa5e2006-03-21 07:25:18 +0000432
433/*** <<< TYPE-DECLS [EnumeratedColorFlag] >>> ***/
434
435typedef Flag_16P1_t EnumeratedColorFlag_t;
436
437/*** <<< FUNC-DECLS [EnumeratedColorFlag] >>> ***/
438
439extern asn_TYPE_descriptor_t asn_DEF_EnumeratedColorFlag;
440asn_struct_free_f EnumeratedColorFlag_free;
441asn_struct_print_f EnumeratedColorFlag_print;
442asn_constr_check_f EnumeratedColorFlag_constraint;
443ber_type_decoder_f EnumeratedColorFlag_decode_ber;
444der_type_encoder_f EnumeratedColorFlag_encode_der;
445xer_type_decoder_f EnumeratedColorFlag_decode_xer;
446xer_type_encoder_f EnumeratedColorFlag_encode_xer;
447
448/*** <<< CODE [EnumeratedColorFlag] >>> ***/
449
450int
451EnumeratedColorFlag_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +0000452 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm7c8aa5e2006-03-21 07:25:18 +0000453 /* Replace with underlying type checker */
454 td->check_constraints = asn_DEF_Flag_16P1.check_constraints;
vlmaf68ef52006-07-13 11:19:01 +0000455 return td->check_constraints(td, sptr, ctfailcb, app_key);
vlm7c8aa5e2006-03-21 07:25:18 +0000456}
457
458/*
459 * This type is implemented using Flag_16P1,
460 * so here we adjust the DEF accordingly.
461 */
462static void
463EnumeratedColorFlag_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
464 td->free_struct = asn_DEF_Flag_16P1.free_struct;
465 td->print_struct = asn_DEF_Flag_16P1.print_struct;
466 td->ber_decoder = asn_DEF_Flag_16P1.ber_decoder;
467 td->der_encoder = asn_DEF_Flag_16P1.der_encoder;
468 td->xer_decoder = asn_DEF_Flag_16P1.xer_decoder;
469 td->xer_encoder = asn_DEF_Flag_16P1.xer_encoder;
470 td->uper_decoder = asn_DEF_Flag_16P1.uper_decoder;
vlmb1b193e2006-08-18 01:46:46 +0000471 td->uper_encoder = asn_DEF_Flag_16P1.uper_encoder;
vlm7c8aa5e2006-03-21 07:25:18 +0000472 if(!td->per_constraints)
473 td->per_constraints = asn_DEF_Flag_16P1.per_constraints;
474 td->elements = asn_DEF_Flag_16P1.elements;
475 td->elements_count = asn_DEF_Flag_16P1.elements_count;
476 td->specifics = asn_DEF_Flag_16P1.specifics;
477}
478
479void
480EnumeratedColorFlag_free(asn_TYPE_descriptor_t *td,
481 void *struct_ptr, int contents_only) {
482 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
483 td->free_struct(td, struct_ptr, contents_only);
484}
485
486int
487EnumeratedColorFlag_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
488 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
489 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
490 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
491}
492
493asn_dec_rval_t
494EnumeratedColorFlag_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
495 void **structure, const void *bufptr, size_t size, int tag_mode) {
496 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
497 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
498}
499
500asn_enc_rval_t
501EnumeratedColorFlag_encode_der(asn_TYPE_descriptor_t *td,
502 void *structure, int tag_mode, ber_tlv_tag_t tag,
503 asn_app_consume_bytes_f *cb, void *app_key) {
504 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
505 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
506}
507
508asn_dec_rval_t
509EnumeratedColorFlag_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
510 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
511 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
512 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
513}
514
515asn_enc_rval_t
516EnumeratedColorFlag_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
517 int ilevel, enum xer_encoder_flags_e flags,
518 asn_app_consume_bytes_f *cb, void *app_key) {
519 EnumeratedColorFlag_1_inherit_TYPE_descriptor(td);
520 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
521}
522
523
524/*** <<< STAT-DEFS [EnumeratedColorFlag] >>> ***/
525
526static ber_tlv_tag_t asn_DEF_EnumeratedColorFlag_tags_1[] = {
527 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
528};
529asn_TYPE_descriptor_t asn_DEF_EnumeratedColorFlag = {
530 "EnumeratedColorFlag",
531 "EnumeratedColorFlag",
532 EnumeratedColorFlag_free,
533 EnumeratedColorFlag_print,
534 EnumeratedColorFlag_constraint,
535 EnumeratedColorFlag_decode_ber,
536 EnumeratedColorFlag_encode_der,
537 EnumeratedColorFlag_decode_xer,
538 EnumeratedColorFlag_encode_xer,
vlmb1b193e2006-08-18 01:46:46 +0000539 0, 0, /* No PER support, use "-gen-PER" to enable */
vlm7c8aa5e2006-03-21 07:25:18 +0000540 0, /* Use generic outmost tag fetcher */
541 asn_DEF_EnumeratedColorFlag_tags_1,
542 sizeof(asn_DEF_EnumeratedColorFlag_tags_1)
543 /sizeof(asn_DEF_EnumeratedColorFlag_tags_1[0]), /* 1 */
544 asn_DEF_EnumeratedColorFlag_tags_1, /* Same as above */
545 sizeof(asn_DEF_EnumeratedColorFlag_tags_1)
546 /sizeof(asn_DEF_EnumeratedColorFlag_tags_1[0]), /* 1 */
547 0, /* No PER visible constraints */
548 0, 0, /* Defined elsewhere */
549 0 /* No specifics */
550};
551