net_debug.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /******************************************************************************
  2. 版权所有:
  3. 文件名称: net_debug.h
  4. 文件版本: 01.01
  5. 创建作者: sunxi
  6. 创建日期: 2010-06-24
  7. 功能说明: 网络调试接口。
  8. 其它说明:
  9. 修改记录:
  10. */
  11. #ifndef _NET_DEBUG_H
  12. #define _NET_DEBUG_H
  13. /*------------------------------- 头文件 --------------------------------------
  14. */
  15. /*------------------------------- 宏定义 --------------------------------------
  16. */
  17. /*------------------------------ 类型结构 -------------------------------------
  18. */
  19. typedef struct DEBUG_COMM
  20. {
  21. BYTE cTypeCounter; //接受帧类型
  22. BYTE cRecvLenth; //通道A 接收到数据计数器
  23. BYTE cRecvCnt; //有效数据记数
  24. BYTE cSendCnt;
  25. BYTE cSendLenth;
  26. bool bData; //有报文数据
  27. bool bSend;
  28. bool bNet; //是否从以太网来的数据
  29. BYTE arrSendBuf[UART_FRAME_LEN];
  30. BYTE arrRecvBuf[UART_FRAME_LEN]; //应用程序中,没有大数据
  31. }DEBUG_COMM;
  32. /*------------------------------ 变量声明 -------------------------------------
  33. */
  34. extern int g_print_to_net;
  35. extern int g_print_time;
  36. extern int g_print_comm_raw;
  37. extern int g_print_101;
  38. extern int g_print_104;
  39. extern int g_print_lnk;
  40. extern int g_print_hmi;
  41. extern int g_print_sys;
  42. extern int g_print_dd;
  43. extern int g_print_can;
  44. extern int g_print_can_monitor;
  45. extern u32 g_print_port;
  46. extern int g_print_goose;
  47. extern int g_test_on;
  48. /*------------------------------ 函数声明 -------------------------------------
  49. */
  50. int net_debug_init(void);
  51. int net_debug_exit(void);
  52. void net_debug_app(void);
  53. int net_debug_send(unsigned char *buf,int len);
  54. void print_mem_net(char *addr,unsigned char *pd,int lenth);
  55. #endif //_NET_DEBUG_H
  56. /*------------------------------ 文件结束 -------------------------------------
  57. */