blob: bddcb1405aad7af7f90e69df1361833d975c5c54 [file] [log] [blame]
Lev Walkinad0d6372017-08-08 02:02:42 -07001
2/*** <<< INCLUDES [Frame] >>> ***/
3
4#include <NativeInteger.h>
5#include <ANY.h>
6#include <asn_ioc.h>
7#include "PrimitiveMessage.h"
8#include "ComplexMessage.h"
9#include <constr_SEQUENCE.h>
10
11/*** <<< TYPE-DECLS [Frame] >>> ***/
12
13typedef struct Frame {
14 long ident;
15 ANY_t value;
16 /*
17 * This type is extensible,
18 * possible extensions are below.
19 */
20
21 /* Context for parsing across buffer boundaries */
22 asn_struct_ctx_t _asn_ctx;
23} Frame_t;
24
25/*** <<< FUNC-DECLS [Frame] >>> ***/
26
27extern asn_TYPE_descriptor_t asn_DEF_Frame;
28
29/*** <<< CODE [Frame] >>> ***/
30
31static int
32memb_ident_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
33 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
34
35 if(!sptr) {
36 ASN__CTFAIL(app_key, td, sptr,
37 "%s: value not given (%s:%d)",
38 td->name, __FILE__, __LINE__);
39 return -1;
40 }
41
42
43 if(1 /* No applicable constraints whatsoever */) {
44 /* Nothing is here. See below */
45 }
46
47 return td->check_constraints(td, sptr, ctfailcb, app_key);
48}
49
50static int
51memb_value_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
52 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
53
54 if(!sptr) {
55 ASN__CTFAIL(app_key, td, sptr,
56 "%s: value not given (%s:%d)",
57 td->name, __FILE__, __LINE__);
58 return -1;
59 }
60
61
62 if(1 /* No applicable constraints whatsoever */) {
63 /* Nothing is here. See below */
64 }
65
66 return td->check_constraints(td, sptr, ctfailcb, app_key);
67}
68
69
70/*** <<< STAT-DEFS [Frame] >>> ***/
71
72static const long asn_VAL_basicMessage_0 = 1;
73static const long asn_VAL_2_0 = 2;
74static const asn_ioc_cell_t asn_IOS_FrameTypes_1_rows[] = {
75 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_basicMessage_0 },
76 { "&Type", aioc__type, &asn_DEF_PrimitiveMessage },
77 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_0 },
78 { "&Type", aioc__type, &asn_DEF_ComplexMessage }
79};
80static asn_ioc_set_t asn_IOS_FrameTypes_1[] = {
81 2, 2, asn_IOS_FrameTypes_1_rows
82};
83static asn_TYPE_member_t asn_MBR_Frame_1[] = {
84 { ATF_NOFLAGS, 0, offsetof(struct Frame, ident),
85 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
86 .tag_mode = 0,
87 .type = &asn_DEF_NativeInteger,
88 .memb_constraints = memb_ident_constraint_1,
89 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
90 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
91 .default_value = 0,
92 .name = "ident"
93 },
94 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct Frame, value),
95 .tag = -1 /* Ambiguous tag (ANY?) */,
96 .tag_mode = 0,
97 .type = &asn_DEF_ANY,
98 .memb_constraints = memb_value_constraint_1,
99 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
100 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
101 .default_value = 0,
102 .name = "value"
103 },
104};
105static const ber_tlv_tag_t asn_DEF_Frame_tags_1[] = {
106 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
107};
108static const asn_TYPE_tag2member_t asn_MAP_Frame_tag2el_1[] = {
109 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* ident */
110};
111static asn_SEQUENCE_specifics_t asn_SPC_Frame_specs_1 = {
112 sizeof(struct Frame),
113 offsetof(struct Frame, _asn_ctx),
114 asn_MAP_Frame_tag2el_1,
115 1, /* Count of tags in the map */
116 0, 0, 0, /* Optional elements (not needed) */
117 1, /* Start extensions */
118 3 /* Stop extensions */
119};
120asn_TYPE_descriptor_t asn_DEF_Frame = {
121 "Frame",
122 "Frame",
123 SEQUENCE_free,
124 SEQUENCE_print,
125 SEQUENCE_constraint,
126 SEQUENCE_decode_ber,
127 SEQUENCE_encode_der,
128 SEQUENCE_decode_xer,
129 SEQUENCE_encode_xer,
130 0, 0, /* No OER support, use "-gen-OER" to enable */
131 0, 0, /* No PER support, use "-gen-PER" to enable */
132 0, /* Use generic outmost tag fetcher */
133 asn_DEF_Frame_tags_1,
134 sizeof(asn_DEF_Frame_tags_1)
135 /sizeof(asn_DEF_Frame_tags_1[0]), /* 1 */
136 asn_DEF_Frame_tags_1, /* Same as above */
137 sizeof(asn_DEF_Frame_tags_1)
138 /sizeof(asn_DEF_Frame_tags_1[0]), /* 1 */
139 0, /* No OER visible constraints */
140 0, /* No PER visible constraints */
141 asn_MBR_Frame_1,
142 2, /* Elements count */
143 &asn_SPC_Frame_specs_1 /* Additional specs */
144};
145
146
147/*** <<< INCLUDES [PrimitiveMessage] >>> ***/
148
149#include <constr_SEQUENCE.h>
150
151/*** <<< TYPE-DECLS [PrimitiveMessage] >>> ***/
152
153typedef struct PrimitiveMessage {
154
155 /* Context for parsing across buffer boundaries */
156 asn_struct_ctx_t _asn_ctx;
157} PrimitiveMessage_t;
158
159/*** <<< FUNC-DECLS [PrimitiveMessage] >>> ***/
160
161extern asn_TYPE_descriptor_t asn_DEF_PrimitiveMessage;
162extern asn_SEQUENCE_specifics_t asn_SPC_PrimitiveMessage_specs_1;
163
164/*** <<< STAT-DEFS [PrimitiveMessage] >>> ***/
165
166static const ber_tlv_tag_t asn_DEF_PrimitiveMessage_tags_1[] = {
167 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
168};
169asn_SEQUENCE_specifics_t asn_SPC_PrimitiveMessage_specs_1 = {
170 sizeof(struct PrimitiveMessage),
171 offsetof(struct PrimitiveMessage, _asn_ctx),
172 0, /* No top level tags */
173 0, /* No tags in the map */
174 0, 0, 0, /* Optional elements (not needed) */
175 -1, /* Start extensions */
176 -1 /* Stop extensions */
177};
178asn_TYPE_descriptor_t asn_DEF_PrimitiveMessage = {
179 "PrimitiveMessage",
180 "PrimitiveMessage",
181 SEQUENCE_free,
182 SEQUENCE_print,
183 SEQUENCE_constraint,
184 SEQUENCE_decode_ber,
185 SEQUENCE_encode_der,
186 SEQUENCE_decode_xer,
187 SEQUENCE_encode_xer,
188 0, 0, /* No OER support, use "-gen-OER" to enable */
189 0, 0, /* No PER support, use "-gen-PER" to enable */
190 0, /* Use generic outmost tag fetcher */
191 asn_DEF_PrimitiveMessage_tags_1,
192 sizeof(asn_DEF_PrimitiveMessage_tags_1)
193 /sizeof(asn_DEF_PrimitiveMessage_tags_1[0]), /* 1 */
194 asn_DEF_PrimitiveMessage_tags_1, /* Same as above */
195 sizeof(asn_DEF_PrimitiveMessage_tags_1)
196 /sizeof(asn_DEF_PrimitiveMessage_tags_1[0]), /* 1 */
197 0, /* No OER visible constraints */
198 0, /* No PER visible constraints */
199 0, 0, /* No members */
200 &asn_SPC_PrimitiveMessage_specs_1 /* Additional specs */
201};
202
203
204/*** <<< INCLUDES [ComplexMessage] >>> ***/
205
206#include <constr_SEQUENCE.h>
207
208/*** <<< TYPE-DECLS [ComplexMessage] >>> ***/
209
210typedef struct ComplexMessage {
211
212 /* Context for parsing across buffer boundaries */
213 asn_struct_ctx_t _asn_ctx;
214} ComplexMessage_t;
215
216/*** <<< FUNC-DECLS [ComplexMessage] >>> ***/
217
218extern asn_TYPE_descriptor_t asn_DEF_ComplexMessage;
219extern asn_SEQUENCE_specifics_t asn_SPC_ComplexMessage_specs_1;
220
221/*** <<< STAT-DEFS [ComplexMessage] >>> ***/
222
223static const ber_tlv_tag_t asn_DEF_ComplexMessage_tags_1[] = {
224 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
225};
226asn_SEQUENCE_specifics_t asn_SPC_ComplexMessage_specs_1 = {
227 sizeof(struct ComplexMessage),
228 offsetof(struct ComplexMessage, _asn_ctx),
229 0, /* No top level tags */
230 0, /* No tags in the map */
231 0, 0, 0, /* Optional elements (not needed) */
232 -1, /* Start extensions */
233 -1 /* Stop extensions */
234};
235asn_TYPE_descriptor_t asn_DEF_ComplexMessage = {
236 "ComplexMessage",
237 "ComplexMessage",
238 SEQUENCE_free,
239 SEQUENCE_print,
240 SEQUENCE_constraint,
241 SEQUENCE_decode_ber,
242 SEQUENCE_encode_der,
243 SEQUENCE_decode_xer,
244 SEQUENCE_encode_xer,
245 0, 0, /* No OER support, use "-gen-OER" to enable */
246 0, 0, /* No PER support, use "-gen-PER" to enable */
247 0, /* Use generic outmost tag fetcher */
248 asn_DEF_ComplexMessage_tags_1,
249 sizeof(asn_DEF_ComplexMessage_tags_1)
250 /sizeof(asn_DEF_ComplexMessage_tags_1[0]), /* 1 */
251 asn_DEF_ComplexMessage_tags_1, /* Same as above */
252 sizeof(asn_DEF_ComplexMessage_tags_1)
253 /sizeof(asn_DEF_ComplexMessage_tags_1[0]), /* 1 */
254 0, /* No OER visible constraints */
255 0, /* No PER visible constraints */
256 0, 0, /* No members */
257 &asn_SPC_ComplexMessage_specs_1 /* Additional specs */
258};
259