Small reogranization
diff --git a/model/sync-ccnx-wrapper.cc b/ccnx/sync-ccnx-wrapper.cc
similarity index 100%
rename from model/sync-ccnx-wrapper.cc
rename to ccnx/sync-ccnx-wrapper.cc
diff --git a/model/sync-ccnx-wrapper.h b/ccnx/sync-ccnx-wrapper.h
similarity index 100%
rename from model/sync-ccnx-wrapper.h
rename to ccnx/sync-ccnx-wrapper.h
diff --git a/model/sync-log.cc b/ccnx/sync-log.cc
similarity index 100%
rename from model/sync-log.cc
rename to ccnx/sync-log.cc
diff --git a/model/sync-log.h b/ccnx/sync-log.h
similarity index 100%
rename from model/sync-log.h
rename to ccnx/sync-log.h
diff --git a/model/sync-scheduler.cc b/ccnx/sync-scheduler.cc
similarity index 100%
rename from model/sync-scheduler.cc
rename to ccnx/sync-scheduler.cc
diff --git a/model/sync-scheduler.h b/ccnx/sync-scheduler.h
similarity index 100%
rename from model/sync-scheduler.h
rename to ccnx/sync-scheduler.h
diff --git a/log4cxx.properties b/log4cxx.properties
index 70f885a..23ff104 100644
--- a/log4cxx.properties
+++ b/log4cxx.properties
@@ -11,10 +11,10 @@
#log4j.appender.A1.layout.ConversionPattern=%d{hh:mm:ss,SSS} %-14t %-14c %m%n
log4j.appender.A1.layout.ConversionPattern=%d{ss,SSS} %-12c %m%n
-log4j.logger.SyncLogic = TRACE
+log4j.logger.SyncLogic = DEBUG
#log4j.logger.SyncInterestTable = TRACE
-# log4j.logger.AppDataFetch = TRACE
-# log4j.logger.Test = TRACE
+#log4j.logger.AppDataFetch = TRACE
+log4j.logger.Test = TRACE
#log4j.logger.bgpparser=TRACE
#log4j.logger.bgpparser.AttributeType=ERROR
#log4j.logger.bgpparser.MRTCommonHeader=ERROR
diff --git a/model/sync-log.h b/ns3/sync-log.h
similarity index 100%
copy from model/sync-log.h
copy to ns3/sync-log.h
diff --git a/model/sync-ns3-name-info.cc b/ns3/sync-ns3-name-info.cc
similarity index 100%
rename from model/sync-ns3-name-info.cc
rename to ns3/sync-ns3-name-info.cc
diff --git a/model/sync-ns3-name-info.h b/ns3/sync-ns3-name-info.h
similarity index 100%
rename from model/sync-ns3-name-info.h
rename to ns3/sync-ns3-name-info.h
diff --git a/test/test_app_socket.cc b/test/test_app_socket.cc
index e9a87fc..985dac3 100644
--- a/test/test_app_socket.cc
+++ b/test/test_app_socket.cc
@@ -27,9 +27,9 @@
#include <boost/make_shared.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
-#include "../model/sync-log.h"
+#include "sync-log.h"
-#include "../model/sync-app-socket.h"
+#include "sync-app-socket.h"
extern "C" {
#include <unistd.h>
}
diff --git a/test/test_ccnx_wrapper.cc b/test/test_ccnx_wrapper.cc
index ac5150c..6934584 100644
--- a/test/test_ccnx_wrapper.cc
+++ b/test/test_ccnx_wrapper.cc
@@ -26,7 +26,7 @@
#include <boost/make_shared.hpp>
-#include "../model/sync-ccnx-wrapper.h"
+#include "sync-ccnx-wrapper.h"
using namespace Sync;
using namespace std;
diff --git a/test/test_data_fetch_and_publish.cc b/test/test_data_fetch_and_publish.cc
index 0d5417d..157ce7f 100644
--- a/test/test_data_fetch_and_publish.cc
+++ b/test/test_data_fetch_and_publish.cc
@@ -27,9 +27,9 @@
#include <boost/make_shared.hpp>
-#include "../model/sync-ccnx-wrapper.h"
-#include "../model/sync-app-data-fetch.h"
-#include "../model/sync-app-data-publish.h"
+#include "sync-ccnx-wrapper.h"
+#include "sync-app-data-fetch.h"
+#include "sync-app-data-publish.h"
using namespace Sync;
using namespace std;
diff --git a/test/test_digest.cc b/test/test_digest.cc
index d7ddbf5..8afd88b 100644
--- a/test/test_digest.cc
+++ b/test/test_digest.cc
@@ -25,7 +25,7 @@
#include <boost/test/output_test_stream.hpp>
using boost::test_tools::output_test_stream;
-#include "../model/sync-digest.h"
+#include "sync-digest.h"
#include <iostream>
#include <sstream>
diff --git a/test/test_interest_table.cc b/test/test_interest_table.cc
index 6727bcc..34ea00f 100644
--- a/test/test_interest_table.cc
+++ b/test/test_interest_table.cc
@@ -27,7 +27,7 @@
#include <boost/make_shared.hpp>
-#include "../model/sync-interest-table.h"
+#include "sync-interest-table.h"
using namespace Sync;
using namespace std;
diff --git a/test/test_leaf.cc b/test/test_leaf.cc
index 0c8409f..361793a 100644
--- a/test/test_leaf.cc
+++ b/test/test_leaf.cc
@@ -26,9 +26,9 @@
#include <boost/make_shared.hpp>
-#include "../model/sync-full-leaf.h"
-#include "../model/sync-diff-leaf.h"
-#include "../model/sync-std-name-info.h"
+#include "sync-full-leaf.h"
+#include "sync-diff-leaf.h"
+#include "sync-std-name-info.h"
using namespace Sync;
using namespace std;
diff --git a/test/test_pit.cc b/test/test_pit.cc
index 7b2c7af..dca697e 100644
--- a/test/test_pit.cc
+++ b/test/test_pit.cc
@@ -27,8 +27,8 @@
#include <boost/make_shared.hpp>
-#include "../model/sync-interest-table.h"
-#include "../model/sync-log.h"
+#include "sync-interest-table.h"
+#include "sync-log.h"
using namespace Sync;
using namespace std;
diff --git a/test/test_scheduler.cc b/test/test_scheduler.cc
index 276fd50..59687e4 100644
--- a/test/test_scheduler.cc
+++ b/test/test_scheduler.cc
@@ -26,8 +26,8 @@
using boost::test_tools::output_test_stream;
#include <boost/make_shared.hpp>
-#include "../model/sync-scheduler.h"
-#include "../model/sync-logic.h"
+#include "sync-scheduler.h"
+#include "sync-logic.h"
using namespace Sync;
using namespace std;
diff --git a/test/test_state.cc b/test/test_state.cc
index 86d4c6f..35fc79c 100644
--- a/test/test_state.cc
+++ b/test/test_state.cc
@@ -30,9 +30,9 @@
#include <boost/make_shared.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
-#include "../model/sync-std-name-info.h"
-#include "../model/sync-full-state.h"
-#include "../model/sync-diff-state.h"
+#include "sync-std-name-info.h"
+#include "sync-full-state.h"
+#include "sync-diff-state.h"
using namespace Sync;
using namespace std;
diff --git a/test/test_sync_logic.cc b/test/test_sync_logic.cc
index 5b36ba8..f6b6808 100644
--- a/test/test_sync_logic.cc
+++ b/test/test_sync_logic.cc
@@ -27,9 +27,9 @@
#include <boost/make_shared.hpp>
-#include "../model/sync-ccnx-wrapper.h"
-#include "../model/sync-logic.h"
-#include "../model/sync-seq-no.h"
+#include "sync-ccnx-wrapper.h"
+#include "sync-logic.h"
+#include "sync-seq-no.h"
using namespace std;
using namespace boost;
diff --git a/wscript b/wscript
index ade425a..88d47ee 100644
--- a/wscript
+++ b/wscript
@@ -40,18 +40,22 @@
conf.check_boost(lib='system iostreams test thread')
conf.define ('STANDALONE', 1)
+ conf.load ('ccnx')
+ conf.check_ccnx (path=conf.options.ccnx_dir)
+
+ if conf.options.log4cxx:
+ conf.check_cfg(package='liblog4cxx', args=['--cflags', '--libs'], uselib_store='LOG4CXX', mandatory=True)
+
if not conf.options.no_debug:
conf.define ('_DEBUG', 1)
-
try:
conf.load('doxygen')
except:
pass
- conf.load('ccnx tinyxml')
- conf.check_ccnx (path=conf.options.ccnx_dir)
- conf.check_tinyxml (path=conf.options.ccnx_dir)
+ conf.load('tinyxml')
+ conf.check_tinyxml ()
# else:
# if 'CXXFLAGS' in conf.env:
@@ -66,35 +70,78 @@
# conf.env['CFLAGS'] = tmp + ['-g']
# _report_optional_feature(conf, "debug", "Debug Symbols", True, '')
- if conf.options.log4cxx:
- conf.check_cfg(package='liblog4cxx', args=['--cflags', '--libs'], uselib_store='LOG4CXX', mandatory=True)
def build (bld):
if bld.get_define ("NS3_MODULE"):
sync_ns3 = bld.shlib (
target = "sync-ns3",
features=['cxx', 'cxxshlib'],
+ source = [
+ # 'ns3/sync-ccnx-wrapper.cc',
+ 'ns3/sync-ns3-name-info.cc',
+
+ 'model/sync-app-data-fetch.cc',
+ 'model/sync-app-data-publish.cc',
+ 'model/sync-app-socket-c.cc',
+ 'model/sync-app-socket.cc',
+ 'model/sync-diff-leaf.cc',
+ 'model/sync-diff-state.cc',
+ 'model/sync-digest.cc',
+ 'model/sync-full-leaf.cc',
+ 'model/sync-full-state.cc',
+ 'model/sync-interest-table.cc',
+ 'model/sync-leaf.cc',
+ 'model/sync-logic.cc',
+ 'model/sync-name-info.cc',
+ 'model/sync-seq-no.cc',
+ 'model/sync-state.cc',
+ 'model/sync-std-name-info.cc',
+ ],
use = 'BOOST BOOST_IOSTREAMS SSL TINYXML CCNX ' + ' '.join (['ns3_'+dep for dep in ['core', 'network', 'internet', 'NDNabstraction']]).upper (),
- source = bld.path.ant_glob(['model/sync-*.cc',
- 'helper/sync-*.cc']),
+ includes = ['model', 'ns3', 'helper'],
)
-
# from waflib import Utils,Logs,Errors
# Logs.pprint ('CYAN', program.use)
else:
- libsync = bld.shlib (target=APPNAME,
- features=['cxx', 'cxxshlib'],
- source = bld.path.ant_glob(['model/sync-*.cc',
- 'helper/sync-*.cc']),
- use = 'BOOST BOOST_IOSTREAMS BOOST_THREAD SSL TINYXML CCNX')
-
+ libsync = bld.shlib (
+ target=APPNAME,
+ features=['cxx', 'cxxshlib'],
+ source = [
+ 'ccnx/sync-ccnx-wrapper.cc',
+ 'ccnx/sync-scheduler.cc',
+ 'ccnx/sync-log.cc',
+
+ 'model/sync-app-data-fetch.cc',
+ 'model/sync-app-data-publish.cc',
+ 'model/sync-app-socket-c.cc',
+ 'model/sync-app-socket.cc',
+ 'model/sync-diff-leaf.cc',
+ 'model/sync-diff-state.cc',
+ 'model/sync-digest.cc',
+ 'model/sync-full-leaf.cc',
+ 'model/sync-full-state.cc',
+ 'model/sync-interest-table.cc',
+ 'model/sync-leaf.cc',
+ 'model/sync-logic.cc',
+ 'model/sync-name-info.cc',
+ 'model/sync-seq-no.cc',
+ 'model/sync-state.cc',
+ 'model/sync-std-name-info.cc',
+ ],
+ use = 'BOOST BOOST_IOSTREAMS BOOST_THREAD SSL TINYXML CCNX',
+ includes = ['model', 'ccnx', 'helper'],
+ )
+
# Unit tests
- unittests = bld.program (target="unit-tests",
- source = bld.path.ant_glob(['test/**/*.cc']),
- features=['cxx', 'cxxprogram'],
- use = 'BOOST_TEST sync')
+ unittests = bld.program (
+ target="unit-tests",
+ source = bld.path.ant_glob(['test/**/*.cc']),
+ features=['cxx', 'cxxprogram'],
+ use = 'BOOST_TEST sync',
+ includes = ['model', 'ccnx', 'helper'],
+ )
if bld.get_define ("HAVE_LOG4CXX"):
libsync.use += ' LOG4CXX'