领胜LDS 键盘AOI检测项目
xcd
2020-06-30 aaae1139f2bb3a55910fff0aa907b3ba6395deea
src/Bro.Device.Gocator/GocatorConfig.cs
@@ -1,7 +1,10 @@
using Bro.Common.Base;
using Bro.Common.Base.UI;
using Bro.Common.Helper;
using Bro.Common.Interface;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -11,10 +14,73 @@
    [Device("Gocator", "Gocator激光扫描仪", EnumHelper.DeviceAttributeType.InitialConfig)]
    public class GocatorInitialConfig : CameraInitialConfigBase
    {
        #region Not used
        [Browsable(false)]
        public override string SerialNum { get; set; }
        [Browsable(false)]
        public override string ComputerIP { get; set; }
        #endregion
        [Category("计算设置")]
        [Description("true:计算时使用加速器,false:不使用加速器")]
        [DefaultValue(false)]
        public bool IsUseAccelerator { get; set; } = false;
        [Category("拍摄设置")]
        [Description("默认Job")]
        [DisplayName("默认Job")]
        [DefaultValue("")]
        public string DefaultJob { get; set; } = "";
        [Category("拍摄设置")]
        [Description("取像超时设置,单位ms")]
        [DefaultValue(1000)]
        public int SnapshotTimeout { get; set; } = 1000;
        //[Category("采图模式")]
        //[Description("是否硬触发模式。true:硬触发;false:软触发")]
        //[DisplayName("硬触发")]
        //public bool IsHardwareTrigger { get; set; } = false;
        [Category("采图模式")]
        [Description("true:异步/被动采图模式  false:同步/主动采图模式")]
        [DefaultValue(false)]
        public bool IsAsyncMode { get; set; } = false;
    }
    [Device("Gocator", "Gocator激光扫描仪", EnumHelper.DeviceAttributeType.OperationConfig)]
    public class GocatorOperationConfig : CameraOprerationConfigBase
    {
        [Category("算法配置")]
        [Description("切换Job名称")]
        public string JobName { get; set; }
        [Category("取像配置")]
        [Description("true: 取像操作 false: 不是取像操作")]
        public bool IsSnapshotAction { get; set; }
        [Category("取像配置")]
        [Description("true: 连接操作 false: 断开连接操作")]
        public bool IsOpenConnection { get; set; }
        public new string GetDisplayText()
        {
            return $"{(IsSnapshotAction ? "取像操作" : "")} {(IsOpenConnection ? "开始连接" : "")} 算法:{AlgorithemPath}";
        }
        #region Not used
        [Browsable(false)]
        public override float ExposureAfterSnap { get; set; }
        [Browsable(false)]
        public override int ExposureWaitTime { get; set; }
        [Browsable(false)]
        public override float Gain { get; set; }
        #endregion
    }
    [Device("Gocator", "Gocator激光扫描仪", EnumHelper.DeviceAttributeType.RunCtrl)]
    public class GocatorRunCtrl : CtrlCameraRunBase
    {
        public GocatorRunCtrl(IDevice device) : base(device) { }
    }
}