using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MesWork
{
    public class ToolInfo
    {
        public string Name { get; set; }
        public string TimeRated { get; set; }
        public string TimeUsed { get; set; }
    }

    public class AxisInfo
    {
        public string AxisName { get; set; }
        public string AxisValue { get; set; }
    }

    public class ParameterInfo
    {
        public string ParameterName { get; set; }
        public string ParameterValue { get; set; }
    }

    public class AlarmInfo
    {
        public string AlarmCode { get; set; } = "83721";
        public string Alarm { get; set; } = "该吃饭了！";
        public string AlarmTime { get; set; } = DateTime.Now.ToString();
    }
    public class TipInfo
    {
        public string TipCode { get; set; } = "1123";
        public string Tip { get; set; } = "该睡觉了！";
        public string TipTime { get; set; } = DateTime.Now.ToString();
    }

    public class DeviceInfo
    {
        public string order { get; set; } = "";
        public string Name { get; set; } = "";
        public string Id { get; set; } = "";
        public string Status { get; set; } = "";
        public string Program { get; set; } = "";
        public string Feed { get; set; } = "";
        public string Speed { get; set; } = "";
        public string Rapid { get; set; } = "";
        public string ProgramStatus { get; set; } = "";
        /// <summary>
        /// 电流
        /// </summary>
        public string Current { get; set; } = "";
        /// <summary>
        /// 电压
        /// </summary>
        public string Voltage { get; set; } = "";

        public ToolInfo Tool { get; set; } = new ToolInfo();
        public List<AxisInfo> Axis { get; set; } = new List<AxisInfo>();

        public List<ParameterInfo> OtherParameter { get; set; } = new List<ParameterInfo>();
        public List<AlarmInfo> Alarm { get; set; } = new List<AlarmInfo>();
        public List<TipInfo> Tip { get; set; } = new List<TipInfo>();

    }
   
    public class JointConfig 
    {
        public string DeviceCode { get; set; }
        public string JointName { get; set; }
        public string ModelCode { get; set; }
        public string JointType { get; set; }
        public string Axis { get; set; }
        public string Flip { get; set; }
        public string Value { get; set; }
        public string ValueFactor { get; set; }
        public string Delta { get; set; }
    }

    public class MachineToolConfig
    {
        public string Enable { get; set; }
        public string Type { get; set; }
        public string ConnectStr { get; set; }
        public string Id { get; set; }
        public string Name { get; set; }
        public string DataTimeInterval { get; set; }
        public string AxesTimeInterval { get; set; }
        public List<JointConfig> Joints { get; set; }
        public string TagID_Clamp { get; set; }

    }



    public class ScadaConfig
    {
        public List<MachineToolConfig> MachineTool { get; set; }
    }
}
