using System;
using System.ComponentModel;

namespace WCS.Entity.Protocol.SRM
{
    /// <summary>
    /// 运行模式
    /// </summary>
    [Description("运行模式")]
    public enum SrmRunSpeed : short
    {
        /// <summary>
        ///  默认
        /// </summary>
        [Description("默认")]
        Default = 0,

        /// <summary>
        ///  低速
        /// </summary>
        [Description("低速")]
        LowSpeed = 1,
    }

    /// <summary>
    /// 任务类型
    /// </summary>
    [Description("任务类型")]
    public enum SrmTaskType : short
    {
        /// <summary>
        ///  默认 出入库使用该任务类型
        /// </summary>
        [Description("默认,出入库使用该任务类型")]
        Default = 0,

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

        /// <summary>
        ///  删除任务
        /// </summary>
        [Description("删除任务")]
        DeleteTask = 2,

        /// <summary>
        ///  移动任务
        /// </summary>
        [Description("移动任务")]
        MoveTask = 3,

        /// <summary>
        ///  移库任务
        /// </summary>
        [Description("移库任务")]
        MoveGoods = 4
    }

    /// <summary>
    ///  货叉位置
    /// </summary>
    [Description("货叉位置")]
    public enum SrmForkPosition : short
    {
        /// <summary>
        ///  中位
        /// </summary>
        [Description("中位")]
        Centr = 0,

        /// <summary>
        ///  一深度
        /// </summary>
        [Description("一深度")]
        OneDepth = 1,

        /// <summary>
        /// 二深度
        /// </summary>
        [Description("二深度")]
        TwoDepth = 2
    }

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

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

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

        /// <summary>
        ///  保持维修
        /// </summary>
        [Description("保持维修")]
        KeepInRepair = 4,

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

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

        /// <summary>
        ///  任务开始
        /// </summary>
        [Description("任务开始")]
        任务开始 = 2,

        /// <summary>
        ///  取货定位
        /// </summary>
        [Description("取货定位")]
        取货定位 = 3,

        /// <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("保持维修")]
        保持维修 = 99
    }

    /// <summary>
    ///  堆垛机状态
    /// </summary>
    [Description("堆垛机状态")]
    [Flags]
    public enum SrmStatus : ushort
    {
        /// <summary>
        ///  PLC的握手信号
        /// </summary>
        [Description("PLC的握手信号")]
        HandshakeTowcs = 1 << 0,

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

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

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

        /// <summary>
        ///  任务完成信号
        /// </summary>
        [Description("任务完成信号")]
        TaskFinish = 1 << 4,

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

        /// <summary>
        ///  货叉在原位
        /// </summary>
        [Description("货叉在原位")]
        ForkCenter = 1 << 6,

        /// <summary>
        ///  可以下发任务
        /// </summary>
        [Description("可以下发任务")]
        CanTaskIssued = 1 << 7,

        /// <summary>
        ///  保留
        /// </summary>
        [Description("保留")]
        RES1 = 1 << 8,

        /// <summary>
        ///  单堆垛机是否可以跑全程
        /// </summary>
        [Description("单堆垛机是否可以跑全程")]
        Stopper_Mark = 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>
    [Description("堆垛机报警项")]
    [Flags]
    public enum SrmAlarm1 : 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>
        ///  松绳限位触发1
        /// </summary>
        [Description("松绳限位触发1")]
        松绳限位触发1 = 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>
        ///  北侧安全门1故障
        /// </summary>
        [Description("北侧安全门1故障")]
        北侧安全门1故障 = 1L << 40,

        /// <summary>
        ///  南侧安全门2故障
        /// </summary>
        [Description("南侧安全门2故障")]
        南侧安全门2故障 = 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>
        ///  货叉位置错误
        /// </summary>
        [Description("货叉位置错误")]
        货叉位置错误 = 1L << 48,

        /// <summary>
        ///  货叉编码器报警
        /// </summary>
        [Description("货叉编码器报警")]
        货叉编码器报警 = 1L << 49,

        /// <summary>
        ///  货叉编码器报警中间位
        /// </summary>
        [Description("货叉编码器报警中间位")]
        货叉编码器报警中间位 = 1L << 50,

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

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

        /// <summary>
        ///  按钮, 安全回路空开
        /// </summary>
        [Description("按钮安全回路空开")]
        按钮安全回路空开 = 1L << 53,

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

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

        /// <summary>
        ///  登梯口急停
        /// </summary>
        [Description("登梯口急停")]
        登梯口急停 = 1L << 56,

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

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

        /// <summary>
        ///  松绳限位触发2
        /// </summary>
        [Description("松绳限位触发2")]
        松绳限位触发2 = 1L << 59,

        /// <summary>
        ///  货叉右侧超行程
        /// </summary>
        [Description("货叉右侧超行程")]
        货叉右侧超行程 = 1L << 60,

        /// <summary>
        ///  取放货托盘总数超出限制
        /// </summary>
        [Description("取放货托盘总数超出限制")]
        取放货托盘总数超出限制 = 1L << 61,

        /// <summary>
        ///  安全门急停
        /// </summary>
        [Description("安全门急停")]
        北侧安全门急停 = 1L << 62,
    }

    /// <summary>
    /// 堆垛机报警项
    /// </summary>
    [Description("堆垛机报警项")]
    [Flags]
    public enum SrmAlarm2 : ushort
    {
        /// <summary>
        ///  无
        /// </summary>
        [Description("无")]
        无 = 0,

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

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

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

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

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

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

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

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

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

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

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