|
|
@@ -30,8 +30,10 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#region 基本信息
|
|
|
|
|
|
- List<StationSegmentInfo> segmentInfo = new List<StationSegmentInfo>();
|
|
|
- segmentInfo.Add(new StationSegmentInfo(1011, 1026, "10.30.36.51"));
|
|
|
+ List<StationSegmentInfo> segmentInfo = new List<StationSegmentInfo>
|
|
|
+ {
|
|
|
+ new StationSegmentInfo(1011, 1026, "10.30.36.51")
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in segmentInfo)
|
|
|
{
|
|
|
@@ -39,7 +41,7 @@ namespace WCS.WorkEngineering
|
|
|
{
|
|
|
var conv = new Device(i.ToString());
|
|
|
conv.AddFlag(DeviceFlags.输送机);
|
|
|
- conv.AddProtocol<IStation523>((i - item.Start) * 14, 520, item.IP);
|
|
|
+ conv.AddProtocol<IStation520>((i - item.Start) * 14, 520, item.IP);
|
|
|
conv.AddProtocol<IStation521>((i - item.Start) * 16, 521, item.IP);
|
|
|
conv.AddProtocol<IStation523>((i - item.Start) * 12, 523, item.IP);
|
|
|
}
|
|
|
@@ -49,8 +51,10 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#region 扫码器
|
|
|
|
|
|
- List<BcrInfo> bcrInfo = new List<BcrInfo>();
|
|
|
- bcrInfo.Add(new BcrInfo(new int[] { 1011, 1013, 1015 }, "10.30.36.51"));
|
|
|
+ List<BcrInfo> bcrInfo = new List<BcrInfo>
|
|
|
+ {
|
|
|
+ new BcrInfo(new int[] { 1011, 1013, 1015 }, "10.30.36.51")
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in bcrInfo)
|
|
|
{
|
|
|
@@ -58,7 +62,7 @@ namespace WCS.WorkEngineering
|
|
|
{
|
|
|
var conv = new Device("BCR" + item.DeviceNo[i]);
|
|
|
conv.AddFlag(DeviceFlags.扫码);
|
|
|
- int pos = i * 8;
|
|
|
+ int pos = i * 20;
|
|
|
conv.AddProtocol<IBCR81>(pos, 81, item.IP);
|
|
|
}
|
|
|
}
|
|
|
@@ -67,8 +71,10 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#region 外检信息
|
|
|
|
|
|
- List<ShapeInfo> shapeInfo = new List<ShapeInfo>();
|
|
|
- shapeInfo.Add(new ShapeInfo(new int[] { 1012, 1014, 1016, 1025 }, "10.30.36.51"));
|
|
|
+ List<ShapeInfo> shapeInfo = new List<ShapeInfo>
|
|
|
+ {
|
|
|
+ new ShapeInfo(new int[] { 1012, 1014, 1016, 1025 }, "10.30.36.51")
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in shapeInfo)
|
|
|
{
|
|
|
@@ -106,22 +112,24 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#region 配置路径信息
|
|
|
|
|
|
- List<RouteInfo> routeInfos = new List<RouteInfo>();
|
|
|
- routeInfos.Add(new RouteInfo("SRM1", new string[] { "TY1" }));
|
|
|
- routeInfos.Add(new RouteInfo("SRM2", new string[] { "TY2" }));
|
|
|
- routeInfos.Add(new RouteInfo("SRM3", new string[] { "TY3" }));
|
|
|
- routeInfos.Add(new RouteInfo("TY1", new string[] { "SRM1" }));
|
|
|
- routeInfos.Add(new RouteInfo("TY2", new string[] { "SRM2" }));
|
|
|
- routeInfos.Add(new RouteInfo("TY3", new string[] { "SRM3" }));
|
|
|
- routeInfos.Add(new RouteInfo("TY1", new string[] { "1012", "1021" }));
|
|
|
- routeInfos.Add(new RouteInfo("TY2", new string[] { "1014", "1023" }));
|
|
|
- routeInfos.Add(new RouteInfo("TY3", new string[] { "1016", "1025" }));
|
|
|
- routeInfos.Add(new RouteInfo("1011", new string[] { "TY1" }));
|
|
|
- routeInfos.Add(new RouteInfo("1022", new string[] { "TY1" }));
|
|
|
- routeInfos.Add(new RouteInfo("1013", new string[] { "TY2" }));
|
|
|
- routeInfos.Add(new RouteInfo("1024", new string[] { "TY2" }));
|
|
|
- routeInfos.Add(new RouteInfo("1015", new string[] { "TY3" }));
|
|
|
- routeInfos.Add(new RouteInfo("1026", new string[] { "TY3" }));
|
|
|
+ List<RouteInfo> routeInfos = new List<RouteInfo>
|
|
|
+ {
|
|
|
+ new RouteInfo("SRM1", new string[] { "TY1" }),
|
|
|
+ new RouteInfo("SRM2", new string[] { "TY2" }),
|
|
|
+ new RouteInfo("SRM3", new string[] { "TY3" }),
|
|
|
+ new RouteInfo("TY1", new string[] { "SRM1" }),
|
|
|
+ new RouteInfo("TY2", new string[] { "SRM2" }),
|
|
|
+ new RouteInfo("TY3", new string[] { "SRM3" }),
|
|
|
+ new RouteInfo("TY1", new string[] { "1012", "1021" }),
|
|
|
+ new RouteInfo("TY2", new string[] { "1014", "1023" }),
|
|
|
+ new RouteInfo("TY3", new string[] { "1016", "1025" }),
|
|
|
+ new RouteInfo("1011", new string[] { "TY1" }),
|
|
|
+ new RouteInfo("1022", new string[] { "TY1" }),
|
|
|
+ new RouteInfo("1013", new string[] { "TY2" }),
|
|
|
+ new RouteInfo("1024", new string[] { "TY2" }),
|
|
|
+ new RouteInfo("1015", new string[] { "TY3" }),
|
|
|
+ new RouteInfo("1026", new string[] { "TY3" })
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in routeInfos)
|
|
|
{
|
|
|
@@ -133,11 +141,13 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#region 标签配置
|
|
|
|
|
|
- Dictionary<DeviceFlags, List<string>> devices = new Dictionary<DeviceFlags, List<string>>();
|
|
|
-
|
|
|
- devices.Add(DeviceFlags.巷道口, new List<string>() { "1011", "1012", "1013", "1014", "1015", "1016", "1021", "1022", "1023", "1024", "1025", "1026" });
|
|
|
- devices.Add(DeviceFlags.入库, new List<string>() { "1011", "1013", "1015", "1022", "1024", "1026" });
|
|
|
- devices.Add(DeviceFlags.出库, new List<string>() { "1012", "1014", "1016", "1021", "1023", "1025" });
|
|
|
+ Dictionary<DeviceFlags, List<string>> devices = new Dictionary<DeviceFlags, List<string>>
|
|
|
+ {
|
|
|
+ { DeviceFlags.巷道口, new List<string>() { "1011", "1012", "1013", "1014", "1015", "1016", "1021", "1022", "1023", "1024", "1025", "1026" } },
|
|
|
+ { DeviceFlags.入库, new List<string>() { "1011", "1013", "1015", "1022", "1024", "1026" } },
|
|
|
+ { DeviceFlags.出库, new List<string>() { "1012", "1014", "1016", "1021", "1023", "1025" } },
|
|
|
+ { DeviceFlags.扫码, new List<string>() { "1011", "1013", "1015" } }
|
|
|
+ };
|
|
|
|
|
|
devices.ForEach(item =>
|
|
|
{
|