|
|
@@ -46,7 +46,7 @@ namespace BPASmartClient.S7Net |
|
|
|
break; |
|
|
|
case "String": |
|
|
|
//numBytes += 256.0; |
|
|
|
numBytes += 256.0; |
|
|
|
numBytes += 1.0; |
|
|
|
break; |
|
|
|
default: |
|
|
|
numBytes = GetClassSize(Activator.CreateInstance(type), numBytes, isInnerProperty: true); |
|
|
@@ -190,10 +190,15 @@ namespace BPASmartClient.S7Net |
|
|
|
break; |
|
|
|
} |
|
|
|
case "String": |
|
|
|
byte[] sarray = new byte[256]; |
|
|
|
Array.Copy(bytes, (int)numBytes, sarray, 0, 256); |
|
|
|
//byte[] sarray = new byte[256]; |
|
|
|
//Array.Copy(bytes, (int)numBytes, sarray, 0, 256); |
|
|
|
//obj = GetGb2312()?.GetString(sarray).Trim().Replace(" ", "").Replace("\n", ""); |
|
|
|
//numBytes += 256.0; |
|
|
|
|
|
|
|
byte[] sarray = new byte[1]; |
|
|
|
Array.Copy(bytes, (int)numBytes, sarray, 0, 1); |
|
|
|
obj = GetGb2312()?.GetString(sarray).Trim().Replace(" ", "").Replace("\n", ""); |
|
|
|
numBytes += 256.0; |
|
|
|
numBytes += 1; |
|
|
|
break; |
|
|
|
default: |
|
|
|
{ |
|
|
|