/* * Copyright (c) 2025 LG Electronics Inc. * SPDX-License-Identifier: LicenseRef-LGE-Proprietary */ using Aurora.View; using System; using System.Collections.Generic; using VisionCommon; namespace VisionAligner { /// /// 얼라인 결과 항목 /// public class AlignResultItem : ICloneable { /// 걸린 시간 public string Time { get; set; } /// 얼라인 이름 public string AlignName { get; set; } /// 얼라인 알고리즘 public string AlignAlgorithm { get; set; } /// 얼라인 횟수 public int AlignCnt { get; set; } /// 얼라인 보정량 X public double Dx { get; set; } /// 얼라인 보정량 Y public double Dy { get; set; } /// 얼라인 보정량 T public double Dt { get; set; } /// 얼라인 상태 public string AlignStatus { get; set; } /// /// Clone (Deep Copy) /// /// AlignResultItem public object Clone() { return new AlignResultItem() { Time = this.Time, AlignName = this.AlignName, AlignAlgorithm = this.AlignAlgorithm, AlignCnt = this.AlignCnt, Dx = this.Dx, Dy = this.Dy, Dt = this.Dt, AlignStatus = this.AlignStatus }; } } /// /// 얼라인 결과 항목 매니저 /// public class AlignResultItemManager : ItemManagerBase { private static readonly object _Lock = new object(); /// /// 얼라인 결과 항목을 Get한다 /// /// 서브 시스템 정보 /// 얼라인 결과 /// 얼라인 결과 항목 public static AlignResultItem GetAlignResultItem(AlignInfo alignInfo, AlignResult alignResult) { lock (_Lock) { return new AlignResultItem() { Time = GetTimeStamp(alignInfo, alignResult), AlignName = alignResult.AlignName, AlignAlgorithm = alignResult.AlignAlgorithm.ToString(), AlignCnt = alignResult.AlignCnt, Dx = CoordUnitValueConverter.GetCoordUnitValue(alignResult.Delta.X), Dy = CoordUnitValueConverter.GetCoordUnitValue(alignResult.Delta.Y), Dt = alignResult.Delta.T.Degree, AlignStatus = alignResult.Status.ToString() }; } } } }