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; namespace Bro.Device.Gocator { [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)] [Browsable(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; [Category("数据位配置")] [Description("图像数据位数,2位/4位")] public GocatorDataByteNums ByteNums { get; set; } = GocatorDataByteNums.Byte2; } public enum GocatorDataByteNums { Byte2 = 2, Byte4 = 4, } [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) { } } }