This commit is contained in:
parallelbgls
2016-10-03 16:42:33 +08:00
parent 4655578db5
commit 170c4b6154

View File

@@ -423,20 +423,10 @@ namespace Modbus.Net
} }
} }
//写入数据 //写入数据
if (AddressCombinerSet is AddressCombinerSingle) await
{ BaseUtility.SetDatasAsync(addressStart,
await valueHelper.ByteArrayToObjectArray(datas,
BaseUtility.SetDatasAsync(addressStart, new KeyValuePair<Type, int>(communicateAddress.DataType, communicateAddress.GetCount)));
valueHelper.ByteArrayToObjectArray(datas,
new KeyValuePair<Type, int>(communicateAddress.DataType, 1)));
}
else
{
await
BaseUtility.SetDatasAsync(addressStart,
valueHelper.ByteArrayToObjectArray(datas,
new KeyValuePair<Type, int>(typeof (byte), datas.Length)));
}
} }
//如果不保持连接,断开连接 //如果不保持连接,断开连接
if (!KeepConnect) if (!KeepConnect)