Browse Source

Server's Video Encoder works now by OpenCV (Stephane's Method)

pull/7/head
Evgeny Gagua 9 months ago
parent
commit
f90941a05c
  1. 8
      Projects/la_serva/build
  2. 7
      Projects/la_serva/la_serva.vpj
  3. 42
      Projects/la_serva/makefile
  4. 2
      lib/App/common/deviceNodeFactory.cpp
  5. 1
      lib/App/common/deviceNodeSensor.h
  6. 40
      lib/App/common/serverDataBinder.h
  7. 7
      lib/App/mojo/mojoRemoteClient.cpp
  8. 2
      lib/App/serva/servaKernelToolKit.cpp
  9. 68
      lib/App/serva/servaMediaEncoder.cpp
  10. 16
      lib/App/serva/servaMediaEncoder.h
  11. 81
      lib/App/serva/servaRemoteClientHandler.cpp
  12. 68
      lib/data/protocol/protocolARGUS_DATA.h

8
Projects/la_serva/build

@ -4,11 +4,11 @@
#make clean -e "CFG=Debug"
#make -e "CFG=Debug" -j$(nproc)
make clean -e "CFG=Debug86"
make -e "CFG=Debug86" -j$(nproc)
#make clean -e "CFG=Debug86"
#make -e "CFG=Debug86" -j$(nproc)
#make clean -e "CFG=Release86"
#make -e "CFG=Release86" -j$(nproc)
make clean -e "CFG=Release86"
make -e "CFG=Release86" -j$(nproc)
#cd Release86
#strip ./mojo
#cd ..

7
Projects/la_serva/la_serva.vpj

@ -254,7 +254,7 @@
SaveOption="SaveCurrent"
RunFromDir="%rw">
<Exec
CmdLine='g++ -c %xup -x c++ %defd -O0 -w -Wpointer-arith %~other -o "%bd%n%oe" %i %f'
CmdLine='g++ -c %xup -x c++ %defd -O0 -g -ggdb -p -pg -w -Wpointer-arith %~other -o "%bd%n%oe" %i %f'
OtherOptions="-std=c++11 -Wno-write-strings -I../../lib/include `pkg-config opencv4 libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswresample libswscale live555 --cflags`"/>
</Target>
<Target
@ -266,7 +266,7 @@
Deletable="0"
SaveOption="SaveCurrent"
RunFromDir="%rw">
<Exec CmdLine='g++ %xup -O0 -w -o "%o" %objs'/>
<Exec CmdLine='g++ %xup -O0 -g -ggdb -p -pg -w -o "%o" %objs'/>
</Target>
<Target
Name="Build"
@ -461,6 +461,7 @@
</List>
<Includes></Includes>
<Libs PreObjects="0">
<Lib File="-lsqlite3"/>
<Lib File="-lpthread"/>
<Lib File="-lmysqlclient"/>
<Lib File="-lssl"/>
@ -489,7 +490,7 @@
<Lib File="-lgroupsock"/>
<Lib File="-lBasicUsageEnvironment"/>
<Lib File="-lUsageEnvironment"/>
<Lib File="-s"/>
<Lib File="-lmodbus"/>
</Libs>
</Config>
<Files>

42
Projects/la_serva/makefile

