2026-01-26 14:51:28 +09:00

88 lines
3.8 KiB
C#

/*
* Copyright (c) 2025 LG Electronics Inc.
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
*/
using Aurora;
using Aurora.Api;
using PropertyTools.DataAnnotations;
using System.IO;
namespace VisionCommon {
public enum eMilErrPrint {
PRINT_ENABLE,
PRINT_DISABLE,
THROW_EXCEPTION // MIL 에러를 띄우지 않고, .Net Exception 처리한다.
}
public enum eImageFormat {
PNG, // 원본이미지 전용 (권장)
BMP, // 원본이미지 전용
JPG // 스크린샷 전용
}
/// <summary>비전 레시피를 저장할 Aurora의 데이터 타입</summary>
public enum eRecipeModelType {
/// <summary>Aurora의 Recipe에 저장</summary>
AuroraRecipe,
/// <summary>Aurora의 Model에 저장</summary>
AuroraModel,
/// <summary>Aurora의 Ingredient에 저장</summary>
AuroraIngredient
}
public enum eCoordUnit {
MM, UM
}
public enum eMonitor {
Primary_MainMonitor = -1,
NotPrimary_SubMonitor = -2,
FirstMonitor = 0,
SecondMonitor,
ThridMonitor,
ForthMonitor,
}
public class VisionSetting : ISettingItem {
[Category("Basic Options")]
[Browsable(true)] public bool UseMainCameraWindow { get; set; } = true; // 메인 카메라 윈도우 사용 (서브모니터용)
[Browsable(true)] public bool UseCamPattern { get; set; } = false; // 카메라 패턴 사용
[Browsable(true)] public bool UseProcTest { get; set; } = false; // 공정 테스트 사용
[Browsable(true)] public bool UseDBService { get; set; } = false; // DB 사용 (MongoDB)
[Description("Not Supported Monitor, Automatically Use Primary Monitor")]
[Browsable(true)]
[SelectorStyle(SelectorStyle.ComboBox)]
public eMonitor SetPopupMonitor { get; set; } = eMonitor.NotPrimary_SubMonitor; // CameraPopup창 Monitor 설정
[Category("Image")]
public bool SaveOkImage { get; set; } = false; // OK 원본 이미지 저장
public bool SaveOkSceenShotImage { get; set; } = false; // OK 스크린샷 이미지 저장
public bool SaveSetUpImage { get; set; } = true; // 셋업 이미지 저장
[SelectorStyle(SelectorStyle.ComboBox)]
public eImageFormat ImageFormat { get; set; } = eImageFormat.PNG;
[Category("Image and Csv Path")]
[DirectoryPath]
public string RootDirPath { get; set; } = VisionEnv.VisionRootDataPath; // 비전 데이터 루트 폴더 경로 (Log, Image, Csv)
public bool UseLotId { get; set; } = false;
public bool UseCarrierId { get; set; } = false;
public bool UseMaterialId { get; set; } = false;
[Category("Light")]
public int LightCount { get; set; } = 1; // 조명 디바이스의 수
[Category("MIL")]
[SelectorStyle(SelectorStyle.ComboBox)]
public eMilErrPrint MilErrPrint { get; set; } = eMilErrPrint.PRINT_DISABLE; // MIL 에러 알람 띄우기
/// <summary>설정 - 비전 레시피를 저장할 Aurora의 데이터 타입</summary>
[Category("Recipe & Model")]
[SelectorStyle(SelectorStyle.ComboBox)]
public eRecipeModelType RecipeModelType { get; set; } = eRecipeModelType.AuroraRecipe;
public bool UseRecipeAutoUpdate { get; set; } = true;
[SelectorStyle(SelectorStyle.ComboBox)]
public eCoordUnit CoordUnit { get; set; } = eCoordUnit.MM;
[Category("Vision Alarm")]
/// <summary> 장비에서 정의한 알람코드와 중복되지 않도록 변경해서 사용. 비전 알람은 AlarmBaseCode에 더하여 사용한다. </summary>
public int AlarmBaseCode { get; set; } = 7000;
}
}