| 1 |
|
| 2 |
/*** <<< INCLUDES [OK-Integer1] >>> ***/ |
| 3 |
|
| 4 |
#include <NativeInteger.h> |
| 5 |
|
| 6 |
/*** <<< TYPE-DECLS [OK-Integer1] >>> ***/ |
| 7 |
|
| 8 |
typedef long OK_Integer1_t; |
| 9 |
|
| 10 |
/*** <<< FUNC-DECLS [OK-Integer1] >>> ***/ |
| 11 |
|
| 12 |
extern asn_TYPE_descriptor_t asn_DEF_OK_Integer1; |
| 13 |
asn_struct_free_f OK_Integer1_free; |
| 14 |
asn_struct_print_f OK_Integer1_print; |
| 15 |
asn_constr_check_f OK_Integer1_constraint; |
| 16 |
ber_type_decoder_f OK_Integer1_decode_ber; |
| 17 |
der_type_encoder_f OK_Integer1_encode_der; |
| 18 |
xer_type_decoder_f OK_Integer1_decode_xer; |
| 19 |
xer_type_encoder_f OK_Integer1_encode_xer; |
| 20 |
|
| 21 |
/*** <<< CODE [OK-Integer1] >>> ***/ |
| 22 |
|
| 23 |
int |
| 24 |
OK_Integer1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 25 |
asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 26 |
|
| 27 |
if(!sptr) { |
| 28 |
ASN__CTFAIL(app_key, td, sptr, |
| 29 |
"%s: value not given (%s:%d)", |
| 30 |
td->name, __FILE__, __LINE__); |
| 31 |
return -1; |
| 32 |
} |
| 33 |
|
| 34 |
|
| 35 |
if(1 /* No applicable constraints whatsoever */) { |
| 36 |
/* Nothing is here. See below */ |
| 37 |
} |
| 38 |
|
| 39 |
/* Replace with underlying type checker */ |
| 40 |
td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 41 |
return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 42 |
} |
| 43 |
|
| 44 |
/* |
| 45 |
* This type is implemented using NativeInteger, |
| 46 |
* so here we adjust the DEF accordingly. |
| 47 |
*/ |
| 48 |
static void |
| 49 |
OK_Integer1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 50 |
td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 51 |
td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 52 |
td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 53 |
td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 54 |
td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 55 |
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 56 |
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 57 |
td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 58 |
td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 59 |
if(!td->per_constraints) |
| 60 |
td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 61 |
td->elements = asn_DEF_NativeInteger.elements; |
| 62 |
td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 63 |
td->specifics = asn_DEF_NativeInteger.specifics; |
| 64 |
} |
| 65 |
|
| 66 |
void |
| 67 |
OK_Integer1_free(asn_TYPE_descriptor_t *td, |
| 68 |
void *struct_ptr, int contents_only) { |
| 69 |
OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 70 |
td->free_struct(td, struct_ptr, contents_only); |
| 71 |
} |
| 72 |
|
| 73 |
int |
| 74 |
OK_Integer1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 75 |
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 76 |
OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 77 |
return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 78 |
} |
| 79 |
|
| 80 |
asn_dec_rval_t |
| 81 |
OK_Integer1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 82 |
void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 83 |
OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 84 |
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 85 |
} |
| 86 |
|
| 87 |
asn_enc_rval_t |
| 88 |
OK_Integer1_encode_der(asn_TYPE_descriptor_t *td, |
| 89 |
void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 90 |
asn_app_consume_bytes_f *cb, void *app_key) { |
| 91 |
OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 92 |
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 93 |
} |
| 94 |
|
| 95 |
asn_dec_rval_t |
| 96 |
OK_Integer1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 97 |
void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 98 |
OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 99 |
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 100 |
} |
| 101 |
|
| 102 |
asn_enc_rval_t |
| 103 |
OK_Integer1_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 104 |
int ilevel, enum xer_encoder_flags_e flags, |
| 105 |
asn_app_consume_bytes_f *cb, void *app_key) { |
| 106 |
OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 107 |
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 108 |
} |
| 109 |
|
| 110 |
|
| 111 |
/*** <<< STAT-DEFS [OK-Integer1] >>> ***/ |
| 112 |
|
| 113 |
static const ber_tlv_tag_t asn_DEF_OK_Integer1_tags_1[] = { |
| 114 |
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 115 |
}; |
| 116 |
asn_TYPE_descriptor_t asn_DEF_OK_Integer1 = { |
| 117 |
"OK-Integer1", |
| 118 |
"OK-Integer1", |
| 119 |
OK_Integer1_free, |
| 120 |
OK_Integer1_print, |
| 121 |
OK_Integer1_constraint, |
| 122 |
OK_Integer1_decode_ber, |
| 123 |
OK_Integer1_encode_der, |
| 124 |
OK_Integer1_decode_xer, |
| 125 |
OK_Integer1_encode_xer, |
| 126 |
0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 127 |
0, /* Use generic outmost tag fetcher */ |
| 128 |
asn_DEF_OK_Integer1_tags_1, |
| 129 |
sizeof(asn_DEF_OK_Integer1_tags_1) |
| 130 |
/sizeof(asn_DEF_OK_Integer1_tags_1[0]), /* 1 */ |
| 131 |
asn_DEF_OK_Integer1_tags_1, /* Same as above */ |
| 132 |
sizeof(asn_DEF_OK_Integer1_tags_1) |
| 133 |
/sizeof(asn_DEF_OK_Integer1_tags_1[0]), /* 1 */ |
| 134 |
0, /* No PER visible constraints */ |
| 135 |
0, 0, /* No members */ |
| 136 |
0 /* No specifics */ |
| 137 |
}; |
| 138 |
|
| 139 |
|
| 140 |
/*** <<< INCLUDES [OK-Integer2] >>> ***/ |
| 141 |
|
| 142 |
#include <NativeInteger.h> |
| 143 |
|
| 144 |
/*** <<< TYPE-DECLS [OK-Integer2] >>> ***/ |
| 145 |
|
| 146 |
typedef long OK_Integer2_t; |
| 147 |
|
| 148 |
/*** <<< FUNC-DECLS [OK-Integer2] >>> ***/ |
| 149 |
|
| 150 |
extern asn_TYPE_descriptor_t asn_DEF_OK_Integer2; |
| 151 |
asn_struct_free_f OK_Integer2_free; |
| 152 |
asn_struct_print_f OK_Integer2_print; |
| 153 |
asn_constr_check_f OK_Integer2_constraint; |
| 154 |
ber_type_decoder_f OK_Integer2_decode_ber; |
| 155 |
der_type_encoder_f OK_Integer2_encode_der; |
| 156 |
xer_type_decoder_f OK_Integer2_decode_xer; |
| 157 |
xer_type_encoder_f OK_Integer2_encode_xer; |
| 158 |
|
| 159 |
/*** <<< CODE [OK-Integer2] >>> ***/ |
| 160 |
|
| 161 |
int |
| 162 |
OK_Integer2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 163 |
asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 164 |
|
| 165 |
if(!sptr) { |
| 166 |
ASN__CTFAIL(app_key, td, sptr, |
| 167 |
"%s: value not given (%s:%d)", |
| 168 |
td->name, __FILE__, __LINE__); |
| 169 |
return -1; |
| 170 |
} |
| 171 |
|
| 172 |
|
| 173 |
if(1 /* No applicable constraints whatsoever */) { |
| 174 |
/* Nothing is here. See below */ |
| 175 |
} |
| 176 |
|
| 177 |
/* Replace with underlying type checker */ |
| 178 |
td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 179 |
return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 180 |
} |
| 181 |
|
| 182 |
/* |
| 183 |
* This type is implemented using NativeInteger, |
| 184 |
* so here we adjust the DEF accordingly. |
| 185 |
*/ |
| 186 |
static void |
| 187 |
OK_Integer2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 188 |
td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 189 |
td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 190 |
td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 191 |
td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 192 |
td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 193 |
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 194 |
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 195 |
td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 196 |
td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 197 |
if(!td->per_constraints) |
| 198 |
td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 199 |
td->elements = asn_DEF_NativeInteger.elements; |
| 200 |
td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 201 |
td->specifics = asn_DEF_NativeInteger.specifics; |
| 202 |
} |
| 203 |
|
| 204 |
void |
| 205 |
OK_Integer2_free(asn_TYPE_descriptor_t *td, |
| 206 |
void *struct_ptr, int contents_only) { |
| 207 |
OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 208 |
td->free_struct(td, struct_ptr, contents_only); |
| 209 |
} |
| 210 |
|
| 211 |
int |
| 212 |
OK_Integer2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 213 |
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 214 |
OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 215 |
return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 216 |
} |
| 217 |
|
| 218 |
asn_dec_rval_t |
| 219 |
OK_Integer2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 220 |
void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 221 |
OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 222 |
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 223 |
} |
| 224 |
|
| 225 |
asn_enc_rval_t |
| 226 |
OK_Integer2_encode_der(asn_TYPE_descriptor_t *td, |
| 227 |
void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 228 |
asn_app_consume_bytes_f *cb, void *app_key) { |
| 229 |
OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 230 |
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 231 |
} |
| 232 |
|
| 233 |
asn_dec_rval_t |
| 234 |
OK_Integer2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 235 |
void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 236 |
OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 237 |
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 238 |
} |
| 239 |
|
| 240 |
asn_enc_rval_t |
| 241 |
OK_Integer2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 242 |
int ilevel, enum xer_encoder_flags_e flags, |
| 243 |
asn_app_consume_bytes_f *cb, void *app_key) { |
| 244 |
OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 245 |
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 246 |
} |
| 247 |
|
| 248 |
|
| 249 |
/*** <<< STAT-DEFS [OK-Integer2] >>> ***/ |
| 250 |
|
| 251 |
static const ber_tlv_tag_t asn_DEF_OK_Integer2_tags_1[] = { |
| 252 |
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 253 |
}; |
| 254 |
asn_TYPE_descriptor_t asn_DEF_OK_Integer2 = { |
| 255 |
"OK-Integer2", |
| 256 |
"OK-Integer2", |
| 257 |
OK_Integer2_free, |
| 258 |
OK_Integer2_print, |
| 259 |
OK_Integer2_constraint, |
| 260 |
OK_Integer2_decode_ber, |
| 261 |
OK_Integer2_encode_der, |
| 262 |
OK_Integer2_decode_xer, |
| 263 |
OK_Integer2_encode_xer, |
| 264 |
0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 265 |
0, /* Use generic outmost tag fetcher */ |
| 266 |
asn_DEF_OK_Integer2_tags_1, |
| 267 |
sizeof(asn_DEF_OK_Integer2_tags_1) |
| 268 |
/sizeof(asn_DEF_OK_Integer2_tags_1[0]), /* 1 */ |
| 269 |
asn_DEF_OK_Integer2_tags_1, /* Same as above */ |
| 270 |
sizeof(asn_DEF_OK_Integer2_tags_1) |
| 271 |
/sizeof(asn_DEF_OK_Integer2_tags_1[0]), /* 1 */ |
| 272 |
0, /* No PER visible constraints */ |
| 273 |
0, 0, /* No members */ |
| 274 |
0 /* No specifics */ |
| 275 |
}; |
| 276 |
|
| 277 |
|
| 278 |
/*** <<< INCLUDES [OK-Integer3] >>> ***/ |
| 279 |
|
| 280 |
#include <NativeInteger.h> |
| 281 |
|
| 282 |
/*** <<< TYPE-DECLS [OK-Integer3] >>> ***/ |
| 283 |
|
| 284 |
typedef long OK_Integer3_t; |
| 285 |
|
| 286 |
/*** <<< FUNC-DECLS [OK-Integer3] >>> ***/ |
| 287 |
|
| 288 |
extern asn_TYPE_descriptor_t asn_DEF_OK_Integer3; |
| 289 |
asn_struct_free_f OK_Integer3_free; |
| 290 |
asn_struct_print_f OK_Integer3_print; |
| 291 |
asn_constr_check_f OK_Integer3_constraint; |
| 292 |
ber_type_decoder_f OK_Integer3_decode_ber; |
| 293 |
der_type_encoder_f OK_Integer3_encode_der; |
| 294 |
xer_type_decoder_f OK_Integer3_decode_xer; |
| 295 |
xer_type_encoder_f OK_Integer3_encode_xer; |
| 296 |
|
| 297 |
/*** <<< CODE [OK-Integer3] >>> ***/ |
| 298 |
|
| 299 |
int |
| 300 |
OK_Integer3_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 301 |
asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 302 |
|
| 303 |
if(!sptr) { |
| 304 |
ASN__CTFAIL(app_key, td, sptr, |
| 305 |
"%s: value not given (%s:%d)", |
| 306 |
td->name, __FILE__, __LINE__); |
| 307 |
return -1; |
| 308 |
} |
| 309 |
|
| 310 |
|
| 311 |
if(1 /* No applicable constraints whatsoever */) { |
| 312 |
/* Nothing is here. See below */ |
| 313 |
} |
| 314 |
|
| 315 |
/* Replace with underlying type checker */ |
| 316 |
td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 317 |
return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 318 |
} |
| 319 |
|
| 320 |
/* |
| 321 |
* This type is implemented using NativeInteger, |
| 322 |
* so here we adjust the DEF accordingly. |
| 323 |
*/ |
| 324 |
static void |
| 325 |
OK_Integer3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 326 |
td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 327 |
td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 328 |
td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 329 |
td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 330 |
td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 331 |
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 332 |
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 333 |
td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 334 |
td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 335 |
if(!td->per_constraints) |
| 336 |
td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 337 |
td->elements = asn_DEF_NativeInteger.elements; |
| 338 |
td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 339 |
td->specifics = asn_DEF_NativeInteger.specifics; |
| 340 |
} |
| 341 |
|
| 342 |
void |
| 343 |
OK_Integer3_free(asn_TYPE_descriptor_t *td, |
| 344 |
void *struct_ptr, int contents_only) { |
| 345 |
OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 346 |
td->free_struct(td, struct_ptr, contents_only); |
| 347 |
} |
| 348 |
|
| 349 |
int |
| 350 |
OK_Integer3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 351 |
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 352 |
OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 353 |
return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 354 |
} |
| 355 |
|
| 356 |
asn_dec_rval_t |
| 357 |
OK_Integer3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 358 |
void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 359 |
OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 360 |
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 361 |
} |
| 362 |
|
| 363 |
asn_enc_rval_t |
| 364 |
OK_Integer3_encode_der(asn_TYPE_descriptor_t *td, |
| 365 |
void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 366 |
asn_app_consume_bytes_f *cb, void *app_key) { |
| 367 |
OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 368 |
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 369 |
} |
| 370 |
|
| 371 |
asn_dec_rval_t |
| 372 |
OK_Integer3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 373 |
void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 374 |
OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 375 |
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 376 |
} |
| 377 |
|
| 378 |
asn_enc_rval_t |
| 379 |
OK_Integer3_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 380 |
int ilevel, enum xer_encoder_flags_e flags, |
| 381 |
asn_app_consume_bytes_f *cb, void *app_key) { |
| 382 |
OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 383 |
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 384 |
} |
| 385 |
|
| 386 |
|
| 387 |
/*** <<< STAT-DEFS [OK-Integer3] >>> ***/ |
| 388 |
|
| 389 |
static const ber_tlv_tag_t asn_DEF_OK_Integer3_tags_1[] = { |
| 390 |
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 391 |
}; |
| 392 |
asn_TYPE_descriptor_t asn_DEF_OK_Integer3 = { |
| 393 |
"OK-Integer3", |
| 394 |
"OK-Integer3", |
| 395 |
OK_Integer3_free, |
| 396 |
OK_Integer3_print, |
| 397 |
OK_Integer3_constraint, |
| 398 |
OK_Integer3_decode_ber, |
| 399 |
OK_Integer3_encode_der, |
| 400 |
OK_Integer3_decode_xer, |
| 401 |
OK_Integer3_encode_xer, |
| 402 |
0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 403 |
0, /* Use generic outmost tag fetcher */ |
| 404 |
asn_DEF_OK_Integer3_tags_1, |
| 405 |
sizeof(asn_DEF_OK_Integer3_tags_1) |
| 406 |
/sizeof(asn_DEF_OK_Integer3_tags_1[0]), /* 1 */ |
| 407 |
asn_DEF_OK_Integer3_tags_1, /* Same as above */ |
| 408 |
sizeof(asn_DEF_OK_Integer3_tags_1) |
| 409 |
/sizeof(asn_DEF_OK_Integer3_tags_1[0]), /* 1 */ |
| 410 |
0, /* No PER visible constraints */ |
| 411 |
0, 0, /* No members */ |
| 412 |
0 /* No specifics */ |
| 413 |
}; |
| 414 |
|
| 415 |
|
| 416 |
/*** <<< INCLUDES [OK-Integer4] >>> ***/ |
| 417 |
|
| 418 |
#include <NativeInteger.h> |
| 419 |
|
| 420 |
/*** <<< TYPE-DECLS [OK-Integer4] >>> ***/ |
| 421 |
|
| 422 |
typedef long OK_Integer4_t; |
| 423 |
|
| 424 |
/*** <<< FUNC-DECLS [OK-Integer4] >>> ***/ |
| 425 |
|
| 426 |
extern asn_TYPE_descriptor_t asn_DEF_OK_Integer4; |
| 427 |
asn_struct_free_f OK_Integer4_free; |
| 428 |
asn_struct_print_f OK_Integer4_print; |
| 429 |
asn_constr_check_f OK_Integer4_constraint; |
| 430 |
ber_type_decoder_f OK_Integer4_decode_ber; |
| 431 |
der_type_encoder_f OK_Integer4_encode_der; |
| 432 |
xer_type_decoder_f OK_Integer4_decode_xer; |
| 433 |
xer_type_encoder_f OK_Integer4_encode_xer; |
| 434 |
|
| 435 |
/*** <<< CODE [OK-Integer4] >>> ***/ |
| 436 |
|
| 437 |
int |
| 438 |
OK_Integer4_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 439 |
asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 440 |
|
| 441 |
if(!sptr) { |
| 442 |
ASN__CTFAIL(app_key, td, sptr, |
| 443 |
"%s: value not given (%s:%d)", |
| 444 |
td->name, __FILE__, __LINE__); |
| 445 |
return -1; |
| 446 |
} |
| 447 |
|
| 448 |
|
| 449 |
if(1 /* No applicable constraints whatsoever */) { |
| 450 |
/* Nothing is here. See below */ |
| 451 |
} |
| 452 |
|
| 453 |
/* Replace with underlying type checker */ |
| 454 |
td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 455 |
return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 456 |
} |
| 457 |
|
| 458 |
/* |
| 459 |
* This type is implemented using NativeInteger, |
| 460 |
* so here we adjust the DEF accordingly. |
| 461 |
*/ |
| 462 |
static void |
| 463 |
OK_Integer4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 464 |
td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 465 |
td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 466 |
td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 467 |
td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 468 |
td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 469 |
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 470 |
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 471 |
td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 472 |
td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 473 |
if(!td->per_constraints) |
| 474 |
td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 475 |
td->elements = asn_DEF_NativeInteger.elements; |
| 476 |
td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 477 |
td->specifics = asn_DEF_NativeInteger.specifics; |
| 478 |
} |
| 479 |
|
| 480 |
void |
| 481 |
OK_Integer4_free(asn_TYPE_descriptor_t *td, |
| 482 |
void *struct_ptr, int contents_only) { |
| 483 |
OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 484 |
td->free_struct(td, struct_ptr, contents_only); |
| 485 |
} |
| 486 |
|
| 487 |
int |
| 488 |
OK_Integer4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 489 |
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 490 |
OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 491 |
return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 492 |
} |
| 493 |
|
| 494 |
asn_dec_rval_t |
| 495 |
OK_Integer4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 496 |
void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 497 |
OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 498 |
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 499 |
} |
| 500 |
|
| 501 |
asn_enc_rval_t |
| 502 |
OK_Integer4_encode_der(asn_TYPE_descriptor_t *td, |
| 503 |
void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 504 |
asn_app_consume_bytes_f *cb, void *app_key) { |
| 505 |
OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 506 |
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 507 |
} |
| 508 |
|
| 509 |
asn_dec_rval_t |
| 510 |
OK_Integer4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 511 |
void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 512 |
OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 513 |
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 514 |
} |
| 515 |
|
| 516 |
asn_enc_rval_t |
| 517 |
OK_Integer4_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 518 |
int ilevel, enum xer_encoder_flags_e flags, |
| 519 |
asn_app_consume_bytes_f *cb, void *app_key) { |
| 520 |
OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 521 |
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 522 |
} |
| 523 |
|
| 524 |
|
| 525 |
/*** <<< STAT-DEFS [OK-Integer4] >>> ***/ |
| 526 |
|
| 527 |
static const ber_tlv_tag_t asn_DEF_OK_Integer4_tags_1[] = { |
| 528 |
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 529 |
}; |
| 530 |
asn_TYPE_descriptor_t asn_DEF_OK_Integer4 = { |
| 531 |
"OK-Integer4", |
| 532 |
"OK-Integer4", |
| 533 |
OK_Integer4_free, |
| 534 |
OK_Integer4_print, |
| 535 |
OK_Integer4_constraint, |
| 536 |
OK_Integer4_decode_ber, |
| 537 |
OK_Integer4_encode_der, |
| 538 |
OK_Integer4_decode_xer, |
| 539 |
OK_Integer4_encode_xer, |
| 540 |
0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 541 |
0, /* Use generic outmost tag fetcher */ |
| 542 |
asn_DEF_OK_Integer4_tags_1, |
| 543 |
sizeof(asn_DEF_OK_Integer4_tags_1) |
| 544 |
/sizeof(asn_DEF_OK_Integer4_tags_1[0]), /* 1 */ |
| 545 |
asn_DEF_OK_Integer4_tags_1, /* Same as above */ |
| 546 |
sizeof(asn_DEF_OK_Integer4_tags_1) |
| 547 |
/sizeof(asn_DEF_OK_Integer4_tags_1[0]), /* 1 */ |
| 548 |
0, /* No PER visible constraints */ |
| 549 |
0, 0, /* No members */ |
| 550 |
0 /* No specifics */ |
| 551 |
}; |
| 552 |
|
| 553 |
|
| 554 |
/*** <<< INCLUDES [NO-Integer5] >>> ***/ |
| 555 |
|
| 556 |
#include <NativeInteger.h> |
| 557 |
|
| 558 |
/*** <<< TYPE-DECLS [NO-Integer5] >>> ***/ |
| 559 |
|
| 560 |
typedef long NO_Integer5_t; |
| 561 |
|
| 562 |
/*** <<< FUNC-DECLS [NO-Integer5] >>> ***/ |
| 563 |
|
| 564 |
extern asn_TYPE_descriptor_t asn_DEF_NO_Integer5; |
| 565 |
asn_struct_free_f NO_Integer5_free; |
| 566 |
asn_struct_print_f NO_Integer5_print; |
| 567 |
asn_constr_check_f NO_Integer5_constraint; |
| 568 |
ber_type_decoder_f NO_Integer5_decode_ber; |
| 569 |
der_type_encoder_f NO_Integer5_encode_der; |
| 570 |
xer_type_decoder_f NO_Integer5_decode_xer; |
| 571 |
xer_type_encoder_f NO_Integer5_encode_xer; |
| 572 |
|
| 573 |
/*** <<< CODE [NO-Integer5] >>> ***/ |
| 574 |
|
| 575 |
int |
| 576 |
NO_Integer5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 577 |
asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 578 |
|
| 579 |
if(!sptr) { |
| 580 |
ASN__CTFAIL(app_key, td, sptr, |
| 581 |
"%s: value not given (%s:%d)", |
| 582 |
td->name, __FILE__, __LINE__); |
| 583 |
return -1; |
| 584 |
} |
| 585 |
|
| 586 |
|
| 587 |
if(1 /* No applicable constraints whatsoever */) { |
| 588 |
/* Nothing is here. See below */ |
| 589 |
} |
| 590 |
|
| 591 |
/* Replace with underlying type checker */ |
| 592 |
td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 593 |
return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 594 |
} |
| 595 |
|
| 596 |
/* |
| 597 |
* This type is implemented using NativeInteger, |
| 598 |
* so here we adjust the DEF accordingly. |
| 599 |
*/ |
| 600 |
static void |
| 601 |
NO_Integer5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 602 |
td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 603 |
td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 604 |
td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 605 |
td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 606 |
td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 607 |
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 608 |
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 609 |
td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 610 |
td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 611 |
if(!td->per_constraints) |
| 612 |
td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 613 |
td->elements = asn_DEF_NativeInteger.elements; |
| 614 |
td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 615 |
td->specifics = asn_DEF_NativeInteger.specifics; |
| 616 |
} |
| 617 |
|
| 618 |
void |
| 619 |
NO_Integer5_free(asn_TYPE_descriptor_t *td, |
| 620 |
void *struct_ptr, int contents_only) { |
| 621 |
NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 622 |
td->free_struct(td, struct_ptr, contents_only); |
| 623 |
} |
| 624 |
|
| 625 |
int |
| 626 |
NO_Integer5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 627 |
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 628 |
NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 629 |
return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 630 |
} |
| 631 |
|
| 632 |
asn_dec_rval_t |
| 633 |
NO_Integer5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 634 |
void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 635 |
NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 636 |
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 637 |
} |
| 638 |
|
| 639 |
asn_enc_rval_t |
| 640 |
NO_Integer5_encode_der(asn_TYPE_descriptor_t *td, |
| 641 |
void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 642 |
asn_app_consume_bytes_f *cb, void *app_key) { |
| 643 |
NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 644 |
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 645 |
} |
| 646 |
|
| 647 |
asn_dec_rval_t |
| 648 |
NO_Integer5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 649 |
void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 650 |
NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 651 |
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 652 |
} |
| 653 |
|
| 654 |
asn_enc_rval_t |
| 655 |
NO_Integer5_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 656 |
int ilevel, enum xer_encoder_flags_e flags, |
| 657 |
asn_app_consume_bytes_f *cb, void *app_key) { |
| 658 |
NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 659 |
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 660 |
} |
| 661 |
|
| 662 |
|
| 663 |
/*** <<< STAT-DEFS [NO-Integer5] >>> ***/ |
| 664 |
|
| 665 |
static const ber_tlv_tag_t asn_DEF_NO_Integer5_tags_1[] = { |
| 666 |
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 667 |
}; |
| 668 |
asn_TYPE_descriptor_t asn_DEF_NO_Integer5 = { |
| 669 |
"NO-Integer5", |
| 670 |
"NO-Integer5", |
| 671 |
NO_Integer5_free, |
| 672 |
NO_Integer5_print, |
| 673 |
NO_Integer5_constraint, |
| 674 |
NO_Integer5_decode_ber, |
| 675 |
NO_Integer5_encode_der, |
| 676 |
NO_Integer5_decode_xer, |
| 677 |
NO_Integer5_encode_xer, |
| 678 |
0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 679 |
0, /* Use generic outmost tag fetcher */ |
| 680 |
asn_DEF_NO_Integer5_tags_1, |
| 681 |
sizeof(asn_DEF_NO_Integer5_tags_1) |
| 682 |
/sizeof(asn_DEF_NO_Integer5_tags_1[0]), /* 1 */ |
| 683 |
asn_DEF_NO_Integer5_tags_1, /* Same as above */ |
| 684 |
sizeof(asn_DEF_NO_Integer5_tags_1) |
| 685 |
/sizeof(asn_DEF_NO_Integer5_tags_1[0]), /* 1 */ |
| 686 |
0, /* No PER visible constraints */ |
| 687 |
0, 0, /* No members */ |
| 688 |
0 /* No specifics */ |
| 689 |
}; |
| 690 |
|