using System;
using System.ComponentModel;

namespace WCS.Entity.Protocol.RGV
{
    /// <summary>
    ///  RGV指令类型
    /// </summary>
    public enum RGVCmdType : short
    {
        /// <summary>
        /// 取货
        /// </summary>
        [Description("取货")]
        PickGoods = 1,

        /// <summary>
        /// 放货
        /// </summary>
        [Description("放货")]
        PutGoods = 2,

        /// <summary>
        /// 移动
        /// </summary>
        [Description("移动")]
        Move = 3,

        /// <summary>
        ///  变更放货点
        /// </summary>
        [Description("变更放货点")]
        ChangePutGoods = 4,

        /// <summary>
        ///  变更取货点
        /// </summary>
        [Description("变更取货点")]
        ChangePickGoods = 5,

        /// <summary>
        ///  取放货
        /// </summary>
        [Description("取放货")]
        PickPutGoods = 6
    }

    /// <summary>
    ///  货叉式RGV状态
    /// </summary>
    public enum RGVSystemStatus : short
    {
        /// <summary>
        /// 空闲
        /// </summary>
        [Description("空闲")]
        空闲 = 0,

        /// <summary>
        /// 获取取货位
        /// </summary>
        [Description("获取取货位")]
        获取取货位 = 1,

        /// <summary>
        /// 取货移动
        /// </summary>
        [Description("取货移动")]
        取货移动 = 2,

        /// <summary>
        /// 到达取货位
        /// </summary>
        [Description("到达取货位")]
        到达取货位 = 4,

        /// <summary>
        /// 取货伸叉
        /// </summary>
        [Description("取货伸叉")]
        取货伸叉 = 5,

        /// <summary>
        /// 取货抬叉
        /// </summary>
        [Description("取货抬叉")]
        取货抬叉 = 6,

        /// <summary>
        /// 取货收叉
        /// </summary>
        [Description("取货收叉")]
        取货收叉 = 7,

        /// <summary>
        /// 取货完成
        /// </summary>
        [Description("取货完成")]
        取货完成 = 8,

        /// <summary>
        /// 获取放货位
        /// </summary>
        [Description("获取放货位")]
        获取放货位 = 9,

        /// <summary>
        /// 放货移动
        /// </summary>
        [Description("放货移动")]
        放货移动 = 10,

        /// <summary>
        /// 放货收叉
        /// </summary>
        [Description("放货收叉")]
        放货伸叉 = 11,

        /// <summary>
        /// 放货下降
        /// </summary>
        [Description("放货下降")]
        放货下降 = 12,

        /// <summary>
        /// 放货收叉
        /// </summary>
        [Description("取货抬叉")]
        放货收叉 = 13,

        /// <summary>
        /// 放货完成
        /// </summary>
        [Description("放货完成")]
        放货完成 = 14,
    }

    /// <summary>
    ///  RGV模式
    /// </summary>
    public enum RGVWorkMode : short
    {
        /// <summary>
        ///  自动
        /// </summary>
        [Description("自动")]
        Automatic = 1,

        /// <summary>
        ///  半自动
        /// </summary>
        [Description("半自动")]
        SemiAutomatic = 2,

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

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

        /// <summary>
        ///  维修
        /// </summary>
        [Description("维修")]
        KeepInRepair = 99
    }

    /// <summary>
    ///  RGV状态
    /// </summary>
    [Flags]
    public enum RGVStatus : ushort
    {
        /// <summary>
        ///  光电
        /// </summary>
        [Description("光电")]
        PH_Status = 1 << 0,

        /// <summary>
        ///  RGV到站
        /// </summary>
        [Description("RGV到站")]
        Arrival = 1 << 1,

        /// <summary>
        ///  任务完成
        /// </summary>
        [Description("任务完成")]
        Taskfinishi = 1 << 2,

        /// <summary>
        ///  载货
        /// </summary>
        [Description("载货")]
        Cargo = 1 << 3,

        /// <summary>
        ///  RGV输送线正转
        /// </summary>
        [Description("RGV输送线正转")]
        Forward = 1 << 4,

        /// <summary>
        ///  RGV输送线反转
        /// </summary>
        [Description("RGV输送线反转")]
        Reverse = 1 << 5,

        /// <summary>
        ///  在非安全区
        /// </summary>
        [Description("在非安全区")]
        RES1 = 1 << 6,

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

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

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

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

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

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

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

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

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

    /// <summary>
    /// RGV报警项
    /// </summary>
    [Description("RGV报警项")]
    [Flags]
    public enum RgvAlarm : 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>
        ///  前安全门打开
        /// </summary>
        [Description("前安全门打开")]
        前安全门打开 = 1L << 7,

        /// <summary>
        ///  后安全门打开
        /// </summary>
        [Description("后安全门打开")]
        后安全门打开 = 1L << 8,

        /// <summary>
        ///  行走限位触发
        /// </summary>
        [Description("行走限位触发")]
        行走限位触发 = 1L << 9,

