blob: 5c010eadda87a499ebd1334d5ebf5d5f9c6b65ea [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",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080053 &asn_OP_SEQUENCE,
Lev Walkind8e07c52017-08-23 07:38:30 -070054 SEQUENCE_constraint,
Lev Walkind8e07c52017-08-23 07:38:30 -070055 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
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800160 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
Lev Walkind8e07c52017-08-23 07:38:30 -0700161 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/*** <<< STAT-DEFS [SpecializedContent] >>> ***/
191
192static asn_TYPE_member_t asn_MBR_value_3[] = {
193 { ATF_NOFLAGS, 0, offsetof(struct value, choice.INTEGER),
194 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
195 .tag_mode = 0,
196 .type = &asn_DEF_NativeInteger,
197 .type_selector = 0,
198 .memb_constraints = 0, /* Defer constraints checking to the member type */
199 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
200 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
201 .default_value = 0,
202 .name = "INTEGER"
203 },
204 { ATF_NOFLAGS, 0, offsetof(struct value, choice.BOOLEAN),
205 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
206 .tag_mode = 0,
207 .type = &asn_DEF_BOOLEAN,
208 .type_selector = 0,
209 .memb_constraints = 0, /* Defer constraints checking to the member type */
210 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
211 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
212 .default_value = 0,
213 .name = "BOOLEAN"
214 },
215};
216static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = {
217 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* BOOLEAN */
218 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* INTEGER */
219};
220static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = {
221 sizeof(struct value),
222 offsetof(struct value, _asn_ctx),
223 offsetof(struct value, present),
224 sizeof(((struct value *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700225 .tag2el = asn_MAP_value_tag2el_3,
226 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkind8e07c52017-08-23 07:38:30 -0700227 .canonical_order = 0,
228 .ext_start = -1 /* Extensions start */
229};
230static /* Use -fall-defs-global to expose */
231asn_TYPE_descriptor_t asn_DEF_value_3 = {
232 "value",
233 "value",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800234 &asn_OP_OPEN_TYPE,
Lev Walkind8e07c52017-08-23 07:38:30 -0700235 OPEN_TYPE_constraint,
Lev Walkind8e07c52017-08-23 07:38:30 -0700236 0, /* No effective tags (pointer) */
237 0, /* No effective tags (count) */
238 0, /* No tags (pointer) */
239 0, /* No tags (count) */
240 0, /* No OER visible constraints */
241 0, /* No PER visible constraints */
242 asn_MBR_value_3,
243 2, /* Elements count */
244 &asn_SPC_value_specs_3 /* Additional specs */
245};
246
247asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[] = {
248 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, id),
249 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
250 .tag_mode = 0,
251 .type = &asn_DEF_NativeInteger,
252 .type_selector = 0,
253 .memb_constraints = memb_id_constraint_1,
254 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
255 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
256 .default_value = 0,
257 .name = "id"
258 },
259 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, value),
260 .tag = -1 /* Ambiguous tag (ANY?) */,
261 .tag_mode = 0,
262 .type = &asn_DEF_value_3,
263 .type_selector = select_value_type,
264 .memb_constraints = memb_value_constraint_1,
265 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
266 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
267 .default_value = 0,
268 .name = "value"
269 },
270};
271static const ber_tlv_tag_t asn_DEF_SpecializedContent_30P0_tags_1[] = {
272 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
273};
274static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_30P0_tag2el_1[] = {
275 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
276};
277asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1 = {
278 sizeof(struct SpecializedContent_30P0),
279 offsetof(struct SpecializedContent_30P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700280 .tag2el = asn_MAP_SpecializedContent_30P0_tag2el_1,
281 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkind8e07c52017-08-23 07:38:30 -0700282 0, 0, 0, /* Optional elements (not needed) */
283 -1, /* Start extensions */
284 -1 /* Stop extensions */
285};
286asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0 = {
287 "SpecializedContent",
288 "SpecializedContent",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800289 &asn_OP_SEQUENCE,
Lev Walkind8e07c52017-08-23 07:38:30 -0700290 SEQUENCE_constraint,
Lev Walkind8e07c52017-08-23 07:38:30 -0700291 asn_DEF_SpecializedContent_30P0_tags_1,
292 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
293 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
294 asn_DEF_SpecializedContent_30P0_tags_1, /* Same as above */
295 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
296 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
297 0, /* No OER visible constraints */
298 0, /* No PER visible constraints */
299 asn_MBR_SpecializedContent_30P0_1,
300 2, /* Elements count */
301 &asn_SPC_SpecializedContent_30P0_specs_1 /* Additional specs */
302};
303