123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- #ifndef _XINBIAO_H_
- #define _XINBIAO_H_
- #define XINBIAO_NUM 100
- #define XINBIAO_FILE "/ext/prepack/xinbiao"
- #define LEADER_FILE "/ext/prepack/leader"
- /*
- 信标协议 cmd 00 通用
- 0a 摇晕 只收不发
- a0 解除摇晕
- 0b 摇毙 不收不发
- b0 解除摇毙
- 0c 强制打开GPS
- */
- #define NULLCMD 0x00
- #define YAOYUN 0xa0
- #define UNYAOYUN 0x0a
- #define YAOBI 0x0b
- #define UNYAOBI 0xb0
- #define GPSALLON 0x0c
- #define MAX_USER 100
- typedef struct{
- unsigned int xb_id;// 结构体index 也做作为mark
- unsigned int xb_CallID;
- unsigned char xb_CallName[26];
- unsigned int xb_longitue;//经度
- unsigned int xb_latitue;//纬度
- unsigned int xb_heading;//航向
- unsigned int xb_headerSpeed;
- unsigned short xb_elevation;//海拔
- unsigned short xb_dir;//相对方向
- unsigned short xb_distance; //相对距离
- }SUT_XINBIAO_PAGE;
- extern SUT_XINBIAO_PAGE sut_xinbiaopage[XINBIAO_NUM];
- extern SUT_XINBIAO_PAGE New_xinbiaopage;
- typedef struct{
-
- unsigned char Max_id;//最大值
-
- }SUT_XINBIAO_INFO;
- typedef struct{
- int id;
- char UserName[26];
- }USERARR;
- typedef struct{
- char status;
- int id;
- }LEADER;
- extern SUT_XINBIAO_INFO sut_xinbiao_info;
- extern USERARR UserArr[MAX_USER];
- extern LEADER leader[XINBIAO_NUM];
- void Recv_PackNewxinbiaopage(char*msg);
- void XinbiaoPackSend(char cmd);
- void Xinbiao_handler(unsigned int interval);
- /*
- 首长功能
- */
- signed char Record_Leader_CurIndex();
- char Record_Leader_Scanf(int id);
- void Record_Leader_Status(char type);
- void LeaderPackSend(char cmd);
- void LeaderRecv_handler(char*msg,char type);
- void ReadLeaderFile();
- void WriteLeaderFile();
- #endif
|