        /// <summary>
        ///  行走运动超行程
        /// </summary>
        [Description("行走运动超行程")]
        行走运动超行程 = 1L << 10,

        /// <summary>
        ///  行走变频器故障
        /// </summary>
        [Description("行走变频器故障")]
        行走变频器故障 = 1L << 11,

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

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

        /// <summary>
        ///  行走测距信号丢失故障
        /// </summary>
        [Description("行走测距信号丢失故障")]
        行走测距信号丢失故障 = 1L << 14,

        /// <summary>
        ///  行走定位失败
        /// </summary>
        [Description("行走定位失败")]
        行走定位失败 = 1L << 15,

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

        /// <summary>
        ///  提升运行超时
        /// </summary>
        [Description("提升运行超时")]
        提升运行超时 = 1L << 17,

        /// <summary>
        ///  货叉运行超时
        /// </summary>
        [Description("货叉运行超时")]
        货叉运行超时 = 1L << 18,

        /// <summary>
        ///  货叉伸叉超行程
        /// </summary>
        [Description("货叉伸叉超行程")]
        货叉伸叉超行程 = 1L << 19,

        /// <summary>
        ///  货叉变频器故障
        /// </summary>
        [Description("货叉变频器故障")]
        货叉变频器故障 = 1L << 20,

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

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

        /// <summary>
        ///  货叉位置错误
        /// </summary>
        [Description("货叉位置错误")]
        货叉位置错误 = 1L << 23,

        /// <summary>
        ///  货叉编码器故障
        /// </summary>
        [Description("货叉编码器故障")]
        货叉编码器故障 = 1L << 24,

        /// <summary>
        ///  货叉编码器故障中间位
        /// </summary>
        [Description("货叉编码器故障中间位")]
        货叉编码器故障中间位 = 1L << 25,

        /// <summary>
        ///  货叉中位光电异常
        /// </summary>
        [Description("货叉中位光电异常")]
        货叉中位光电异常 = 1L << 26,

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

        /// <summary>
        ///  放货点有货
        /// </summary>
        [Description("放货点有货")]
        放货点有货 = 1L << 28,

        /// <summary>
        ///  货叉取货点无货
        /// </summary>
        [Description("货叉取货点无货")]
        货叉取货点无货 = 1L << 29,

        /// <summary>
        ///  货叉无任务有货异常
        /// </summary>
        [Description("货叉无任务有货异常")]
        货叉无任务有货异常 = 1L << 30,

        /// <summary>
        ///  回中定位失败
        /// </summary>
        [Description("回中定位失败")]
        回中定位失败 = 1L << 31,

        /// <summary>
        ///  货物左前超宽
        /// </summary>
        [Description("货物左前超宽")]
        货物左前超宽 = 1L << 32,

        /// <summary>
        ///  货物左后超宽
        /// </summary>
        [Description("货物左后超宽")]
        货物左后超宽 = 1L << 33,

        /// <summary>
        ///  货物右前超宽
        /// </summary>
        [Description("货物右前超宽")]
        货物右前超宽 = 1L << 34,

        /// <summary>
        ///  货物右后超宽
        /// </summary>
        [Description("货物右后超宽")]
        货物右后超宽 = 1L << 35,

        /// <summary>
        ///  货物左前坍塌
        /// </summary>
        [Description("货物左前坍塌")]
        货物左前坍塌 = 1L << 36,

        /// <summary>
        ///  货物左后坍塌
        /// </summary>
        [Description("货物左后坍塌")]
        货物左后坍塌 = 1L << 37,

        /// <summary>
        ///  货物右前坍塌
        /// </summary>
        [Description("货物右前坍塌")]
        货物右前坍塌 = 1L << 38,

        /// <summary>
        ///  货物右后坍塌
        /// </summary>
        [Description("货物右后坍塌")]
        货物右后坍塌 = 1L << 39,

        /// <summary>
        ///  货物左超高
        /// </summary>
        [Description("货物左超高")]
        货物左超高 = 1L << 40,

        /// <summary>
        ///  货物右超高
        /// </summary>
        [Description("货物右超高")]
        货物右超高 = 1L << 41,

        /// <summary>
        ///  货物条码读取异常
        /// </summary>
        [Description("货物条码读取异常")]
        货物条码读取异常 = 1L << 42,

        /// <summary>
        ///  目标站台已禁用
        /// </summary>
        [Description("目标站台已禁用")]
        目标站台已禁用 = 1L << 43,

        /// <summary>
        ///  取货站台号异常
        /// </summary>
        [Description("取货站台号异常")]
        取货站台号异常 = 1L << 44,

        /// <summary>
        ///  放货站台号异常
        /// </summary>
        [Description("放货站台号异常")]
        放货站台号异常 = 1L << 45,

        /// <summary>
        ///  查询站台号异常
        /// </summary>
        [Description("查询站台号异常")]
        查询站台号异常 = 1L << 46,

        /// <summary>
        ///  动作超时
        /// </summary>
        [Description("动作超时")]
        动作超时 = 1L << 47,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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