netWork.c 733 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "includes.h"
  2. STATUE netPPP=CLOSE;
  3. void FotaTickHandler(unsigned char socketID){
  4. //buBiaoLogic(socketID);
  5. }
  6. /*
  7. 做GPS服务器发送业务 主要是用于鉴权和获取系统时间
  8. */
  9. void buBiaoTickHandler(unsigned char socketID){
  10. buBiaoLogic(socketID);
  11. }
  12. /*
  13. 做GPS服务器接收业务
  14. */
  15. void buBiaoRecvHandler(unsigned char *data, unsigned int len){
  16. unsigned short length;
  17. if(data[0]==TSGPS_PACK_HEAD && data[len-1]==TSGPS_PACK_END){
  18. length=reduce(data+1, len-1);
  19. buBiaoDataProcess(data, length);
  20. }else SlwTrace(INF, "Not Bubaio protol",1);
  21. }
  22. /*
  23. 做布标socket被断开业务(可能是服务器关断,也可能是终端自己发指令关)
  24. */
  25. void buBiaoSocketShutDown(unsigned char socketID){
  26. SlwTrace(INF, "buBiaoSocket Down",1);
  27. sutGpsInfo.isGpsAuthOk=0;
  28. }