public unsafe TwoAxisAdjustmentToolResult(SensorResult *result)
     : base(result)
 {
     this.Description           = result->sTwoAxesPosAdjust.sPositionDescription;
     this.Value                 = result->sTwoAxesPosAdjust.wMatchPercent;
     this.DrawInSettingPosition = true;
 }
Пример #2
0
 public unsafe PitchToolResult(SensorResult *result, SensorSetting *setting)
     : base(result)
 {
     this.Value   = (ushort)0;
     this.Extend  = new ToolExtendResult(true, (ushort)result->sEdgePitch.dwMatchPerMin, (ushort)result->sEdgePitch.dwMatchPerMax);
     this.Scaling = new ToolScalingResult(setting->sEdgePitch.sScalingSetting.byScalingValid != (byte)0, (ulong)result->sEdgePitch.dwMatchPerMin, (ulong)result->sEdgePitch.dwMatchPerMax);
 }
Пример #3
0
        internal unsafe PositionAdjustToolResult(SensorResult *result)
            : base(result)
        {
            ushort wDetectedCount = result->sPositionAdjust.wDetectedCount;

            this.Description           = result->sPositionAdjust.sResult.sPositionDescription;
            this.Value                 = wDetectedCount == (ushort)1 ? result->sPositionAdjust.sResult.wScore : (ushort)0;
            this.DrawInSettingPosition = wDetectedCount == (ushort)0;
        }
Пример #4
0
        internal static unsafe ToolResultInternalBase Create(
            SensorResult *pResult,
            SensorSetting *pSetting)
        {
            switch (pResult->bySensorType)
            {
            case 0:
                return((ToolResultInternalBase) new NoneToolResult(pResult));

            case 1:
                return((ToolResultInternalBase) new PositionAdjustToolResult(pResult));

            case 2:
                return((ToolResultInternalBase) new OutlineToolResult(pResult));

            case 3:
                return((ToolResultInternalBase) new ColorAreaToolResult(pResult));

            case 4:
                return((ToolResultInternalBase) new MonochromeAreaToolResult(pResult));

            case 9:
                return((ToolResultInternalBase) new EdgeToolResult(pResult));

            case 10:
                return((ToolResultInternalBase) new WidthToolResult(pResult, pSetting));

            case 11:
                return((ToolResultInternalBase) new PitchToolResult(pResult, pSetting));

            case 12:
                return((ToolResultInternalBase) new DiameterToolResult(pResult, pSetting));

            case 13:
                return((ToolResultInternalBase) new EdgePixelsToolResult(pResult));

            case 14:
                return((ToolResultInternalBase) new OneAxisAdjustmentToolResult(pResult));

            case 15:
                return((ToolResultInternalBase) new TwoAxisAdjustmentToolResult(pResult));

            default:
                return((ToolResultInternalBase) new UnrecognizedToolResult(pResult));
            }
        }
 internal unsafe MonochromeAreaToolResult(SensorResult *result)
     : base(result)
 {
     this.Value = result->sAreaMono.wMatchPercent;
 }
Пример #6
0
 public unsafe DiameterToolResult(SensorResult *result, SensorSetting *setting)
     : base(result)
 {
     this.Scaling = new ToolScalingResult(setting->sDiameter.sScalingSetting.byScalingValid != (byte)0, (ulong)result->sDiameter.dwMatchPercent, (ulong)result->sDiameter.dwMatchPercent);
     this.Value   = this.Scaling.Enabled ? (ushort)0 : (ushort)result->sDiameter.dwMatchPercent;
 }
Пример #7
0
 internal unsafe ColorAreaToolResult(SensorResult *result)
     : base(result)
 {
     this.Value = result->sAreaColor.wMatchPercent;
 }
 public unsafe UnrecognizedToolResult(SensorResult *result)
     : base(result)
 {
     this.Value = (ushort)0;
 }
 protected unsafe PositionAdjustToolResultBase(SensorResult *result)
     : base(result)
 {
 }
 public unsafe EdgePixelsToolResult(SensorResult *result)
     : base(result)
 {
     this.Value = result->sEdgePixelCount.wMatchPercent;
 }
 internal unsafe PositionAdjustExcludeToolResult(SensorResult *result)
     : base(result)
 {
 }
 internal unsafe ToolResultInternalBase(SensorResult *result)
 {
     this._isOk   = result->byResult == (byte)1;
     this.Extend  = new ToolExtendResult();
     this.Scaling = new ToolScalingResult();
 }
Пример #13
0
 public unsafe EdgeToolResult(SensorResult *result)
     : base(result)
 {
     this.Value = result->sEdgePresence.wMatchPercent;
 }
Пример #14
0
 internal unsafe NoneToolResult(SensorResult *pResult)
     : base(pResult)
 {
 }