#ifndef SLMPTCPMASTER_H #define SLMPTCPMASTER_H #ifdef __cplusplus extern "C" { #endif #include #include extern uint8_t slmp_txbuf[1024]; extern uint8_t slmp_rxbuf[1024]; extern uint16_t slmp_idx; extern uint16_t slmp_addr; extern uint16_t slmp_size; extern uint16_t slmpTimegap; extern uint16_t comm_count; // 处理接收到的SLMP响应 _Bool slmp_handle_recv(uint16_t size); // 构建SLMP请求,返回发送长度 uint16_t slmp_build_send(void); // 超时计数,由主循环调用 void update_timeout_slmp(void); // SLMP TCP客户端主函数 int32_t loopback_tcpc_slmp(uint8_t sn, uint8_t *destip, uint16_t destport); #ifdef __cplusplus } #endif #endif