jiazx0107@163.com
2024-01-19 dd7a033e4591b8004ecd570ef4ff2ef925df65bc
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
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.fzzy.protocol.youxian0;
 
 
import com.fzzy.api.utils.BytesUtil;
 
/**
 * 工具类
 */
public class ServiceUtils {
 
 
    //路由=6A
    public static String FUNCTION_6A = "6a";
 
    //搜索=62
    public static String FUNCTION_62 = "6a";
 
    //测温=66
    public static String FUNCTION_66 = "66";
 
    //仓外湿度=67
    public static String FUNCTION_67 = "67";
 
    //仓内湿度=68
    public static String FUNCTION_68 = "68";
 
 
    public static void main(String[] args) {
        String hex1 ="9D";
        String hex2 ="BB";
 
        int num1 = BytesUtil.hexToInt(hex1);
        int num2 = BytesUtil.hexToInt(hex2);
 
        int result = num1^num2;
 
        System.out.println(result);
 
 
    }
 
 
}