Commit 5d4de8bd authored by gauthier's avatar gauthier

switch branch

parent 1f34bfa1
......@@ -1332,6 +1332,9 @@ include(FindPkgConfig)
pkg_search_module(LIBXML2 libxml-2.0 REQUIRED)
include_directories(${LIBXML2_INCLUDE_DIRS})
pkg_search_module(LIBXSLT libxslt REQUIRED)
include_directories(${LIBXSLT_INCLUDE_DIRS})
pkg_search_module(OPENSSL openssl REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIRS})
......@@ -1620,7 +1623,7 @@ add_executable(test_epc_generate_scenario
${OPENAIR_BIN_DIR}/messages_xml.h
)
target_link_libraries (test_epc_generate_scenario
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
)
......
......@@ -43,15 +43,22 @@
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <libxml/xmlmemory.h>
#include <libxml/debugXML.h>
#include <libxml/HTMLtree.h>
#include <libxml/xmlIO.h>
#include <libxml/DOCBparser.h>
#include <libxml/xinclude.h>
#include <libxml/catalog.h>
#include <libxslt/xslt.h>
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
#include "assertions.h"
#include "generate_scenario.h"
#include "s1ap_eNB.h"
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs"
......@@ -85,23 +92,44 @@
#define ENB_CONFIG_PROPERTIES_INDEX_OLD 0
#define ENB_CONFIG_PROPERTIES_INDEX_NEW 1
#define ENB_CONFIG_MAX_XSLT_PARAMS 64
Enb_properties_array_t g_enb_properties[2];
char *g_test_dir = "."; // default value
char *g_pdml_in_basename = "trace.pdml"; // default value
extern int xmlLoadExtDtdDefaultValue;
//------------------------------------------------------------------------------
void generate_scenario(const char const * pdml_in_basenameP)
//------------------------------------------------------------------------------
{
int fd_pdml_in;
//int fd_pdml_in;
xsltStylesheetPtr cur = NULL;
xmlDocPtr doc, res;
const char *params[ENB_CONFIG_MAX_XSLT_PARAMS];
int nb_params = 0;
if (chdir(g_test_dir) == 0) {
printf( "working in %s directory\n", g_test_dir);
fd_pdml_in = open(pdml_in_basenameP, O_RDONLY);
/*fd_pdml_in = open(pdml_in_basenameP, O_RDONLY);
AssertFatal (fd_pdml_in > 0,
"Error while opening %s file in directory %s\n",
pdml_in_basenameP,
g_test_dir);
g_test_dir);*/
params[nb_params] = NULL;
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
cur = xsltParseStylesheetFile("enb_config.xsl");
doc = xmlParseFile(pdml_in_basenameP);
res = xsltApplyStylesheet(cur, doc, params);
xsltSaveResultToFile(stdout, res, cur);
xsltFreeStylesheet(cur);
xmlFreeDoc(res);
xmlFreeDoc(doc);
xsltCleanupGlobals();
xmlCleanupParser();
} else {
printf("Error: chdir %s returned %s\n", g_test_dir, strerror(errno));
exit(-1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment