package com.netsdk.lib.enumeration;
|
|
|
/**
|
* @author 260611
|
* @description 物模型服务类型
|
* @date 2022/04/20 10:16:57
|
*/
|
public enum EM_THINGS_SERVICE_TYPE {
|
/**
|
* 阀门控制,入参:NET_IN_THINGS_SERVICE_VALVECONTROL,出参:NET_OUT_THINGS_SERVICE_VALVECONTROL
|
*/
|
EM_THINGS_SERVICE_TYPE_VALVECONTROL(0, "阀门控制,入参:NET_IN_THINGS_SERVICE_VALVECONTROL,出参:NET_OUT_THINGS_SERVICE_VALVECONTROL"),
|
/**
|
* 电量清零,入参:NET_IN_THINGS_SERVICE_CHARGECLEAR,出参:NET_OUT_THINGS_SERVICE_CHARGECLEAR
|
*/
|
EM_THINGS_SERVICE_TYPE_CHARGECLEAR(1, "电量清零,入参:NET_IN_THINGS_SERVICE_CHARGECLEAR,出参:NET_OUT_THINGS_SERVICE_CHARGECLEAR"),
|
/**
|
* 漏电自检,入参:NET_IN_THINGS_SERVICE_LEAKCURTPOST,出参:NET_OUT_THINGS_SERVICE_LEAKCURTPOST
|
*/
|
EM_THINGS_SERVICE_TYPE_LEAKCURTPOST(2, "漏电自检,入参:NET_IN_THINGS_SERVICE_LEAKCURTPOST,出参:NET_OUT_THINGS_SERVICE_LEAKCURTPOST"),
|
/**
|
* 漏电自检异步,入参:NET_IN_THINGS_SERVICE_LEAKCURTPOSTASYNC,出参:NET_OUT_THINGS_SERVICE_LEAKCURTPOSTASYNC
|
*/
|
EM_THINGS_SERVICE_TYPE_LEAKCURTPOSTASYNC(3, "漏电自检异步,入参:NET_IN_THINGS_SERVICE_LEAKCURTPOSTASYNC,出参:NET_OUT_THINGS_SERVICE_LEAKCURTPOSTASYNC"),
|
/**
|
* 空开红蓝灯闪烁(寻找空开),入参:NET_IN_THINGS_SERVICE_AIRSWITHFIND,出参:NET_OUT_THINGS_SERVICE_AIRSWITHFIND
|
*/
|
EM_THINGS_SERVICE_TYPE_AIRSWITHFIND(4, "空开红蓝灯闪烁(寻找空开),入参:NET_IN_THINGS_SERVICE_AIRSWITHFIND,出参:NET_OUT_THINGS_SERVICE_AIRSWITHFIND"),
|
/**
|
* 空开恢复出厂设置,入参:NET_IN_THINGS_SERVICE_AIRSWITHRESET,出参:NET_OUT_THINGS_SERVICE_AIRSWITHRESET
|
*/
|
EM_THINGS_SERVICE_TYPE_AIRSWITHRESET(5, "空开恢复出厂设置,入参:NET_IN_THINGS_SERVICE_AIRSWITHRESET,出参:NET_OUT_THINGS_SERVICE_AIRSWITHRESET"),
|
/**
|
* 添加联动规则,入参:NET_IN_THINGS_SERVICE_ADDRULE,出参:NET_OUT_THINGS_SERVICE_ADDRULE
|
*/
|
EM_THINGS_SERVICE_TYPE_ADDRULE(6, "添加联动规则,入参:NET_IN_THINGS_SERVICE_ADDRULE,出参:NET_OUT_THINGS_SERVICE_ADDRULE"),
|
/**
|
* 删除联动规则,入参:NET_IN_THINGS_SERVICE_DELRULE,出参:NET_OUT_THINGS_SERVICE_DELRULE
|
*/
|
EM_THINGS_SERVICE_TYPE_DELRULE(7, "删除联动规则,入参:NET_IN_THINGS_SERVICE_DELRULE,出参:NET_OUT_THINGS_SERVICE_DELRULE"),
|
/**
|
* 修改联动规则,入参:NET_IN_THINGS_SERVICE_MODRULE,出参:NET_OUT_THINGS_SERVICE_MODRULE
|
*/
|
EM_THINGS_SERVICE_TYPE_MODRULE(8, "修改联动规则,入参:NET_IN_THINGS_SERVICE_MODRULE,出参:NET_OUT_THINGS_SERVICE_MODRULE"),
|
/**
|
* 查询联动规则,入参:NET_IN_THINGS_SERVICE_QUERULE,出参:NET_OUT_THINGS_SERVICE_QUERULE
|
*/
|
EM_THINGS_SERVICE_TYPE_QUERULE(9, "查询联动规则,入参:NET_IN_THINGS_SERVICE_QUERULE,出参:NET_OUT_THINGS_SERVICE_QUERULE"),
|
/**
|
* 使能联动规则,入参:NET_IN_THINGS_SERVICE_ENABLE,出参:NET_OUT_THINGS_SERVICE_ENABLE
|
*/
|
EM_THINGS_SERVICE_TYPE_ENABLERULE(10, "使能联动规则,入参:NET_IN_THINGS_SERVICE_ENABLE,出参:NET_OUT_THINGS_SERVICE_ENABLE"),
|
/**
|
* 添加设备,入参:NET_IN_THINGS_SERVICE_ADDDEVICE,出参:NET_OUT_THINGS_SERVICE_ADDDEVICE
|
*/
|
EM_THINGS_SERVICE_TYPE_ADDDEVICE(11, "添加设备,入参:NET_IN_THINGS_SERVICE_ADDDEVICE,出参:NET_OUT_THINGS_SERVICE_ADDDEVICE"),
|
/**
|
* 删除子设备,入参:NET_IN_THINGS_SERVICE_DELDEVICE,出参:NET_OUT_THINGS_SERVICE_DELDEVICE
|
*/
|
EM_THINGS_SERVICE_TYPE_DELDEVICE(12, "删除子设备,入参:NET_IN_THINGS_SERVICE_DELDEVICE,出参:NET_OUT_THINGS_SERVICE_DELDEVICE"),
|
/**
|
* 子设备替换,入参:NET_IN_THINGS_SERVICE_DEVREPLACE,出参:NET_OUT_THINGS_SERVICE_DEVREPLACE
|
*/
|
EM_THINGS_SERVICE_TYPE_DEVREPLACE(13, "子设备替换,入参:NET_IN_THINGS_SERVICE_DEVREPLACE,出参:NET_OUT_THINGS_SERVICE_DEVREPLACE"),
|
/**
|
* 离线日志清除,入参:NET_IN_THINGS_SERVICE_OFFLINELOGCLEAN,出参:NET_OUT_THINGS_SERVICE_OFFLINELOGCLEAN
|
*/
|
EM_THINGS_SERVICE_TYPE_OFFLINELOGCLEAN(14, "离线日志清除,入参:NET_IN_THINGS_SERVICE_OFFLINELOGCLEAN,出参:NET_OUT_THINGS_SERVICE_OFFLINELOGCLEAN"),
|
/**
|
* 获取所有空开当前报警状态,入参:NET_IN_THINGS_SERVICE_CURRENTSTATUSGET,出参:NET_OUT_THINGS_SERVICE_CURRENTSTATUSGET
|
*/
|
EM_THINGS_SERVICE_TYPE_CURRENTSTATUSGET(15, "获取所有空开当前报警状态,入参:NET_IN_THINGS_SERVICE_CURRENTSTATUSGET,出参:NET_OUT_THINGS_SERVICE_CURRENTSTATUSGET");
|
|
private int value;
|
|
private String note;
|
|
public String getNote() {
|
return note;
|
}
|
|
public int getValue() {
|
return value;
|
}
|
|
EM_THINGS_SERVICE_TYPE(int givenValue, String note) {
|
this.value = givenValue;
|
this.note = note;
|
}
|
|
public static String getNoteByValue(int givenValue) {
|
for (EM_THINGS_SERVICE_TYPE enumType : EM_THINGS_SERVICE_TYPE.values()) {
|
if (givenValue == enumType.getValue()) {
|
return enumType.getNote();
|
}
|
}
|
return null;
|
}
|
|
public static int getValueByNote(String givenNote) {
|
for (EM_THINGS_SERVICE_TYPE enumType : EM_THINGS_SERVICE_TYPE.values()) {
|
if (givenNote.equals(enumType.getNote())) {
|
return enumType.getValue();
|
}
|
}
|
return -1;
|
}
|
|
public static EM_THINGS_SERVICE_TYPE getEnum(int value) {
|
for (EM_THINGS_SERVICE_TYPE e : EM_THINGS_SERVICE_TYPE.values()) {
|
if (e.getValue() == value)
|
return e;
|
}
|
return EM_THINGS_SERVICE_TYPE.EM_THINGS_SERVICE_TYPE_VALVECONTROL;
|
}
|
|
}
|