53 lines
1.7 KiB
C#
53 lines
1.7 KiB
C#
using Aurora.Api.Devices;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace VisionCommon {
|
|
public enum AlignStatus {
|
|
DRY_RUN_OK,
|
|
OK,
|
|
F_OK,
|
|
NOT_FOUND,
|
|
RETRY,
|
|
RETRY_COUNT_OVER,
|
|
ALIGN_LIMIT_OVER,
|
|
DISTANCE_NG,
|
|
UNDEFINED_PATTERN
|
|
}
|
|
|
|
public class AlignResult {
|
|
public eDisplayType DisplayType { get; set; } = eDisplayType.Main_1;
|
|
public string AlignName { get; set; } = "";
|
|
public eAlignAlgorithm AlignAlgorithm { get; set; } = eAlignAlgorithm.AVG;
|
|
public int AlignCnt { get; set; } = 0;
|
|
public AlignStatus Status { get; set; }
|
|
public AlignDelta Delta { get; set; } = new AlignDelta();
|
|
public Dictionary<FovInfo, PatternResult> PatternResults { get; set; } = new Dictionary<FovInfo, PatternResult>();
|
|
|
|
public AlignResult() {
|
|
}
|
|
|
|
public AlignResult(int alignCnt, AlignStatus status, AlignDelta alignDelta, eAlignAlgorithm alignAlgorithm) {
|
|
this.AlignCnt = alignCnt;
|
|
this.Status = status;
|
|
this.Delta = alignDelta;
|
|
this.AlignAlgorithm = alignAlgorithm;
|
|
}
|
|
|
|
public AlignResult Clone() {
|
|
return new AlignResult() {
|
|
DisplayType = this.DisplayType,
|
|
AlignName = this.AlignName,
|
|
AlignAlgorithm = this.AlignAlgorithm,
|
|
AlignCnt = this.AlignCnt,
|
|
Status = this.Status,
|
|
Delta = this.Delta.Clone() as AlignDelta,
|
|
PatternResults = this.PatternResults.OrderBy(item => item.Key).ToDictionary(x => x.Key, x => x.Value)
|
|
};
|
|
}
|
|
}
|
|
}
|