blob: e92c4ce17b79015e6d650066ac8844bf7bb7c46c [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),
Lev Walkine3917082017-08-23 10:29:38 -070057 .tag2el = asn_MAP_Message_tag2el_1,
58 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkinf75b8742017-08-23 04:44:18 -070059 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",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080066 &asn_OP_SEQUENCE,
Lev Walkinf75b8742017-08-23 04:44:18 -070067 SEQUENCE_constraint,
Lev Walkinf75b8742017-08-23 04:44:18 -070068 asn_DEF_Message_tags_1,
69 sizeof(asn_DEF_Message_tags_1)
70 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
71 asn_DEF_Message_tags_1, /* Same as above */
72 sizeof(asn_DEF_Message_tags_1)
73 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
74 0, /* No OER visible constraints */
75 0, /* No PER visible constraints */
76 asn_MBR_Message_1,
77 2, /* Elements count */
78 &asn_SPC_Message_specs_1 /* Additional specs */
79};
80
81
82/*** <<< INCLUDES [SpecializedContent] >>> ***/
83
84#include <NativeInteger.h>
85#include <constr_SEQUENCE.h>
86
87/*** <<< TYPE-DECLS [SpecializedContent] >>> ***/
88
89typedef struct SpecializedContent_21P0 {
90 long id;
91
92 /* Context for parsing across buffer boundaries */
93 asn_struct_ctx_t _asn_ctx;
94} SpecializedContent_21P0_t;
95typedef struct SpecializedContent_21P1 {
96 long id;
97
98 /* Context for parsing across buffer boundaries */
99 asn_struct_ctx_t _asn_ctx;
100} SpecializedContent_21P1_t;
101
102/*** <<< FUNC-DECLS [SpecializedContent] >>> ***/
103
104extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P0;
105extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P0_specs_1;
106extern asn_TYPE_member_t asn_MBR_SpecializedContent_21P0_1[1];
107extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P1;
108extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P1_specs_3;
109extern asn_TYPE_member_t asn_MBR_SpecializedContent_21P1_3[1];
110
111/*** <<< CODE [SpecializedContent] >>> ***/
112
113static int
114memb_id_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
115 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
116 long value;
117
118 if(!sptr) {
119 ASN__CTFAIL(app_key, td, sptr,
120 "%s: value not given (%s:%d)",
121 td->name, __FILE__, __LINE__);
122 return -1;
123 }
124
125 value = *(const long *)sptr;
126
127 if((value == 13)) {
128 /* Constraint check succeeded */
129 return 0;
130 } else {
131 ASN__CTFAIL(app_key, td, sptr,
132 "%s: constraint failed (%s:%d)",
133 td->name, __FILE__, __LINE__);
134 return -1;
135 }
136}
137
138static int
139memb_id_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
140 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
141 long value;
142
143 if(!sptr) {
144 ASN__CTFAIL(app_key, td, sptr,
145 "%s: value not given (%s:%d)",
146 td->name, __FILE__, __LINE__);
147 return -1;
148 }
149
150 value = *(const long *)sptr;
151
152 if((value == 42)) {
153 /* Constraint check succeeded */
154 return 0;
155 } else {
156 ASN__CTFAIL(app_key, td, sptr,
157 "%s: constraint failed (%s:%d)",
158 td->name, __FILE__, __LINE__);
159 return -1;
160 }
161}
162
163
164/*** <<< STAT-DEFS [SpecializedContent] >>> ***/
165
166asn_TYPE_member_t asn_MBR_SpecializedContent_21P0_1[] = {
167 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_21P0, id),
168 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
169 .tag_mode = 0,
170 .type = &asn_DEF_NativeInteger,
171 .type_selector = 0,
172 .memb_constraints = memb_id_constraint_1,
173 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
174 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
175 .default_value = 0,
176 .name = "id"
177 },
178};
179static const ber_tlv_tag_t asn_DEF_SpecializedContent_21P0_tags_1[] = {
180 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
181};
182static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_21P0_tag2el_1[] = {
183 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
184};
185asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P0_specs_1 = {
186 sizeof(struct SpecializedContent_21P0),
187 offsetof(struct SpecializedContent_21P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700188 .tag2el = asn_MAP_SpecializedContent_21P0_tag2el_1,
189 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkinf75b8742017-08-23 04:44:18 -0700190 0, 0, 0, /* Optional elements (not needed) */
191 -1, /* Start extensions */
192 -1 /* Stop extensions */
193};
194asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P0 = {
195 "SpecializedContent",
196 "SpecializedContent",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800197 &asn_OP_SEQUENCE,
Lev Walkinf75b8742017-08-23 04:44:18 -0700198 SEQUENCE_constraint,
Lev Walkinf75b8742017-08-23 04:44:18 -0700199 asn_DEF_SpecializedContent_21P0_tags_1,
200 sizeof(asn_DEF_SpecializedContent_21P0_tags_1)
201 /sizeof(asn_DEF_SpecializedContent_21P0_tags_1[0]), /* 1 */
202 asn_DEF_SpecializedContent_21P0_tags_1, /* Same as above */
203 sizeof(asn_DEF_SpecializedContent_21P0_tags_1)
204 /sizeof(asn_DEF_SpecializedContent_21P0_tags_1[0]), /* 1 */
205 0, /* No OER visible constraints */
206 0, /* No PER visible constraints */
207 asn_MBR_SpecializedContent_21P0_1,
208 1, /* Elements count */
209 &asn_SPC_SpecializedContent_21P0_specs_1 /* Additional specs */
210};
211
212asn_TYPE_member_t asn_MBR_SpecializedContent_21P1_3[] = {
213 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_21P1, id),
214 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
215 .tag_mode = 0,
216 .type = &asn_DEF_NativeInteger,
217 .type_selector = 0,
218 .memb_constraints = memb_id_constraint_3,
219 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
220 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
221 .default_value = 0,
222 .name = "id"
223 },
224};
225static const ber_tlv_tag_t asn_DEF_SpecializedContent_21P1_tags_3[] = {
226 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
227};
228static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_21P1_tag2el_3[] = {
229 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
230};
231asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P1_specs_3 = {
232 sizeof(struct SpecializedContent_21P1),
233 offsetof(struct SpecializedContent_21P1, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700234 .tag2el = asn_MAP_SpecializedContent_21P1_tag2el_3,
235 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkinf75b8742017-08-23 04:44:18 -0700236 0, 0, 0, /* Optional elements (not needed) */
237 -1, /* Start extensions */
238 -1 /* Stop extensions */
239};
240asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P1 = {
241 "SpecializedContent",
242 "SpecializedContent",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800243 &asn_OP_SEQUENCE,
Lev Walkinf75b8742017-08-23 04:44:18 -0700244 SEQUENCE_constraint,
Lev Walkinf75b8742017-08-23 04:44:18 -0700245 asn_DEF_SpecializedContent_21P1_tags_3,
246 sizeof(asn_DEF_SpecializedContent_21P1_tags_3)
247 /sizeof(asn_DEF_SpecializedContent_21P1_tags_3[0]), /* 1 */
248 asn_DEF_SpecializedContent_21P1_tags_3, /* Same as above */
249 sizeof(asn_DEF_SpecializedContent_21P1_tags_3)
250 /sizeof(asn_DEF_SpecializedContent_21P1_tags_3[0]), /* 1 */
251 0, /* No OER visible constraints */
252 0, /* No PER visible constraints */
253 asn_MBR_SpecializedContent_21P1_3,
254 1, /* Elements count */
255 &asn_SPC_SpecializedContent_21P1_specs_3 /* Additional specs */
256};
257