blob: 73d057156e634efe8ef7e810a478bca7be6fc80d [file] [log] [blame]
Lev Walkinc8285712005-03-04 22:18:20 +00001
2/*** <<< INCLUDES [Type] >>> ***/
3
4#include <asn_SEQUENCE_OF.h>
5#include <constr_SEQUENCE_OF.h>
6#include <constr_SEQUENCE.h>
7
8/*** <<< FWD-DECLS [Type] >>> ***/
9
Lev Walkinbf56d542005-03-04 23:50:56 +000010struct Epyt;
Lev Walkinc8285712005-03-04 22:18:20 +000011
12/*** <<< TYPE-DECLS [Type] >>> ***/
13
14typedef struct Type {
15 struct data {
16 A_SEQUENCE_OF(struct Epyt) list;
17
18 /* Context for parsing across buffer boundaries */
19 asn_struct_ctx_t _asn_ctx;
20 } data;
21
22 /* Context for parsing across buffer boundaries */
23 asn_struct_ctx_t _asn_ctx;
24} Type_t;
25
26/*** <<< FUNC-DECLS [Type] >>> ***/
27
28extern asn_TYPE_descriptor_t asn_DEF_Type;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080029extern asn_SEQUENCE_specifics_t asn_SPC_Type_specs_1;
30extern asn_TYPE_member_t asn_MBR_Type_1[1];
Lev Walkinc8285712005-03-04 22:18:20 +000031
32/*** <<< POST-INCLUDE [Type] >>> ***/
33
Lev Walkin22b5ed42006-09-13 02:51:20 +000034#include "EpytRef.h"
Lev Walkinc8285712005-03-04 22:18:20 +000035
36/*** <<< STAT-DEFS [Type] >>> ***/
37
38static asn_TYPE_member_t asn_MBR_data_2[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +000039 { ATF_POINTER, 0, 0,
Lev Walkinc8285712005-03-04 22:18:20 +000040 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
41 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +000042 .type = &asn_DEF_EpytRef,
Lev Walkin67a30122017-08-10 05:48:54 -070043 .type_selector = 0,
Lev Walkinc8285712005-03-04 22:18:20 +000044 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040045 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000046 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
47 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +000048 .name = ""
49 },
50};
Lev Walkina7591b52014-10-12 18:37:35 -070051static const ber_tlv_tag_t asn_DEF_data_tags_2[] = {
Lev Walkinc8285712005-03-04 22:18:20 +000052 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
53};
Lev Walkin59b176e2005-11-26 11:25:14 +000054static asn_SET_OF_specifics_t asn_SPC_data_specs_2 = {
Lev Walkinc8285712005-03-04 22:18:20 +000055 sizeof(struct data),
56 offsetof(struct data, _asn_ctx),
57 0, /* XER encoding is XMLDelimitedItemList */
58};
59static /* Use -fall-defs-global to expose */
60asn_TYPE_descriptor_t asn_DEF_data_2 = {
61 "data",
62 "data",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080063 &asn_OP_SEQUENCE_OF,
Lev Walkinc8285712005-03-04 22:18:20 +000064 SEQUENCE_OF_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +000065 asn_DEF_data_tags_2,
66 sizeof(asn_DEF_data_tags_2)
67 /sizeof(asn_DEF_data_tags_2[0]), /* 1 */
68 asn_DEF_data_tags_2, /* Same as above */
69 sizeof(asn_DEF_data_tags_2)
70 /sizeof(asn_DEF_data_tags_2[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +040071 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +000072 0, /* No PER visible constraints */
Lev Walkinc8285712005-03-04 22:18:20 +000073 asn_MBR_data_2,
74 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +000075 &asn_SPC_data_specs_2 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +000076};
77
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080078asn_TYPE_member_t asn_MBR_Type_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +000079 { ATF_NOFLAGS, 0, offsetof(struct Type, data),
80 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
81 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +000082 .type = &asn_DEF_data_2,
Lev Walkin67a30122017-08-10 05:48:54 -070083 .type_selector = 0,
Lev Walkinc8285712005-03-04 22:18:20 +000084 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040085 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000086 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
87 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +000088 .name = "data"
89 },
90};
Lev Walkina7591b52014-10-12 18:37:35 -070091static const ber_tlv_tag_t asn_DEF_Type_tags_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +000092 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
93};
Lev Walkina7591b52014-10-12 18:37:35 -070094static const asn_TYPE_tag2member_t asn_MAP_Type_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070095 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* data */
Lev Walkinc8285712005-03-04 22:18:20 +000096};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080097asn_SEQUENCE_specifics_t asn_SPC_Type_specs_1 = {
Lev Walkinc8285712005-03-04 22:18:20 +000098 sizeof(struct Type),
99 offsetof(struct Type, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700100 .tag2el = asn_MAP_Type_tag2el_1,
101 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000102 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinc8285712005-03-04 22:18:20 +0000103 -1, /* Start extensions */
104 -1 /* Stop extensions */
105};
106asn_TYPE_descriptor_t asn_DEF_Type = {
107 "Type",
108 "Type",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800109 &asn_OP_SEQUENCE,
Lev Walkinc8285712005-03-04 22:18:20 +0000110 SEQUENCE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000111 asn_DEF_Type_tags_1,
112 sizeof(asn_DEF_Type_tags_1)
113 /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
114 asn_DEF_Type_tags_1, /* Same as above */
115 sizeof(asn_DEF_Type_tags_1)
116 /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400117 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000118 0, /* No PER visible constraints */
Lev Walkinc8285712005-03-04 22:18:20 +0000119 asn_MBR_Type_1,
120 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000121 &asn_SPC_Type_specs_1 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000122};
123
124
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000125/*** <<< INCLUDES [EpytRef] >>> ***/
126
Lev Walkin22b5ed42006-09-13 02:51:20 +0000127#include "Epyt.h"
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000128
129/*** <<< TYPE-DECLS [EpytRef] >>> ***/
130
131typedef Epyt_t EpytRef_t;
132
133/*** <<< FUNC-DECLS [EpytRef] >>> ***/
134
135extern asn_TYPE_descriptor_t asn_DEF_EpytRef;
136asn_struct_free_f EpytRef_free;
137asn_struct_print_f EpytRef_print;
138asn_constr_check_f EpytRef_constraint;
139ber_type_decoder_f EpytRef_decode_ber;
140der_type_encoder_f EpytRef_encode_der;
141xer_type_decoder_f EpytRef_decode_xer;
142xer_type_encoder_f EpytRef_encode_xer;
143
144/*** <<< CODE [EpytRef] >>> ***/
145
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000146/*
147 * This type is implemented using Epyt,
148 * so here we adjust the DEF accordingly.
149 */
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000150
151/*** <<< STAT-DEFS [EpytRef] >>> ***/
152
Lev Walkina7591b52014-10-12 18:37:35 -0700153static const ber_tlv_tag_t asn_DEF_EpytRef_tags_1[] = {
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000154 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
155};
156asn_TYPE_descriptor_t asn_DEF_EpytRef = {
157 "EpytRef",
158 "EpytRef",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800159 &asn_OP_SEQUENCE,
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800160 SEQUENCE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000161 asn_DEF_EpytRef_tags_1,
162 sizeof(asn_DEF_EpytRef_tags_1)
163 /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */
164 asn_DEF_EpytRef_tags_1, /* Same as above */
165 sizeof(asn_DEF_EpytRef_tags_1)
166 /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400167 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000168 0, /* No PER visible constraints */
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800169 asn_MBR_Epyt_1,
170 3, /* Elements count */
171 &asn_SPC_Epyt_specs_1 /* Additional specs */
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000172};
173
174
Lev Walkinc8285712005-03-04 22:18:20 +0000175/*** <<< INCLUDES [Epyt] >>> ***/
176
177#include <asn_SET_OF.h>
178#include <constr_SET_OF.h>
179#include <constr_SEQUENCE.h>
180
181/*** <<< FWD-DECLS [Epyt] >>> ***/
182
Lev Walkinbf56d542005-03-04 23:50:56 +0000183struct Type;
184struct Ypet;
Lev Walkinc8285712005-03-04 22:18:20 +0000185
186/*** <<< TYPE-DECLS [Epyt] >>> ***/
187
188typedef struct Epyt {
189 struct stype {
190 A_SET_OF(struct Type) list;
191
192 /* Context for parsing across buffer boundaries */
193 asn_struct_ctx_t _asn_ctx;
194 } stype;
195 struct Type *type /* OPTIONAL */;
196 struct Ypet *ypet /* OPTIONAL */;
197
198 /* Context for parsing across buffer boundaries */
199 asn_struct_ctx_t _asn_ctx;
200} Epyt_t;
201
202/*** <<< FUNC-DECLS [Epyt] >>> ***/
203
204extern asn_TYPE_descriptor_t asn_DEF_Epyt;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800205extern asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1;
206extern asn_TYPE_member_t asn_MBR_Epyt_1[3];
Lev Walkinc8285712005-03-04 22:18:20 +0000207
208/*** <<< POST-INCLUDE [Epyt] >>> ***/
209
Lev Walkin22b5ed42006-09-13 02:51:20 +0000210#include "Type.h"
211#include "Ypet.h"
Lev Walkinc8285712005-03-04 22:18:20 +0000212
213/*** <<< STAT-DEFS [Epyt] >>> ***/
214
215static asn_TYPE_member_t asn_MBR_stype_2[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000216 { ATF_POINTER, 0, 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000217 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
218 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000219 .type = &asn_DEF_Type,
Lev Walkin67a30122017-08-10 05:48:54 -0700220 .type_selector = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000221 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400222 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000223 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
224 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000225 .name = ""
226 },
227};
Lev Walkina7591b52014-10-12 18:37:35 -0700228static const ber_tlv_tag_t asn_DEF_stype_tags_2[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000229 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
230};
Lev Walkin59b176e2005-11-26 11:25:14 +0000231static asn_SET_OF_specifics_t asn_SPC_stype_specs_2 = {
Lev Walkinc8285712005-03-04 22:18:20 +0000232 sizeof(struct stype),
233 offsetof(struct stype, _asn_ctx),
234 0, /* XER encoding is XMLDelimitedItemList */
235};
236static /* Use -fall-defs-global to expose */
237asn_TYPE_descriptor_t asn_DEF_stype_2 = {
238 "stype",
239 "stype",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800240 &asn_OP_SET_OF,
Lev Walkinc8285712005-03-04 22:18:20 +0000241 SET_OF_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000242 asn_DEF_stype_tags_2,
243 sizeof(asn_DEF_stype_tags_2)
244 /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */
245 asn_DEF_stype_tags_2, /* Same as above */
246 sizeof(asn_DEF_stype_tags_2)
247 /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400248 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000249 0, /* No PER visible constraints */
Lev Walkinc8285712005-03-04 22:18:20 +0000250 asn_MBR_stype_2,
251 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000252 &asn_SPC_stype_specs_2 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000253};
254
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800255asn_TYPE_member_t asn_MBR_Epyt_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000256 { ATF_NOFLAGS, 0, offsetof(struct Epyt, stype),
257 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
258 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000259 .type = &asn_DEF_stype_2,
Lev Walkin67a30122017-08-10 05:48:54 -0700260 .type_selector = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000261 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400262 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000263 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
264 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000265 .name = "stype"
266 },
267 { ATF_POINTER, 2, offsetof(struct Epyt, type),
268 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
269 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000270 .type = &asn_DEF_Type,
Lev Walkin67a30122017-08-10 05:48:54 -0700271 .type_selector = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000272 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400273 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000274 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
275 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000276 .name = "type"
277 },
278 { ATF_POINTER, 1, offsetof(struct Epyt, ypet),
279 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
280 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000281 .type = &asn_DEF_Ypet,
Lev Walkin67a30122017-08-10 05:48:54 -0700282 .type_selector = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000283 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400284 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000285 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
286 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000287 .name = "ypet"
288 },
289};
Lev Walkina7591b52014-10-12 18:37:35 -0700290static const ber_tlv_tag_t asn_DEF_Epyt_tags_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000291 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
292};
Lev Walkina7591b52014-10-12 18:37:35 -0700293static const asn_TYPE_tag2member_t asn_MAP_Epyt_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700294 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* type */
295 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 1 }, /* stype */
296 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, -1, 0 } /* ypet */
Lev Walkinc8285712005-03-04 22:18:20 +0000297};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800298asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1 = {
Lev Walkinc8285712005-03-04 22:18:20 +0000299 sizeof(struct Epyt),
300 offsetof(struct Epyt, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700301 .tag2el = asn_MAP_Epyt_tag2el_1,
302 .tag2el_count = 3, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000303 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinc8285712005-03-04 22:18:20 +0000304 -1, /* Start extensions */
305 -1 /* Stop extensions */
306};
307asn_TYPE_descriptor_t asn_DEF_Epyt = {
308 "Epyt",
309 "Epyt",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800310 &asn_OP_SEQUENCE,
Lev Walkinc8285712005-03-04 22:18:20 +0000311 SEQUENCE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000312 asn_DEF_Epyt_tags_1,
313 sizeof(asn_DEF_Epyt_tags_1)
314 /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */
315 asn_DEF_Epyt_tags_1, /* Same as above */
316 sizeof(asn_DEF_Epyt_tags_1)
317 /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400318 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000319 0, /* No PER visible constraints */
Lev Walkinc8285712005-03-04 22:18:20 +0000320 asn_MBR_Epyt_1,
321 3, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000322 &asn_SPC_Epyt_specs_1 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000323};
324
325
326/*** <<< INCLUDES [Ypet] >>> ***/
327
Lev Walkinc8285712005-03-04 22:18:20 +0000328#include <INTEGER.h>
Lev Walkine8318b82005-03-06 09:29:03 +0000329#include <IA5String.h>
Lev Walkin22b5ed42006-09-13 02:51:20 +0000330#include "EnumType.h"
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000331#include <asn_SET_OF.h>
332#include <constr_SET_OF.h>
Lev Walkinc8285712005-03-04 22:18:20 +0000333#include <constr_SET.h>
334
335/*** <<< DEPS [Ypet] >>> ***/
336
337
338/*
339 * Method of determining the components presence
340 */
341typedef enum Ypet_PR {
342 Ypet_PR_epyt, /* Member epyt is present */
343 Ypet_PR_plain, /* Member plain is present */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000344 Ypet_PR_senums, /* Member senums is present */
Lev Walkine8318b82005-03-06 09:29:03 +0000345 Ypet_PR_patest1, /* Member patest1 is present */
346 Ypet_PR_patest2, /* Member patest2 is present */
Lev Walkinc8285712005-03-04 22:18:20 +0000347} Ypet_PR;
348
Lev Walkinb85a8132005-08-18 13:38:19 +0000349/*** <<< FWD-DECLS [Ypet] >>> ***/
350
351struct Epyt;
352
Lev Walkinc8285712005-03-04 22:18:20 +0000353/*** <<< TYPE-DECLS [Ypet] >>> ***/
354
355typedef struct Ypet {
Lev Walkinb85a8132005-08-18 13:38:19 +0000356 struct Epyt *epyt;
Lev Walkinc8285712005-03-04 22:18:20 +0000357 INTEGER_t *plain /* DEFAULT 7 */;
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000358 struct senums {
359 A_SET_OF(EnumType_t) list;
360
361 /* Context for parsing across buffer boundaries */
362 asn_struct_ctx_t _asn_ctx;
363 } senums;
Lev Walkine8318b82005-03-06 09:29:03 +0000364 IA5String_t patest1;
365 IA5String_t patest2;
Lev Walkinc8285712005-03-04 22:18:20 +0000366
367 /* Presence bitmask: ASN_SET_ISPRESENT(pYpet, Ypet_PR_x) */
368 unsigned int _presence_map
Lev Walkine8318b82005-03-06 09:29:03 +0000369 [((5+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
Lev Walkinc8285712005-03-04 22:18:20 +0000370
371 /* Context for parsing across buffer boundaries */
372 asn_struct_ctx_t _asn_ctx;
373} Ypet_t;
374
375/*** <<< FUNC-DECLS [Ypet] >>> ***/
376
377extern asn_TYPE_descriptor_t asn_DEF_Ypet;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800378extern asn_SET_specifics_t asn_SPC_Ypet_specs_1;
379extern asn_TYPE_member_t asn_MBR_Ypet_1[5];
Lev Walkinc8285712005-03-04 22:18:20 +0000380
Lev Walkinb85a8132005-08-18 13:38:19 +0000381/*** <<< POST-INCLUDE [Ypet] >>> ***/
382
Lev Walkin22b5ed42006-09-13 02:51:20 +0000383#include "Epyt.h"
Lev Walkinb85a8132005-08-18 13:38:19 +0000384
Lev Walkine8318b82005-03-06 09:29:03 +0000385/*** <<< CTABLES [Ypet] >>> ***/
386
387static int check_permitted_alphabet_6(const void *sptr) {
388 /* The underlying type is IA5String */
389 const IA5String_t *st = (const IA5String_t *)sptr;
390 const uint8_t *ch = st->buf;
391 const uint8_t *end = ch + st->size;
392
393 for(; ch < end; ch++) {
394 uint8_t cv = *ch;
395 if(!(cv >= 65 && cv <= 90)) return -1;
396 }
397 return 0;
398}
399
400static int check_permitted_alphabet_7(const void *sptr) {
401 /* The underlying type is IA5String */
402 const IA5String_t *st = (const IA5String_t *)sptr;
403 const uint8_t *ch = st->buf;
404 const uint8_t *end = ch + st->size;
405
406 for(; ch < end; ch++) {
407 uint8_t cv = *ch;
408 if(!(cv >= 97 && cv <= 122)) return -1;
409 }
410 return 0;
411}
412
413
414/*** <<< CODE [Ypet] >>> ***/
415
416static int
Lev Walkin59b176e2005-11-26 11:25:14 +0000417memb_patest1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000418 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +0000419 const IA5String_t *st = (const IA5String_t *)sptr;
420
421 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700422 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000423 "%s: value not given (%s:%d)",
424 td->name, __FILE__, __LINE__);
425 return -1;
426 }
427
428
429 if(!check_permitted_alphabet_6(st)) {
430 /* Constraint check succeeded */
431 return 0;
432 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700433 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000434 "%s: constraint failed (%s:%d)",
435 td->name, __FILE__, __LINE__);
436 return -1;
437 }
438}
439
440static int
Lev Walkin59b176e2005-11-26 11:25:14 +0000441memb_patest2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000442 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +0000443 const IA5String_t *st = (const IA5String_t *)sptr;
444
445 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700446 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000447 "%s: value not given (%s:%d)",
448 td->name, __FILE__, __LINE__);
449 return -1;
450 }
451
452
453 if(!check_permitted_alphabet_7(st)) {
454 /* Constraint check succeeded */
455 return 0;
456 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700457 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000458 "%s: constraint failed (%s:%d)",
459 td->name, __FILE__, __LINE__);
460 return -1;
461 }
462}
463
464
Lev Walkinc8285712005-03-04 22:18:20 +0000465/*** <<< STAT-DEFS [Ypet] >>> ***/
466
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000467static int asn_DFL_3_set_7(int set_value, void **sptr) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000468 INTEGER_t *st = *sptr;
469
470 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000471 if(!set_value) return -1; /* Not a default value */
Lev Walkin59b176e2005-11-26 11:25:14 +0000472 st = (*sptr = CALLOC(1, sizeof(*st)));
473 if(!st) return -1;
474 }
475
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000476 if(set_value) {
477 /* Install default value 7 */
478 return asn_long2INTEGER(st, 7);
479 } else {
480 /* Test default value 7 */
481 long value;
482 if(asn_INTEGER2long(st, &value))
483 return -1;
484 return (value == 7);
485 }
Lev Walkin59b176e2005-11-26 11:25:14 +0000486}
Lev Walkine8318b82005-03-06 09:29:03 +0000487static asn_TYPE_member_t asn_MBR_senums_4[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000488 { ATF_POINTER, 0, 0,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000489 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
490 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000491 .type = &asn_DEF_EnumType,
Lev Walkin67a30122017-08-10 05:48:54 -0700492 .type_selector = 0,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000493 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400494 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000495 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
496 .default_value = 0,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000497 .name = ""
498 },
499};
Lev Walkina7591b52014-10-12 18:37:35 -0700500static const ber_tlv_tag_t asn_DEF_senums_tags_4[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000501 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
502};
Lev Walkin59b176e2005-11-26 11:25:14 +0000503static asn_SET_OF_specifics_t asn_SPC_senums_specs_4 = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000504 sizeof(struct senums),
505 offsetof(struct senums, _asn_ctx),
506 1, /* XER encoding is XMLValueList */
507};
508static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000509asn_TYPE_descriptor_t asn_DEF_senums_4 = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000510 "senums",
511 "senums",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800512 &asn_OP_SET_OF,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000513 SET_OF_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000514 asn_DEF_senums_tags_4,
515 sizeof(asn_DEF_senums_tags_4)
516 /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */
517 asn_DEF_senums_tags_4, /* Same as above */
518 sizeof(asn_DEF_senums_tags_4)
519 /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400520 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000521 0, /* No PER visible constraints */
Lev Walkine8318b82005-03-06 09:29:03 +0000522 asn_MBR_senums_4,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000523 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000524 &asn_SPC_senums_specs_4 /* Additional specs */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000525};
526
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800527asn_TYPE_member_t asn_MBR_Ypet_1[] = {
Lev Walkinb85a8132005-08-18 13:38:19 +0000528 { ATF_POINTER, 0, offsetof(struct Ypet, epyt),
Lev Walkinc8285712005-03-04 22:18:20 +0000529 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
530 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000531 .type = &asn_DEF_Epyt,
Lev Walkin67a30122017-08-10 05:48:54 -0700532 .type_selector = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000533 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400534 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000535 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
536 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000537 .name = "epyt"
538 },
539 { ATF_POINTER, 1, offsetof(struct Ypet, plain),
540 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
541 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000542 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -0700543 .type_selector = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000544 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400545 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000546 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
547 .default_value = asn_DFL_3_set_7, /* DEFAULT 7 */
Lev Walkinc8285712005-03-04 22:18:20 +0000548 .name = "plain"
549 },
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000550 { ATF_NOFLAGS, 0, offsetof(struct Ypet, senums),
551 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
552 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000553 .type = &asn_DEF_senums_4,
Lev Walkin67a30122017-08-10 05:48:54 -0700554 .type_selector = 0,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000555 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400556 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000557 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
558 .default_value = 0,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000559 .name = "senums"
560 },
Lev Walkine8318b82005-03-06 09:29:03 +0000561 { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest1),
562 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
563 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000564 .type = &asn_DEF_IA5String,
Lev Walkin67a30122017-08-10 05:48:54 -0700565 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000566 .memb_constraints = memb_patest1_constraint_1,
Lev Walkinb33425f2017-07-14 14:59:52 +0400567 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000568 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
569 .default_value = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000570 .name = "patest1"
571 },
572 { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest2),
573 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
574 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000575 .type = &asn_DEF_IA5String,
Lev Walkin67a30122017-08-10 05:48:54 -0700576 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000577 .memb_constraints = memb_patest2_constraint_1,
Lev Walkinb33425f2017-07-14 14:59:52 +0400578 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000579 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
580 .default_value = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000581 .name = "patest2"
582 },
Lev Walkinc8285712005-03-04 22:18:20 +0000583};
Lev Walkina7591b52014-10-12 18:37:35 -0700584static const ber_tlv_tag_t asn_DEF_Ypet_tags_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000585 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
586};
Lev Walkina7591b52014-10-12 18:37:35 -0700587static const asn_TYPE_tag2member_t asn_MAP_Ypet_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700588 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* plain */
589 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* epyt */
590 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, 0, 0 }, /* senums */
591 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* patest1 */
592 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 4, 0, 0 } /* patest2 */
Lev Walkinc8285712005-03-04 22:18:20 +0000593};
Lev Walkina7591b52014-10-12 18:37:35 -0700594static const uint8_t asn_MAP_Ypet_mmap_1[(5 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkine8318b82005-03-06 09:29:03 +0000595 (1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (1 << 3)
Lev Walkinc8285712005-03-04 22:18:20 +0000596};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800597asn_SET_specifics_t asn_SPC_Ypet_specs_1 = {
Lev Walkinc8285712005-03-04 22:18:20 +0000598 sizeof(struct Ypet),
599 offsetof(struct Ypet, _asn_ctx),
600 offsetof(struct Ypet, _presence_map),
Lev Walkine3917082017-08-23 10:29:38 -0700601 .tag2el = asn_MAP_Ypet_tag2el_1,
602 .tag2el_count = 5, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000603 asn_MAP_Ypet_tag2el_1, /* Same as above */
Lev Walkine8318b82005-03-06 09:29:03 +0000604 5, /* Count of tags in the CXER map */
Lev Walkinc8285712005-03-04 22:18:20 +0000605 0, /* Whether extensible */
Lev Walkin46ef3f32017-07-06 08:47:53 -0700606 (const unsigned int *)asn_MAP_Ypet_mmap_1 /* Mandatory elements map */
Lev Walkinc8285712005-03-04 22:18:20 +0000607};
608asn_TYPE_descriptor_t asn_DEF_Ypet = {
609 "Ypet",
610 "Ypet",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800611 &asn_OP_SET,
Lev Walkinc8285712005-03-04 22:18:20 +0000612 SET_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000613 asn_DEF_Ypet_tags_1,
614 sizeof(asn_DEF_Ypet_tags_1)
615 /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */
616 asn_DEF_Ypet_tags_1, /* Same as above */
617 sizeof(asn_DEF_Ypet_tags_1)
618 /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400619 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000620 0, /* No PER visible constraints */
Lev Walkinc8285712005-03-04 22:18:20 +0000621 asn_MBR_Ypet_1,
Lev Walkine8318b82005-03-06 09:29:03 +0000622 5, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000623 &asn_SPC_Ypet_specs_1 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000624};
625
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000626
627/*** <<< INCLUDES [EnumType] >>> ***/
628
629#include <ENUMERATED.h>
630
631/*** <<< DEPS [EnumType] >>> ***/
632
633typedef enum EnumType {
634 EnumType_one = 0,
635 EnumType_two = 1
Lev Walkin171487e2006-03-21 07:25:18 +0000636} e_EnumType;
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000637
638/*** <<< TYPE-DECLS [EnumType] >>> ***/
639
640typedef ENUMERATED_t EnumType_t;
641
642/*** <<< FUNC-DECLS [EnumType] >>> ***/
643
644extern asn_TYPE_descriptor_t asn_DEF_EnumType;
Lev Walkin9ded96c2017-08-23 04:38:31 -0700645extern const asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1;
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000646asn_struct_free_f EnumType_free;
647asn_struct_print_f EnumType_print;
648asn_constr_check_f EnumType_constraint;
649ber_type_decoder_f EnumType_decode_ber;
650der_type_encoder_f EnumType_encode_der;
651xer_type_decoder_f EnumType_decode_xer;
652xer_type_encoder_f EnumType_encode_xer;
653
654/*** <<< CODE [EnumType] >>> ***/
655
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000656/*
657 * This type is implemented using ENUMERATED,
658 * so here we adjust the DEF accordingly.
659 */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000660
661/*** <<< STAT-DEFS [EnumType] >>> ***/
662
Lev Walkina7591b52014-10-12 18:37:35 -0700663static const asn_INTEGER_enum_map_t asn_MAP_EnumType_value2enum_1[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000664 { 0, 3, "one" },
665 { 1, 3, "two" }
666};
Lev Walkina7591b52014-10-12 18:37:35 -0700667static const unsigned int asn_MAP_EnumType_enum2value_1[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000668 0, /* one(0) */
669 1 /* two(1) */
670};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800671const asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000672 asn_MAP_EnumType_value2enum_1, /* "tag" => N; sorted by tag */
673 asn_MAP_EnumType_enum2value_1, /* N => "tag"; sorted by N */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000674 2, /* Number of elements in the maps */
675 0, /* Enumeration is not extensible */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000676 1, /* Strict enumeration */
677 0, /* Native long size */
678 0
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000679};
Lev Walkina7591b52014-10-12 18:37:35 -0700680static const ber_tlv_tag_t asn_DEF_EnumType_tags_1[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000681 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
682};
683asn_TYPE_descriptor_t asn_DEF_EnumType = {
684 "EnumType",
685 "EnumType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800686 &asn_OP_ENUMERATED,
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800687 ENUMERATED_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000688 asn_DEF_EnumType_tags_1,
689 sizeof(asn_DEF_EnumType_tags_1)
690 /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */
691 asn_DEF_EnumType_tags_1, /* Same as above */
692 sizeof(asn_DEF_EnumType_tags_1)
693 /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400694 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000695 0, /* No PER visible constraints */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000696 0, 0, /* Defined elsewhere */
Lev Walkin59b176e2005-11-26 11:25:14 +0000697 &asn_SPC_EnumType_specs_1 /* Additional specs */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000698};
699