From 63d8099b1337356d882dc440cb121cec6ab73f58 Mon Sep 17 00:00:00 2001
From: Jeremy Wu <54832272+JeremyWu917@users.noreply.github.com>
Date: Thu, 7 Mar 2024 15:31:02 +0800
Subject: [PATCH] chore: add some exegesis
---
IoTClient/Clients/PLC/OmronFinsClient.cs | 28 ++++++++++++------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/IoTClient/Clients/PLC/OmronFinsClient.cs b/IoTClient/Clients/PLC/OmronFinsClient.cs
index b31a0fc..cc87813 100644
--- a/IoTClient/Clients/PLC/OmronFinsClient.cs
+++ b/IoTClient/Clients/PLC/OmronFinsClient.cs
@@ -66,12 +66,12 @@ namespace IoTClient.Clients.PLC
private byte DA1 { get; set; } = 0x01;
///
- ///
+ /// 构造函数
///
- ///
- ///
- ///
- ///
+ /// 主机地址
+ /// 端口
+ /// 超时时间,默认1500毫秒
+ /// 字节序格式
public OmronFinsClient(string ip, int port = 9600, int timeout = 1500, EndianFormat endianFormat = EndianFormat.CDAB)
{
if (!IPAddress.TryParse(ip, out IPAddress address))
@@ -144,7 +144,7 @@ namespace IoTClient.Clients.PLC
///
/// 发送报文,并获取响应报文(建议使用SendPackageReliable,如果异常会自动重试一次)
///
- ///
+ /// 指令集
///
public override Result SendPackageSingle(byte[] command)
{
@@ -190,8 +190,8 @@ namespace IoTClient.Clients.PLC
/// 读取数据
///
/// 地址
- ///
- ///
+ /// 长度
+ /// 类型
/// 返回值是否设置大小端
///
public Result Read(string address, ushort length, bool isBit = false, bool setEndian = true)
@@ -289,9 +289,9 @@ namespace IoTClient.Clients.PLC
}
///
- /// 读取byte
+ /// 读取Byte
///
- ///
+ /// 地址
///
public Result ReadByte(string address)
{
@@ -301,7 +301,7 @@ namespace IoTClient.Clients.PLC
///
/// 读取Int16
///
- ///
+ /// 地址
///
public Result ReadInt16(string address)
{
@@ -823,9 +823,9 @@ namespace IoTClient.Clients.PLC
///
/// 地址信息解析
///
- ///
- ///
- ///
+ /// 地址
+ /// 类型
+ /// 值
///
private OmronFinsAddress ConvertArg(string address, DataTypeEnum dataType = DataTypeEnum.None, bool isBit = false)
{