4a7298b3852273ff944ba32085e24fb5949822bf
[com/asn1c.git] / tests / tests-asn1c-compiler / 32-sequence-of-OK.asn1.-P
1
2 /*** <<< INCLUDES [Programming] >>> ***/
3
4 #include <asn_SEQUENCE_OF.h>
5 #include <constr_SEQUENCE_OF.h>
6
7 /*** <<< FWD-DECLS [Programming] >>> ***/
8
9 struct Fault;
10
11 /*** <<< TYPE-DECLS [Programming] >>> ***/
12
13 typedef struct Programming {
14         A_SEQUENCE_OF(struct Fault) list;
15         
16         /* Context for parsing across buffer boundaries */
17         asn_struct_ctx_t _asn_ctx;
18 } Programming_t;
19
20 /*** <<< FUNC-DECLS [Programming] >>> ***/
21
22 extern asn_TYPE_descriptor_t asn_DEF_Programming;
23
24 /*** <<< POST-INCLUDE [Programming] >>> ***/
25
26 #include "Fault.h"
27
28 /*** <<< STAT-DEFS [Programming] >>> ***/
29
30 static asn_TYPE_member_t asn_MBR_Programming_1[] = {
31         { ATF_POINTER, 0, 0,
32                 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
33                 .tag_mode = -1, /* IMPLICIT tag at current level */
34                 .type = &asn_DEF_Fault,
35                 .type_selector = 0,
36                 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
37                 0, 0, /* No default value */
38                 .name = ""
39                 },
40 };
41 static const ber_tlv_tag_t asn_DEF_Programming_tags_1[] = {
42         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
43 };
44 static asn_SET_OF_specifics_t asn_SPC_Programming_specs_1 = {
45         sizeof(struct Programming),
46         offsetof(struct Programming, _asn_ctx),
47         0,      /* XER encoding is XMLDelimitedItemList */
48 };
49 asn_TYPE_descriptor_t asn_DEF_Programming = {
50         "Programming",
51         "Programming",
52         &asn_OP_SEQUENCE_OF,
53         asn_DEF_Programming_tags_1,
54         sizeof(asn_DEF_Programming_tags_1)
55                 /sizeof(asn_DEF_Programming_tags_1[0]), /* 1 */
56         asn_DEF_Programming_tags_1,     /* Same as above */
57         sizeof(asn_DEF_Programming_tags_1)
58                 /sizeof(asn_DEF_Programming_tags_1[0]), /* 1 */
59         { 0, 0, SEQUENCE_OF_constraint },
60         asn_MBR_Programming_1,
61         1,      /* Single element */
62         &asn_SPC_Programming_specs_1    /* Additional specs */
63 };
64
65
66 /*** <<< INCLUDES [Fault] >>> ***/
67
68 #include <asn_SET_OF.h>
69 #include <constr_SET_OF.h>
70
71 /*** <<< FWD-DECLS [Fault] >>> ***/
72
73 struct Error;
74
75 /*** <<< TYPE-DECLS [Fault] >>> ***/
76
77 typedef struct Fault {
78         A_SET_OF(struct Error) list;
79         
80         /* Context for parsing across buffer boundaries */
81         asn_struct_ctx_t _asn_ctx;
82 } Fault_t;
83
84 /*** <<< FUNC-DECLS [Fault] >>> ***/
85
86 extern asn_TYPE_descriptor_t asn_DEF_Fault;
87 extern asn_SET_OF_specifics_t asn_SPC_Fault_specs_1;
88 extern asn_TYPE_member_t asn_MBR_Fault_1[1];
89
90 /*** <<< POST-INCLUDE [Fault] >>> ***/
91
92 #include "Error.h"
93
94 /*** <<< STAT-DEFS [Fault] >>> ***/
95
96 asn_TYPE_member_t asn_MBR_Fault_1[] = {
97         { ATF_POINTER, 0, 0,
98                 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
99                 .tag_mode = 0,
100                 .type = &asn_DEF_Error,
101                 .type_selector = 0,
102                 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
103                 0, 0, /* No default value */
104                 .name = ""
105                 },
106 };
107 static const ber_tlv_tag_t asn_DEF_Fault_tags_1[] = {
108         (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
109 };
110 asn_SET_OF_specifics_t asn_SPC_Fault_specs_1 = {
111         sizeof(struct Fault),
112         offsetof(struct Fault, _asn_ctx),
113         0,      /* XER encoding is XMLDelimitedItemList */
114 };
115 asn_TYPE_descriptor_t asn_DEF_Fault = {
116         "Fault",
117         "Fault",
118         &asn_OP_SET_OF,
119         asn_DEF_Fault_tags_1,
120         sizeof(asn_DEF_Fault_tags_1)
121                 /sizeof(asn_DEF_Fault_tags_1[0]), /* 1 */
122         asn_DEF_Fault_tags_1,   /* Same as above */
123         sizeof(asn_DEF_Fault_tags_1)
124                 /sizeof(asn_DEF_Fault_tags_1[0]), /* 1 */
125         { 0, 0, SET_OF_constraint },
126         asn_MBR_Fault_1,
127         1,      /* Single element */
128         &asn_SPC_Fault_specs_1  /* Additional specs */
129 };
130
131
132 /*** <<< INCLUDES [Error] >>> ***/
133
134 #include <constr_SEQUENCE.h>
135
136 /*** <<< TYPE-DECLS [Error] >>> ***/
137
138 typedef struct Error {
139         /*
140          * This type is extensible,
141          * possible extensions are below.
142          */
143         
144         /* Context for parsing across buffer boundaries */
145         asn_struct_ctx_t _asn_ctx;
146 } Error_t;
147
148 /*** <<< FUNC-DECLS [Error] >>> ***/
149
150 extern asn_TYPE_descriptor_t asn_DEF_Error;
151 extern asn_SEQUENCE_specifics_t asn_SPC_Error_specs_1;
152
153 /*** <<< STAT-DEFS [Error] >>> ***/
154
155 static const ber_tlv_tag_t asn_DEF_Error_tags_1[] = {
156         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
157 };
158 asn_SEQUENCE_specifics_t asn_SPC_Error_specs_1 = {
159         sizeof(struct Error),
160         offsetof(struct Error, _asn_ctx),
161         0,      /* No top level tags */
162         0,      /* No tags in the map */
163         0, 0, 0,        /* Optional elements (not needed) */
164         -1,     /* First extension addition */
165 };
166 asn_TYPE_descriptor_t asn_DEF_Error = {
167         "Error",
168         "Error",
169         &asn_OP_SEQUENCE,
170         asn_DEF_Error_tags_1,
171         sizeof(asn_DEF_Error_tags_1)
172                 /sizeof(asn_DEF_Error_tags_1[0]), /* 1 */
173         asn_DEF_Error_tags_1,   /* Same as above */
174         sizeof(asn_DEF_Error_tags_1)
175                 /sizeof(asn_DEF_Error_tags_1[0]), /* 1 */
176         { 0, 0, SEQUENCE_constraint },
177         0, 0,   /* No members */
178         &asn_SPC_Error_specs_1  /* Additional specs */
179 };
180
181
182 /*** <<< INCLUDES [SeqWithMandatory] >>> ***/
183
184 #include <UTF8String.h>
185 #include <asn_SEQUENCE_OF.h>
186 #include <constr_SEQUENCE_OF.h>
187 #include <constr_SEQUENCE.h>
188
189 /*** <<< FWD-DECLS [SeqWithMandatory] >>> ***/
190
191 struct Error;
192
193 /*** <<< TYPE-DECLS [SeqWithMandatory] >>> ***/
194
195 typedef struct SeqWithMandatory {
196         UTF8String_t     someString;
197         struct seqOfMan {
198                 A_SEQUENCE_OF(struct Error) list;
199                 
200                 /* Context for parsing across buffer boundaries */
201                 asn_struct_ctx_t _asn_ctx;
202         } seqOfMan;
203         
204         /* Context for parsing across buffer boundaries */
205         asn_struct_ctx_t _asn_ctx;
206 } SeqWithMandatory_t;
207
208 /*** <<< FUNC-DECLS [SeqWithMandatory] >>> ***/
209
210 extern asn_TYPE_descriptor_t asn_DEF_SeqWithMandatory;
211
212 /*** <<< POST-INCLUDE [SeqWithMandatory] >>> ***/
213
214 #include "Error.h"
215
216 /*** <<< STAT-DEFS [SeqWithMandatory] >>> ***/
217
218 static asn_TYPE_member_t asn_MBR_seqOfMan_3[] = {
219         { ATF_POINTER, 0, 0,
220                 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
221                 .tag_mode = 0,
222                 .type = &asn_DEF_Error,
223                 .type_selector = 0,
224                 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
225                 0, 0, /* No default value */
226                 .name = ""
227                 },
228 };
229 static const ber_tlv_tag_t asn_DEF_seqOfMan_tags_3[] = {
230         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
231         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
232 };
233 static asn_SET_OF_specifics_t asn_SPC_seqOfMan_specs_3 = {
234         sizeof(struct seqOfMan),
235         offsetof(struct seqOfMan, _asn_ctx),
236         0,      /* XER encoding is XMLDelimitedItemList */
237 };
238 static /* Use -fall-defs-global to expose */
239 asn_TYPE_descriptor_t asn_DEF_seqOfMan_3 = {
240         "seqOfMan",
241         "seqOfMan",
242         &asn_OP_SEQUENCE_OF,
243         asn_DEF_seqOfMan_tags_3,
244         sizeof(asn_DEF_seqOfMan_tags_3)
245                 /sizeof(asn_DEF_seqOfMan_tags_3[0]), /* 2 */
246         asn_DEF_seqOfMan_tags_3,        /* Same as above */
247         sizeof(asn_DEF_seqOfMan_tags_3)
248                 /sizeof(asn_DEF_seqOfMan_tags_3[0]), /* 2 */
249         { 0, 0, SEQUENCE_OF_constraint },
250         asn_MBR_seqOfMan_3,
251         1,      /* Single element */
252         &asn_SPC_seqOfMan_specs_3       /* Additional specs */
253 };
254
255 static asn_TYPE_member_t asn_MBR_SeqWithMandatory_1[] = {
256         { ATF_NOFLAGS, 0, offsetof(struct SeqWithMandatory, someString),
257                 .tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
258                 .tag_mode = 0,
259                 .type = &asn_DEF_UTF8String,
260                 .type_selector = 0,
261                 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
262                 0, 0, /* No default value */
263                 .name = "someString"
264                 },
265         { ATF_NOFLAGS, 0, offsetof(struct SeqWithMandatory, seqOfMan),
266                 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
267                 .tag_mode = 0,
268                 .type = &asn_DEF_seqOfMan_3,
269                 .type_selector = 0,
270                 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
271                 0, 0, /* No default value */
272                 .name = "seqOfMan"
273                 },
274 };
275 static const ber_tlv_tag_t asn_DEF_SeqWithMandatory_tags_1[] = {
276         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
277 };
278 static const asn_TYPE_tag2member_t asn_MAP_SeqWithMandatory_tag2el_1[] = {
279     { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 }, /* someString */
280     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* seqOfMan */
281 };
282 static asn_SEQUENCE_specifics_t asn_SPC_SeqWithMandatory_specs_1 = {
283         sizeof(struct SeqWithMandatory),
284         offsetof(struct SeqWithMandatory, _asn_ctx),
285         .tag2el = asn_MAP_SeqWithMandatory_tag2el_1,
286         .tag2el_count = 2,      /* Count of tags in the map */
287         0, 0, 0,        /* Optional elements (not needed) */
288         -1,     /* First extension addition */
289 };
290 asn_TYPE_descriptor_t asn_DEF_SeqWithMandatory = {
291         "SeqWithMandatory",
292         "SeqWithMandatory",
293         &asn_OP_SEQUENCE,
294         asn_DEF_SeqWithMandatory_tags_1,
295         sizeof(asn_DEF_SeqWithMandatory_tags_1)
296                 /sizeof(asn_DEF_SeqWithMandatory_tags_1[0]), /* 1 */
297         asn_DEF_SeqWithMandatory_tags_1,        /* Same as above */
298         sizeof(asn_DEF_SeqWithMandatory_tags_1)
299                 /sizeof(asn_DEF_SeqWithMandatory_tags_1[0]), /* 1 */
300         { 0, 0, SEQUENCE_constraint },
301         asn_MBR_SeqWithMandatory_1,
302         2,      /* Elements count */
303         &asn_SPC_SeqWithMandatory_specs_1       /* Additional specs */
304 };
305
306
307 /*** <<< INCLUDES [SeqWithOptional] >>> ***/
308
309 #include <UTF8String.h>
310 #include <asn_SEQUENCE_OF.h>
311 #include <constr_SEQUENCE_OF.h>
312 #include <constr_SEQUENCE.h>
313
314 /*** <<< FWD-DECLS [SeqWithOptional] >>> ***/
315
316 struct Error;
317
318 /*** <<< TYPE-DECLS [SeqWithOptional] >>> ***/
319
320 typedef struct SeqWithOptional {
321         UTF8String_t     someString;
322         struct seqOfOpt {
323                 A_SEQUENCE_OF(struct Error) list;
324                 
325                 /* Context for parsing across buffer boundaries */
326                 asn_struct_ctx_t _asn_ctx;
327         } *seqOfOpt;
328         
329         /* Context for parsing across buffer boundaries */
330         asn_struct_ctx_t _asn_ctx;
331 } SeqWithOptional_t;
332
333 /*** <<< FUNC-DECLS [SeqWithOptional] >>> ***/
334
335 extern asn_TYPE_descriptor_t asn_DEF_SeqWithOptional;
336
337 /*** <<< POST-INCLUDE [SeqWithOptional] >>> ***/
338
339 #include "Error.h"
340
341 /*** <<< STAT-DEFS [SeqWithOptional] >>> ***/
342
343 static asn_TYPE_member_t asn_MBR_seqOfOpt_3[] = {
344         { ATF_POINTER, 0, 0,
345                 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
346                 .tag_mode = 0,
347                 .type = &asn_DEF_Error,
348                 .type_selector = 0,
349                 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
350                 0, 0, /* No default value */
351                 .name = ""
352                 },
353 };
354 static const ber_tlv_tag_t asn_DEF_seqOfOpt_tags_3[] = {
355         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
356         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
357 };
358 static asn_SET_OF_specifics_t asn_SPC_seqOfOpt_specs_3 = {
359         sizeof(struct seqOfOpt),
360         offsetof(struct seqOfOpt, _asn_ctx),
361         0,      /* XER encoding is XMLDelimitedItemList */
362 };
363 static /* Use -fall-defs-global to expose */
364 asn_TYPE_descriptor_t asn_DEF_seqOfOpt_3 = {
365         "seqOfOpt",
366         "seqOfOpt",
367         &asn_OP_SEQUENCE_OF,
368         asn_DEF_seqOfOpt_tags_3,
369         sizeof(asn_DEF_seqOfOpt_tags_3)
370                 /sizeof(asn_DEF_seqOfOpt_tags_3[0]), /* 2 */
371         asn_DEF_seqOfOpt_tags_3,        /* Same as above */
372         sizeof(asn_DEF_seqOfOpt_tags_3)
373                 /sizeof(asn_DEF_seqOfOpt_tags_3[0]), /* 2 */
374         { 0, 0, SEQUENCE_OF_constraint },
375         asn_MBR_seqOfOpt_3,
376         1,      /* Single element */
377         &asn_SPC_seqOfOpt_specs_3       /* Additional specs */
378 };
379
380 static asn_TYPE_member_t asn_MBR_SeqWithOptional_1[] = {
381         { ATF_NOFLAGS, 0, offsetof(struct SeqWithOptional, someString),
382                 .tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
383                 .tag_mode = 0,
384                 .type = &asn_DEF_UTF8String,
385                 .type_selector = 0,
386                 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
387                 0, 0, /* No default value */
388                 .name = "someString"
389                 },
390         { ATF_POINTER, 1, offsetof(struct SeqWithOptional, seqOfOpt),
391                 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
392                 .tag_mode = 0,
393                 .type = &asn_DEF_seqOfOpt_3,
394                 .type_selector = 0,
395                 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
396                 0, 0, /* No default value */
397                 .name = "seqOfOpt"
398                 },
399 };
400 static const ber_tlv_tag_t asn_DEF_SeqWithOptional_tags_1[] = {
401         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
402 };
403 static const asn_TYPE_tag2member_t asn_MAP_SeqWithOptional_tag2el_1[] = {
404     { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 }, /* someString */
405     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* seqOfOpt */
406 };
407 static asn_SEQUENCE_specifics_t asn_SPC_SeqWithOptional_specs_1 = {
408         sizeof(struct SeqWithOptional),
409         offsetof(struct SeqWithOptional, _asn_ctx),
410         .tag2el = asn_MAP_SeqWithOptional_tag2el_1,
411         .tag2el_count = 2,      /* Count of tags in the map */
412         0, 0, 0,        /* Optional elements (not needed) */
413         -1,     /* First extension addition */
414 };
415 asn_TYPE_descriptor_t asn_DEF_SeqWithOptional = {
416         "SeqWithOptional",
417         "SeqWithOptional",
418         &asn_OP_SEQUENCE,
419         asn_DEF_SeqWithOptional_tags_1,
420         sizeof(asn_DEF_SeqWithOptional_tags_1)
421                 /sizeof(asn_DEF_SeqWithOptional_tags_1[0]), /* 1 */
422         asn_DEF_SeqWithOptional_tags_1, /* Same as above */
423         sizeof(asn_DEF_SeqWithOptional_tags_1)
424                 /sizeof(asn_DEF_SeqWithOptional_tags_1[0]), /* 1 */
425         { 0, 0, SEQUENCE_constraint },
426         asn_MBR_SeqWithOptional_1,
427         2,      /* Elements count */
428         &asn_SPC_SeqWithOptional_specs_1        /* Additional specs */
429 };
430
431
432 /*** <<< asn_constant.h >>> ***/
433
434 /*
435  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
436  */
437
438 #ifndef _ASN_CONSTANT_H
439 #define _ASN_CONSTANT_H
440
441 #ifdef __cplusplus
442 extern "C" {
443 #endif
444
445 #define maxSize (10)
446
447
448 #ifdef __cplusplus
449 }
450 #endif
451
452 #endif /* _ASN_CONSTANT_H */