message.h 982 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef __MESSAGE_HPP__
  2. #define __MESSAGE_HPP__
  3. #include <stdint.h>
  4. #include <time.h>
  5. struct zistream;
  6. // 分站传上来的卡定位数据,包括tof,tdoa
  7. struct message_locinfo
  8. {
  9. uint64_t m_time_stamp;
  10. uint32_t m_site_id;
  11. time_t m_site_time;
  12. uint32_t m_card_type;
  13. uint32_t m_card_id;
  14. uint64_t m_tof;
  15. uint16_t m_card_ct;
  16. uint8_t m_batty_status;
  17. uint8_t m_callinfo;//0x80-呼救,0x01-一般呼叫,0x02-紧急呼叫
  18. uint8_t m_rav;
  19. uint8_t m_acc;
  20. uint8_t m_ant_id;
  21. uint16_t m_sync_ct;
  22. uint16_t m_rssi;
  23. void zero_this();
  24. void load(zistream&is,bool tdoa);
  25. int64_t long_id()const
  26. {
  27. return (((int64_t)m_card_type)<<32)|m_card_id;
  28. }
  29. };
  30. //tdoa分站同步数据
  31. struct message_tdoasync
  32. {
  33. uint32_t m_local_site_id;
  34. uint32_t m_parent_site_id;
  35. uint16_t m_local_ant_id;
  36. uint16_t m_parent_ant_id;
  37. uint16_t m_sync_ct;
  38. uint16_t m_local_level;
  39. uint64_t m_recv_time;
  40. uint64_t m_send_time;
  41. void zero_this();
  42. void load(zistream&is);
  43. };
  44. #endif