init
This commit is contained in:
91
Common/DTS.Common/Interface/DASFactory/ICommunication.cs
Normal file
91
Common/DTS.Common/Interface/DASFactory/ICommunication.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
using DTS.Common.Enums.Communication;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.Interface.Communication;
|
||||
using DTS.Common.Interface.Connection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory
|
||||
{
|
||||
public interface ICommunication : IComparable<ICommunication>, IComparable<string>
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates an error occurred during setup
|
||||
/// http://manuscript.dts.local/f/cases/43289/SW-no-longer-warns-when-hardware-is-in-bootloader-mode
|
||||
/// </summary>
|
||||
bool ErrorInSetup { get; set; }
|
||||
IConnection Transport { get; set; }
|
||||
/// <summary>
|
||||
/// setups the receivebuffer and callback, this needs to be done whenever
|
||||
/// the sock is connected
|
||||
/// </summary>
|
||||
void SetupReader();
|
||||
int ReceiveBufferSize { get; set; }
|
||||
|
||||
string SerialNumber { get; set; }
|
||||
|
||||
string FirmwareVersion { get; set; }
|
||||
|
||||
byte ProtocolVersion { get; set; }
|
||||
|
||||
ICommunication_DASInfo DASInfo { get; set; }
|
||||
|
||||
Dictionary<DFConstantsAndEnums.ProtocolLimitedCommands, byte> MinimumProtocols { get; set; }
|
||||
|
||||
void InitMinProto();
|
||||
|
||||
bool IsCommandSupported(DFConstantsAndEnums.ProtocolLimitedCommands command);
|
||||
|
||||
byte GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands command);
|
||||
|
||||
event EventHandler OnDisconnected;
|
||||
|
||||
string ConnectString { get; }
|
||||
|
||||
bool Connected { get; }
|
||||
|
||||
void Connect(string ConnectString,
|
||||
CommunicationConstantsAndEnums.CommunicationCallback Callback,
|
||||
object CallbackObject,
|
||||
int CallbackTimeout, string ipAddress);
|
||||
|
||||
void Disconnect(bool reuseSocket,
|
||||
CommunicationConstantsAndEnums.CommunicationCallback Callback,
|
||||
object CallbackObject,
|
||||
int CallbackTimeout);
|
||||
|
||||
void Close(int Timeout);
|
||||
|
||||
void Flush(int Timeout);
|
||||
|
||||
bool ExecuteIsBusy { get; set; }
|
||||
|
||||
void Execute(byte[] byteData,
|
||||
CommunicationConstantsAndEnums.CommunicationCallback Callback,
|
||||
object CallbackObject,
|
||||
int CallbackTimeout);
|
||||
|
||||
void PseudoExecute(byte[] byteData,
|
||||
CommunicationConstantsAndEnums.CommunicationCallback Callback,
|
||||
object CallbackObject,
|
||||
int CallbackTimeout);
|
||||
|
||||
byte[] SyncExecute(byte[] byteData,
|
||||
int Timeout);
|
||||
|
||||
void Cancel();
|
||||
void ForceCancel();
|
||||
|
||||
bool IsCanceled();
|
||||
|
||||
void ClearCancel();
|
||||
/// <summary>
|
||||
/// event that will signal if cancel has happened
|
||||
/// prior to this IsCanceled would have to be checked
|
||||
/// or polled
|
||||
/// 17600 Communication class improvements from 3.2
|
||||
/// </summary>
|
||||
ManualResetEvent CancelEvent { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user