From 6428fad15dbe79e30a48ffc9aabe31e03a45426c Mon Sep 17 00:00:00 2001
From: patrick <patrick.xu@broconcentric.com>
Date: 星期四, 05 十二月 2019 12:50:13 +0800
Subject: [PATCH] 1. 添加部分log信息 2. 修改部分机器人动作流程 3. 开放OperationConfig的InputData参数

---
 src/A032.Process/ProcessConfig.cs |  134 ++++++++++++++++++++++----------------------
 1 files changed, 66 insertions(+), 68 deletions(-)

diff --git a/src/A032.Process/ProcessConfig.cs b/src/A032.Process/ProcessConfig.cs
index 3640397..c7cbb46 100644
--- a/src/A032.Process/ProcessConfig.cs
+++ b/src/A032.Process/ProcessConfig.cs
@@ -46,6 +46,12 @@
         [TypeConverter(typeof(CollectionCountConvert))]
         [Editor(typeof(ComplexCollectionEditor<HikCameraInitialConfig>), typeof(UITypeEditor))]
         public List<HikCameraInitialConfig> CameraConfigCollection { get; set; } = new List<HikCameraInitialConfig>();
+
+        [Category("璁惧閰嶇疆")]
+        [Description("AGV灏忚溅璁惧缁戝畾閰嶇疆锛岄厤缃粦瀹氱殑AGV锛屾満鍣ㄤ汉鍜岀浉鏈轰俊鎭�")]
+        [TypeConverter(typeof(CollectionCountConvert))]
+        [Editor(typeof(ComplexCollectionEditor<AGVBindUnit>), typeof(UITypeEditor))]
+        public List<AGVBindUnit> AGVBindCollection { get; set; } = new List<AGVBindUnit>();
         #endregion
 
         #region 鎿嶄綔閰嶇疆
@@ -55,15 +61,15 @@
         //[Editor(typeof(MonitorSetBindEditor), typeof(UITypeEditor))]
         //public Dictionary<string, MonitorSet> PLCMonitorSet { get; set; } = new Dictionary<string, MonitorSet>();
 
-        ///// <summary>
-        ///// 鎿嶄綔閰嶇疆鐨勫瓧鍏搁泦鍚�
-        ///// Key锛歁ethodCode锛孷alue锛氭搷浣滈厤缃�
-        ///// </summary>
-        //[Category("鎿嶄綔閰嶇疆")]
-        //[Description("鎿嶄綔閰嶇疆闆嗗悎")]
-        //[TypeConverter(typeof(CollectionCountConvert))]
-        //[Editor(typeof(OperationConfigBindEditor), typeof(UITypeEditor))]
-        //public Dictionary<string, IOperationConfig> ProcessOpConfigDict { get; set; } = new Dictionary<string, IOperationConfig>();
+        /// <summary>
+        /// 鎿嶄綔閰嶇疆鐨勫瓧鍏搁泦鍚�
+        /// Key锛歁ethodCode锛孷alue锛氭搷浣滈厤缃�
+        /// </summary>
+        [Category("鎿嶄綔閰嶇疆")]
+        [Description("榛樿鎿嶄綔閰嶇疆闆嗗悎")]
+        [TypeConverter(typeof(CollectionCountConvert))]
+        [Editor(typeof(OperationConfigBindEditor), typeof(UITypeEditor))]
+        public Dictionary<string, IOperationConfig> ProcessOpConfigDict { get; set; } = new Dictionary<string, IOperationConfig>();
 
         //[Category("鐩戝惉鍜屾搷浣滈厤缃�")]
         //[Description("鐩戝惉鎿嶄綔閰嶇疆闆嗗悎")]
@@ -96,18 +102,20 @@
         [Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))]
         public string LogPath { get; set; }
 
-        [Category("鏃ュ織閰嶇疆")]
-        [Description("GRR鏃ュ織鏂囦欢澶硅矾寰�")]
-        [Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))]
-        public string GRRLogPath { get; set; }
+        //[Category("鏃ュ織閰嶇疆")]
+        //[Description("GRR鏃ュ織鏂囦欢澶硅矾寰�")]
+        //[Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))]
+        //public string GRRLogPath { get; set; }
 
         [Category("CSV鏂囦欢閰嶇疆")]
         [Description("鏄惁鍋欳SV鏂囦欢杈撳嚭")]
+        [Browsable(false)]
         public bool IsCSVOutput { get; set; } = false;
 
         [Category("CSV鏂囦欢閰嶇疆")]
         [Description("CSV杈撳嚭鏂囦欢澶硅矾寰�")]
         [Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))]
+        [Browsable(false)]
         public string CSVFilePath { get; set; }
         #endregion
 
@@ -117,9 +125,9 @@
         //[Editor(typeof(ComplexCollectionEditor<WarningSet>), typeof(UITypeEditor))]
         //public List<WarningSet> WarningSets { get; set; } = new List<WarningSet>();
 
-        [Category("PLC鐩稿叧閰嶇疆")]
-        [Description("浜у搧鍑哄垪鏃舵槸鍚︽湁纭鍔ㄤ綔銆倀rue锛氭湁纭鍔ㄤ綔锛岀‘璁ゅ悗浜у搧鍑哄垪锛沠alse锛氭病鏈夌‘璁ゅ姩浣滐紝鏌ヨ鏃朵骇鍝佸嚭鍒�")]
-        public bool IsConfirmWhenProductionDone { get; set; } = false;
+        //[Category("PLC鐩稿叧閰嶇疆")]
+        //[Description("浜у搧鍑哄垪鏃舵槸鍚︽湁纭鍔ㄤ綔銆倀rue锛氭湁纭鍔ㄤ綔锛岀‘璁ゅ悗浜у搧鍑哄垪锛沠alse锛氭病鏈夌‘璁ゅ姩浣滐紝鏌ヨ鏃朵骇鍝佸嚭鍒�")]
+        //public bool IsConfirmWhenProductionDone { get; set; } = false;
 
         [Category("NG鍥剧墖淇濆瓨閰嶇疆")]
         [Description("NG鍥剧墖淇濆瓨鐩綍")]
