1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- /********************************************************************************
- * 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秒
- #define GPS_TABLE_NUM 8
- 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;
- typedef struct{
- unsigned char reTryPerSeconds;//重新鉴权/注册时间间隔
- unsigned char reTryAuthTimes;//连接鉴权多少次失败后做一次注册操作
- }SUT_AUTHCTL;
- extern SUT_AUTHCTL sutGpsCtl;
- /****************************************************
- 此处定义的长度很重要,如果长度不是与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 short GPS_TimeTable[GPS_TABLE_NUM];
- extern unsigned char sucGpsSentTcpCt;//从启动发送到收到计数器
- extern unsigned int heartTickCt;
- extern unsigned char TeminalInfoRevOK;
- void GpsTaskTick(unsigned char reset);
- void AtHandle(char *pMsg);
- void GpsCtrlSendPos(void);
- int GetCSQ(char* msg);
- STATUE GetPPPStatus(char *msg);
- STATUE GetIPStatus(char *msg);
- void RecvModemData(char *msg);
- //__task void GpsTask(void);
- STATUE GetIPNewStatus(char *msg, unsigned char socketNum);
- void StartFeedBack(void);
- void IPStatusAna(char *msg, unsigned char *socket, STATUE *status);
- /************************************file end ******************************************/
- #endif
|