Debian Codegraph @

tests/39-sequence-of-OK.asn1.-Pfwide-types

raw
1
2 /*** <<< INCLUDES [T] >>> ***/
3
4 #include <INTEGER.h>
5 #include <asn_SEQUENCE_OF.h>
6 #include <constr_SEQUENCE_OF.h>
7 #include <constr_SEQUENCE.h>
8
9 /*** <<< FWD-DECLS [T] >>> ***/
10
11 struct T2;
12
13 /*** <<< TYPE-DECLS [T] >>> ***/
14
15 typedef struct T {
16 INTEGER_t Int;
17 struct collection {
18 A_SEQUENCE_OF(struct T2) list;
19
20 /* Context for parsing across buffer boundaries */
21 asn_struct_ctx_t _asn_ctx;
22 } collection;
23
24 /* Context for parsing across buffer boundaries */
25 asn_struct_ctx_t _asn_ctx;
26 } T_t;
27
28 /*** <<< FUNC-DECLS [T] >>> ***/
29
30 extern asn_TYPE_descriptor_t asn_DEF_T;
31
32 /*** <<< POST-INCLUDE [T] >>> ***/
33
34 #include "T2.h"
35
36 /*** <<< STAT-DEFS [T] >>> ***/
37
38 static asn_TYPE_member_t asn_MBR_collection_3[] = {
39 { ATF_POINTER, 0, 0,
40 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
41 .tag_mode = 0,
42 .type = &asn_DEF_T2,
43 .memb_constraints = 0, /* Defer constraints checking to the member type */
44 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
45 .default_value = 0,
46 .name = ""
47 },
48 };
49 static const ber_tlv_tag_t asn_DEF_collection_tags_3[] = {
50 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
51 };
52 static asn_SET_OF_specifics_t asn_SPC_collection_specs_3 = {
53 sizeof(struct collection),
54 offsetof(struct collection, _asn_ctx),
55 0, /* XER encoding is XMLDelimitedItemList */
56 };
57 static /* Use -fall-defs-global to expose */
58 asn_TYPE_descriptor_t asn_DEF_collection_3 = {
59 "collection",
60 "collection",
61 SEQUENCE_OF_free,
62 SEQUENCE_OF_print,
63 SEQUENCE_OF_constraint,
64 SEQUENCE_OF_decode_ber,
65 SEQUENCE_OF_encode_der,
66 SEQUENCE_OF_decode_xer,
67 SEQUENCE_OF_encode_xer,
68 0, 0, /* No PER support, use "-gen-PER" to enable */
69 0, /* Use generic outmost tag fetcher */
70 asn_DEF_collection_tags_3,
71 sizeof(asn_DEF_collection_tags_3)
72 /sizeof(asn_DEF_collection_tags_3[0]), /* 1 */
73 asn_DEF_collection_tags_3, /* Same as above */
74 sizeof(asn_DEF_collection_tags_3)
75 /sizeof(asn_DEF_collection_tags_3[0]), /* 1 */
76 0, /* No PER visible constraints */
77 asn_MBR_collection_3,
78 1, /* Single element */
79 &asn_SPC_collection_specs_3 /* Additional specs */
80 };
81
82 static asn_TYPE_member_t asn_MBR_T_1[] = {
83 { ATF_NOFLAGS, 0, offsetof(struct T, Int),
84 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
85 .tag_mode = 0,
86 .type = &asn_DEF_INTEGER,
87 .memb_constraints = 0, /* Defer constraints checking to the member type */
88 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
89 .default_value = 0,
90 .name = "int"
91 },
92 { ATF_NOFLAGS, 0, offsetof(struct T, collection),
93 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
94 .tag_mode = 0,
95 .type = &asn_DEF_collection_3,
96 .memb_constraints = 0, /* Defer constraints checking to the member type */
97 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
98 .default_value = 0,
99 .name = "collection"
100 },
101 };
102 static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
103 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
104 };
105 static const asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
106 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int */
107 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* collection */
108 };
109 static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
110 sizeof(struct T),
111 offsetof(struct T, _asn_ctx),
112 asn_MAP_T_tag2el_1,
113 2, /* Count of tags in the map */
114 0, 0, 0, /* Optional elements (not needed) */
115 -1, /* Start extensions */
116 -1 /* Stop extensions */
117 };
118 asn_TYPE_descriptor_t asn_DEF_T = {
119 "T",
120 "T",
121 SEQUENCE_free,
122 SEQUENCE_print,
123 SEQUENCE_constraint,
124 SEQUENCE_decode_ber,
125 SEQUENCE_encode_der,
126 SEQUENCE_decode_xer,
127 SEQUENCE_encode_xer,
128 0, 0, /* No PER support, use "-gen-PER" to enable */
129 0, /* Use generic outmost tag fetcher */
130 asn_DEF_T_tags_1,
131 sizeof(asn_DEF_T_tags_1)
132 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
133 asn_DEF_T_tags_1, /* Same as above */
134 sizeof(asn_DEF_T_tags_1)
135 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
136 0, /* No PER visible constraints */
137 asn_MBR_T_1,
138 2, /* Elements count */
139 &asn_SPC_T_specs_1 /* Additional specs */
140 };
141
142
143 /*** <<< INCLUDES [T2] >>> ***/
144
145 #include <BOOLEAN.h>
146 #include <UTF8String.h>
147 #include <constr_SEQUENCE.h>
148
149 /*** <<< TYPE-DECLS [T2] >>> ***/
150
151 typedef struct T2 {
152 BOOLEAN_t flag;
153 UTF8String_t str;
154
155 /* Context for parsing across buffer boundaries */
156 asn_struct_ctx_t _asn_ctx;
157 } T2_t;
158
159 /*** <<< FUNC-DECLS [T2] >>> ***/
160
161 extern asn_TYPE_descriptor_t asn_DEF_T2;
162
163 /*** <<< STAT-DEFS [T2] >>> ***/
164
165 static asn_TYPE_member_t asn_MBR_T2_1[] = {
166 { ATF_NOFLAGS, 0, offsetof(struct T2, flag),
167 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
168 .tag_mode = 0,
169 .type = &asn_DEF_BOOLEAN,
170 .memb_constraints = 0, /* Defer constraints checking to the member type */
171 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
172 .default_value = 0,
173 .name = "flag"
174 },
175 { ATF_NOFLAGS, 0, offsetof(struct T2, str),
176 .tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
177 .tag_mode = 0,
178 .type = &asn_DEF_UTF8String,
179 .memb_constraints = 0, /* Defer constraints checking to the member type */
180 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
181 .default_value = 0,
182 .name = "str"
183 },
184 };
185 static const ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
186 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
187 };
188 static const asn_TYPE_tag2member_t asn_MAP_T2_tag2el_1[] = {
189 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* flag */
190 { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 } /* str */
191 };
192 static asn_SEQUENCE_specifics_t asn_SPC_T2_specs_1 = {
193 sizeof(struct T2),
194 offsetof(struct T2, _asn_ctx),
195 asn_MAP_T2_tag2el_1,
196 2, /* Count of tags in the map */
197 0, 0, 0, /* Optional elements (not needed) */
198 -1, /* Start extensions */
199 -1 /* Stop extensions */
200 };
201 asn_TYPE_descriptor_t asn_DEF_T2 = {
202 "T2",
203 "T2",
204 SEQUENCE_free,
205 SEQUENCE_print,
206 SEQUENCE_constraint,
207 SEQUENCE_decode_ber,
208 SEQUENCE_encode_der,
209 SEQUENCE_decode_xer,
210 SEQUENCE_encode_xer,
211 0, 0, /* No PER support, use "-gen-PER" to enable */
212 0, /* Use generic outmost tag fetcher */
213 asn_DEF_T2_tags_1,
214 sizeof(asn_DEF_T2_tags_1)
215 /sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
216 asn_DEF_T2_tags_1, /* Same as above */
217 sizeof(asn_DEF_T2_tags_1)
218 /sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
219 0, /* No PER visible constraints */
220 asn_MBR_T2_1,
221 2, /* Elements count */
222 &asn_SPC_T2_specs_1 /* Additional specs */
223 };
224