From d2e1391ef3c5a65a9bf8b47f570eca536d112628 Mon Sep 17 00:00:00 2001 From: bebopagogo Date: Fri, 27 Dec 2019 11:34:11 -0500 Subject: [PATCH] initial addition of normCast example --- .gitignore | 14 +++++++++++++- makefiles/Makefile.common | 11 ++++++++++- makefiles/Makefile.macosx | 2 +- src/common/normApp.cpp | 4 ++-- wscript | 1 + 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 3752c6f..efd9eab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,27 @@ -# protolib +# protolib source tree protolib/ # build executables build/ lib/ +bin/ makefiles/norm makefiles/normMsgr makefiles/normStreamer +makefiles/normCast +makefiles/normClient +makefiles/normServer makefiles/npc makefiles/raft +# build object files +*.o +*.a + +# waf cruft +.waf* +.lock-waf* + # OS generated files # .DS_Store .DS_Store? diff --git a/makefiles/Makefile.common b/makefiles/Makefile.common index 704ffb9..aa5ee09 100644 --- a/makefiles/Makefile.common +++ b/makefiles/Makefile.common @@ -178,7 +178,7 @@ normMsgr: $(MSGR_OBJ) libnorm.a $(LIBPROTO) mkdir -p ../bin cp $@ ../bin/$@ -# (normStreamer) message sender/receiver +# (normStreamer) stream sender/receiver STREAMER_SRC = $(EXAMPLE)/normStreamer.cpp STREAMER_OBJ = $(STREAMER_SRC:.cpp=.o) @@ -186,6 +186,15 @@ normStreamer: $(STREAMER_OBJ) libnorm.a $(LIBPROTO) $(CC) $(CFLAGS) -o $@ $(STREAMER_OBJ) $(LDFLAGS) libnorm.a $(LIBPROTO) $(LIBS) mkdir -p ../bin cp $@ ../bin/$@ + +# (nocmCast) file sender/receiver +CAST_SRC = $(EXAMPLE)/normCast.cpp +CAST_OBJ = $(CAST_SRC:.cpp=.o) + +normCast: $(CAST_OBJ) libnorm.a $(LIBPROTO) + $(CC) $(CFLAGS) -o $@ $(CAST_OBJ) $(LDFLAGS) libnorm.a $(LIBPROTO) $(LIBS) + mkdir -p ../bin + cp $@ ../bin/$@ # (pcap2norm) - parses pcap (e.g. tcpdump) file and prints NORM trace PCAP_SRC = $(COMMON)/pcap2norm.cpp diff --git a/makefiles/Makefile.macosx b/makefiles/Makefile.macosx index b0c35b5..bb6068c 100644 --- a/makefiles/Makefile.macosx +++ b/makefiles/Makefile.macosx @@ -45,7 +45,7 @@ SYSTEM_SRC = ../protolib/src/unix/bpfCap.cpp SYSTEM = macosx CC = g++ -SYSTEM_CFLAGS = -Wall -Wcast-align -fPIC -arch x86_64 -arch i386 +SYSTEM_CFLAGS = -Wall -Wcast-align -fPIC -arch x86_64 SYSTEM_SOFLAGS = -dynamiclib SYSTEM_SOEXT = dylib RANLIB = ranlib diff --git a/src/common/normApp.cpp b/src/common/normApp.cpp index 98f9bd3..12333f0 100644 --- a/src/common/normApp.cpp +++ b/src/common/normApp.cpp @@ -45,7 +45,7 @@ class NormApp : public NormController, public ProtoApp private: // we use this class to cache tx file paths // and their last tx object id to support the - // "requeue" option + // "requeue" option class FileCacheItem : public ProtoTree::Item { public: @@ -1983,7 +1983,7 @@ void NormApp::Notify(NormController::Event event, PLOG(PL_INFO, "%02d:%02d:%02d.%06u completed rx object>%hu ", (int)timePtr->tm_hour, (int)timePtr->tm_min, (int)timePtr->tm_sec, (unsigned int)currentTime.tv_usec, (UINT16)object->GetId()); - TRACE("sender>%lu\n", sender->GetId()); + //TRACE("sender>%lu\n", sender->GetId()); } switch(object->GetType()) { diff --git a/wscript b/wscript index dd405f0..6d8f758 100644 --- a/wscript +++ b/wscript @@ -195,6 +195,7 @@ def build(ctx): 'normStreamSend', 'normMsgr', 'normStreamer', + 'normCast', 'normClient', 'normServer', #'wintest' # Windows only (can uncomment on Windows)