2021-10-01 09:09:20 +00:00
|
|
|
|
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();
|
|
|
|
|
|
|
2022-09-01 14:28:00 +00:00
|
|
|
|
// ReSharper disable once InconsistentNaming UI1236 is a naming forced by the caller
|
2023-09-01 13:07:37 +00:00
|
|
|
|
List<Byte> DecodeDataForPhysicalLayerUI1236(String ident, Byte[] payload, Boolean hideDataInLog = false);
|
2022-08-24 15:23:11 +00:00
|
|
|
|
|
2021-10-01 09:09:20 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Send out data (including transport protocol specific data like CRC) to physical port (like UART or IrDA)
|
|
|
|
|
|
/// </summary>
|
2023-09-01 13:07:37 +00:00
|
|
|
|
List<Byte> DecodeDataForPhysicalLayer(String ident, Byte command , Byte[] payload, Boolean hideDataInLog = false);
|
2021-10-01 09:09:20 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Received data have to be checked and converted to request protocol
|
|
|
|
|
|
/// </summary>
|
2023-09-01 13:07:37 +00:00
|
|
|
|
List<Byte> DecodeDataForLogicLayer(String ident, List<Byte> rawData, Boolean hideDateInLog = false);
|
2021-10-01 09:09:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|