2014-08-12 update 1 bug fix
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// 此代码由工具生成。
|
// 此代码由工具生成。
|
||||||
// 运行时版本:4.0.30319.34014
|
// 运行时版本:4.0.30319.18444
|
||||||
//
|
//
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
// 重新生成代码,这些更改将会丢失。
|
// 重新生成代码,这些更改将会丢失。
|
||||||
@@ -61,7 +61,7 @@ namespace ModBus.Net {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 192.168.2.100 的本地化字符串。
|
/// 查找类似 192.168.3.247 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string IP {
|
internal static string IP {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="IP" xml:space="preserve">
|
<data name="IP" xml:space="preserve">
|
||||||
<value>192.168.2.100</value>
|
<value>192.168.3.247</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Port" xml:space="preserve">
|
<data name="Port" xml:space="preserve">
|
||||||
<value>502</value>
|
<value>502</value>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace ModBus.Net
|
|||||||
//接收数据
|
//接收数据
|
||||||
byte[] receiveBytes = BytesDecact(_socket.SendMsg(BytesExtend(content)));
|
byte[] receiveBytes = BytesDecact(_socket.SendMsg(BytesExtend(content)));
|
||||||
//容错处理
|
//容错处理
|
||||||
if (!CheckRight(content)) return null;
|
if (!CheckRight(receiveBytes)) return null;
|
||||||
//返回数据
|
//返回数据
|
||||||
return receiveBytes;
|
return receiveBytes;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user