1 /*****************************************************************************
3 # Copyright 2019 AT&T Intellectual Property *
4 # Copyright 2019 Nokia *
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 *
10 # http://www.apache.org/licenses/LICENSE-2.0 *
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. *
18 ******************************************************************************/
19 #ifndef E2AP_ASN1C_CODEC_H
20 #define E2AP_ASN1C_CODEC_H
22 #include "e2sim_defs.h"
24 #include "InitiatingMessage.h"
25 #include "SuccessfulOutcome.h"
26 #include "UnsuccessfulOutcome.h"
28 #define ASN1C_PDU_PRINT_BUFFER 4096
29 #define MAX_XML_BUFFER 10000
30 #define E2AP_XML_DIR "/src/E2AP/XML/"
32 void e2ap_asn1c_print_pdu(const E2AP_PDU_t* pdu);
34 void asn1c_xer_print(asn_TYPE_descriptor_t *typeDescriptor, void *data);
36 E2AP_PDU_t* e2ap_xml_to_pdu(char const* xml_message);
38 int e2ap_asn1c_encode_pdu(E2AP_PDU_t* pdu, unsigned char **buffer);
40 void e2ap_asn1c_decode_pdu(E2AP_PDU_t* pdu, unsigned char *buffer, int len);
42 int e2ap_asn1c_get_procedureCode(E2AP_PDU_t* pdu);