@ -315,8 +315,8 @@ ALL_OBJ=$(OUTDIR)/basicDualThread.o $(OUTDIR)/basicEngine.o \
`pkg-config --libs openssl opencv4 rdkafka++` -lliveMedia \
-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment -lmodbus
COMPILE=g++ -c -x c++ "-DDEBUG" "-DUSE_SERVER_MYSQL" "-D__STDC_CONSTANT_MACROS" "-D_SERVER_APPLICATION_" "-D_OPENCV_" -O0 -w -Wpointer-arith -std=c++11 -Wno-write-strings -I../../lib/include `pkg-config opencv4 libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswresample libswscale live555 --cflags` -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=g++ -O0 -w -o "$(OUTFILE)" $(ALL_OBJ)
COMPILE=g++ -c -x c++ "-DDEBUG" "-DUSE_SERVER_MYSQL" "-D__STDC_CONSTANT_MACROS" "-D_SERVER_APPLICATION_" "-D_OPENCV_" -O0 -g -ggdb -p -pg -w -Wpointer-arith -std=c++11 -Wno-write-strings -I../../lib/include `pkg-config opencv4 libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswresample libswscale live555 --cflags` -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=g++ -O0 -g -ggdb -p -pg -w -o "$(OUTFILE)" $(ALL_OBJ)
# Pattern rules
$(OUTDIR)/%.o : ../../lib/components/object/%.cpp
@ -381,11 +381,11 @@ ifeq "$(CFG)" "Release86"
OUTDIR=Release86
OUTFILE=$(OUTDIR)/serva
CFG_INC=
CFG_LIB=-lpthread -lmysqlclient -lssl -lcurl -lm -lcrypto -lconfig \
-lz `pkg-config libavcodec libavdevice libavfilter libavformat \
libavutil libpostproc libswresample libswscale --libs` -latomic \
`pkg-config --libs openssl opencv4 rdkafka++` -lliveMedia \
-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment -s
CFG_LIB=-lsqlite3 -lpthread -lmysqlclient -lssl -lcurl -lm -lcrypto \
-lconfig -lz `pkg-config libavcodec libavdevice libavfilter \
libavformat libavutil libpostproc libswresample libswscale --libs` \
-latomic `pkg-config --libs openssl opencv4 rdkafka++` -lliveMedia \
-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment -lmodbus
CFG_OBJ=
COMMON_OBJ=$(OUTDIR)/basicDualThread.o $(OUTDIR)/basicEngine.o \
$(OUTDIR)/basicEvent.o $(OUTDIR)/basicEventHandler.o \
@ -432,11 +432,11 @@ ALL_OBJ=$(OUTDIR)/basicDualThread.o $(OUTDIR)/basicEngine.o \
$(OUTDIR)/serverDataBinder.o $(OUTDIR)/serverMySQL_dataBinder.o \
$(OUTDIR)/serverPort.o $(OUTDIR)/sqlite_class.o \
$(OUTDIR)/Transform.o $(OUTDIR)/transportSocket.o $(OUTDIR)/utm.o \
-lpthread -lmysqlclient -lssl -lcurl -lm -lcrypto -lconfig -lz \
`pkg-config libavcodec libavdevice libavfilter libavformat libavutil \
libpostproc libswresample libswscale --libs` -latomic `pkg-config \
--libs openssl opencv4 rdkafka++` -lliveMedia -lgroupsock \
-lBasicUsageEnvironment -lUsageEnvironment -s
-lsqlite3 -lpthread -lmysqlclient -lssl -lcurl -lm -lcrypto -lconfig \
-lz `pkg-config libavcodec libavdevice libavfilter libavformat \
libavutil libpostproc libswresample libswscale --libs` -latomic \
`pkg-config --libs openssl opencv4 rdkafka++` -lliveMedia \
-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment -lmodbus
COMPILE=g++ -c -x c++ "-DUSE_SERVER_MYSQL" "-D__STDC_CONSTANT_MACROS" "-D_SERVER_APPLICATION_" "-D_OPENCV_" -O3 -w -Wpointer-arith -std=c++11 -Wno-write-strings -I../../lib/include `pkg-config opencv4 libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswresample libswscale live555 --cflags` -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=g++ -O3 -w -o "$(OUTFILE)" $(ALL_OBJ)
@ -529,15 +529,15 @@ $(OUTDIR)/objectFileLoggingService.o: ../../lib/components/object/objectFileLogg
$(OUTDIR)/objectMySQLLoggingService.o: ../../lib/App/serva/objectMySQLLoggingService.cpp ../../lib/App/serva/objectMySQLLoggingService.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h
$(OUTDIR)/protocol.o: ../../lib/data/protocol/protocol.cpp ../../lib/data/protocol/protocol.h
$(OUTDIR)/protocolARGUS_DATA.o: ../../lib/data/protocol/protocolARGUS_DATA.cpp ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaBackend.o: ../../lib/App/serva/servaBackend.cpp ../../lib/App/serva/servaBackend.h ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicSettings.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicMemoryOperation.h ../../lib/components/object/objectFileLoggingService.h ../../lib/App/serva/objectMySQLLoggingService.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaKernel.o: ../../lib/App/serva/servaKernel.cpp ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h ../../lib/App/serva/servaModBusManager.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicEventHandler.h ../../lib/components/base/basicLogCollection.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h
$(OUTDIR)/servaKernelToolKit.o: ../../lib/App/serva/servaKernelToolKit.cpp ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaLifeMonitoring.o: ../../lib/App/serva/servaLifeMonitoring.cpp ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h
$(OUTDIR)/servaMediaEncoder.o: ../../lib/App/serva/servaMediaEncoder.cpp ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaModBusManager.o: ../../lib/App/serva/servaModBusManager.cpp ../../lib/App/serva/servaModBusManager.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicEventHandler.h ../../lib/components/base/basicLogCollection.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaRemoteClient.o: ../../lib/App/serva/servaRemoteClient.cpp ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaRemoteClientHandler.h ../../lib/data/net/netClientHandler.h ../../lib/data/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicThread.h ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaRemoteClientHandler.o: ../../lib/App/serva/servaRemoteClientHandler.cpp ../../lib/App/serva/servaRemoteClientHandler.h ../../lib/data/net/netClientHandler.h ../../lib/data/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicThread.h ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaSessionManager.o: ../../lib/App/serva/servaSessionManager.cpp ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicEventHeap.h
$(OUTDIR)/servaBackend.o: ../../lib/App/serva/servaBackend.cpp ../../lib/App/serva/servaBackend.h ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicSettings.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicMemoryOperation.h ../../lib/components/object/objectFileLoggingService.h ../../lib/App/serva/objectMySQLLoggingService.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicMutex.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaKernel.o: ../../lib/App/serva/servaKernel.cpp ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicMutex.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h ../../lib/App/serva/servaModBusManager.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicEventHandler.h ../../lib/components/base/basicLogCollection.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h
$(OUTDIR)/servaKernelToolKit.o: ../../lib/App/serva/servaKernelToolKit.cpp ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicMutex.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaLifeMonitoring.o: ../../lib/App/serva/servaLifeMonitoring.cpp ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h
$(OUTDIR)/servaMediaEncoder.o: ../../lib/App/serva/servaMediaEncoder.cpp ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicMutex.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaModBusManager.o: ../../lib/App/serva/servaModBusManager.cpp ../../lib/App/serva/servaModBusManager.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicEventHandler.h ../../lib/components/base/basicLogCollection.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicMutex.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaRemoteClient.o: ../../lib/App/serva/servaRemoteClient.cpp ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaRemoteClientHandler.h ../../lib/data/net/netClientHandler.h ../../lib/data/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicThread.h ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicMutex.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicMutex.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaRemoteClientHandler.o: ../../lib/App/serva/servaRemoteClientHandler.cpp ../../lib/App/serva/servaRemoteClientHandler.h ../../lib/data/net/netClientHandler.h ../../lib/data/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicThread.h ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicMutex.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicEventHeap.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/alg/lgs/detector.h ../../lib/alg/lgs/mask.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/serva/servaLifeMonitoring.h ../../lib/components/base/basicValidatable.h ../../lib/App/serva/servaRemoteClient.h ../../lib/data/net/netServer.h ../../lib/App/serva/servaMediaEncoder.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLIBAV.h ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicMutex.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/servaSessionManager.o: ../../lib/App/serva/servaSessionManager.cpp ../../lib/App/serva/servaSessionManager.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicMutex.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/components/base/basicFunctionality.h ../../lib/App/common/dataBinder_structures.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicEventHeap.h
$(OUTDIR)/serverDataBinder.o: ../../lib/App/common/serverDataBinder.cpp ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h
$(OUTDIR)/serverMySQL_dataBinder.o: ../../lib/App/common/serverMySQL_dataBinder.cpp ../../lib/App/common/serverMySQL_dataBinder.h ../../lib/App/common/serverDataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/data/mysql/mysql_class.h ../../lib/components/base/basicSettingsProvider.h ../../lib/alg/generic/md5.h ../../lib/alg/lgs/mask.h
$(OUTDIR)/serverPort.o: ../../lib/data/net/serverPort.cpp ../../lib/data/net/serverPort.h

