SIM-115: update simulator to use latest E2SM KPM version 3
[sim/e2-interface.git] / e2sim / asn1c / per_encoder.h
1 /*-
2  * Copyright (c) 2006-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
3  * Redistribution and modifications are permitted subject to BSD license.
4  */
5 #ifndef _PER_ENCODER_H_
6 #define _PER_ENCODER_H_
7
8 #include <asn_application.h>
9 #include <per_support.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 struct asn_TYPE_descriptor_s;   /* Forward declaration */
16
17 /*
18  * Type of the generic PER encoder function.
19  */
20 typedef asn_enc_rval_t(per_type_encoder_f)(
21     const struct asn_TYPE_descriptor_s *type_descriptor,
22     const asn_per_constraints_t *constraints, const void *struct_ptr,
23     asn_per_outp_t *per_output);
24
25 int ignore_output(const void *data, size_t size, void *app_key);
26
27 typedef struct enc_dyn_arg {
28     void *buffer;
29     size_t length;
30     size_t allocated;
31 } enc_dyn_arg;
32 int encode_dyn_cb(const void *buffer, size_t size, void *key);
33
34 #ifdef __cplusplus
35 }
36 #endif
37
38 #endif  /* _PER_ENCODER_H_ */