blob: 340d2ecbb605acca2524088ef5f766651121a48b [file] [log] [blame]
Lev Walkind8e07c52017-08-23 07:38:30 -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,
28 .memb_constraints = 0, /* Defer constraints checking to the member type */
29 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
30 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
31 .default_value = 0,
32 .name = "content"
33 },
34};
35static const ber_tlv_tag_t asn_DEF_Message_tags_1[] = {
36 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
37};
38static const asn_TYPE_tag2member_t asn_MAP_Message_tag2el_1[] = {
39 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* content */
40};
41static asn_SEQUENCE_specifics_t asn_SPC_Message_specs_1 = {
42 sizeof(struct Message),
43 offsetof(struct Message, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -070044 .tag2el = asn_MAP_Message_tag2el_1,
45 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkind8e07c52017-08-23 07:38:30 -070046 0, 0, 0, /* Optional elements (not needed) */
47 -1, /* Start extensions */
48 -1 /* Stop extensions */
49};
50asn_TYPE_descriptor_t asn_DEF_Message = {
51 "Message",
52 "Message",
53 SEQUENCE_free,
54 SEQUENCE_print,
55 SEQUENCE_compare,
56 SEQUENCE_constraint,
57 SEQUENCE_decode_ber,
58 SEQUENCE_encode_der,
59 SEQUENCE_decode_xer,
60 SEQUENCE_encode_xer,
61 0, 0, /* No OER support, use "-gen-OER" to enable */
62 0, 0, /* No PER support, use "-gen-PER" to enable */
63 0, /* Use generic outmost tag fetcher */
64 asn_DEF_Message_tags_1,
65 sizeof(asn_DEF_Message_tags_1)
66 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
67 asn_DEF_Message_tags_1, /* Same as above */
68 sizeof(asn_DEF_Message_tags_1)
69 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
70 0, /* No OER visible constraints */
71 0, /* No PER visible constraints */
72 asn_MBR_Message_1,
73 1, /* Elements count */
74 &asn_SPC_Message_specs_1 /* Additional specs */
75};
76
77
78/*** <<< INCLUDES [SpecializedContent] >>> ***/
79
80#include <NativeInteger.h>
81#include <ANY.h>
82#include <asn_ioc.h>
83#include <OPEN_TYPE.h>
84#include <BOOLEAN.h>
85#include <constr_CHOICE.h>
86#include <constr_SEQUENCE.h>
87
88/*** <<< DEPS [SpecializedContent] >>> ***/
89
90typedef enum value_PR {
91 value_PR_NOTHING, /* No components present */
92 value_PR_INTEGER,
93 value_PR_BOOLEAN
94} value_PR;
95
96/*** <<< TYPE-DECLS [SpecializedContent] >>> ***/
97
98typedef struct SpecializedContent_30P0 {
99 long id;
100 struct value {
101 value_PR present;
102 union value_u {
103 long INTEGER;
104 BOOLEAN_t BOOLEAN;
105 } choice;
106
107 /* Context for parsing across buffer boundaries */
108 asn_struct_ctx_t _asn_ctx;
109 } value;
110
111 /* Context for parsing across buffer boundaries */
112 asn_struct_ctx_t _asn_ctx;
113} SpecializedContent_30P0_t;
114
115/*** <<< FUNC-DECLS [SpecializedContent] >>> ***/
116
117extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0;
118extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1;
119extern asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[2];
120
121/*** <<< IOC-TABLES [SpecializedContent] >>> ***/
122
123static const long asn_VAL_1_1 = 1;
124static const long asn_VAL_2_2 = 2;
125static const asn_ioc_cell_t asn_IOS_RegionalExtension_1_rows[] = {
126 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_1_1 },
127 { "&Type", ,
128 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_2 },
129 { "&Type",
130};
131static const asn_ioc_set_t asn_IOS_RegionalExtension_1[] = {
132 2, 2, asn_IOS_RegionalExtension_1_rows
133};
134
135/*** <<< CODE [SpecializedContent] >>> ***/
136
137static int
138memb_id_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
139 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
140
141 if(!sptr) {
142 ASN__CTFAIL(app_key, td, sptr,
143 "%s: value not given (%s:%d)",
144 td->name, __FILE__, __LINE__);
145 return -1;
146 }
147
148
149 if(1 /* No applicable constraints whatsoever */) {
150 /* Nothing is here. See below */
151 }
152
153 return td->check_constraints(td, sptr, ctfailcb, app_key);
154}
155
156static asn_type_selector_result_t
157select_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
158 asn_type_selector_result_t result = {0, 0};
159 const asn_ioc_set_t *itable = asn_IOS_RegionalExtension_1;
160 size_t constraining_column = 0; /* &id */
161 size_t for_column = 1; /* &Type */
162 size_t row;
163 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct SpecializedContent_30P0, id));
164
165 for(row=0; row < itable->rows_count; row++) {
166 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
167 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
168
169 if(constraining_cell->type_descriptor->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
170 result.type_descriptor = type_cell->type_descriptor;
171 result.presence_index = row + 1;
172 break;
173 }
174 }
175
176 return result;
177}
178
179static int
180memb_value_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
181 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
182
183 if(!sptr) {
184 ASN__CTFAIL(app_key, td, sptr,
185 "%s: value not given (%s:%d)",
186 td->name, __FILE__, __LINE__);
187 return -1;
188 }
189
190
191 if(1 /* No applicable constraints whatsoever */) {
192 /* Nothing is here. See below */
193 }
194
195 return td->check_constraints(td, sptr, ctfailcb, app_key);
196}
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,
207 .memb_constraints = 0, /* Defer constraints checking to the member type */
208 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
209 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
210 .default_value = 0,
211 .name = "INTEGER"
212 },
213 { ATF_NOFLAGS, 0, offsetof(struct value, choice.BOOLEAN),
214 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
215 .tag_mode = 0,
216 .type = &asn_DEF_BOOLEAN,
217 .type_selector = 0,
218 .memb_constraints = 0, /* Defer constraints checking to the member type */
219 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
220 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
221 .default_value = 0,
222 .name = "BOOLEAN"
223 },
224};
225static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = {
226 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* BOOLEAN */
227 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* INTEGER */
228};
229static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = {
230 sizeof(struct value),
231 offsetof(struct value, _asn_ctx),
232 offsetof(struct value, present),
233 sizeof(((struct value *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700234 .tag2el = asn_MAP_value_tag2el_3,
235 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkind8e07c52017-08-23 07:38:30 -0700236 .canonical_order = 0,
237 .ext_start = -1 /* Extensions start */
238};
239static /* Use -fall-defs-global to expose */
240asn_TYPE_descriptor_t asn_DEF_value_3 = {
241 "value",
242 "value",
243 OPEN_TYPE_free,
244 OPEN_TYPE_print,
245 OPEN_TYPE_compare,
246 OPEN_TYPE_constraint,
247 OPEN_TYPE_decode_ber,
248 OPEN_TYPE_encode_der,
249 OPEN_TYPE_decode_xer,
250 OPEN_TYPE_encode_xer,
251 0, 0, /* No OER support, use "-gen-OER" to enable */
252 0, 0, /* No PER support, use "-gen-PER" to enable */
253 0, /* Use generic outmost tag fetcher */
254 0, /* No effective tags (pointer) */
255 0, /* No effective tags (count) */
256 0, /* No tags (pointer) */
257 0, /* No tags (count) */
258 0, /* No OER visible constraints */
259 0, /* No PER visible constraints */
260 asn_MBR_value_3,
261 2, /* Elements count */
262 &asn_SPC_value_specs_3 /* Additional specs */
263};
264
265asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[] = {
266 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, id),
267 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
268 .tag_mode = 0,
269 .type = &asn_DEF_NativeInteger,
270 .type_selector = 0,
271 .memb_constraints = memb_id_constraint_1,
272 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
273 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
274 .default_value = 0,
275 .name = "id"
276 },
277 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, value),
278 .tag = -1 /* Ambiguous tag (ANY?) */,
279 .tag_mode = 0,
280 .type = &asn_DEF_value_3,
281 .type_selector = select_value_type,
282 .memb_constraints = memb_value_constraint_1,
283 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
284 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
285 .default_value = 0,
286 .name = "value"
287 },
288};
289static const ber_tlv_tag_t asn_DEF_SpecializedContent_30P0_tags_1[] = {
290 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
291};
292static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_30P0_tag2el_1[] = {
293 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
294};
295asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1 = {
296 sizeof(struct SpecializedContent_30P0),
297 offsetof(struct SpecializedContent_30P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700298 .tag2el = asn_MAP_SpecializedContent_30P0_tag2el_1,
299 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkind8e07c52017-08-23 07:38:30 -0700300 0, 0, 0, /* Optional elements (not needed) */
301 -1, /* Start extensions */
302 -1 /* Stop extensions */
303};
304asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0 = {
305 "SpecializedContent",
306 "SpecializedContent",
307 SEQUENCE_free,
308 SEQUENCE_print,
309 SEQUENCE_compare,
310 SEQUENCE_constraint,
311 SEQUENCE_decode_ber,
312 SEQUENCE_encode_der,
313 SEQUENCE_decode_xer,
314 SEQUENCE_encode_xer,
315 0, 0, /* No OER support, use "-gen-OER" to enable */
316 0, 0, /* No PER support, use "-gen-PER" to enable */
317 0, /* Use generic outmost tag fetcher */
318 asn_DEF_SpecializedContent_30P0_tags_1,
319 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
320 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
321 asn_DEF_SpecializedContent_30P0_tags_1, /* Same as above */
322 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
323 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
324 0, /* No OER visible constraints */
325 0, /* No PER visible constraints */
326 asn_MBR_SpecializedContent_30P0_1,
327 2, /* Elements count */
328 &asn_SPC_SpecializedContent_30P0_specs_1 /* Additional specs */
329};
330