blob: 5052aef2061c90de10f6b51b2a44f7620ec3d406 [file] [log] [blame]
Lev Walkin659c63b2005-01-17 11:40:49 +00001
2/*** <<< INCLUDES [Choice] >>> ***/
3
4#include <INTEGER.h>
Lev Walkin659c63b2005-01-17 11:40:49 +00005#include <constr_CHOICE.h>
6
7/*** <<< DEPS [Choice] >>> ***/
8
9typedef enum Choice_PR {
10 Choice_PR_NOTHING, /* No components present */
11 Choice_PR_a,
12 /* Extensions may appear below */
13 Choice_PR_b,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000014 Choice_PR_c
Lev Walkin659c63b2005-01-17 11:40:49 +000015} Choice_PR;
16
Lev Walkinc8285712005-03-04 22:18:20 +000017/*** <<< FWD-DECLS [Choice] >>> ***/
18
Lev Walkinbf56d542005-03-04 23:50:56 +000019struct Choice;
Lev Walkin659c63b2005-01-17 11:40:49 +000020
21/*** <<< TYPE-DECLS [Choice] >>> ***/
22
Lev Walkin659c63b2005-01-17 11:40:49 +000023typedef struct Choice {
24 Choice_PR present;
Lev Walkin0f5d74c2005-08-14 15:03:31 +000025 union Choice_u {
Lev Walkin659c63b2005-01-17 11:40:49 +000026 INTEGER_t a;
27 /*
28 * This type is extensible,
29 * possible extensions are below.
30 */
31 INTEGER_t b;
32 struct Choice *c;
33 } choice;
34
35 /* Context for parsing across buffer boundaries */
36 asn_struct_ctx_t _asn_ctx;
37} Choice_t;
38
Lev Walkinc8285712005-03-04 22:18:20 +000039/*** <<< FUNC-DECLS [Choice] >>> ***/
40
41extern asn_TYPE_descriptor_t asn_DEF_Choice;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080042extern asn_CHOICE_specifics_t asn_SPC_Choice_specs_1;
43extern asn_TYPE_member_t asn_MBR_Choice_1[3];
Lev Walkinc8285712005-03-04 22:18:20 +000044
Lev Walkin8eb4b572005-08-16 16:57:17 +000045/*** <<< POST-INCLUDE [Choice] >>> ***/
46
Lev Walkin22b5ed42006-09-13 02:51:20 +000047#include "Choice.h"
Lev Walkin8eb4b572005-08-16 16:57:17 +000048
Lev Walkin659c63b2005-01-17 11:40:49 +000049/*** <<< STAT-DEFS [Choice] >>> ***/
50
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080051asn_TYPE_member_t asn_MBR_Choice_1[] = {
Lev Walkin659c63b2005-01-17 11:40:49 +000052 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.a),
53 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
54 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000055 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -070056 .type_selector = 0,
Lev Walkinfb857fd2005-01-17 12:17:41 +000057 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040058 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000059 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
60 .default_value = 0,
Lev Walkin659c63b2005-01-17 11:40:49 +000061 .name = "a"
62 },
63 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.b),
64 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
65 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000066 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -070067 .type_selector = 0,
Lev Walkinfb857fd2005-01-17 12:17:41 +000068 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040069 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000070 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
71 .default_value = 0,
Lev Walkin659c63b2005-01-17 11:40:49 +000072 .name = "b"
73 },
74 { ATF_POINTER, 0, offsetof(struct Choice, choice.c),
75 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
Lev Walkinfb857fd2005-01-17 12:17:41 +000076 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000077 .type = &asn_DEF_Choice,
Lev Walkin67a30122017-08-10 05:48:54 -070078 .type_selector = 0,
Lev Walkinfb857fd2005-01-17 12:17:41 +000079 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040080 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000081 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
82 .default_value = 0,
Lev Walkin659c63b2005-01-17 11:40:49 +000083 .name = "c"
84 },
85};
Lev Walkina7591b52014-10-12 18:37:35 -070086static const ber_tlv_tag_t asn_DEF_Choice_tags_1[] = {
Lev Walkinfb857fd2005-01-17 12:17:41 +000087 (ASN_TAG_CLASS_CONTEXT | (123 << 2))
88};
Lev Walkina7591b52014-10-12 18:37:35 -070089static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070090 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a */
91 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b */
92 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* c */
Lev Walkin659c63b2005-01-17 11:40:49 +000093};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080094asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
Lev Walkin659c63b2005-01-17 11:40:49 +000095 sizeof(struct Choice),
96 offsetof(struct Choice, _asn_ctx),
97 offsetof(struct Choice, present),
98 sizeof(((struct Choice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +000099 asn_MAP_Choice_tag2el_1,
Lev Walkin659c63b2005-01-17 11:40:49 +0000100 3, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000101 .canonical_order = 0,
102 .ext_start = 1 /* Extensions start */
Lev Walkin659c63b2005-01-17 11:40:49 +0000103};
104asn_TYPE_descriptor_t asn_DEF_Choice = {
105 "Choice",
106 "Choice",
107 CHOICE_free,
108 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700109 CHOICE_compare,
Lev Walkin659c63b2005-01-17 11:40:49 +0000110 CHOICE_constraint,
111 CHOICE_decode_ber,
112 CHOICE_encode_der,
113 CHOICE_decode_xer,
114 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700115 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400116 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin659c63b2005-01-17 11:40:49 +0000117 CHOICE_outmost_tag,
Lev Walkin59b176e2005-11-26 11:25:14 +0000118 asn_DEF_Choice_tags_1,
119 sizeof(asn_DEF_Choice_tags_1)
120 /sizeof(asn_DEF_Choice_tags_1[0]), /* 1 */
121 asn_DEF_Choice_tags_1, /* Same as above */
122 sizeof(asn_DEF_Choice_tags_1)
123 /sizeof(asn_DEF_Choice_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400124 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000125 0, /* No PER visible constraints */
Lev Walkine0272aa2005-03-04 11:26:08 +0000126 asn_MBR_Choice_1,
Lev Walkin659c63b2005-01-17 11:40:49 +0000127 3, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000128 &asn_SPC_Choice_specs_1 /* Additional specs */
Lev Walkin659c63b2005-01-17 11:40:49 +0000129};
130