refactor: 分文件重构,新建protocols文件夹,三个协议分文件存放:modbustcpslave/finsudpmaster/slmptcpmaster,结构更清晰
This commit is contained in:
1 parent
99fa72eaa0
commit
e3519bf1f4
8 files changed
+852
-741
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#ifndef FINSUDPMASTER_H
|
||||
#define FINSUDPMASTER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
extern uint8_t myRtumSTIdx;
|
||||
extern uint8_t omrfins_buf[1024];
|
||||
extern uint16_t fins_timeout;
|
||||
extern uint16_t comm_count;
|
||||
|
||||
// 处理接收到的FINS读响应
|
||||
_Bool handleReadRecv(uint16_t size, uint16_t local_node);
|
||||
|
||||
// 构建FINS请求帧,返回发送长度
|
||||
uint16_t handleSend(uint16_t local_node);
|
||||
|
||||
// 超时计数,由主循环调用
|
||||
void update_timeout_fins(void);
|
||||
|
||||
// FINS UDP客户端主函数
|
||||
int32_t loopback_udpc_omrfins(uint8_t sn, uint8_t *destip, uint16_t destport, uint16_t local_node);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user