1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| package com.zy.core.netty.constant;
|
| public enum FireDataType {
|
| HEARTBEAT(0x36, 0x39, "心跳信息"),
|
| FIRE_ALARM(0x38, 0x30, "火警"),
|
| ;
|
| public int byte1;
| public int byte2;
| public String des;
|
| FireDataType(int byte1, int byte2, String des) {
| this.byte1 = byte1;
| this.byte2 = byte2;
| this.des = des;
| }
|
| public static FireDataType get(int byte1, int byte2) {
| for (FireDataType value : FireDataType.values()) {
| if (byte1 == value.byte1 && byte2 == value.byte2) {
| return value;
| }
| }
| return null;
| }
|
| }
|
|