提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
import com.iailab.netsdk.lib.NetSDKLib; |
|
4 |
import com.iailab.netsdk.lib.structure.*; |
|
5 |
|
|
6 |
/** |
|
7 |
* 电视墙操作类型 |
|
8 |
* 对应接口 {@link NetSDKLib#CLIENT_OperateMonitorWall} |
|
9 |
* |
|
10 |
* @author : 47040 |
|
11 |
* @since : Created in 2020/10/19 9:11 |
|
12 |
*/ |
|
13 |
public enum NET_MONITORWALL_OPERATE_TYPE { |
|
14 |
|
|
15 |
/** |
|
16 |
* 添加电视墙, 对应 NET_IN_MONITORWALL_ADD 和 NET_OUT_MONITORWALL_ADD |
|
17 |
*/ |
|
18 |
NET_MONITORWALL_OPERATE_ADD(0, "添加电视墙"), |
|
19 |
/** |
|
20 |
* 预案轮巡控制, 对应 NET_IN_CTRL_COLLECTIONTOUR 和 NET_OUT_CTRL_COLLECTIONTOUR |
|
21 |
*/ |
|
22 |
NET_MONITORWALL_OPERATE_CTRL_TOUR(1, "预案轮巡控制"), |
|
23 |
/** |
|
24 |
* 获取矩阵当前状态, 对应 NET_IN_MONITORWALL_GET_STATUS 和 NET_OUT_MONITORWALL_GET_STATUS |
|
25 |
*/ |
|
26 |
NET_MONITORWALL_OPERATE_GET_STATUS(2, "获取矩阵当前状态"), |
|
27 |
/** |
|
28 |
* 设置预案时间表, 对应 |
|
29 |
* {@link NET_IN_MONITORWALL_SET_COLL_SCHD} 和 {@link NET_OUT_MONITORWALL_SET_COLL_SCHD} |
|
30 |
*/ |
|
31 |
NET_MONITORWALL_OPERATE_SET_COLL_SCHD(3, "设置预案时间表"), |
|
32 |
/** |
|
33 |
* 获取预案时间表, 对应 |
|
34 |
* {@link NET_IN_MONITORWALL_GET_COLL_SCHD} 和 {@link NET_OUT_MONITORWALL_GET_COLL_SCHD} |
|
35 |
*/ |
|
36 |
NET_MONITORWALL_OPERATE_GET_COLL_SCHD(4, "获取预案时间表"), |
|
37 |
/** |
|
38 |
* 删除电视墙, 对应 NET_IN_MONITORWALL_REMOVE 和 NET_OUT_MONITORWALL_REMOVE |
|
39 |
*/ |
|
40 |
NET_MONITORWALL_OPERATE_REMOVE(5, "删除电视墙"), |
|
41 |
/** |
|
42 |
* 设置使能, 对应 |
|
43 |
* {@link NET_IN_MONITORWALL_SET_ENABLE} 和 {@link NET_OUT_MONITORWALL_SET_ENABLE} |
|
44 |
*/ |
|
45 |
NET_MONITORWALL_OPERATE_SET_ENABLE(6, "设置使能"), |
|
46 |
/** |
|
47 |
* 获取使能, 对应 |
|
48 |
* {@link NET_IN_MONITORWALL_GET_ENABLE} 和 {@link NET_OUT_MONITORWALL_GET_ENABLE} |
|
49 |
*/ |
|
50 |
NET_MONITORWALL_OPERATE_GET_ENABLE(7, "获取使能"), |
|
51 |
/** |
|
52 |
* 电视墙是否存在, 对应 NET_IN_MONITORWALL_NAME_EXIST 和 NET_OUT_MONITORWALL_NAME_EXIST |
|
53 |
*/ |
|
54 |
NET_MONITORWALL_OPERATE_NAME_EXIST(8, "电视墙是否存在"), |
|
55 |
/** |
|
56 |
* 修改电视墙名称, 对应 NET_IN_MONITORWALL_RENAME 和 NET_OUT_MONITORWALL_RENAME |
|
57 |
*/ |
|
58 |
NET_MONITORWALL_OPERATE_RENAME(9, "修改电视墙名称"), |
|
59 |
/** |
|
60 |
* 更新已上墙的视频源URL, 对应 NET_IN_MONITORWALL_UPDATE_SOURCE_URL 和 NET_OUT_MONITORWALL_UPDATE_SOURCE_URL |
|
61 |
*/ |
|
62 |
NET_MONITORWALL_OPERATE_UPDATE_SOURCE_URL(10, "更新已上墙的视频源URL"), |
|
63 |
/** |
|
64 |
* 获取电视墙锁定状态, 对应 NET_IN_MONITORWALL_GET_LOCK_STATUS 和 NET_OUT_MONITORWALL_GET_LOCK_STATUS |
|
65 |
*/ |
|
66 |
NET_MONITORWALL_OPERATE_GET_LOCK_STATUS(11, "获取电视墙锁定状态"), |
|
67 |
/** |
|
68 |
* 锁定电视墙(自由开窗的窗口不能再移动,防止用户误操作), 对应 NET_IN_MONITORWALL_LOCK 和 NET_OUT_MONITORWAL L_LOCK |
|
69 |
*/ |
|
70 |
NET_MONITORWALL_OPERATE_LOCK(12, "锁定电视墙"); |
|
71 |
|
|
72 |
private int value; |
|
73 |
private String note; |
|
74 |
|
|
75 |
NET_MONITORWALL_OPERATE_TYPE(int givenValue, String note) { |
|
76 |
this.value = givenValue; |
|
77 |
this.note = note; |
|
78 |
} |
|
79 |
|
|
80 |
public String getNote() { |
|
81 |
return note; |
|
82 |
} |
|
83 |
|
|
84 |
public int getValue() { |
|
85 |
return value; |
|
86 |
} |
|
87 |
|
|
88 |
public static String getNoteByValue(int givenValue) { |
|
89 |
for (NET_MONITORWALL_OPERATE_TYPE enumType : NET_MONITORWALL_OPERATE_TYPE.values()) { |
|
90 |
if (givenValue == enumType.getValue()) { |
|
91 |
return enumType.getNote(); |
|
92 |
} |
|
93 |
} |
|
94 |
return null; |
|
95 |
} |
|
96 |
|
|
97 |
public static int getValueByNote(String givenNote) { |
|
98 |
for (NET_MONITORWALL_OPERATE_TYPE enumType : NET_MONITORWALL_OPERATE_TYPE.values()) { |
|
99 |
if (givenNote.equals(enumType.getNote())) { |
|
100 |
return enumType.getValue(); |
|
101 |
} |
|
102 |
} |
|
103 |
return -1; |
|
104 |
} |
|
105 |
|
|
106 |
public static NET_MONITORWALL_OPERATE_TYPE getEnum(int value) { |
|
107 |
for (NET_MONITORWALL_OPERATE_TYPE e : NET_MONITORWALL_OPERATE_TYPE.values()) { |
|
108 |
if (e.getValue() == value) |
|
109 |
return e; |
|
110 |
} |
|
111 |
return NET_MONITORWALL_OPERATE_TYPE.NET_MONITORWALL_OPERATE_GET_STATUS; |
|
112 |
} |
|
113 |
} |
|
114 |
|
|
115 |
|