package com.limap.common.enums.iot;

/**
 * @author Lenovo
 */
public enum ProbeEnums {
    ONE(1,"溶解氧探头掉线"),
    TWO(2,"pH探头掉线"),
    THREE(3,"溶解氧和pH探头掉线"),
    FOUR(4,"盐度探头掉线"),
    FIVE(5,"溶解氧和盐度探头掉线"),
    SIX(6,"pH和盐度探头掉线"),
    SEVEN(7,"溶解氧和pH和盐度探头都掉线"),
    EIGHT(8,"氨氮探头掉线"),
    NINE(9,"氨氮和氧探头掉线"),
    TEN(10,"氨氮和pH掉线"),
    eleven(11,"氨氮pH氧掉线"),
    twelve(12,"氨氮和盐度掉线"),
    thirteen(13,"氨氮和盐度和氧掉线"),
    fourteen(14,"氨氮盐度ph掉线"),
    fifteen(15,"氨氮氧ph盐度掉线"),
    sixteen(16,"亚盐离线"),
    seventeen(17,"亚盐和氧离线"),
    eighteen(18,"亚盐pH离线"),
    nineteen(19,"亚盐pH氧离线"),
    twenty(20,"亚盐盐度离线"),
    twentyOne(21,"亚盐盐度氧离线"),
    twentyTwo(22,"亚盐pH盐度离线"),
    twentyThree(23,"亚盐盐度ph氧离线"),
    twentyFour(24,"亚盐氨氮离线"),
    twentyFive(25,"亚盐氨氮氧离线"),
    twentySix(26,"亚盐氨氮pH离线"),
    twentySeven(27,"亚盐氨氮ph氧离线"),
    twentyEight(28,"亚盐氨氮盐度离线"),
    twentyNine(29,"亚盐氨氮盐度氧离线"),
    thirty(30,"亚盐氨氮盐度pH离线"),
    thirtyOne(31,"所有离线");

    private Integer code;
    private String value;

    ProbeEnums(Integer code, String value){
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static ProbeEnums getByCode(Integer code) {
        for (ProbeEnums e : ProbeEnums.values()) {
            if (e.code.equals(code)) {
                return e;
            }
        }
        return null;
    }
}
