| 
					
				 | 
			
			
				@@ -34,24 +34,47 @@ namespace WCS.WorkEngineering 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             #region 托盘线输送线 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<StationSegmentInfo> segmentInfo = new List<StationSegmentInfo> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //List<StationSegmentInfo> segmentInfo = new List<StationSegmentInfo> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //    new StationSegmentInfo(2701, 2734, "10.30.37.89"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //    new StationSegmentInfo(2501, 2534, "10.30.37.89"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //    new StationSegmentInfo(1611, 1616, "10.30.37.89"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //    new StationSegmentInfo(1601, 1606, "10.30.37.89"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<Tuple<string, List<Tuple<int, int>>>> tuples = new List<Tuple<string, List<Tuple<int, int>>>>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                new StationSegmentInfo(2701, 2734, "10.30.37.89"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                new StationSegmentInfo(2501, 2534, "10.30.37.89"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                new StationSegmentInfo(1611, 1616, "10.30.37.89"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                new StationSegmentInfo(1601, 1606, "10.30.37.89"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                new Tuple<string, List<Tuple<int, int>>>("10.30.37.89",new List<Tuple<int, int>>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    new Tuple<int, int>(1601, 1620), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    new Tuple<int, int>(2501, 2540), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    new Tuple<int, int>(2701, 2740), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            foreach (var item in segmentInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            foreach (var item in tuples) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                for (int i = item.Start; i <= item.End; i++) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var db520 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var db521 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var db523 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                foreach (var item1 in item.Item2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    var conv = new Device(i.ToString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    conv.AddFlag(DeviceFlags.输送机); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    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); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    for (int i = item1.Item1; i <= item1.Item2; i++) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        var conv = new Device(i.ToString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        conv.AddFlag(DeviceFlags.输送机); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        conv.AddProtocol<IStation520>(db520, 520, item.Item1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        conv.AddProtocol<IStation521>(db521, 521, item.Item1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        conv.AddProtocol<IStation523>(db523, 523, item.Item1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (i == 2532) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            var a = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        db520 = db520 + 14; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        db521 = db521 + 16; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        db523 = db523 + 12; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |