diff --git a/Projects/la_mojo/la_mojo.vpj b/Projects/la_mojo/la_mojo.vpj index 7f22bfa2..3e5d5ce6 100644 --- a/Projects/la_mojo/la_mojo.vpj +++ b/Projects/la_mojo/la_mojo.vpj @@ -562,6 +562,7 @@ + diff --git a/Projects/la_mojo/makefile b/Projects/la_mojo/makefile index 86b570db..8762d968 100644 --- a/Projects/la_mojo/makefile +++ b/Projects/la_mojo/makefile @@ -56,7 +56,8 @@ COMMON_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \ $(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \ $(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \ $(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \ - $(OUTDIR)/kernelModuleOnvifObserver.o $(OUTDIR)/kernelModuleSSDP.o \ + $(OUTDIR)/kernelModuleOnvifObserver.o \ + $(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \ $(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \ $(OUTDIR)/libzip.o $(OUTDIR)/mask.o $(OUTDIR)/md5.o \ $(OUTDIR)/mojoBackend.o $(OUTDIR)/mojoKernel.o \ @@ -103,7 +104,8 @@ ALL_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \ $(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \ $(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \ $(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \ - $(OUTDIR)/kernelModuleOnvifObserver.o $(OUTDIR)/kernelModuleSSDP.o \ + $(OUTDIR)/kernelModuleOnvifObserver.o \ + $(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \ $(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \ $(OUTDIR)/libzip.o $(OUTDIR)/mask.o $(OUTDIR)/md5.o \ $(OUTDIR)/mojoBackend.o $(OUTDIR)/mojoKernel.o \ @@ -241,7 +243,8 @@ COMMON_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \ $(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \ $(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \ $(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \ - $(OUTDIR)/kernelModuleOnvifObserver.o $(OUTDIR)/kernelModuleSSDP.o \ + $(OUTDIR)/kernelModuleOnvifObserver.o \ + $(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \ $(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \ $(OUTDIR)/libzip.o $(OUTDIR)/mask.o $(OUTDIR)/md5.o \ $(OUTDIR)/mojoBackend.o $(OUTDIR)/mojoKernel.o \ @@ -288,7 +291,8 @@ ALL_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \ $(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \ $(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \ $(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \ - $(OUTDIR)/kernelModuleOnvifObserver.o $(OUTDIR)/kernelModuleSSDP.o \ + $(OUTDIR)/kernelModuleOnvifObserver.o \ + $(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \ $(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \ $(OUTDIR)/libzip.o $(OUTDIR)/mask.o $(OUTDIR)/md5.o \ $(OUTDIR)/mojoBackend.o $(OUTDIR)/mojoKernel.o \ @@ -426,7 +430,8 @@ COMMON_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \ $(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \ $(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \ $(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \ - $(OUTDIR)/kernelModuleOnvifObserver.o $(OUTDIR)/kernelModuleSSDP.o \ + $(OUTDIR)/kernelModuleOnvifObserver.o \ + $(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \ $(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \ $(OUTDIR)/libzip.o $(OUTDIR)/mask.o $(OUTDIR)/md5.o \ $(OUTDIR)/mojoBackend.o $(OUTDIR)/mojoKernel.o \ @@ -473,7 +478,8 @@ ALL_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \ $(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \ $(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \ $(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \ - $(OUTDIR)/kernelModuleOnvifObserver.o $(OUTDIR)/kernelModuleSSDP.o \ + $(OUTDIR)/kernelModuleOnvifObserver.o \ + $(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \ $(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \ $(OUTDIR)/libzip.o $(OUTDIR)/mask.o $(OUTDIR)/md5.o \ $(OUTDIR)/mojoBackend.o $(OUTDIR)/mojoKernel.o \ @@ -616,7 +622,8 @@ COMMON_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \ $(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \ $(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \ $(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \ - $(OUTDIR)/kernelModuleOnvifObserver.o $(OUTDIR)/kernelModuleSSDP.o \ + $(OUTDIR)/kernelModuleOnvifObserver.o \ + $(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \ $(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \ $(OUTDIR)/libzip.o $(OUTDIR)/mask.o $(OUTDIR)/md5.o \ $(OUTDIR)/mojoBackend.o $(OUTDIR)/mojoKernel.o \ @@ -663,7 +670,8 @@ ALL_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \ $(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \ $(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \ $(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \ - $(OUTDIR)/kernelModuleOnvifObserver.o $(OUTDIR)/kernelModuleSSDP.o \ + $(OUTDIR)/kernelModuleOnvifObserver.o \ + $(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \ $(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \ $(OUTDIR)/libzip.o $(OUTDIR)/mask.o $(OUTDIR)/md5.o \ $(OUTDIR)/mojoBackend.o $(OUTDIR)/mojoKernel.o \ @@ -794,10 +802,10 @@ $(OUTDIR)/detector.o: ../../lib/alg/lgs/detector.cpp ../../lib/alg/lgs/detector. $(OUTDIR)/deviceNode.o: ../../lib/App/common/deviceNode.cpp ../../lib/App/common/deviceNode.h ../../lib/App/common/MySQL_dataBinder.h ../../lib/App/common/SQLite_dataBinder.h $(OUTDIR)/deviceNode2D.o: ../../lib/App/common/deviceNode2D.cpp ../../lib/App/common/deviceNode2D.h ../../lib/App/common/hardwareResourceSerialProvider.h ../../lib/App/common/kernelPrototype.h ../../lib/App/common/hardwareManager.h $(OUTDIR)/deviceNode3D.o: ../../lib/App/common/deviceNode3D.cpp ../../lib/App/common/deviceNode3D.h -$(OUTDIR)/deviceNodeCamera.o: ../../lib/App/common/deviceNodeCamera.cpp ../../lib/App/common/deviceNodeCamera.h ../../lib/components/base/basicCameraInfo.h ../../lib/components/object/objectSystemAnchor.h ../../lib/hardware/uart/serialPort.h ../../lib/hardware/uart/serialSOL.h ../../lib/data/protocol/protocolPTZ_VISCA.h ../../lib/data/protocol/protocolPTZ_ONVIF.h ../../lib/data/protocol/protocolPTZ_PELCO.h ../../lib/App/common/hardwareManager.h ../../lib/App/common/hardwareResourceSerialProvider.h +$(OUTDIR)/deviceNodeCamera.o: ../../lib/App/common/deviceNodeCamera.cpp ../../lib/App/common/deviceNodeCamera.h ../../lib/components/base/basicCameraInfo.h ../../lib/components/object/objectSystemAnchor.h ../../lib/hardware/uart/serialPort.h ../../lib/hardware/uart/serialSOL.h ../../lib/data/protocol/protocolPTZ_VISCA.h ../../lib/data/protocol/protocolPTZ_ONVIF.h ../../lib/data/protocol/protocolPTZ_PELCO.h ../../lib/App/common/hardwareManager.h ../../lib/App/common/hardwareResourceSerialProvider.h ../../lib/App/common/kernelModuleEmbedVideo.h ../../lib/App/mojo/mojoKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicEventHeap.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/detector.h ../../lib/components/base/basicObject.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicTypes.h ../../lib/hardware/soc/general/3DLRF.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/gui/gui.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h $(OUTDIR)/deviceNodeEthernet2Serial.o: ../../lib/App/common/deviceNodeEthernet2Serial.cpp ../../lib/App/common/deviceNodeEthernet2Serial.h ../../lib/App/common/hardwareManager.h ../../lib/data/protocol/protocol.h $(OUTDIR)/deviceNodeFactory.o: ../../lib/App/common/deviceNodeFactory.cpp ../../lib/App/common/deviceNodeFactory.h ../../lib/App/common/MySQL_dataBinder.h ../../lib/App/common/SQLite_dataBinder.h ../../lib/App/common/deviceNode3D.h ../../lib/App/common/deviceNode2D.h ../../lib/App/common/deviceNodePTZCamControl.h ../../lib/App/common/deviceNodeStaticCamControl.h ../../lib/App/common/deviceNodeEthernet2Serial.h -$(OUTDIR)/deviceNodePTZCamControl.o: ../../lib/App/common/deviceNodePTZCamControl.cpp ../../lib/App/common/deviceNodePTZCamControl.h ../../lib/App/mojo/mojoKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicEventHeap.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/detector.h ../../lib/components/base/basicObject.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicTypes.h ../../lib/hardware/soc/general/3DLRF.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/gui/gui.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h +$(OUTDIR)/deviceNodePTZCamControl.o: ../../lib/App/common/deviceNodePTZCamControl.cpp ../../lib/App/common/deviceNodePTZCamControl.h ../../lib/App/mojo/mojoKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicEventHeap.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/detector.h ../../lib/components/base/basicObject.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicTypes.h ../../lib/hardware/soc/general/3DLRF.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/gui/gui.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h $(OUTDIR)/deviceNodeSensor.o: ../../lib/App/common/deviceNodeSensor.cpp ../../lib/App/common/deviceNodeSensor.h ../../lib/components/object/objectSystemAnchor.h $(OUTDIR)/deviceNodeStaticCamControl.o: ../../lib/App/common/deviceNodeStaticCamControl.cpp ../../lib/App/common/deviceNodeStaticCamControl.h $(OUTDIR)/fs_helper.o: ../../lib/data/rfs/fs_helper.cpp ../../lib/data/rfs/fs_helper.h @@ -823,14 +831,15 @@ $(OUTDIR)/kernelModuleFlyHunter.o: ../../lib/App/common/kernelModuleFlyHunter.cp $(OUTDIR)/kernelModuleKafka.o: ../../lib/App/common/kernelModuleKafka.cpp ../../lib/App/common/kernelModuleKafka.h $(OUTDIR)/kernelModuleModemManager.o: ../../lib/App/common/kernelModuleModemManager.cpp ../../lib/App/common/kernelModuleModemManager.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h $(OUTDIR)/kernelModuleOnvifObserver.o: ../../lib/App/common/kernelModuleOnvifObserver.cpp ../../lib/App/common/kernelModuleOnvifObserver.h ../../lib/App/common/hardwareManager.h ../../lib/App/common/hardwareResourceNetworkProvider.h +$(OUTDIR)/kernelModuleReportBackupper.o: ../../lib/App/common/kernelModuleReportBackupper.cpp ../../lib/App/common/kernelModuleReportBackupper.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h $(OUTDIR)/kernelModuleSSDP.o: ../../lib/App/common/kernelModuleSSDP.cpp ../../lib/App/common/kernelModuleSSDP.h $(OUTDIR)/kernelModuleUSBRelay.o: ../../lib/App/common/kernelModuleUSBRelay.cpp ../../lib/App/common/kernelModuleUSBRelay.h $(OUTDIR)/kernelPrototype.o: ../../lib/App/common/kernelPrototype.cpp ../../lib/App/common/kernelPrototype.h ../../lib/App/common/MySQL_dataBinder.h ../../lib/App/common/SQLite_dataBinder.h $(OUTDIR)/libzip.o: ../../lib/alg/generic/libzip.cpp ../../lib/alg/generic/libzip.h $(OUTDIR)/mask.o: ../../lib/alg/lgs/mask.cpp ../../lib/alg/lgs/mask.h ../../lib/components/base/basicTypes.h ../../lib/hardware/soc/general/3DLRF.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/gui/gui.h $(OUTDIR)/md5.o: ../../lib/alg/generic/md5.cpp ../../lib/alg/generic/md5.h -$(OUTDIR)/mojoBackend.o: ../../lib/App/mojo/mojoBackend.cpp ../../lib/App/mojo/mojoBackend.h ../../lib/components/base/basicSettings.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicMemoryOperation.h ../../lib/components/object/objectFileLoggingService.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/App/mojo/mojoKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicEventHeap.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/detector.h ../../lib/components/base/basicObject.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicTypes.h ../../lib/hardware/soc/general/3DLRF.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/gui/gui.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/common/MySQL_dataBinder.h ../../lib/App/common/SQLite_dataBinder.h -$(OUTDIR)/mojoKernel.o: ../../lib/App/mojo/mojoKernel.cpp ../../lib/App/mojo/mojoKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicEventHeap.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/object/objectSystemAnchor.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/detector.h ../../lib/components/base/basicObject.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicTypes.h ../../lib/hardware/soc/general/3DLRF.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/gui/gui.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/common/kernelEventFilterAPF.h ../../lib/App/common/kernelEventFilterTrain.h ../../lib/App/common/MySQL_dataBinder.h ../../lib/App/common/SQLite_dataBinder.h +$(OUTDIR)/mojoBackend.o: ../../lib/App/mojo/mojoBackend.cpp ../../lib/App/mojo/mojoBackend.h ../../lib/components/base/basicSettings.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicMemoryOperation.h ../../lib/components/object/objectFileLoggingService.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/App/mojo/mojoKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicEventHeap.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/detector.h ../../lib/components/base/basicObject.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicTypes.h ../../lib/hardware/soc/general/3DLRF.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/gui/gui.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/common/MySQL_dataBinder.h ../../lib/App/common/SQLite_dataBinder.h +$(OUTDIR)/mojoKernel.o: ../../lib/App/mojo/mojoKernel.cpp ../../lib/App/mojo/mojoKernel.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicSettingsProvider.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicEventHeap.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/detector.h ../../lib/components/base/basicObject.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicValidatable.h ../../lib/alg/lgs/detectorStructures.h ../../lib/components/base/basicTypes.h ../../lib/alg/lgs/mask.h ../../lib/components/base/basicTypes.h ../../lib/hardware/soc/general/3DLRF.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/gui/gui.h ../../lib/alg/generic/md5.h ../../lib/App/common/kernelPrototype.h ../../lib/App/common/kernelEventFilterAPF.h ../../lib/App/common/kernelEventFilterTrain.h ../../lib/App/common/kernelModuleEmbedVideo.h ../../lib/App/common/MySQL_dataBinder.h ../../lib/App/common/SQLite_dataBinder.h $(OUTDIR)/mysql_class.o: ../../lib/data/mysql/mysql_class.cpp ../../lib/data/mysql/mysql_class.h $(OUTDIR)/MySQL_dataBinder.o: ../../lib/App/common/MySQL_dataBinder.cpp ../../lib/App/common/MySQL_dataBinder.h $(OUTDIR)/netClientHandler.o: ../../lib/data/net/netClientHandler.cpp ../../lib/data/net/netClientHandler.h ../../lib/data/protocol/protocol.h ../../lib/components/base/basicEventHandler.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/data/net/serverPort.h ../../lib/data/transport/transportSocket.h ../../lib/components/base/basicDualThread.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicTransport.h ../../lib/data/net/netServiceEngine.h @@ -853,7 +862,7 @@ $(OUTDIR)/serverPort.o: ../../lib/data/net/serverPort.cpp ../../lib/data/net/ser $(OUTDIR)/sqlite_class.o: ../../lib/data/sqlite/sqlite_class.cpp ../../lib/data/sqlite/sqlite_class.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h $(OUTDIR)/SQLite_dataBinder.o: ../../lib/App/common/SQLite_dataBinder.cpp ../../lib/App/common/SQLite_dataBinder.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h $(OUTDIR)/Transform.o: ../../lib/alg/generic/Transform.cpp ../../lib/alg/generic/Transform.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h -$(OUTDIR)/transportSerial.o: ../../lib/data/transport/transportSerial.cpp ../../lib/data/transport/transportSerial.h ../../lib/components/base/basicDualThread.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicTransport.h ../../lib/data/protocol/protocol.h +$(OUTDIR)/transportSerial.o: ../../lib/data/transport/transportSerial.cpp ../../lib/data/transport/transportSerial.h ../../lib/components/base/basicDualThread.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicTransport.h ../../lib/data/protocol/protocol.h $(OUTDIR)/transportSocket.o: ../../lib/data/transport/transportSocket.cpp ../../lib/data/transport/transportSocket.h ../../lib/components/base/basicDualThread.h ../../lib/components/base/basicThread.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/components/base/basicTransport.h ../../lib/data/protocol/protocol.h $(OUTDIR)/utm.o: ../../lib/alg/generic/utm.cpp ../../lib/alg/generic/utm.h $(OUTDIR)/videoAVLIBSource.o: ../../lib/data/media/video/videoAVLIBSource.cpp ../../lib/data/media/video/videoAVLIBSource.h diff --git a/lib/App/common/SQLite_dataBinder.cpp b/lib/App/common/SQLite_dataBinder.cpp index 079be40f..02d1063b 100644 --- a/lib/App/common/SQLite_dataBinder.cpp +++ b/lib/App/common/SQLite_dataBinder.cpp @@ -1721,6 +1721,10 @@ DBC_LRF_INI *sqliteDBC::getINIData( uint32_t lrfID ){ if( it != cArr->end() ){ tVal->_RUN_DIR = atoi( it->second.c_str() ); }; + it = cArr->find("NO_BLACK_TARGETS"); + if( it != cArr->end() ){ + tVal->_NO_BLACK_TARGETS = atoi( it->second.c_str() ); + }; it = cArr->find("JUST_MOVING_TARGETS"); if( it != cArr->end() ){ tVal->_JUST_MOVING_TARGETS = (bool) atoi( it->second.c_str() ); diff --git a/lib/App/common/dataBinder.h b/lib/App/common/dataBinder.h index e691d30d..2d169367 100644 --- a/lib/App/common/dataBinder.h +++ b/lib/App/common/dataBinder.h @@ -90,6 +90,7 @@ class dataBinder{ virtual DBC_EVT_RECORD * getEventByUUID( CSTR UUID ){ return NULL;}; virtual DBC_MODULE_EMBED_VIDEO_DATA * getEmbedVideoData( uint32_t ID ){ return NULL;}; virtual DBC_FH_DATA * getFlyHunterData( uint32_t ID ){ return NULL;}; + virtual DBC_REPORT_BACKUP_SETTINGS * getReportBackupData( uint32_t ID ){ return NULL;}; virtual int getIPCamCount( uint32_t SiteID ){ return 0;}; virtual KAFKA_TEMPLATE * getKafkaTemplateForEvent( uint32_t ModuleID, uint32_t ClassID, uint32_t EventID ){ return NULL;}; //virtual bool getLastEvents( vectorEventRecords &VR, uint32_t tss, uint32_t tsms ); @@ -191,6 +192,7 @@ class dataBinder{ virtual bool updateCamOnlineStatus( uint32_t camID, bool online ){ return false;}; virtual bool updateIPCam( CSTR uuid, CSTR Addr ){ return false;}; virtual bool updateIPCam( uint32_t CamID, CSTR Addr ){ return false;}; + virtual bool updateLastReportBackupTime( uint32_t id, uint32_t ts ){ return false;}; virtual bool updateLocalCam( CSTR uuid ){ return false;}; virtual bool updateLocalCam( uint32_t CamID ){ return false;}; virtual bool updateLRFComStat( uint32_t lrfID, uint32_t ErrorPerMinute ){ return false;}; diff --git a/lib/App/common/dataBinder_structures.h b/lib/App/common/dataBinder_structures.h index d32625c6..75aad49e 100644 --- a/lib/App/common/dataBinder_structures.h +++ b/lib/App/common/dataBinder_structures.h @@ -762,15 +762,18 @@ typedef struct S_DBC_LRF_INI{ uint16_t _AUTO_RESET_TIMEOUT; uint16_t _BOARD_TEMPERATURE; uint16_t _BOARD_ZEROSHIFT; - //uint16_t _BOARD_ENCODERSTEPS; - //uint16_t _BOARD_GEARRATIO; - //uint16_t _BOARD_MAXRANGE; uint16_t _BOARD_SPEED; uint16_t _RUN_DIR; uint16_t _NO_BLACK_TARGETS; uint16_t _JUST_MOVING_TARGETS; uint16_t _JUST_MOVING_RADIAL; uint16_t _JUST_MOVING_DISTANCE; + uint16_t _FREEZ_FIRST_TH; + uint16_t _SAVE_FIRST_TH; +}DBC_LRF_INI; + //uint16_t _BOARD_ENCODERSTEPS; + //uint16_t _BOARD_GEARRATIO; + //uint16_t _BOARD_MAXRANGE; //uint16_t _BLIND_ZONE_START_ANGLE; //uint16_t _BLIND_ZONE_END_ANGLE; //uint16_t _BLIND_ZONE_START_RANGE; @@ -779,9 +782,6 @@ typedef struct S_DBC_LRF_INI{ //uint16_t _BLIND_ZONE_DEPTH; //uint16_t _BLIND_ZONE_ANGLE; //uint16_t _BLIND_ZONE_RANGE; - uint16_t _FREEZ_FIRST_TH; - uint16_t _SAVE_FIRST_TH; -}DBC_LRF_INI; typedef struct S_DBC_REPORT_INFO{ uint16_t year; @@ -809,4 +809,13 @@ typedef struct S_DBC_WIDTH_TABLE{ DBC_WT_RECORD *wt_records; }DBC_WIDTH_TABLE; + +typedef struct S_DBC_REPORT_BACKUP_SETTINGS{ + uint32_t comulative_time; + uint32_t last_backup_time; + uint8_t storage_type; + uint8_t container_type; + +}DBC_REPORT_BACKUP_SETTINGS; + #endif \ No newline at end of file diff --git a/lib/App/common/deviceNode2D.cpp b/lib/App/common/deviceNode2D.cpp index 62e46b37..28435e28 100644 --- a/lib/App/common/deviceNode2D.cpp +++ b/lib/App/common/deviceNode2D.cpp @@ -149,8 +149,10 @@ bool device2DSensor::startService() { }; m_pTargetFilter = AK->getFilter( m_sLRF_DATA.filter_id ); }; + LOG("Set Device Status!"); updateDataStatus( ARGUS_DS_DISCONNECTED ); //m_pFSHelper = new FS_IO_HELPER(); + LOG("Before Device Thread Started!"); return init(); }; @@ -1707,10 +1709,8 @@ void device2DSensor::getfileMode(){ case GF_OP_OK:{ // INIT Sending File char tB[256]; - #ifdef DEBUG_EXTRA - sprintf( tB, "data/uploads/%s", m_sGetFileTransfers.helpers[m_sGetFileTransfers.current]->sourceName ); - + #ifdef DEBUG_EXTRA LOG(tB); #endif m_sGetFileTransfers.helpers[m_sGetFileTransfers.current]->fd = fopen( tB, "rb" ); @@ -1745,7 +1745,7 @@ void device2DSensor::getfileMode(){ 48, m_sGetFileTransfers.helpers[m_sGetFileTransfers.current]->fd ); - #ifdef DEBUG_EXTRA + #ifdef DEBUG char tB[64]; sprintf( tB,"%d of %d bytes", m_sGetFileTransfers.helpers[m_sGetFileTransfers.current]->data_size, m_sGetFileTransfers.helpers[m_sGetFileTransfers.current]->fileSize ); LOG( tB ); @@ -1755,7 +1755,7 @@ void device2DSensor::getfileMode(){ case GF_OP_DATA:{ long int pos = ftell( m_sGetFileTransfers.helpers[m_sGetFileTransfers.current]->fd ); uint8_t CP = (uint8_t)((((float)pos)*100.0f)/((float)m_sGetFileTransfers.helpers[m_sGetFileTransfers.current]->fileSize)); - #ifdef DEBUG_EXTRA + #ifdef DEBUG char tB[64]; if ( pos != EOF ){ sprintf( tB, "%d of %d bytes %d%%", pos, m_sGetFileTransfers.helpers[m_sGetFileTransfers.current]->fileSize, CP ); @@ -1777,7 +1777,7 @@ void device2DSensor::getfileMode(){ LOG( tB ); #endif if ( m_sGetFileTransfers.helpers[m_sGetFileTransfers.current]->data_size == 0 ) { - #ifdef DEBUG_EXTRA + #ifdef DEBUG LOG("Change to Close"); #endif m_sGetFileTransfers.helpers[m_sGetFileTransfers.current]->state = GF_OP_CLOSE; @@ -1813,8 +1813,42 @@ void device2DSensor::getfileMode(){ }; break; }; - case STG_WAIT: waitStateFunction(); break; - case STG_POOL: poolStateFunction(); break; + case STG_WAIT: { + if( m_bTimeOutCounter ){ + m_bTimeOutCounter--; + SLEEP( 10 ); + } else { + if( m_bOpRetryCnt ){ + + m_bOpRetryCnt--; + m_bTimeOutCounter = LGS_DEFAULT_TO_COUNTER; + registerCommError( false ); + + LRF_WORK_STAGE pS = getPrevStage(); + + if ( pS != LRF_WS_INIT ) { + setStage( pS, false ); + } else { + setWM( LRF_WM_CONNECTION ); + return; + }; + } else { + LOG_ERROR("Communication Wait State TO!"); + registerCommError( true ); + //setStage( boboStage ); + setWM( LRF_WM_CONNECTION ); + return; + }; + SLEEP( 10 ); + transactionResetResult(); + }; + break; + }; + case STG_POOL:{ + goNextStage(); + transactionResetResult(); + break; + }; }; }; @@ -2279,7 +2313,7 @@ void device2DSensor::proceedDBCommands(){ break; }; case ARGUS_LRF_PCMD_UPLOAD_FILE:{ -#ifdef DEBUG_EXTRA +#ifdef DEBUG LOG( "CMD UPLOAD" ); #endif DBC_INT_LIST *pUploads = m_pDBC->listLRFUploads( m_sLRF_DATA.id ); @@ -2308,12 +2342,12 @@ void device2DSensor::proceedDBCommands(){ stat( tB, &st ); tH->fileSize = st.st_size; tH->state = GF_OP_OK; - tH->db_id = (*idx); + tH->db_id = tData->id; tH->index = 0x04; if( tData->transfer_mode > m_sGetFileTransfers.transfer_ending_mode ) m_sGetFileTransfers.transfer_ending_mode = tData->transfer_mode; m_sGetFileTransfers.helpers.push_back(tH); }; - //m_pDBC->updateLRFUpload( (*idx), 1 ); + m_pDBC->updateLRFUpload( tData->id, 1 ); } else { LOG_ERROR( "No Upload Data Fetched From DB!" ); }; diff --git a/lib/App/common/deviceNodeCamera.cpp b/lib/App/common/deviceNodeCamera.cpp index 446e4961..db357e5e 100644 --- a/lib/App/common/deviceNodeCamera.cpp +++ b/lib/App/common/deviceNodeCamera.cpp @@ -426,14 +426,19 @@ bool deviceNodeCamera::create(){ m_pProtocol = (protocolPTZ *)new protocolPTZ_ONVIF( tURI, m_sCamData.username, m_sCamData.password, m_sCamData.auth_mode); } else { m_pProtocol = (protocolPTZ *)new protocolPTZ_ONVIF(m_sCamData.onvif_ctrl, m_sCamData.username, m_sCamData.password, m_sCamData.auth_mode); - } - - if( m_pProtocol!=NULL ) { + }; +#ifdef DEBUG + LOG("ONVIF-END"); +#endif + if( m_pProtocol != NULL ) { if( !m_pProtocol->create() ) { LOG_ERROR("Error Creating Proto!"); delete( (protocolPTZ_ONVIF*) m_pProtocol ); m_pProtocol = NULL; }; +#ifdef DEBUG + LOG("PROTO CREATE DONE"); +#endif }; break; }; diff --git a/lib/App/common/deviceNodeFactory.cpp b/lib/App/common/deviceNodeFactory.cpp index 92543b8f..c61ba06d 100644 --- a/lib/App/common/deviceNodeFactory.cpp +++ b/lib/App/common/deviceNodeFactory.cpp @@ -262,55 +262,27 @@ deviceNode *deviceNodeFactory::createNode( uint32_t id ){ LOG("Creating Network Video Encoder"); #endif break; - case ARGUS_LFS_SENSOR:{ -#ifdef DEBUG - LOG("Creating LFS Sensor"); -#endif - device2DSensor *tSensor; - tSensor = new device2DSensor( id ); - if( tSensor ) { - LOG("Success"); - tSensor->startService(); - tVal = ( deviceNode *) tSensor; - }; - break; - }; - case ARGUS_ALS_SENSOR:{ + case ARGUS_LFS_SENSOR: + case ARGUS_ALS_SENSOR: + case ARGUS_PLS_200_SENSOR: + case ARGUS_PLS_360_SENSOR:{ #ifdef DEBUG - LOG("Creating ALS Sensor"); + LOG("Creating 2D Sensor"); #endif device2DSensor *tSensor; tSensor = new device2DSensor( id ); if( tSensor ) { - LOG("Success"); - tSensor->startService(); - tVal = ( deviceNode *) tSensor; - }; - break; - }; - case ARGUS_PLS_200_SENSOR:{ #ifdef DEBUG - LOG("Creating PLS200 Sensor"); + LOG("Starting Service"); #endif - device2DSensor *tSensor; - tSensor = new device2DSensor( id ); - if( tSensor ) { - LOG("Success"); - tSensor->startService(); - tVal = ( deviceNode *) tSensor; - }; - break; - }; - case ARGUS_PLS_360_SENSOR:{ + if( tSensor->startService() ) { #ifdef DEBUG - LOG("Creating PLS360 Sensor"); + LOG("Success"); #endif - device2DSensor *tSensor; - tSensor = new device2DSensor( id ); - if( tSensor ) { - LOG("Success"); - tSensor->startService(); - tVal = ( deviceNode *) tSensor; + tVal = ( deviceNode *) tSensor; + } else { + delete( tSensor ); + }; }; break; }; @@ -511,7 +483,7 @@ void deviceNodeFactory::m_fThreadProc( void ){ tList = m_pDBC->listNewNodes( NULL ); }; if( tList != NULL ) { -#ifdef DEBUG_EXTRA +#ifdef DEBUG LOG("Nodes are Added!"); #endif for( DBC_INT_LIST::iterator idx = tList->begin(); idx != tList->end(); idx++ ) { diff --git a/lib/App/common/deviceNodeSensor.cpp b/lib/App/common/deviceNodeSensor.cpp index f5038230..737b416a 100644 --- a/lib/App/common/deviceNodeSensor.cpp +++ b/lib/App/common/deviceNodeSensor.cpp @@ -228,23 +228,23 @@ deviceNodeSensor::deviceNodeSensor( uint32_t id ):deviceNode( id ),m_oPosition() sprintf( tB, "Orientation: x:%.3f y:%.3f z:%.3f", m_oPosition.getRotX_deg(), m_oPosition.getRotY_deg(), m_oPosition.getRotZ_deg() ); LOG( tB ); #endif - + LOG("Finish Construct!"); }; deviceNodeSensor::deviceNodeSensor( DBC_NODE_DATA *Data ):deviceNode( Data ),m_oPosition(){ m_nCommErrorsCounter = 0; - m_ePPMODE = STG_INIT; + m_ePPMODE = STG_INIT; m_bValidationSkipCounter = DAFAULT_VALIDATION_SKIP_COUNTER; m_nCommErrorsStatTO = COMMUNICATION_ERROR_STATISTIC_HARVEST_INTERVAL_IN_SECONDS; m_pEventHeap = basicEventHeap::getInstance(); - - //m_pLog = basicLogCollection::getInstance(); memset( &m_sLRF_DATA, 0, sizeof(DBC_LRF_DATA)); m_pTargetFilter = NULL; if( m_pDBC ){ reloadDeviceNodeFromDB(); m_pDBC->updateLRFUnfinishedUploads( m_sLRF_DATA.id ); - }; + }; + setWM( LRF_WM_INIT ); + LOG("Finish Data Construct!"); }; @@ -275,8 +275,9 @@ bool deviceNodeSensor::reloadDeviceNodeFromDB(){ }; m_oPosition.updateMatrix(); -#ifdef DEBUG +#ifdef DEBUG_EXTRA char tB[128]; + LOG("Reload Data From DB!"); sprintf( tB, "Finalized Sensor Location: Lat:%.3f Lon:%.3f Alt:%.3f", m_oPosition.getLat(), m_oPosition.getLon(), m_oPosition.getAlt() ); LOG( tB ); sprintf( tB, "Finalized Sensor Location: x:%.3f y:%.3f z:%.3f", m_oPosition.getX(), m_oPosition.getY(), m_oPosition.getZ() ); @@ -987,14 +988,23 @@ void deviceNodeSensor::m_fThreadProc( void ){ if ( m_nCommErrorsStatTO ) { m_nCommErrorsStatTO --; } else { + /** + * Update Communication Status! + */ m_nCommErrorsStatTO = COMMUNICATION_ERROR_STATISTIC_HARVEST_INTERVAL_IN_SECONDS; m_pDBC->updateLRFComStat( m_sNodeData.aux_id, m_nCommErrorsCounter ); m_nCommErrorsCounter = 0; }; + proceedDBCommands(); }; - /** - * Update Communication Status! - */ + + if( getWM() > LRF_WM_CONNECTION ){ + if( !validateCommunicationRessource() ){ + setWM( LRF_WM_CONNECTION ); + DELAY_10MS( 200 ); + }; + }; + switch( getWM() ) { case LRF_WM_INIT: reloadDeviceNodeFromDB(); setWM( LRF_WM_CONNECTION ); break; case LRF_WM_CONNECTION: connectMode(); break; @@ -1013,16 +1023,6 @@ void deviceNodeSensor::m_fThreadProc( void ){ case LRF_WM_WAIT_ONLINE_SPECIAL: wait_device(); break; default: LOG("WM NOT REG"); setWM( LRF_WM_IDLE ); }; - - proceedDBCommands(); - - if( getWM() > LRF_WM_CONNECTION ){ - if( !validateCommunicationRessource() ){ - setWM( LRF_WM_CONNECTION ); - DELAY_10MS( 200 ); - }; - }; - }; }; diff --git a/lib/App/common/hardwareManager.cpp b/lib/App/common/hardwareManager.cpp index 853bbc23..fccb8bf6 100644 --- a/lib/App/common/hardwareManager.cpp +++ b/lib/App/common/hardwareManager.cpp @@ -29,6 +29,7 @@ #include #include +//#define NO_EXEC_EXTERNALS #define LOG( X ) m_pLog->Log( "HWM", this, X ) @@ -67,6 +68,7 @@ hardwareManager::hardwareManager( bool cold_start ){ memset( &m_sSYS_INFO, 0, sizeof(DBC_SYS_INFO) ); strncpy( m_sSYS_INFO.SW_INFO, _BUILD_STRING_, 128 ); +#ifndef NO_EXEC_EXTERNALS FILE *fd = popen("/bin/uname -s -r -v -m","r"); if( fd!= NULL ) { fgets( m_sSYS_INFO.OS_INFO, 127, fd); @@ -76,6 +78,9 @@ hardwareManager::hardwareManager( bool cold_start ){ fclose( fd ); fd = NULL; }; +#else + FILE *fd = NULL; +#endif fd = fopen("/proc/cpuinfo","r"); if ( fd!= NULL ) { @@ -371,12 +376,11 @@ void hardwareManager::getMAC( CSTR if_name, CSTR buf ){ }; void hardwareManager::getGW( CSTR if_name, CSTR buf ){ + memset( buf, 0, INET6_ADDRSTRLEN ); +#ifndef NO_EXEC_EXTERNALS FILE * fd = popen( "route -n", "r" ); char tB[1024]; //char expBuf[1024]; - - memset( buf, 0, INET6_ADDRSTRLEN ); - if ( fd ) { while (!feof(fd)) { fgets((CSTR)tB, 1024, fd); @@ -403,10 +407,13 @@ void hardwareManager::getGW( CSTR if_name, CSTR buf ){ }; fclose( fd ); }; +#endif if( strlen( buf ) == 0 ) strncpy( buf, "0.0.0.0", INET6_ADDRSTRLEN ); }; void hardwareManager::getTTyDesc( CSTR dev_name, CSTR buf ){ + memset( buf, 0, DBC_RESOURCE_DESC_SIZE ); +#ifndef NO_EXEC_EXTERNALS FILE * fd = popen( "dmesg | grep tty", "r" ); char tB[1024]; //char expBuf[1024]; @@ -431,10 +438,11 @@ void hardwareManager::getTTyDesc( CSTR dev_name, CSTR buf ){ }; fclose( fd ); }; - //if( strlen( buf ) == 0 ){ - // strncpy( buf, "--Unknown--", DBC_RESOURCE_DESC_SIZE ); - // buf[DBC_RESOURCE_DESC_SIZE-1]=(char)0; - //}; +#endif + if( strlen( buf ) == 0 ){ + strncpy( buf, "--Unknown--", DBC_RESOURCE_DESC_SIZE ); + buf[DBC_RESOURCE_DESC_SIZE-1]=(char)0; + }; }; PARSE_RESULT_NET_INTERFACES *hardwareManager::parse_neconfig( CSTR if_name ){ @@ -561,6 +569,7 @@ PARSE_RESULT_WIFI_SETTINGS *hardwareManager::parse_wifi( CSTR if_name ){ }; fclose( fd ); }; +#ifndef NO_EXEC_EXTERNALS //Check WiFi if( strstr(if_name,"w")!= NULL ) { char tName[128]; @@ -577,6 +586,7 @@ PARSE_RESULT_WIFI_SETTINGS *hardwareManager::parse_wifi( CSTR if_name ){ fclose( fd ); }; }; +#endif if ( tVal->access_point ) { fd = fopen("/etc/hostapd/hostapd.conf", "r"); if ( fd ) { diff --git a/lib/App/common/kernelModule.h b/lib/App/common/kernelModule.h index 5130906c..b9006151 100644 --- a/lib/App/common/kernelModule.h +++ b/lib/App/common/kernelModule.h @@ -11,17 +11,18 @@ typedef enum E_KERNEL_MODULE_TYPE{ - KERNEL_MODULE_UNKNOWN = 0, - KERNEL_MODULE_DCBUSB = 1, - KERNEL_MODULE_KAFKA = 2, - KERNEL_MODULE_GPS = 3, - KERNEL_MODULE_NETWORK = 4, - KERNEL_MODULE_FLYHUNTER = 5, - KERNEL_MODULE_SSDP_ANONCE = 6, - KERNEL_MODULE_ONVIF_OBSERVER = 7, - KERNEL_MODULE_EMBED_VIDEO = 8, - KERNEL_MODULE_MODEM_MANAGER = 9, - KERNEL_MODULE_REMOTE_SERVER = 10 + KERNEL_MODULE_UNKNOWN = 0, + KERNEL_MODULE_DCBUSB = 1, + KERNEL_MODULE_KAFKA = 2, + KERNEL_MODULE_GPS = 3, + KERNEL_MODULE_NETWORK = 4, + KERNEL_MODULE_FLYHUNTER = 5, + KERNEL_MODULE_SSDP_ANONCE = 6, + KERNEL_MODULE_ONVIF_OBSERVER = 7, + KERNEL_MODULE_EMBED_VIDEO = 8, + KERNEL_MODULE_MODEM_MANAGER = 9, + KERNEL_MODULE_REMOTE_SERVER = 10, + KERNEL_MODULE_REPORT_BACKUPPER = 11 }KERNEL_MODULE_TYPE; class kernelModule: public basicEventHandler, basicObject{ diff --git a/lib/App/common/kernelModuleReportBackupper.cpp b/lib/App/common/kernelModuleReportBackupper.cpp new file mode 100644 index 00000000..7817c75c --- /dev/null +++ b/lib/App/common/kernelModuleReportBackupper.cpp @@ -0,0 +1,47 @@ +#include "kernelModuleReportBackupper.h" +#include "../../components/base/basicFunctionality.h" + +#define LOG( X ) kernelModule::m_pLog->Log( "MOD_REPBACK", this, X ) +#ifdef DEBUG + #define LOG_ERROR( X ) {\ + char _tBfrErrMSG2w34[256];\ + sprintf( _tBfrErrMSG2w34, "In file %s[%d] in func:%s %s",__FILE__, __LINE__, __func__, X );\ + kernelModule::m_pLog->Log( "MOD_REPBACK", this, _LOG_ERROR, _tBfrErrMSG2w34 );\ + } +#else + #define LOG_ERROR( X ) kernelModule::m_pLog->Log( "MOD_REPBACK", this, _LOG_ERROR, X ); +#endif + + +kernelModuleReportBackupper::kernelModuleReportBackupper( uint32_t moduleID ): kernelModule( moduleID, KERNEL_MODULE_REPORT_BACKUPPER ){ + DBC_REPORT_BACKUP_SETTINGS *tData = m_pDBC->getReportBackupData( m_nDBAUXID ); + if ( tData ) { + memcpy( &m_sBackupSettings, tData, sizeof(DBC_REPORT_BACKUP_SETTINGS)); + } else { + memset( &m_sBackupSettings, 0, sizeof(DBC_REPORT_BACKUP_SETTINGS)); + }; +}; + +kernelModuleReportBackupper::~kernelModuleReportBackupper(){ + +}; + +bool kernelModuleReportBackupper::validate(){ + if ( m_sBackupSettings.comulative_time ) { + // Backups Enabled + unsigned long long tTS = getTimeValue(); + uint32_t cTS = tTS / 1000; + if ( ( m_sBackupSettings.last_backup_time == 0 ) || ((cTS - m_sBackupSettings.last_backup_time) > m_sBackupSettings.comulative_time )) { + // Do Backup Now + + }; + }; + return true; +}; + + +#undef LOG +#undef LOG_ERROR + + + diff --git a/lib/App/common/kernelModuleReportBackupper.h b/lib/App/common/kernelModuleReportBackupper.h new file mode 100644 index 00000000..eb059283 --- /dev/null +++ b/lib/App/common/kernelModuleReportBackupper.h @@ -0,0 +1,16 @@ +#ifndef __KERNEL_MODULE_REPORT_BACKUPPER_HEADER__ +#define __KERNEL_MODULE_REPORT_BACKUPPER_HEADER__ + +#include "kernelModule.h" + +class kernelModuleReportBackupper: public kernelModule { + private: + DBC_REPORT_BACKUP_SETTINGS m_sBackupSettings; + public: + explicit kernelModuleReportBackupper( uint32_t moduleID ); + ~kernelModuleReportBackupper(); + /* From Kernel Module */ + virtual bool validate(); +}; + +#endif diff --git a/lib/components/base/basicEventHeap.cpp b/lib/components/base/basicEventHeap.cpp index a70c90d3..3bf52201 100644 --- a/lib/components/base/basicEventHeap.cpp +++ b/lib/components/base/basicEventHeap.cpp @@ -17,16 +17,20 @@ basicEventHeap* basicEventHeap::getInstance() { }; void basicEventHeap::addHandler( basicEventHandler *handler, bool atBottom ){ + m_pHandlerMutex->lock(); m_vHandlers.push_back( handler ); + m_pHandlerMutex->unlock(); }; void basicEventHeap::removeHandler( basicEventHandler *handler ){ + m_pHandlerMutex->lock(); for( V_EVT_HANDLER::iterator idx = m_vHandlers.begin(); idx< m_vHandlers.end();idx++) { if( (*idx) == handler ) { m_vHandlers.erase( idx ); break; }; }; + m_pHandlerMutex->unlock(); }; void basicEventHeap::m_fThreadProc( void ){ @@ -49,9 +53,7 @@ void basicEventHeap::m_fThreadProc( void ){ m_pHandlerMutex->lock(); for( V_EVT_HANDLER::iterator idx = m_vHandlers.begin(); idx< m_vHandlers.end();idx++) { mpHandler = (*idx); - if( mpHandler != NULL ) { - mpHandler->dispatchEvent( mpEvent ); - }; + if( mpHandler != NULL ) mpHandler->dispatchEvent( mpEvent ); }; m_pHandlerMutex->unlock(); utilizeBasicEvent( mpEvent ); diff --git a/lib/data/curl/curlRequestsManager.cpp b/lib/data/curl/curlRequestsManager.cpp index 2698c5ba..e95bcea1 100644 --- a/lib/data/curl/curlRequestsManager.cpp +++ b/lib/data/curl/curlRequestsManager.cpp @@ -4,7 +4,7 @@ #define LOG_ERROR( X ) m_pLog->Log( "CURL_RQM", this, _LOG_ERROR, X ) // Constructor implementation -curlRequestsManager::curlRequestsManager(){ +curlRequestsManager::curlRequestsManager():m_mPoolProtector(){ m_pLog = basicLogCollection::getInstance(); curl_global_init(CURL_GLOBAL_ALL); m_pCURLM = curl_multi_init(); @@ -30,7 +30,7 @@ curlRequestsManager* curlRequestsManager::getInstance() { // check if the instance has been created yet if (0 == _instance) { // if not, then create it - _instance = new curlRequestsManager; + _instance = new curlRequestsManager(); } // return the single instance return _instance; @@ -50,22 +50,25 @@ void curlRequestsManager::m_fThreadProc( void ){ long mCURLTimeOut; int mStillRunning; bool bProceedThread = false; -#ifdef DEBUG_EXTRA +#ifdef DEBUG LOG("Starting Finished Requests Reaper"); #endif //BugCurl Multi cannot starty if MR = empty .... m_bThreadStatus = TH_WORKING; - while( ( m_bThreadStatus < TH_ENDED ) && !bProceedThread ){ + while( ( m_bThreadStatus < TH_ENDED ) && !bProceedThread ){ SLEEP( 10 ); m_mPoolProtector.lock(); if (m_vRequestPool.size()) bProceedThread = true; m_mPoolProtector.unlock(); }; - while( m_bThreadStatus < TH_ENDED ){ +#ifdef DEBUG + LOG("First Req Enqueued"); +#endif + while( m_bThreadStatus < TH_ENDED ){ /* we start some action by calling perform right away */ curl_multi_perform( m_pCURLM, &mStillRunning ); do{ - curl_multi_timeout( m_pCURLM, &mCURLTimeOut ); + curl_multi_timeout( m_pCURLM, &mCURLTimeOut ); if( mCURLTimeOut < 0 ) mCURLTimeOut = 1000; mTimeOut.tv_sec = mCURLTimeOut / 1000; @@ -74,8 +77,7 @@ void curlRequestsManager::m_fThreadProc( void ){ FD_ZERO(&mReadFD); FD_ZERO(&mWriteFD); FD_ZERO(&mExcepFD); - - /* get file descriptors from the transfers */ + /* get file descriptors from the transfers */ mRetCode = curl_multi_fdset( m_pCURLM, &mReadFD, &mWriteFD, &mExcepFD, &mMaxFD ); if( mRetCode != CURLM_OK) { char tT[256]; @@ -95,7 +97,7 @@ void curlRequestsManager::m_fThreadProc( void ){ /* select error */ break; case 0: - default: + default: /* timeout or readable/writable sockets */ curl_multi_perform( m_pCURLM, &mStillRunning ); break; @@ -155,7 +157,7 @@ void curlRequestsManager::m_fThreadProc( void ){ */ SLEEP( 10 ); }; -#ifdef DEBUG_EXTRA +#ifdef DEBUG LOG("Ending Finished Requests Reaper"); #endif }; @@ -163,7 +165,7 @@ void curlRequestsManager::m_fThreadProc( void ){ bool curlRequestsManager::accomplish( curlRequest *RC ){ if( RC ){ -#ifdef DEBUG +#ifdef DEBUG_EXTRA LOG("New Request"); #endif CURLMcode RetCode = curl_multi_add_handle( m_pCURLM, RC->getEH() ); @@ -171,7 +173,7 @@ bool curlRequestsManager::accomplish( curlRequest *RC ){ m_mPoolProtector.lock(); m_vRequestPool.push_back( RC ); m_mPoolProtector.unlock(); -#ifdef DEBUG +#ifdef DEBUG_EXTRA LOG("Added OK"); #endif return true; @@ -186,6 +188,9 @@ bool curlRequestsManager::get( CSTR URL, CSTR contentType ){ curlRequest *tRC; tRC = new curlRequest( URL, contentType ); if( tRC != NULL ){ +#ifdef DEBUG_EXTRA + LOG("Adding GET RQ"); +#endif return accomplish(tRC); }; return false; @@ -195,6 +200,9 @@ bool curlRequestsManager::post(CSTR URL, CSTR postData, CSTR contentType ){ curlRequest *tRC; tRC = new curlRequest( URL, contentType ); if( tRC != NULL ){ +#ifdef DEBUG_EXTRA + LOG("Adding POST RQ"); +#endif tRC->setPOST( postData, strlen(postData) ); return accomplish( tRC ); }; diff --git a/lib/data/ponvif/ponvif.cpp b/lib/data/ponvif/ponvif.cpp index 913e52c7..d6e470b4 100644 --- a/lib/data/ponvif/ponvif.cpp +++ b/lib/data/ponvif/ponvif.cpp @@ -1806,7 +1806,6 @@ bool pOnvif::_send_request( CSTR url, CSTR post_string, bool mustReturnData ){ #ifdef CURL_MANAGER bool RetVal = false; if( m_pHttpAccessManager ){ - LOG("ChaCha"); m_mResponseProtector.lock(); curlRequest *tRC;//application/soap+xml; charset=utf-8; action="http://www.onvif.org/ver10/device/wsdl/GetSystemDateAndTime" tRC = new curlRequest( url, (CSTR)"application/soap+xml; charset=utf-8;" ); @@ -1825,7 +1824,6 @@ bool pOnvif::_send_request( CSTR url, CSTR post_string, bool mustReturnData ){ tRC->setPOST( post_string, strlen(post_string) ); if( mustReturnData ) { tRC->setHandler( (void*)this, pOnvif::parser, (void*)tRC ); - LOG("GUGA"); if( m_pHttpAccessManager->accomplish( tRC ) ){ parser_done = false; uint8_t cnt = 200; // TO = 2 second @@ -1835,7 +1833,6 @@ bool pOnvif::_send_request( CSTR url, CSTR post_string, bool mustReturnData ){ }; }; } else { - LOG("SUGA"); RetVal = m_pHttpAccessManager->accomplish( tRC ); }; }; diff --git a/lib/data/protocol/protocolPTZ_ONVIF.cpp b/lib/data/protocol/protocolPTZ_ONVIF.cpp index 9b0d8d0c..06ccf651 100644 --- a/lib/data/protocol/protocolPTZ_ONVIF.cpp +++ b/lib/data/protocol/protocolPTZ_ONVIF.cpp @@ -131,8 +131,10 @@ bool protocolPTZ_ONVIF::create( void ){ m_pOnVif->setUsername( m_pUser ); m_pOnVif->setPassword( m_pPassword ); m_pOnVif->setAuthMode( m_bAuthMode ); + LOG("PROTOCREATE"); if( m_pOnVif->create() ){ m_pProfile = m_pOnVif->getProfiles()->at(0); + LOG("DONE"); return true; } else { LOG_ERROR("pOnvif CREATE FAILURE!");