/* * Copyright (c) 2025 LG Electronics Inc. * SPDX-License-Identifier: LicenseRef-LGE-Proprietary */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using VisionCommon; namespace VisionSequence.Setup { /// /// 비전 반복도 로그 /// public class VisionRepeatLog : ICloneable { /// /// 걸린 시간 /// public string Time { get; set; } /// /// 반복 Step /// public int Step { get; set; } /// /// 이미지 X 위치 /// public double ImagePosX { get; set; } /// /// 이미지 Y위치 /// public double ImagePosY { get; set; } /// /// 자재 X 위치 /// public double StaticPosX { get; set; } /// /// 자재 Y위치 /// public double StaticPosY { get; set; } /// /// 패턴 각도 /// public double Angle { get; set; } /// /// 가로 길이(Shape) /// public double Width { get; set; } /// /// 세로 길이(Shape) /// public double Height { get; set; } /// /// 반지름 길이(Shape) /// public double Radius { get; set; } public object Clone() { return new VisionRepeatLog() { Time = this.Time, Step = this.Step, ImagePosX = this.ImagePosX, ImagePosY = this.ImagePosY, StaticPosX = this.StaticPosX, StaticPosY = this.StaticPosY, Angle = this.Angle, Width = this.Width, Height = this.Height, Radius = this.Radius }; } public VisionRepeatLog() { } /// /// 생성자 (for Shape) /// /// 반복 Step /// 이미지 X 위치 /// 이미지 Y 위치 /// 자재 X 위치 /// 자재 Y 위치 /// 패턴 각도 /// 가로 길이 /// 세로 길이 /// 반지름 길이 public VisionRepeatLog(int step, double imagePosX, double imagePosY, double staticPosX, double staticPosY, double angle, double width, double height, double radius) { Step = step; ImagePosX = imagePosX; ImagePosY = imagePosY; StaticPosX = staticPosX; StaticPosY = staticPosY; Angle = angle; Width = width; Height = height; Radius = radius; } /// /// 생성자 (for not Shape) /// /// 반복 Step /// 이미지 X 위치 /// 이미지 Y 위치 /// 자재 X 위치 /// 자재 Y 위치 /// 패턴 각도 public VisionRepeatLog(int step, double imagePosX, double imagePosY, double staticPosX, double staticPosY, double angle) { Step = step; ImagePosX = imagePosX; ImagePosY = imagePosY; StaticPosX = staticPosX; StaticPosY = staticPosY; Angle = angle; Width = 0; Height = 0; Radius = 0; } } /// /// 비전 반복도 결과 항목 매니저 /// public class VisionRepeatResultItemManager : ItemManagerBase { private static readonly object _Lock = new object(); /// /// 비전 반복도 결과 항목을 Get 한다. /// /// /// /// 비전 반복도 결과 항목 public static VisionRepeatLog GetVisionRepeatLog(SubSysInfo subSysInfo, VisionRepeatLog log) { lock (_Lock) { return new VisionRepeatLog() { Time = GetTimeStamp(subSysInfo, log), Step = log.Step, ImagePosX = log.ImagePosX, ImagePosY = log.ImagePosY, StaticPosX = log.StaticPosX, StaticPosY = log.StaticPosY, Angle = log.Angle, Width = log.Width, Height = log.Height, Radius = log.Radius }; } } } }