BorderSearchServiceClient.cs 3.15 KB
Newer Older
潘栩锋's avatar
1  
潘栩锋 committed
1 2 3 4 5 6 7 8 9 10 11 12 13
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Misc;
using FObjBase;
using FLY.Thick.Base.IService;
using FLY.Thick.Base.OBJ_INTERFACE;
using FLY.Thick.Base.Common;

namespace FLY.Thick.Base.Client
{
14 15 16
    /// <summary>
    /// 边界查找服务 客户代理
    /// </summary>
17
    public class BorderSearchServiceClient: FObjBase.Reflect.Reflect_SeviceClient, IBorderSearchService
潘栩锋's avatar
1  
潘栩锋 committed
18
    {
19
        protected override Type InterfaceType => typeof(IBorderSearchService);
20 21 22 23 24
        /// <summary>
        /// 边界查找服务 构造
        /// </summary>
        /// <param name="id"></param>
        public BorderSearchServiceClient(UInt32 id) : base(id) { }
潘栩锋's avatar
1  
潘栩锋 committed
25

26 27 28 29 30 31
        /// <summary>
        /// 边界查找服务 构造
        /// </summary>
        /// <param name="serviceId">服务id</param>
        /// <param name="connName">连接器</param>
        public BorderSearchServiceClient(UInt32 serviceId, string connName) : base(serviceId, connName) { }
潘栩锋's avatar
1  
潘栩锋 committed
32 33

        #region IBorderSearchService 成员
34 35 36 37

        public bool Enable { get; set; }


潘栩锋's avatar
1  
潘栩锋 committed
38 39 40
        /// <summary>
        /// 边界拐点检测,找到的边界更加精确
        /// </summary>
41 42
        public bool IsBreakDetect { get; set; } = true;

43 44 45
        
        public RangeStruct Valid { get; set; }

46
        public Range Border_Backw { get; set; } = new Range();
47

48
        public Range Border_Forw { get; set; } = new Range();
49 50

        public RangeStruct Border { get; set; }
51 52


潘栩锋's avatar
1  
潘栩锋 committed
53 54 55
        /// <summary>
        /// 当前膜宽,测量出来的,单位是 脉冲
        /// </summary>
56
        public int Width { get; set; }
57 58


潘栩锋's avatar
1  
潘栩锋 committed
59 60 61
        /// <summary>
        /// 膜中间位置 单位 脉冲
        /// </summary>
62
        public int Mid { get; set; }
潘栩锋's avatar
1  
潘栩锋 committed
63

64 65 66 67
        /// <summary>
        /// 调试数据更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
潘栩锋's avatar
1  
潘栩锋 committed
68 69 70
        /// <summary>
        /// 手动设置温修AD值
        /// </summary>
71
        public bool TempADBySet { get; set; }
潘栩锋's avatar
1  
潘栩锋 committed
72

73
        public int TempAD { get; set; }
潘栩锋's avatar
1  
潘栩锋 committed
74

75 76 77 78 79 80 81 82 83 84 85 86 87 88
        public int TempRange { get; set; }

        /// <summary>
        /// 温修范围是温修的百分比
        /// </summary>
        public bool IsTempRangeByPercent { get; set; } = true;

        /// <summary>
        ///  温修范围百分比
        /// </summary>
        public double TempRangePercent { get; set; } = 0.02;


        public int N { get; set; }
潘栩锋's avatar
1  
潘栩锋 committed
89 90 91 92

        /// <summary>
        /// 探头直径,单位脉冲, 膜宽 = 边界范围 - 探头直径
        /// </summary>
93 94 95 96 97 98
        public int SensorWidth { get; set; }

        public int N2 { get; set; }


        public int N3 { get; set; }
潘栩锋's avatar
1  
潘栩锋 committed
99

100 101 102 103 104
        /// <summary>
        /// 产品宽度,设置值 单位:脉冲
        /// 当膜超过范围(没有经过阀值),就使用它,猜边界在哪
        /// </summary>
        public int ProductWidth { get; set; }
105

潘栩锋's avatar
1  
潘栩锋 committed
106 107
        #endregion

108 109
        public void GetView(AsyncCBHandler asyncDelegate, object asyncContext)
        {
110
            Call(nameof(GetView), null, asyncDelegate, asyncContext);
111
        }
潘栩锋's avatar
1  
潘栩锋 committed
112 113
        public void Apply() 
        {
114
            Call(nameof(Apply));
潘栩锋's avatar
1  
潘栩锋 committed
115 116 117
        }
    }
}