blob: 23fa442f9cfd6a4250ddb1e222a2c99f98b03b7d [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,
Lev Walkin0bfea562017-09-29 23:16:48 -070028 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkind8e07c52017-08-23 07:38:30 -070029 .default_value = 0,
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),
Lev Walkine3917082017-08-23 10:29:38 -070042 .tag2el = asn_MAP_Message_tag2el_1,
43 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkind8e07c52017-08-23 07:38:30 -070044 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",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080051 &asn_OP_SEQUENCE,
Lev Walkind8e07c52017-08-23 07:38:30 -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 Walkind8e07c52017-08-23 07:38:30 -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
125memb_id_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
126 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 Walkind8e07c52017-08-23 07:38:30 -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
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800156 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 -0700157 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
167memb_value_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
168 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 Walkind8e07c52017-08-23 07:38:30 -0700183}
184
185
186/*** <<< STAT-DEFS [SpecializedContent] >>> ***/
187
188static asn_TYPE_member_t asn_MBR_value_3[] = {
189 { ATF_NOFLAGS, 0, offsetof(struct value, choice.INTEGER),
190 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
191 .tag_mode = 0,
192 .type = &asn_DEF_NativeInteger,
193 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700194 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkind8e07c52017-08-23 07:38:30 -0700195 .default_value = 0,
196 .name = "INTEGER"
197 },
198 { ATF_NOFLAGS, 0, offsetof(struct value, choice.BOOLEAN),
199 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
200 .tag_mode = 0,
201 .type = &asn_DEF_BOOLEAN,
202 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700203 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkind8e07c52017-08-23 07:38:30 -0700204 .default_value = 0,
205 .name = "BOOLEAN"
206 },
207};
208static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = {
209 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* BOOLEAN */
210 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* INTEGER */
211};
212static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = {
213 sizeof(struct value),
214 offsetof(struct value, _asn_ctx),
215 offsetof(struct value, present),
216 sizeof(((struct value *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700217 .tag2el = asn_MAP_value_tag2el_3,
218 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkind8e07c52017-08-23 07:38:30 -0700219 .canonical_order = 0,
220 .ext_start = -1 /* Extensions start */
221};
222static /* Use -fall-defs-global to expose */
223asn_TYPE_descriptor_t asn_DEF_value_3 = {
224 "value",
225 "value",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800226 &asn_OP_OPEN_TYPE,
Lev Walkind8e07c52017-08-23 07:38:30 -0700227 0, /* No effective tags (pointer) */
228 0, /* No effective tags (count) */
229 0, /* No tags (pointer) */
230 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700231 { 0, 0, OPEN_TYPE_constraint },
Lev Walkind8e07c52017-08-23 07:38:30 -0700232 asn_MBR_value_3,
233 2, /* Elements count */
234 &asn_SPC_value_specs_3 /* Additional specs */
235};
236
237asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[] = {
238 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, id),
239 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
240 .tag_mode = 0,
241 .type = &asn_DEF_NativeInteger,
242 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700243 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_id_constraint_1 },
Lev Walkind8e07c52017-08-23 07:38:30 -0700244 .default_value = 0,
245 .name = "id"
246 },
247 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, value),
248 .tag = -1 /* Ambiguous tag (ANY?) */,
249 .tag_mode = 0,
250 .type = &asn_DEF_value_3,
251 .type_selector = select_value_type,
Lev Walkin0bfea562017-09-29 23:16:48 -0700252 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_value_constraint_1 },
Lev Walkind8e07c52017-08-23 07:38:30 -0700253 .default_value = 0,
254 .name = "value"
255 },
256};
257static const ber_tlv_tag_t asn_DEF_SpecializedContent_30P0_tags_1[] = {
258 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
259};
260static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_30P0_tag2el_1[] = {
261 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
262};
263asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1 = {
264 sizeof(struct SpecializedContent_30P0),
265 offsetof(struct SpecializedContent_30P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700266 .tag2el = asn_MAP_SpecializedContent_30P0_tag2el_1,
267 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkind8e07c52017-08-23 07:38:30 -0700268 0, 0, 0, /* Optional elements (not needed) */
269 -1, /* Start extensions */
270 -1 /* Stop extensions */
271};
272asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0 = {
273 "SpecializedContent",
274 "SpecializedContent",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800275 &asn_OP_SEQUENCE,
Lev Walkind8e07c52017-08-23 07:38:30 -0700276 asn_DEF_SpecializedContent_30P0_tags_1,
277 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
278 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
279 asn_DEF_SpecializedContent_30P0_tags_1, /* Same as above */
280 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
281 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700282 { 0, 0, SEQUENCE_constraint },
Lev Walkind8e07c52017-08-23 07:38:30 -0700283 asn_MBR_SpecializedContent_30P0_1,
284 2, /* Elements count */
285 &asn_SPC_SpecializedContent_30P0_specs_1 /* Additional specs */
286};
287