| | |
| | | package com.zy.core.model.protocol; |
| | | |
| | | import com.zy.core.enums.ShuttleProtocolStatusType; |
| | | import com.zy.core.enums.ShuttleStatusType; |
| | | import com.zy.core.model.command.ShuttleAssignCommand; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | private Short taskNo = 0; |
| | | |
| | | /** |
| | | * 任务指令 |
| | | */ |
| | | private ShuttleAssignCommand assignCommand; |
| | | |
| | | /** |
| | | * 当前小车状态(内部自我维护) |
| | | */ |
| | | private Integer protocolStatus; |
| | | |
| | | /** |
| | | * 当前小车状态枚举 |
| | | */ |
| | | private ShuttleProtocolStatusType protocolStatusType; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | private String sourceLocNo; |
| | |
| | | * 目标库位 |
| | | */ |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 排 |
| | | */ |
| | | private Short row; |
| | | |
| | | /** |
| | | * 列 |
| | | */ |
| | | private Short bay; |
| | | |
| | | /** |
| | | * 层 |
| | | */ |
| | | private Short lev; |
| | | |
| | | /** |
| | | * 小车忙状态位 |
| | |
| | | } |
| | | |
| | | //获取电池电量 |
| | | public Short getBatteryPower() { |
| | | public Short getBatteryPower$() { |
| | | return (short) (this.batteryPower * 0.1); |
| | | } |
| | | |
| | | //获取电池温度 |
| | | public Short getBatteryTemp$() { |
| | | return (short) (this.batteryTemp * 0.1); |
| | | } |
| | | |
| | | /** |
| | | * 设置小车状态 |
| | | */ |
| | | public void setProtocolStatus(Integer status) { |
| | | this.protocolStatus = status; |
| | | this.protocolStatusType = ShuttleProtocolStatusType.get(status); |
| | | } |
| | | |
| | | /** |
| | | * 设置小车状态 |
| | | */ |
| | | public void setProtocolStatus(ShuttleProtocolStatusType status) { |
| | | this.protocolStatus = status.id; |
| | | this.protocolStatusType = status; |
| | | } |
| | | |
| | | } |