BaseSerialPort:

- Flush buffer (DiscardInBuffer) removed as some bytes are missing from time to time.  The IrDA sniffer showed these on the communication line, but they are incompletely received.  Assuming the DiscardInBuffer may be delayed, so the incoming data will be scrapped.

IrdaTransmitProtocol:
- WakeUpMessage marked and debug output
This commit is contained in:
Thomas Wiedebusch
2022-07-15 17:18:12 +02:00
parent 2f87d186a0
commit bac97f8e57
7 changed files with 49 additions and 16 deletions
@@ -2158,7 +2158,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
while (retryLeft > 0 && !done)
{
Thread.Sleep(100);
Thread.Sleep(50);
var result = WriteRegister(a.Key.GetIdent(), 1);
if (!result)
{
@@ -2173,7 +2173,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
}
// Wait for storing
Thread.Sleep(500);
Thread.Sleep(400);
if (a.Key.AppName == "SENSUSRADIO")
{
done = true;
@@ -330,6 +330,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol
/// <remarks date="2019-Jan-22" author="T.Wiedebusch">
/// - Avoid activation of wakeup retry if record is meanwhile acknowledged.
/// </remarks>
/// <remarks date="2022-Jul-15" author="T.Wiedebusch">
/// - Additional delay before retry.
/// </remarks>
public override void DecodeRecord(IPortDataEventArgs data)
{
//the request response record covers the entire request protocol
@@ -348,6 +351,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol
_logger.Debug($"{_ident} WakeupMessageRetry(1)");
_recordInProcess.WakeupMessageRetryCtr = 1;
_recordInProcess.RetryCtr--;
Thread.Sleep(10);
}
}