blob: e17e676ebb639fc032a56c45dd76759b6481917c [file] [log] [blame]
Lev Walkin20dc6242017-08-27 23:44:39 -07001
2/*** <<< INCLUDES [Message] >>> ***/
3
4#include "SpecializedContent.h"
5#include <constr_SEQUENCE.h>
6
7/*** <<< TYPE-DECLS [Message] >>> ***/
8
9typedef struct Message {
10 SpecializedContent_30P0_t content;
11
12 /* Context for parsing across buffer boundaries */
13 asn_struct_ctx_t _asn_ctx;
14} Message_t;
15
16/*** <<< FUNC-DECLS [Message] >>> ***/
17
18extern asn_TYPE_descriptor_t asn_DEF_Message;
19
20/*** <<< STAT-DEFS [Message] >>> ***/
21
22static asn_TYPE_member_t asn_MBR_Message_1[] = {
23 { ATF_NOFLAGS, 0, offsetof(struct Message, content),
24 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
25 .tag_mode = 0,
26 .type = &asn_DEF_SpecializedContent_30P0,
27 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070028 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -070029 0, 0, /* No default value */
Lev Walkin20dc6242017-08-27 23:44:39 -070030 .name = "content"
31 },
32};
33static const ber_tlv_tag_t asn_DEF_Message_tags_1[] = {
34 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
35};
36static const asn_TYPE_tag2member_t asn_MAP_Message_tag2el_1[] = {
37 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* content */
38};
39static asn_SEQUENCE_specifics_t asn_SPC_Message_specs_1 = {
40 sizeof(struct Message),
41 offsetof(struct Message, _asn_ctx),
42 .tag2el = asn_MAP_Message_tag2el_1,
43 .tag2el_count = 1, /* Count of tags in the map */
44 0, 0, 0, /* Optional elements (not needed) */
45 -1, /* Start extensions */
46 -1 /* Stop extensions */
47};
48asn_TYPE_descriptor_t asn_DEF_Message = {
49 "Message",
50 "Message",
51 &asn_OP_SEQUENCE,
Lev Walkin20dc6242017-08-27 23:44:39 -070052 asn_DEF_Message_tags_1,
53 sizeof(asn_DEF_Message_tags_1)
54 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
55 asn_DEF_Message_tags_1, /* Same as above */
56 sizeof(asn_DEF_Message_tags_1)
57 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -070058 { 0, 0, SEQUENCE_constraint },
Lev Walkin20dc6242017-08-27 23:44:39 -070059 asn_MBR_Message_1,
60 1, /* Elements count */
61 &asn_SPC_Message_specs_1 /* Additional specs */
62};
63
64
65/*** <<< INCLUDES [SpecializedContent] >>> ***/
66
67#include <NativeInteger.h>
68#include <ANY.h>
69#include <asn_ioc.h>
70#include <OPEN_TYPE.h>
71#include <BOOLEAN.h>
72#include <constr_CHOICE.h>
73#include <constr_SEQUENCE.h>
74
75/*** <<< DEPS [SpecializedContent] >>> ***/
76
77typedef enum value_PR {
78 value_PR_NOTHING, /* No components present */
79 value_PR_INTEGER,
80 value_PR_BOOLEAN
81} value_PR;
82
83/*** <<< TYPE-DECLS [SpecializedContent] >>> ***/
84
85typedef struct SpecializedContent_30P0 {
86 long id;
87 struct value {
88 value_PR present;
89 union value_u {
90 long INTEGER;
91 BOOLEAN_t BOOLEAN;
92 } choice;
93
94 /* Context for parsing across buffer boundaries */
95 asn_struct_ctx_t _asn_ctx;
96 } value;
97
98 /* Context for parsing across buffer boundaries */
99 asn_struct_ctx_t _asn_ctx;
100} SpecializedContent_30P0_t;
101
102/*** <<< FUNC-DECLS [SpecializedContent] >>> ***/
103
104extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0;
105extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1;
106extern asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[2];
107
108/*** <<< IOC-TABLES [SpecializedContent] >>> ***/
109
110static const long asn_VAL_1_1 = 1;
111static const long asn_VAL_2_2 = 2;
112static const asn_ioc_cell_t asn_IOS_RegionalExtension_1_rows[] = {
113 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_1_1 },
114 { "&Type", ,
115 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_2 },
116 { "&Type",
117};
118static const asn_ioc_set_t asn_IOS_RegionalExtension_1[] = {
119 2, 2, asn_IOS_RegionalExtension_1_rows
120};
121
122/*** <<< CODE [SpecializedContent] >>> ***/
123
124static int
Lev Walkin20696a42017-10-17 21:27:33 -0700125memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin20dc6242017-08-27 23:44:39 -0700126 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
127
128 if(!sptr) {
129 ASN__CTFAIL(app_key, td, sptr,
130 "%s: value not given (%s:%d)",
131 td->name, __FILE__, __LINE__);
132 return -1;
133 }
134
135
136 if(1 /* No applicable constraints whatsoever */) {
137 /* Nothing is here. See below */
138 }
139
Lev Walkin0bfea562017-09-29 23:16:48 -0700140 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin20dc6242017-08-27 23:44:39 -0700141}
142
143static asn_type_selector_result_t
144select_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
145 asn_type_selector_result_t result = {0, 0};
146 const asn_ioc_set_t *itable = asn_IOS_RegionalExtension_1;
147 size_t constraining_column = 0; /* &id */
148 size_t for_column = 1; /* &Type */
149 size_t row;
150 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct SpecializedContent_30P0, id));
151
152 for(row=0; row < itable->rows_count; row++) {
153 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
154 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
155
156 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
157 result.type_descriptor = type_cell->type_descriptor;
158 result.presence_index = row + 1;
159 break;
160 }
161 }
162
163 return result;
164}
165
166static int
Lev Walkin20696a42017-10-17 21:27:33 -0700167memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin20dc6242017-08-27 23:44:39 -0700168 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
169
170 if(!sptr) {
171 ASN__CTFAIL(app_key, td, sptr,
172 "%s: value not given (%s:%d)",
173 td->name, __FILE__, __LINE__);
174 return -1;
175 }
176
177
178 if(1 /* No applicable constraints whatsoever */) {
179 /* Nothing is here. See below */
180 }
181
Lev Walkin0bfea562017-09-29 23:16:48 -0700182 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin20dc6242017-08-27 23:44:39 -0700183}
184
185
186/*** <<< CTDEFS [SpecializedContent] >>> ***/
187
Lev Walkin0479e042017-09-26 18:39:58 -0700188static asn_per_constraints_t asn_PER_memb_id_constr_2 CC_NOTUSED = {
Lev Walkin20dc6242017-08-27 23:44:39 -0700189 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
190 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
191 0, 0 /* No PER value map */
192};
Lev Walkin0479e042017-09-26 18:39:58 -0700193static asn_per_constraints_t asn_PER_memb_value_constr_3 CC_NOTUSED = {
Lev Walkin20dc6242017-08-27 23:44:39 -0700194 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
195 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
196 0, 0 /* No PER value map */
197};
198
199/*** <<< STAT-DEFS [SpecializedContent] >>> ***/
200
201static asn_TYPE_member_t asn_MBR_value_3[] = {
202 { ATF_NOFLAGS, 0, offsetof(struct value, choice.INTEGER),
203 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
204 .tag_mode = 0,
205 .type = &asn_DEF_NativeInteger,
206 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700207 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700208 0, 0, /* No default value */
Lev Walkin20dc6242017-08-27 23:44:39 -0700209 .name = "INTEGER"
210 },
211 { ATF_NOFLAGS, 0, offsetof(struct value, choice.BOOLEAN),
212 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
213 .tag_mode = 0,
214 .type = &asn_DEF_BOOLEAN,
215 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700216 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700217 0, 0, /* No default value */
Lev Walkin20dc6242017-08-27 23:44:39 -0700218 .name = "BOOLEAN"
219 },
220};
Lev Walkin20696a42017-10-17 21:27:33 -0700221static const unsigned asn_MAP_value_to_canonical_3[] = { 1, 0 };
222static const unsigned asn_MAP_value_from_canonical_3[] = { 1, 0 };
Lev Walkin20dc6242017-08-27 23:44:39 -0700223static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = {
224 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* BOOLEAN */
225 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* INTEGER */
226};
227static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = {
228 sizeof(struct value),
229 offsetof(struct value, _asn_ctx),
230 offsetof(struct value, present),
231 sizeof(((struct value *)0)->present),
232 .tag2el = asn_MAP_value_tag2el_3,
233 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin20696a42017-10-17 21:27:33 -0700234 .to_canonical_order = asn_MAP_value_to_canonical_3,
235 .from_canonical_order = asn_MAP_value_from_canonical_3,
Lev Walkin20dc6242017-08-27 23:44:39 -0700236 .ext_start = -1 /* Extensions start */
237};
238static /* Use -fall-defs-global to expose */
239asn_TYPE_descriptor_t asn_DEF_value_3 = {
240 "value",
241 "value",
242 &asn_OP_OPEN_TYPE,
Lev Walkin20dc6242017-08-27 23:44:39 -0700243 0, /* No effective tags (pointer) */
244 0, /* No effective tags (count) */
245 0, /* No tags (pointer) */
246 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700247 { 0, 0, OPEN_TYPE_constraint },
Lev Walkin20dc6242017-08-27 23:44:39 -0700248 asn_MBR_value_3,
249 2, /* Elements count */
250 &asn_SPC_value_specs_3 /* Additional specs */
251};
252
253asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[] = {
254 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, id),
255 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
256 .tag_mode = 0,
257 .type = &asn_DEF_NativeInteger,
258 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700259 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_id_constr_2, .general_constraints = memb_id_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700260 0, 0, /* No default value */
Lev Walkin20dc6242017-08-27 23:44:39 -0700261 .name = "id"
262 },
263 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, value),
264 .tag = -1 /* Ambiguous tag (ANY?) */,
265 .tag_mode = 0,
266 .type = &asn_DEF_value_3,
267 .type_selector = select_value_type,
Lev Walkin0bfea562017-09-29 23:16:48 -0700268 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_value_constr_3, .general_constraints = memb_value_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700269 0, 0, /* No default value */
Lev Walkin20dc6242017-08-27 23:44:39 -0700270 .name = "value"
271 },
272};
273static const ber_tlv_tag_t asn_DEF_SpecializedContent_30P0_tags_1[] = {
274 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
275};
276static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_30P0_tag2el_1[] = {
277 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
278};
279asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1 = {
280 sizeof(struct SpecializedContent_30P0),
281 offsetof(struct SpecializedContent_30P0, _asn_ctx),
282 .tag2el = asn_MAP_SpecializedContent_30P0_tag2el_1,
283 .tag2el_count = 1, /* Count of tags in the map */
284 0, 0, 0, /* Optional elements (not needed) */
285 -1, /* Start extensions */
286 -1 /* Stop extensions */
287};
288asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0 = {
289 "SpecializedContent",
290 "SpecializedContent",
291 &asn_OP_SEQUENCE,
Lev Walkin20dc6242017-08-27 23:44:39 -0700292 asn_DEF_SpecializedContent_30P0_tags_1,
293 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
294 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
295 asn_DEF_SpecializedContent_30P0_tags_1, /* Same as above */
296 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
297 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700298 { 0, 0, SEQUENCE_constraint },
Lev Walkin20dc6242017-08-27 23:44:39 -0700299 asn_MBR_SpecializedContent_30P0_1,
300 2, /* Elements count */
301 &asn_SPC_SpecializedContent_30P0_specs_1 /* Additional specs */
302};
303