IBlowingService.cs 3.63 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace FLY.Thick.Blowing.IService
{
    /// <summary>
    /// 基本吹膜系统
    /// </summary>
    public interface IBlowingService : INotifyPropertyChanged
    {
        #region 分区设定
        /// <summary>
        /// 加热通道数
        /// </summary>
        int ChannelCnt { get; set; }

        /// <summary>
        /// 分区数/加热通道数
        /// </summary>
        int BPC { get; set; }

        /// <summary>
        /// 人字架总分区数,从1开始数
        /// </summary>
        int NBolts { get; }

        /// <summary>
        /// 人字架复位时, 探头对应的分区位, 也就是 0° 对应的分区位
        /// </summary>
        int OrgBoltNo { get; set; }

        /// <summary>
        /// 使用分区表
        /// </summary>
        bool IsUsedMap { get; set; }
        /// <summary>
        /// 分区表,必须保证不能为null
        /// </summary>
        List<BoltMapCell> Map { get; set; } 
        #endregion

        /// <summary>
        /// 参数应用
        /// </summary>
        void Apply();

        /// <summary>
        /// 每次有新数据时候推送。 修改参数,不会推送
        /// </summary>
        event RenZiJiaDataEventHandler DataEvent;
    }

    /// <summary>
    /// 扫描一次,推送
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public delegate void RenZiJiaDataEventHandler(object sender, RenZiJiaDataEventArgs e);

    /// <summary>
    /// 扫描一次,推送的数据
    /// </summary>
    public class RenZiJiaDataEventArgs : EventArgs
    {
        /// <summary>
        /// 测量数据开始时间
        /// </summary>
        public DateTime Time { get; set; }

        /// <summary>
        /// 测量数据结束时间
        /// </summary>
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 旋转方向 是反向
        /// </summary>
        public bool IsBackw { get; set; }

        /// <summary>
        /// 旋转1周的时间
        /// </summary>
        public TimeSpan RPeriod { get; set; }

        /// <summary>
        /// 旋转次数
        /// </summary>
        public int RCnt { get; set; }

        /// <summary>
        /// 复位区号
        /// </summary>
        public int OrgBoltNo { get; set; }

        /// <summary>
        /// 旋转角度 °
        /// </summary>
        public double RAngle { get; set; }

        /// <summary>
        /// 膜距离 m
        /// </summary>
        public double FilmLength { get; set; }

        /// <summary>
        /// 线速度
        /// </summary>
        public double FilmVelocity { get; set; }

        /// <summary>
        /// 斜率补偿
        /// </summary>
        public double K { get; set; } = 1;

        /// <summary>
        /// 1幅数据
        /// </summary>
        public double[] Thicks { get; set; }

        /// <summary>
        /// 分区表
        /// </summary>
        public List<BoltMapCell> Boltmap { get; set; }
    }

    /// <summary>
    /// 分区表
    /// </summary>
    public class BoltMapCell
    {
        /// <summary>
        /// 旧位置
        /// </summary>
        public int OldNo { get; set; }
        /// <summary>
        /// 新位置
        /// </summary>

        public int NewNo { get; set; }

        /// <summary>
        /// 全复制
        /// </summary>
        /// <returns></returns>
        public BoltMapCell Clone()
        {
            return new BoltMapCell() { NewNo = NewNo, OldNo = OldNo };
        }
    }


}