From 4e8bf084f8a04617a9f542099183b8d829fa7c4b Mon Sep 17 00:00:00 2001 From: patrick <patrick.xu@broconcentric.com> Date: 星期五, 18 十月 2019 19:07:51 +0800 Subject: [PATCH] 1. 修改机器人通信协议及相关流程触发和操作 --- src/A032.Process/ProcessConfig.cs | 114 ++++++++++++++++++++++++++------------------------------ 1 files changed, 53 insertions(+), 61 deletions(-) diff --git a/src/A032.Process/ProcessConfig.cs b/src/A032.Process/ProcessConfig.cs index 3640397..200811f 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("鐩戝惉鎿嶄綔閰嶇疆闆嗗悎")] @@ -140,8 +146,44 @@ [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>(); + + /// <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 +232,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