| | |
| | | @Data |
| | | public class CrnProtocol { |
| | | |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 1 = 手动模式 |
| | | * 2 = 自动模式 |
| | | * 3 = 电脑模式 |
| | | */ |
| | | public Short mode; |
| | | public Integer mode; |
| | | |
| | | public CrnModeType modeType; |
| | | |
| | | /** |
| | | * 1 = 急停 |
| | | */ |
| | | public Short eStop; |
| | | |
| | | /** |
| | | * 异常码 |
| | | */ |
| | | public Short alarm; |
| | | public Integer alarm; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | public Short taskNo = 0; |
| | | public Integer taskNo = 0; |
| | | |
| | | /** |
| | | * 堆垛机当前状态 |
| | |
| | | * 90:任务完成等待WCS确认 |
| | | * 99:报警 |
| | | */ |
| | | public Short status; |
| | | public Integer status; |
| | | |
| | | /** |
| | | * 状态枚举 |
| | |
| | | /** |
| | | * 堆垛机当前列号 |
| | | */ |
| | | public Short bay; |
| | | public Integer bay; |
| | | |
| | | /** |
| | | * 堆垛机当前层号 |
| | | */ |
| | | public Short level; |
| | | public Integer level; |
| | | |
| | | /** |
| | | * 当前货叉位置 |
| | |
| | | * 1 = 货叉在左侧 |
| | | * 2 = 货叉在右侧 |
| | | */ |
| | | public Short forkPos; |
| | | public Integer forkPos; |
| | | |
| | | private CrnForkPosType forkPosType; |
| | | public CrnForkPosType forkPosType; |
| | | |
| | | /** |
| | | * 当前载货台位置 |
| | | * 0 = 下定位 |
| | | * 1 = 上定位 |
| | | */ |
| | | public Short liftPos; |
| | | public Integer liftPos; |
| | | |
| | | public CrnLiftPosType liftPosType; |
| | | |
| | |
| | | * 0 = 在定位 |
| | | * 1 = 不在定位 |
| | | */ |
| | | public Short walkPos; |
| | | |
| | | /** |
| | | * 堆垛机任务完成 |
| | | */ |
| | | public Short taskFinish; |
| | | public Integer walkPos; |
| | | |
| | | /** |
| | | * 载货台有物 |
| | | */ |
| | | public Short loaded; |
| | | public Integer loaded; |
| | | |
| | | /** |
| | | * 异常码(数值显示) |
| | | */ |
| | | private Short alarm1; |
| | | private Integer temp1; |
| | | |
| | | /** |
| | | * 异常1 |
| | | */ |
| | | private Short error1; |
| | | private Integer temp2; |
| | | |
| | | /** |
| | | * 异常2 |
| | | */ |
| | | private Short error2; |
| | | private Integer temp3; |
| | | |
| | | /** |
| | | * 保留 |
| | | */ |
| | | private Short temp1; |
| | | private Integer temp4; |
| | | |
| | | /** |
| | | * X行走线速度m/min |
| | | */ |
| | | private Short xSpeed; |
| | | private Integer xSpeed; |
| | | |
| | | /** |
| | | * Y行走线速度m/min |
| | | */ |
| | | private Short ySpeed; |
| | | private Integer ySpeed; |
| | | |
| | | /** |
| | | * Z行走线速度m/min |
| | | */ |
| | | private Short zSpeed; |
| | | private Integer zSpeed; |
| | | |
| | | /** |
| | | * 堆垛机累计走行距离km |
| | |
| | | public Integer yDistance; |
| | | |
| | | /** |
| | | * 堆垛机累计运行时长h |
| | | * 堆垛机累计走行时长h |
| | | */ |
| | | public Integer duration; |
| | | public Integer xDuration; |
| | | |
| | | public void setMode(Short mode) { |
| | | this.mode = mode; |
| | | this.modeType = CrnModeType.get(mode); |
| | | } |
| | | |
| | | public void setMode(CrnModeType type) { |
| | | this.modeType = type; |
| | | this.mode = CrnModeType.get(type).id.shortValue(); |
| | | } |
| | | |
| | | public void setForkPos(Short forkPos) { |
| | | this.forkPos = forkPos; |
| | | this.forkPosType = CrnForkPosType.get(forkPos); |
| | | } |
| | | |
| | | public void setForkPos(CrnForkPosType type) { |
| | | this.forkPosType = type; |
| | | this.forkPos = CrnForkPosType.get(type).id.shortValue(); |
| | | } |
| | | |
| | | public void setLiftPos(Short liftPos) { |
| | | this.liftPos = liftPos; |
| | | this.liftPosType = CrnLiftPosType.get(liftPos); |
| | | } |
| | | |
| | | public void setLiftPos(CrnLiftPosType type) { |
| | | this.liftPosType = type; |
| | | this.liftPos = CrnLiftPosType.get(type).id.shortValue(); |
| | | } |
| | | |
| | | public void setStatus(Short status){ |
| | | this.status = status; |
| | | this.statusType = CrnStatusType.get(status); |
| | | } |
| | | |
| | | public void setStatus(CrnStatusType type){ |
| | | this.statusType = type; |
| | | this.status = CrnStatusType.get(type).id.shortValue(); |
| | | } |
| | | /** |
| | | * 堆垛机累计升降时长h |
| | | */ |
| | | public Integer yDuration; |
| | | |
| | | /** |
| | | * 最近一次入出库类型 |
| | |
| | | */ |
| | | private String lastIo = "I"; |
| | | |
| | | /** |
| | | * 堆垛机所在巷道 |
| | | */ |
| | | private Integer crnLane = 1; |
| | | |
| | | /** |
| | | * 日志采集时间 |
| | | */ |
| | | private Long deviceDataLog = System.currentTimeMillis(); |
| | | |
| | | /** |
| | | * 上一次指令下发时间 |
| | | */ |
| | | private Long lastCommandTime = System.currentTimeMillis(); |
| | | |
| | | public void setMode(Integer mode) { |
| | | this.mode = mode; |
| | | this.modeType = CrnModeType.get(mode); |
| | | } |
| | | |
| | | public void setMode(CrnModeType type) { |
| | | this.modeType = type; |
| | | this.mode = CrnModeType.get(type).id; |
| | | } |
| | | |
| | | public void setForkPos(Integer forkPos) { |
| | | this.forkPos = forkPos; |
| | | this.forkPosType = CrnForkPosType.get(forkPos); |
| | | } |
| | | |
| | | public void setForkPos(CrnForkPosType type) { |
| | | this.forkPosType = type; |
| | | this.forkPos = CrnForkPosType.get(type).id; |
| | | } |
| | | |
| | | public void setLiftPos(Integer liftPos) { |
| | | this.liftPos = liftPos; |
| | | this.liftPosType = CrnLiftPosType.get(liftPos); |
| | | } |
| | | |
| | | public void setLiftPos(CrnLiftPosType type) { |
| | | this.liftPosType = type; |
| | | this.liftPos = CrnLiftPosType.get(type).id; |
| | | } |
| | | |
| | | public void setStatus(Integer status){ |
| | | this.status = status; |
| | | this.statusType = CrnStatusType.get(status); |
| | | } |
| | | |
| | | public void setStatus(CrnStatusType type){ |
| | | this.statusType = type; |
| | | this.status = CrnStatusType.get(type).id; |
| | | } |
| | | |
| | | } |