using System;
using System.ComponentModel;

namespace WCS.Entity.Protocol.Protocol.Robot
{
    /// <summary>
    ///  机械手工位状态
    /// </summary>
    [Flags]
    public enum RobotState : ushort
    {
        /// <summary>
        ///  完成取货信号
        /// </summary>
        [Description("完成取货信号")]
        GetFinish = 1 << 0,

        /// <summary>
        ///  完成放货信号
        /// </summary>
        [Description("完成放货信号")]
        PutFinish = 1 << 1,

        /// <summary>
        ///  设备故障状态
        /// </summary>
        [Description("设备故障状态")]
        Alarm = 1 << 2,

        /// <summary>
        ///  当前任务完成
        /// </summary>
        [Description("当前任务完成")]
        TaskFinish = 1 << 3,

        /// <summary>
        ///  设备上有货
        /// </summary>
        [Description("设备上有货")]
        Loaded = 1 << 4,

        /// <summary>
        ///  机器人在原位
        /// </summary>
        [Description("机器人在原位")]
        ForkCenter = 1 << 5,

        /// <summary>
        ///  反馈WCS能否发任务，1:可以发任务 0:不能发任务
        /// </summary>
        [Description("反馈WCS能否发任务，1:可以发任务 0:不能发任务")]
        IssueTask = 1 << 6,

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

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

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

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

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

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

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

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

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

    /// <summary>
    ///  机械臂模式
    /// </summary>
    public enum RobotMode : short
    {
        /// <summary>
        ///  自动
        /// </summary>
        [Description("自动")]
        Automatic = 1,

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

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

    /// <summary>
    ///  机械臂运行状态
    /// </summary>
    public enum RobotRunStatus : short
    {
        /// <summary>
        ///  空闲
        /// </summary>
        [Description("空闲")]
        Idle = 1,

        /// <summary>
        ///  入库抓取中
        /// </summary>
        [Description("入库抓取中")]
        InboundCrawling = 2,

        /// <summary>
        ///  入库放置中
        /// </summary>
        [Description("入库放置中")]
        InStorage = 3,

        /// <summary>
        ///  出库抓取中
        /// </summary>
        [Description("出库抓取中")]
        OutBoundCrawling = 4,

        /// <summary>
        ///  出库放置中
        /// </summary>
        [Description("出库放置中")]
        OutStorage = 5,

        /// <summary>
        ///  维护
        /// </summary>
        [Description("维护")]
        Maintain = 99
    }

    /// <summary>
    ///  机械臂报警
    /// </summary>
    [Flags]
    public enum RobotAlarm : 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>
        /// 夹具1/2压货报警
        /// </summary>
        [Description("夹具1/2压货报警")]
        夹具12压货报警 = 1L << 6,

        /// <summary>
        ///  移库任务放置数据出错
        /// </summary>
        [Description("移库任务放置数据出错")]
        移库任务放置数据出错 = 1L << 7,

        /// <summary>
        ///  夹具1/2掉料报警
        /// </summary>
        [Description("夹具1/2掉料报警")]
        夹具12掉料报警 = 1L << 8,

        /// <summary>
        ///  机器人充磁失败报警
        /// </summary>
        [Description("机器人充磁失败报警")]
        机器人充磁失败报警 = 1L << 9,

        /// <summary>
        ///  光栅报警
        /// </summary>
        [Description("光栅报警")]
        光栅报警 = 1L << 10,

        /// <summary>
        ///  光栅误触报警
        /// </summary>
        [Description("光栅误触报警")]
        光栅误触报警 = 1L << 11,

        /// <summary>
        ///  安全门急停报警（取反）
        /// </summary>
        [Description("安全门急停报警取反")]
        安全门急停报警 = 1L << 12,

        /// <summary>
        ///  检查机械臂A4轴报错
        /// </summary>
        [Description("检查机械臂A4轴报错")]
        检查机械臂A4轴报错 = 1L << 13,

        /// <summary>
        ///  初始化后检测出夹具接近开关有物料
        /// </summary>
        [Description("初始化后检测出夹具接近开关有物料")]
        初始化后检测出夹具接近开关有物料 = 1L << 14,

        /// <summary>
        ///  安全门打开（取反）
        /// </summary>
        [Description("安全门打开（取反）")]
        安全门打开 = 1L << 15,

        /// <summary>
        ///  夹取物料5秒后光电未检测到
        /// </summary>
        [Description("夹取物料5秒后光电未检测到")]
        夹取物料5秒后光电未检测到 = 1L << 16,

        /// <summary>
        ///  A4轴报错
        /// </summary>
        [Description("A4轴报错")]
        A4轴报错 = 1L << 17,

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

        /// <summary>
        ///  提升变频器报警
        /// </summary>
        [Description("提升变频器报警")]
        备用3 = 1L << 19,

        /// <summary>
        ///  货叉变频器报警
        /// </summary>
        [Description("货叉变频器报警")]
        备用4 = 1L << 20,

        /// <summary>
        ///  提升超速报警
        /// </summary>
        [Description("提升超速报警")]
        备用5 = 1L << 21,

        /// <summary>
        ///  风扇灯插座空开
        /// </summary>
        [Description("风扇灯插座空开")]
        备用6 = 1L << 22,

        /// <summary>
        ///  触摸屏光通讯激光测距空开
        /// </summary>
        [Description("触摸屏光通讯激光测距空开")]
        备用7 = 1L << 23,

        /// <summary>
        ///  行走马达保护器
        /// </summary>
        [Description("行走马达保护器")]
        备用8 = 1L << 24,

        /// <summary>
        ///  行走抱闸空开
        /// </summary>
        [Description("行走抱闸空开")]
        备用9 = 1L << 25,

        /// <summary>
        ///  起升马达保护器
        /// </summary>
        [Description("起升马达保护器")]
        备用10 = 1L << 26,

        /// <summary>
        ///  起升抱闸空开
        /// </summary>
        [Description("起升抱闸空开")]
        备用11 = 1L << 27,

        /// <summary>
        ///  货叉马达保护器
        /// </summary>
        [Description("货叉马达保护器")]
        备用12 = 1L << 28,

        /// <summary>
        ///  货叉抱闸空开
        /// </summary>
        [Description("货叉抱闸空开")]
        备用13 = 1L << 29,

        /// <summary>
        ///  安全门打开
        /// </summary>
        [Description("安全门打开")]
        备用14 = 1L << 30,

        /// <summary>
        ///  安全继电器报警
        /// </summary>
        [Description("安全继电器报警")]
        备用15 = 1L << 31,

        /// <summary>
        ///  当前货位已禁用
        /// </summary>
        [Description("当前货位已禁用")]
        备用16 = 1L << 32,

        /// <summary>
        ///  组态中断报警
        /// </summary>
        [Description("组态中断报警")]
        备用17 = 1L << 33,

        /// <summary>
        ///  货物左前超出
        /// </summary>
        [Description("货物左前超出")]
        备用18 = 1L << 34,

        /// <summary>
        ///  货物左后超出
        /// </summary>
        [Description("货物左后超出")]
        备用19 = 1L << 35,

        /// <summary>
        ///  货物右前超出
        /// </summary>
        [Description("货物右前超出")]
        备用20 = 1L << 36,

        /// <summary>
        ///  货物右后超出
        /// </summary>
        [Description("货物右后超出")]
        备用21 = 1L << 37,

        /// <summary>
        ///  相序保护
        /// </summary>
        [Description("相序保护")]
        备用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 RobotCmdType : ushort
    {
        /// <summary>
        /// 码垛结束
        /// </summary>
        [Description("码垛结束")]
        End = 1 >> 0,

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

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