using System;
using System.ComponentModel;

namespace WCS.Entity.Protocol.Truss
{
    /// <summary>
    ///  桁架状态
    /// </summary>
    public enum TrussStatus : short
    {
        /// <summary>
        ///  空闲
        /// </summary>
        [Description("空闲")]
        Idle = 1,

        /// <summary>
        ///  执行中
        /// </summary>
        [Description("执行中")]
        Execute = 2,

        /// <summary>
        ///  报警
        /// </summary>
        [Description("报警")]
        Alarm = 3,

        /// <summary>
        ///  维护
        /// </summary>
        [Description("维护")]
        KeepInRepair = 4,

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

    /// <summary>
    /// 桁架报警项
    /// </summary>
    [Flags]
    public enum TrussAlarm : ulong
    {  /// <summary>
       ///  无
       /// </summary>
        [Description("无")]
        无 = 0,

        /// <summary>
        ///  急停
        /// </summary>
        [Description("急停")]
        急停 = 1L << 0,

        /// <summary>
        ///  伺服故障
        /// </summary>
        [Description("伺服故障")]
        伺服故障 = 1L << 1,

        /// <summary>
        ///  防撞光电被触发
        /// </summary>
        [Description("防撞光电被触发")]
        防撞光电被触发 = 1L << 2,

        /// <summary>
        ///  光电检测不到成品
        /// </summary>
        [Description("光电检测不到成品")]
        光电检测不到成品 = 1L << 3,

        /// <summary>
        ///  水平气缸打开到位磁开异常
        /// </summary>
        [Description("水平气缸打开到位磁开异常")]
        水平气缸打开到位磁开异常 = 1L << 4,

        /// <summary>
        ///  水平气缸收回到位磁开异常
        /// </summary>
        [Description("水平气缸收回到位磁开异常")]
        水平气缸收回到位磁开异常 = 1L << 5,

        /// <summary>
        /// 油泵无油报警
        /// </summary>
        [Description("油泵无油报警")]
        油泵无油报警 = 1L << 6,

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

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

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

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

        /// <summary>
        ///  目标地址1不在范围
        /// </summary>
        [Description("目标地址1不在范围")]
        目标地址1不在范围 = 1L << 11,

        /// <summary>
        ///  目标地址2不在范围
        /// </summary>
        [Description("目标地址2不在范围")]
        目标地址2不在范围 = 1L << 12,

        /// <summary>
        ///  目标地址1等于目标地址2
        /// </summary>
        [Description("目标地址1等于目标地址2")]
        目标地址1等于目标地址2 = 1L << 13,

        /// <summary>
        ///  任务1放置位首位错误
        /// </summary>
        [Description("任务1放置位首位错误")]
        任务1放置位首位错误 = 1L << 14,

        /// <summary>
        ///  任务2放置位首位错误
        /// </summary>
        [Description("任务2放置位首位错误")]
        任务2放置位首位错误 = 1L << 15,

        /// <summary>
        ///  任务1连续任务错误
        /// </summary>
        [Description("任务1连续任务错误")]
        任务1连续任务错误 = 1L << 16,

        /// <summary>
        ///  任务2连续任务错误
        /// </summary>
        [Description("任务2连续任务错误")]
        任务2连续任务错误 = 1L << 17,

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

        /// <summary>
        ///  抓取和放置参数不符合运行条件
        /// </summary>
        [Description("抓取和放置参数不符合运行条件")]
        抓取和放置参数不符合运行条件 = 1L << 19,

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

        /// <summary>
        ///  任务凭证号不一致
        /// </summary>
        [Description("任务凭证号不一致")]
        任务凭证号不一致 = 1L << 21,

        /// <summary>
        ///  站台凭证号不一致
        /// </summary>
        [Description("站台凭证号不一致")]
        站台凭证号不一致 = 1L << 22,

        /// <summary>
        ///  WCS发送信息无托盘位置信息
        /// </summary>
        [Description("WCS发送信息无托盘位置信息")]
        WCS发送信息无托盘位置信息 = 1L << 23,

        /// <summary>
        ///  WCS发送信息无运线位置信息
        /// </summary>
        [Description("WCS发送信息无运线位置信息")]
        WCS发送信息无运线位置信息 = 1L << 24,

        /// <summary>
        ///  WCS发送信息无放置位置信息
        /// </summary>
        [Description("WCS发送信息无放置位置信息")]
        WCS发送信息无放置位置信息 = 1L << 25,

        /// <summary>
        ///  WCS回复任务超时
        /// </summary>
        [Description("WCS回复任务超时")]
        WCS回复任务超时 = 1L << 26,

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

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

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

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

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

        /// <summary>
        ///  备用16
        /// </summary>
        [Description("备用16")]
        备用16 = 1L << 32,

        /// <summary>
        ///  备用17
        /// </summary>
        [Description("备用17")]
        备用17 = 1L << 33,

        /// <summary>
        ///  备用18
        /// </summary>
        [Description("备用18")]
        备用18 = 1L << 34,

        /// <summary>
        ///  备用19
        /// </summary>
        [Description("备用19")]
        备用19 = 1L << 35,

        /// <summary>
        ///  备用20
        /// </summary>
        [Description("备用20")]
        备用20 = 1L << 36,

        /// <summary>
        ///  备用21
        /// </summary>
        [Description("备用21")]
        备用21 = 1L << 37,

        /// <summary>
        ///  备用22
        /// </summary>
        [Description("备用22")]
        备用22 = 1L << 38,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用23 = 1L << 39,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用24 = 1L << 40,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用25 = 1L << 41,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用26 = 1L << 42,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用27 = 1L << 43,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用28 = 1L << 44,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用29 = 1L << 45,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用30 = 1L << 46,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用31 = 1L << 47,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用32 = 1L << 48,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用33 = 1L << 49,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用34 = 1L << 50,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用35 = 1L << 51,

        /// <summary>
        ///  载货台电源空开
        /// </summary>
        [Description("备用")]
        备用36 = 1L << 52,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用37 = 1L << 53,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用38 = 1L << 54,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用39 = 1L << 55,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用40 = 1L << 56,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用41 = 1L << 57,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用42 = 1L << 58,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用43 = 1L << 59,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用44 = 1L << 60,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用45 = 1L << 61,

        /// <summary>
        ///  备用
        /// </summary>
        [Description("备用")]
        备用46 = 1L << 62,
    }

    /// <summary>
    ///  桁架码垛位指令类型
    /// </summary>
    [Flags]
    public enum TrussCmdType : ushort
    {
        /// <summary>
        /// 码垛结束
        /// </summary>
        [Description("码垛结束")]
        End = 1 << 0,

        /// <summary>
        /// 强制码垛结束
        /// </summary>
        [Description("强制码垛结束")]
        End1 = 1 << 1,

        /// <summary>
        /// 二次码垛
        /// </summary>
        [Description("二次码垛")]
        Two = 1 << 2,

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

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

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

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

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

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

        /// <summary>
        /// 备用
        /// </summary>
        [Description("备用")]
        RES = 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,
    }
}
