Delete and Clear button in tables
This commit is contained in:
@@ -364,10 +364,7 @@ namespace FAtoPA
|
||||
|
||||
if (readcount >= 12)
|
||||
{
|
||||
Debug.WriteLine($"Read from {key}, size={readcount}");
|
||||
String cmdString = BitConverter.ToString(cmd);
|
||||
Debug.WriteLine($"cmd={cmdString}");
|
||||
|
||||
|
||||
client.RXBytes += (uint)readcount;
|
||||
UInt16 transactionID = GetTransactionID(cmd);
|
||||
UInt16 protocolID = GetProtocolID(cmd);
|
||||
@@ -375,9 +372,7 @@ namespace FAtoPA
|
||||
Byte unitID = GetUnitID(cmd);
|
||||
Byte functionCode = GetFunctionCode(cmd);
|
||||
byte[] payload = GetModbusPayload(cmd);
|
||||
Debug.WriteLine($"TransactionID={transactionID}, ProtocolID={protocolID}, Length={length}, UnitID={unitID}, FunctionCode={functionCode}, Payload={payload.Length}");
|
||||
String payloadstring = BitConverter.ToString(payload);
|
||||
Debug.WriteLine($"Payload={payloadstring}");
|
||||
|
||||
if (protocolID == 0 && length == payload.Length + 2 && unitID == 1)
|
||||
{
|
||||
if (functionCode == 3)
|
||||
@@ -495,6 +490,7 @@ namespace FAtoPA
|
||||
client.TXBytes += (uint)response.Length;
|
||||
client.TXResponse++;
|
||||
}
|
||||
if (_event != null) _event.TXRXStatusUpdate(client);
|
||||
}
|
||||
|
||||
else if (readcount == 0) break; // connection closed
|
||||
|
||||
Reference in New Issue
Block a user