2
lib/App/common/deviceNodeFactory.cpp

@ -131,7 +131,7 @@ bool deviceNodeFactory::loadNodes( uint32_t SiteID ){
*/
bool deviceNodeFactory::loadNodes(){
if( m_pDBC == NULL ) return false;
DBC_INT_LIST *tList = m_pDBC->listNodes();
DBC_INT_LIST *tList = m_pDBC->listNodes( false );
m_nPendingInitCounter = 0;
if( tList != NULL ) {
for( DBC_INT_LIST::iterator idx = tList->begin(); idx < tList->end(); idx++ ) createNode((*idx));

1
lib/App/common/deviceNodeSensor.h

@ -74,6 +74,7 @@
#define ARGUS_DS_READY 4
#define ARGUS_DS_ALARMED 5
#define ARGUS_DS_BUSY 6
#define ARGUS_DS_DETECTION_ERROR 7

40
lib/App/common/serverDataBinder.h

@ -10,25 +10,29 @@
#define ARGUS_OBJECT_CAMERA 22
#define ARGUS_OBJECT_USER 32
#define ARGUS_CLOUD_STATUS_NA 0
#define ARGUS_CLOUD_STATUS_REG 1
#define ARGUS_CLOUD_STATUS_ONLINE 2
#define ARGUS_CLOUD_STATUS_TRAIN 3
#define ARGUS_CLOUD_STATUS_MAINTENENCE 4
#define ARGUS_CLOUD_STATUS_ALARM 5
#define ARGUS_CLOUD_STATUS_NA 0b00000000000000000000000000000000
#define ARGUS_CLOUD_STATUS_REG 0b00000000000000000000000000000001
#define ARGUS_CLOUD_STATUS_ONLINE 0b00000000000000000000000000000011
#define ARGUS_CLOUD_STATUS_MAINTENENCE 0b00000000000000000000000000000010
#define ARGUS_CLOUD_STATUS_TRAIN 0b00000000000000000000000000000100
#define ARGUS_CLOUD_STATUS_ALARM 0b00000000000000000000000000001000
/*----------- ERRORS -----------------------*/
#define ARGUS_CLOUD_STATUS_E_GENERIC 6
#define ARGUS_CLOUD_STATUS_E_CAM_GENERIC 7
#define ARGUS_CLOUD_STATUS_E_CAM_NC 8
#define ARGUS_CLOUD_STATUS_E_CAM_NPTZ 9
#define ARGUS_CLOUD_STATUS_E_CAM_NIM 10
#define ARGUS_CLOUD_STATUS_E_SEN_GENERIC 11
#define ARGUS_CLOUD_STATUS_E_US_LRF 12
#define ARGUS_CLOUD_STATUS_E_BS_LRF 13
#define ARGUS_CLOUD_STATUS_E_US_NC 14
#define ARGUS_CLOUD_STATUS_E_BS_NC 15
#define ARGUS_CLOUD_STATUS_E_SW 16
#define ARGUS_CLOUD_STATUS_E_NW 17
#define ARGUS_CLOUD_STATUS_E_GENERIC 0b00000000000000100000000000000000
#define ARGUS_CLOUD_STATUS_E_MASK 0b01111111111111100000000000000000
#define ARGUS_CLOUD_STATUS_E_CAM_GENERIC 0b01000000000000000000000000000000
#define ARGUS_CLOUD_STATUS_E_CAM_NC 0b00100000000000000000000000000000
#define ARGUS_CLOUD_STATUS_E_CAM_NPTZ 0b00010000000000000000000000000000
#define ARGUS_CLOUD_STATUS_E_CAM_NIM 0b00001000000000000000000000000000
#define ARGUS_CLOUD_STATUS_E_SEN_GENERIC 0b00000100000000000000000000000000
#define ARGUS_CLOUD_STATUS_E_US_LRF 0b00000010000000000000000000000000
#define ARGUS_CLOUD_STATUS_E_BS_LRF 0b00000001000000000000000000000000
#define ARGUS_CLOUD_STATUS_E_US_NC 0b00000000100000000000000000000000
#define ARGUS_CLOUD_STATUS_E_BS_NC 0b00000000010000000000000000000000
#define ARGUS_CLOUD_STATUS_E_SW 0b00000000001000000000000000000000
#define ARGUS_CLOUD_STATUS_E_CPU 0b00000000000100000000000000000000
#define ARGUS_CLOUD_STATUS_E_MEM 0b00000000000010000000000000000000
#define ARGUS_CLOUD_STATUS_E_DISK 0b00000000000001000000000000000000
#define ARGUS_CLOUD_STATUS_E_TEMPERATURE 0b00000000000000100000000000000000
#define ARGUS_LIFE_STATUS_CLEAN 0
#define ARGUS_LIFE_STATUS_LVL_1 1

7
lib/App/mojo/mojoRemoteClient.cpp

@ -482,7 +482,7 @@ void mojoRemoteClient::enqueueStatMsg(){
cSTATUS->STATUSES.camera = cSTATUS->STATUSES.camera | ((tCAM->getCamStatus() > 0)?(CAMERA_STATUS_OK<<(i*3)):CAMERA_STATUS_NA);
cSTATUS->STATUSES.camera = cSTATUS->STATUSES.camera | ((tCAM->getStreamStatus() > 0)?(CAMERA_STATUS_STREAM_OK<<(i*3)):CAMERA_STATUS_NA);
cSTATUS->STATUSES.camera = cSTATUS->STATUSES.camera | ((tCAM->getPtzStatus() > 0)?(CAMERA_STATUS_PTZ_OK<<(i*3)):CAMERA_STATUS_NA);
if ( i == 1 ) break; // Only Two first cameras may be fitted into a field of Byte (3+3 bits )
if ( i == 0 ) break; // Only first camera
};
//Not Freeing tA[] -> those are pointers to static structs
free( tA );
@ -494,11 +494,6 @@ void mojoRemoteClient::enqueueStatMsg(){
};
// All System Statuses goes here
cSTATUS->STATUSES.system = cSTATUS->STATUSES.system | (( m_pMaster->getTrainPresence())?SYSTEM_STATUS_TRAIN:SYSTEM_STATUS_NA);
#ifdef DEBUG_EXTRA
char tB[128];
sprintf( tB, "Final Status: 0x%04X", cSTATUS->STATUSES );
LOG( tB );
#endif
if ( pushNewTransaction( tCMD ) ) return;
free( tCMD->DATA );
};

2
lib/App/serva/servaKernelToolKit.cpp

@ -74,6 +74,8 @@ bool servaKernel::cleanUpMess(){
tList->clear();
delete( tList );
};
LOG("Close all Staled Sessions");
LOG("Done");
return true;
};

68
lib/App/serva/servaMediaEncoder.cpp

@ -40,6 +40,7 @@ servaMediaEncoder::servaMediaEncoder( uint64_t Ref ):basicThread(){
CSTR servaMediaEncoder::getDstFormat(){ return m_sEncoderSettings.CONTAINER; };
servaMediaEncoder::~servaMediaEncoder(){
#ifndef STEPHANE_OPENCV_ENCODE
if (m_sEncoderVS.m_pCodecCtx) {
avcodec_close( m_sEncoderVS.m_pCodecCtx );
avcodec_free_context( &m_sEncoderVS.m_pCodecCtx );
@ -53,18 +54,24 @@ servaMediaEncoder::~servaMediaEncoder(){
av_free( m_sEncoderVS.m_pFormatCtx );
};
if (m_sEncoderVS.m_pFormatOpts) av_free( m_sEncoderVS.m_pFormatOpts );
#endif //!STEPHANE_OPENCV_ENCODE
LOG("Destructor Exit");
};
#include <sys/stat.h>
bool servaMediaEncoder::create( CSTR src, CSTR dst, uint8_t fps, int width, int height, CSTR custom ){
char Buffer[1024] = {0};
#ifndef STEPHANE_OPENCV_ENCODE
int RetVal;
char Buffer[1024] = {0};
if ( !initLibAV() ) return false;
#endif
strncpy( m_sDecoderVS.m_pFileName, src, MAX_PATH_LEN);
strncpy( m_sEncoderVS.m_pFileName, dst, MAX_PATH_LEN);
struct stat st;
stat( m_sDecoderVS.m_pFileName, &st );
m_nInFileSize = st.st_size;
#ifndef STEPHANE_OPENCV_ENCODE
//LOG("Before Open1");
if( ( RetVal = avformat_open_input( &m_sDecoderVS.m_pFormatCtx, m_sDecoderVS.m_pFileName, NULL, &m_sDecoderVS.m_pFormatOpts) ) != 0 ){
//av_dict_free(&options);
@ -393,14 +400,60 @@ bool servaMediaEncoder::create( CSTR src, CSTR dst, uint8_t fps, int width, int
return false;
};
m_sEncoderVS.m_iVideoStreamID = -1;
#ifdef DEBUG_EXTRA
LOG("Allocation Done");
#endif
#ifdef DEBUG_EXTRA
LOG("Allocation Done");
#endif
#endif //!STEPHANE_OPENCV_ENCODE
m_bStatus = ENCODER_INIT;
return init();
};
void servaMediaEncoder::m_fThreadProc( void ){
#ifdef STEPHANE_OPENCV_ENCODE
uint8_t operc = 0;
#ifdef DEBUG_EXTRA
char tB[1024];
sprintf( tB, "Converting %s to %s", m_sDecoderVS.m_pFileName, m_sEncoderVS.m_pFileName );
LOG( tB );
#endif
cv::VideoCapture cap( m_sDecoderVS.m_pFileName );
if( cap.isOpened() ) {
cv::Mat mat;
cap >> mat;
if( !mat.empty() ){
cap.set( cv::VideoCaptureProperties::CAP_PROP_POS_FRAMES, 0.0 );
cv::VideoWriter out( m_sEncoderVS.m_pFileName, cv::VideoWriter::fourcc('a', 'v', 'c', '1'), 15.0, mat.size() );
size_t number_of_frames = 0;
m_bStatus = THREAD_INIT;
m_bThreadStatus = TH_WORKING;
while( cap.isOpened() && out.isOpened() && m_bThreadStatus < TH_ENDED ){
cap >> mat;
m_bStatus = ENCODER_ENCODING;
if( mat.empty() ){
m_bThreadStatus = TH_ENDED;
} else {
number_of_frames ++;
out.write(mat);
};
uint8_t perc = ( 100 * number_of_frames ) / 900;
if ( operc!= perc ) {
if ( perc > 100 ) perc = 100;
operc = perc;
m_pMaster->updateEncodeStatus(m_nRefID, MEDIA_ENCODE_PROGRESS, perc);
};
};
cap.release();
// Does it look reasonable?  If so, then we can go ahead and delete the original file.
if( number_of_frames > 100 ){
unlink( m_sDecoderVS.m_pFileName );
};
};
};
#else //!STEPHANE_OPENCV_ENCODE
AVPacket read_packet;
AVPacket encoded_packet;
uint64_t current_frame_num = 0;
@ -438,7 +491,7 @@ void servaMediaEncoder::m_fThreadProc( void ){
uint8_t perc = ( 100 * m_nReadSize ) / m_nInFileSize;
if ( operc!= perc ) {
operc == perc;
operc = perc;
m_pMaster->updateEncodeStatus(m_nRefID, MEDIA_ENCODE_PROGRESS, perc);
};
@ -476,9 +529,12 @@ void servaMediaEncoder::m_fThreadProc( void ){
av_frame_free( &decoded_frame );
av_write_trailer( m_sEncoderVS.m_pFormatCtx );
avio_close( m_sEncoderVS.m_pFormatCtx->pb );
unlink( m_sDecoderVS.m_pFileName );
#endif //!STEPHANE_OPENCV_ENCODE
m_pMaster->updateEncodeStatus( m_nRefID, MEDIA_ENCODE_PROGRESS, 100 );
m_pMaster->updateEncodeStatus( m_nRefID, MEDIA_READY, 100 );
unlink( m_sDecoderVS.m_pFileName );
#ifdef DEBUG
LOG("Encoding Done!");
#endif

16
lib/App/serva/servaMediaEncoder.h

@ -1,6 +1,8 @@
#ifndef __LA_SERVA_MEDIA_ENCODER_HEADER__
#define __LA_SERVA_MEDIA_ENCODER_HEADER__
#define STEPHANE_OPENCV_ENCODE
#include "../common/serverMySQL_dataBinder.h"
#include "../../components/base/basicThread.h"
#include "../../components/base/basicMutex.h"
@ -8,6 +10,16 @@
#include "../../components/base/basicLogCollection.h"
#include <vector>
#ifdef STEPHANE_OPENCV_ENCODE
typedef struct S_LIBAV_VS{
char m_pFileName[MAX_PATH_LEN];
MediaStateStatus m_bStatus;
} LIBAV_VS;
#else //!STEPHANE_OPENCV_ENCODE
typedef struct S_LIBAV_VS{
int m_iVideoStreamID;
AVStream *m_pVideoStr;
@ -20,6 +32,8 @@ typedef struct S_LIBAV_VS{
MediaStateStatus m_bStatus;
} LIBAV_VS;
#endif //!STEPHANE_OPENCV_ENCODE
class servaKernel;
class servaMediaEncoder: public basicThread{
@ -32,9 +46,11 @@ class servaMediaEncoder: public basicThread{
uint64_t m_nRefID;
servaKernel * m_pMaster;
basicMutex m_mFlagProtector;
#ifndef STEPHANE_OPENCV_ENCODE
bool m_bFrameIsEncoded;
//basicMutex m_mFrameProtector;
AVFrame * m_pFrame;
#endif //!STEPHANE_OPENCV_ENCODE
LIBAV_VS m_sEncoderVS;
LIBAV_VS m_sDecoderVS;
uint8_t m_bStatus;

81
lib/App/serva/servaRemoteClientHandler.cpp

@ -132,18 +132,27 @@ bool servaRPCHadnler::packetHandler( protocolPackage *Package ){
m_nInbondSerial = ( m_nInbondSerial << 8 ) | Package->m_pData[2];
m_nInbondSerial = ( m_nInbondSerial << 8 ) | Package->m_pData[3];
m_nInbondSerial = ( m_nInbondSerial << 8 ) | Package->m_pData[4];
#ifdef DEBUG_EXTRA
uint32_t tSize = Package->m_pData[5];
tSize = ( tSize << 8 ) | Package->m_pData[6];
tSize = ( tSize << 8 ) | Package->m_pData[7];
tSize = ( tSize << 8 ) | Package->m_pData[8];
#ifdef DEBUG
char bB[129];
sprintf( bB, "Code: %02X", Package->m_nCode );
sprintf(bB, "Code: %02X MsgSize: %d PackSize: %d", Package->m_nCode, tSize, Package->m_nSize );
LOG( bB );
#endif
switch( Package->m_nCode ){
case ARGUS_DATA_MSG_REGISTER:{
ARGUS_DATA_MOJO_REGISTRATION *tM = (ARGUS_DATA_MOJO_REGISTRATION *) (Package->m_pData+ARGUS_HEADER_SIZE+1);
strncpy( m_cRemoteIdentity, tM->identity, 32);
strncpy( m_cRemoteIP, tM->peer, 22);
if ( Package->m_nSize == ARGUS_RPC_REG_V1_SIZE ) {
LOG("Old Type Registration!");
strncpy( m_cRemoteIdentity, (char*)(Package->m_pData + ARGUS_HEADER_SIZE + 1), 32 );
} else {
ARGUS_DATA_MOJO_REGISTRATION *tM = (ARGUS_DATA_MOJO_REGISTRATION *)(Package->m_pData + ARGUS_HEADER_SIZE + 1);
strncpy( m_cRemoteIdentity, tM->identity, 32);
strncpy( m_cRemoteIP, tM->peer, 22);
};
m_cRemoteIdentity[32] = (char)0;
#ifdef DEBUG
#ifdef DEBUG_EXTRA
char tB[128];
sprintf(tB,"Registration request from[%s][%s]", m_cRemoteIP, m_cRemoteIdentity );
LOG(tB);
@ -201,6 +210,10 @@ bool servaRPCHadnler::packetHandler( protocolPackage *Package ){
LOG( tB );
sprintf( tB, "Camera Stream ID: %d", tINFO->CAM_STREAM_ID );
LOG( tB );
//for ( uint8_t i = 0; i < Package->m_nSize; i++ ) {
// sprintf( tB, "Data: 0x%02X", Package->m_pData[i] );
// LOG( tB );
//};
#endif
m_pDBC->updateModuleData( m_dMojoDBID, tINFO->UPPER_ID, tINFO->BOTTOM_ID, tINFO->CAM_ID, tINFO->CAM_STREAM_ID, tINFO->TLS_VERSION, tINFO->LLS_VERSION );
peer_send_reg_status( ARGUS_DATA_MSG_INFO );
@ -210,41 +223,27 @@ bool servaRPCHadnler::packetHandler( protocolPackage *Package ){
case ARGUS_DATA_MSG_STAT:{
ARGUS_DATA_MOJO_STATUS *tSTATUS = (ARGUS_DATA_MOJO_STATUS *) (Package->m_pData+ARGUS_HEADER_SIZE+1);
m_mCloudProtector.lock();
if( ((uint32_t)tSTATUS->STATUSES) == 0 ) {
//LOG("Generic Error [0]");
m_nCloudStatus = ARGUS_CLOUD_STATUS_E_GENERIC;
} else {
if ( tSTATUS->STATUSES.system ) {
//LOG("Status Ok");
m_nCloudStatus = ARGUS_CLOUD_STATUS_ONLINE;
} else {
if ( tSTATUS->STATUSES.camera ) {
//LOG("Cam Err");
switch( tSTATUS->STATUSES.camera ){
case 1: m_nCloudStatus = ARGUS_CLOUD_STATUS_E_CAM_NC; break;
case 2: m_nCloudStatus = ARGUS_CLOUD_STATUS_E_CAM_NIM; break;
case 3: m_nCloudStatus = ARGUS_CLOUD_STATUS_E_CAM_NPTZ; break;
default: m_nCloudStatus = ARGUS_CLOUD_STATUS_E_CAM_GENERIC;
};
};
if ( tSTATUS->STATUSES.b_sensor ) {
//LOG("BS Err");
switch( tSTATUS->STATUSES.b_sensor ){
case 1: m_nCloudStatus = ARGUS_CLOUD_STATUS_E_BS_NC; break;
case 2: m_nCloudStatus = ARGUS_CLOUD_STATUS_E_BS_LRF; break;
default: m_nCloudStatus = ARGUS_CLOUD_STATUS_E_SEN_GENERIC;
};
};
if( tSTATUS->STATUSES.u_sensor ){
//LOG("US Err");
switch( tSTATUS->STATUSES.u_sensor ){
case 1: m_nCloudStatus = ARGUS_CLOUD_STATUS_E_US_NC; break;
case 2: m_nCloudStatus = ARGUS_CLOUD_STATUS_E_US_LRF; break;
default: m_nCloudStatus = ARGUS_CLOUD_STATUS_E_SEN_GENERIC;
};
};
};
};
m_nCloudStatus = ( tSTATUS->STATUSES.system == SYSTEM_STATUS_NA )?ARGUS_CLOUD_STATUS_NA:0;
m_nCloudStatus |= (( tSTATUS->STATUSES.system & SYSTEM_STATUS_TRAIN ) == 0 )?ARGUS_CLOUD_STATUS_TRAIN:0;
m_nCloudStatus |= ( tSTATUS->CPU_LOAD > 95 )?ARGUS_CLOUD_STATUS_E_CPU:0;
m_nCloudStatus |= ( tSTATUS->CPU_TEMP > 95 )?ARGUS_CLOUD_STATUS_E_TEMPERATURE:0;
m_nCloudStatus |= ( tSTATUS->MEMO_UTI > 95 )?ARGUS_CLOUD_STATUS_E_MEM:0;
m_nCloudStatus |= ( tSTATUS->DISK_UTI > 95 )?ARGUS_CLOUD_STATUS_E_DISK:0;
m_nCloudStatus |= ( tSTATUS->STATUSES.camera == CAMERA_STATUS_NA )?ARGUS_CLOUD_STATUS_E_CAM_GENERIC:0;
m_nCloudStatus |= (( tSTATUS->STATUSES.camera & CAMERA_STATUS_OK ) == 0 )?ARGUS_CLOUD_STATUS_E_CAM_NC:0;
m_nCloudStatus |= (( tSTATUS->STATUSES.camera & CAMERA_STATUS_STREAM_OK ) == 0 )?ARGUS_CLOUD_STATUS_E_CAM_NIM:0;
m_nCloudStatus |= (( tSTATUS->STATUSES.camera & CAMERA_STATUS_PTZ_OK ) == 0 )?ARGUS_CLOUD_STATUS_E_CAM_NPTZ:0;
m_nCloudStatus |= ( tSTATUS->STATUSES.b_sensor == SENOR_STATUS_NA )?ARGUS_CLOUD_STATUS_E_SEN_GENERIC:0;
m_nCloudStatus |= ( tSTATUS->STATUSES.b_sensor == SENOR_STATUS_CONNECTING )?ARGUS_CLOUD_STATUS_E_BS_NC:0;
m_nCloudStatus |= ( tSTATUS->STATUSES.b_sensor == SENOR_STATUS_DETECTION_ERR )?ARGUS_CLOUD_STATUS_E_BS_LRF:0;
m_nCloudStatus |= ( tSTATUS->STATUSES.u_sensor == SENOR_STATUS_NA )?ARGUS_CLOUD_STATUS_E_SEN_GENERIC:0;
m_nCloudStatus |= ( tSTATUS->STATUSES.u_sensor == SENOR_STATUS_CONNECTING )?ARGUS_CLOUD_STATUS_E_US_NC:0;
m_nCloudStatus |= ( tSTATUS->STATUSES.u_sensor == SENOR_STATUS_DETECTION_ERR )?ARGUS_CLOUD_STATUS_E_US_LRF:0;
m_mCloudProtector.unlock();
peer_send_reg_status( ARGUS_DATA_MSG_STAT );
break;

68
lib/data/protocol/protocolARGUS_DATA.h

@ -5,6 +5,8 @@
#include "../../App/common/dataBinder_structures.h"
#include "../../components/base/basicEvent.h"
#define PACKED_PROTO_STRUCTS
#define ARGUS_START_SERVER_FLAG 0x55
#define ARGUS_START_CLIENT_FLAG 0x88
#define ARGUS_HEADER_SIZE 9
@ -40,6 +42,8 @@
#define ARGUS_RPC_DEFAULT_MEDIA_CHUNK 65536 //2048 64K
#define ARGUS_RPC_REG_V1_SIZE 44
typedef enum E_ARGUS_RPC_TAGS{
ARGUS_DATA_MSG_EXEC_DRAW = 0x01,
ARGUS_DATA_MSG_EXEC_STUDY = 0x02,
@ -97,7 +101,15 @@ typedef enum E_ARGUS_RPC_STAGES{
}ARGUS_RPC_STAGES;
typedef enum E_ARGUS_SENSOR_STATUS:uint8_t{
SENOR_STATUS_NA = 0x00
SENOR_STATUS_NA = 0x00,
//ARGUS_DS_DISCONNECTED 0
SENOR_STATUS_CONNECTING = 0x01,
SENOR_STATUS_GET_INFO = 0x02,
SENOR_STATUS_STUDY = 0x03,
SENOR_STATUS_READY = 0x04,
SENOR_STATUS_ALARMED = 0x05,
SENOR_STATUS_BUSY = 0x06,
SENOR_STATUS_DETECTION_ERR = 0x07 //LFR VIS ANGL
}ARGUS_SENSOR_STATUS;
typedef enum E_ARGUS_CAMERA_STATUS:uint8_t{
@ -116,12 +128,20 @@ typedef struct S_ARGUS_DATA_HEADER{
uint8_t START_FLAG;
uint32_t SERIAL_ID; // Package Serial ID -> Provides ID to ACK
uint32_t SIZE;
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_HEADER;
#else
} ARGUS_DATA_HEADER;
#endif
typedef struct S_ARGUS_DATA_MOJO_REGISTRATION{
char peer[23];
char identity[33];
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_MOJO_REGISTRATION;
#else
} ARGUS_DATA_MOJO_REGISTRATION;
#endif
typedef struct S_ARGUS_DATA_MOJO_INFO{
uint8_t MOJO_WORK_MODE;
@ -134,14 +154,22 @@ typedef struct S_ARGUS_DATA_MOJO_INFO{
uint32_t BOTTOM_ID;
uint32_t CAM_ID;
uint32_t CAM_STREAM_ID;
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_MOJO_INFO;
#else
} ARGUS_DATA_MOJO_INFO;
#endif
typedef struct S_ARGUS_DATA_MOJO_INTERNAL{
uint8_t u_sensor;
uint8_t b_sensor;
uint8_t camera;
uint8_t system;
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_MOJO_INTERNAL;
#else
} ARGUS_DATA_MOJO_INTERNAL;
#endif
typedef struct S_ARGUS_DATA_MOJO_STATUS{
uint8_t MOJO_WORK_MODE;
@ -150,7 +178,11 @@ typedef struct S_ARGUS_DATA_MOJO_STATUS{
uint8_t DISK_UTI;
uint8_t MEMO_UTI;
ARGUS_DATA_MOJO_INTERNAL STATUSES;
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_MOJO_STATUS;
#else
} ARGUS_DATA_MOJO_STATUS;
#endif
typedef struct S_ARGUS_DATA_EVENT{
uint64_t MODULE_ID;
@ -164,22 +196,38 @@ typedef struct S_ARGUS_DATA_EVENT{
uint32_t ELEVATION;
uint64_t REF_ID;
char UUID[64];
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_EVENT;
#else
} ARGUS_DATA_EVENT;
#endif
typedef struct S_ARGUS_DATA_TIME_SYNC_REQ{
uint64_t STS;
uint64_t STS;
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_TIME_SYNC_REQ;
#else
} ARGUS_DATA_TIME_SYNC_REQ;
#endif
typedef struct S_ARGUS_DATA_TIME_SYNC_ACK{
uint64_t STS;
uint64_t ATS;
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_TIME_SYNC_ACK;
#else
} ARGUS_DATA_TIME_SYNC_ACK;
#endif
typedef struct S_ARGUS_PUSH_RBUS_CMD{
uint32_t DST;
uint8_t CMD;
char PARAM[256];
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_PUSH_RBUS_CMD;
#else
} ARGUS_PUSH_RBUS_CMD;
#endif
typedef struct S_ARGUS_DATA_VIDEO_INFO{
//char UUID[65];
@ -194,7 +242,11 @@ typedef struct S_ARGUS_DATA_VIDEO_INFO{
char FMT[6];
//uint32_t EVTCNT;
uint32_t DATA_SIZE;
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_VIDEO_INFO;
#else
} ARGUS_DATA_VIDEO_INFO;
#endif
typedef struct S_ARGUS_DATA_EVT_BINDING{
uint64_t EDBID; // Event ID
@ -202,19 +254,31 @@ typedef struct S_ARGUS_DATA_EVT_BINDING{
uint32_t FRM; // Frame - in case pic = 0
uint32_t DTS; // seconds
uint16_t DMS; // milliseconds
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_EVT_BINDING;
#else
} ARGUS_DATA_EVT_BINDING;
#endif
typedef struct S_ARGUS_DATA_VIDEO_CHUNK{
uint64_t MDBID; // Media ID
uint32_t CHUNK_ID;
uint32_t CHUNK_SIZE;
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_VIDEO_CHUNK;
#else
} ARGUS_DATA_VIDEO_CHUNK;
#endif
typedef struct S_ARGUS_DATA_RPC{
uint32_t NODE_ID;
uint8_t CMD;
char DATA[64];
#ifdef PACKED_PROTO_STRUCTS
} __attribute__((packed)) ARGUS_DATA_RPC;
#else
} ARGUS_DATA_RPC;
#endif
size_t argus_rpc_finishupPackage( uint8_t *data, uint32_t serial, uint32_t size );

Loading…
Cancel
Save