@@ -140,8 +148,48 @@
         [Category("璺緞鐩稿叧")]
         [Description("鍚勪綅缃爣瀹氱煩闃�")]
         [TypeConverter(typeof(CollectionCountConvert))]
-        [Editor(typeof(ComplexCollectionEditor<PositionMatrix>), typeof(UITypeEditor))]
-        public List<PositionMatrix> MatrixCollection { get; set; } = new List<PositionMatrix>();
+        [Editor(typeof(ComplexCollectionEditor<PositionVisionConfig>), typeof(UITypeEditor))]
+        public List<PositionVisionConfig> VisionConfigCollection { get; set; } = new List<PositionVisionConfig>();
+
+        [Category("瑙嗚閰嶇疆")]
+        [Description("鏄惁鍚敤瑙嗚寮曞")]
+        public bool IsEnableVisionGuide { get; set; } = false;
+
+        /// <summary>
+        /// 绌篢ray涓婃枡闃堝�硷紝AGV涓婄殑绌簍ray鏁伴噺涓嶅ぇ浜庤鏁板�兼椂锛孉GV鍙互鎵ц绌篢ray涓婃枡浠诲姟
+        /// </summary>
+        [Category("闃堝�艰缃�")]
+        [Description("绌篢ray涓婃枡闃堝�硷紝AGV涓婄殑绌簍ray鏁伴噺涓嶅ぇ浜庤鏁板�兼椂锛孉GV鍙互鎵ц绌篢ray涓婃枡浠诲姟")]
+        public int AGV_EmptyTrayThreshold { get; set; } = 0;
+
+        /// <summary>
+        /// 婊ray涓嬫枡闃堝�硷紝AGV涓婄殑婊ray鏁伴噺涓嶅皬浜庤鏁板�兼椂锛孉GV鍙互鎵ц婊ray涓嬫枡浠诲姟
+        /// </summary>
+        [Category("闃堝�艰缃�")]
+        [Description("婊ray涓嬫枡闃堝�硷紝AGV涓婄殑婊ray鏁伴噺涓嶅皬浜庤鏁板�兼椂锛孉GV鍙互鎵ц婊ray涓嬫枡浠诲姟")]
+        public int AGV_FullTrayThreshold { get; set; } = 10;
+
+        /// <summary>
+        /// 浜х嚎蹇欐椂鎷嶇収纭绛夊緟闂撮殧锛屼互绉掍负鍗曚綅
+        /// </summary>
+        [Category("闃堝�艰缃�")]
+        [Description("浜х嚎蹇欐椂鎷嶇収纭绛夊緟闂撮殧锛屼互绉掍负鍗曚綅")]
+        public int LineBusyWaitInterval { get; set; } = 60;
+
+        /// <summary>
+        /// 浜х嚎蹇欐椂鎷嶇収閲嶈瘯娆℃暟
+        /// </summary>
+        [Category("闃堝�艰缃�")]
+        [Description("浜х嚎蹇欐椂鎷嶇収閲嶈瘯娆℃暟")]
+        public int LineBusyRetryTimes { get; set; } = 10;
+
+        [Category("闃堝�艰缃�")]
+        [Description("鏈哄彴鍘嬫満婊ray鏁伴噺")]
+        public int Machine_FullTrayNum { get; set; }
+
+        [Category("闃堝�艰缃�")]
+        [Description("鏈哄彴鍘嬫満绌篢ray鏁伴噺")]
+        public int Machine_EmptyTrayNum { get; set; }
 
         #region Ignore
         [Browsable(false)]
@@ -190,55 +238,5 @@
         [JsonIgnore]
         public virtual bool IsDBSave { get; set; } = false;
         #endregion
-    }
-
-    public class PathPosition : IComplexDisplay
-    {
-        [Category("瀵艰埅璺緞")]
-        [Description("璺緞鑺傜偣浠g爜")]
-        public string PositionCode { get; set; }
-
-        [Category("瀵艰埅璺緞")]
-        [Description("璺緞鑺傜偣鎻忚堪")]
-        public string Description { get; set; }
-
-        public string GetDisplayText()
-        {
-            return $"{PositionCode}-{Description}";
-        }
-    }
-
-    public class PositionMatrix : IComplexDisplay
-    {
-        [Category("浣嶇疆鐭╅樀")]
-        [Description("浣嶇疆浠g爜")]
-        [TypeConverter(typeof(PositionCodeConverter))]
-        public string PositionCode { get; set; }
-
-        [Category("浣嶇疆鐭╅樀")]
-        [Description("璇ヤ綅缃爣瀹氱煩闃�")]
-        [TypeConverter(typeof(SimpleCollectionConvert<double>))]
-        public List<double> Matrix { get; set; } = new List<double>();
-
-        public string GetDisplayText()
-        {
-            return $"{PositionCode}:{string.Join(",", Matrix)}";
-        }
-    }
-
-    public class PositionCodeConverter : ComboBoxItemTypeConvert
-    {
-        public override void GetConvertHash()
-        {
-            using (var scope = GlobalVar.Container.BeginLifetimeScope())
-            {
-                var config = scope.Resolve<ProcessConfig>();
-
-                config.PositionCollection.ForEach(p =>
-                {
-                    _hash[p.PositionCode] = $"{p.PositionCode}-{p.Description}";
-                });
-            }
-        }
     }
 }

--
Gitblit v1.8.0