Browse Source

Half Bubble Filter

AGP
Evgeny Gagua 12 months ago
parent
commit
752c1644ff
  1. 2
      Projects/la_mojo/la_mojo.vpj
  2. 79
      Projects/la_mojo/makefile
  3. 1
      lib/App/common/dataBinder.h
  4. 12
      lib/App/common/dataBinder_structures.h
  5. 26
      lib/App/common/deviceNode2D.cpp
  6. 44
      lib/App/common/deviceNodeSensor.cpp
  7. 5
      lib/App/common/deviceNodeSensor.h
  8. 150
      lib/App/common/kernelEventFilterBubble.cpp
  9. 40
      lib/App/common/kernelEventFilterBubble.h
  10. 10
      lib/App/common/kernelEventFilterTrain.cpp
  11. 4
      lib/App/common/serverDataBinder.h
  12. 55
      lib/App/common/serverMySQL_dataBinder.cpp
  13. 2
      lib/App/common/serverMySQL_dataBinder.h
  14. 3
      lib/App/mojo/mojoRemoteClient.cpp
  15. 14
      lib/App/serva/servaBackend.cpp
  16. 13
      lib/App/serva/servaModBusManager.h
  17. 1121
      lib/App/serva/servaRemoteClientHandler.cpp
  18. 6
      lib/App/serva/servaRemoteClientHandler.h
  19. 66
      lib/App/serva/servaSessionManager.cpp
  20. 3
      lib/App/serva/servaSessionManager.h
  21. 6
      lib/alg/generic/Transform.cpp
  22. 2
      lib/alg/generic/Transform.h
  23. 15
      lib/components/base/basicEvent.h
  24. 5
      lib/rgoose/rgooseTargetFilter.h

2
Projects/la_mojo/la_mojo.vpj

@ -560,6 +560,7 @@
<F N="../../lib/data/json/json_writer.cpp"/>
<F N="../../lib/App/common/kernelEventFilter.cpp"/>
<F N="../../lib/App/common/kernelEventFilterAPF.cpp"/>
<F N="../../lib/App/common/kernelEventFilterBubble.cpp"/>
<F N="../../lib/App/common/kernelEventFilterTrain.cpp"/>
<F N="../../lib/App/common/kernelModule.cpp"/>
<F N="../../lib/App/common/kernelModuleEmbedVideo.cpp"/>
@ -632,6 +633,7 @@
<F N="../../lib/alg/lgs/detector.h"/>
<F N="../../lib/alg/lgs/detectorStructures.h"/>
<F N="../../lib/alg/generic/heapDebug.h"/>
<F N="../../lib/App/common/kernelEventFilterBubble.h"/>
<F N="../../lib/LgsLib.h"/>
<F N="../../lib/alg/lgs/mask.h"/>
<F N="../../lib/App/mojo/mojoBackend.h"/>

79
Projects/la_mojo/makefile

