protocol
This commit is contained in:
1 parent
4e80a72d24
commit
9f3b8cf65a
24 files changed
+619
-3018
No files matched your search
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @file finsudpmaster.h
|
||||
* @brief 欧姆龙FINS UDP客户端主站头文件
|
||||
*/
|
||||
#ifndef FINSUDPMASTER_H
|
||||
#define FINSUDPMASTER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
// ============================================================================
|
||||
// 全局变量
|
||||
// ============================================================================
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// 接口函数
|
||||
// ============================================================================
|
||||
|
||||
/**
|
||||
* @brief 处理接收到的FINS读响应
|
||||
* @param size: 接收数据长度
|
||||
* @param local_node: 本地节点号
|
||||
* @return true: 处理成功,false: 不是有效的读响应
|
||||
*/
|
||||
_Bool handleReadRecv(uint16_t size, uint16_t local_node);
|
||||
|
||||
/**
|
||||
* @brief 构建FINS请求帧
|
||||
* @param local_node: 本地节点号
|
||||
* @return 发送长度,0表示不发送(参数非法)
|
||||
*/
|
||||
uint16_t handleSend(uint16_t local_node);
|
||||
|
||||
/**
|
||||
* @brief 超时计数,由主循环每次调用递增
|
||||
*/
|
||||
void update_timeout_fins(void);
|
||||
|
||||
/**
|
||||
* @brief FINS UDP客户端主函数,W5500socket主循环处理
|
||||
* @param sn: socket编号
|
||||
* @param destip: 目标IP地址
|
||||
* @param destport: 目标端口
|
||||
* @param local_node: 本地节点号
|
||||
* @return 0/正表示正常,负表示错误
|
||||
*/
|
||||
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