net.h 615 B

1234567891011121314151617181920212223
  1. #ifndef __NET_H
  2. #define __NET_H
  3. #include "includes.h"
  4. #include "lwip/sockets.h"
  5. extern INT32S g_iec104_socket;
  6. extern INT32S g_iec104_socket_link_state;
  7. extern INT32S g_modbus_tcp_socket;
  8. extern INT32S g_modbus_tcp_socket_link_state;
  9. extern u8 g_data_req_flag;
  10. #define MAX_RECV_SIZE 500 /* 最大接收Buf长度 */
  11. #define TCP_PORT 8080
  12. #define IEC_PORT 2404
  13. void iec104_task(void);
  14. INT32S iec104_rec_master(char *rec_buf);
  15. void fly_mosbus_init_flag(void);
  16. int modbus_tcp_rec_module(INT8U *rec_buf);
  17. err_t fly_test_process(INT8U *rec_buf, INT32S buf_len);
  18. int modbus_tcp_connect_module(void);
  19. #endif