blob: 0a50ab8ee85b21edf77ef304c89e4db44626c8f3 [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,
Lev Walkin0bfea562017-09-29 23:16:48 -070029 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -070030 0, 0, /* No default value */
Lev Walkinf75b8742017-08-23 04:44:18 -070031 .name = "content13"
32 },
33 { ATF_NOFLAGS, 0, offsetof(struct Message, content42),
34 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
35 .tag_mode = 0,
36 .type = &asn_DEF_SpecializedContent_21P1,
37 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070038 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -070039 0, 0, /* No default value */
Lev Walkinf75b8742017-08-23 04:44:18 -070040 .name = "content42"
41 },
42};
43static const ber_tlv_tag_t asn_DEF_Message_tags_1[] = {
44 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
45};
46static const asn_TYPE_tag2member_t asn_MAP_Message_tag2el_1[] = {
47 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* content13 */
48 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* content42 */
49};
50static asn_SEQUENCE_specifics_t asn_SPC_Message_specs_1 = {
51 sizeof(struct Message),
52 offsetof(struct Message, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -070053 .tag2el = asn_MAP_Message_tag2el_1,
54 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkinf75b8742017-08-23 04:44:18 -070055 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -070056 -1, /* First extension addition */
Lev Walkinf75b8742017-08-23 04:44:18 -070057};
58asn_TYPE_descriptor_t asn_DEF_Message = {
59 "Message",
60 "Message",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080061 &asn_OP_SEQUENCE,
Lev Walkinf75b8742017-08-23 04:44:18 -070062 asn_DEF_Message_tags_1,
63 sizeof(asn_DEF_Message_tags_1)
64 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
65 asn_DEF_Message_tags_1, /* Same as above */
66 sizeof(asn_DEF_Message_tags_1)
67 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -070068 { 0, 0, SEQUENCE_constraint },
Lev Walkinf75b8742017-08-23 04:44:18 -070069 asn_MBR_Message_1,
70 2, /* Elements count */
71 &asn_SPC_Message_specs_1 /* Additional specs */
72};
73
74
75/*** <<< INCLUDES [SpecializedContent] >>> ***/
76
77#include <NativeInteger.h>
78#include <constr_SEQUENCE.h>
79
80/*** <<< TYPE-DECLS [SpecializedContent] >>> ***/
81
82typedef struct SpecializedContent_21P0 {
83 long id;
84
85 /* Context for parsing across buffer boundaries */
86 asn_struct_ctx_t _asn_ctx;
87} SpecializedContent_21P0_t;
88typedef struct SpecializedContent_21P1 {
89 long id;
90
91 /* Context for parsing across buffer boundaries */
92 asn_struct_ctx_t _asn_ctx;
93} SpecializedContent_21P1_t;
94
95/*** <<< FUNC-DECLS [SpecializedContent] >>> ***/
96
97extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P0;
98extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P0_specs_1;
99extern asn_TYPE_member_t asn_MBR_SpecializedContent_21P0_1[1];
100extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P1;
101extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P1_specs_3;
102extern asn_TYPE_member_t asn_MBR_SpecializedContent_21P1_3[1];
103
104/*** <<< CODE [SpecializedContent] >>> ***/
105
106static int
Lev Walkin20696a42017-10-17 21:27:33 -0700107memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkinf75b8742017-08-23 04:44:18 -0700108 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
109 long value;
110
111 if(!sptr) {
112 ASN__CTFAIL(app_key, td, sptr,
113 "%s: value not given (%s:%d)",
114 td->name, __FILE__, __LINE__);
115 return -1;
116 }
117
118 value = *(const long *)sptr;
119
120 if((value == 13)) {
121 /* Constraint check succeeded */
122 return 0;
123 } else {
124 ASN__CTFAIL(app_key, td, sptr,
125 "%s: constraint failed (%s:%d)",
126 td->name, __FILE__, __LINE__);
127 return -1;
128 }
129}
130
131static int
Lev Walkin20696a42017-10-17 21:27:33 -0700132memb_id_constraint_3(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkinf75b8742017-08-23 04:44:18 -0700133 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
134 long value;
135
136 if(!sptr) {
137 ASN__CTFAIL(app_key, td, sptr,
138 "%s: value not given (%s:%d)",
139 td->name, __FILE__, __LINE__);
140 return -1;
141 }
142
143 value = *(const long *)sptr;
144
145 if((value == 42)) {
146 /* Constraint check succeeded */
147 return 0;
148 } else {
149 ASN__CTFAIL(app_key, td, sptr,
150 "%s: constraint failed (%s:%d)",
151 td->name, __FILE__, __LINE__);
152 return -1;
153 }
154}
155
156
157/*** <<< STAT-DEFS [SpecializedContent] >>> ***/
158
159asn_TYPE_member_t asn_MBR_SpecializedContent_21P0_1[] = {
160 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_21P0, id),
161 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
162 .tag_mode = 0,
163 .type = &asn_DEF_NativeInteger,
164 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700165 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_id_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700166 0, 0, /* No default value */
Lev Walkinf75b8742017-08-23 04:44:18 -0700167 .name = "id"
168 },
169};
170static const ber_tlv_tag_t asn_DEF_SpecializedContent_21P0_tags_1[] = {
171 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
172};
173static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_21P0_tag2el_1[] = {
174 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
175};
176asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P0_specs_1 = {
177 sizeof(struct SpecializedContent_21P0),
178 offsetof(struct SpecializedContent_21P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700179 .tag2el = asn_MAP_SpecializedContent_21P0_tag2el_1,
180 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkinf75b8742017-08-23 04:44:18 -0700181 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -0700182 -1, /* First extension addition */
Lev Walkinf75b8742017-08-23 04:44:18 -0700183};
184asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P0 = {
185 "SpecializedContent",
186 "SpecializedContent",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800187 &asn_OP_SEQUENCE,
Lev Walkinf75b8742017-08-23 04:44:18 -0700188 asn_DEF_SpecializedContent_21P0_tags_1,
189 sizeof(asn_DEF_SpecializedContent_21P0_tags_1)
190 /sizeof(asn_DEF_SpecializedContent_21P0_tags_1[0]), /* 1 */
191 asn_DEF_SpecializedContent_21P0_tags_1, /* Same as above */
192 sizeof(asn_DEF_SpecializedContent_21P0_tags_1)
193 /sizeof(asn_DEF_SpecializedContent_21P0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700194 { 0, 0, SEQUENCE_constraint },
Lev Walkinf75b8742017-08-23 04:44:18 -0700195 asn_MBR_SpecializedContent_21P0_1,
196 1, /* Elements count */
197 &asn_SPC_SpecializedContent_21P0_specs_1 /* Additional specs */
198};
199
200asn_TYPE_member_t asn_MBR_SpecializedContent_21P1_3[] = {
201 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_21P1, id),
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 = memb_id_constraint_3 },
Lev Walkin20696a42017-10-17 21:27:33 -0700207 0, 0, /* No default value */
Lev Walkinf75b8742017-08-23 04:44:18 -0700208 .name = "id"
209 },
210};
211static const ber_tlv_tag_t asn_DEF_SpecializedContent_21P1_tags_3[] = {
212 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
213};
214static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_21P1_tag2el_3[] = {
215 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
216};
217asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P1_specs_3 = {
218 sizeof(struct SpecializedContent_21P1),
219 offsetof(struct SpecializedContent_21P1, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700220 .tag2el = asn_MAP_SpecializedContent_21P1_tag2el_3,
221 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkinf75b8742017-08-23 04:44:18 -0700222 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -0700223 -1, /* First extension addition */
Lev Walkinf75b8742017-08-23 04:44:18 -0700224};
225asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P1 = {
226 "SpecializedContent",
227 "SpecializedContent",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800228 &asn_OP_SEQUENCE,
Lev Walkinf75b8742017-08-23 04:44:18 -0700229 asn_DEF_SpecializedContent_21P1_tags_3,
230 sizeof(asn_DEF_SpecializedContent_21P1_tags_3)
231 /sizeof(asn_DEF_SpecializedContent_21P1_tags_3[0]), /* 1 */
232 asn_DEF_SpecializedContent_21P1_tags_3, /* Same as above */
233 sizeof(asn_DEF_SpecializedContent_21P1_tags_3)
234 /sizeof(asn_DEF_SpecializedContent_21P1_tags_3[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700235 { 0, 0, SEQUENCE_constraint },
Lev Walkinf75b8742017-08-23 04:44:18 -0700236 asn_MBR_SpecializedContent_21P1_3,
237 1, /* Elements count */
238 &asn_SPC_SpecializedContent_21P1_specs_3 /* Additional specs */
239};
240