IFlyAd2021Comm.cs 1.07 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3
using System;
using System.ComponentModel;

4
namespace FlyADBase.Inc
潘栩锋's avatar
潘栩锋 committed
5
{
6
    public interface IFlyAd2021Comm : INotifyPropertyChanged
潘栩锋's avatar
潘栩锋 committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
    {
        /// <summary>
        /// IP 地址 and 端口号
        /// </summary>
        string Addr { get; set; }

        /// <summary>
        /// 是否异常
        /// </summary>
        bool IsError { get; }

        /// <summary>
        /// 异常信息
        /// </summary>
        string ErrMsg { get; }

        /// <summary>
        /// 连接成功
        /// </summary>
        bool IsConnected { get; }


        /// <summary>
        /// 运行中
        /// </summary>
        bool IsRunning { get; }

        /// <summary>
        /// 开始
        /// </summary>
        void Start();

        /// <summary>
        /// 接收
        /// </summary>
        void Stop();

        /// <summary>
        /// 发送数据
        /// </summary>
        /// <param name="msg"></param>
        void SendMsg(byte[] msg);


        /// <summary>
        /// 接收数据
        /// </summary>
        event Action<byte[]> RecMsg;
55

潘栩锋's avatar
潘栩锋 committed
56 57 58

    }
}