You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __KERNEL_BOSCH_MODULE_HEADERS__
  2. #define __KERNEL_BOSCH_MODULE_HEADERS__
  3. #include "../components/base/basicEventHeap.h"
  4. #include "../components/base/basicThread.h"
  5. //#include "../data/protocol/protocolBVMS.h"
  6. #include "../../data/curl/curlRequestsManager.h"
  7. #include "kernelModule.h"
  8. //#define DEBUG_BVMS_TRAFFIC
  9. #ifndef CURL_MANAGER
  10. #define CURL_MANAGER
  11. #endif
  12. class kernelModuleBosch : public kernelModule {
  13. private:
  14. CURL * m_pCURL;
  15. curlRequestsManager * m_pHttpAccessManager;
  16. basicMutex m_mResponseProtector;
  17. basicEventHeap * m_pEventHeap;
  18. REST_SETTINGS m_sRestSettings;
  19. bool _send_request(CSTR url, CSTR post_string );
  20. bool buildTargetEventMsg( CSTR Buffer, float az, float range, float lat, float lon, float alt, uint64_t extID, CSTR src_Name );
  21. bool buildCameraEventMsg( CSTR Buffer, CSTR CamName, uint8_t Status );
  22. public:
  23. explicit kernelModuleBosch(uint32_t ModuleID);
  24. virtual ~kernelModuleBosch();
  25. virtual bool reloadSettings();
  26. virtual bool startService();
  27. virtual bool stopService(bool force = false);
  28. virtual bool dispatchEvent(EVENT_CONTAINER * Evt);
  29. virtual bool validate();
  30. };
  31. #endif