39 lines
1.4 KiB
C#
39 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
|
|
|
|
namespace Xylem.Common.Hardware.Interfaces.Protocols.TransmitProtocol
|
|
{
|
|
public interface ITransmitProtocol
|
|
{
|
|
/// <summary>
|
|
/// Struct of settings being needed for transmit port
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
TransmitPortSettings GetTransmitPortSettings();
|
|
|
|
/// <summary>
|
|
/// Overwrite the default response timeout
|
|
/// </summary>
|
|
void SetResponseTimeout(Int32 responseTimeoutMs);
|
|
|
|
/// <summary>
|
|
/// Set timeout to the default response time
|
|
/// </summary>
|
|
void SetDefaultResponseTimeout();
|
|
|
|
// ReSharper disable once InconsistentNaming UI1236 is a naming forced by the caller
|
|
List<Byte> DecodeDataForPhysicalLayerUI1236(String ident, Byte[] payload, Boolean hideDataInLog = false);
|
|
|
|
/// <summary>
|
|
/// Send out data (including transport protocol specific data like CRC) to physical port (like UART or IrDA)
|
|
/// </summary>
|
|
List<Byte> DecodeDataForPhysicalLayer(String ident, Byte command , Byte[] payload, Boolean hideDataInLog = false);
|
|
|
|
/// <summary>
|
|
/// Received data have to be checked and converted to request protocol
|
|
/// </summary>
|
|
List<Byte> DecodeDataForLogicLayer(String ident, List<Byte> rawData, Boolean hideDateInLog = false);
|
|
}
|
|
}
|