SIM-115: update simulator to use latest E2SM KPM version 3
[sim/e2-interface.git] / e2sim / asn1c / ANY_xer.c
1 /*
2  * Copyright (c) 2017 Lev Walkin <vlm@lionet.info>.
3  * All rights reserved.
4  * Redistribution and modifications are permitted subject to BSD license.
5  */
6 #include <asn_internal.h>
7 #include <ANY.h>
8
9 asn_enc_rval_t
10 ANY_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
11                enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
12                void *app_key) {
13     if(flags & XER_F_CANONICAL) {
14         /*
15          * Canonical XER-encoding of ANY type is not supported.
16          */
17         ASN__ENCODE_FAILED;
18     }
19
20     /* Dump as binary */
21     return OCTET_STRING_encode_xer(td, sptr, ilevel, flags, cb, app_key);
22 }