Enhanced SIM for E2AP v1 for TS UC
[sim/e2-interface.git] / e2sim / e2apv1sim / src / E2AP / e2ap_asn1c_codec.h
1 /*****************************************************************************
2 #                                                                            *
3 # Copyright 2019 AT&T Intellectual Property                                  *
4 # Copyright 2019 Nokia                                                       *
5 #                                                                            *
6 # Licensed under the Apache License, Version 2.0 (the "License");            *
7 # you may not use this file except in compliance with the License.           *
8 # You may obtain a copy of the License at                                    *
9 #                                                                            *
10 #      http://www.apache.org/licenses/LICENSE-2.0                            *
11 #                                                                            *
12 # Unless required by applicable law or agreed to in writing, software        *
13 # distributed under the License is distributed on an "AS IS" BASIS,          *
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
15 # See the License for the specific language governing permissions and        *
16 # limitations under the License.                                             *
17 #                                                                            *
18 ******************************************************************************/
19 #ifndef E2AP_ASN1C_CODEC_H
20 #define E2AP_ASN1C_CODEC_H
21
22 #include "e2sim_defs.h"
23 #include "E2AP-PDU.h"
24 #include "InitiatingMessage.h"
25 #include "SuccessfulOutcome.h"
26 #include "UnsuccessfulOutcome.h"
27
28 #include "GlobalE2node-ID.h"
29 #include "E2setupRequest.h"
30
31 #define ASN1C_PDU_PRINT_BUFFER     4096
32 #define MAX_XML_BUFFER             10000
33 #define E2AP_XML_DIR               "/src/E2AP/XML/"
34
35 void e2ap_asn1c_print_pdu(const E2AP_PDU_t* pdu);
36
37 void asn1c_xer_print(asn_TYPE_descriptor_t *typeDescriptor, void *data);
38
39 E2AP_PDU_t* e2ap_xml_to_pdu(char const* xml_message);
40 E2setupRequest_t* smaller_e2ap_xml_to_pdu(char const* xml_message);
41
42 int e2ap_asn1c_encode_pdu(E2AP_PDU_t* pdu, unsigned char **buffer);
43
44 void e2ap_asn1c_decode_pdu(E2AP_PDU_t* pdu, unsigned char *buffer, int len);
45
46 int e2ap_asn1c_get_procedureCode(E2AP_PDU_t* pdu);
47
48 #endif