init
This commit is contained in:
86
Common/DTS.CommonCore/Interface/DASFactory/ICommunication.cs
Normal file
86
Common/DTS.CommonCore/Interface/DASFactory/ICommunication.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
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>
|
||||
{
|
||||
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