#region << 版 本 注 释 >>
/*----------------------------------------------------------------
 * 命名空间:WIDESEAWCS_Tasks.ConveyorLineJob
 * 创建者:胡童庆
 * 创建时间:2024/8/2 16:13:36
 * 版本:V1.0.0
 * 描述:
 *
 * ----------------------------------------------------------------
 * 修改人:
 * 修改时间:
 * 版本:V1.0.1
 * 修改说明:
 * 
 *----------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common.Attributes;
using WIDESEAWCS_QuartzJob.DeviceBase;
namespace WIDESEAWCS_Tasks.ConveyorLineJob
{
    public class ConveyorLineTaskCommand : DeviceCommand
    {
        public ushort InteractiveSignal { get; set; }
        [DataLength(25)]
        public string Barcode { get; set; }
        public int TargetAddress { get; set; }
        public int TaskNum { get; set; }
    }
    public class R_ConveyorLineInfo : DeviceCommand
    {
        /// 
        /// 站台编号
        /// 
        public short ConveyorNo { get; set; }
        /// 
        /// 状态
        /// 
        public byte Status { get; set; }
        /// 
        /// 预留
        /// 
        public byte Undefined { get; set; }
        /// 
        /// 任务号
        /// 
        public int TaskNum { get; set; }
        /// 
        /// 起始地址
        /// 
        public short StartPos { get; set; }
        /// 
        /// 目标地址
        /// 
        public short EndPos { get; set; }
        /// 
        /// 重量
        /// 
        public short GoodsWeight { get; set; }
        /// 
        /// 货物类型
        /// 
        public short GoodsType { get; set; }
        /// 
        /// 0静止1前进2后退3上升/顺时针旋转4下降/逆时针旋转
        /// 
        public short RunStatus { get; set; }
        private string _barcode;
        /// 
        /// 条码
        /// 
        [DataLength(20)]
        public string Barcode
        {
            get { return _barcode; }
            set { _barcode = value.Replace("\0", "").Replace("\\0", ""); }
        }
        /// 
        /// 预留
        /// 
        public short Spare1 { get; set; }
        /// 
        /// 预留
        /// 
        public short Spare2 { get; set; }
        /// 
        /// 交互信号
        /// 
        public byte Signal { get; set; }
        /// 
        /// 预留
        /// 
        public byte Undefined2 { get; set; }
    }
    public class R_ConveyorLineCPInfo : DeviceCommand
    {
        /// 
        /// 到位指令
        /// 
        public short ConveyArrivaled { get; set; }
        /// 
        /// 起始地址
        /// 
        public short StartPos { get; set; }
        /// 
        /// 终点地址
        /// 
        public short EndPos { get; set; }
        /// 
        /// 托盘号
        /// 
        /// 
        
        [DataLength(20)]
        public string Barcode { get; set; }
        /// 
        /// 任务号
        /// 
        [DataLength(20)]
        public string TaskNum { get; set; }
        /// 
        /// 类型
        /// 
        public short WorkType { get; set; }
        /// 
        /// 模式
        /// 
        public short WorkMode { get; set; }
        /// 
        /// 校验位
        /// 
        public short CheckPos { get; set; }
    }
    public class R_ConveyorLineGMInfo : DeviceCommand
    {
        /// 
        /// 箱号
        /// 
        /// 
        [DataLength(120)]
        public string Boxcode { get; set; }
    }
    public class R_ConveyorLineFLInfo : DeviceCommand
    {
        /// 
        /// 托盘号
        /// 
        /// 
        [DataLength(20)]
        public string Barcode { get; set; }
        /// 
        /// 任务号
        /// 
        [DataLength(20)]
        public string TaskNum { get; set; }
    }
    public class R_ConveyorLineStatus
    {
        /// 
        /// 握手信号
        /// 
        [BoolIndex(0)]
        public bool HandShake { get; set; }
        /// 
        /// 1联机 0脱机
        /// 
        [BoolIndex(1)]
        public bool Online { get; set; }
        /// 
        /// 1空闲 0繁忙
        /// 
        [BoolIndex(2)]
        public bool Free { get; set; }
        /// 
        /// 1有货 0无货
        /// 
        [BoolIndex(3)]
        public bool Goods { get; set; }
        /// 
        /// 1故障 0正常
        /// 
        [BoolIndex(4)]
        public bool Alarm { get; set; }
        /// 
        /// 1请求补盘 0无
        /// 
        [BoolIndex(5)]
        public bool RequestPakcPallet { get; set; }
        /// 
        /// 1请求拆盘 0无
        /// 
        [BoolIndex(6)]
        public bool RequestUnpackPellet { get; set; }
    }
    public class ConveyorLineSignal
    {
        /// 
        /// 请求信号
        /// 
        [BoolIndex(0)]
        public bool STB { get; set; }
        /// 
        /// 响应信号
        /// 
        [BoolIndex(1)]
        public bool ACK { get; set; }
    }
    public class W_ConveyorLineInfo : DeviceCommand
    {
        /// 
        /// 站台编号
        /// 
        public short ConveyorNo { get; set; }
        public byte Operate { get; set; }
        public byte Undefined { get; set; }
        /// 
        /// 任务号
        /// 
        public int TaskNum { get; set; }
        /// 
        /// 起始地址
        /// 
        public short StartPos { get; set; }
        /// 
        /// 目标地址
        /// 
        public short EndPos { get; set; }
        /// 
        /// 货物类型
        /// 
        public short GoodsType { get; set; }
        /// 
        /// 预留
        /// 
        public short Spare1 { get; set; }
        /// 
        /// 预留
        /// 
        public short Spare2 { get; set; }
        /// 
        /// 交互信号
        /// 
        public byte Signal { get; set; }
        /// 
        /// 预留
        /// 
        public byte Undefined2 { get; set; }
    }
    public class W_ConveyorLineOperate
    {
        /// 
        /// 握手信号
        /// 
        [BoolIndex(0)]
        public bool HandShake { get; set; }
        /// 
        /// 复位报警
        /// 
        [BoolIndex(1)]
        public bool ClearAlarm { get; set; }
        /// 
        /// 退回
        /// 
        [BoolIndex(2)]
        public bool Return { get; set; }
    }
}