| | |
| | | { |
| | | public static string HostToAgvServerUrl { get; set; } |
| | | public static string HASeverUrl { get; set; } |
| | | public static string SqlServer { get; set; } |
| | | public static string SqlServer { get; set; } |
| | | public static string SqlServer1 { get; set; } |
| | | public static List<deviceInfo> deviceInfos { get; set; } |
| | | public static List<ConnectLoc> connectLocList { get; set; } |
| | | public static List<OnLineLoc> onLineLocList { get; set; } |
| | | public static List<CallOutLoc> callOutLocList { get; set; } |
| | | public static List<DeviceConfig> deviceConfigList { get; set; } |
| | | public static int port { get; set; } |
| | | public static string WHCode { get; set; } |
| | | public static string FacCode { get; set; } |
| | | public static string listenAddress { get; set; } |
| | | public static int WaitTime { get; set; } |
| | | public static string BufferArea { get; set; } |
| | | public static List<AgvAlarmNo> agvAlarmNoList { get; set; } |
| | | public static List<AlertorDeviceInfo> alertorLightInfos { get; set; } |
| | | public static string stockArea { get; set; } |
| | | |
| | | |
| | | public static void Init() { |
| | | LogHelper.Info("加载配置文件信息 开始"); |
| | |
| | | if (keyValue.Name == "ApiPort") { |
| | | port = int.Parse(keyValue.Value.ToString()); |
| | | } |
| | | if (keyValue.Name == "DeviceInfo") { |
| | | deviceInfos = JsonConvert.DeserializeObject<List<deviceInfo>>(keyValue.Value.ToString()); |
| | | if (keyValue.Name == "ConnectLoc") { |
| | | connectLocList = JsonConvert.DeserializeObject<List<ConnectLoc>>(keyValue.Value.ToString()); |
| | | } |
| | | if (keyValue.Name == "ListenAddress") |
| | | if (keyValue.Name == "OnLineLoc") |
| | | { |
| | | listenAddress = keyValue.Value.ToString(); |
| | | onLineLocList = JsonConvert.DeserializeObject<List<OnLineLoc>>(keyValue.Value.ToString()); |
| | | } |
| | | if (keyValue.Name == "WaitTime") |
| | | if (keyValue.Name == "CallOutLoc") |
| | | { |
| | | WaitTime = JsonConvert.DeserializeObject<int>(keyValue.Value.ToString()); |
| | | callOutLocList = JsonConvert.DeserializeObject<List<CallOutLoc>>(keyValue.Value.ToString()); |
| | | } |
| | | if (keyValue.Name == "BufferArea") |
| | | if (keyValue.Name == "DeviceConfig") |
| | | { |
| | | BufferArea = keyValue.Value.ToString(); |
| | | deviceConfigList = JsonConvert.DeserializeObject<List<DeviceConfig>>(keyValue.Value.ToString()); |
| | | } |
| | | if (keyValue.Name == "AlertorLightDevice") |
| | | if (keyValue.Name == "StockArea") |
| | | { |
| | | alertorLightInfos = JsonConvert.DeserializeObject<List<AlertorDeviceInfo>>(keyValue.Value.ToString()); |
| | | stockArea = keyValue.Value.ToString(); |
| | | } |
| | | if (keyValue.Name == "AgvAlarmNo") |
| | | { |
| | | agvAlarmNoList = JsonConvert.DeserializeObject<List<AgvAlarmNo>>(keyValue.Value.ToString()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | /* public static AlertorDeviceInfo getAlertorAdress(int deviceNo) |
| | | { |
| | | var alertorDeviceInfo = alertorLightInfos.Where(a => a.deviceNo == deviceNo).FirstOrDefault(); |
| | | return alertorDeviceInfo; |
| | | }*/ |
| | | |
| | | public class AgvAlarmNo |
| | | public class DeviceConfig |
| | | { |
| | | public int type { get; set; } |
| | | public int dex { get; set; } |
| | | public string code { get; set; } |
| | | public string name { get; set; } |
| | | } |
| | | |
| | | public class AlertorDeviceInfo |
| | | { |
| | | public int deviceNo { get; set; } |
| | | public string address { get; set; } |
| | | public string turnLight { get; set; } |
| | | public string offLight { get; set; } |
| | | } |
| | | |
| | | public class deviceInfo |
| | | { |
| | | public string address { get; set; } |
| | | public string deviceNo { get; set; } |
| | | public string deviceName { get; set; } |
| | | public string[] deviceNo { get; set; } |
| | | public string[] location { get; set; } |
| | | |
| | | public int deviceType { get; set; } |
| | | public int enable { get; set; } |
| | | public int roadway { get; set; } |
| | | } |
| | | public class TableName |
| | | |
| | | public class ConnectLoc |
| | | { |
| | | public string name { get; set; } |
| | | public string code { get; set; } |
| | | public string locCode { get; set; } |
| | | public int roadway { get; set; } |
| | | } |
| | | |
| | | public class OnLineLoc |
| | | { |
| | | public string locCode { get; set; } |
| | | public int type { get; set; } |
| | | } |
| | | |
| | | public class CallOutLoc |
| | | { |
| | | public string locCode { get; set; } |
| | | public int row { get; set; } |
| | | } |
| | | |
| | | } |