Debian Codegraph @

tests/60-any-OK.asn1.-Pfwide-types

raw
1
2 /*** <<< INCLUDES [T1] >>> ***/
3
4 #include <INTEGER.h>
5 #include <ANY.h>
6 #include <constr_SEQUENCE.h>
7
8 /*** <<< TYPE-DECLS [T1] >>> ***/
9
10 typedef struct T1 {
11 INTEGER_t i;
12 ANY_t any;
13
14 /* Context for parsing across buffer boundaries */
15 asn_struct_ctx_t _asn_ctx;
16 } T1_t;
17
18 /*** <<< FUNC-DECLS [T1] >>> ***/
19
20 extern asn_TYPE_descriptor_t asn_DEF_T1;
21
22 /*** <<< STAT-DEFS [T1] >>> ***/
23
24 static asn_TYPE_member_t asn_MBR_T1_1[] = {
25 { ATF_NOFLAGS, 0, offsetof(struct T1, i),
26 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
27 .tag_mode = 0,
28 .type = &asn_DEF_INTEGER,
29 .memb_constraints = 0, /* Defer constraints checking to the member type */
30 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
31 .default_value = 0,
32 .name = "i"
33 },
34 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T1, any),
35 .tag = -1 /* Ambiguous tag (ANY?) */,
36 .tag_mode = 0,
37 .type = &asn_DEF_ANY,
38 .memb_constraints = 0, /* Defer constraints checking to the member type */
39 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
40 .default_value = 0,
41 .name = "any"
42 },
43 };
44 static const ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
45 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
46 };
47 static const asn_TYPE_tag2member_t asn_MAP_T1_tag2el_1[] = {
48 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i */
49 };
50 static asn_SEQUENCE_specifics_t asn_SPC_T1_specs_1 = {
51 sizeof(struct T1),
52 offsetof(struct T1, _asn_ctx),
53 asn_MAP_T1_tag2el_1,
54 1, /* Count of tags in the map */
55 0, 0, 0, /* Optional elements (not needed) */
56 -1, /* Start extensions */
57 -1 /* Stop extensions */
58 };
59 asn_TYPE_descriptor_t asn_DEF_T1 = {
60 "T1",
61 "T1",
62 SEQUENCE_free,
63 SEQUENCE_print,
64 SEQUENCE_constraint,
65 SEQUENCE_decode_ber,
66 SEQUENCE_encode_der,
67 SEQUENCE_decode_xer,
68 SEQUENCE_encode_xer,
69 0, 0, /* No PER support, use "-gen-PER" to enable */
70 0, /* Use generic outmost tag fetcher */
71 asn_DEF_T1_tags_1,
72 sizeof(asn_DEF_T1_tags_1)
73 /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
74 asn_DEF_T1_tags_1, /* Same as above */
75 sizeof(asn_DEF_T1_tags_1)
76 /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
77 0, /* No PER visible constraints */
78 asn_MBR_T1_1,
79 2, /* Elements count */
80 &asn_SPC_T1_specs_1 /* Additional specs */
81 };
82
83
84 /*** <<< INCLUDES [T2] >>> ***/
85
86 #include <INTEGER.h>
87 #include <ANY.h>
88 #include <constr_SEQUENCE.h>
89
90 /*** <<< TYPE-DECLS [T2] >>> ***/
91
92 typedef struct T2 {
93 INTEGER_t i;
94 ANY_t *any /* OPTIONAL */;
95
96 /* Context for parsing across buffer boundaries */
97 asn_struct_ctx_t _asn_ctx;
98 } T2_t;
99
100 /*** <<< FUNC-DECLS [T2] >>> ***/
101
102 extern asn_TYPE_descriptor_t asn_DEF_T2;
103
104 /*** <<< STAT-DEFS [T2] >>> ***/
105
106 static asn_TYPE_member_t asn_MBR_T2_1[] = {
107 { ATF_NOFLAGS, 0, offsetof(struct T2, i),
108 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
109 .tag_mode = 0,
110 .type = &asn_DEF_INTEGER,
111 .memb_constraints = 0, /* Defer constraints checking to the member type */
112 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
113 .default_value = 0,
114 .name = "i"
115 },
116 { ATF_POINTER, 1, offsetof(struct T2, any),
117 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
118 .tag_mode = +1, /* EXPLICIT tag at current level */
119 .type = &asn_DEF_ANY,
120 .memb_constraints = 0, /* Defer constraints checking to the member type */
121 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
122 .default_value = 0,
123 .name = "any"
124 },
125 };
126 static const ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
127 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
128 };
129 static const asn_TYPE_tag2member_t asn_MAP_T2_tag2el_1[] = {
130 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i */
131 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* any */
132 };
133 static asn_SEQUENCE_specifics_t asn_SPC_T2_specs_1 = {
134 sizeof(struct T2),
135 offsetof(struct T2, _asn_ctx),
136 asn_MAP_T2_tag2el_1,
137 2, /* Count of tags in the map */
138 0, 0, 0, /* Optional elements (not needed) */
139 -1, /* Start extensions */
140 -1 /* Stop extensions */
141 };
142 asn_TYPE_descriptor_t asn_DEF_T2 = {
143 "T2",
144 "T2",
145 SEQUENCE_free,
146 SEQUENCE_print,
147 SEQUENCE_constraint,
148 SEQUENCE_decode_ber,
149 SEQUENCE_encode_der,
150 SEQUENCE_decode_xer,
151 SEQUENCE_encode_xer,
152 0, 0, /* No PER support, use "-gen-PER" to enable */
153 0, /* Use generic outmost tag fetcher */
154 asn_DEF_T2_tags_1,
155 sizeof(asn_DEF_T2_tags_1)
156 /sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
157 asn_DEF_T2_tags_1, /* Same as above */
158 sizeof(asn_DEF_T2_tags_1)
159 /sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
160 0, /* No PER visible constraints */
161 asn_MBR_T2_1,
162 2, /* Elements count */
163 &asn_SPC_T2_specs_1 /* Additional specs */
164 };
165
166
167 /*** <<< INCLUDES [T3] >>> ***/
168
169 #include <ANY.h>
170 #include <constr_SEQUENCE.h>
171
172 /*** <<< TYPE-DECLS [T3] >>> ***/
173
174 typedef struct T3 {
175 ANY_t any1;
176 ANY_t any2;
177
178 /* Context for parsing across buffer boundaries */
179 asn_struct_ctx_t _asn_ctx;
180 } T3_t;
181
182 /*** <<< FUNC-DECLS [T3] >>> ***/
183
184 extern asn_TYPE_descriptor_t asn_DEF_T3;
185
186 /*** <<< STAT-DEFS [T3] >>> ***/
187
188 static asn_TYPE_member_t asn_MBR_T3_1[] = {
189 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T3, any1),
190 .tag = -1 /* Ambiguous tag (ANY?) */,
191 .tag_mode = 0,
192 .type = &asn_DEF_ANY,
193 .memb_constraints = 0, /* Defer constraints checking to the member type */
194 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
195 .default_value = 0,
196 .name = "any1"
197 },
198 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T3, any2),
199 .tag = -1 /* Ambiguous tag (ANY?) */,
200 .tag_mode = 0,
201 .type = &asn_DEF_ANY,
202 .memb_constraints = 0, /* Defer constraints checking to the member type */
203 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
204 .default_value = 0,
205 .name = "any2"
206 },
207 };
208 static const ber_tlv_tag_t asn_DEF_T3_tags_1[] = {
209 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
210 };
211 static asn_SEQUENCE_specifics_t asn_SPC_T3_specs_1 = {
212 sizeof(struct T3),
213 offsetof(struct T3, _asn_ctx),
214 0, /* No top level tags */
215 0, /* No tags in the map */
216 0, 0, 0, /* Optional elements (not needed) */
217 -1, /* Start extensions */
218 -1 /* Stop extensions */
219 };
220 asn_TYPE_descriptor_t asn_DEF_T3 = {
221 "T3",
222 "T3",
223 SEQUENCE_free,
224 SEQUENCE_print,
225 SEQUENCE_constraint,
226 SEQUENCE_decode_ber,
227 SEQUENCE_encode_der,
228 SEQUENCE_decode_xer,
229 SEQUENCE_encode_xer,
230 0, 0, /* No PER support, use "-gen-PER" to enable */
231 0, /* Use generic outmost tag fetcher */
232 asn_DEF_T3_tags_1,
233 sizeof(asn_DEF_T3_tags_1)
234 /sizeof(asn_DEF_T3_tags_1[0]), /* 1 */
235 asn_DEF_T3_tags_1, /* Same as above */
236 sizeof(asn_DEF_T3_tags_1)
237 /sizeof(asn_DEF_T3_tags_1[0]), /* 1 */
238 0, /* No PER visible constraints */
239 asn_MBR_T3_1,
240 2, /* Elements count */
241 &asn_SPC_T3_specs_1 /* Additional specs */
242 };
243