ConfigIO.cs 1.7 KB
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TSA_V.DeviceLibrary
{  
    /// <summary>
    /// io配置
    /// </summary>
    public class ConfigIO 
    {
        public ConfigIO()
        {
        }
        public ConfigIO(string type, string ip,byte slaveId,ushort  index, string name, string explain)
        {
            this.SlaveID = slaveId;
            this.ProType = type;
            this.DeviceName = ip;
            this.IOIndex = index;
            this.ProName = name;
            this.Explain = explain;
        }
        public byte SlaveID { get; set; }
        /// <summary>
        /// DI=输入IO,DO=输出IO,PRO=属性,AXIS=轴
        /// </summary> 
        public string ProType { get; set; }
        /// <summary>
        /// 说明
        /// </summary> 
        public string Explain { get; set; }
        /// <summary>
        /// 名称
        /// </summary> 
        public string ProName { get; set; }
        /// <summary>
        /// 属性值
        /// </summary> 
        public ushort IOIndex { get; set; }
        /// <summary>
        /// 设备名称
        /// </summary> 
        public string DeviceName { get; set; }
        public string DisplayUSStr
        {
            get
            {
                return Explain.Substring(0, 3) + "_" + ProName;
            }
        }
        public string DisplayCnStr
        {
            get
            {
                return    Explain + "_" + ProName  ;
            }
        }
        public override string ToString()
        {
            return "ConfigIO。" + ProType + "," + Explain + "," + ProName + ",属性值:" + IOIndex   ;
        }
       
    }
}