1
0

struct_def.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // struct and constant
  2. #ifndef STRUCT_DEF_H
  3. #define STRUCT_DEF_H
  4. struct card_pos
  5. {
  6. card_pos()
  7. {
  8. work_line=0; //1.一线工人 2.二线工人等
  9. rec_time=0;
  10. running_stat=-1;
  11. biz_stat=-1;
  12. vibration=0;
  13. map_id=-1;//enter_time=0;leave_time=0;
  14. x=y=z=0;
  15. type=id=identifier_id=dpt_id=0;
  16. final_v = 0.0;
  17. work_type_id =reader_id = 0;
  18. reader_x = 0.0;
  19. reader_y = 0.0;
  20. }
  21. void copy(const card_pos & pos)
  22. {
  23. *this = pos;
  24. }
  25. int work_line; // work level
  26. uint64_t rec_time; // receive time
  27. int running_stat; // sport status
  28. int biz_stat; // business status
  29. int vibration; // vibration for coalface and drivingface machine
  30. int map_id; // map sacle id
  31. double x; // located x
  32. double y; // located y
  33. double z; // located z
  34. uint64_t type; // card type
  35. uint32_t id; // card id
  36. uint32_t identifier_id; // staff id
  37. uint32_t dpt_id; //部门ID
  38. int work_type_id;
  39. int reader_id; //分站ID
  40. double reader_x; //分站X
  41. double reader_y; //分站Y
  42. double final_v;
  43. };
  44. struct area_data{
  45. area_data()
  46. {
  47. is_work_area = false;
  48. area_id = area_type = 0;
  49. enter_time = leave_time = 0;
  50. }
  51. bool is_work_area;
  52. int area_id;
  53. int area_type;
  54. uint64_t enter_time;
  55. uint64_t leave_time;
  56. };
  57. struct db_para
  58. {
  59. std::string Host;//数据库主机地址
  60. std::string User;//用户名
  61. std::string PWD;//密码
  62. std::string DBName;//数据库名
  63. std::string CharSet;//字符集
  64. int TimeOut;
  65. int PoolSize;
  66. int Port; //端口
  67. };
  68. #endif