blob: 0dcf8738777f7babc4e9369d8aad22eb6a574376 [file] [log] [blame]
Lev Walkin8aed40c2017-07-26 18:50:04 -07001
2/*** <<< INCLUDES [A-noc] >>> ***/
3
4#include <NativeInteger.h>
5
6/*** <<< TYPE-DECLS [A-noc] >>> ***/
7
8typedef long A_noc_t;
9
10/*** <<< FUNC-DECLS [A-noc] >>> ***/
11
12extern asn_TYPE_descriptor_t asn_DEF_A_noc;
13asn_struct_free_f A_noc_free;
14asn_struct_print_f A_noc_print;
15asn_constr_check_f A_noc_constraint;
16ber_type_decoder_f A_noc_decode_ber;
17der_type_encoder_f A_noc_encode_der;
18xer_type_decoder_f A_noc_decode_xer;
19xer_type_encoder_f A_noc_encode_xer;
20oer_type_decoder_f A_noc_decode_oer;
21oer_type_encoder_f A_noc_encode_oer;
22
23/*** <<< CODE [A-noc] >>> ***/
24
25int
26A_noc_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
27 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
28 /* Replace with underlying type checker */
29 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
30 return td->check_constraints(td, sptr, ctfailcb, app_key);
31}
32
33/*
34 * This type is implemented using NativeInteger,
35 * so here we adjust the DEF accordingly.
36 */
37static void
38A_noc_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
39 td->free_struct = asn_DEF_NativeInteger.free_struct;
40 td->print_struct = asn_DEF_NativeInteger.print_struct;
41 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
42 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
43 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
44 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
45 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
46 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
47 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
48 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
49 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
50 if(!td->oer_constraints)
51 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
52 if(!td->per_constraints)
53 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
54 td->elements = asn_DEF_NativeInteger.elements;
55 td->elements_count = asn_DEF_NativeInteger.elements_count;
56 td->specifics = asn_DEF_NativeInteger.specifics;
57}
58
59void
60A_noc_free(asn_TYPE_descriptor_t *td,
61 void *struct_ptr, int contents_only) {
62 A_noc_1_inherit_TYPE_descriptor(td);
63 td->free_struct(td, struct_ptr, contents_only);
64}
65
66int
67A_noc_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
68 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
69 A_noc_1_inherit_TYPE_descriptor(td);
70 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
71}
72
73asn_dec_rval_t
74A_noc_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
75 void **structure, const void *bufptr, size_t size, int tag_mode) {
76 A_noc_1_inherit_TYPE_descriptor(td);
77 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
78}
79
80asn_enc_rval_t
81A_noc_encode_der(asn_TYPE_descriptor_t *td,
82 void *structure, int tag_mode, ber_tlv_tag_t tag,
83 asn_app_consume_bytes_f *cb, void *app_key) {
84 A_noc_1_inherit_TYPE_descriptor(td);
85 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
86}
87
88asn_dec_rval_t
89A_noc_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
90 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
91 A_noc_1_inherit_TYPE_descriptor(td);
92 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
93}
94
95asn_enc_rval_t
96A_noc_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
97 int ilevel, enum xer_encoder_flags_e flags,
98 asn_app_consume_bytes_f *cb, void *app_key) {
99 A_noc_1_inherit_TYPE_descriptor(td);
100 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
101}
102
103asn_dec_rval_t
104A_noc_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
105 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
106 A_noc_1_inherit_TYPE_descriptor(td);
107 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
108}
109
110asn_enc_rval_t
111A_noc_encode_oer(asn_TYPE_descriptor_t *td,
112 asn_oer_constraints_t *constraints,
113 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
114 A_noc_1_inherit_TYPE_descriptor(td);
115 return td->uper_encoder(td, constraints, structure, cb, app_key);
116}
117
118
119/*** <<< STAT-DEFS [A-noc] >>> ***/
120
121static const ber_tlv_tag_t asn_DEF_A_noc_tags_1[] = {
122 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
123};
124asn_TYPE_descriptor_t asn_DEF_A_noc = {
125 "A-noc",
126 "A-noc",
127 A_noc_free,
128 A_noc_print,
129 A_noc_constraint,
130 A_noc_decode_ber,
131 A_noc_encode_der,
132 A_noc_decode_xer,
133 A_noc_encode_xer,
134 A_noc_decode_oer,
135 A_noc_encode_oer,
136 0, 0, /* No PER support, use "-gen-PER" to enable */
137 0, /* Use generic outmost tag fetcher */
138 asn_DEF_A_noc_tags_1,
139 sizeof(asn_DEF_A_noc_tags_1)
140 /sizeof(asn_DEF_A_noc_tags_1[0]), /* 1 */
141 asn_DEF_A_noc_tags_1, /* Same as above */
142 sizeof(asn_DEF_A_noc_tags_1)
143 /sizeof(asn_DEF_A_noc_tags_1[0]), /* 1 */
144 0, /* No OER visible constraints */
145 0, /* No PER visible constraints */
146 0, 0, /* No members */
147 0 /* No specifics */
148};
149
150
Lev Walkin5861e8a2017-07-31 20:27:05 -0700151/*** <<< INCLUDES [B-0-0] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700152
153#include <NativeInteger.h>
154
Lev Walkin5861e8a2017-07-31 20:27:05 -0700155/*** <<< TYPE-DECLS [B-0-0] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700156
Lev Walkin5861e8a2017-07-31 20:27:05 -0700157typedef long B_0_0_t;
Lev Walkin8aed40c2017-07-26 18:50:04 -0700158
Lev Walkin5861e8a2017-07-31 20:27:05 -0700159/*** <<< FUNC-DECLS [B-0-0] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700160
Lev Walkin5861e8a2017-07-31 20:27:05 -0700161extern asn_TYPE_descriptor_t asn_DEF_B_0_0;
162asn_struct_free_f B_0_0_free;
163asn_struct_print_f B_0_0_print;
164asn_constr_check_f B_0_0_constraint;
165ber_type_decoder_f B_0_0_decode_ber;
166der_type_encoder_f B_0_0_encode_der;
167xer_type_decoder_f B_0_0_decode_xer;
168xer_type_encoder_f B_0_0_encode_xer;
169oer_type_decoder_f B_0_0_decode_oer;
170oer_type_encoder_f B_0_0_encode_oer;
Lev Walkin8aed40c2017-07-26 18:50:04 -0700171
Lev Walkin5861e8a2017-07-31 20:27:05 -0700172/*** <<< CODE [B-0-0] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700173
174int
Lev Walkin5861e8a2017-07-31 20:27:05 -0700175B_0_0_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700176 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
177 long value;
178
179 if(!sptr) {
180 ASN__CTFAIL(app_key, td, sptr,
181 "%s: value not given (%s:%d)",
182 td->name, __FILE__, __LINE__);
183 return -1;
184 }
185
186 value = *(const long *)sptr;
187
188 if((value == 0)) {
189 /* Constraint check succeeded */
190 return 0;
191 } else {
192 ASN__CTFAIL(app_key, td, sptr,
193 "%s: constraint failed (%s:%d)",
194 td->name, __FILE__, __LINE__);
195 return -1;
196 }
197}
198
199/*
200 * This type is implemented using NativeInteger,
201 * so here we adjust the DEF accordingly.
202 */
203static void
Lev Walkin5861e8a2017-07-31 20:27:05 -0700204B_0_0_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8aed40c2017-07-26 18:50:04 -0700205 td->free_struct = asn_DEF_NativeInteger.free_struct;
206 td->print_struct = asn_DEF_NativeInteger.print_struct;
207 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
208 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
209 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
210 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
211 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
212 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
213 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
214 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
215 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
216 if(!td->oer_constraints)
217 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
218 if(!td->per_constraints)
219 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
220 td->elements = asn_DEF_NativeInteger.elements;
221 td->elements_count = asn_DEF_NativeInteger.elements_count;
222 td->specifics = asn_DEF_NativeInteger.specifics;
223}
224
225void
Lev Walkin5861e8a2017-07-31 20:27:05 -0700226B_0_0_free(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700227 void *struct_ptr, int contents_only) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700228 B_0_0_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700229 td->free_struct(td, struct_ptr, contents_only);
230}
231
232int
Lev Walkin5861e8a2017-07-31 20:27:05 -0700233B_0_0_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700234 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700235 B_0_0_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700236 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
237}
238
239asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700240B_0_0_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700241 void **structure, const void *bufptr, size_t size, int tag_mode) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700242 B_0_0_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700243 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
244}
245
246asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700247B_0_0_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700248 void *structure, int tag_mode, ber_tlv_tag_t tag,
249 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700250 B_0_0_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700251 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
252}
253
254asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700255B_0_0_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700256 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700257 B_0_0_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700258 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
259}
260
261asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700262B_0_0_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700263 int ilevel, enum xer_encoder_flags_e flags,
264 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700265 B_0_0_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700266 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
267}
268
269asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700270B_0_0_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700271 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700272 B_0_0_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700273 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
274}
275
276asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700277B_0_0_encode_oer(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700278 asn_oer_constraints_t *constraints,
279 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700280 B_0_0_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700281 return td->uper_encoder(td, constraints, structure, cb, app_key);
282}
283
284
Lev Walkin5861e8a2017-07-31 20:27:05 -0700285/*** <<< CTDEFS [B-0-0] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700286
Lev Walkin5861e8a2017-07-31 20:27:05 -0700287static asn_oer_constraints_t asn_OER_type_B_0_0_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -0700288 { 1, 1 } /* (0..0) */,
289 -1};
Lev Walkin8aed40c2017-07-26 18:50:04 -0700290
Lev Walkin5861e8a2017-07-31 20:27:05 -0700291/*** <<< STAT-DEFS [B-0-0] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700292
Lev Walkin5861e8a2017-07-31 20:27:05 -0700293static const ber_tlv_tag_t asn_DEF_B_0_0_tags_1[] = {
Lev Walkin8aed40c2017-07-26 18:50:04 -0700294 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
295};
Lev Walkin5861e8a2017-07-31 20:27:05 -0700296asn_TYPE_descriptor_t asn_DEF_B_0_0 = {
297 "B-0-0",
298 "B-0-0",
299 B_0_0_free,
300 B_0_0_print,
301 B_0_0_constraint,
302 B_0_0_decode_ber,
303 B_0_0_encode_der,
304 B_0_0_decode_xer,
305 B_0_0_encode_xer,
306 B_0_0_decode_oer,
307 B_0_0_encode_oer,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700308 0, 0, /* No PER support, use "-gen-PER" to enable */
309 0, /* Use generic outmost tag fetcher */
Lev Walkin5861e8a2017-07-31 20:27:05 -0700310 asn_DEF_B_0_0_tags_1,
311 sizeof(asn_DEF_B_0_0_tags_1)
312 /sizeof(asn_DEF_B_0_0_tags_1[0]), /* 1 */
313 asn_DEF_B_0_0_tags_1, /* Same as above */
314 sizeof(asn_DEF_B_0_0_tags_1)
315 /sizeof(asn_DEF_B_0_0_tags_1[0]), /* 1 */
316 &asn_OER_type_B_0_0_constr_1,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700317 0, /* No PER visible constraints */
318 0, 0, /* No members */
319 0 /* No specifics */
320};
321
322
Lev Walkin5861e8a2017-07-31 20:27:05 -0700323/*** <<< INCLUDES [C-1-2] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700324
325#include <NativeInteger.h>
326
Lev Walkin5861e8a2017-07-31 20:27:05 -0700327/*** <<< TYPE-DECLS [C-1-2] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700328
Lev Walkin5861e8a2017-07-31 20:27:05 -0700329typedef long C_1_2_t;
Lev Walkin8aed40c2017-07-26 18:50:04 -0700330
Lev Walkin5861e8a2017-07-31 20:27:05 -0700331/*** <<< FUNC-DECLS [C-1-2] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700332
Lev Walkin5861e8a2017-07-31 20:27:05 -0700333extern asn_TYPE_descriptor_t asn_DEF_C_1_2;
334asn_struct_free_f C_1_2_free;
335asn_struct_print_f C_1_2_print;
336asn_constr_check_f C_1_2_constraint;
337ber_type_decoder_f C_1_2_decode_ber;
338der_type_encoder_f C_1_2_encode_der;
339xer_type_decoder_f C_1_2_decode_xer;
340xer_type_encoder_f C_1_2_encode_xer;
341oer_type_decoder_f C_1_2_decode_oer;
342oer_type_encoder_f C_1_2_encode_oer;
Lev Walkin8aed40c2017-07-26 18:50:04 -0700343
Lev Walkin5861e8a2017-07-31 20:27:05 -0700344/*** <<< CODE [C-1-2] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700345
346int
Lev Walkin5861e8a2017-07-31 20:27:05 -0700347C_1_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700348 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
349 long value;
350
351 if(!sptr) {
352 ASN__CTFAIL(app_key, td, sptr,
353 "%s: value not given (%s:%d)",
354 td->name, __FILE__, __LINE__);
355 return -1;
356 }
357
358 value = *(const long *)sptr;
359
Lev Walkin5861e8a2017-07-31 20:27:05 -0700360 if((value >= 1 && value <= 2)) {
Lev Walkin8aed40c2017-07-26 18:50:04 -0700361 /* Constraint check succeeded */
362 return 0;
363 } else {
364 ASN__CTFAIL(app_key, td, sptr,
365 "%s: constraint failed (%s:%d)",
366 td->name, __FILE__, __LINE__);
367 return -1;
368 }
369}
370
371/*
372 * This type is implemented using NativeInteger,
373 * so here we adjust the DEF accordingly.
374 */
375static void
Lev Walkin5861e8a2017-07-31 20:27:05 -0700376C_1_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8aed40c2017-07-26 18:50:04 -0700377 td->free_struct = asn_DEF_NativeInteger.free_struct;
378 td->print_struct = asn_DEF_NativeInteger.print_struct;
379 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
380 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
381 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
382 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
383 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
384 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
385 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
386 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
387 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
388 if(!td->oer_constraints)
389 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
390 if(!td->per_constraints)
391 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
392 td->elements = asn_DEF_NativeInteger.elements;
393 td->elements_count = asn_DEF_NativeInteger.elements_count;
394 td->specifics = asn_DEF_NativeInteger.specifics;
395}
396
397void
Lev Walkin5861e8a2017-07-31 20:27:05 -0700398C_1_2_free(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700399 void *struct_ptr, int contents_only) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700400 C_1_2_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700401 td->free_struct(td, struct_ptr, contents_only);
402}
403
404int
Lev Walkin5861e8a2017-07-31 20:27:05 -0700405C_1_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700406 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700407 C_1_2_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700408 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
409}
410
411asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700412C_1_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700413 void **structure, const void *bufptr, size_t size, int tag_mode) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700414 C_1_2_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700415 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
416}
417
418asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700419C_1_2_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700420 void *structure, int tag_mode, ber_tlv_tag_t tag,
421 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700422 C_1_2_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700423 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
424}
425
426asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700427C_1_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700428 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700429 C_1_2_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700430 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
431}
432
433asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700434C_1_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700435 int ilevel, enum xer_encoder_flags_e flags,
436 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700437 C_1_2_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700438 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
439}
440
441asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700442C_1_2_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700443 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700444 C_1_2_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700445 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
446}
447
448asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700449C_1_2_encode_oer(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700450 asn_oer_constraints_t *constraints,
451 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700452 C_1_2_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700453 return td->uper_encoder(td, constraints, structure, cb, app_key);
454}
455
456
Lev Walkin5861e8a2017-07-31 20:27:05 -0700457/*** <<< CTDEFS [C-1-2] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700458
Lev Walkin5861e8a2017-07-31 20:27:05 -0700459static asn_oer_constraints_t asn_OER_type_C_1_2_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -0700460 { 1, 1 } /* (1..2) */,
461 -1};
Lev Walkin8aed40c2017-07-26 18:50:04 -0700462
Lev Walkin5861e8a2017-07-31 20:27:05 -0700463/*** <<< STAT-DEFS [C-1-2] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700464
Lev Walkin5861e8a2017-07-31 20:27:05 -0700465static const ber_tlv_tag_t asn_DEF_C_1_2_tags_1[] = {
Lev Walkin8aed40c2017-07-26 18:50:04 -0700466 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
467};
Lev Walkin5861e8a2017-07-31 20:27:05 -0700468asn_TYPE_descriptor_t asn_DEF_C_1_2 = {
469 "C-1-2",
470 "C-1-2",
471 C_1_2_free,
472 C_1_2_print,
473 C_1_2_constraint,
474 C_1_2_decode_ber,
475 C_1_2_encode_der,
476 C_1_2_decode_xer,
477 C_1_2_encode_xer,
478 C_1_2_decode_oer,
479 C_1_2_encode_oer,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700480 0, 0, /* No PER support, use "-gen-PER" to enable */
481 0, /* Use generic outmost tag fetcher */
Lev Walkin5861e8a2017-07-31 20:27:05 -0700482 asn_DEF_C_1_2_tags_1,
483 sizeof(asn_DEF_C_1_2_tags_1)
484 /sizeof(asn_DEF_C_1_2_tags_1[0]), /* 1 */
485 asn_DEF_C_1_2_tags_1, /* Same as above */
486 sizeof(asn_DEF_C_1_2_tags_1)
487 /sizeof(asn_DEF_C_1_2_tags_1[0]), /* 1 */
488 &asn_OER_type_C_1_2_constr_1,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700489 0, /* No PER visible constraints */
490 0, 0, /* No members */
491 0 /* No specifics */
492};
493
494
495/*** <<< INCLUDES [D-inv] >>> ***/
496
497#include <NativeInteger.h>
498
499/*** <<< TYPE-DECLS [D-inv] >>> ***/
500
501typedef long D_inv_t;
502
503/*** <<< FUNC-DECLS [D-inv] >>> ***/
504
505extern asn_TYPE_descriptor_t asn_DEF_D_inv;
506asn_struct_free_f D_inv_free;
507asn_struct_print_f D_inv_print;
508asn_constr_check_f D_inv_constraint;
509ber_type_decoder_f D_inv_decode_ber;
510der_type_encoder_f D_inv_encode_der;
511xer_type_decoder_f D_inv_decode_xer;
512xer_type_encoder_f D_inv_encode_xer;
513oer_type_decoder_f D_inv_decode_oer;
514oer_type_encoder_f D_inv_encode_oer;
515
516/*** <<< CODE [D-inv] >>> ***/
517
518int
519D_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
520 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
521 long value;
522
523 if(!sptr) {
524 ASN__CTFAIL(app_key, td, sptr,
525 "%s: value not given (%s:%d)",
526 td->name, __FILE__, __LINE__);
527 return -1;
528 }
529
530 value = *(const long *)sptr;
531
532 if((value >= 0 && value <= 10)) {
533 /* Constraint check succeeded */
534 return 0;
535 } else {
536 ASN__CTFAIL(app_key, td, sptr,
537 "%s: constraint failed (%s:%d)",
538 td->name, __FILE__, __LINE__);
539 return -1;
540 }
541}
542
543/*
544 * This type is implemented using NativeInteger,
545 * so here we adjust the DEF accordingly.
546 */
547static void
548D_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
549 td->free_struct = asn_DEF_NativeInteger.free_struct;
550 td->print_struct = asn_DEF_NativeInteger.print_struct;
551 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
552 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
553 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
554 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
555 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
556 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
557 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
558 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
559 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
560 if(!td->oer_constraints)
561 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
562 if(!td->per_constraints)
563 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
564 td->elements = asn_DEF_NativeInteger.elements;
565 td->elements_count = asn_DEF_NativeInteger.elements_count;
566 td->specifics = asn_DEF_NativeInteger.specifics;
567}
568
569void
570D_inv_free(asn_TYPE_descriptor_t *td,
571 void *struct_ptr, int contents_only) {
572 D_inv_1_inherit_TYPE_descriptor(td);
573 td->free_struct(td, struct_ptr, contents_only);
574}
575
576int
577D_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
578 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
579 D_inv_1_inherit_TYPE_descriptor(td);
580 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
581}
582
583asn_dec_rval_t
584D_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
585 void **structure, const void *bufptr, size_t size, int tag_mode) {
586 D_inv_1_inherit_TYPE_descriptor(td);
587 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
588}
589
590asn_enc_rval_t
591D_inv_encode_der(asn_TYPE_descriptor_t *td,
592 void *structure, int tag_mode, ber_tlv_tag_t tag,
593 asn_app_consume_bytes_f *cb, void *app_key) {
594 D_inv_1_inherit_TYPE_descriptor(td);
595 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
596}
597
598asn_dec_rval_t
599D_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
600 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
601 D_inv_1_inherit_TYPE_descriptor(td);
602 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
603}
604
605asn_enc_rval_t
606D_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
607 int ilevel, enum xer_encoder_flags_e flags,
608 asn_app_consume_bytes_f *cb, void *app_key) {
609 D_inv_1_inherit_TYPE_descriptor(td);
610 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
611}
612
613asn_dec_rval_t
614D_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
615 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
616 D_inv_1_inherit_TYPE_descriptor(td);
617 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
618}
619
620asn_enc_rval_t
621D_inv_encode_oer(asn_TYPE_descriptor_t *td,
622 asn_oer_constraints_t *constraints,
623 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
624 D_inv_1_inherit_TYPE_descriptor(td);
625 return td->uper_encoder(td, constraints, structure, cb, app_key);
626}
627
628
629/*** <<< CTDEFS [D-inv] >>> ***/
630
631static asn_oer_constraints_t asn_OER_type_D_inv_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -0700632 { 0, 0 },
633 -1};
Lev Walkin8aed40c2017-07-26 18:50:04 -0700634
635/*** <<< STAT-DEFS [D-inv] >>> ***/
636
637static const ber_tlv_tag_t asn_DEF_D_inv_tags_1[] = {
638 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
639};
640asn_TYPE_descriptor_t asn_DEF_D_inv = {
641 "D-inv",
642 "D-inv",
643 D_inv_free,
644 D_inv_print,
645 D_inv_constraint,
646 D_inv_decode_ber,
647 D_inv_encode_der,
648 D_inv_decode_xer,
649 D_inv_encode_xer,
650 D_inv_decode_oer,
651 D_inv_encode_oer,
652 0, 0, /* No PER support, use "-gen-PER" to enable */
653 0, /* Use generic outmost tag fetcher */
654 asn_DEF_D_inv_tags_1,
655 sizeof(asn_DEF_D_inv_tags_1)
656 /sizeof(asn_DEF_D_inv_tags_1[0]), /* 1 */
657 asn_DEF_D_inv_tags_1, /* Same as above */
658 sizeof(asn_DEF_D_inv_tags_1)
659 /sizeof(asn_DEF_D_inv_tags_1[0]), /* 1 */
660 &asn_OER_type_D_inv_constr_1,
661 0, /* No PER visible constraints */
662 0, 0, /* No members */
663 0 /* No specifics */
664};
665
666
Lev Walkin5861e8a2017-07-31 20:27:05 -0700667/*** <<< INCLUDES [E-2-5] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700668
669#include <NativeInteger.h>
670
Lev Walkin5861e8a2017-07-31 20:27:05 -0700671/*** <<< TYPE-DECLS [E-2-5] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700672
Lev Walkin5861e8a2017-07-31 20:27:05 -0700673typedef long E_2_5_t;
Lev Walkin8aed40c2017-07-26 18:50:04 -0700674
Lev Walkin5861e8a2017-07-31 20:27:05 -0700675/*** <<< FUNC-DECLS [E-2-5] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700676
Lev Walkin5861e8a2017-07-31 20:27:05 -0700677extern asn_TYPE_descriptor_t asn_DEF_E_2_5;
678asn_struct_free_f E_2_5_free;
679asn_struct_print_f E_2_5_print;
680asn_constr_check_f E_2_5_constraint;
681ber_type_decoder_f E_2_5_decode_ber;
682der_type_encoder_f E_2_5_encode_der;
683xer_type_decoder_f E_2_5_decode_xer;
684xer_type_encoder_f E_2_5_encode_xer;
685oer_type_decoder_f E_2_5_decode_oer;
686oer_type_encoder_f E_2_5_encode_oer;
Lev Walkin8aed40c2017-07-26 18:50:04 -0700687
Lev Walkin5861e8a2017-07-31 20:27:05 -0700688/*** <<< CODE [E-2-5] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700689
690int
Lev Walkin5861e8a2017-07-31 20:27:05 -0700691E_2_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700692 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
693 long value;
694
695 if(!sptr) {
696 ASN__CTFAIL(app_key, td, sptr,
697 "%s: value not given (%s:%d)",
698 td->name, __FILE__, __LINE__);
699 return -1;
700 }
701
702 value = *(const long *)sptr;
703
704 if((value >= 2 && value <= 5)) {
705 /* Constraint check succeeded */
706 return 0;
707 } else {
708 ASN__CTFAIL(app_key, td, sptr,
709 "%s: constraint failed (%s:%d)",
710 td->name, __FILE__, __LINE__);
711 return -1;
712 }
713}
714
715/*
716 * This type is implemented using NativeInteger,
717 * so here we adjust the DEF accordingly.
718 */
719static void
Lev Walkin5861e8a2017-07-31 20:27:05 -0700720E_2_5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8aed40c2017-07-26 18:50:04 -0700721 td->free_struct = asn_DEF_NativeInteger.free_struct;
722 td->print_struct = asn_DEF_NativeInteger.print_struct;
723 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
724 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
725 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
726 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
727 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
728 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
729 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
730 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
731 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
732 if(!td->oer_constraints)
733 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
734 if(!td->per_constraints)
735 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
736 td->elements = asn_DEF_NativeInteger.elements;
737 td->elements_count = asn_DEF_NativeInteger.elements_count;
738 td->specifics = asn_DEF_NativeInteger.specifics;
739}
740
741void
Lev Walkin5861e8a2017-07-31 20:27:05 -0700742E_2_5_free(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700743 void *struct_ptr, int contents_only) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700744 E_2_5_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700745 td->free_struct(td, struct_ptr, contents_only);
746}
747
748int
Lev Walkin5861e8a2017-07-31 20:27:05 -0700749E_2_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700750 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700751 E_2_5_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700752 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
753}
754
755asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700756E_2_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700757 void **structure, const void *bufptr, size_t size, int tag_mode) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700758 E_2_5_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700759 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
760}
761
762asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700763E_2_5_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700764 void *structure, int tag_mode, ber_tlv_tag_t tag,
765 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700766 E_2_5_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700767 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
768}
769
770asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700771E_2_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700772 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700773 E_2_5_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700774 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
775}
776
777asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700778E_2_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700779 int ilevel, enum xer_encoder_flags_e flags,
780 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700781 E_2_5_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700782 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
783}
784
785asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700786E_2_5_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700787 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700788 E_2_5_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700789 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
790}
791
792asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -0700793E_2_5_encode_oer(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700794 asn_oer_constraints_t *constraints,
795 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -0700796 E_2_5_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -0700797 return td->uper_encoder(td, constraints, structure, cb, app_key);
798}
799
800
Lev Walkin5861e8a2017-07-31 20:27:05 -0700801/*** <<< CTDEFS [E-2-5] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700802
Lev Walkin5861e8a2017-07-31 20:27:05 -0700803static asn_oer_constraints_t asn_OER_type_E_2_5_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -0700804 { 1, 1 } /* (2..5) */,
805 -1};
Lev Walkin8aed40c2017-07-26 18:50:04 -0700806
Lev Walkin5861e8a2017-07-31 20:27:05 -0700807/*** <<< STAT-DEFS [E-2-5] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -0700808
Lev Walkin5861e8a2017-07-31 20:27:05 -0700809static const ber_tlv_tag_t asn_DEF_E_2_5_tags_1[] = {
Lev Walkin8aed40c2017-07-26 18:50:04 -0700810 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
811};
Lev Walkin5861e8a2017-07-31 20:27:05 -0700812asn_TYPE_descriptor_t asn_DEF_E_2_5 = {
813 "E-2-5",
814 "E-2-5",
815 E_2_5_free,
816 E_2_5_print,
817 E_2_5_constraint,
818 E_2_5_decode_ber,
819 E_2_5_encode_der,
820 E_2_5_decode_xer,
821 E_2_5_encode_xer,
822 E_2_5_decode_oer,
823 E_2_5_encode_oer,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700824 0, 0, /* No PER support, use "-gen-PER" to enable */
825 0, /* Use generic outmost tag fetcher */
Lev Walkin5861e8a2017-07-31 20:27:05 -0700826 asn_DEF_E_2_5_tags_1,
827 sizeof(asn_DEF_E_2_5_tags_1)
828 /sizeof(asn_DEF_E_2_5_tags_1[0]), /* 1 */
829 asn_DEF_E_2_5_tags_1, /* Same as above */
830 sizeof(asn_DEF_E_2_5_tags_1)
831 /sizeof(asn_DEF_E_2_5_tags_1[0]), /* 1 */
832 &asn_OER_type_E_2_5_constr_1,
Lev Walkin8aed40c2017-07-26 18:50:04 -0700833 0, /* No PER visible constraints */
834 0, 0, /* No members */
835 0 /* No specifics */
836};
837
838
839/*** <<< INCLUDES [F-inv] >>> ***/
840
841#include <NativeInteger.h>
842
843/*** <<< TYPE-DECLS [F-inv] >>> ***/
844
845typedef long F_inv_t;
846
847/*** <<< FUNC-DECLS [F-inv] >>> ***/
848
849extern asn_TYPE_descriptor_t asn_DEF_F_inv;
850asn_struct_free_f F_inv_free;
851asn_struct_print_f F_inv_print;
852asn_constr_check_f F_inv_constraint;
853ber_type_decoder_f F_inv_decode_ber;
854der_type_encoder_f F_inv_encode_der;
855xer_type_decoder_f F_inv_decode_xer;
856xer_type_encoder_f F_inv_encode_xer;
857oer_type_decoder_f F_inv_decode_oer;
858oer_type_encoder_f F_inv_encode_oer;
859
860/*** <<< CODE [F-inv] >>> ***/
861
862int
863F_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
864 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
865 long value;
866
867 if(!sptr) {
868 ASN__CTFAIL(app_key, td, sptr,
869 "%s: value not given (%s:%d)",
870 td->name, __FILE__, __LINE__);
871 return -1;
872 }
873
874 value = *(const long *)sptr;
875
876 if((value >= 2 && value <= 5)) {
877 /* Constraint check succeeded */
878 return 0;
879 } else {
880 ASN__CTFAIL(app_key, td, sptr,
881 "%s: constraint failed (%s:%d)",
882 td->name, __FILE__, __LINE__);
883 return -1;
884 }
885}
886
887/*
888 * This type is implemented using NativeInteger,
889 * so here we adjust the DEF accordingly.
890 */
891static void
892F_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
893 td->free_struct = asn_DEF_NativeInteger.free_struct;
894 td->print_struct = asn_DEF_NativeInteger.print_struct;
895 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
896 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
897 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
898 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
899 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
900 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
901 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
902 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
903 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
904 if(!td->oer_constraints)
905 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
906 if(!td->per_constraints)
907 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
908 td->elements = asn_DEF_NativeInteger.elements;
909 td->elements_count = asn_DEF_NativeInteger.elements_count;
910 td->specifics = asn_DEF_NativeInteger.specifics;
911}
912
913void
914F_inv_free(asn_TYPE_descriptor_t *td,
915 void *struct_ptr, int contents_only) {
916 F_inv_1_inherit_TYPE_descriptor(td);
917 td->free_struct(td, struct_ptr, contents_only);
918}
919
920int
921F_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
922 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
923 F_inv_1_inherit_TYPE_descriptor(td);
924 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
925}
926
927asn_dec_rval_t
928F_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
929 void **structure, const void *bufptr, size_t size, int tag_mode) {
930 F_inv_1_inherit_TYPE_descriptor(td);
931 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
932}
933
934asn_enc_rval_t
935F_inv_encode_der(asn_TYPE_descriptor_t *td,
936 void *structure, int tag_mode, ber_tlv_tag_t tag,
937 asn_app_consume_bytes_f *cb, void *app_key) {
938 F_inv_1_inherit_TYPE_descriptor(td);
939 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
940}
941
942asn_dec_rval_t
943F_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
944 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
945 F_inv_1_inherit_TYPE_descriptor(td);
946 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
947}
948
949asn_enc_rval_t
950F_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
951 int ilevel, enum xer_encoder_flags_e flags,
952 asn_app_consume_bytes_f *cb, void *app_key) {
953 F_inv_1_inherit_TYPE_descriptor(td);
954 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
955}
956
957asn_dec_rval_t
958F_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
959 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
960 F_inv_1_inherit_TYPE_descriptor(td);
961 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
962}
963
964asn_enc_rval_t
965F_inv_encode_oer(asn_TYPE_descriptor_t *td,
966 asn_oer_constraints_t *constraints,
967 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
968 F_inv_1_inherit_TYPE_descriptor(td);
969 return td->uper_encoder(td, constraints, structure, cb, app_key);
970}
971
972
973/*** <<< CTDEFS [F-inv] >>> ***/
974
975static asn_oer_constraints_t asn_OER_type_F_inv_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -0700976 { 1, 1 } /* (0..10) */,
977 -1};
Lev Walkin8aed40c2017-07-26 18:50:04 -0700978
979/*** <<< STAT-DEFS [F-inv] >>> ***/
980
981static const ber_tlv_tag_t asn_DEF_F_inv_tags_1[] = {
982 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
983};
984asn_TYPE_descriptor_t asn_DEF_F_inv = {
985 "F-inv",
986 "F-inv",
987 F_inv_free,
988 F_inv_print,
989 F_inv_constraint,
990 F_inv_decode_ber,
991 F_inv_encode_der,
992 F_inv_decode_xer,
993 F_inv_encode_xer,
994 F_inv_decode_oer,
995 F_inv_encode_oer,
996 0, 0, /* No PER support, use "-gen-PER" to enable */
997 0, /* Use generic outmost tag fetcher */
998 asn_DEF_F_inv_tags_1,
999 sizeof(asn_DEF_F_inv_tags_1)
1000 /sizeof(asn_DEF_F_inv_tags_1[0]), /* 1 */
1001 asn_DEF_F_inv_tags_1, /* Same as above */
1002 sizeof(asn_DEF_F_inv_tags_1)
1003 /sizeof(asn_DEF_F_inv_tags_1[0]), /* 1 */
1004 &asn_OER_type_F_inv_constr_1,
1005 0, /* No PER visible constraints */
1006 0, 0, /* No members */
1007 0 /* No specifics */
1008};
1009
1010
Lev Walkin5861e8a2017-07-31 20:27:05 -07001011/*** <<< INCLUDES [G-3-3] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -07001012
1013#include <NativeInteger.h>
1014
Lev Walkin5861e8a2017-07-31 20:27:05 -07001015/*** <<< TYPE-DECLS [G-3-3] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -07001016
Lev Walkin5861e8a2017-07-31 20:27:05 -07001017typedef long G_3_3_t;
Lev Walkin8aed40c2017-07-26 18:50:04 -07001018
Lev Walkin5861e8a2017-07-31 20:27:05 -07001019/*** <<< FUNC-DECLS [G-3-3] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -07001020
Lev Walkin5861e8a2017-07-31 20:27:05 -07001021extern asn_TYPE_descriptor_t asn_DEF_G_3_3;
1022asn_struct_free_f G_3_3_free;
1023asn_struct_print_f G_3_3_print;
1024asn_constr_check_f G_3_3_constraint;
1025ber_type_decoder_f G_3_3_decode_ber;
1026der_type_encoder_f G_3_3_encode_der;
1027xer_type_decoder_f G_3_3_decode_xer;
1028xer_type_encoder_f G_3_3_encode_xer;
1029oer_type_decoder_f G_3_3_decode_oer;
1030oer_type_encoder_f G_3_3_encode_oer;
Lev Walkin8aed40c2017-07-26 18:50:04 -07001031
Lev Walkin5861e8a2017-07-31 20:27:05 -07001032/*** <<< CODE [G-3-3] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -07001033
1034int
Lev Walkin5861e8a2017-07-31 20:27:05 -07001035G_3_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin8aed40c2017-07-26 18:50:04 -07001036 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1037 long value;
1038
1039 if(!sptr) {
1040 ASN__CTFAIL(app_key, td, sptr,
1041 "%s: value not given (%s:%d)",
1042 td->name, __FILE__, __LINE__);
1043 return -1;
1044 }
1045
1046 value = *(const long *)sptr;
1047
1048 if((value == 3)) {
1049 /* Constraint check succeeded */
1050 return 0;
1051 } else {
1052 ASN__CTFAIL(app_key, td, sptr,
1053 "%s: constraint failed (%s:%d)",
1054 td->name, __FILE__, __LINE__);
1055 return -1;
1056 }
1057}
1058
1059/*
1060 * This type is implemented using NativeInteger,
1061 * so here we adjust the DEF accordingly.
1062 */
1063static void
Lev Walkin5861e8a2017-07-31 20:27:05 -07001064G_3_3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8aed40c2017-07-26 18:50:04 -07001065 td->free_struct = asn_DEF_NativeInteger.free_struct;
1066 td->print_struct = asn_DEF_NativeInteger.print_struct;
1067 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
1068 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1069 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1070 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1071 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1072 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1073 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
1074 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
1075 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
1076 if(!td->oer_constraints)
1077 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
1078 if(!td->per_constraints)
1079 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1080 td->elements = asn_DEF_NativeInteger.elements;
1081 td->elements_count = asn_DEF_NativeInteger.elements_count;
1082 td->specifics = asn_DEF_NativeInteger.specifics;
1083}
1084
1085void
Lev Walkin5861e8a2017-07-31 20:27:05 -07001086G_3_3_free(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -07001087 void *struct_ptr, int contents_only) {
Lev Walkin5861e8a2017-07-31 20:27:05 -07001088 G_3_3_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -07001089 td->free_struct(td, struct_ptr, contents_only);
1090}
1091
1092int
Lev Walkin5861e8a2017-07-31 20:27:05 -07001093G_3_3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin8aed40c2017-07-26 18:50:04 -07001094 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -07001095 G_3_3_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -07001096 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1097}
1098
1099asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -07001100G_3_3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -07001101 void **structure, const void *bufptr, size_t size, int tag_mode) {
Lev Walkin5861e8a2017-07-31 20:27:05 -07001102 G_3_3_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -07001103 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1104}
1105
1106asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -07001107G_3_3_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -07001108 void *structure, int tag_mode, ber_tlv_tag_t tag,
1109 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -07001110 G_3_3_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -07001111 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1112}
1113
1114asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -07001115G_3_3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -07001116 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
Lev Walkin5861e8a2017-07-31 20:27:05 -07001117 G_3_3_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -07001118 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1119}
1120
1121asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -07001122G_3_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkin8aed40c2017-07-26 18:50:04 -07001123 int ilevel, enum xer_encoder_flags_e flags,
1124 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -07001125 G_3_3_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -07001126 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1127}
1128
1129asn_dec_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -07001130G_3_3_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -07001131 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
Lev Walkin5861e8a2017-07-31 20:27:05 -07001132 G_3_3_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -07001133 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
1134}
1135
1136asn_enc_rval_t
Lev Walkin5861e8a2017-07-31 20:27:05 -07001137G_3_3_encode_oer(asn_TYPE_descriptor_t *td,
Lev Walkin8aed40c2017-07-26 18:50:04 -07001138 asn_oer_constraints_t *constraints,
1139 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkin5861e8a2017-07-31 20:27:05 -07001140 G_3_3_1_inherit_TYPE_descriptor(td);
Lev Walkin8aed40c2017-07-26 18:50:04 -07001141 return td->uper_encoder(td, constraints, structure, cb, app_key);
1142}
1143
1144
Lev Walkin5861e8a2017-07-31 20:27:05 -07001145/*** <<< CTDEFS [G-3-3] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -07001146
Lev Walkin5861e8a2017-07-31 20:27:05 -07001147static asn_oer_constraints_t asn_OER_type_G_3_3_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -07001148 { 1, 1 } /* (3..3) */,
1149 -1};
Lev Walkin8aed40c2017-07-26 18:50:04 -07001150
Lev Walkin5861e8a2017-07-31 20:27:05 -07001151/*** <<< STAT-DEFS [G-3-3] >>> ***/
Lev Walkin8aed40c2017-07-26 18:50:04 -07001152
Lev Walkin5861e8a2017-07-31 20:27:05 -07001153static const ber_tlv_tag_t asn_DEF_G_3_3_tags_1[] = {
Lev Walkin8aed40c2017-07-26 18:50:04 -07001154 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1155};
Lev Walkin5861e8a2017-07-31 20:27:05 -07001156asn_TYPE_descriptor_t asn_DEF_G_3_3 = {
1157 "G-3-3",
1158 "G-3-3",
1159 G_3_3_free,
1160 G_3_3_print,
1161 G_3_3_constraint,
1162 G_3_3_decode_ber,
1163 G_3_3_encode_der,
1164 G_3_3_decode_xer,
1165 G_3_3_encode_xer,
1166 G_3_3_decode_oer,
1167 G_3_3_encode_oer,
Lev Walkin8aed40c2017-07-26 18:50:04 -07001168 0, 0, /* No PER support, use "-gen-PER" to enable */
1169 0, /* Use generic outmost tag fetcher */
Lev Walkin5861e8a2017-07-31 20:27:05 -07001170 asn_DEF_G_3_3_tags_1,
1171 sizeof(asn_DEF_G_3_3_tags_1)
1172 /sizeof(asn_DEF_G_3_3_tags_1[0]), /* 1 */
1173 asn_DEF_G_3_3_tags_1, /* Same as above */
1174 sizeof(asn_DEF_G_3_3_tags_1)
1175 /sizeof(asn_DEF_G_3_3_tags_1[0]), /* 1 */
1176 &asn_OER_type_G_3_3_constr_1,
1177 0, /* No PER visible constraints */
1178 0, 0, /* No members */
1179 0 /* No specifics */
1180};
1181
1182
1183/*** <<< INCLUDES [H-4-5] >>> ***/
1184
1185#include <NativeInteger.h>
1186
1187/*** <<< TYPE-DECLS [H-4-5] >>> ***/
1188
1189typedef long H_4_5_t;
1190
1191/*** <<< FUNC-DECLS [H-4-5] >>> ***/
1192
1193extern asn_TYPE_descriptor_t asn_DEF_H_4_5;
1194asn_struct_free_f H_4_5_free;
1195asn_struct_print_f H_4_5_print;
1196asn_constr_check_f H_4_5_constraint;
1197ber_type_decoder_f H_4_5_decode_ber;
1198der_type_encoder_f H_4_5_encode_der;
1199xer_type_decoder_f H_4_5_decode_xer;
1200xer_type_encoder_f H_4_5_encode_xer;
1201oer_type_decoder_f H_4_5_decode_oer;
1202oer_type_encoder_f H_4_5_encode_oer;
1203
1204/*** <<< CODE [H-4-5] >>> ***/
1205
1206int
1207H_4_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1208 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1209 long value;
1210
1211 if(!sptr) {
1212 ASN__CTFAIL(app_key, td, sptr,
1213 "%s: value not given (%s:%d)",
1214 td->name, __FILE__, __LINE__);
1215 return -1;
1216 }
1217
1218 value = *(const long *)sptr;
1219
1220 if((value >= 4 && value <= 5)) {
1221 /* Constraint check succeeded */
1222 return 0;
1223 } else {
1224 ASN__CTFAIL(app_key, td, sptr,
1225 "%s: constraint failed (%s:%d)",
1226 td->name, __FILE__, __LINE__);
1227 return -1;
1228 }
1229}
1230
1231/*
1232 * This type is implemented using NativeInteger,
1233 * so here we adjust the DEF accordingly.
1234 */
1235static void
1236H_4_5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1237 td->free_struct = asn_DEF_NativeInteger.free_struct;
1238 td->print_struct = asn_DEF_NativeInteger.print_struct;
1239 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
1240 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1241 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1242 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1243 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1244 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1245 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
1246 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
1247 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
1248 if(!td->oer_constraints)
1249 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
1250 if(!td->per_constraints)
1251 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1252 td->elements = asn_DEF_NativeInteger.elements;
1253 td->elements_count = asn_DEF_NativeInteger.elements_count;
1254 td->specifics = asn_DEF_NativeInteger.specifics;
1255}
1256
1257void
1258H_4_5_free(asn_TYPE_descriptor_t *td,
1259 void *struct_ptr, int contents_only) {
1260 H_4_5_1_inherit_TYPE_descriptor(td);
1261 td->free_struct(td, struct_ptr, contents_only);
1262}
1263
1264int
1265H_4_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1266 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1267 H_4_5_1_inherit_TYPE_descriptor(td);
1268 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1269}
1270
1271asn_dec_rval_t
1272H_4_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1273 void **structure, const void *bufptr, size_t size, int tag_mode) {
1274 H_4_5_1_inherit_TYPE_descriptor(td);
1275 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1276}
1277
1278asn_enc_rval_t
1279H_4_5_encode_der(asn_TYPE_descriptor_t *td,
1280 void *structure, int tag_mode, ber_tlv_tag_t tag,
1281 asn_app_consume_bytes_f *cb, void *app_key) {
1282 H_4_5_1_inherit_TYPE_descriptor(td);
1283 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1284}
1285
1286asn_dec_rval_t
1287H_4_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1288 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1289 H_4_5_1_inherit_TYPE_descriptor(td);
1290 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1291}
1292
1293asn_enc_rval_t
1294H_4_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1295 int ilevel, enum xer_encoder_flags_e flags,
1296 asn_app_consume_bytes_f *cb, void *app_key) {
1297 H_4_5_1_inherit_TYPE_descriptor(td);
1298 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1299}
1300
1301asn_dec_rval_t
1302H_4_5_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1303 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
1304 H_4_5_1_inherit_TYPE_descriptor(td);
1305 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
1306}
1307
1308asn_enc_rval_t
1309H_4_5_encode_oer(asn_TYPE_descriptor_t *td,
1310 asn_oer_constraints_t *constraints,
1311 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
1312 H_4_5_1_inherit_TYPE_descriptor(td);
1313 return td->uper_encoder(td, constraints, structure, cb, app_key);
1314}
1315
1316
1317/*** <<< CTDEFS [H-4-5] >>> ***/
1318
1319static asn_oer_constraints_t asn_OER_type_H_4_5_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -07001320 { 1, 1 } /* (4..5) */,
1321 -1};
Lev Walkin5861e8a2017-07-31 20:27:05 -07001322
1323/*** <<< STAT-DEFS [H-4-5] >>> ***/
1324
1325static const ber_tlv_tag_t asn_DEF_H_4_5_tags_1[] = {
1326 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1327};
1328asn_TYPE_descriptor_t asn_DEF_H_4_5 = {
1329 "H-4-5",
1330 "H-4-5",
1331 H_4_5_free,
1332 H_4_5_print,
1333 H_4_5_constraint,
1334 H_4_5_decode_ber,
1335 H_4_5_encode_der,
1336 H_4_5_decode_xer,
1337 H_4_5_encode_xer,
1338 H_4_5_decode_oer,
1339 H_4_5_encode_oer,
1340 0, 0, /* No PER support, use "-gen-PER" to enable */
1341 0, /* Use generic outmost tag fetcher */
1342 asn_DEF_H_4_5_tags_1,
1343 sizeof(asn_DEF_H_4_5_tags_1)
1344 /sizeof(asn_DEF_H_4_5_tags_1[0]), /* 1 */
1345 asn_DEF_H_4_5_tags_1, /* Same as above */
1346 sizeof(asn_DEF_H_4_5_tags_1)
1347 /sizeof(asn_DEF_H_4_5_tags_1[0]), /* 1 */
1348 &asn_OER_type_H_4_5_constr_1,
1349 0, /* No PER visible constraints */
1350 0, 0, /* No members */
1351 0 /* No specifics */
1352};
1353
1354
1355/*** <<< INCLUDES [I-0-5] >>> ***/
1356
1357#include <NativeInteger.h>
1358
1359/*** <<< TYPE-DECLS [I-0-5] >>> ***/
1360
1361typedef long I_0_5_t;
1362
1363/*** <<< FUNC-DECLS [I-0-5] >>> ***/
1364
1365extern asn_TYPE_descriptor_t asn_DEF_I_0_5;
1366asn_struct_free_f I_0_5_free;
1367asn_struct_print_f I_0_5_print;
1368asn_constr_check_f I_0_5_constraint;
1369ber_type_decoder_f I_0_5_decode_ber;
1370der_type_encoder_f I_0_5_encode_der;
1371xer_type_decoder_f I_0_5_decode_xer;
1372xer_type_encoder_f I_0_5_encode_xer;
1373oer_type_decoder_f I_0_5_decode_oer;
1374oer_type_encoder_f I_0_5_encode_oer;
1375
1376/*** <<< CODE [I-0-5] >>> ***/
1377
1378int
1379I_0_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1380 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1381 long value;
1382
1383 if(!sptr) {
1384 ASN__CTFAIL(app_key, td, sptr,
1385 "%s: value not given (%s:%d)",
1386 td->name, __FILE__, __LINE__);
1387 return -1;
1388 }
1389
1390 value = *(const long *)sptr;
1391
1392 if((value >= 4 && value <= 5)) {
1393 /* Constraint check succeeded */
1394 return 0;
1395 } else {
1396 ASN__CTFAIL(app_key, td, sptr,
1397 "%s: constraint failed (%s:%d)",
1398 td->name, __FILE__, __LINE__);
1399 return -1;
1400 }
1401}
1402
1403/*
1404 * This type is implemented using NativeInteger,
1405 * so here we adjust the DEF accordingly.
1406 */
1407static void
1408I_0_5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1409 td->free_struct = asn_DEF_NativeInteger.free_struct;
1410 td->print_struct = asn_DEF_NativeInteger.print_struct;
1411 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
1412 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1413 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1414 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1415 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1416 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1417 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
1418 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
1419 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
1420 if(!td->oer_constraints)
1421 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
1422 if(!td->per_constraints)
1423 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1424 td->elements = asn_DEF_NativeInteger.elements;
1425 td->elements_count = asn_DEF_NativeInteger.elements_count;
1426 td->specifics = asn_DEF_NativeInteger.specifics;
1427}
1428
1429void
1430I_0_5_free(asn_TYPE_descriptor_t *td,
1431 void *struct_ptr, int contents_only) {
1432 I_0_5_1_inherit_TYPE_descriptor(td);
1433 td->free_struct(td, struct_ptr, contents_only);
1434}
1435
1436int
1437I_0_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1438 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1439 I_0_5_1_inherit_TYPE_descriptor(td);
1440 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1441}
1442
1443asn_dec_rval_t
1444I_0_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1445 void **structure, const void *bufptr, size_t size, int tag_mode) {
1446 I_0_5_1_inherit_TYPE_descriptor(td);
1447 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1448}
1449
1450asn_enc_rval_t
1451I_0_5_encode_der(asn_TYPE_descriptor_t *td,
1452 void *structure, int tag_mode, ber_tlv_tag_t tag,
1453 asn_app_consume_bytes_f *cb, void *app_key) {
1454 I_0_5_1_inherit_TYPE_descriptor(td);
1455 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1456}
1457
1458asn_dec_rval_t
1459I_0_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1460 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1461 I_0_5_1_inherit_TYPE_descriptor(td);
1462 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1463}
1464
1465asn_enc_rval_t
1466I_0_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1467 int ilevel, enum xer_encoder_flags_e flags,
1468 asn_app_consume_bytes_f *cb, void *app_key) {
1469 I_0_5_1_inherit_TYPE_descriptor(td);
1470 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1471}
1472
1473asn_dec_rval_t
1474I_0_5_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1475 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
1476 I_0_5_1_inherit_TYPE_descriptor(td);
1477 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
1478}
1479
1480asn_enc_rval_t
1481I_0_5_encode_oer(asn_TYPE_descriptor_t *td,
1482 asn_oer_constraints_t *constraints,
1483 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
1484 I_0_5_1_inherit_TYPE_descriptor(td);
1485 return td->uper_encoder(td, constraints, structure, cb, app_key);
1486}
1487
1488
1489/*** <<< CTDEFS [I-0-5] >>> ***/
1490
1491static asn_oer_constraints_t asn_OER_type_I_0_5_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -07001492 { 1, 1 } /* (0..5) */,
1493 -1};
Lev Walkin5861e8a2017-07-31 20:27:05 -07001494
1495/*** <<< STAT-DEFS [I-0-5] >>> ***/
1496
1497static const ber_tlv_tag_t asn_DEF_I_0_5_tags_1[] = {
1498 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1499};
1500asn_TYPE_descriptor_t asn_DEF_I_0_5 = {
1501 "I-0-5",
1502 "I-0-5",
1503 I_0_5_free,
1504 I_0_5_print,
1505 I_0_5_constraint,
1506 I_0_5_decode_ber,
1507 I_0_5_encode_der,
1508 I_0_5_decode_xer,
1509 I_0_5_encode_xer,
1510 I_0_5_decode_oer,
1511 I_0_5_encode_oer,
1512 0, 0, /* No PER support, use "-gen-PER" to enable */
1513 0, /* Use generic outmost tag fetcher */
1514 asn_DEF_I_0_5_tags_1,
1515 sizeof(asn_DEF_I_0_5_tags_1)
1516 /sizeof(asn_DEF_I_0_5_tags_1[0]), /* 1 */
1517 asn_DEF_I_0_5_tags_1, /* Same as above */
1518 sizeof(asn_DEF_I_0_5_tags_1)
1519 /sizeof(asn_DEF_I_0_5_tags_1[0]), /* 1 */
1520 &asn_OER_type_I_0_5_constr_1,
1521 0, /* No PER visible constraints */
1522 0, 0, /* No members */
1523 0 /* No specifics */
1524};
1525
1526
1527/*** <<< INCLUDES [J-4-9] >>> ***/
1528
1529#include <NativeInteger.h>
1530
1531/*** <<< TYPE-DECLS [J-4-9] >>> ***/
1532
1533typedef long J_4_9_t;
1534
1535/*** <<< FUNC-DECLS [J-4-9] >>> ***/
1536
1537extern asn_TYPE_descriptor_t asn_DEF_J_4_9;
1538asn_struct_free_f J_4_9_free;
1539asn_struct_print_f J_4_9_print;
1540asn_constr_check_f J_4_9_constraint;
1541ber_type_decoder_f J_4_9_decode_ber;
1542der_type_encoder_f J_4_9_encode_der;
1543xer_type_decoder_f J_4_9_decode_xer;
1544xer_type_encoder_f J_4_9_encode_xer;
1545oer_type_decoder_f J_4_9_decode_oer;
1546oer_type_encoder_f J_4_9_encode_oer;
1547
1548/*** <<< CODE [J-4-9] >>> ***/
1549
1550int
1551J_4_9_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1552 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1553 long value;
1554
1555 if(!sptr) {
1556 ASN__CTFAIL(app_key, td, sptr,
1557 "%s: value not given (%s:%d)",
1558 td->name, __FILE__, __LINE__);
1559 return -1;
1560 }
1561
1562 value = *(const long *)sptr;
1563
1564 if((value >= 4 && value <= 5)) {
1565 /* Constraint check succeeded */
1566 return 0;
1567 } else {
1568 ASN__CTFAIL(app_key, td, sptr,
1569 "%s: constraint failed (%s:%d)",
1570 td->name, __FILE__, __LINE__);
1571 return -1;
1572 }
1573}
1574
1575/*
1576 * This type is implemented using NativeInteger,
1577 * so here we adjust the DEF accordingly.
1578 */
1579static void
1580J_4_9_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1581 td->free_struct = asn_DEF_NativeInteger.free_struct;
1582 td->print_struct = asn_DEF_NativeInteger.print_struct;
1583 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
1584 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1585 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1586 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1587 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1588 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1589 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
1590 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
1591 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
1592 if(!td->oer_constraints)
1593 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
1594 if(!td->per_constraints)
1595 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1596 td->elements = asn_DEF_NativeInteger.elements;
1597 td->elements_count = asn_DEF_NativeInteger.elements_count;
1598 td->specifics = asn_DEF_NativeInteger.specifics;
1599}
1600
1601void
1602J_4_9_free(asn_TYPE_descriptor_t *td,
1603 void *struct_ptr, int contents_only) {
1604 J_4_9_1_inherit_TYPE_descriptor(td);
1605 td->free_struct(td, struct_ptr, contents_only);
1606}
1607
1608int
1609J_4_9_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1610 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1611 J_4_9_1_inherit_TYPE_descriptor(td);
1612 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1613}
1614
1615asn_dec_rval_t
1616J_4_9_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1617 void **structure, const void *bufptr, size_t size, int tag_mode) {
1618 J_4_9_1_inherit_TYPE_descriptor(td);
1619 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1620}
1621
1622asn_enc_rval_t
1623J_4_9_encode_der(asn_TYPE_descriptor_t *td,
1624 void *structure, int tag_mode, ber_tlv_tag_t tag,
1625 asn_app_consume_bytes_f *cb, void *app_key) {
1626 J_4_9_1_inherit_TYPE_descriptor(td);
1627 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1628}
1629
1630asn_dec_rval_t
1631J_4_9_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1632 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1633 J_4_9_1_inherit_TYPE_descriptor(td);
1634 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1635}
1636
1637asn_enc_rval_t
1638J_4_9_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1639 int ilevel, enum xer_encoder_flags_e flags,
1640 asn_app_consume_bytes_f *cb, void *app_key) {
1641 J_4_9_1_inherit_TYPE_descriptor(td);
1642 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1643}
1644
1645asn_dec_rval_t
1646J_4_9_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1647 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
1648 J_4_9_1_inherit_TYPE_descriptor(td);
1649 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
1650}
1651
1652asn_enc_rval_t
1653J_4_9_encode_oer(asn_TYPE_descriptor_t *td,
1654 asn_oer_constraints_t *constraints,
1655 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
1656 J_4_9_1_inherit_TYPE_descriptor(td);
1657 return td->uper_encoder(td, constraints, structure, cb, app_key);
1658}
1659
1660
1661/*** <<< CTDEFS [J-4-9] >>> ***/
1662
1663static asn_oer_constraints_t asn_OER_type_J_4_9_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -07001664 { 1, 1 } /* (4..9) */,
1665 -1};
Lev Walkin5861e8a2017-07-31 20:27:05 -07001666
1667/*** <<< STAT-DEFS [J-4-9] >>> ***/
1668
1669static const ber_tlv_tag_t asn_DEF_J_4_9_tags_1[] = {
1670 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1671};
1672asn_TYPE_descriptor_t asn_DEF_J_4_9 = {
1673 "J-4-9",
1674 "J-4-9",
1675 J_4_9_free,
1676 J_4_9_print,
1677 J_4_9_constraint,
1678 J_4_9_decode_ber,
1679 J_4_9_encode_der,
1680 J_4_9_decode_xer,
1681 J_4_9_encode_xer,
1682 J_4_9_decode_oer,
1683 J_4_9_encode_oer,
1684 0, 0, /* No PER support, use "-gen-PER" to enable */
1685 0, /* Use generic outmost tag fetcher */
1686 asn_DEF_J_4_9_tags_1,
1687 sizeof(asn_DEF_J_4_9_tags_1)
1688 /sizeof(asn_DEF_J_4_9_tags_1[0]), /* 1 */
1689 asn_DEF_J_4_9_tags_1, /* Same as above */
1690 sizeof(asn_DEF_J_4_9_tags_1)
1691 /sizeof(asn_DEF_J_4_9_tags_1[0]), /* 1 */
1692 &asn_OER_type_J_4_9_constr_1,
1693 0, /* No PER visible constraints */
1694 0, 0, /* No members */
1695 0 /* No specifics */
1696};
1697
1698
1699/*** <<< INCLUDES [K-inv] >>> ***/
1700
1701#include <NativeInteger.h>
1702
1703/*** <<< TYPE-DECLS [K-inv] >>> ***/
1704
1705typedef long K_inv_t;
1706
1707/*** <<< FUNC-DECLS [K-inv] >>> ***/
1708
1709extern asn_TYPE_descriptor_t asn_DEF_K_inv;
1710asn_struct_free_f K_inv_free;
1711asn_struct_print_f K_inv_print;
1712asn_constr_check_f K_inv_constraint;
1713ber_type_decoder_f K_inv_decode_ber;
1714der_type_encoder_f K_inv_encode_der;
1715xer_type_decoder_f K_inv_decode_xer;
1716xer_type_encoder_f K_inv_encode_xer;
1717oer_type_decoder_f K_inv_decode_oer;
1718oer_type_encoder_f K_inv_encode_oer;
1719
1720/*** <<< CODE [K-inv] >>> ***/
1721
1722int
1723K_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1724 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1725 long value;
1726
1727 if(!sptr) {
1728 ASN__CTFAIL(app_key, td, sptr,
1729 "%s: value not given (%s:%d)",
1730 td->name, __FILE__, __LINE__);
1731 return -1;
1732 }
1733
1734 value = *(const long *)sptr;
1735
1736 if((value >= 4 && value <= 5)) {
1737 /* Constraint check succeeded */
1738 return 0;
1739 } else {
1740 ASN__CTFAIL(app_key, td, sptr,
1741 "%s: constraint failed (%s:%d)",
1742 td->name, __FILE__, __LINE__);
1743 return -1;
1744 }
1745}
1746
1747/*
1748 * This type is implemented using NativeInteger,
1749 * so here we adjust the DEF accordingly.
1750 */
1751static void
1752K_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1753 td->free_struct = asn_DEF_NativeInteger.free_struct;
1754 td->print_struct = asn_DEF_NativeInteger.print_struct;
1755 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
1756 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1757 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1758 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1759 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1760 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1761 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
1762 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
1763 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
1764 if(!td->oer_constraints)
1765 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
1766 if(!td->per_constraints)
1767 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1768 td->elements = asn_DEF_NativeInteger.elements;
1769 td->elements_count = asn_DEF_NativeInteger.elements_count;
1770 td->specifics = asn_DEF_NativeInteger.specifics;
1771}
1772
1773void
1774K_inv_free(asn_TYPE_descriptor_t *td,
1775 void *struct_ptr, int contents_only) {
1776 K_inv_1_inherit_TYPE_descriptor(td);
1777 td->free_struct(td, struct_ptr, contents_only);
1778}
1779
1780int
1781K_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1782 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1783 K_inv_1_inherit_TYPE_descriptor(td);
1784 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1785}
1786
1787asn_dec_rval_t
1788K_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1789 void **structure, const void *bufptr, size_t size, int tag_mode) {
1790 K_inv_1_inherit_TYPE_descriptor(td);
1791 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1792}
1793
1794asn_enc_rval_t
1795K_inv_encode_der(asn_TYPE_descriptor_t *td,
1796 void *structure, int tag_mode, ber_tlv_tag_t tag,
1797 asn_app_consume_bytes_f *cb, void *app_key) {
1798 K_inv_1_inherit_TYPE_descriptor(td);
1799 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1800}
1801
1802asn_dec_rval_t
1803K_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1804 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1805 K_inv_1_inherit_TYPE_descriptor(td);
1806 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1807}
1808
1809asn_enc_rval_t
1810K_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1811 int ilevel, enum xer_encoder_flags_e flags,
1812 asn_app_consume_bytes_f *cb, void *app_key) {
1813 K_inv_1_inherit_TYPE_descriptor(td);
1814 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1815}
1816
1817asn_dec_rval_t
1818K_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1819 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
1820 K_inv_1_inherit_TYPE_descriptor(td);
1821 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
1822}
1823
1824asn_enc_rval_t
1825K_inv_encode_oer(asn_TYPE_descriptor_t *td,
1826 asn_oer_constraints_t *constraints,
1827 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
1828 K_inv_1_inherit_TYPE_descriptor(td);
1829 return td->uper_encoder(td, constraints, structure, cb, app_key);
1830}
1831
1832
1833/*** <<< CTDEFS [K-inv] >>> ***/
1834
1835static asn_oer_constraints_t asn_OER_type_K_inv_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -07001836 { 0, 0 },
1837 -1};
Lev Walkin5861e8a2017-07-31 20:27:05 -07001838
1839/*** <<< STAT-DEFS [K-inv] >>> ***/
1840
1841static const ber_tlv_tag_t asn_DEF_K_inv_tags_1[] = {
1842 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1843};
1844asn_TYPE_descriptor_t asn_DEF_K_inv = {
1845 "K-inv",
1846 "K-inv",
1847 K_inv_free,
1848 K_inv_print,
1849 K_inv_constraint,
1850 K_inv_decode_ber,
1851 K_inv_encode_der,
1852 K_inv_decode_xer,
1853 K_inv_encode_xer,
1854 K_inv_decode_oer,
1855 K_inv_encode_oer,
1856 0, 0, /* No PER support, use "-gen-PER" to enable */
1857 0, /* Use generic outmost tag fetcher */
1858 asn_DEF_K_inv_tags_1,
1859 sizeof(asn_DEF_K_inv_tags_1)
1860 /sizeof(asn_DEF_K_inv_tags_1[0]), /* 1 */
1861 asn_DEF_K_inv_tags_1, /* Same as above */
1862 sizeof(asn_DEF_K_inv_tags_1)
1863 /sizeof(asn_DEF_K_inv_tags_1[0]), /* 1 */
1864 &asn_OER_type_K_inv_constr_1,
1865 0, /* No PER visible constraints */
1866 0, 0, /* No members */
1867 0 /* No specifics */
1868};
1869
1870
1871/*** <<< INCLUDES [L-0-5] >>> ***/
1872
1873#include <NativeInteger.h>
1874
1875/*** <<< TYPE-DECLS [L-0-5] >>> ***/
1876
1877typedef long L_0_5_t;
1878
1879/*** <<< FUNC-DECLS [L-0-5] >>> ***/
1880
1881extern asn_TYPE_descriptor_t asn_DEF_L_0_5;
1882asn_struct_free_f L_0_5_free;
1883asn_struct_print_f L_0_5_print;
1884asn_constr_check_f L_0_5_constraint;
1885ber_type_decoder_f L_0_5_decode_ber;
1886der_type_encoder_f L_0_5_encode_der;
1887xer_type_decoder_f L_0_5_decode_xer;
1888xer_type_encoder_f L_0_5_encode_xer;
1889oer_type_decoder_f L_0_5_decode_oer;
1890oer_type_encoder_f L_0_5_encode_oer;
1891
1892/*** <<< CODE [L-0-5] >>> ***/
1893
1894int
1895L_0_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1896 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1897 long value;
1898
1899 if(!sptr) {
1900 ASN__CTFAIL(app_key, td, sptr,
1901 "%s: value not given (%s:%d)",
1902 td->name, __FILE__, __LINE__);
1903 return -1;
1904 }
1905
1906 value = *(const long *)sptr;
1907
1908 if(((value == 0) || (value == 5))) {
1909 /* Constraint check succeeded */
1910 return 0;
1911 } else {
1912 ASN__CTFAIL(app_key, td, sptr,
1913 "%s: constraint failed (%s:%d)",
1914 td->name, __FILE__, __LINE__);
1915 return -1;
1916 }
1917}
1918
1919/*
1920 * This type is implemented using NativeInteger,
1921 * so here we adjust the DEF accordingly.
1922 */
1923static void
1924L_0_5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1925 td->free_struct = asn_DEF_NativeInteger.free_struct;
1926 td->print_struct = asn_DEF_NativeInteger.print_struct;
1927 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
1928 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1929 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1930 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1931 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1932 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1933 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
1934 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
1935 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
1936 if(!td->oer_constraints)
1937 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
1938 if(!td->per_constraints)
1939 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1940 td->elements = asn_DEF_NativeInteger.elements;
1941 td->elements_count = asn_DEF_NativeInteger.elements_count;
1942 td->specifics = asn_DEF_NativeInteger.specifics;
1943}
1944
1945void
1946L_0_5_free(asn_TYPE_descriptor_t *td,
1947 void *struct_ptr, int contents_only) {
1948 L_0_5_1_inherit_TYPE_descriptor(td);
1949 td->free_struct(td, struct_ptr, contents_only);
1950}
1951
1952int
1953L_0_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1954 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1955 L_0_5_1_inherit_TYPE_descriptor(td);
1956 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1957}
1958
1959asn_dec_rval_t
1960L_0_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1961 void **structure, const void *bufptr, size_t size, int tag_mode) {
1962 L_0_5_1_inherit_TYPE_descriptor(td);
1963 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1964}
1965
1966asn_enc_rval_t
1967L_0_5_encode_der(asn_TYPE_descriptor_t *td,
1968 void *structure, int tag_mode, ber_tlv_tag_t tag,
1969 asn_app_consume_bytes_f *cb, void *app_key) {
1970 L_0_5_1_inherit_TYPE_descriptor(td);
1971 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1972}
1973
1974asn_dec_rval_t
1975L_0_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1976 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1977 L_0_5_1_inherit_TYPE_descriptor(td);
1978 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1979}
1980
1981asn_enc_rval_t
1982L_0_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1983 int ilevel, enum xer_encoder_flags_e flags,
1984 asn_app_consume_bytes_f *cb, void *app_key) {
1985 L_0_5_1_inherit_TYPE_descriptor(td);
1986 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1987}
1988
1989asn_dec_rval_t
1990L_0_5_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1991 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
1992 L_0_5_1_inherit_TYPE_descriptor(td);
1993 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
1994}
1995
1996asn_enc_rval_t
1997L_0_5_encode_oer(asn_TYPE_descriptor_t *td,
1998 asn_oer_constraints_t *constraints,
1999 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
2000 L_0_5_1_inherit_TYPE_descriptor(td);
2001 return td->uper_encoder(td, constraints, structure, cb, app_key);
2002}
2003
2004
2005/*** <<< CTDEFS [L-0-5] >>> ***/
2006
2007static asn_oer_constraints_t asn_OER_type_L_0_5_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -07002008 { 1, 1 } /* (0..5) */,
2009 -1};
Lev Walkin5861e8a2017-07-31 20:27:05 -07002010
2011/*** <<< STAT-DEFS [L-0-5] >>> ***/
2012
2013static const ber_tlv_tag_t asn_DEF_L_0_5_tags_1[] = {
2014 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2015};
2016asn_TYPE_descriptor_t asn_DEF_L_0_5 = {
2017 "L-0-5",
2018 "L-0-5",
2019 L_0_5_free,
2020 L_0_5_print,
2021 L_0_5_constraint,
2022 L_0_5_decode_ber,
2023 L_0_5_encode_der,
2024 L_0_5_decode_xer,
2025 L_0_5_encode_xer,
2026 L_0_5_decode_oer,
2027 L_0_5_encode_oer,
2028 0, 0, /* No PER support, use "-gen-PER" to enable */
2029 0, /* Use generic outmost tag fetcher */
2030 asn_DEF_L_0_5_tags_1,
2031 sizeof(asn_DEF_L_0_5_tags_1)
2032 /sizeof(asn_DEF_L_0_5_tags_1[0]), /* 1 */
2033 asn_DEF_L_0_5_tags_1, /* Same as above */
2034 sizeof(asn_DEF_L_0_5_tags_1)
2035 /sizeof(asn_DEF_L_0_5_tags_1[0]), /* 1 */
2036 &asn_OER_type_L_0_5_constr_1,
2037 0, /* No PER visible constraints */
2038 0, 0, /* No members */
2039 0 /* No specifics */
2040};
2041
2042
2043/*** <<< INCLUDES [M-inv] >>> ***/
2044
2045#include <NativeInteger.h>
2046
2047/*** <<< TYPE-DECLS [M-inv] >>> ***/
2048
2049typedef long M_inv_t;
2050
2051/*** <<< FUNC-DECLS [M-inv] >>> ***/
2052
2053extern asn_TYPE_descriptor_t asn_DEF_M_inv;
2054asn_struct_free_f M_inv_free;
2055asn_struct_print_f M_inv_print;
2056asn_constr_check_f M_inv_constraint;
2057ber_type_decoder_f M_inv_decode_ber;
2058der_type_encoder_f M_inv_encode_der;
2059xer_type_decoder_f M_inv_decode_xer;
2060xer_type_encoder_f M_inv_encode_xer;
2061oer_type_decoder_f M_inv_decode_oer;
2062oer_type_encoder_f M_inv_encode_oer;
2063
2064/*** <<< CODE [M-inv] >>> ***/
2065
2066int
2067M_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2068 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2069 long value;
2070
2071 if(!sptr) {
2072 ASN__CTFAIL(app_key, td, sptr,
2073 "%s: value not given (%s:%d)",
2074 td->name, __FILE__, __LINE__);
2075 return -1;
2076 }
2077
2078 value = *(const long *)sptr;
2079
2080 if(((value == 0) || (value == 5))) {
2081 /* Constraint check succeeded */
2082 return 0;
2083 } else {
2084 ASN__CTFAIL(app_key, td, sptr,
2085 "%s: constraint failed (%s:%d)",
2086 td->name, __FILE__, __LINE__);
2087 return -1;
2088 }
2089}
2090
2091/*
2092 * This type is implemented using NativeInteger,
2093 * so here we adjust the DEF accordingly.
2094 */
2095static void
2096M_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2097 td->free_struct = asn_DEF_NativeInteger.free_struct;
2098 td->print_struct = asn_DEF_NativeInteger.print_struct;
2099 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
2100 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2101 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2102 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2103 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2104 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2105 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
2106 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
2107 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
2108 if(!td->oer_constraints)
2109 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
2110 if(!td->per_constraints)
2111 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2112 td->elements = asn_DEF_NativeInteger.elements;
2113 td->elements_count = asn_DEF_NativeInteger.elements_count;
2114 td->specifics = asn_DEF_NativeInteger.specifics;
2115}
2116
2117void
2118M_inv_free(asn_TYPE_descriptor_t *td,
2119 void *struct_ptr, int contents_only) {
2120 M_inv_1_inherit_TYPE_descriptor(td);
2121 td->free_struct(td, struct_ptr, contents_only);
2122}
2123
2124int
2125M_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2126 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2127 M_inv_1_inherit_TYPE_descriptor(td);
2128 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2129}
2130
2131asn_dec_rval_t
2132M_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2133 void **structure, const void *bufptr, size_t size, int tag_mode) {
2134 M_inv_1_inherit_TYPE_descriptor(td);
2135 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2136}
2137
2138asn_enc_rval_t
2139M_inv_encode_der(asn_TYPE_descriptor_t *td,
2140 void *structure, int tag_mode, ber_tlv_tag_t tag,
2141 asn_app_consume_bytes_f *cb, void *app_key) {
2142 M_inv_1_inherit_TYPE_descriptor(td);
2143 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2144}
2145
2146asn_dec_rval_t
2147M_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2148 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2149 M_inv_1_inherit_TYPE_descriptor(td);
2150 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2151}
2152
2153asn_enc_rval_t
2154M_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2155 int ilevel, enum xer_encoder_flags_e flags,
2156 asn_app_consume_bytes_f *cb, void *app_key) {
2157 M_inv_1_inherit_TYPE_descriptor(td);
2158 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2159}
2160
2161asn_dec_rval_t
2162M_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2163 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
2164 M_inv_1_inherit_TYPE_descriptor(td);
2165 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
2166}
2167
2168asn_enc_rval_t
2169M_inv_encode_oer(asn_TYPE_descriptor_t *td,
2170 asn_oer_constraints_t *constraints,
2171 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
2172 M_inv_1_inherit_TYPE_descriptor(td);
2173 return td->uper_encoder(td, constraints, structure, cb, app_key);
2174}
2175
2176
2177/*** <<< CTDEFS [M-inv] >>> ***/
2178
2179static asn_oer_constraints_t asn_OER_type_M_inv_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -07002180 { 0, 0 },
2181 -1};
Lev Walkin5861e8a2017-07-31 20:27:05 -07002182
2183/*** <<< STAT-DEFS [M-inv] >>> ***/
2184
2185static const ber_tlv_tag_t asn_DEF_M_inv_tags_1[] = {
2186 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2187};
2188asn_TYPE_descriptor_t asn_DEF_M_inv = {
2189 "M-inv",
2190 "M-inv",
2191 M_inv_free,
2192 M_inv_print,
2193 M_inv_constraint,
2194 M_inv_decode_ber,
2195 M_inv_encode_der,
2196 M_inv_decode_xer,
2197 M_inv_encode_xer,
2198 M_inv_decode_oer,
2199 M_inv_encode_oer,
2200 0, 0, /* No PER support, use "-gen-PER" to enable */
2201 0, /* Use generic outmost tag fetcher */
2202 asn_DEF_M_inv_tags_1,
2203 sizeof(asn_DEF_M_inv_tags_1)
2204 /sizeof(asn_DEF_M_inv_tags_1[0]), /* 1 */
2205 asn_DEF_M_inv_tags_1, /* Same as above */
2206 sizeof(asn_DEF_M_inv_tags_1)
2207 /sizeof(asn_DEF_M_inv_tags_1[0]), /* 1 */
2208 &asn_OER_type_M_inv_constr_1,
2209 0, /* No PER visible constraints */
2210 0, 0, /* No members */
2211 0 /* No specifics */
2212};
2213
2214
2215/*** <<< INCLUDES [N-inv] >>> ***/
2216
2217#include <NativeInteger.h>
2218
2219/*** <<< TYPE-DECLS [N-inv] >>> ***/
2220
2221typedef long N_inv_t;
2222
2223/*** <<< FUNC-DECLS [N-inv] >>> ***/
2224
2225extern asn_TYPE_descriptor_t asn_DEF_N_inv;
2226asn_struct_free_f N_inv_free;
2227asn_struct_print_f N_inv_print;
2228asn_constr_check_f N_inv_constraint;
2229ber_type_decoder_f N_inv_decode_ber;
2230der_type_encoder_f N_inv_encode_der;
2231xer_type_decoder_f N_inv_decode_xer;
2232xer_type_encoder_f N_inv_encode_xer;
2233oer_type_decoder_f N_inv_decode_oer;
2234oer_type_encoder_f N_inv_encode_oer;
2235
2236/*** <<< CODE [N-inv] >>> ***/
2237
2238int
2239N_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2240 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2241 long value;
2242
2243 if(!sptr) {
2244 ASN__CTFAIL(app_key, td, sptr,
2245 "%s: value not given (%s:%d)",
2246 td->name, __FILE__, __LINE__);
2247 return -1;
2248 }
2249
2250 value = *(const long *)sptr;
2251
2252 if((value >= 0 && value <= 5)) {
2253 /* Constraint check succeeded */
2254 return 0;
2255 } else {
2256 ASN__CTFAIL(app_key, td, sptr,
2257 "%s: constraint failed (%s:%d)",
2258 td->name, __FILE__, __LINE__);
2259 return -1;
2260 }
2261}
2262
2263/*
2264 * This type is implemented using NativeInteger,
2265 * so here we adjust the DEF accordingly.
2266 */
2267static void
2268N_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2269 td->free_struct = asn_DEF_NativeInteger.free_struct;
2270 td->print_struct = asn_DEF_NativeInteger.print_struct;
2271 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
2272 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2273 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2274 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2275 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2276 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2277 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
2278 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
2279 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
2280 if(!td->oer_constraints)
2281 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
2282 if(!td->per_constraints)
2283 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2284 td->elements = asn_DEF_NativeInteger.elements;
2285 td->elements_count = asn_DEF_NativeInteger.elements_count;
2286 td->specifics = asn_DEF_NativeInteger.specifics;
2287}
2288
2289void
2290N_inv_free(asn_TYPE_descriptor_t *td,
2291 void *struct_ptr, int contents_only) {
2292 N_inv_1_inherit_TYPE_descriptor(td);
2293 td->free_struct(td, struct_ptr, contents_only);
2294}
2295
2296int
2297N_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2298 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2299 N_inv_1_inherit_TYPE_descriptor(td);
2300 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2301}
2302
2303asn_dec_rval_t
2304N_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2305 void **structure, const void *bufptr, size_t size, int tag_mode) {
2306 N_inv_1_inherit_TYPE_descriptor(td);
2307 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2308}
2309
2310asn_enc_rval_t
2311N_inv_encode_der(asn_TYPE_descriptor_t *td,
2312 void *structure, int tag_mode, ber_tlv_tag_t tag,
2313 asn_app_consume_bytes_f *cb, void *app_key) {
2314 N_inv_1_inherit_TYPE_descriptor(td);
2315 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2316}
2317
2318asn_dec_rval_t
2319N_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2320 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2321 N_inv_1_inherit_TYPE_descriptor(td);
2322 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2323}
2324
2325asn_enc_rval_t
2326N_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2327 int ilevel, enum xer_encoder_flags_e flags,
2328 asn_app_consume_bytes_f *cb, void *app_key) {
2329 N_inv_1_inherit_TYPE_descriptor(td);
2330 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2331}
2332
2333asn_dec_rval_t
2334N_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2335 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
2336 N_inv_1_inherit_TYPE_descriptor(td);
2337 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
2338}
2339
2340asn_enc_rval_t
2341N_inv_encode_oer(asn_TYPE_descriptor_t *td,
2342 asn_oer_constraints_t *constraints,
2343 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
2344 N_inv_1_inherit_TYPE_descriptor(td);
2345 return td->uper_encoder(td, constraints, structure, cb, app_key);
2346}
2347
2348
2349/*** <<< CTDEFS [N-inv] >>> ***/
2350
2351static asn_oer_constraints_t asn_OER_type_N_inv_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -07002352 { 0, 0 },
2353 -1};
Lev Walkin5861e8a2017-07-31 20:27:05 -07002354
2355/*** <<< STAT-DEFS [N-inv] >>> ***/
2356
2357static const ber_tlv_tag_t asn_DEF_N_inv_tags_1[] = {
2358 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2359};
2360asn_TYPE_descriptor_t asn_DEF_N_inv = {
2361 "N-inv",
2362 "N-inv",
2363 N_inv_free,
2364 N_inv_print,
2365 N_inv_constraint,
2366 N_inv_decode_ber,
2367 N_inv_encode_der,
2368 N_inv_decode_xer,
2369 N_inv_encode_xer,
2370 N_inv_decode_oer,
2371 N_inv_encode_oer,
2372 0, 0, /* No PER support, use "-gen-PER" to enable */
2373 0, /* Use generic outmost tag fetcher */
2374 asn_DEF_N_inv_tags_1,
2375 sizeof(asn_DEF_N_inv_tags_1)
2376 /sizeof(asn_DEF_N_inv_tags_1[0]), /* 1 */
2377 asn_DEF_N_inv_tags_1, /* Same as above */
2378 sizeof(asn_DEF_N_inv_tags_1)
2379 /sizeof(asn_DEF_N_inv_tags_1[0]), /* 1 */
2380 &asn_OER_type_N_inv_constr_1,
2381 0, /* No PER visible constraints */
2382 0, 0, /* No members */
2383 0 /* No specifics */
2384};
2385
2386
2387/*** <<< INCLUDES [O-inv] >>> ***/
2388
2389#include <NativeInteger.h>
2390
2391/*** <<< TYPE-DECLS [O-inv] >>> ***/
2392
2393typedef long O_inv_t;
2394
2395/*** <<< FUNC-DECLS [O-inv] >>> ***/
2396
2397extern asn_TYPE_descriptor_t asn_DEF_O_inv;
2398asn_struct_free_f O_inv_free;
2399asn_struct_print_f O_inv_print;
2400asn_constr_check_f O_inv_constraint;
2401ber_type_decoder_f O_inv_decode_ber;
2402der_type_encoder_f O_inv_encode_der;
2403xer_type_decoder_f O_inv_decode_xer;
2404xer_type_encoder_f O_inv_encode_xer;
2405oer_type_decoder_f O_inv_decode_oer;
2406oer_type_encoder_f O_inv_encode_oer;
2407
2408/*** <<< CODE [O-inv] >>> ***/
2409
2410int
2411O_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2412 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2413 long value;
2414
2415 if(!sptr) {
2416 ASN__CTFAIL(app_key, td, sptr,
2417 "%s: value not given (%s:%d)",
2418 td->name, __FILE__, __LINE__);
2419 return -1;
2420 }
2421
2422 value = *(const long *)sptr;
2423
2424 if((value >= 0 && value <= 5)) {
2425 /* Constraint check succeeded */
2426 return 0;
2427 } else {
2428 ASN__CTFAIL(app_key, td, sptr,
2429 "%s: constraint failed (%s:%d)",
2430 td->name, __FILE__, __LINE__);
2431 return -1;
2432 }
2433}
2434
2435/*
2436 * This type is implemented using NativeInteger,
2437 * so here we adjust the DEF accordingly.
2438 */
2439static void
2440O_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2441 td->free_struct = asn_DEF_NativeInteger.free_struct;
2442 td->print_struct = asn_DEF_NativeInteger.print_struct;
2443 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
2444 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2445 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2446 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2447 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2448 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2449 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
2450 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
2451 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
2452 if(!td->oer_constraints)
2453 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
2454 if(!td->per_constraints)
2455 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2456 td->elements = asn_DEF_NativeInteger.elements;
2457 td->elements_count = asn_DEF_NativeInteger.elements_count;
2458 td->specifics = asn_DEF_NativeInteger.specifics;
2459}
2460
2461void
2462O_inv_free(asn_TYPE_descriptor_t *td,
2463 void *struct_ptr, int contents_only) {
2464 O_inv_1_inherit_TYPE_descriptor(td);
2465 td->free_struct(td, struct_ptr, contents_only);
2466}
2467
2468int
2469O_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2470 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2471 O_inv_1_inherit_TYPE_descriptor(td);
2472 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2473}
2474
2475asn_dec_rval_t
2476O_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2477 void **structure, const void *bufptr, size_t size, int tag_mode) {
2478 O_inv_1_inherit_TYPE_descriptor(td);
2479 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2480}
2481
2482asn_enc_rval_t
2483O_inv_encode_der(asn_TYPE_descriptor_t *td,
2484 void *structure, int tag_mode, ber_tlv_tag_t tag,
2485 asn_app_consume_bytes_f *cb, void *app_key) {
2486 O_inv_1_inherit_TYPE_descriptor(td);
2487 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2488}
2489
2490asn_dec_rval_t
2491O_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2492 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2493 O_inv_1_inherit_TYPE_descriptor(td);
2494 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2495}
2496
2497asn_enc_rval_t
2498O_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2499 int ilevel, enum xer_encoder_flags_e flags,
2500 asn_app_consume_bytes_f *cb, void *app_key) {
2501 O_inv_1_inherit_TYPE_descriptor(td);
2502 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2503}
2504
2505asn_dec_rval_t
2506O_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2507 asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) {
2508 O_inv_1_inherit_TYPE_descriptor(td);
2509 return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size);
2510}
2511
2512asn_enc_rval_t
2513O_inv_encode_oer(asn_TYPE_descriptor_t *td,
2514 asn_oer_constraints_t *constraints,
2515 void *structure, asn_app_consume_bytes_f *cb, void *app_key) {
2516 O_inv_1_inherit_TYPE_descriptor(td);
2517 return td->uper_encoder(td, constraints, structure, cb, app_key);
2518}
2519
2520
2521/*** <<< CTDEFS [O-inv] >>> ***/
2522
2523static asn_oer_constraints_t asn_OER_type_O_inv_constr_1 GCC_NOTUSED = {
Lev Walkin8041fe82017-08-02 10:39:01 -07002524 { 0, 0 },
2525 -1};
Lev Walkin5861e8a2017-07-31 20:27:05 -07002526
2527/*** <<< STAT-DEFS [O-inv] >>> ***/
2528
2529static const ber_tlv_tag_t asn_DEF_O_inv_tags_1[] = {
2530 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2531};
2532asn_TYPE_descriptor_t asn_DEF_O_inv = {
2533 "O-inv",
2534 "O-inv",
2535 O_inv_free,
2536 O_inv_print,
2537 O_inv_constraint,
2538 O_inv_decode_ber,
2539 O_inv_encode_der,
2540 O_inv_decode_xer,
2541 O_inv_encode_xer,
2542 O_inv_decode_oer,
2543 O_inv_encode_oer,
2544 0, 0, /* No PER support, use "-gen-PER" to enable */
2545 0, /* Use generic outmost tag fetcher */
2546 asn_DEF_O_inv_tags_1,
2547 sizeof(asn_DEF_O_inv_tags_1)
2548 /sizeof(asn_DEF_O_inv_tags_1[0]), /* 1 */
2549 asn_DEF_O_inv_tags_1, /* Same as above */
2550 sizeof(asn_DEF_O_inv_tags_1)
2551 /sizeof(asn_DEF_O_inv_tags_1[0]), /* 1 */
2552 &asn_OER_type_O_inv_constr_1,
Lev Walkin8aed40c2017-07-26 18:50:04 -07002553 0, /* No PER visible constraints */
2554 0, 0, /* No members */
2555 0 /* No specifics */
2556};
2557