using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TcpServer;

namespace SERVER
{
    /// <summary>
    /// 下发命令的帮助类
    /// </summary>
    public  class Send_Cmd
    {
        /// <summary>
        /// 下发固件
        /// </summary>
        /// <param name="mac"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static bool[] Send_File(int type = 1, params string [] mac)
        {
            var res = new List<bool>();
            foreach (var item in mac)
            {
                res.Add(Send_File(item,type));
            }
            return res.ToArray();
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="type"></param>
        /// <param name="mac"></param>
        /// <returns></returns>
        private static bool Send_File(string mac,int type = 1)
       {
           return SendHelp.Send_Control_UPGRADE_ISSUED(mac, type);
        }
    }
}
