You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aucma.Scada/HighWayIot.Config/PlcConfig.cs

136 lines
4.3 KiB
C#

using HighWayIot.Common;
using System;
namespace HighWayIot.Config
{
public sealed class PlcConfig
{
11 months ago
private static IniHelper iniHelper = new IniHelper(System.Environment.CurrentDirectory + "/config/Plc.Ini");
private static readonly Lazy<PlcConfig> lazy = new Lazy<PlcConfig>(() => new PlcConfig());
public static PlcConfig Instance
{
get
{
return lazy.Value;
}
}
private StringChange stringChange = StringChange.Instance;
private PlcConfig()
{
}
11 months ago
#region PLC基础参数
11 months ago
/// <summary>
/// 泡后PLC IP
11 months ago
/// </summary>
public string foam_Plc_Ip
11 months ago
{
get { return iniHelper.IniReadValue("plcSystem", "泡后PLCIP"); }
set { iniHelper.IniWriteValue("plcSystem", "泡后PLCIP", value); }
11 months ago
}
/// <summary>
/// 泡后PLC端口
11 months ago
/// </summary>
public int foam_Plc_Port
11 months ago
{
get { return stringChange.ParseToInt(iniHelper.IniReadValue("plcSystem", "泡后PLC端口")); }
set { iniHelper.IniWriteValue("plcSystem", "泡后PLC端口", value.ToString()); }
11 months ago
}
#endregion
#region 泡后入库地址
/// <summary>
/// 泡后——入库货道号
/// </summary>
public string in_foam_spaceCode
{
get { return iniHelper.IniReadValue("foam_inStore_address", "入库货道号"); }
set { iniHelper.IniWriteValue("foam_inStore_address", "入库货道号", value); }
}
11 months ago
/// <summary>
/// 泡后——入库应答字
11 months ago
/// </summary>
public string in_foam_answer
11 months ago
{
get { return iniHelper.IniReadValue("foam_inStore_address", "入库应答字"); }
set { iniHelper.IniWriteValue("foam_inStore_address", "入库应答字", value); }
11 months ago
}
/// <summary>
/// 泡后——入库任务号
/// </summary>
public string in_foam_task
{
get { return iniHelper.IniReadValue("foam_inStore_address", "入库任务号"); }
set { iniHelper.IniWriteValue("foam_inStore_address", "入库任务号", value); }
}
11 months ago
/// <summary>
/// 泡后——入库完成
11 months ago
/// </summary>
public string in_foam_finish
11 months ago
{
get { return iniHelper.IniReadValue("foam_inStore_address", "入库完成"); }
set { iniHelper.IniWriteValue("foam_inStore_address", "入库完成", value); }
11 months ago
}
#endregion
#region 泡后出库地址
/// <summary>
/// 泡后——出库货道号
/// </summary>
public string out_foam_spaceCode
{
get { return iniHelper.IniReadValue("foam_outStore_address", "出库货道号"); }
set { iniHelper.IniWriteValue("foam_outStore_address", "出库货道号", value); }
}
11 months ago
/// <summary>
/// 泡后——出库数量
/// </summary>
public string out_foam_amount
{
get { return iniHelper.IniReadValue("foam_outStore_address", "出库数量"); }
set { iniHelper.IniWriteValue("foam_outStore_address", "出库数量", value); }
}
11 months ago
/// <summary>
/// 泡后——出库应答字
11 months ago
/// </summary>
public string out_foam_answer
11 months ago
{
get { return iniHelper.IniReadValue("foam_outStore_address", "出库应答字"); }
set { iniHelper.IniWriteValue("foam_outStore_address", "出库应答字", value); }
11 months ago
}
/// <summary>
/// 泡后——出库任务号
/// </summary>
public string out_foam_task
{
get { return iniHelper.IniReadValue("foam_outStore_address", "出库任务号"); }
set { iniHelper.IniWriteValue("foam_outStore_address", "出库任务号", value); }
}
11 months ago
/// <summary>
/// 泡后——出库完成
11 months ago
/// </summary>
public string out_foam_finish
11 months ago
{
get { return iniHelper.IniReadValue("foam_outStore_address", "出库完成"); }
set { iniHelper.IniWriteValue("foam_outStore_address", "出库完成", value); }
11 months ago
}
#endregion
}
}