123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- // struct and constant
- #ifndef STRUCT_DEF_H
- #define STRUCT_DEF_H
- struct card_pos
- {
- card_pos()
- {
- work_line=0; //1.一线工人 2.二线工人等
- rec_time=0;
- running_stat=-1;
- biz_stat=-1;
- vibration=0;
- map_id=-1;//enter_time=0;leave_time=0;
- x=y=z=0;
- type=id=identifier_id=dpt_id=0;
- final_v = 0.0;
- work_type_id =reader_id = 0;
- reader_x = 0.0;
- reader_y = 0.0;
- }
- void copy(const card_pos & pos)
- {
- *this = pos;
- }
- int work_line; // work level
- uint64_t rec_time; // receive time
- int running_stat; // sport status
- int biz_stat; // business status
- int vibration; // vibration for coalface and drivingface machine
- int map_id; // map sacle id
- double x; // located x
- double y; // located y
- double z; // located z
- uint64_t type; // card type
- uint32_t id; // card id
- uint32_t identifier_id; // staff id
- uint32_t dpt_id; //部门ID
- int work_type_id;
- int reader_id; //分站ID
- double reader_x; //分站X
- double reader_y; //分站Y
- double final_v;
- };
- struct area_data{
- area_data()
- {
- is_work_area = false;
- area_id = area_type = 0;
- enter_time = leave_time = 0;
- }
- bool is_work_area;
- int area_id;
- int area_type;
- uint64_t enter_time;
- uint64_t leave_time;
- };
- struct db_para
- {
- std::string Host;//数据库主机地址
- std::string User;//用户名
- std::string PWD;//密码
- std::string DBName;//数据库名
- std::string CharSet;//字符集
- int TimeOut;
- int PoolSize;
- int Port; //端口
- };
- #endif
|