using HTCoreServiceApp.Common;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;

namespace HTCoreServiceApp.DriverInterface
{
    public interface IDriverEntity:IDisposable
    {
        public string DeviceId { get; set; }
        public bool IsConnected { get; set; }
        public int Timeout { get; set; }
        public bool isScan { get; set; }

        //public uint MinPeriod { get; }


        //public ILogger _logger { get; set; }

        public bool Connect();
        public bool Close();
        public void StartScan();

        /// <summary>
        /// 往cpu中写入
        /// </summary>
        /// <returns></returns>
        public int Write(WritePara writePara);
        /// <summary>
        /// 往cpu中写入
        /// </summary>
        /// <returns></returns>
        public int WriteBlock(WriteBlockPara writePara);

        /// <summary>
        /// 无用暂留
        /// </summary>
        public System.Timers.Timer ScanTimer { get; set; }
    }
}
