blob: e871047cd9d557b934c69658714b9246d105477d [file] [log] [blame]
Lev Walkinf75b8742017-08-23 04:44:18 -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_21P0_t content13;
11 SpecializedContent_21P1_t content42;
12
13 /* Context for parsing across buffer boundaries */
14 asn_struct_ctx_t _asn_ctx;
15} Message_t;
16
17/*** <<< FUNC-DECLS [Message] >>> ***/
18
19extern asn_TYPE_descriptor_t asn_DEF_Message;
20
21/*** <<< STAT-DEFS [Message] >>> ***/
22
23static asn_TYPE_member_t asn_MBR_Message_1[] = {
24 { ATF_NOFLAGS, 0, offsetof(struct Message, content13),
25 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
26 .tag_mode = 0,
27 .type = &asn_DEF_SpecializedContent_21P0,
28 .type_selector = 0,
29 .memb_constraints = 0, /* Defer constraints checking to the member type */
30 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
31 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
32 .default_value = 0,
33 .name = "content13"
34 },
35 { ATF_NOFLAGS, 0, offsetof(struct Message, content42),
36 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
37 .tag_mode = 0,
38 .type = &asn_DEF_SpecializedContent_21P1,
39 .type_selector = 0,
40 .memb_constraints = 0, /* Defer constraints checking to the member type */
41 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
42 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
43 .default_value = 0,
44 .name = "content42"
45 },
46};
47static const ber_tlv_tag_t asn_DEF_Message_tags_1[] = {
48 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
49};
50static const asn_TYPE_tag2member_t asn_MAP_Message_tag2el_1[] = {
51 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* content13 */
52 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* content42 */
53};
54static asn_SEQUENCE_specifics_t asn_SPC_Message_specs_1 = {
55 sizeof(struct Message),
56 offsetof(struct Message, _asn_ctx),
57 asn_MAP_Message_tag2el_1,
58 2, /* Count of tags in the map */
59 0, 0, 0, /* Optional elements (not needed) */
60 -1, /* Start extensions */
61 -1 /* Stop extensions */
62};
63asn_TYPE_descriptor_t asn_DEF_Message = {
64 "Message",
65 "Message",
66 SEQUENCE_free,
67 SEQUENCE_print,
68 SEQUENCE_compare,
69 SEQUENCE_constraint,
70 SEQUENCE_decode_ber,
71 SEQUENCE_encode_der,
72 SEQUENCE_decode_xer,
73 SEQUENCE_encode_xer,
74 0, 0, /* No OER support, use "-gen-OER" to enable */
75 0, 0, /* No PER support, use "-gen-PER" to enable */
76 0, /* Use generic outmost tag fetcher */
77 asn_DEF_Message_tags_1,
78 sizeof(asn_DEF_Message_tags_1)
79 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
80 asn_DEF_Message_tags_1, /* Same as above */
81 sizeof(asn_DEF_Message_tags_1)
82 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
83 0, /* No OER visible constraints */
84 0, /* No PER visible constraints */
85 asn_MBR_Message_1,
86 2, /* Elements count */
87 &asn_SPC_Message_specs_1 /* Additional specs */
88};
89
90
91/*** <<< INCLUDES [SpecializedContent] >>> ***/
92
93#include <NativeInteger.h>
94#include <constr_SEQUENCE.h>
95
96/*** <<< TYPE-DECLS [SpecializedContent] >>> ***/
97
98typedef struct SpecializedContent_21P0 {
99 long id;
100
101 /* Context for parsing across buffer boundaries */
102 asn_struct_ctx_t _asn_ctx;
103} SpecializedContent_21P0_t;
104typedef struct SpecializedContent_21P1 {
105 long id;
106
107 /* Context for parsing across buffer boundaries */
108 asn_struct_ctx_t _asn_ctx;
109} SpecializedContent_21P1_t;
110
111/*** <<< FUNC-DECLS [SpecializedContent] >>> ***/
112
113extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P0;
114extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P0_specs_1;
115extern asn_TYPE_member_t asn_MBR_SpecializedContent_21P0_1[1];
116extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P1;
117extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P1_specs_3;
118extern asn_TYPE_member_t asn_MBR_SpecializedContent_21P1_3[1];
119
120/*** <<< CODE [SpecializedContent] >>> ***/
121
122static int
123memb_id_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
124 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
125 long value;
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 value = *(const long *)sptr;
135
136 if((value == 13)) {
137 /* Constraint check succeeded */
138 return 0;
139 } else {
140 ASN__CTFAIL(app_key, td, sptr,
141 "%s: constraint failed (%s:%d)",
142 td->name, __FILE__, __LINE__);
143 return -1;
144 }
145}
146
147static int
148memb_id_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
149 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
150 long value;
151
152 if(!sptr) {
153 ASN__CTFAIL(app_key, td, sptr,
154 "%s: value not given (%s:%d)",
155 td->name, __FILE__, __LINE__);
156 return -1;
157 }
158
159 value = *(const long *)sptr;
160
161 if((value == 42)) {
162 /* Constraint check succeeded */
163 return 0;
164 } else {
165 ASN__CTFAIL(app_key, td, sptr,
166 "%s: constraint failed (%s:%d)",
167 td->name, __FILE__, __LINE__);
168 return -1;
169 }
170}
171
172
173/*** <<< STAT-DEFS [SpecializedContent] >>> ***/
174
175asn_TYPE_member_t asn_MBR_SpecializedContent_21P0_1[] = {
176 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_21P0, id),
177 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
178 .tag_mode = 0,
179 .type = &asn_DEF_NativeInteger,
180 .type_selector = 0,
181 .memb_constraints = memb_id_constraint_1,
182 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
183 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
184 .default_value = 0,
185 .name = "id"
186 },
187};
188static const ber_tlv_tag_t asn_DEF_SpecializedContent_21P0_tags_1[] = {
189 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
190};
191static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_21P0_tag2el_1[] = {
192 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
193};
194asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P0_specs_1 = {
195 sizeof(struct SpecializedContent_21P0),
196 offsetof(struct SpecializedContent_21P0, _asn_ctx),
197 asn_MAP_SpecializedContent_21P0_tag2el_1,
198 1, /* Count of tags in the map */
199 0, 0, 0, /* Optional elements (not needed) */
200 -1, /* Start extensions */
201 -1 /* Stop extensions */
202};
203asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P0 = {
204 "SpecializedContent",
205 "SpecializedContent",
206 SEQUENCE_free,
207 SEQUENCE_print,
208 SEQUENCE_compare,
209 SEQUENCE_constraint,
210 SEQUENCE_decode_ber,
211 SEQUENCE_encode_der,
212 SEQUENCE_decode_xer,
213 SEQUENCE_encode_xer,
214 0, 0, /* No OER support, use "-gen-OER" to enable */
215 0, 0, /* No PER support, use "-gen-PER" to enable */
216 0, /* Use generic outmost tag fetcher */
217 asn_DEF_SpecializedContent_21P0_tags_1,
218 sizeof(asn_DEF_SpecializedContent_21P0_tags_1)
219 /sizeof(asn_DEF_SpecializedContent_21P0_tags_1[0]), /* 1 */
220 asn_DEF_SpecializedContent_21P0_tags_1, /* Same as above */
221 sizeof(asn_DEF_SpecializedContent_21P0_tags_1)
222 /sizeof(asn_DEF_SpecializedContent_21P0_tags_1[0]), /* 1 */
223 0, /* No OER visible constraints */
224 0, /* No PER visible constraints */
225 asn_MBR_SpecializedContent_21P0_1,
226 1, /* Elements count */
227 &asn_SPC_SpecializedContent_21P0_specs_1 /* Additional specs */
228};
229
230asn_TYPE_member_t asn_MBR_SpecializedContent_21P1_3[] = {
231 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_21P1, id),
232 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
233 .tag_mode = 0,
234 .type = &asn_DEF_NativeInteger,
235 .type_selector = 0,
236 .memb_constraints = memb_id_constraint_3,
237 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
238 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
239 .default_value = 0,
240 .name = "id"
241 },
242};
243static const ber_tlv_tag_t asn_DEF_SpecializedContent_21P1_tags_3[] = {
244 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
245};
246static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_21P1_tag2el_3[] = {
247 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
248};
249asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P1_specs_3 = {
250 sizeof(struct SpecializedContent_21P1),
251 offsetof(struct SpecializedContent_21P1, _asn_ctx),
252 asn_MAP_SpecializedContent_21P1_tag2el_3,
253 1, /* Count of tags in the map */
254 0, 0, 0, /* Optional elements (not needed) */
255 -1, /* Start extensions */
256 -1 /* Stop extensions */
257};
258asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P1 = {
259 "SpecializedContent",
260 "SpecializedContent",
261 SEQUENCE_free,
262 SEQUENCE_print,
263 SEQUENCE_compare,
264 SEQUENCE_constraint,
265 SEQUENCE_decode_ber,
266 SEQUENCE_encode_der,
267 SEQUENCE_decode_xer,
268 SEQUENCE_encode_xer,
269 0, 0, /* No OER support, use "-gen-OER" to enable */
270 0, 0, /* No PER support, use "-gen-PER" to enable */
271 0, /* Use generic outmost tag fetcher */
272 asn_DEF_SpecializedContent_21P1_tags_3,
273 sizeof(asn_DEF_SpecializedContent_21P1_tags_3)
274 /sizeof(asn_DEF_SpecializedContent_21P1_tags_3[0]), /* 1 */
275 asn_DEF_SpecializedContent_21P1_tags_3, /* Same as above */
276 sizeof(asn_DEF_SpecializedContent_21P1_tags_3)
277 /sizeof(asn_DEF_SpecializedContent_21P1_tags_3[0]), /* 1 */
278 0, /* No OER visible constraints */
279 0, /* No PER visible constraints */
280 asn_MBR_SpecializedContent_21P1_3,
281 1, /* Elements count */
282 &asn_SPC_SpecializedContent_21P1_specs_3 /* Additional specs */
283};
284