2023-02-23 14:52:43 +08:00

234 lines
8.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Autofac;
using BRS.Common.Base;
using BRS.Common.Model.Helper;
using BRS.Common.Interface;
using BRS.Common.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BRS.Process.A020
{
[Process("A020", EnumHelper.DeviceAttributeType.InitialConfig)]
public class A020Config : ProcessConfigBase
{
//[Category("全局配置")]
//[DisplayName("数据过期天数")]
//[Description("OverdueDay数据库保存天数超出该值则认为数据过期会被清理")]
//public int OverdueDay { get; set; } = 14;
// [Category("触发配置")]
//[Description("检测取像相关设置")]
//[DisplayName("检测取像触发")]
//[TypeConverter(typeof(CollectionCountConvert))]
//[Editor(typeof(ComplexCollectionEditor<DetectionTrigger>), typeof(UITypeEditor))]
//public List<DetectionTrigger> DetectionTriggerConfigCollection { get; set; } = new List<DetectionTrigger>();
//[Category("触发配置")]
//[Description("其他触发设置,包括结果获取等")]
//[DisplayName("其他触发设置")]
//[TypeConverter(typeof(CollectionCountConvert))]
//[Editor(typeof(ComplexCollectionEditor<TriggerSet>), typeof(UITypeEditor))]
//public List<TriggerSet> TriggerConfigCollection { get; set; } = new List<TriggerSet>();
//[Category("触发配置")]
//[Description("产品振盘翻面配置")]
//[DisplayName("产品振盘翻面配置")]
//[TypeConverter(typeof(ComplexObjectConvert))]
//[Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))]
//public TurnOverConfig TurnOverConfig { get; set; } = new TurnOverConfig();
//[Category("产品信息配置")]
//[Description("产品信息配置")]
//[DisplayName("产品信息配置")]
//[TypeConverter(typeof(ComplexObjectConvert))]
//[Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))]
//public ProductInfoConfig ProductInfo { get; set; } = new ProductInfoConfig();
//[Category("检测结果配置")]
//[DisplayName("TBD优先")]
//[Description("检测结果数量不足时true按TBD处理 false按当前结果计算")]
//public bool IsTBDPriority { get; set; } = true;
//[Category("流程动作配置")]
//[Description("流程开始操作配置")]
//[DisplayName("流程开始操作配置")]
//[TypeConverter(typeof(CollectionCountConvert))]
//[Editor(typeof(ComplexCollectionEditor<DeviceOpBind>), typeof(UITypeEditor))]
//public List<DeviceOpBind> ProcessInitialOps { get; set; } = new List<DeviceOpBind>();
//[Category("流程动作配置")]
//[Description("流程关闭操作配置")]
//[DisplayName("流程关闭操作配置")]
//[TypeConverter(typeof(CollectionCountConvert))]
//[Editor(typeof(ComplexCollectionEditor<DeviceOpBind>), typeof(UITypeEditor))]
//public List<DeviceOpBind> ProcessCloseOps { get; set; } = new List<DeviceOpBind>();
//[Category("检测保存设置")]
//[DisplayName("检测图片保存目录")]
//[Description("ImgDirectory:采图保存目录")]
//[Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))]
//public string ImgDirectory { get; set; }
//[Category("产品数据保存设置")]
//[DisplayName("产品CSV数据保存")]
//[Description("true保存CSV产品数据 false不保存CSV产品数据")]
//public bool IsSaveCSVData { get; set; } = false;
//[Category("产品数据保存设置")]
//[DisplayName("产品数据库保存")]
//[Description("true保存产品数据到数据库 false不保存产品数据到数据库")]
//public bool IsSaveDataBase { get; set; } = true;
//[Category("屏蔽配置")]
//[DisplayName("安全门屏蔽")]
//[Description("true屏蔽安全门 false启用安全门")]
//[ReadOnly(true)]
//public bool IsSafetyDoorBlocked { get; set; } = false;
//[Category("屏蔽配置")]
//[DisplayName("气源感知屏蔽")]
//[Description("true屏蔽气源感知 false启用气源感知")]
//[ReadOnly(true)]
//public bool IsAirSensorBlocked { get; set; } = false;
//private bool isBeepBlocked = false;
//[Category("屏蔽配置")]
//[DisplayName("蜂鸣器屏蔽")]
//[Description("true屏蔽蜂鸣器 false启用蜂鸣器")]
//public bool IsBeepBlocked
//{
// get => isBeepBlocked;
// set => Set(ref isBeepBlocked, value);
//}
//[Category("全局配置")]
//[DisplayName("大复位时间")]
//[Description("大复位时间单位s")]
//public int FullResetRequiredDuration { get; set; } = 3;
}
//public class TurnOverConfig : IComplexDisplay
//{
// [Category("取像相机设置")]
// [Description("取像相机")]
// [DisplayName("取像相机")]
// [TypeConverter(typeof(DeviceIdSelectorConverter<CameraBase>))]
// public string CameraId { get; set; }
// [Category("输出设置")]
// [DisplayName("需要操作的IO")]
// [Description("需要操作的IO")]
// public int IOIndex { get; set; }
// [Category("触发设置")]
// [DisplayName("启用触发")]
// [Description("true启用触发 false关闭触发")]
// public bool IsEnableTrigger { get; set; }
// [Category("输出设置")]
// [Description("翻面触发吹气等待从相机取像完成开始超过该时间后触发正反吹气单位ms")]
// [DisplayName("翻面触发吹气等待")]
// public int TurnOverWaitTime { get; set; } = 500;
// [Category("输出设置")]
// [Description("翻面触发吹气标签,检测结果为该标签时,触发吹气停止,请设置小写")]
// [DisplayName("翻面触发吹气标签")]
// public string TurnOverLabel { get; set; } = "up";
// [Category("输出设置")]
// [DisplayName("吹气持续时间")]
// [Description("吹气持续时间,单位ms")]
// public int OutputElapsed { get; set; } = 100;
// public string GetDisplayText()
// {
// return $"{(IsEnableTrigger ? "启用" : "禁用")} --翻面检测触发IO{IOIndex}";
// }
//}
///// <summary>
///// 产品配置
///// </summary>
//public class ProductInfoConfig : IComplexDisplay
//{
// [Category("产品信息配置")]
// [Description("产品外径,单位 mm")]
// [DisplayName("产品外径")]
// public double OutsideDiameter { get; set; } = 27.00;
// [Category("产品信息配置")]
// [Description("产品高度,单位 mm")]
// [DisplayName("产品高度")]
// public double Height { get; set; } = 5.00;
// [Category("产品配方配置")]
// [Description("产品外径PLC配方地址")]
// [DisplayName("产品外径PLC配方地址")]
// public string OutsideDiameterPLCAddress { get; set; }
// [Category("产品配方配置")]
// [Description("产品高度PLC配方地址")]
// [DisplayName("产品高度PLC配方地址")]
// public string HeightPLCAddress { get; set; }
// [Category("产品配方配置")]
// [Description("产品号PLC配方地址")]
// [DisplayName("产品号PLC配方地址")]
// public string PCodePLCAddress { get; set; }
// [Category("产品配方配置")]
// [Description("PLC配方完成地址")]
// [DisplayName("PLC配方完成地址")]
// public string FormulasDonePLCAddress { get; set; }
// public string GetDisplayText()
// {
// return $"产品外径:{OutsideDiameter} 高度:{Height}";
// }
//}
//public class OutputTriggerConfig : OperationConfigBase
//{
// [Category("触发后输出配置")]
// [Description("输出索引")]
// public int OutputIndex { get; set; } = 1;
// [Category("触发后输出配置")]
// [Description("输出值")]
// public int OutputValue { get; set; } = 0;
// [Category("触发后输出配置")]
// [Description("触发时间,单位ms")]
// public int OutputElapsed { get; set; } = 0;
//}
}