using System;
using System.ComponentModel;

namespace WCS.Entity.Protocol.Station
{
    /// <summary>
    /// 输送机模式
    /// </summary>
    public enum StationMode : short
    {
        /// <summary>
        /// 自动
        /// </summary>
        [Description("自动")]
        Automatic = 1,

        /// <summary>
        /// 手动
        /// </summary>
        [Description("手动")]
        Manual = 2,

        /// <summary>
        /// 维修
        /// </summary>
        [Description("维修")]
        Repair = 3,
    }

    ///// <summary>
    /////  指令类型
    ///// </summary>
    //public enum CmdType : short
    //{
    //    #region MyRegion

    //    /// <summary>
    //    ///  用于RGV使用，表示当前任务是WCS执行
    //    /// </summary>
    //    Task = 98,

    //    /// <summary>
    //    ///  用于RGV使用，表示当前任务是码垛信息执行
    //    /// </summary>
    //    palletizing = 99

    //    #endregion MyRegion
    //}

    /// <summary>
    /// 输送机警报
    /// </summary>
    [Flags]
    public enum StationAlarm : ushort
    {
        总故障 = 1 << 0,
        急停故障 = 1 << 1,
        超时故障 = 1 << 2,
        驱动故障 = 1 << 3,
        空气开关故障 = 1 << 4,
        传感器异常故障 = 1 << 5,
        超边故障 = 1 << 6,
        无Ready信号_请检查柜内空开 = 1 << 7,
        超时故障2 = 1 << 8,
        驱动故障2 = 1 << 9,
        空气开关故障2 = 1 << 10,
        前极限故障 = 1 << 11,
        后极限故障 = 1 << 12,
        无Ready信号_请检查柜内空开2 = 1 << 13,
        上极限故障 = 1 << 14,
        下极限故障 = 1 << 15

    }

    /// <summary>
    /// 输送机状态
    /// </summary>
    [Flags]
    public enum StationStatus : ushort
    {
        /// <summary>
        /// 自动
        /// </summary>
        [Description("自动")]
        自动 = 1 << 0,

        /// <summary>
        /// 选中状态位
        /// </summary>
        [Description("选中状态位")]
        选中 = 1 << 1,

        /// <summary>
        /// 任务有货
        /// </summary>
        [Description("任务有货")]
        任务 = 1 << 2,

        /// <summary>
        /// 光电有货
        /// </summary>
        [Description("光电有货")]
        光电 = 1 << 3,

        /// <summary>
        /// 运行状态位
        /// </summary>
        [Description("运行状态位")]
        运行 = 1 << 4,

        /// <summary>
        /// 正转
        /// </summary>
        [Description("正转")]
        正转 = 1 << 5,

        /// <summary>
        /// 反转
        /// </summary>
        [Description("反转")]
        反转 = 1 << 6,

        /// <summary>
        /// 上升/右转/伸出（顶升移栽升降、拆码盘机升降、提升机升降、拆码盘机拨叉伸出）
        /// </summary>
        [Description("上升/右转/伸出（顶升移栽升降、拆码盘机升降、提升机升降、拆码盘机拨叉伸出）")]
        上升_右转_伸出 = 1 << 7,

        /// <summary>
        /// 下降/左转/缩回（顶升移栽升降、拆码盘机升降、提升机升降、拆码盘机拨叉缩回）
        /// </summary>
        [Description("下降/左转/缩回（顶升移栽升降、拆码盘机升降、提升机升降、拆码盘机拨叉缩回）")]
        下降_左转_缩回 = 1 << 8,

        /// <summary>
        /// 高位（顶升移栽升降、拆码盘机升降、提升机升降）
        /// </summary>
        [Description("高位（顶升移栽升降、拆码盘机升降、提升机升降）")]
        高位 = 1 << 9,

        /// <summary>
        /// 中位（拆码盘机升降）
        /// </summary>
        [Description("中位（拆码盘机升降）")]
        中位 = 1 << 10,

        /// <summary>
        /// 低位（顶升移栽升降、拆码盘机升降、提升机升降）
        /// </summary>
        [Description("低位（顶升移栽升降、拆码盘机升降、提升机升降）")]
        低位 = 1 << 11,

