blob: 5e59610d554601670183136f53a74e2cb358bcac [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,
Lev Walkin0bfea562017-09-29 23:16:48 -070028 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -070029 0, 0, /* No default value */
Lev Walkin20dc6242017-08-27 23:44:39 -070030 .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) */
Lev Walkindf2edbb2017-10-21 13:40:07 -070045 -1, /* First extension addition */
Lev Walkin20dc6242017-08-27 23:44:39 -070046};
47asn_TYPE_descriptor_t asn_DEF_Message = {
48 "Message",
49 "Message",
50 &asn_OP_SEQUENCE,
Lev Walkin20dc6242017-08-27 23:44:39 -070051 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 */
Lev Walkin0bfea562017-09-29 23:16:48 -070057 { 0, 0, SEQUENCE_constraint },
Lev Walkin20dc6242017-08-27 23:44:39 -070058 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 <constr_CHOICE.h>
72#include <constr_SEQUENCE.h>
73
74/*** <<< DEPS [SpecializedContent] >>> ***/
75
76typedef enum value_PR {
77 value_PR_NOTHING, /* No components present */
78 value_PR_INTEGER,
79 value_PR_BOOLEAN
80} value_PR;
81
82/*** <<< TYPE-DECLS [SpecializedContent] >>> ***/
83
84typedef struct SpecializedContent_30P0 {
85 long id;
86 struct value {
87 value_PR present;
Bi-Ruei, Chiue460c3b2017-10-19 20:49:17 +080088 union SpecializedContent_30P0__value_u {
Lev Walkin20dc6242017-08-27 23:44:39 -070089 long INTEGER;
90 BOOLEAN_t BOOLEAN;
91 } choice;
92
93 /* Context for parsing across buffer boundaries */
94 asn_struct_ctx_t _asn_ctx;
95 } value;
96
97 /* Context for parsing across buffer boundaries */
98 asn_struct_ctx_t _asn_ctx;
99} SpecializedContent_30P0_t;
100
101/*** <<< FUNC-DECLS [SpecializedContent] >>> ***/
102
103extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0;
104extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1;
105extern asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[2];
106
107/*** <<< IOC-TABLES [SpecializedContent] >>> ***/
108
109static const long asn_VAL_1_1 = 1;
110static const long asn_VAL_2_2 = 2;
111static const asn_ioc_cell_t asn_IOS_RegionalExtension_1_rows[] = {
112 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_1_1 },
113 { "&Type", ,
114 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_2 },
115 { "&Type",
116};
117static const asn_ioc_set_t asn_IOS_RegionalExtension_1[] = {
118 2, 2, asn_IOS_RegionalExtension_1_rows
119};
120
121/*** <<< CODE [SpecializedContent] >>> ***/
122
123static int
Lev Walkin20696a42017-10-17 21:27:33 -0700124memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin20dc6242017-08-27 23:44:39 -0700125 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
126
127 if(!sptr) {
128 ASN__CTFAIL(app_key, td, sptr,
129 "%s: value not given (%s:%d)",
130 td->name, __FILE__, __LINE__);
131 return -1;
132 }
133
134
135 if(1 /* No applicable constraints whatsoever */) {
136 /* Nothing is here. See below */
137 }
138
Lev Walkin0bfea562017-09-29 23:16:48 -0700139 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin20dc6242017-08-27 23:44:39 -0700140}
141
142static asn_type_selector_result_t
Bi-Ruei, Chiue460c3b2017-10-19 20:49:17 +0800143select_SpecializedContent_30P0_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
Lev Walkin20dc6242017-08-27 23:44:39 -0700144 asn_type_selector_result_t result = {0, 0};
145 const asn_ioc_set_t *itable = asn_IOS_RegionalExtension_1;
146 size_t constraining_column = 0; /* &id */
147 size_t for_column = 1; /* &Type */
148 size_t row;
149 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct SpecializedContent_30P0, id));
150
151 for(row=0; row < itable->rows_count; row++) {
152 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
153 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
154
155 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
156 result.type_descriptor = type_cell->type_descriptor;
157 result.presence_index = row + 1;
158 break;
159 }
160 }
161
162 return result;
163}
164
165static int
Lev Walkin20696a42017-10-17 21:27:33 -0700166memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin20dc6242017-08-27 23:44:39 -0700167 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
168
169 if(!sptr) {
170 ASN__CTFAIL(app_key, td, sptr,
171 "%s: value not given (%s:%d)",
172 td->name, __FILE__, __LINE__);
173 return -1;
174 }
175
176
177 if(1 /* No applicable constraints whatsoever */) {
178 /* Nothing is here. See below */
179 }
180
Lev Walkin0bfea562017-09-29 23:16:48 -0700181 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin20dc6242017-08-27 23:44:39 -0700182}
183
184
185/*** <<< CTDEFS [SpecializedContent] >>> ***/
186
Lev Walkin0479e042017-09-26 18:39:58 -0700187static asn_per_constraints_t asn_PER_memb_id_constr_2 CC_NOTUSED = {
Lev Walkin20dc6242017-08-27 23:44:39 -0700188 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
189 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
190 0, 0 /* No PER value map */
191};
Lev Walkin0479e042017-09-26 18:39:58 -0700192static asn_per_constraints_t asn_PER_memb_value_constr_3 CC_NOTUSED = {
Lev Walkin20dc6242017-08-27 23:44:39 -0700193 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
194 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
195 0, 0 /* No PER value map */
196};
197
198/*** <<< STAT-DEFS [SpecializedContent] >>> ***/
199
200static asn_TYPE_member_t asn_MBR_value_3[] = {
201 { ATF_NOFLAGS, 0, offsetof(struct value, choice.INTEGER),
202 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
203 .tag_mode = 0,
204 .type = &asn_DEF_NativeInteger,
205 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700206 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700207 0, 0, /* No default value */
Lev Walkin20dc6242017-08-27 23:44:39 -0700208 .name = "INTEGER"
209 },
210 { ATF_NOFLAGS, 0, offsetof(struct value, choice.BOOLEAN),
211 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
212 .tag_mode = 0,
213 .type = &asn_DEF_BOOLEAN,
214 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700215 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700216 0, 0, /* No default value */
Lev Walkin20dc6242017-08-27 23:44:39 -0700217 .name = "BOOLEAN"
218 },
219};
Lev Walkin20696a42017-10-17 21:27:33 -0700220static const unsigned asn_MAP_value_to_canonical_3[] = { 1, 0 };
221static const unsigned asn_MAP_value_from_canonical_3[] = { 1, 0 };
Lev Walkin20dc6242017-08-27 23:44:39 -0700222static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = {
223 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* BOOLEAN */
224 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* INTEGER */
225};
226static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = {
227 sizeof(struct value),
228 offsetof(struct value, _asn_ctx),
229 offsetof(struct value, present),
230 sizeof(((struct value *)0)->present),
231 .tag2el = asn_MAP_value_tag2el_3,
232 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin20696a42017-10-17 21:27:33 -0700233 .to_canonical_order = asn_MAP_value_to_canonical_3,
234 .from_canonical_order = asn_MAP_value_from_canonical_3,
Lev Walkindf2edbb2017-10-21 13:40:07 -0700235 .first_extension = -1 /* Extensions start */
Lev Walkin20dc6242017-08-27 23:44:39 -0700236};
237static /* Use -fall-defs-global to expose */
238asn_TYPE_descriptor_t asn_DEF_value_3 = {
239 "value",
240 "value",
241 &asn_OP_OPEN_TYPE,
Lev Walkin20dc6242017-08-27 23:44:39 -0700242 0, /* No effective tags (pointer) */
243 0, /* No effective tags (count) */
244 0, /* No tags (pointer) */
245 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700246 { 0, 0, OPEN_TYPE_constraint },
Lev Walkin20dc6242017-08-27 23:44:39 -0700247 asn_MBR_value_3,
248 2, /* Elements count */
249 &asn_SPC_value_specs_3 /* Additional specs */
250};
251
252asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[] = {
253 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, id),
254 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
255 .tag_mode = 0,
256 .type = &asn_DEF_NativeInteger,
257 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700258 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_id_constr_2, .general_constraints = memb_id_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700259 0, 0, /* No default value */
Lev Walkin20dc6242017-08-27 23:44:39 -0700260 .name = "id"
261 },
262 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, value),
263 .tag = -1 /* Ambiguous tag (ANY?) */,
264 .tag_mode = 0,
265 .type = &asn_DEF_value_3,
Bi-Ruei, Chiue460c3b2017-10-19 20:49:17 +0800266 .type_selector = select_SpecializedContent_30P0_value_type,
Lev Walkin0bfea562017-09-29 23:16:48 -0700267 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_value_constr_3, .general_constraints = memb_value_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700268 0, 0, /* No default value */
Lev Walkin20dc6242017-08-27 23:44:39 -0700269 .name = "value"
270 },
271};
272static const ber_tlv_tag_t asn_DEF_SpecializedContent_30P0_tags_1[] = {
273 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
274};
275static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_30P0_tag2el_1[] = {
276 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
277};
278asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1 = {
279 sizeof(struct SpecializedContent_30P0),
280 offsetof(struct SpecializedContent_30P0, _asn_ctx),
281 .tag2el = asn_MAP_SpecializedContent_30P0_tag2el_1,
282 .tag2el_count = 1, /* Count of tags in the map */
283 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -0700284 -1, /* First extension addition */
Lev Walkin20dc6242017-08-27 23:44:39 -0700285};
286asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0 = {
287 "SpecializedContent",
288 "SpecializedContent",
289 &asn_OP_SEQUENCE,
Lev Walkin20dc6242017-08-27 23:44:39 -0700290 asn_DEF_SpecializedContent_30P0_tags_1,
291 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
292 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
293 asn_DEF_SpecializedContent_30P0_tags_1, /* Same as above */
294 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
295 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700296 { 0, 0, SEQUENCE_constraint },
Lev Walkin20dc6242017-08-27 23:44:39 -0700297 asn_MBR_SpecializedContent_30P0_1,
298 2, /* Elements count */
299 &asn_SPC_SpecializedContent_30P0_specs_1 /* Additional specs */
300};
301