From 96f14377dc26c52b6b65847b356c35a8b1391cfd Mon Sep 17 00:00:00 2001 From: parallelbgls Date: Tue, 23 May 2017 16:54:04 +0800 Subject: [PATCH] Fix --- Modbus.Net/src/Base.Common/ProtocalLinker.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Modbus.Net/src/Base.Common/ProtocalLinker.cs b/Modbus.Net/src/Base.Common/ProtocalLinker.cs index c66290d..783e879 100644 --- a/Modbus.Net/src/Base.Common/ProtocalLinker.cs +++ b/Modbus.Net/src/Base.Common/ProtocalLinker.cs @@ -106,7 +106,7 @@ namespace Modbus.Net { var extBytes = BytesExtend(content); var receiveBytes = await SendReceiveWithoutExtAndDecAsync(extBytes); - return receiveBytes; + return BytesDecact(receiveBytes); } /// @@ -151,20 +151,14 @@ namespace Modbus.Net /// /// 扩展前的基本协议内容 /// 扩展后的协议内容 - public virtual TParamIn BytesExtend(TParamIn content) - { - throw new NotImplementedException(); - } + public abstract TParamIn BytesExtend(TParamIn content); /// /// 协议内容缩减,接收时根据需要缩减 /// /// 缩减前的完整协议内容 /// 缩减后的协议内容 - public virtual TParamOut BytesDecact(TParamOut content) - { - throw new NotImplementedException(); - } + public abstract TParamOut BytesDecact(TParamOut content); /// /// 连接设备