1
zhanghua
2024-09-26 c775c6953d9759e70f08acbfa8f6d7490aaae3d1
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
44
45
46
47
48
49
package com.netsdk.demo.customize.JordanPSD;
 
import com.netsdk.lib.NetSDKLib;
 
/**
 * 主动注册设备信息
 *
 * @author 47040
 * @since Created at 2021/5/28 20:16
 */
public class DeviceInfo {
    /**
     * 登录句柄 在本服务器上同一时刻下必然唯一
     */
    public NetSDKLib.LLong m_hLoginHandle = new NetSDKLib.LLong(0);
    /**
     * 注册设备的IP
     */
    public String ipAddress;
    /**
     * 注册设备的端口
     */
    public int port;
    /**
     * 注册设备的用户名
     */
    public String username = "admin";
    /**
     * 注册设备的密码
     */
    public String password = "admin123";
    /**
     * 设备信息
     */
    public NetSDKLib.NET_DEVICEINFO_Ex m_stDeviceInfo = new NetSDKLib.NET_DEVICEINFO_Ex();
    /**
     * 设备登录状态
     */
    public boolean isLogin = false;
 
    public DeviceInfo(String ipAddress, int port) {
        this.ipAddress = ipAddress;
        this.port = port;
    }
 
    public String printRegisterInfo() {
        return String.format("IP: %s Port: %d", ipAddress, port);
    }
}