        /// <summary>
        /// 前位（拆码盘机拨叉伸出）
        /// </summary>
        [Description("前位（拆码盘机拨叉伸出）")]
        前位 = 1 << 12,

        /// <summary>
        /// 后位（拆码盘机拨叉缩回）
        /// </summary>
        [Description("后位（拆码盘机拨叉缩回）")]
        后位 = 1 << 13,

        /// <summary>
        /// 手动入库
        /// </summary>
        [Description("手动入库")]
        手动入库 = 1 << 14,

        /// <summary>
        /// 上位机未分配任务
        /// </summary>
        [Description("上位机未分配任务")]
        无任务 = 1 << 15,
    }

    /// <summary>
    /// 输送机状态
    /// </summary>
    [Flags]
    public enum StationStatus1 : ushort
    {
        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        正转 = 1 << 0,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        反转 = 1 << 1,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        右转 = 1 << 2,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        左转 = 1 << 3,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        上升 = 1 << 4,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        下降 = 1 << 5,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        高位 = 1 << 6,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        低位 = 1 << 7,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        左位 = 1 << 8,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        中位 = 1 << 9,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        右位 = 1 << 10,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        前位 = 1 << 11,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        后位 = 1 << 12,

        
    }

    /// <summary>
    /// 外形故障
    /// </summary>
    [Flags]
    public enum StationShapeAlarm : ushort
    {
        /// <summary>
        /// 外形/条码等货物故障
        /// </summary>
        [Description("外形/条码等货物故障")]
        GoodsErr = 1 << 0,

        /// <summary>
        /// 前超长故障
        /// </summary>
        [Description("前超长故障")]
        FOutside = 1 << 1,

        /// <summary>
        /// 后超长故障
        /// </summary>
        [Description("后超长故障")]
        BOutside = 1 << 2,

        /// <summary>
        /// 左超宽故障
        /// </summary>
        [Description("左超宽故障")]
        LOutside = 1 << 3,

        /// <summary>
        /// 右超宽故障
        /// </summary>
        [Description("右超宽故障")]
        ROutside = 1 << 4,

        /// <summary>
        /// 超高故障
        /// </summary>
        [Description("超高故障")]
        HOutside = 1 << 5,

        /// <summary>
        /// 条码读取失败
        /// </summary>
        [Description("条码读取失败")]
        BcrNoread = 1 << 6,

        /// <summary>
        /// 超重
        /// </summary>
        [Description("超重")]
        Overload = 1 << 7,

        /// <summary>
        /// 货物严重外检故障
        /// </summary>
        [Description("货物严重外检故障")]
        GoodsErr1 = 1 << 8,

        /// <summary>
        /// 二维条码未读出
        /// </summary>
        [Description("二维条码未读出")]
        BcrNoread1 = 1 << 9,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res1 = 1 << 10,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res2 = 1 << 11,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res3 = 1 << 12,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res4 = 1 << 13,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res5 = 1 << 14,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res6 = 1 << 15,
    }

    /// <summary>
    ///  站台指令
    /// </summary>
    [Flags]
    public enum StationCmd : ushort
    {
        /// <summary>
        /// AGV放货通知
        /// </summary>
        [Description("备用")]
        Res = 1 << 0,

        /// <summary>
        /// AGV取货通知
        /// </summary>
        [Description("备用")]
        Res1 = 1 << 1,

        /// <summary>
        ///  AGV放货结束
        /// </summary>
        [Description("备用")]
        Res2 = 1 << 2,

        /// <summary>
        ///  AGV取货结束
        /// </summary>
        [Description("备用")]
        Res3 = 1 << 3,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res4 = 1 << 4,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res5 = 1 << 5,

        /// <summary>
        ///  翻转信号
        /// </summary>
        [Description("翻转信号")]
        Res6 = 1 << 6,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res7 = 1 << 7,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res8 = 1 << 8,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res9 = 1 << 9,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res10 = 1 << 10,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res11 = 1 << 11,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res12 = 1 << 12,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res13 = 1 << 13,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res14 = 1 << 14,

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        Res15 = 1 << 15,
    }
}
