laatzen/Common/Hardware/Interfaces/Protocols/TransmitProtocol/BaseTransmitProtocol.cs

32 lines
1.0 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(Byte command, Byte[] payload, Boolean hideDateInLog = false);
public abstract List<Byte> DecodeDataForLogicLayer(List<Byte> rawData);
public abstract List<Byte> DecodeDataForPhysicalLayerUI1236(Byte[] payload);
}
}