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.

40 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. #define ZORRONET_PACKETS
  10. #ifndef CURL_MANAGER
  11. #define CURL_MANAGER
  12. #endif
  13. class kernelModuleBosch : public kernelModule {
  14. private:
  15. CURL * m_pCURL;
  16. curlRequestsManager * m_pHttpAccessManager;
  17. basicMutex m_mResponseProtector;
  18. basicEventHeap * m_pEventHeap;
  19. REST_SETTINGS m_sRestSettings;
  20. bool _send_request(CSTR url, CSTR post_string );
  21. bool buildTargetEventMsg( CSTR Buffer, float az, float range, float lat, float lon, float alt, uint64_t extID, CSTR src_Name );
  22. bool buildCameraEventMsg( CSTR Buffer, CSTR CamName, uint8_t Status );
  23. public:
  24. explicit kernelModuleBosch(uint32_t ModuleID);
  25. virtual ~kernelModuleBosch();
  26. virtual bool reloadSettings();
  27. virtual bool startService();
  28. virtual bool stopService(bool force = false);
  29. virtual bool dispatchEvent(EVENT_CONTAINER * Evt);
  30. virtual bool validate();
  31. };
  32. #endif