Browse Source

NetShortCacheReader 在读取双字时未高低位互换

pull/22/head
Kevin 8 years ago
parent
commit
49ab2a202e
  1. 2
      SCADA/Program/DataService/CacheReader.cs

2
SCADA/Program/DataService/CacheReader.cs

@ -582,7 +582,7 @@ namespace DataService
} }
else else
{ {
result = (IPAddress.HostToNetworkOrder(_cache[startIndex]) << 16) | ((ushort)IPAddress.HostToNetworkOrder(_cache[startIndex + 1])); result = (_cache[startIndex + 1] << 16) | ((ushort)_cache[startIndex]);
} }
return new ItemData<int>(result, 0, QUALITIES.QUALITY_GOOD); return new ItemData<int>(result, 0, QUALITIES.QUALITY_GOOD);
} }

Loading…
Cancel
Save