#
whycq
2024-08-15 e54492fb532366faac8aa5d46ad8905ea3ff38d5
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package com.example.agvcontroller.protocol;
 
 
import java.net.InetAddress;
import java.net.UnknownHostException;
 
/**
 * vc系统配置
 * Created by luxiaotao on 2018/10/15
 */
//@Configuration
//@ConfigurationProperties(prefix = "agv-tcp")
public class SystemProperties {
 
    public static String HOST_NAME;
 
    static {
        try {
            HOST_NAME = InetAddress.getLocalHost().getHostName();
        } catch (UnknownHostException e) {
            System.err.println("find hostname err");
        }
    }
 
    private int port;
 
    private int heartSeconds;
 
    private int backlog;
 
    private boolean keepAlive;
 
    private int sndbuf;
 
    private int rcvbuf;
 
    private boolean printPacLog;
 
    public int getPort() {
        return port;
    }
 
    public void setPort(int port) {
        this.port = port;
    }
 
    public int getHeartSeconds() {
        return heartSeconds;
    }
 
    public void setHeartSeconds(int heartSeconds) {
        this.heartSeconds = heartSeconds;
    }
 
    public int getBacklog() {
        return backlog;
    }
 
    public void setBacklog(int backlog) {
        this.backlog = backlog;
    }
 
    public boolean isKeepAlive() {
        return keepAlive;
    }
 
    public void setKeepAlive(boolean keepAlive) {
        this.keepAlive = keepAlive;
    }
 
    public int getSndbuf() {
        return sndbuf;
    }
 
    public void setSndbuf(int sndbuf) {
        this.sndbuf = sndbuf;
    }
 
    public int getRcvbuf() {
        return rcvbuf;
    }
 
    public void setRcvbuf(int rcvbuf) {
        this.rcvbuf = rcvbuf;
    }
 
    public boolean isPrintPacLog() {
        return printPacLog;
    }
 
    public void setPrintPacLog(final boolean printPacLog) {
        this.printPacLog = printPacLog;
    }
}