using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ChamChat.Models;
namespace ChamChat
{
public enum InterfaceType
{
Undefined,
FDTI_USB_COM422,
FDTI_USB_COM485,
FDTI_USB_RS232,
}
public abstract class Interface
{
public Interface()
{
_ID = null;
}
public Interface(String ID )
{
_ID = ID;
}
protected string _ID = null; public String ID { get { return _ID; }}
protected InterfaceType _Type = InterfaceType.Undefined; public InterfaceType Type { get { return _Type; } }
protected InterfaceStatus _InterfaceStatus; public InterfaceStatus InterfaceStatus { get { return _InterfaceStatus; } }
///
/// Datatransfer sends to and reads from interface.
///
/// Command to send
/// Data read from client
/// Client dependent wait time in ms after sending command prior to reading reply
public abstract DataTransferLog DataTransfer(String Command, out String Data, Int32 ReturnDataWaitms);
///
/// Open static connection to the interface
///
abstract public Boolean Open();
///
/// Close connection to the interface
///
abstract public Boolean Close();
}
}