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