yangys
2024-05-07 9b677ea5c6978788d135fc15da3d78c5a93789c2
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
package com.qianwen.smartman.modules.dnc.dto.serial;
 
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
 
public class SerialSetting implements Serializable {
    private static final long serialVersionUID = 5667164994678147639L;
    @ApiModelProperty("串口名称")
    private String serialName;
    @ApiModelProperty("波特率")
    private Integer baudRate;
    @ApiModelProperty("奇偶校验位 0:无奇偶校验 1:奇校验 2:偶校验 3:奇偶校验位设置为1 4:奇偶校验位设置为0")
    private Integer parity;
    @ApiModelProperty("数据位")
    private Integer dataBits;
    @ApiModelProperty("停止位 0:没有停止位;1:1;2:3;3:1.5")
    private Integer stopBits;
    @ApiModelProperty("超时")
    private Integer timeout;
    @ApiModelProperty("流控 0:无流控 1:软流控 2:硬流控 3:软流控和硬流控")
    private Integer handshake;
    @ApiModelProperty("发送文件时是否先等待一个字节,以Ascii码十进制数表示。-1不启用。接收时忽略。")
    private Integer waitForChar;
 
    public void setSerialName(final String serialName) {
        this.serialName = serialName;
    }
 
    public void setBaudRate(final Integer baudRate) {
        this.baudRate = baudRate;
    }
 
    public void setParity(final Integer parity) {
        this.parity = parity;
    }
 
    public void setDataBits(final Integer dataBits) {
        this.dataBits = dataBits;
    }
 
    public void setStopBits(final Integer stopBits) {
        this.stopBits = stopBits;
    }
 
    public void setTimeout(final Integer timeout) {
        this.timeout = timeout;
    }
 
    public void setHandshake(final Integer handshake) {
        this.handshake = handshake;
    }
 
    public void setWaitForChar(final Integer waitForChar) {
        this.waitForChar = waitForChar;
    }
 
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (o instanceof SerialSetting) {
            SerialSetting other = (SerialSetting) o;
            if (other.canEqual(this)) {
                Object this$baudRate = getBaudRate();
                Object other$baudRate = other.getBaudRate();
                if (this$baudRate == null) {
                    if (other$baudRate != null) {
                        return false;
                    }
                } else if (!this$baudRate.equals(other$baudRate)) {
                    return false;
                }
                Object this$parity = getParity();
                Object other$parity = other.getParity();
                if (this$parity == null) {
                    if (other$parity != null) {
                        return false;
                    }
                } else if (!this$parity.equals(other$parity)) {
                    return false;
                }
                Object this$dataBits = getDataBits();
                Object other$dataBits = other.getDataBits();
                if (this$dataBits == null) {
                    if (other$dataBits != null) {
                        return false;
                    }
                } else if (!this$dataBits.equals(other$dataBits)) {
                    return false;
                }
                Object this$stopBits = getStopBits();
                Object other$stopBits = other.getStopBits();
                if (this$stopBits == null) {
                    if (other$stopBits != null) {
                        return false;
                    }
                } else if (!this$stopBits.equals(other$stopBits)) {
                    return false;
                }
                Object this$timeout = getTimeout();
                Object other$timeout = other.getTimeout();
                if (this$timeout == null) {
                    if (other$timeout != null) {
                        return false;
                    }
                } else if (!this$timeout.equals(other$timeout)) {
                    return false;
                }
                Object this$handshake = getHandshake();
                Object other$handshake = other.getHandshake();
                if (this$handshake == null) {
                    if (other$handshake != null) {
                        return false;
                    }
                } else if (!this$handshake.equals(other$handshake)) {
                    return false;
                }
                Object this$waitForChar = getWaitForChar();
                Object other$waitForChar = other.getWaitForChar();
                if (this$waitForChar == null) {
                    if (other$waitForChar != null) {
                        return false;
                    }
                } else if (!this$waitForChar.equals(other$waitForChar)) {
                    return false;
                }
                Object this$serialName = getSerialName();
                Object other$serialName = other.getSerialName();
                return this$serialName == null ? other$serialName == null : this$serialName.equals(other$serialName);
            }
            return false;
        }
        return false;
    }
 
    protected boolean canEqual(final Object other) {
        return other instanceof SerialSetting;
    }
 
    public int hashCode() {
        Object $baudRate = getBaudRate();
        int result = (1 * 59) + ($baudRate == null ? 43 : $baudRate.hashCode());
        Object $parity = getParity();
        int result2 = (result * 59) + ($parity == null ? 43 : $parity.hashCode());
        Object $dataBits = getDataBits();
        int result3 = (result2 * 59) + ($dataBits == null ? 43 : $dataBits.hashCode());
        Object $stopBits = getStopBits();
        int result4 = (result3 * 59) + ($stopBits == null ? 43 : $stopBits.hashCode());
        Object $timeout = getTimeout();
        int result5 = (result4 * 59) + ($timeout == null ? 43 : $timeout.hashCode());
        Object $handshake = getHandshake();
        int result6 = (result5 * 59) + ($handshake == null ? 43 : $handshake.hashCode());
        Object $waitForChar = getWaitForChar();
        int result7 = (result6 * 59) + ($waitForChar == null ? 43 : $waitForChar.hashCode());
        Object $serialName = getSerialName();
        return (result7 * 59) + ($serialName == null ? 43 : $serialName.hashCode());
    }
 
    public String toString() {
        return "SerialSetting(serialName=" + getSerialName() + ", baudRate=" + getBaudRate() + ", parity=" + getParity() + ", dataBits=" + getDataBits() + ", stopBits=" + getStopBits() + ", timeout=" + getTimeout() + ", handshake=" + getHandshake() + ", waitForChar=" + getWaitForChar() + ")";
    }
 
    public String getSerialName() {
        return this.serialName;
    }
 
    public Integer getBaudRate() {
        return this.baudRate;
    }
 
    public Integer getParity() {
        return this.parity;
    }
 
    public Integer getDataBits() {
        return this.dataBits;
    }
 
    public Integer getStopBits() {
        return this.stopBits;
    }
 
    public Integer getTimeout() {
        return this.timeout;
    }
 
    public Integer getHandshake() {
        return this.handshake;
    }
 
    public Integer getWaitForChar() {
        return this.waitForChar;
    }
}