WiredLanTask.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /********************************************************************************
  2. * File Name: WiredLanTask.h
  3. * Function Describe: Header file for WiredLanTask.c
  4. * Explain:
  5. * Writer:
  6. * Date:
  7. *******************************************************************************/
  8. #ifndef __WIRE_LAN_TASK_H
  9. #define __WIRE_LAN_TASK_H
  10. //-------------------------------------------------------------------------------
  11. #include <rtl.h>
  12. typedef struct SUT_WL_STATUS
  13. {
  14. uint8_t NetFlag;//网络状态 0--网络芯片未完成初始化 1--网络IC初始化成功但网线未链接 2--网线已插入但DHCP未分配IP 3--DHCP已分配内网IP
  15. uint8_t ConnectEnable;//链接使能 0--不允许链接服务器 1--允许链接服务器
  16. uint8_t SocketOpened;//Socket已绑定
  17. uint8_t Connected;//0未链接 1已链接
  18. uint8_t Logined;//0未登陆 1已登陆
  19. uint8_t SendRegCt; //发送登陆包次数计数器
  20. uint8_t SendRegCtrlCt;//发送登陆包控制计数器
  21. uint8_t SendTestCt; //发测试包次数计数器
  22. uint8_t SendTestCtrlCt;//发测试包控制计数器
  23. uint8_t SendTestInterval;//发送Test间隔
  24. uint16_t TaskRunSec;//运行了多久
  25. uint16_t OffLineCt;//离线时间
  26. }SUT_WL_STATUS;
  27. extern SUT_WL_STATUS sutWLanStatus;
  28. typedef enum {TIMEOUT=-1,INVALID=0,OPENED=1,CLOSED=2,SYN_SENT=3} STATUE;
  29. extern STATUE ServerStatus;
  30. #define WIRE_LAN_TASK_STK_SIZE 200 //200
  31. extern U64 stkWLANTask[WIRE_LAN_TASK_STK_SIZE];
  32. extern OS_TID idWLanTask;
  33. extern U64 stkWLANTask[WIRE_LAN_TASK_STK_SIZE];
  34. __task void WiredLanTask(void);
  35. //-------------------------------------------------------------------------------
  36. #endif
  37. //-------------------------------------------------------------------------------