namespace BPA.SingleDevice.Json
{
    /// <summary>设备连接设置。</summary>
    public class ConnectConfig
    {
        public List<BatcherConfig> BatcherConfigs { get; set; } = new();
        public List<ConveyerConfig> ConveyerConfigs { get; set; } = new();

        /// <summary>移动速度</summary>
        public uint MoveSpeed { get; set; } = 1000;

        /// <summary>移动长度</summary>
        public uint MoveLength { get; set; } = 2000;

        /// <summary>
        /// 传送带移动延迟（配料完成后延迟一定时间再移动）
        /// </summary>
        public uint MoveDelay { get; set; } = 3;
    }

    /// <summary>配料机设置</summary>
    public class BatcherConfig
    {
        /// <summary>对应工位ID</summary>
        public int StationID { get; set; }

        /// <summary>IP地址</summary>
        public string IP { get; set; }

        /// <summary>端口号</summary>
        public int Port { get; set; }

        public bool IsConnect { get; set; }
    }

    /// <summary>传送带设置</summary>
    public class ConveyerConfig
    {
        /// <summary>对应ID</summary>
        public int ID { get; set; }

        /// <summary>IP地址</summary>
        public string IP { get; set; }

        /// <summary>端口号</summary>
        public int Port { get; set; }

        public bool IsConnect { get; set; }
    }
}