using NEIntelligentControl2.Models.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace NEIntelligentControl2.Models.Windturbine
{
    /// <summary>
    /// 风机状态
    /// </summary>
    public enum WindturbineState
    {
        /// <summary>
        /// 已经停机
        /// </summary>
        Stoped = 0,
        /// <summary>
        /// 上电
        /// </summary>
        PowerOn = 1,
        /// <summary>
        /// 待机
        /// </summary>
        Standby = 2,
        /// <summary>
        /// 启动
        /// </summary>
        StartUp = 3,
        /// <summary>
        /// 并网
        /// </summary>
        GridConnected = 4,
        /// <summary>
        /// 故障
        /// </summary>
        Malfunction = 5,
        /// <summary>
        /// 维护
        /// </summary>
        Maintain = 6,
        /// <summary>
        /// 离线
        /// </summary>
        Offline = 7
    }



    /// <summary>
    /// 操作类型
    /// </summary>
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public enum OperateStyle
    {
        /// <summary>
        /// 未知操作
        /// </summary>
        [StringValue("无")]
        Nothing = 0,
        /// <summary>
        /// 启动
        /// </summary>
        [StringValue("启动")]
        Start = 1,
        /// <summary>
        /// 停机
        /// </summary>
        [StringValue("停机")]
        Stop = 2,
        /// <summary>
        /// 限转速
        /// </summary>
        [StringValue("限转速")]
        LimitSpeed = 3,
        /// <summary>
        /// 限功率
        /// </summary>
        [StringValue("限功率")]
        LimitPower = 4,

        /// <summary>
        /// 复位
        /// </summary>
        [StringValue("复位")]
        Reset = 5,

        /// <summary>
        /// 维护
        /// </summary>
        [StringValue("维护")]
        Maintain = 6,

        /// <summary>
        /// 恢复满发
        /// </summary>
        [StringValue("恢复满发")]
        ResetMax = 7,

        /// <summary>
        /// 取消维护
        /// </summary>
        [StringValue("取消维护")]
        UnMaintain = 8,

        /// <summary>
        /// 挂牌
        /// </summary>
        [StringValue("挂牌")]
        Lock = 9,

        /// <summary>
        /// 取消挂牌
        /// </summary>
        [StringValue("取消挂牌")]
        UnLock = 10,

        /// <summary>
        /// 未知
        /// </summary>
        [StringValue("未知")]
        Unknow = 11
    }

    /// <summary>
    /// 挂牌类型
    /// </summary>
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public enum HungType
    {
        /// <summary>
        /// 正常（未挂牌）
        /// </summary>
        [StringValue("未挂牌")]
        UnLock = 0,
        /// <summary>
        /// 场内受累检修
        /// </summary>
        [StringValue("场内受累检修")]
        StationCheckLock = 2,
        /// <summary>
        /// 场内受累故障
        /// </summary>
        [StringValue("场内受累故障")]
        StationFaulLock = 3,
        /// <summary>
        /// 场外受累电网
        /// </summary>
        [StringValue("场外受累电网")]
        StationPowerLineLock = 4,
        /// <summary>
        /// 场外受累天气
        /// </summary>
        [StringValue("场外受累天气")]
        StationWeatherLock = 5,
        /// <summary>
        /// 故障检修
        /// </summary>
        [StringValue("故障检修")]
        FaultLock = 7,
        /// <summary>
        /// 检修
        /// </summary>
        [StringValue("检修")]
        CheckLock = 8,
        /// <summary>
        /// 自定义挂牌
        /// </summary>
        [StringValue("自定义挂牌")]
        CustomerLock = 9,
        /// <summary>
        /// 未知
        /// </summary>
        [StringValue("未知")]
        UnKnow = 10

    }

    /// <summary>
    /// 状态时间对应状态
    /// </summary>
    public enum StateTimes
    {
        /// <summary>
        /// 停机 0
        /// </summary>
        [StringValue("停机")]
        Stop,
        /// <summary>
        /// 上电 1
        /// </summary>
        [StringValue("上电")]
        OnPower,
        /// <summary>
        /// 待机 2
        /// </summary>
        [StringValue("待机")]
        Standby,
        /// <summary>
        /// 启动 3
        /// </summary>
        [StringValue("启动")]
        Start,
        /// <summary>
        /// 并网 4
        /// </summary>
        [StringValue("并网")]
        Online,
        /// <summary>
        /// 故障 5
        /// </summary>
        [StringValue("故障")]
        Fault,
        /// <summary>
        /// 维护 6
        /// </summary>
        [StringValue("维护")]
        Maintain,
        /// <summary>
        /// 离线 7
        /// </summary>
        [StringValue("离线")]
        Offline
    }
}
