BlowingServiceClient.cs 1.84 KB
using FLY.Thick.Blowing.IService;
using FLY.Thick.Blowing.OBJ_INTERFACE;
using FObjBase;
using FObjBase.Reflect;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace FLY.Thick.Blowing.Client
{
    public class BlowingServiceClient : FObjBase.Reflect.Reflect_SeviceClient, IBlowingService
    {

        protected override Type InterfaceType => typeof(IBlowingFixService);

        #region IBlowing 成员变量
        #region 分区设定
        /// <summary>
        /// 加热通道数
        /// </summary>
        public int ChannelCnt { get; set; } = 44;


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


        /// <summary>
        /// 风环螺丝数
        /// </summary>
        public int NBolts => ChannelCnt * BPC;



        public int OrgBoltNo { get; set; } = 1;

        /// <summary>
        /// 使用分区表
        /// </summary>
        public bool IsUsedMap { get; set; }


        /// <summary>
        /// 分区表
        /// </summary>
        public BoltMapCell[] Map { get; set; } 

        #endregion


        #endregion

        /// <summary>
        /// 每次有新数据时候推送。 修改参数,不会推送
        /// </summary>
        [Push(typeof(RenZiJiaDataEventArgs))]
        public event EventHandler DataEvent;

        public BlowingServiceClient(UInt32 serviceId) : base(serviceId) { }

        public BlowingServiceClient(UInt32 serviceId, string connName) : base(serviceId, connName) { }


        public void Trigger_DataEvent(RenZiJiaDataEventArgs e) {
            DataEvent?.Invoke(this, e);
        }
        #region 功能
        public virtual void Apply()
        {
            Call(nameof(Apply));
        }

        #endregion

    }
}