blob: 873ca73f810a2036c44407f8b911f8ef15cf4166 [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 Walkinf75b8742017-08-23 04:44:18 -070030 .default_value = 0,
31 .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 Walkinf75b8742017-08-23 04:44:18 -070039 .default_value = 0,
40 .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) */
56 -1, /* Start extensions */
57 -1 /* Stop extensions */
58};
59asn_TYPE_descriptor_t asn_DEF_Message = {
60 "Message",
61 "Message",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080062 &asn_OP_SEQUENCE,
Lev Walkinf75b8742017-08-23 04:44:18 -070063 asn_DEF_Message_tags_1,
64 sizeof(asn_DEF_Message_tags_1)
65 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
66 asn_DEF_Message_tags_1, /* Same as above */
67 sizeof(asn_DEF_Message_tags_1)
68 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -070069 { 0, 0, SEQUENCE_constraint },
Lev Walkinf75b8742017-08-23 04:44:18 -070070 asn_MBR_Message_1,
71 2, /* Elements count */
72 &asn_SPC_Message_specs_1 /* Additional specs */
73};
74
75
76/*** <<< INCLUDES [SpecializedContent] >>> ***/
77
78#include <NativeInteger.h>
79#include <constr_SEQUENCE.h>
80
81/*** <<< TYPE-DECLS [SpecializedContent] >>> ***/
82
83typedef struct SpecializedContent_21P0 {
84 long id;
85
86 /* Context for parsing across buffer boundaries */
87 asn_struct_ctx_t _asn_ctx;
88} SpecializedContent_21P0_t;
89typedef struct SpecializedContent_21P1 {
90 long id;
91
92 /* Context for parsing across buffer boundaries */
93 asn_struct_ctx_t _asn_ctx;
94} SpecializedContent_21P1_t;
95
96/*** <<< FUNC-DECLS [SpecializedContent] >>> ***/
97
98extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P0;
99extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P0_specs_1;
100extern asn_TYPE_member_t asn_MBR_SpecializedContent_21P0_1[1];
101extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P1;
102extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P1_specs_3;
103extern asn_TYPE_member_t asn_MBR_SpecializedContent_21P1_3[1];
104
105/*** <<< CODE [SpecializedContent] >>> ***/
106
107static int
108memb_id_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
109 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
110 long value;
111
112 if(!sptr) {
113 ASN__CTFAIL(app_key, td, sptr,
114 "%s: value not given (%s:%d)",
115 td->name, __FILE__, __LINE__);
116 return -1;
117 }
118
119 value = *(const long *)sptr;
120
121 if((value == 13)) {
122 /* Constraint check succeeded */
123 return 0;
124 } else {
125 ASN__CTFAIL(app_key, td, sptr,
126 "%s: constraint failed (%s:%d)",
127 td->name, __FILE__, __LINE__);
128 return -1;
129 }
130}
131
132static int
133memb_id_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
134 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
135 long value;
136
137 if(!sptr) {
138 ASN__CTFAIL(app_key, td, sptr,
139 "%s: value not given (%s:%d)",
140 td->name, __FILE__, __LINE__);
141 return -1;
142 }
143
144 value = *(const long *)sptr;
145
146 if((value == 42)) {
147 /* Constraint check succeeded */
148 return 0;
149 } else {
150 ASN__CTFAIL(app_key, td, sptr,
151 "%s: constraint failed (%s:%d)",
152 td->name, __FILE__, __LINE__);
153 return -1;
154 }
155}
156
157
158/*** <<< STAT-DEFS [SpecializedContent] >>> ***/
159
160asn_TYPE_member_t asn_MBR_SpecializedContent_21P0_1[] = {
161 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_21P0, id),
162 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
163 .tag_mode = 0,
164 .type = &asn_DEF_NativeInteger,
165 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700166 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_id_constraint_1 },
Lev Walkinf75b8742017-08-23 04:44:18 -0700167 .default_value = 0,
168 .name = "id"
169 },
170};
171static const ber_tlv_tag_t asn_DEF_SpecializedContent_21P0_tags_1[] = {
172 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
173};
174static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_21P0_tag2el_1[] = {
175 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
176};
177asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P0_specs_1 = {
178 sizeof(struct SpecializedContent_21P0),
179 offsetof(struct SpecializedContent_21P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700180 .tag2el = asn_MAP_SpecializedContent_21P0_tag2el_1,
181 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkinf75b8742017-08-23 04:44:18 -0700182 0, 0, 0, /* Optional elements (not needed) */
183 -1, /* Start extensions */
184 -1 /* Stop extensions */
185};
186asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P0 = {
187 "SpecializedContent",
188 "SpecializedContent",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800189 &asn_OP_SEQUENCE,
Lev Walkinf75b8742017-08-23 04:44:18 -0700190 asn_DEF_SpecializedContent_21P0_tags_1,
191 sizeof(asn_DEF_SpecializedContent_21P0_tags_1)
192 /sizeof(asn_DEF_SpecializedContent_21P0_tags_1[0]), /* 1 */
193 asn_DEF_SpecializedContent_21P0_tags_1, /* Same as above */
194 sizeof(asn_DEF_SpecializedContent_21P0_tags_1)
195 /sizeof(asn_DEF_SpecializedContent_21P0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700196 { 0, 0, SEQUENCE_constraint },
Lev Walkinf75b8742017-08-23 04:44:18 -0700197 asn_MBR_SpecializedContent_21P0_1,
198 1, /* Elements count */
199 &asn_SPC_SpecializedContent_21P0_specs_1 /* Additional specs */
200};
201
202asn_TYPE_member_t asn_MBR_SpecializedContent_21P1_3[] = {
203 { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_21P1, id),
204 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
205 .tag_mode = 0,
206 .type = &asn_DEF_NativeInteger,
207 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700208 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_id_constraint_3 },
Lev Walkinf75b8742017-08-23 04:44:18 -0700209 .default_value = 0,
210 .name = "id"
211 },
212};
213static const ber_tlv_tag_t asn_DEF_SpecializedContent_21P1_tags_3[] = {
214 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
215};
216static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_21P1_tag2el_3[] = {
217 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
218};
219asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P1_specs_3 = {
220 sizeof(struct SpecializedContent_21P1),
221 offsetof(struct SpecializedContent_21P1, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700222 .tag2el = asn_MAP_SpecializedContent_21P1_tag2el_3,
223 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkinf75b8742017-08-23 04:44:18 -0700224 0, 0, 0, /* Optional elements (not needed) */
225 -1, /* Start extensions */
226 -1 /* Stop extensions */
227};
228asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P1 = {
229 "SpecializedContent",
230 "SpecializedContent",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800231 &asn_OP_SEQUENCE,
Lev Walkinf75b8742017-08-23 04:44:18 -0700232 asn_DEF_SpecializedContent_21P1_tags_3,
233 sizeof(asn_DEF_SpecializedContent_21P1_tags_3)
234 /sizeof(asn_DEF_SpecializedContent_21P1_tags_3[0]), /* 1 */
235 asn_DEF_SpecializedContent_21P1_tags_3, /* Same as above */
236 sizeof(asn_DEF_SpecializedContent_21P1_tags_3)
237 /sizeof(asn_DEF_SpecializedContent_21P1_tags_3[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700238 { 0, 0, SEQUENCE_constraint },
Lev Walkinf75b8742017-08-23 04:44:18 -0700239 asn_MBR_SpecializedContent_21P1_3,
240 1, /* Elements count */
241 &asn_SPC_SpecializedContent_21P1_specs_3 /* Additional specs */
242};
243