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;
|
}
|
}
|