mirror of
https://github.com/ThingsGateway/ThingsGateway.git
synced 2026-10-29 12:40:05 +08:00
参数名称修改
This commit is contained in:
+2
-5
@@ -20,15 +20,12 @@ public class DLT645_2007Message : MessageBase, IMessage
|
||||
public override int HeadBytesLength => -1;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool CheckHeadBytes(byte[] head)
|
||||
public override bool CheckHeadBytes(byte[] heads)
|
||||
{
|
||||
BodyLength = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void SendBytesThen()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+2
-5
@@ -20,15 +20,12 @@ public class ModbusRtuMessage : MessageBase, IMessage
|
||||
public override int HeadBytesLength => -1;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool CheckHeadBytes(byte[] head)
|
||||
public override bool CheckHeadBytes(byte[] heads)
|
||||
{
|
||||
BodyLength = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void SendBytesThen()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+2
-5
@@ -30,14 +30,11 @@ public class ModbusSerialServerMessage : MessageBase, IMessage
|
||||
public override int HeadBytesLength => -1;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool CheckHeadBytes(byte[] head)
|
||||
public override bool CheckHeadBytes(byte[] heads)
|
||||
{
|
||||
BodyLength = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void SendBytesThen()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -23,10 +23,10 @@ public class ModbusTcpMessage : MessageBase, IMessage
|
||||
/// </summary>
|
||||
public bool IsCheckMessageId { get; set; } = false;
|
||||
/// <inheritdoc/>
|
||||
public override bool CheckHeadBytes(byte[] head)
|
||||
public override bool CheckHeadBytes(byte[] heads)
|
||||
{
|
||||
if (head == null || head.Length <= 0) return false;
|
||||
HeadBytes = head;
|
||||
if (heads == null || heads.Length <= 0) return false;
|
||||
HeadBytes = heads;
|
||||
|
||||
int num = (HeadBytes[4] * 256) + HeadBytes[5];
|
||||
BodyLength = num;
|
||||
|
||||
+3
-3
@@ -29,10 +29,10 @@ namespace ThingsGateway.Foundation.Adapter.Modbus
|
||||
/// <inheritdoc/>
|
||||
public override int HeadBytesLength => 6;
|
||||
/// <inheritdoc/>
|
||||
public override bool CheckHeadBytes(byte[] head)
|
||||
public override bool CheckHeadBytes(byte[] heads)
|
||||
{
|
||||
if (head == null || head.Length != 6) return false;
|
||||
HeadBytes = head;
|
||||
if (heads == null || heads.Length != 6) return false;
|
||||
HeadBytes = heads;
|
||||
|
||||
int num = (HeadBytes[4] * 256) + HeadBytes[5];
|
||||
BodyLength = num;
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public abstract class MessageBase : OperResult<byte[]>, IMessage
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public abstract bool CheckHeadBytes(byte[] head);
|
||||
public abstract bool CheckHeadBytes(byte[] heads);
|
||||
|
||||
/// <summary>
|
||||
/// 写入<see cref="SendBytes"/>后触发此方法
|
||||
|
||||
@@ -51,7 +51,7 @@ public interface IMessage : IOperResult, IRequestInfo
|
||||
/// <summary>
|
||||
/// 检查头子节的合法性,并赋值<see cref="BodyLength"/><br />
|
||||
/// </summary>
|
||||
/// <param name="head">接收的头子节</param>
|
||||
/// <param name="heads">接收的头子节</param>
|
||||
/// <returns>是否成功的结果</returns>
|
||||
bool CheckHeadBytes(byte[] head);
|
||||
bool CheckHeadBytes(byte[] heads);
|
||||
}
|
||||
Reference in New Issue
Block a user