get rid of STANDALONE parameter; by default it should be standalone (not ns3)!

This commit is contained in:
Zhenkai Zhu committed 2012-06-01 16:00:25 -07:00
1 parent 9ec8f41770
commit ea026988be
7 files changed
+19 -19

No files matched your search

+2 -1
View File
@@ -5,6 +5,7 @@
#include "digesttreescene.h"
#include "ui_chatdialog.h"
#include "chatbuf.pb.h"
#include <sync-app-socket.h>
class ChatDialog : public QDialog, private Ui::ChatDialog
{
@@ -13,7 +14,7 @@ class ChatDialog : public QDialog, private Ui::ChatDialog
public:
ChatDialog(QWidget *parent = 0);
void appendMessage(const SyncDemo::ChatMessage &msg);
void processData(const std::vector<MisingDataInfo> &, SyncAppSocket *);
void processData(const std::vector<MissingDataInfo> &, SyncAppSocket *);
private:
void formChatMessage(const QString &text, SyncDemo::ChatMessage &msg);
+3 -3
View File
@@ -12,9 +12,9 @@ FORMS = chatdialog.ui
QMAKE_CXXFLAGS *= -g
QMAKE_CFLAGS *= -g
QMAKE_LIBDIR *= /opt/local/lib /usr/local/lib /usr/lib ../../../third_party/OGDF/_release
INCLUDEPATH *= /opt/local/include /usr/local/include ../../../third_party/OGDF
LIBS *= -lccn -lssl -lcrypto -lpthread -lOGDF -lprotobuf
QMAKE_LIBDIR *= /opt/local/lib /usr/local/lib /usr/lib ../../../third_party/OGDF/_release ../build
INCLUDEPATH *= /opt/local/include /usr/local/include ../../../third_party/OGDF ../include
LIBS *= -lccn -lssl -lcrypto -lpthread -lOGDF -lprotobuf -lsync
CONFIG += console
PROTOS = chatbuf.proto
+2 -2
View File
@@ -20,7 +20,7 @@
* Alexander Afanasyev <alexander.afanasyev@ucla.edu>
*/
#ifndef STANDALONE
#ifdef NS3_MODULE
#ifndef SYNC_CCNX_NAME_INFO_H
#define SYNC_CCNX_NAME_INFO_H
@@ -76,4 +76,4 @@ operator << (Digest &, const ns3::CcnxNameComponents &name);
#endif // SYNC_CCNX_NAME_INFO_H
#endif // STANDALONE
#endif // NS3_MODULE
+2 -2
View File
@@ -23,7 +23,7 @@
#ifndef SYNC_FULL_STATE_H
#define SYNC_FULL_STATE_H
#ifndef STANDALONE
#ifdef NS3_MODULE
#include "ns3/nstime.h"
typedef ns3::Time TimeType;
typedef ns3::Time TimeDurationType;
@@ -31,7 +31,7 @@ typedef ns3::Time TimeDurationType;
#include <boost/date_time/posix_time/posix_time_types.hpp>
typedef boost::posix_time::ptime TimeType;
typedef boost::posix_time::time_duration TimeDurationType;
#endif // STANDALONE
#endif // NS3_MODULE
#include "sync-state.h"
+9 -9
View File
@@ -22,9 +22,9 @@
#include "sync-full-state.h"
#ifndef STANDALONE
#ifdef NS3_MODULE
#include "ns3/simulator.h"
#endif // STANDALONE
#endif // NS3_MODULE
#include <boost/make_shared.hpp>
#include <boost/lambda/lambda.hpp>
@@ -41,7 +41,7 @@ namespace Sync {
FullState::FullState ()
// m_lastUpdated is initialized to "not_a_date_time" in STANDALONE mode and to "0" time in NS-3 mode
// m_lastUpdated is initialized to "not_a_date_time" in normal lib mode and to "0" time in NS-3 mode
{
}
@@ -52,11 +52,11 @@ FullState::~FullState ()
TimeDurationType
FullState::getTimeFromLastUpdate () const
{
#ifndef STANDALONE
#ifdef NS3_MODULE
return ns3::Simulator::Now () - m_lastUpdated;
#else
return boost::posix_time::second_clock::universal_time () - m_lastUpdated;
#endif // STANDALONE
#endif // NS3_MODULE
}
DigestConstPtr
@@ -89,11 +89,11 @@ FullState::getDigest ()
boost::tuple<bool/*inserted*/, bool/*updated*/, SeqNo/*oldSeqNo*/>
FullState::update (NameInfoConstPtr info, const SeqNo &seq)
{
#ifndef STANDALONE
#ifdef NS3_MODULE
m_lastUpdated = ns3::Simulator::Now ();
#else
m_lastUpdated = boost::posix_time::second_clock::universal_time ();
#endif // STANDALONE
#endif // NS3_MODULE
m_digest.reset ();
@@ -120,11 +120,11 @@ FullState::update (NameInfoConstPtr info, const SeqNo &seq)
bool
FullState::remove (NameInfoConstPtr info)
{
#ifndef STANDALONE
#ifdef NS3_MODULE
m_lastUpdated = ns3::Simulator::Now ();
#else
m_lastUpdated = boost::posix_time::second_clock::universal_time ();
#endif // STANDALONE
#endif // NS3_MODULE
m_digest.reset ();
+1 -1
View File
@@ -20,7 +20,7 @@
* Alexander Afanasyev <alexander.afanasyev@ucla.edu>
*/
#ifndef STANDALONE
#ifdef NS3_MODULE
#include "sync-ns3-name-info.h"
#include "ns3/ccnx-name-components.h"
-1
View File
@@ -40,7 +40,6 @@ def configure(conf):
conf.define ('NS3_LOG_ENABLE', 1)
else:
conf.check_boost(lib='system iostreams test thread')
conf.define ('STANDALONE', 1)
conf.load ('ccnx')
conf.check_ccnx (path=conf.options.ccnx_dir)