dongyukun
2024-11-05 e8ad669f7c97d45cd23630dc101180a130d6c17e
提交 | 用户 | 时间
ce910c 1 package com.netsdk.lib.enumeration;
H 2
3
4 /**
5  * @author 260611
6  * @description 物模型服务类型
7  * @date 2022/04/20 10:16:57
8  */
9 public enum EM_THINGS_SERVICE_TYPE {
10     /**
11      * 阀门控制,入参:NET_IN_THINGS_SERVICE_VALVECONTROL,出参:NET_OUT_THINGS_SERVICE_VALVECONTROL
12      */
13     EM_THINGS_SERVICE_TYPE_VALVECONTROL(0, "阀门控制,入参:NET_IN_THINGS_SERVICE_VALVECONTROL,出参:NET_OUT_THINGS_SERVICE_VALVECONTROL"),
14     /**
15      * 电量清零,入参:NET_IN_THINGS_SERVICE_CHARGECLEAR,出参:NET_OUT_THINGS_SERVICE_CHARGECLEAR
16      */
17     EM_THINGS_SERVICE_TYPE_CHARGECLEAR(1, "电量清零,入参:NET_IN_THINGS_SERVICE_CHARGECLEAR,出参:NET_OUT_THINGS_SERVICE_CHARGECLEAR"),
18     /**
19      * 漏电自检,入参:NET_IN_THINGS_SERVICE_LEAKCURTPOST,出参:NET_OUT_THINGS_SERVICE_LEAKCURTPOST
20      */
21     EM_THINGS_SERVICE_TYPE_LEAKCURTPOST(2, "漏电自检,入参:NET_IN_THINGS_SERVICE_LEAKCURTPOST,出参:NET_OUT_THINGS_SERVICE_LEAKCURTPOST"),
22     /**
23      * 漏电自检异步,入参:NET_IN_THINGS_SERVICE_LEAKCURTPOSTASYNC,出参:NET_OUT_THINGS_SERVICE_LEAKCURTPOSTASYNC
24      */
25     EM_THINGS_SERVICE_TYPE_LEAKCURTPOSTASYNC(3, "漏电自检异步,入参:NET_IN_THINGS_SERVICE_LEAKCURTPOSTASYNC,出参:NET_OUT_THINGS_SERVICE_LEAKCURTPOSTASYNC"),
26     /**
27      * 空开红蓝灯闪烁(寻找空开),入参:NET_IN_THINGS_SERVICE_AIRSWITHFIND,出参:NET_OUT_THINGS_SERVICE_AIRSWITHFIND
28      */
29     EM_THINGS_SERVICE_TYPE_AIRSWITHFIND(4, "空开红蓝灯闪烁(寻找空开),入参:NET_IN_THINGS_SERVICE_AIRSWITHFIND,出参:NET_OUT_THINGS_SERVICE_AIRSWITHFIND"),
30     /**
31      * 空开恢复出厂设置,入参:NET_IN_THINGS_SERVICE_AIRSWITHRESET,出参:NET_OUT_THINGS_SERVICE_AIRSWITHRESET
32      */
33     EM_THINGS_SERVICE_TYPE_AIRSWITHRESET(5, "空开恢复出厂设置,入参:NET_IN_THINGS_SERVICE_AIRSWITHRESET,出参:NET_OUT_THINGS_SERVICE_AIRSWITHRESET"),
34     /**
35      * 添加联动规则,入参:NET_IN_THINGS_SERVICE_ADDRULE,出参:NET_OUT_THINGS_SERVICE_ADDRULE
36      */
37     EM_THINGS_SERVICE_TYPE_ADDRULE(6, "添加联动规则,入参:NET_IN_THINGS_SERVICE_ADDRULE,出参:NET_OUT_THINGS_SERVICE_ADDRULE"),
38     /**
39      * 删除联动规则,入参:NET_IN_THINGS_SERVICE_DELRULE,出参:NET_OUT_THINGS_SERVICE_DELRULE
40      */
41     EM_THINGS_SERVICE_TYPE_DELRULE(7, "删除联动规则,入参:NET_IN_THINGS_SERVICE_DELRULE,出参:NET_OUT_THINGS_SERVICE_DELRULE"),
42     /**
43      * 修改联动规则,入参:NET_IN_THINGS_SERVICE_MODRULE,出参:NET_OUT_THINGS_SERVICE_MODRULE
44      */
45     EM_THINGS_SERVICE_TYPE_MODRULE(8, "修改联动规则,入参:NET_IN_THINGS_SERVICE_MODRULE,出参:NET_OUT_THINGS_SERVICE_MODRULE"),
46     /**
47      * 查询联动规则,入参:NET_IN_THINGS_SERVICE_QUERULE,出参:NET_OUT_THINGS_SERVICE_QUERULE
48      */
49     EM_THINGS_SERVICE_TYPE_QUERULE(9, "查询联动规则,入参:NET_IN_THINGS_SERVICE_QUERULE,出参:NET_OUT_THINGS_SERVICE_QUERULE"),
50     /**
51      * 使能联动规则,入参:NET_IN_THINGS_SERVICE_ENABLE,出参:NET_OUT_THINGS_SERVICE_ENABLE
52      */
53     EM_THINGS_SERVICE_TYPE_ENABLERULE(10, "使能联动规则,入参:NET_IN_THINGS_SERVICE_ENABLE,出参:NET_OUT_THINGS_SERVICE_ENABLE"),
54     /**
55      * 添加设备,入参:NET_IN_THINGS_SERVICE_ADDDEVICE,出参:NET_OUT_THINGS_SERVICE_ADDDEVICE
56      */
57     EM_THINGS_SERVICE_TYPE_ADDDEVICE(11, "添加设备,入参:NET_IN_THINGS_SERVICE_ADDDEVICE,出参:NET_OUT_THINGS_SERVICE_ADDDEVICE"),
58     /**
59      * 删除子设备,入参:NET_IN_THINGS_SERVICE_DELDEVICE,出参:NET_OUT_THINGS_SERVICE_DELDEVICE
60      */
61     EM_THINGS_SERVICE_TYPE_DELDEVICE(12, "删除子设备,入参:NET_IN_THINGS_SERVICE_DELDEVICE,出参:NET_OUT_THINGS_SERVICE_DELDEVICE"),
62     /**
63      * 子设备替换,入参:NET_IN_THINGS_SERVICE_DEVREPLACE,出参:NET_OUT_THINGS_SERVICE_DEVREPLACE
64      */
65     EM_THINGS_SERVICE_TYPE_DEVREPLACE(13, "子设备替换,入参:NET_IN_THINGS_SERVICE_DEVREPLACE,出参:NET_OUT_THINGS_SERVICE_DEVREPLACE"),
66     /**
67      * 离线日志清除,入参:NET_IN_THINGS_SERVICE_OFFLINELOGCLEAN,出参:NET_OUT_THINGS_SERVICE_OFFLINELOGCLEAN
68      */
69     EM_THINGS_SERVICE_TYPE_OFFLINELOGCLEAN(14, "离线日志清除,入参:NET_IN_THINGS_SERVICE_OFFLINELOGCLEAN,出参:NET_OUT_THINGS_SERVICE_OFFLINELOGCLEAN"),
70     /**
71      * 获取所有空开当前报警状态,入参:NET_IN_THINGS_SERVICE_CURRENTSTATUSGET,出参:NET_OUT_THINGS_SERVICE_CURRENTSTATUSGET
72      */
73     EM_THINGS_SERVICE_TYPE_CURRENTSTATUSGET(15, "获取所有空开当前报警状态,入参:NET_IN_THINGS_SERVICE_CURRENTSTATUSGET,出参:NET_OUT_THINGS_SERVICE_CURRENTSTATUSGET");
74
75     private int value;
76
77     private String note;
78
79     public String getNote() {
80         return note;
81     }
82
83     public int getValue() {
84         return value;
85     }
86
87     EM_THINGS_SERVICE_TYPE(int givenValue, String note) {
88         this.value = givenValue;
89         this.note = note;
90     }
91
92     public static String getNoteByValue(int givenValue) {
93         for (EM_THINGS_SERVICE_TYPE enumType : EM_THINGS_SERVICE_TYPE.values()) {
94             if (givenValue == enumType.getValue()) {
95                 return enumType.getNote();
96             }
97         }
98         return null;
99     }
100
101     public static int getValueByNote(String givenNote) {
102         for (EM_THINGS_SERVICE_TYPE enumType : EM_THINGS_SERVICE_TYPE.values()) {
103             if (givenNote.equals(enumType.getNote())) {
104                 return enumType.getValue();
105             }
106         }
107         return -1;
108     }
109
110     public static EM_THINGS_SERVICE_TYPE getEnum(int value) {
111         for (EM_THINGS_SERVICE_TYPE e : EM_THINGS_SERVICE_TYPE.values()) {
112             if (e.getValue() == value)
113                 return e;
114         }
115         return EM_THINGS_SERVICE_TYPE.EM_THINGS_SERVICE_TYPE_VALVECONTROL;
116     }
117
118 }