blob: 15941e0010669fa797900dbc5c87f67ae2bdd038 [file] [log] [blame]
vlm34dcd572005-01-17 11:40:49 +00001
2/*** <<< INCLUDES [Choice] >>> ***/
3
4#include <INTEGER.h>
5#include <Choice.h>
6#include <constr_CHOICE.h>
7
8/*** <<< DEPS [Choice] >>> ***/
9
10typedef enum Choice_PR {
11 Choice_PR_NOTHING, /* No components present */
12 Choice_PR_a,
13 /* Extensions may appear below */
14 Choice_PR_b,
15 Choice_PR_c,
16} Choice_PR;
17
18struct Choice; /* Forward declaration */
19extern asn_TYPE_descriptor_t asn_DEF_Choice;
20
21/*** <<< TYPE-DECLS [Choice] >>> ***/
22
23
24typedef struct Choice {
25 Choice_PR present;
26 union {
27 INTEGER_t a;
28 /*
29 * This type is extensible,
30 * possible extensions are below.
31 */
32 INTEGER_t b;
33 struct Choice *c;
34 } choice;
35
36 /* Context for parsing across buffer boundaries */
37 asn_struct_ctx_t _asn_ctx;
38} Choice_t;
39
40/*** <<< STAT-DEFS [Choice] >>> ***/
41
42static asn_TYPE_member_t asn_MBR_Choice[] = {
43 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.a),
44 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
45 .tag_mode = -1, /* IMPLICIT tag at current level */
46 .type = (void *)&asn_DEF_INTEGER,
47 .memb_constraints = 0, /* Defer to actual type */
48 .name = "a"
49 },
50 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.b),
51 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
52 .tag_mode = -1, /* IMPLICIT tag at current level */
53 .type = (void *)&asn_DEF_INTEGER,
54 .memb_constraints = 0, /* Defer to actual type */
55 .name = "b"
56 },
57 { ATF_POINTER, 0, offsetof(struct Choice, choice.c),
58 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
59 .tag_mode = +1, /* EXPLICIT tag at current level */
60 .type = (void *)&asn_DEF_Choice,
61 .memb_constraints = 0, /* Defer to actual type */
62 .name = "c"
63 },
64};
65static asn_TYPE_tag2member_t asn_DEF_Choice_tag2el[] = {
66 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 15 */
67 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b at 17 */
68 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* c at 19 */
69};
70static asn_CHOICE_specifics_t asn_DEF_Choice_specs = {
71 sizeof(struct Choice),
72 offsetof(struct Choice, _asn_ctx),
73 offsetof(struct Choice, present),
74 sizeof(((struct Choice *)0)->present),
75 asn_DEF_Choice_tag2el,
76 3, /* Count of tags in the map */
77 1 /* Whether extensible */
78};
79asn_TYPE_descriptor_t asn_DEF_Choice = {
80 "Choice",
81 "Choice",
82 CHOICE_free,
83 CHOICE_print,
84 CHOICE_constraint,
85 CHOICE_decode_ber,
86 CHOICE_encode_der,
87 CHOICE_decode_xer,
88 CHOICE_encode_xer,
89 CHOICE_outmost_tag,
90 0, /* No effective tags (pointer) */
91 0, /* No effective tags (count) */
92 0, /* No tags (pointer) */
93 0, /* No tags (count) */
94 asn_MBR_Choice,
95 3, /* Elements count */
96 &asn_DEF_Choice_specs /* Additional specs */
97};
98