initial addition of normCast example

pull/9/head
bebopagogo 2019-12-27 11:34:11 -05:00
parent e566d86b02
commit d2e1391ef3
5 changed files with 27 additions and 5 deletions

14
.gitignore vendored
View File

@ -1,15 +1,27 @@
# protolib # protolib source tree
protolib/ protolib/
# build executables # build executables
build/ build/
lib/ lib/
bin/
makefiles/norm makefiles/norm
makefiles/normMsgr makefiles/normMsgr
makefiles/normStreamer makefiles/normStreamer
makefiles/normCast
makefiles/normClient
makefiles/normServer
makefiles/npc makefiles/npc
makefiles/raft makefiles/raft
# build object files
*.o
*.a
# waf cruft
.waf*
.lock-waf*
# OS generated files # # OS generated files #
.DS_Store .DS_Store
.DS_Store? .DS_Store?

View File

@ -178,7 +178,7 @@ normMsgr: $(MSGR_OBJ) libnorm.a $(LIBPROTO)
mkdir -p ../bin mkdir -p ../bin
cp $@ ../bin/$@ cp $@ ../bin/$@
# (normStreamer) message sender/receiver # (normStreamer) stream sender/receiver
STREAMER_SRC = $(EXAMPLE)/normStreamer.cpp STREAMER_SRC = $(EXAMPLE)/normStreamer.cpp
STREAMER_OBJ = $(STREAMER_SRC:.cpp=.o) 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) $(CC) $(CFLAGS) -o $@ $(STREAMER_OBJ) $(LDFLAGS) libnorm.a $(LIBPROTO) $(LIBS)
mkdir -p ../bin mkdir -p ../bin
cp $@ ../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 # (pcap2norm) - parses pcap (e.g. tcpdump) file and prints NORM trace
PCAP_SRC = $(COMMON)/pcap2norm.cpp PCAP_SRC = $(COMMON)/pcap2norm.cpp

View File

@ -45,7 +45,7 @@ SYSTEM_SRC = ../protolib/src/unix/bpfCap.cpp
SYSTEM = macosx SYSTEM = macosx
CC = g++ 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_SOFLAGS = -dynamiclib
SYSTEM_SOEXT = dylib SYSTEM_SOEXT = dylib
RANLIB = ranlib RANLIB = ranlib

View File

@ -45,7 +45,7 @@ class NormApp : public NormController, public ProtoApp
private: private:
// we use this class to cache tx file paths // we use this class to cache tx file paths
// and their last tx object id to support the // and their last tx object id to support the
// "requeue" option // "requeue" option
class FileCacheItem : public ProtoTree::Item class FileCacheItem : public ProtoTree::Item
{ {
public: public:
@ -1983,7 +1983,7 @@ void NormApp::Notify(NormController::Event event,
PLOG(PL_INFO, "%02d:%02d:%02d.%06u completed rx object>%hu ", 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, (int)timePtr->tm_hour, (int)timePtr->tm_min, (int)timePtr->tm_sec, (unsigned int)currentTime.tv_usec,
(UINT16)object->GetId()); (UINT16)object->GetId());
TRACE("sender>%lu\n", sender->GetId()); //TRACE("sender>%lu\n", sender->GetId());
} }
switch(object->GetType()) switch(object->GetType())
{ {

View File

@ -195,6 +195,7 @@ def build(ctx):
'normStreamSend', 'normStreamSend',
'normMsgr', 'normMsgr',
'normStreamer', 'normStreamer',
'normCast',
'normClient', 'normClient',
'normServer', 'normServer',
#'wintest' # Windows only (can uncomment on Windows) #'wintest' # Windows only (can uncomment on Windows)