123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- /********************************************************************************
- * File Name: GpsTask.h
- * Function Describe: Header file for GpsTask.c
- * Explain:
- * Writer: ShiLiangWen
- * Date: 2015-4-12
- *******************************************************************************/
- #ifndef __GPS_TASK_H
- #define __GPS_TASK_H
- /************************************file begin*******************************/
- #include <rtl.h>
- #include "Message.h"
- #define NO_GPS_CHECK_TIMEOUT 10 //10秒
- extern int g_iCSQ;
- extern unsigned char TimeFlag;
- typedef struct SUTDL
- {
- union {
- struct { unsigned char b1,b2,b3,b4; }ucData;
- unsigned long ulData;
- }Data;
- }SUTDL;
- typedef struct SUTDS
- {
- union {
- struct { unsigned char b1,b2; }ucData;
- unsigned short usData;
- }Data;
- }SUTDS;
- typedef enum {INVALID=0,OPEN=1,CLOSE=2,SYN_SENT=3} STATUE;
- typedef struct SUT_GPS_STATUS
- {
- STATUE ServerStatus;
- STATUE PPPStatus;
- STATUE IPStatus;
- unsigned char CheckCnt;//超过一段时间还是没检测到GPS,则认为是此机型没GPS,播报时只播报鉴权状态
- unsigned char cregStatus;
- }SUT_GPS_STATUS;
- extern SUT_GPS_STATUS sutGpsStatus;
- /****************************************************
- 此处定义的长度很重要,如果长度不是与Message定义的长度一致会出现短信处显示全0满状态,添加不进短信的状态
- *****************************************************/
- typedef struct SUT_MESS
- {
- #if 1
- unsigned char Update;
- unsigned char forcePullGroupOn;//强拉动作开启
- unsigned char startCntFlag;
- unsigned char skipCnt;
- unsigned char GBKMess1[SMS_SIGNAL_LEN+1];//最后一个用来补作结尾
- unsigned short len;
- unsigned char codeType;
- #else
- char GBKMess[SMS_SIGNAL_LEN+1];
- char GBKMess1[SMS_SIGNAL_LEN+1];//最后一个用来补作结尾
- unsigned short len;
- unsigned short flag;
- #endif
- }SUT_MESS;
- extern SUT_MESS sutMess;
- extern const unsigned char GPS_TimeTable[5];
- extern unsigned char sucGpsSentTcpCt;//从启动发送到收到计数器
- extern unsigned int heartTickCt;
- void GpsTaskTick(unsigned char reset);
- void AtHandle(char *pMsg);
- void GpsCtrlSendPos(void);
- int GetCSQ(char* msg);
- STATUE GetIPStatus(char *msg);
- //__task void GpsTask(void);
- STATUE GetIPNewStatus(char *msg, unsigned char socketNum);
- void StartFeedBack(void);
- /************************************file end ******************************************/
- #endif
|