32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using NLog;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
|
|
using Xylem.Common.Utils.Logging;
|
|
|
|
namespace Xylem.Common.Hardware.Interfaces.Protocols.TransmitProtocol
|
|
{
|
|
public abstract class BaseTransmitProtocol : ITransmitProtocol
|
|
{
|
|
public readonly ILogger Logger;
|
|
|
|
protected BaseTransmitProtocol(String port)
|
|
{
|
|
Logger = NLogHelper.CreateOrGetMultiLogger(port, "COM", "TransmitProtocol", "COMBase", "BaseTransmitProtocol");
|
|
}
|
|
|
|
public abstract TransmitPortSettings GetTransmitPortSettings();
|
|
public abstract void SetResponseTimeout(Int32 responseTimeoutMs);
|
|
|
|
public abstract void SetDefaultResponseTimeout();
|
|
|
|
public abstract List<Byte> DecodeDataForPhysicalLayer(String ident, Byte command, Byte[] payload, Boolean hideDataInLog = false);
|
|
|
|
public abstract List<Byte> DecodeDataForLogicLayer(String ident, List<Byte> rawData, Boolean hideDataInLog = false);
|
|
|
|
public abstract List<Byte> DecodeDataForPhysicalLayerUI1236(String ident, Byte[] payload, Boolean hideDataInLog = false);
|
|
|
|
}
|
|
|
|
}
|