@ -55,10 +55,11 @@ COMMON_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \
$(OUTDIR)/hardwareResourceVideoProvider.o $(OUTDIR)/heapDebug.o \
$(OUTDIR)/hid_dc.o $(OUTDIR)/json_reader.o $(OUTDIR)/json_value.o \
$(OUTDIR)/json_writer.o $(OUTDIR)/kernelEventFilter.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterTrain.o \
$(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \
$(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \
$(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterBubble.o \
$(OUTDIR)/kernelEventFilterTrain.o $(OUTDIR)/kernelModule.o \
$(OUTDIR)/kernelModuleEmbedVideo.o $(OUTDIR)/kernelModuleFactory.o \
$(OUTDIR)/kernelModuleFlyHunter.o $(OUTDIR)/kernelModuleKafka.o \
$(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelModuleOnvifObserver.o \
$(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \
$(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \
@ -107,10 +108,11 @@ ALL_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \
$(OUTDIR)/hardwareResourceVideoProvider.o $(OUTDIR)/heapDebug.o \
$(OUTDIR)/hid_dc.o $(OUTDIR)/json_reader.o $(OUTDIR)/json_value.o \
$(OUTDIR)/json_writer.o $(OUTDIR)/kernelEventFilter.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterTrain.o \
$(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \
$(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \
$(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterBubble.o \
$(OUTDIR)/kernelEventFilterTrain.o $(OUTDIR)/kernelModule.o \
$(OUTDIR)/kernelModuleEmbedVideo.o $(OUTDIR)/kernelModuleFactory.o \
$(OUTDIR)/kernelModuleFlyHunter.o $(OUTDIR)/kernelModuleKafka.o \
$(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelModuleOnvifObserver.o \
$(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \
$(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \
@ -250,10 +252,11 @@ COMMON_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \
$(OUTDIR)/hardwareResourceVideoProvider.o $(OUTDIR)/heapDebug.o \
$(OUTDIR)/hid_dc.o $(OUTDIR)/json_reader.o $(OUTDIR)/json_value.o \
$(OUTDIR)/json_writer.o $(OUTDIR)/kernelEventFilter.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterTrain.o \
$(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \
$(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \
$(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterBubble.o \
$(OUTDIR)/kernelEventFilterTrain.o $(OUTDIR)/kernelModule.o \
$(OUTDIR)/kernelModuleEmbedVideo.o $(OUTDIR)/kernelModuleFactory.o \
$(OUTDIR)/kernelModuleFlyHunter.o $(OUTDIR)/kernelModuleKafka.o \
$(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelModuleOnvifObserver.o \
$(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \
$(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \
@ -302,10 +305,11 @@ ALL_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \
$(OUTDIR)/hardwareResourceVideoProvider.o $(OUTDIR)/heapDebug.o \
$(OUTDIR)/hid_dc.o $(OUTDIR)/json_reader.o $(OUTDIR)/json_value.o \
$(OUTDIR)/json_writer.o $(OUTDIR)/kernelEventFilter.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterTrain.o \
$(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \
$(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \
$(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterBubble.o \
$(OUTDIR)/kernelEventFilterTrain.o $(OUTDIR)/kernelModule.o \
$(OUTDIR)/kernelModuleEmbedVideo.o $(OUTDIR)/kernelModuleFactory.o \
$(OUTDIR)/kernelModuleFlyHunter.o $(OUTDIR)/kernelModuleKafka.o \
$(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelModuleOnvifObserver.o \
$(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \
$(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \
@ -445,10 +449,11 @@ COMMON_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \
$(OUTDIR)/hardwareResourceVideoProvider.o $(OUTDIR)/heapDebug.o \
$(OUTDIR)/hid_dc.o $(OUTDIR)/json_reader.o $(OUTDIR)/json_value.o \
$(OUTDIR)/json_writer.o $(OUTDIR)/kernelEventFilter.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterTrain.o \
$(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \
$(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \
$(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterBubble.o \
$(OUTDIR)/kernelEventFilterTrain.o $(OUTDIR)/kernelModule.o \
$(OUTDIR)/kernelModuleEmbedVideo.o $(OUTDIR)/kernelModuleFactory.o \
$(OUTDIR)/kernelModuleFlyHunter.o $(OUTDIR)/kernelModuleKafka.o \
$(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelModuleOnvifObserver.o \
$(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \
$(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \
@ -497,10 +502,11 @@ ALL_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \
$(OUTDIR)/hardwareResourceVideoProvider.o $(OUTDIR)/heapDebug.o \
$(OUTDIR)/hid_dc.o $(OUTDIR)/json_reader.o $(OUTDIR)/json_value.o \
$(OUTDIR)/json_writer.o $(OUTDIR)/kernelEventFilter.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterTrain.o \
$(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \
$(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \
$(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterBubble.o \
$(OUTDIR)/kernelEventFilterTrain.o $(OUTDIR)/kernelModule.o \
$(OUTDIR)/kernelModuleEmbedVideo.o $(OUTDIR)/kernelModuleFactory.o \
$(OUTDIR)/kernelModuleFlyHunter.o $(OUTDIR)/kernelModuleKafka.o \
$(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelModuleOnvifObserver.o \
$(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \
$(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \
@ -645,10 +651,11 @@ COMMON_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \
$(OUTDIR)/hardwareResourceVideoProvider.o $(OUTDIR)/heapDebug.o \
$(OUTDIR)/hid_dc.o $(OUTDIR)/json_reader.o $(OUTDIR)/json_value.o \
$(OUTDIR)/json_writer.o $(OUTDIR)/kernelEventFilter.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterTrain.o \
$(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \
$(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \
$(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterBubble.o \
$(OUTDIR)/kernelEventFilterTrain.o $(OUTDIR)/kernelModule.o \
$(OUTDIR)/kernelModuleEmbedVideo.o $(OUTDIR)/kernelModuleFactory.o \
$(OUTDIR)/kernelModuleFlyHunter.o $(OUTDIR)/kernelModuleKafka.o \
$(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelModuleOnvifObserver.o \
$(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \
$(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \
@ -697,10 +704,11 @@ ALL_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \
$(OUTDIR)/hardwareResourceVideoProvider.o $(OUTDIR)/heapDebug.o \
$(OUTDIR)/hid_dc.o $(OUTDIR)/json_reader.o $(OUTDIR)/json_value.o \
$(OUTDIR)/json_writer.o $(OUTDIR)/kernelEventFilter.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterTrain.o \
$(OUTDIR)/kernelModule.o $(OUTDIR)/kernelModuleEmbedVideo.o \
$(OUTDIR)/kernelModuleFactory.o $(OUTDIR)/kernelModuleFlyHunter.o \
$(OUTDIR)/kernelModuleKafka.o $(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelEventFilterAPF.o $(OUTDIR)/kernelEventFilterBubble.o \
$(OUTDIR)/kernelEventFilterTrain.o $(OUTDIR)/kernelModule.o \
$(OUTDIR)/kernelModuleEmbedVideo.o $(OUTDIR)/kernelModuleFactory.o \
$(OUTDIR)/kernelModuleFlyHunter.o $(OUTDIR)/kernelModuleKafka.o \
$(OUTDIR)/kernelModuleModemManager.o \
$(OUTDIR)/kernelModuleOnvifObserver.o \
$(OUTDIR)/kernelModuleReportBackupper.o $(OUTDIR)/kernelModuleSSDP.o \
$(OUTDIR)/kernelModuleUSBRelay.o $(OUTDIR)/kernelPrototype.o \
@ -841,7 +849,7 @@ $(OUTDIR)/deviceNodeEthernet2Serial.o: ../../lib/App/common/deviceNodeEthernet2S
$(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/deviceNodePresetCamControl.h ../../lib/App/common/deviceNodeStaticCamControl.h ../../lib/App/common/deviceNodeEthernet2Serial.h
$(OUTDIR)/deviceNodePresetCamControl.o: ../../lib/App/common/deviceNodePresetCamControl.cpp ../../lib/App/common/deviceNodePresetCamControl.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/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/mojo/mojoRemoteClient.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/data/net/clientPort.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/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/App/common/dataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.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/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/mojo/mojoRemoteClient.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/data/net/clientPort.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/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/App/common/dataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/deviceNodeSensor.o: ../../lib/App/common/deviceNodeSensor.cpp ../../lib/App/common/deviceNodeSensor.h ../../lib/components/object/objectSystemAnchor.h
$(OUTDIR)/deviceNodeSensor.o: ../../lib/App/common/deviceNodeSensor.cpp ../../lib/App/common/deviceNodeSensor.h ../../lib/components/object/objectSystemAnchor.h ../../lib/App/common/kernelPrototype.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
$(OUTDIR)/FSClient.o: ../../lib/data/rfs/FSClient.cpp ../../lib/data/rfs/FSClient.h
@ -858,9 +866,10 @@ $(OUTDIR)/json_value.o: ../../lib/data/json/json_value.cpp ../../lib/data/json/j
$(OUTDIR)/json_writer.o: ../../lib/data/json/json_writer.cpp ../../lib/data/json/json_tool.h
$(OUTDIR)/kernelEventFilter.o: ../../lib/App/common/kernelEventFilter.cpp ../../lib/App/common/kernelEventFilter.h ../../lib/App/common/MySQL_dataBinder.h ../../lib/App/common/SQLite_dataBinder.h
$(OUTDIR)/kernelEventFilterAPF.o: ../../lib/App/common/kernelEventFilterAPF.cpp ../../lib/App/common/kernelEventFilterAPF.h
$(OUTDIR)/kernelEventFilterBubble.o: ../../lib/App/common/kernelEventFilterBubble.cpp ../../lib/App/common/kernelEventFilterBubble.h ../../lib/App/common/kernelEventFilter.h ../../lib/App/common/kernelPrototype.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
$(OUTDIR)/kernelEventFilterTrain.o: ../../lib/App/common/kernelEventFilterTrain.cpp ../../lib/App/common/kernelEventFilterTrain.h ../../lib/components/base/basicFunctionality.h ../../lib/components/base/basicBuildTimeStamp.h ../../lib/components/base/basicTypes.h ../../lib/App/common/deviceNodeFactory.h
$(OUTDIR)/kernelModule.o: ../../lib/App/common/kernelModule.cpp ../../lib/App/common/kernelModule.h ../../lib/App/common/MySQL_dataBinder.h ../../lib/App/common/SQLite_dataBinder.h
$(OUTDIR)/kernelModuleEmbedVideo.o: ../../lib/App/common/kernelModuleEmbedVideo.cpp ../../lib/App/common/kernelModuleEmbedVideo.h
$(OUTDIR)/kernelModuleEmbedVideo.o: ../../lib/App/common/kernelModuleEmbedVideo.cpp ../../lib/App/common/kernelModuleEmbedVideo.h ../../lib/App/common/deviceNodeCamera.h ../../lib/App/common/deviceNodeFactory.h
$(OUTDIR)/kernelModuleFactory.o: ../../lib/App/common/kernelModuleFactory.cpp ../../lib/App/common/kernelModuleFactory.h ../../lib/App/common/kernelModuleUSBRelay.h ../../lib/App/common/kernelModuleKafka.h ../../lib/App/common/kernelModuleFlyHunter.h ../../lib/App/common/kernelModuleSSDP.h ../../lib/App/common/kernelModuleOnvifObserver.h ../../lib/App/common/kernelModuleEmbedVideo.h ../../lib/App/common/kernelModuleModemManager.h ../../lib/App/common/MySQL_dataBinder.h ../../lib/App/common/SQLite_dataBinder.h
$(OUTDIR)/kernelModuleFlyHunter.o: ../../lib/App/common/kernelModuleFlyHunter.cpp ../../lib/App/common/kernelModuleFlyHunter.h
$(OUTDIR)/kernelModuleKafka.o: ../../lib/App/common/kernelModuleKafka.cpp ../../lib/App/common/kernelModuleKafka.h
@ -875,7 +884,7 @@ $(OUTDIR)/mask.o: ../../lib/alg/lgs/mask.cpp ../../lib/alg/lgs/mask.h ../../lib/
$(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/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/mojo/mojoRemoteClient.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/data/net/clientPort.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/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/App/common/dataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.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/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/mojo/mojoRemoteClient.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/data/net/clientPort.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/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/App/common/dataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.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)/mojoRemoteClient.o: ../../lib/App/mojo/mojoRemoteClient.cpp ../../lib/App/mojo/mojoRemoteClient.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/data/net/clientPort.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/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/App/common/dataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.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/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/mojo/mojoRemoteClient.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/data/net/clientPort.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/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/App/common/dataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h
$(OUTDIR)/mojoRemoteClient.o: ../../lib/App/mojo/mojoRemoteClient.cpp ../../lib/App/mojo/mojoRemoteClient.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/data/net/clientPort.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/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/App/common/dataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.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/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/mojo/mojoRemoteClient.h ../../lib/components/base/basicLogCollection.h ../../lib/components/base/basicLoggingService.h ../../lib/components/base/basicRing.h ../../lib/components/base/basicMutex.h ../../lib/data/net/clientPort.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/protocol/protocol.h ../../lib/data/protocol/protocolARGUS_DATA.h ../../lib/App/common/dataBinder.h ../../lib/App/common/dataBinder_structures.h ../../lib/App/common/dataBinder_ReportAux.h ../../lib/components/base/basicEvent.h ../../lib/components/base/basicTypes.h ../../lib/components/base/basicPosition.h ../../lib/alg/generic/Transform.h ../../lib/App/common/deviceNodeCamera.h ../../lib/App/common/deviceNodeSensor.h ../../lib/App/common/deviceNodeFactory.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

1
lib/App/common/dataBinder.h

@ -80,6 +80,7 @@ class dataBinder{
//virtual DBC_INT_LIST * listSockets( uint32_t NodeID ){ return NULL;};
virtual DBC_INT_LIST * listPhonebook( ){ return NULL;};
virtual DBC_INT_LIST * listResources( uint32_t NodeID = 0 ){ return NULL;};
virtual DBC_INT_LIST * listSensorFilters( uint32_t NodeID = 0 ){ return NULL;};
virtual DBC_INT_LIST * listOlderReportStat( CSTR Y, CSTR M, CSTR D ){ return NULL;};
virtual DBC_INT_LIST * listOlderReportStat( uint32_t TS ){ return NULL;};
virtual simplePolygone * loadLRFMaskVertex( uint32_t vid ){ return NULL;};

12
lib/App/common/dataBinder_structures.h

@ -584,7 +584,8 @@ typedef struct S_DBC_FH_DATA{
typedef enum E_TARGET_FILTER_TYPE{
TF_UNDEFINED_FILTER = 0,
TF_LA_METRO_TRAIN_FILTER = 1,
TF_AUTHORISED_PEOPLE_FILTER = 2
TF_AUTHORISED_PEOPLE_FILTER = 2,
TF_BUBBLE_SEGMENTATION_FILTER = 3
}TARGET_FILTER_TYPE;
typedef struct S_DBC_TARGET_FLITER_DATA{
@ -751,10 +752,17 @@ typedef struct S_TRAIN_FILTER_DATA{
uint32_t nUpperSensorRestartTO;
#endif
#ifdef EFT_MINIMAL_RANGE_SUSPICIOUS
float fMinimalRange;
float fLeftMinimalRange;
float fRightMinimalRange;
#endif
}TRAIN_FILTER_DATA;
typedef struct S_BUBBLE_FILTER_DATA{
uint8_t bZoneCount;
uint32_t nUpperSensorID;
uint32_t nBottomSensorID;
}BUBBLE_FILTER_DATA;
typedef struct S_VIDEO_SEGMENT_INFO{
uint32_t stream_id;
uint32_t streamTSS;

26
lib/App/common/deviceNode2D.cpp

@ -140,6 +140,7 @@ bool device2DSensor::startService() {
return false;
};
};
/*
if( m_sLRF_DATA.filter_id > 0 ) {
#ifdef DEBUG
LOG("DEFINED FILTER");
@ -151,6 +152,8 @@ bool device2DSensor::startService() {
};
m_pTargetFilter = AK->getFilter( m_sLRF_DATA.filter_id );
};
*/
loadFilters();
LOG("Set Device Status!");
updateDataStatus( ARGUS_DS_DISCONNECTED );
//m_pFSHelper = new FS_IO_HELPER();
@ -2867,6 +2870,7 @@ bool device2DSensor::packetHandler( protocolPackage *Package ){
#endif
EVENT_CONTAINER * bEVT = NULL;
TARGET_DATA * tData = prepareTargetData( AZ, RANGE, WIDTH, LRFID );
/*
if( m_pTargetFilter != NULL ) {
if( m_pTargetFilter->validateTarget( m_sNodeData.node_id, tData ) ){
free( tData );
@ -2874,6 +2878,13 @@ bool device2DSensor::packetHandler( protocolPackage *Package ){
cIDX += 6;
break;
};
};
*/
if( filterTargetData( tData ) ){
free( tData );
if ( LRF_WM_ALARM != getWM() ) setWM(LRF_WM_ALARM);
cIDX += 6;
break;
};
#ifndef SKIP_REAL_TARGETS
bEVT = createBasicEvent( m_sNodeData.node_id, m_eEventClass, EVT_TARGET_2D_WHITE, NULL, NULL, tData );
@ -3034,6 +3045,7 @@ bool device2DSensor::packetHandler( protocolPackage *Package ){
#endif
EVENT_CONTAINER * bEVT = NULL;
TARGET_DATA * tData = prepareTargetData( AZ, RANGE, WIDTH );
/*
if( m_pTargetFilter != NULL ) {
if( m_pTargetFilter->validateTarget( m_sNodeData.node_id, tData ) ){
free( tData );
@ -3041,6 +3053,13 @@ bool device2DSensor::packetHandler( protocolPackage *Package ){
cIDX += 10;
break;
};
};
*/
if( filterTargetData( tData ) ){
free( tData );
if ( LRF_WM_ALARM != getWM() ) setWM(LRF_WM_ALARM);
cIDX += 10;
break;
};
#ifndef SKIP_REAL_TARGETS
bEVT = createBasicEvent( m_sNodeData.node_id, m_eEventClass, EVT_TARGET_2D_WHITE, NULL, NULL, tData );
@ -3383,13 +3402,18 @@ void device2DSensor::simulateTarget( void ){
TARGET_DATA * tData = prepareTargetData( AZ, RANGE, WIDTH );
if( tData != NULL ){
/*
if( m_pTargetFilter != NULL ) {
if( !m_pTargetFilter->validateTarget( m_sNodeData.node_id, tData ) ){
free( tData );
return;
};
};
*/
if( filterTargetData( tData ) ){
free( tData );
return;
};
EVENT_CONTAINER * bEVT = createBasicEvent( m_sNodeData.node_id, m_eEventClass, EVT_TARGET_2D_WHITE, NULL, NULL, tData );
if (bEVT != NULL) {
if( m_sLRF_DATA.prefered_camera_id ) {

44
lib/App/common/deviceNodeSensor.cpp

@ -1,5 +1,6 @@
#include "deviceNodeSensor.h"
#include "../../components/object/objectSystemAnchor.h"
#include "kernelPrototype.h"
#include <opencv2/opencv.hpp>
@ -202,7 +203,7 @@ deviceNodeSensor::deviceNodeSensor( uint32_t id ):deviceNode( id ),m_oPosition()
};
};
m_pTargetFilter = NULL;
//m_pTargetFilter = NULL;
systemAnchor *SA = systemAnchor::getInstance();
if( SA ){
if ( SA->beLocal() ) {
@ -238,7 +239,7 @@ deviceNodeSensor::deviceNodeSensor( DBC_NODE_DATA *Data ):deviceNode( Data ),m_o
m_nCommErrorsStatTO = COMMUNICATION_ERROR_STATISTIC_HARVEST_INTERVAL_IN_SECONDS;
m_pEventHeap = basicEventHeap::getInstance();
memset( &m_sLRF_DATA, 0, sizeof(DBC_LRF_DATA));
m_pTargetFilter = NULL;
//m_pTargetFilter = NULL;
if( m_pDBC ){
reloadDeviceNodeFromDB();
m_pDBC->updateLRFUnfinishedUploads( m_sLRF_DATA.id );
@ -249,7 +250,44 @@ deviceNodeSensor::deviceNodeSensor( DBC_NODE_DATA *Data ):deviceNode( Data ),m_o
deviceNodeSensor::~deviceNodeSensor(){
LOG("Finish Destructor!");
m_vTargetFilters.clear();
};
bool deviceNodeSensor::filterTargetData( TARGET_DATA *ptr ){
bool RetVal = false;
if ( m_vTargetFilters.size() ) {
for (vectorKernelEventFilters::iterator idx = m_vTargetFilters.begin(); idx != m_vTargetFilters.end(); idx++) {
if( (*idx)->isActive() ) {
if( (*idx)->validateTarget( m_sNodeData.node_id, ptr ) ) {
RetVal = true;
break;
};
};
};
};
return RetVal;
};
bool deviceNodeSensor::loadFilters(){
if( m_pDBC ){
kernelPrototype *AK = kernelPrototype::getInstance();
if( AK==NULL ){
LOG_ERROR("KERNEL <<< GRAB >>> Failure!");
return false;
};
DBC_INT_LIST *IDS = m_pDBC->listSensorFilters(m_sNodeData.aux_id);
if ( IDS ) {
if ( IDS->size() ) {
for ( DBC_INT_LIST::iterator idx = IDS->begin(); idx != IDS->end(); idx++ ) {
kernelEventFilter * tFilter = AK->getFilter( *idx );
if( tFilter ) m_vTargetFilters.push_back( tFilter );
};
};
delete(IDS);
return true;
};
};
return false;
};
bool deviceNodeSensor::reloadDeviceNodeFromDB(){

5
lib/App/common/deviceNodeSensor.h

@ -168,7 +168,8 @@ class deviceNodeSensor: public deviceNode, public basicThread{
basicPosition m_oPosition;
basicEventHeap * m_pEventHeap;
basicEventClassID m_eEventClass;
kernelEventFilter * m_pTargetFilter;
//kernelEventFilter * m_pTargetFilter;
vectorKernelEventFilters m_vTargetFilters;
uint8_t m_bOpRetryCnt;
uint16_t m_bTimeOutCounter;
E_MODES m_bActualDeviceWM;
@ -236,6 +237,8 @@ class deviceNodeSensor: public deviceNode, public basicThread{
void broadcastConnected( void );
void broadcastDisconnected( void );
void broadcastFlip( uint16_t flipCount );
bool loadFilters();
bool filterTargetData( TARGET_DATA *ptr );
protected:
virtual void m_fThreadProc( void );
public:

150
lib/App/common/kernelEventFilterBubble.cpp

@ -0,0 +1,150 @@
#include "kernelEventFilterBubble.h"
kernelEventFilterBubble::kernelEventFilterBubble( uint32_t id ):kernelEventFilter( id, TF_BUBBLE_SEGMENTATION_FILTER ){
m_pLog = basicLogCollection::getInstance();
BUBBLE_FILTER_DATA *tData = m_pDBC->LoadBubbleFilterData( id );
if ( tData ) {
memcpy( m_sBubbleFilterData, tData, sizeof(BUBBLE_FILTER_DATA) );
free( tData );
};
};
kernelEventFilterBubble::~kernelEventFilterBubble(){
if ( m_vTargetBubbles.size() ) {
for (V_TARGET_SEGMENTS::iterator idx = m_vTargetBubbles.begin(); idx != m_vTargetBubbles.end(); idx++) free(*idx);
m_vTargetBubbles.clear();
};
};
bool kernelEventFilterBubble::createBubble( TARGET_DATA *ptr ){
TARGET_SEGMENT *tData =(TARGET_SEGMENT*) malloc(sizeof(TARGET_SEGMENT));
if ( tData ) {
memset( tData, 0, sizeof(TARGET_SEGMENT) );
tData->boundary = m_sBubbleFilterData.beginning_range;
tData->system_center.x = ptr->system_target.x;
tData->system_center.y = ptr->system_target.y;
tData->system_center.z = ptr->system_target.z;
tData->id = m_pDBC->addRegisteredBubble( tData );
if( createBubble( tData ) ) return true;
free( tData );
};
return false;
};
bool kernelEventFilterBubble::createBubble( TARGET_SEGMENT *ptr ){
if ( ptr == NULL ) return false;
ptr->ttl = getMilliseconds() + m_sBubbleFilterData.ttl;
m_mDataProtector.lock();
m_vTargetBubbles.push_back( ptr );
m_mDataProtector.unlock();
return true;
};
bool kernelEventFilterBubble::validate(){
m_mDataProtector.lock();
if( m_vTargetBubbles.size() ) {
uint64_t ctx = getMilliseconds();
for( V_TARGET_SEGMENTS::iterator idx = m_vTargetBubbles.begin(); idx != m_vTargetBubbles.end(); idx++ ) {
if( !(*idx)->blocked_count < m_sBubbleFilterData.min_block_counts ) {
if ((*idx)->ttl < ctx) {
TARGET_SEGMENT *tData = *idx;
m_vTargetBubbles.erase(idx);
};
};
};
};
m_mDataProtector.unlock();
};
bool kernelEventFilterBubble::initFilter(){
tList = m_pDBC->LoadListRegisteredBubbles();
if ( tList ) {
if ( tList->size() ) {
for ( DBC_INT_LIST::iterator idx = tList->begin(); idx != tList->end(); idx++ ) {
tBubble = m_pDBC->getRegisteredBubble( *idx );
if ( tBubble ) {
if ( !createBubble( tBubble ) ) {
free( tBubble );
};
};
};
};
delete( tList );
};
};
bool kernelEventFilterBubble::checkBubble( TARGET_SEGMENT *bubble, TARGET_DATA *target ){
if ( bubble == NULL ) return false;
if ( target == NULL ) return false;
if ( getDistance( bubble->system_center, target->system_target ) > bubble->boundary ) return false;
return true;
};
bool kernelEventFilterBubble::updateBubble( TARGET_SEGMENT *bubble, TARGET_DATA *target ){
if ( bubble == NULL ) return false;
if ( target == NULL ) return false;
bubble->ttl = getMilliseconds() + m_sBubbleFilterData.ttl;
if (bubble->blocked_count < m_sBubbleFilterData.min_block_counts ) {
switch ( m_sBubbleFilterData.method ) {
case TF_BUBBLE_METHOD_FIXED:{
break;
};
case TF_BUBBLE_METHOD_FIXED_GROW:{
break;
};
case TF_BUBBLE_METHOD_BOUNCE:{
break;
};
case TF_BUBBLE_METHOD_EXTENT:{
break;
};
};
}
return true;//m_pDBC->updateRegisteredBubble(bubble);
};
bool kernelEventFilterBubble::blockCurrentActiveBubbles(){
m_mDataProtector.lock();
for( V_TARGET_SEGMENTS::iterator idx = m_vTargetBubbles.begin(); idx != m_vTargetBubbles.end(); idx++ ) {
if( (*idx)->blocked_count < m_sBubbleFilterData.min_block_counts ){
(*idx)->blocked = true;
(*idx)->blocked_count++;
m_pDBC->updateRegisteredBubble((*idx));
};
};
m_mDataProtector.unlock();
};
bool kernelEventFilterBubble::resetAllBubbles(){
m_mDataProtector.lock();
m_pDBC->cleanRegisteredBubbles();
if ( m_vTargetBubbles.size() ) {
for (V_TARGET_SEGMENTS::iterator idx = m_vTargetBubbles.begin(); idx != m_vTargetBubbles.end(); idx++) free(*idx);
m_vTargetBubbles.clear();
};
m_mDataProtector.unlock();
};
bool kernelEventFilterBubble::validateTarget( uint32_t DevID, TARGET_DATA *ptr ){
bool RetValue = false;
m_mDataProtector.lock();
if ( m_vTargetBubbles.size() ) {
for( V_TARGET_SEGMENTS::iterator idx = m_vTargetBubbles.begin(); idx != m_vTargetBubbles.end(); idx++ ){
if ( checkBubble ( *idx, ptr ) ) {
updateBubble( *idx, ptr );
break;
};
};
};
m_mDataProtector.unlock();
if ( !RetValue ) {
};
return RetValue;
};
//westlaike 203
//Nov 8
//10.134.2.203

40
lib/App/common/kernelEventFilterBubble.h

@ -0,0 +1,40 @@
#ifndef __KERNEL_EVENT_FILTER_BUBBLE__
#define __KERNEL_EVENT_FILTER_BUBBLE__
#include "kernelEventFilter.h"
#include "kernelPrototype.h"
#include "../../components/base/basicThread.h"
#include "../../components/base/basicMutex.h"
typedef std::vector< TARGET_SEGMENT *> V_TARGET_SEGMENTS;
#define TF_BUBBLE_METHOD_FIXED 0
#define TF_BUBBLE_METHOD_FIXED_GROW 1
#define TF_BUBBLE_METHOD_BOUNCE 2
#define TF_BUBBLE_METHOD_EXTENT 3
class kernelEventFilterBubble: public kernelEventFilter{
private:
basicLogCollection * m_pLog;
BUBBLE_FILTER_DATA m_sBubbleFilterData;
basicMutex m_mStateProtector;
basicMutex m_mDataProtector;
V_TARGET_SEGMENTS m_vTargetBubbles;
bool createBubble( TARGET_DATA *ptr ); // From Target First Time
bool createBubble( TARGET_SEGMENT *data ); // From Loaded Data
bool checkBubble( TARGET_SEGMENT *bubble, TARGET_DATA *target );
bool updateBubble( TARGET_SEGMENT *bubble, TARGET_DATA *target );
public:
explicit kernelEventFilterBubble( uint32_t id );
virtual ~kernelEventFilterBubble();
virtual bool validateTarget( uint32_t DevID, TARGET_DATA *ptr );
virtual bool initFilter();
virtual bool stopFilter();
virtual bool validate();
bool blockCurrentActiveBubbles();
bool resetAllBubbles();
};
#endif

10
lib/App/common/kernelEventFilterTrain.cpp

@ -215,7 +215,15 @@ bool kernelEventFilterTrain::validateTarget( uint32_t DevID, TARGET_DATA *ptr ){
if( m_sBottomZone.SuspiciousUnconfirmed == false ){
// Check New Suspicious
#ifdef EFT_MINIMAL_RANGE_SUSPICIOUS
if ( ptr->local_target.r > m_sTrainFilterData.fMinimalRange ) {
float a = sinf( ( ptr->local_target.fi * PI_UTM ) / 360.0f );
float b = cosf( ( ptr->local_target.fi * PI_UTM ) / 360.0f );
float cfr;
if( ptr->local_target.fi > 90.0f ) {
cfr = sqrtf( powf( a*(m_sTrainFilterData.fRightMinimalRange+m_sTrainFilterData.fRightMinimalRange)/2.0f, 2.0f) + powf(b*m_sTrainFilterData.fLeftMinimalRange, 2.0f) );
} else {
cfr = sqrtf( powf( a*(m_sTrainFilterData.fRightMinimalRange+m_sTrainFilterData.fRightMinimalRange)/2.0f, 2.0f) + powf(b*m_sTrainFilterData.fRightMinimalRange, 2.0f) );
};
if ( ptr->local_target.r > cfr ) {
#endif
if ( ptr->area > m_sTrainFilterData.nTrainWidth ) {
m_sBottomZone.SuspiciousObject = true;

4
lib/App/common/serverDataBinder.h

@ -13,7 +13,7 @@
#define ARGUS_CLOUD_STATUS_NA 0
#define ARGUS_CLOUD_STATUS_REG 1
#define ARGUS_CLOUD_STATUS_ONLINE 2
#define ARGUS_CLOUD_STATUS_BUSY 3
#define ARGUS_CLOUD_STATUS_TRAIN 3
#define ARGUS_CLOUD_STATUS_MAINTENENCE 4
#define ARGUS_CLOUD_STATUS_ALARM 5
/*----------- ERRORS -----------------------*/
@ -165,6 +165,7 @@ class serverDataBinder {
virtual uint64_t getBottomLRF( uint64_t id ){ return 0; };
virtual uint32_t getCloudLTS( uint8_t Obj, uint64_t id ){ return 0; };
virtual uint8_t getCloudStatus( uint8_t Obj, uint64_t id ){ return 0; };
virtual bool getDBLoggingSettings( void ){ return false; };
virtual CSTR getMediaUUID( uint64_t id ){ return NULL; };
virtual MODBUS_MANAGER_DATA * getModBusManagerData(){ return NULL; };
virtual MODBUS_RTU_INFO * getModBusRTU( uint64_t id ){ return NULL; };
@ -179,6 +180,7 @@ class serverDataBinder {
virtual uint64_t getSessionOldest( uint8_t min_lvl = 2 ){ return 0; };
virtual uint64_t getSessionTrackId( uint64_t id ){ return 0; };
virtual DBC_SERVA_CONFIG * getServaConfig( ){ return NULL; };
virtual uint16_t getSessionTimeOut(){ return 120;};
virtual uint64_t getTrackIdByMojo( uint64_t id ){ return 0;};
virtual SCADA_TRACK_INFO * getTrackSCADA( uint64_t id ){ return NULL;};
virtual uint64_t getUpperLRF( uint64_t id ){ return 0; };

55
lib/App/common/serverMySQL_dataBinder.cpp

@ -530,6 +530,32 @@ uint8_t servaMySQLDBC::getCloudStatus( uint8_t Obj, uint64_t id ){
return RetVal;
};
bool servaMySQLDBC::getDBLoggingSettings( void ){
bool RetVal = false;
if( m_bIsConnected ){
char tQBuf[MAX_PATH_LEN];
AAssoc *result;
sprintf( tQBuf, "SELECT `use_db_logging` FROM `system_props` WHERE `id`=1" );
#ifdef DEBUG_ALL
LOG(tQBuf);
#endif
result = m_pDatabase->Query( tQBuf );
if( result!= NULL ) {
if( result->size() > 0 ) {
Assoc *cArr;
Assoc::iterator it;
cArr = result->at(0);
it = cArr->find("use_db_logging");
if( it != cArr->end() ){
RetVal = (bool) atoi( it->second.c_str() );
};
};
};
deleteResult( result );
};
return RetVal;
};
uint64_t servaMySQLDBC::getRecentMediaId(){
uint64_t RetVal = 0;
if( m_bIsConnected ){
@ -825,7 +851,34 @@ uint64_t servaMySQLDBC::getSessionOldest( uint8_t min_lvl ){
};
return RetVal;
};
uint16_t servaMySQLDBC::getSessionTimeOut(){
uint16_t RetVal = 120;
if( m_bIsConnected ){
char tQBuf[MAX_PATH_LEN];
AAssoc *result;
sprintf( tQBuf, "SELECT `session_end` FROM `system_props` WHERE `id`=1" );
#ifdef DEBUG_ALL
LOG(tQBuf);
#endif
result = m_pDatabase->Query( tQBuf );
if( result!= NULL ) {
if( result->size() > 0 ) {
Assoc *cArr;
Assoc::iterator it;
cArr = result->at(0);
it = cArr->find("session_end");
if( it != cArr->end() ){
RetVal = atoi( it->second.c_str() ) - 1;
if ( RetVal ) {
RetVal *=60;
} else RetVal = 30;
};
};
};
deleteResult( result );
};
return RetVal;
};
uint64_t servaMySQLDBC::getSessionTrackId( uint64_t id ){
uint64_t RetVal = 0;
if( m_bIsConnected ){

2
lib/App/common/serverMySQL_dataBinder.h

@ -34,6 +34,7 @@ class servaMySQLDBC: public serverDataBinder {
virtual uint64_t getBottomLRF( uint64_t id );
virtual uint32_t getCloudLTS( uint8_t Obj, uint64_t id );
virtual uint8_t getCloudStatus( uint8_t Obj, uint64_t id );
virtual bool getDBLoggingSettings( void );
virtual CSTR getMediaUUID( uint64_t id );
virtual MODBUS_MANAGER_DATA * getModBusManagerData();
virtual MODBUS_RTU_INFO * getModBusRTU( uint64_t id );
@ -47,6 +48,7 @@ class servaMySQLDBC: public serverDataBinder {
virtual SESSION_DATA * getSessionData( uint64_t id );
virtual uint64_t getSessionOlderThan( uint32_t ts, uint8_t min_lvl = 2 );
virtual uint64_t getSessionOldest( uint8_t min_lvl = 2 );
virtual uint16_t getSessionTimeOut();
virtual uint64_t getSessionTrackId( uint64_t id );
virtual uint64_t getTrackIdByMojo( uint64_t id );
virtual SCADA_TRACK_INFO * getTrackSCADA( uint64_t id );

3
lib/App/mojo/mojoRemoteClient.cpp

@ -31,7 +31,7 @@ mojoRemoteClient::mojoRemoteClient( mojoKernel * ptr ):protocolParser(){
};
mojoRemoteClient::~mojoRemoteClient(){
LOG("Destructor");
LOG("Destructor");
if( m_bRegisteredWithRemotePeer ) {
LOG("Flushing");
while ( m_bRegisteredWithRemotePeer ) {
@ -53,6 +53,7 @@ mojoRemoteClient::~mojoRemoteClient(){
};
m_mCurrentVTRProtector.unlock();
};
setAutomationStage( ARGUS_RPC_STAGE_DISCONNECT );
LOG("Flushing Done!");
waitThreadEnd( true );
flushTransactions();

14
lib/App/serva/servaBackend.cpp

@ -390,10 +390,13 @@ int main( int argc, char *argv[] ){
//m_pLog->addHandler((_Core_Logging_Service *) new _Core_CLUI());
};
uint8_t ExitCode = 0;
SettingsProvider = basicSettingsProvider::getInstance( DCF_NAME );
Settings = SettingsProvider->getSubNode( NULL, "GENERAL" );
Settings = SettingsProvider->getSubNode( NULL, "GENERAL" );
uint8_t ExitCode = 0;
/*
bool SSDP_ENABLE = false;
config_setting_t * pSetting = NULL;
@ -403,7 +406,9 @@ int main( int argc, char *argv[] ){
config_setting_set_bool( pSetting, SSDP_ENABLE );
basicSettingsProvider::getInstance()->compromise();
LOG("Manufacturer not set - using default");
};
};
*/
/*
if(!config_setting_lookup_bool( Settings, "DB_LOG_ENABLE", (int*) &DLE )){
pSetting = config_setting_add( Settings, "DB_LOG_ENABLE", CONFIG_TYPE_BOOL );
DLE = false;
@ -411,6 +416,7 @@ int main( int argc, char *argv[] ){
basicSettingsProvider::getInstance()->compromise();
LOG("DB Logging not set - using default");
};
*/
SettingsProvider->validate();
@ -425,7 +431,7 @@ int main( int argc, char *argv[] ){
delete( m_pLog );
return -1;
};
if ( DLE ) {
if ( DBC->getDBLoggingSettings() ) {
LOG("Adding Database Log Service!");
m_pLog->addHandler((basicLoggingService *) new objectMySQLLoggingService( DBC ));
};

13
lib/App/serva/servaModBusManager.h

@ -28,11 +28,20 @@ class servaKernel;
#define IMMIDIATE_ACTION 0
typedef struct S_MODBUS_ACION_ITEM{
typedef struct S_MODBUS_MODULE_ITEM{
uint64_t module_id;
uint64_t scheduled_on;
uint8_t value;
uint8_t mask;
}MODBUS_MODULE_ITEM;
typedef std::vector<MODBUS_MODULE_ITEM> V_MODBUS_MODULES_GROUP;
typedef struct S_MODBUS_ACION_ITEM{
uint64_t module_id;
//V_MODBUS_MODULES_GROUP ctl_group;
uint64_t scheduled_on;
uint8_t value;
uint8_t mask;
}MODBUS_ACION_ITEM;
typedef std::vector<MODBUS_ACION_ITEM*> V_MODBUS_ACION_ITEMS;

1121
lib/App/serva/servaRemoteClientHandler.cpp
File diff suppressed because it is too large
View File

6
lib/App/serva/servaRemoteClientHandler.h

@ -47,6 +47,8 @@ class servaVideoTransferHelper{
bool init( CSTR base, uint64_t MID, uint64_t SID, ARGUS_DATA_VIDEO_INFO *ptr );
uint64_t getReferenceID(){ return m_nRemoteRefID; };
};
#define TRAIN_ON_TRACK true
#define TRAIN_IS_GONE false
class servaRPCHadnler: public basicThread, public networkClientHandler, public protocolParser{
private:
@ -67,6 +69,8 @@ class servaRPCHadnler: public basicThread, public networkClientHandler, public p
servaVideoTransferHelper m_pVideoHelper;
basicMutex m_mCloudProtector;
uint32_t m_nCloudStatus;
uint32_t m_nPreTrainCloudStatus;
bool m_bTrainOnTrack;
bool peer_send_ack_evt( uint64_t evt_dbid, CSTR uuid );
bool peer_send_req_draw( uint8_t sensor, uint8_t draw_type = ARGUS_RPC_DRAW_TYPE_FAST, bool getexisted = true );
bool peer_send_reg_status( uint8_t status );
@ -74,6 +78,7 @@ class servaRPCHadnler: public basicThread, public networkClientHandler, public p
bool peer_send_time_sync_ack( ARGUS_DATA_TIME_SYNC_ACK *ptr );
bool peer_send_vdata_ack( uint8_t status );
bool peer_send_vinfo_ack( uint64_t pid );
bool setTrainPresense( bool TST );
protected:
virtual int packetChecker(U8 *Buffer, size_t BufferSize);
virtual protocolPackage * packetExtractor(U8 *Buffer, size_t BufferSize);
@ -86,6 +91,7 @@ class servaRPCHadnler: public basicThread, public networkClientHandler, public p
virtual bool dispatchEvent( EVENT_CONTAINER *Evt );
virtual bool getStatus( void );
bool setRemotePeerIP( CSTR ptr );
bool getTrainStatus(){ return m_bTrainOnTrack; };
};

66
lib/App/serva/servaSessionManager.cpp

@ -38,7 +38,7 @@ servaSessionManager::servaSessionManager( config_setting_t * Settings ){
int tVal;
const char * tBuf;
char tBuffer[128];
/*
if(!config_setting_lookup_int(m_pSettings, "SESSION_TIMEOUT", &tVal )){
pSetting = config_setting_add(m_pSettings, "SESSION_TIMEOUT", CONFIG_TYPE_INT);
m_nSessionTO = DEFAULT_SESSION_TIMEOUT;
@ -50,6 +50,9 @@ servaSessionManager::servaSessionManager( config_setting_t * Settings ){
sprintf( tBuffer, "Session Timeout Read From Settings: %d sec.", m_nSessionTO );
LOG( tBuffer );
};
*/
m_nSessionTO = m_pDBC->getSessionTimeOut();
if(!config_setting_lookup_string(m_pSettings, "REPORTS_DIR_NAME", &tBuf )){
pSetting = config_setting_add(m_pSettings, "REPORTS_DIR_NAME", CONFIG_TYPE_STRING);
sprintf( m_pDbReportBase, "data/reports" );
@ -247,6 +250,7 @@ bool servaSessionManager::addVideo( DBC_RPC_MEDIA_INFO_EX *ptr ){//uint32_t modu
bool bExpiredSession = false;
SESSION_DATA *sp = validateSession( ptr->session_id );
if ( sp == NULL ) {
LOG("Session Allredy Closed");
sp = reopenSession( ptr->session_id );
if ( sp == NULL ) {
LOG_ERROR( "Session Data ptr is null!");
@ -270,14 +274,11 @@ bool servaSessionManager::addVideo( DBC_RPC_MEDIA_INFO_EX *ptr ){//uint32_t modu
ptr->fmt,
ptr->fps
);
#ifdef DEBUG_EXTRA
#ifdef DEBUG
LOG( tQBuf );
#endif
bool rv = sp->m_pDataReport->SilentQuery( tQBuf );
if( bExpiredSession ){
delete( sp->m_pDataReport );
free( sp );
};
if( bExpiredSession ) dropSession( ptr->session_id );
return rv;
} else {
LOG_ERROR( "Report DB is closed!");
@ -295,18 +296,23 @@ CSTR servaSessionManager::getReportDir( uint64_t track_id, uint32_t ts ){
REPORT_DIRINFO tRDF;
fillRDF( ts, tRDF );
sprintf( retVal, "%s/%" PRIu64 "/%s/%s/%s", m_pDbReportBase, track_id, tRDF.YEAR, tRDF.MONTH, tRDF.DAY );
#ifdef DEBUG_EXTRA
LOG( retVal );
#endif
return strdup( retVal );
};
CSTR servaSessionManager::getSessionBase( uint64_t sid ){
CSTR rData = NULL;
SESSION_DATA *sp = validateSession( sid );
if ( sp ) return strdup( sp->reportVaultPath );
//Get Session Base from Database then
LOG("Reopen Session!");
//TODO: Get Session Base from Database then (not open/close session)
sp = reopenSession( sid );
if ( sp ) return strdup( sp->reportVaultPath );
return NULL;
if ( sp ) {
rData = strdup( sp->reportVaultPath );
dropSession( sid );
};
return rData;
};
SESSION_DATA *servaSessionManager::reopenSession( uint64_t session_id ){
@ -391,7 +397,9 @@ SESSION_DATA *servaSessionManager::reopenSession( uint64_t session_id ){
if ( tData ){
LOG("Assign Session To Vector!");
m_mSessionProtector.lock();
m_mSessions[tData->track_id] = tData;
m_mSessionProtector.unlock();
};
return tData;
};
@ -399,11 +407,14 @@ SESSION_DATA *servaSessionManager::reopenSession( uint64_t session_id ){
SESSION_DATA *servaSessionManager::updateSession( uint64_t tack_id, uint64_t module_id ){
SESSION_DATA * tData = NULL;
try {
m_mSessionProtector.lock();
tData = m_mSessions.at( tack_id );
m_mSessionProtector.unlock();
#ifdef DEBUG
LOG("Have Opened Session");
#endif
} catch ( ... ) {
m_mSessionProtector.unlock();
// No Session -> Create one
tData = (SESSION_DATA*) malloc( sizeof(SESSION_DATA) );
if ( tData ) {
@ -497,7 +508,9 @@ SESSION_DATA *servaSessionManager::updateSession( uint64_t tack_id, uint64_t mod
free( tData );
tData = NULL;
} else {
m_mSessionProtector.lock();
m_mSessions[tack_id] = tData;
m_mSessionProtector.unlock();
//Propogate Event ->Session Start
EVENT_CONTAINER *tEvt = createBasicEvent( tack_id, EVT_CLASS_SYSTEM, EVT_SRV_SESSION_STARTED );
if ( tEvt ) basicEventHeap::getInstance()->broadcast( tEvt );
@ -524,6 +537,7 @@ bool servaSessionManager::validate(){
uint32_t cts = time( NULL );
M_SESSIONS::iterator dE;
bool bMustDelete = false;
m_mSessionProtector.lock();
for( M_SESSIONS::iterator idx = m_mSessions.begin(); idx != m_mSessions.end(); idx++ ){
if ( (*idx).second ) {
#ifdef DEBUG_EXTRA
@ -553,6 +567,7 @@ bool servaSessionManager::validate(){
(*dE).second = NULL;
m_mSessions.erase( dE );
};
m_mSessionProtector.unlock();
return true;
};
@ -563,30 +578,25 @@ SESSION_DATA *servaSessionManager::validateSession( uint64_t sid ){
};
bool servaSessionManager::dropSession( uint64_t session_id ){
M_SESSIONS::iterator dE;
bool bMustDelete = false;
#ifdef DEBUG_EXTRA
#ifdef DEBUG
LOG("Drop Session!");
#endif
for( M_SESSIONS::iterator idx = m_mSessions.begin(); idx != m_mSessions.end(); idx++ ){
if ( (*idx).second ) {
if( (*idx).second->db_id == session_id ) {
bMustDelete = true;
break;
};
};
};
if ( bMustDelete ) {
// Remove Session
delete( (*dE).second->m_pDataReport );
free( (*dE).second );
(*dE).second = NULL;
m_mSessions.erase( dE );
return true;
};
if ( (*idx).second ) if ((*idx).second->db_id == session_id) return dropSession( idx );
};
return false;
};
bool servaSessionManager::dropSession( M_SESSIONS::iterator idx ){
m_mSessionProtector.lock();
delete( (*idx).second->m_pDataReport );
free( (*idx).second );
(*idx).second = NULL;
m_mSessions.erase( idx );
m_mSessionProtector.unlock();
return true;
};
bool servaSessionManager::eraseSession( uint64_t session_id ){
//Erase just not important sessions
// In case The session is Opened!

3
lib/App/serva/servaSessionManager.h

@ -7,6 +7,7 @@
#include "../common/dataBinder_ReportAux.h"
#include "../../components/base/basicSettingsProvider.h"
#include "../../components/base/basicEvent.h"
#include "../../components/base/basicMutex.h"
#include "../common/serverDataBinder.h"
#include "../../data/protocol/protocolARGUS_DATA.h"
@ -24,10 +25,12 @@ class servaSessionManager{
bool m_bRepIsConnected;
char web_access_user[64];
char web_access_group[64];
basicMutex m_mSessionProtector;
char m_pDbReportBase[MAX_PATH];
bool addEvent( SESSION_DATA *sp, ARGUS_DATA_EVENT *ptr ); //DBC_EVT_RECORD *ptr );
SESSION_DATA * reopenSession( uint64_t session_id );
bool dropSession( uint64_t session_id );
bool dropSession( M_SESSIONS::iterator idx );
protected:
explicit servaSessionManager( config_setting_t * Settings );
public:

6
lib/alg/generic/Transform.cpp

@ -25,6 +25,12 @@
}
#endif
C3D_FLOAT getDistance( C3D_DECART B, C3D_DECART B ){
C3D_FLOAT dx2 = C3D_POW( B.x - B.x, 2.0f);
C3D_FLOAT dy2 = C3D_POW( B.y - B.y, 2.0f);
C3D_FLOAT dz2 = C3D_POW( B.z - B.z, 2.0f);
return C3D_SQRT( dx2 + dy2 + dz2 );
};
void spherical2decart(C3D_SPH_DEGREES in, C3D_DECART &out){
C3D_FLOAT tT, tF;

2
lib/alg/generic/Transform.h

@ -126,6 +126,8 @@ void translate2local(S_TRANS_MATRIX mat, C3D_DECART world, C3D_DECART &local);
void translate2world(S_TRANS_MATRIX mat, C3D_DECART local, C3D_DECART &world);
void transponeMatrix(S_TRANS_MATRIX in, S_TRANS_MATRIX &out);
C3D_FLOAT getDistance( C3D_DECART B, C3D_DECART B );
struct ptz_params {
float pan;
float tilt;

15
lib/components/base/basicEvent.h

@ -191,11 +191,22 @@ typedef struct S_TARGET_DATA {
C3D_SPH_DEGREES local_target;
C3D_DECART system_target;
C3D_WGS84_LOC global_target;
uint32_t digital;
uint8_t lrf_id;
uint16_t digital;
uint32_t segment_id; /* Systemwide ID */
uint8_t lrf_id; /* Sensorwide ID */
float area;
}TARGET_DATA;
typedef struct S_TARGET_SEGMENT{
uint32_t id;
C3D_DECART system_center;
float boundary;
uint64_t ttl; // milliseconds
bool blocked;
uint8_t hit_count;
uint8_t blocked_count;
}TARGET_SEGMENT;
typedef struct S_CLIENT_EVENT{
uint8_t type; //basicEventTypeID
uint32_t uts; //Time Stamp Seconds

5
lib/rgoose/rgooseTargetFilter.h

@ -6,9 +6,10 @@
#include "rgooseDBConnector.h"
typedef enum E_TARGET_FILTER_TYPE{
TR_UDEFINED_FILTER = 0,
TF_UDEFINED_FILTER = 0,
TF_LA_METRO_TRAIN_FILTER = 1,
TF_AUTHORISED_PEOPLE_FILTER = 2
TF_AUTHORISED_PEOPLE_FILTER = 2,
TF_BUBBLE_SEGMENTATION_FILTER = 3
}TARGET_FILTER_TYPE;
class ARGUS_TARGET_FILTER{

Loading…
Cancel
Save