using System;
using System.IO;
namespace EC.AutoWeightServer.Model.Config
{
public class ServerConfig : BaseConfig
{
///
/// 站点编号
///
public static string SiteName { get; } = GetAppConfig("SITE_Name");
///
/// 相机
///
public static string CameraAddress1 { get; } = GetAppConfig("CAMERA_ADDRESS1");
public static string CameraAddress2 { get; } = GetAppConfig("CAMERA_ADDRESS2");
public static string CameraAddress3 { get; } = GetAppConfig("CAMERA_ADDRESS3");
public static string CameraAddress4 { get; } = GetAppConfig("CAMERA_ADDRESS4");
public static ushort CameraSocketPort { get; } = (ushort)FormatCom.ToShort(GetAppConfig("CAMERA_SOCKET_PORT"));
public static string CameraUsername { get; } = GetAppConfig("CAMERA_USERNAME");
public static string CameraPassword { get; } = GetAppConfig("CAMERA_PASSWORD");
public static int AutoDetectInterval { get; } = FormatCom.ToInt(GetAppConfig("AutoDetectInterval"));
///
/// 称重串口
///
public static string WtCom { get; } = GetAppConfig("WT_COM");
public static int WtBaudRate { get; } = FormatCom.ToInt(GetAppConfig("WT_BaudRate"));
public static int WtDiff { get; } = FormatCom.ToInt(GetAppConfig("WT_Diff"));
public static int WtInterval { get; } = FormatCom.ToInt(GetAppConfig("WT_Interval"));
public static int WtLenLimit { get; } = FormatCom.ToInt(GetAppConfig("WT_LenLimit"));
public static int WtReceivedBytesThreshold { get; } = FormatCom.ToInt(GetAppConfig("WT_ReceivedBytesThreshold"));
public static int WTDiscardInBufferFlag { get; } = FormatCom.ToInt(GetAppConfig("WT_DiscardInBuffer_Flag"));
public static int WtTransmitFlag { get; } = FormatCom.ToInt(GetAppConfig("WT_Transmit_Flag"));
public static string WtTransmitCom { get; } = GetAppConfig("WT_Transmit_Com");
///
/// 指示灯继电器串口
///
public static string LightRelayCom { get; } = GetAppConfig("Light_Relay_COM");
public static int LightRelayBaudRate { get; } = FormatCom.ToInt(GetAppConfig("Light_Relay_BaudRate"));
public static string LightCodeName { get; } = Path.Combine(Environment.CurrentDirectory, "conf", GetAppConfig("Light_Code_Name"));
public static int LightInterval { get; } = FormatCom.ToInt(GetAppConfig("Light_Interval"));
public static int LightBlink { get; } = FormatCom.ToInt(GetAppConfig("Light_Blink"));
///
/// Led控制
///
public static string LedIp { get; } = GetAppConfig("Led_Ip");
public static short LedPort { get; } = FormatCom.ToShort(GetAppConfig("Led_Port"));
public static int BoardThreadInterval { get; } = FormatCom.ToInt(GetAppConfig("BoardThread_Interval"));
public static int BoardType { get; } = FormatCom.ToInt(GetAppConfig("Board_Type"));
///
/// 跑马灯
///
public static int ScrollTextInterval { get; } = FormatCom.ToInt(GetAppConfig("ScrollText_Interval"));
public static int ScrollTextGap { get; } = FormatCom.ToInt(GetAppConfig("ScrollText_Gap"));
///
/// 超时检测
///
public static int InTimeOut { get; } = FormatCom.ToInt(GetAppConfig("InTimeOut"));
public static int OutTimeOut { get; } = FormatCom.ToInt(GetAppConfig("OutTimeOut"));
public static int BillInterval { get; } = FormatCom.ToInt(GetAppConfig("Bill_Interval"));
public static int SavePhotoDay { get; } = FormatCom.ToInt(GetAppConfig("SavePhoto_Day"));
public static int IsPretreatPlate { get; } = FormatCom.ToInt(GetAppConfig("IsPretreatPlate"));
public static int ShowDebug { get; } = FormatCom.ToInt(GetAppConfig("ShowDebug"));
public static int ShowTrailer { get; } = FormatCom.ToInt(GetAppConfig("ShowTrailer"));
}
}