| | |
| | | package com.zy.core.model.protocol; |
| | | |
| | | import com.zy.core.enums.ShuttleErrorCodeType; |
| | | import com.zy.core.enums.ShuttleProtocolStatusType; |
| | | import com.zy.core.enums.ShuttleStatusType; |
| | | import com.zy.core.model.command.ShuttleAssignCommand; |
| | |
| | | * 错误编号 |
| | | */ |
| | | private Short errorCode; |
| | | |
| | | /** |
| | | * 错误编号枚举 |
| | | */ |
| | | private ShuttleErrorCodeType errorCodeType; |
| | | |
| | | /** |
| | | * Plc输出状态IO |
| | |
| | | this.protocolStatusType = status; |
| | | } |
| | | |
| | | /** |
| | | * 设置错误编号 |
| | | */ |
| | | public void setErrorCode(Short errorCode) { |
| | | this.errorCode = errorCode; |
| | | this.errorCodeType = ShuttleErrorCodeType.get(errorCode.intValue()); |
| | | } |
| | | |
| | | /** |
| | | * 设置错误编号 |
| | | */ |
| | | public void setErrorCode(ShuttleErrorCodeType type) { |
| | | this.errorCode = type.id.shortValue(); |
| | | this.errorCodeType = type; |
| | | } |
| | | |
| | | } |