blob: b574e56436b99080f3f92b653f3e590cbc38f7d3 [file] [log] [blame]
Bi-Ruei, Chiu2387ff32017-10-24 13:46:11 +08001
2/*** <<< INCLUDES [Message] >>> ***/
3
4#include "SpecializedContent.h"
5#include <constr_SEQUENCE.h>
6
7/*** <<< TYPE-DECLS [Message] >>> ***/
8
9typedef struct Message {
10 SpecializedContent_42P0_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_42P0,
27 .type_selector = 0,
28 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
29 0, 0, /* No default value */
30 .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, /* First extension addition */
46};
47asn_TYPE_descriptor_t asn_DEF_Message = {
48 "Message",
49 "Message",
50 &asn_OP_SEQUENCE,
51 asn_DEF_Message_tags_1,
52 sizeof(asn_DEF_Message_tags_1)
53 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
54 asn_DEF_Message_tags_1, /* Same as above */
55 sizeof(asn_DEF_Message_tags_1)
56 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
57 { 0, 0, SEQUENCE_constraint },
58 asn_MBR_Message_1,
59 1, /* Elements count */
60 &asn_SPC_Message_specs_1 /* Additional specs */
61};
62
63
64/*** <<< INCLUDES [SpecializedContent] >>> ***/
65
66#include <NativeInteger.h>
67#include <ANY.h>
68#include <asn_ioc.h>
69#include <OPEN_TYPE.h>
70#include <BOOLEAN.h>
71#include <OCTET_STRING.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_BOOLEAN,
82 value_PR_OCTET_STRING
83} value_PR;
84
85/*** <<< TYPE-DECLS [SpecializedContent] >>> ***/
86
87typedef struct SpecializedContent_42P0 {
88 long id;
89 struct value {
90 value_PR present;
91 union SpecializedContent_42P0__value_u {
92 long INTEGER;
93 BOOLEAN_t BOOLEAN;
94 ;
95 OCTET_STRING_t OCTET_STRING;
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_42P0_t;
105
106/*** <<< FUNC-DECLS [SpecializedContent] >>> ***/
107
108extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_42P0;
109extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_42P0_specs_1;
110extern asn_TYPE_member_t asn_MBR_SpecializedContent_42P0_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 long asn_VAL_3_2 = 2;
117static const long asn_VAL_4_3 = 3;
118static const asn_ioc_cell_t asn_IOS_TotalRegionExtension_1_rows[] = {
119 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_1_1 },
120 { "&Type", ,
121 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_2 },
122 { "&Type", ,
123 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_3_2 },
124 { "&Type", ,
125 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_4_3 },
126 { "&Type",
127};
128static const asn_ioc_set_t asn_IOS_TotalRegionExtension_1[] = {
129 4, 2, asn_IOS_TotalRegionExtension_1_rows
130};
131
132/*** <<< CODE [SpecializedContent] >>> ***/
133
134static int
135memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
136 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
137
138 if(!sptr) {
139 ASN__CTFAIL(app_key, td, sptr,
140 "%s: value not given (%s:%d)",
141 td->name, __FILE__, __LINE__);
142 return -1;
143 }
144
145
146 if(1 /* No applicable constraints whatsoever */) {
147 /* Nothing is here. See below */
148 }
149
150 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
151}
152
153static asn_type_selector_result_t
154select_SpecializedContent_42P0_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
155 asn_type_selector_result_t result = {0, 0};
156 const asn_ioc_set_t *itable = asn_IOS_TotalRegionExtension_1;
157 size_t constraining_column = 0; /* &id */
158 size_t for_column = 1; /* &Type */
159 size_t row;
160 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct SpecializedContent_42P0, id));
161
162 for(row=0; row < itable->rows_count; row++) {
163 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
164 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
165
166 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
167 result.type_descriptor = type_cell->type_descriptor;
168 result.presence_index = row + 1;
169 break;
170 }
171 }
172
173 return result;
174}
175
176static int
177memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
178 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
179
180 if(!sptr) {
181 ASN__CTFAIL(app_key, td, sptr,
182 "%s: value not given (%s:%d)",
183 td->name, __FILE__, __LINE__);
184 return -1;
185 }
186
187
188 if(1 /* No applicable constraints whatsoever */) {
189 /* Nothing is here. See below */
190 }
191
192 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
193}
194
195
196/*** <<< CTDEFS [SpecializedContent] >>> ***/
197
198static asn_per_constraints_t asn_PER_memb_id_constr_2 CC_NOTUSED = {
199 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
200 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
201 0, 0 /* No PER value map */
202};
203static asn_per_constraints_t asn_PER_memb_value_constr_3 CC_NOTUSED = {
204 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
205 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
206 0, 0 /* No PER value map */
207};
208
209/*** <<< STAT-DEFS [SpecializedContent] >>> ***/
210
211static asn_TYPE_member_t asn_MBR_value_3[] = {
212 { ATF_NOFLAGS, 0, offsetof(struct value, choice.INTEGER),
213 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
214 .tag_mode = 0,
215 .type = &asn_DEF_NativeInteger,
216 .type_selector = 0,
217 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
218 0, 0, /* No default value */
219 .name = "INTEGER"
220 },
221 { ATF_NOFLAGS, 0, offsetof(struct value, choice.BOOLEAN),
222 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
223 .tag_mode = 0,
224 .type = &asn_DEF_BOOLEAN,
225 .type_selector = 0,
226 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
227 0, 0, /* No default value */
228 .name = "BOOLEAN"
229 },
230 { ATF_NOFLAGS, 0, offsetof(struct value, choice.BOOLEAN),
231 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
232 .tag_mode = 0,
233 .type = &asn_DEF_BOOLEAN,
234 .type_selector = 0,
235 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
236 0, 0, /* No default value */
237 .name = "BOOLEAN"
238 },
239 { ATF_NOFLAGS, 0, offsetof(struct value, choice.OCTET_STRING),
240 .tag = (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
241 .tag_mode = 0,
242 .type = &asn_DEF_OCTET_STRING,
243 .type_selector = 0,
244 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
245 0, 0, /* No default value */
246 .name = "OCTET STRING"
247 },
248};
249static const unsigned asn_MAP_value_to_canonical_3[] = { 1, 2, 0, 3 };
250static const unsigned asn_MAP_value_from_canonical_3[] = { 2, 0, 1, 3 };
251static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = {
252 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 1 }, /* BOOLEAN */
253 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 2, -1, 0 }, /* BOOLEAN */
254 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* INTEGER */
255 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, 0, 0 } /* OCTET STRING */
256};
257static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = {
258 sizeof(struct value),
259 offsetof(struct value, _asn_ctx),
260 offsetof(struct value, present),
261 sizeof(((struct value *)0)->present),
262 .tag2el = asn_MAP_value_tag2el_3,
263 .tag2el_count = 4, /* Count of tags in the map */
264 .to_canonical_order = asn_MAP_value_to_canonical_3,
265 .from_canonical_order = asn_MAP_value_from_canonical_3,
266 .first_extension = -1 /* Extensions start */
267};
268static /* Use -fall-defs-global to expose */
269asn_TYPE_descriptor_t asn_DEF_value_3 = {
270 "value",
271 "value",
272 &asn_OP_OPEN_TYPE,
273 0, /* No effective tags (pointer) */
274 0, /* No effective tags (count) */
275 0, /* No tags (pointer) */
276 0, /* No tags (count) */
277 { 0, 0, OPEN_TYPE_constraint },
278 asn_MBR_value_3,
279 4, /* Elements count */
280 &asn_SPC_value_specs_3 /* Additional specs */
281};
282
283asn_TYPE_member_t asn_MBR_SpecializedContent_42P0_1[] = {
284 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_42P0, id),
285 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
286 .tag_mode = 0,
287 .type = &asn_DEF_NativeInteger,
288 .type_selector = 0,
289 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_id_constr_2, .general_constraints = memb_id_constraint_1 },
290 0, 0, /* No default value */
291 .name = "id"
292 },
293 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_42P0, value),
294 .tag = -1 /* Ambiguous tag (ANY?) */,
295 .tag_mode = 0,
296 .type = &asn_DEF_value_3,
297 .type_selector = select_SpecializedContent_42P0_value_type,
298 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_value_constr_3, .general_constraints = memb_value_constraint_1 },
299 0, 0, /* No default value */
300 .name = "value"
301 },
302};
303static const ber_tlv_tag_t asn_DEF_SpecializedContent_42P0_tags_1[] = {
304 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
305};
306static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_42P0_tag2el_1[] = {
307 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
308};
309asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_42P0_specs_1 = {
310 sizeof(struct SpecializedContent_42P0),
311 offsetof(struct SpecializedContent_42P0, _asn_ctx),
312 .tag2el = asn_MAP_SpecializedContent_42P0_tag2el_1,
313 .tag2el_count = 1, /* Count of tags in the map */
314 0, 0, 0, /* Optional elements (not needed) */
315 -1, /* First extension addition */
316};
317asn_TYPE_descriptor_t asn_DEF_SpecializedContent_42P0 = {
318 "SpecializedContent",
319 "SpecializedContent",
320 &asn_OP_SEQUENCE,
321 asn_DEF_SpecializedContent_42P0_tags_1,
322 sizeof(asn_DEF_SpecializedContent_42P0_tags_1)
323 /sizeof(asn_DEF_SpecializedContent_42P0_tags_1[0]), /* 1 */
324 asn_DEF_SpecializedContent_42P0_tags_1, /* Same as above */
325 sizeof(asn_DEF_SpecializedContent_42P0_tags_1)
326 /sizeof(asn_DEF_SpecializedContent_42P0_tags_1[0]), /* 1 */
327 { 0, 0, SEQUENCE_constraint },
328 asn_MBR_SpecializedContent_42P0_1,
329 2, /* Elements count */
330 &asn_SPC_SpecializedContent_42P0_specs_1 /* Additional specs */
331};
332