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.

63 lines
1.5 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __PATHFINDER_BINARY_LOG_HEADER__
  2. #define __PATHFINDER_BINARY_LOG_HEADER__
  3. #include "../../pathfinder/pathfinderDBConnector.h"
  4. #include "../base/basicFunctionality.h"
  5. #include "../base/basicMutex.h"
  6. #include "../base/basicSettingsProvider.h"
  7. #include <arpa/inet.h>
  8. #include <ctype.h>
  9. #include <err.h>
  10. #include <errno.h>
  11. #include <getopt.h>
  12. #include <ifaddrs.h>
  13. #include <netdb.h>
  14. #include <netinet/ip.h>
  15. #include <netinet/udp.h>
  16. #include <paths.h>
  17. #include <poll.h>
  18. #include <signal.h>
  19. #include <stdint.h>
  20. #include <stdio.h>
  21. #include <stdlib.h>
  22. #include <string.h>
  23. #include <sys/param.h> /* MIN() */
  24. #include <sys/socket.h>
  25. #include <time.h>
  26. #include <unistd.h>
  27. class objectPathfinderBinaryLog
  28. {
  29. protected:
  30. char m_sUUID[42];
  31. PATHFINDER_DBC * m_pDBC;
  32. public:
  33. static objectPathfinderBinaryLog * getInstance();
  34. void attachDBC(PATHFINDER_DBC * DBC);
  35. bool activate();
  36. bool finish();
  37. bool deleteDataFile(CSTR name);
  38. void registerGPS(GPS_EVTREC * ptr);
  39. void registerBNO(BNO_EVTREC * ptr);
  40. void registerOPF(OPF_EVTREC * ptr);
  41. void registerPIC(PF_TIMESTAMP * ts, CSTR name);
  42. void registerLFS(LRF_EVTREC * ptr);
  43. private:
  44. basicLogCollection * m_pLog;
  45. static objectPathfinderBinaryLog * _instance;
  46. basicMutex m_mProtector;
  47. objectPathfinderBinaryLog();
  48. virtual ~objectPathfinderBinaryLog();
  49. uint32_t m_nDBID;
  50. bool m_bActive;
  51. void uuidgen(bool gen = true);
  52. FILE * m_pFID;
  53. };
  54. #endif