blob: 89a6699925d6ff8ee7fbf6c6abd146ca00ca1752 [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 Walkin20696a42017-10-17 21:27:33 -070029 0, 0, /* No default value */
Lev Walkind8e07c52017-08-23 07:38:30 -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),
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) */
Lev Walkindf2edbb2017-10-21 13:40:07 -070045 -1, /* First extension addition */
Lev Walkind8e07c52017-08-23 07:38:30 -070046};
47asn_TYPE_descriptor_t asn_DEF_Message = {
48 "Message",
49 "Message",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080050 &asn_OP_SEQUENCE,
Lev Walkind8e07c52017-08-23 07:38:30 -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 Walkind8e07c52017-08-23 07:38:30 -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 Walkind8e07c52017-08-23 07:38:30 -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 Walkind8e07c52017-08-23 07:38:30 -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 Walkind8e07c52017-08-23 07:38:30 -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 Walkind8e07c52017-08-23 07:38:30 -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
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800155 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 -0700156 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 Walkind8e07c52017-08-23 07:38:30 -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 Walkind8e07c52017-08-23 07:38:30 -0700182}
183
184
185/*** <<< STAT-DEFS [SpecializedContent] >>> ***/
186
187static asn_TYPE_member_t asn_MBR_value_3[] = {
188 { ATF_NOFLAGS, 0, offsetof(struct value, choice.INTEGER),
189 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
190 .tag_mode = 0,
191 .type = &asn_DEF_NativeInteger,
192 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700193 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700194 0, 0, /* No default value */
Lev Walkind8e07c52017-08-23 07:38:30 -0700195 .name = "INTEGER"
196 },
197 { ATF_NOFLAGS, 0, offsetof(struct value, choice.BOOLEAN),
198 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
199 .tag_mode = 0,
200 .type = &asn_DEF_BOOLEAN,
201 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700202 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700203 0, 0, /* No default value */
Lev Walkind8e07c52017-08-23 07:38:30 -0700204 .name = "BOOLEAN"
205 },
206};
207static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = {
208 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* BOOLEAN */
209 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* INTEGER */
210};
211static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = {
212 sizeof(struct value),
213 offsetof(struct value, _asn_ctx),
214 offsetof(struct value, present),
215 sizeof(((struct value *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700216 .tag2el = asn_MAP_value_tag2el_3,
217 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin20696a42017-10-17 21:27:33 -0700218 0, 0,
Lev Walkindf2edbb2017-10-21 13:40:07 -0700219 .first_extension = -1 /* Extensions start */
Lev Walkind8e07c52017-08-23 07:38:30 -0700220};
221static /* Use -fall-defs-global to expose */
222asn_TYPE_descriptor_t asn_DEF_value_3 = {
223 "value",
224 "value",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800225 &asn_OP_OPEN_TYPE,
Lev Walkind8e07c52017-08-23 07:38:30 -0700226 0, /* No effective tags (pointer) */
227 0, /* No effective tags (count) */
228 0, /* No tags (pointer) */
229 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700230 { 0, 0, OPEN_TYPE_constraint },
Lev Walkind8e07c52017-08-23 07:38:30 -0700231 asn_MBR_value_3,
232 2, /* Elements count */
233 &asn_SPC_value_specs_3 /* Additional specs */
234};
235
236asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[] = {
237 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, id),
238 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
239 .tag_mode = 0,
240 .type = &asn_DEF_NativeInteger,
241 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700242 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_id_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700243 0, 0, /* No default value */
Lev Walkind8e07c52017-08-23 07:38:30 -0700244 .name = "id"
245 },
246 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, value),
247 .tag = -1 /* Ambiguous tag (ANY?) */,
248 .tag_mode = 0,
249 .type = &asn_DEF_value_3,
Bi-Ruei, Chiue460c3b2017-10-19 20:49:17 +0800250 .type_selector = select_SpecializedContent_30P0_value_type,
Lev Walkin0bfea562017-09-29 23:16:48 -0700251 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_value_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700252 0, 0, /* No default value */
Lev Walkind8e07c52017-08-23 07:38:30 -0700253 .name = "value"
254 },
255};
256static const ber_tlv_tag_t asn_DEF_SpecializedContent_30P0_tags_1[] = {
257 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
258};
259static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_30P0_tag2el_1[] = {
260 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
261};
262asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1 = {
263 sizeof(struct SpecializedContent_30P0),
264 offsetof(struct SpecializedContent_30P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700265 .tag2el = asn_MAP_SpecializedContent_30P0_tag2el_1,
266 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkind8e07c52017-08-23 07:38:30 -0700267 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -0700268 -1, /* First extension addition */
Lev Walkind8e07c52017-08-23 07:38:30 -0700269};
270asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0 = {
271 "SpecializedContent",
272 "SpecializedContent",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800273 &asn_OP_SEQUENCE,
Lev Walkind8e07c52017-08-23 07:38:30 -0700274 asn_DEF_SpecializedContent_30P0_tags_1,
275 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
276 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
277 asn_DEF_SpecializedContent_30P0_tags_1, /* Same as above */
278 sizeof(asn_DEF_SpecializedContent_30P0_tags_1)
279 /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700280 { 0, 0, SEQUENCE_constraint },
Lev Walkind8e07c52017-08-23 07:38:30 -0700281 asn_MBR_SpecializedContent_30P0_1,
282 2, /* Elements count */
283 &asn_SPC_SpecializedContent_30P0_specs_1 /* Additional specs */
284};
285