using Aitex.Core.RT.SCCore;
using Aitex.Core.Util;
using System.IO;


namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.GasFlow
{
    /// <summary>
    /// 初始化加载PM模块中所有气体真值表逻辑
    /// </summary>
    public class PMGasTrueTableInitialize
    {
        public PMAllGsa PMAllGsa { get; set; }

        public PMGasTrueTableInitialize(string pmName,string path)
        {
            if (!SC.GetValue<bool>($"System.SetUp.Is{pmName}Installed"))
                return;
            PMAllGsa = CustomXmlSerializer.Deserialize<PMAllGsa>(new FileInfo(path));//$"Config\\PM\\{pmName}\\RealtimeGasFlow{pmName}.xml"
            PMAllGsa.Initialize(pmName);
        }
        
    }
}
