IFlyAd2021Comm.cs 1.18 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6 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 55 56 57 58 59 60 61 62
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FlyAd2021.Inc
{
    public interface IFlyAd2021Comm:INotifyPropertyChanged
    {
        /// <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;
        

    }
}