package com.zy.core.model.protocol;
|
|
import com.zy.core.enums.ShuttleStatusType;
|
import lombok.Data;
|
import lombok.extern.slf4j.Slf4j;
|
|
/**
|
* 四向穿梭车
|
*/
|
@Slf4j
|
@Data
|
public class ShuttleProtocol {
|
|
/**
|
* 四向穿梭车号
|
*/
|
private Short shuttleNo;
|
|
/**
|
* 任务号
|
*/
|
public Short taskNo = 0;
|
|
/**
|
* 排
|
*/
|
public Short row;
|
|
/**
|
* 列
|
*/
|
public Short bay;
|
|
/**
|
* 层
|
*/
|
public Short lev;
|
|
/**
|
* 控制指令字
|
*/
|
private Integer commandWord;
|
|
/**
|
* 启始二维编号
|
*/
|
private Integer startCodeNum;
|
|
/**
|
* 中间二维编号
|
*/
|
private Integer middleCodeNum;
|
|
/**
|
* 目标二维编号
|
*/
|
private Integer distCodeNum;
|
|
/**
|
* 起点到目标点的距离长度
|
*/
|
private Integer startToDistDistance;
|
|
/**
|
* 中间点到目标点的距离长度
|
*/
|
private Integer middleToDistDistance;
|
|
/**
|
* 小车运行方向
|
*/
|
private Integer runDirection;
|
|
/**
|
* 托盘顶升
|
*/
|
private Integer palletLift;
|
|
/**
|
* 小车强制移动距离
|
*/
|
private Integer forceMoveDistance;
|
|
/**
|
* 充电开关
|
*/
|
private Integer chargeSwitch;
|
|
/**
|
* 小车IO控制
|
*/
|
private Integer IOControl;
|
|
/**
|
* 小车运行速度
|
*/
|
private Integer runSpeed;
|
|
/**
|
* 小车雷达备用
|
*/
|
private Integer radarTmp;
|
|
/**
|
* 指令结束位
|
*/
|
private Integer commandEnd;
|
|
|
/**
|
* 小车忙状态位
|
* true: 忙
|
* false: 空闲
|
*/
|
private Boolean busyStatus;
|
|
/**
|
* 小车忙状态位枚举
|
*/
|
private ShuttleStatusType busyStatusType;
|
|
/**
|
* 当前二维码
|
* 0为空
|
*/
|
private String currentCode;
|
|
/**
|
* 电池电量百分比
|
*/
|
private Double batteryPower;
|
|
/**
|
* 电池温度
|
*/
|
private Double batteryTemp;
|
|
/**
|
* 错误编号
|
*/
|
private Integer errorCode;
|
|
/**
|
* Plc输出状态IO
|
*/
|
private byte plcOutputStatusIO;
|
|
/**
|
* 错误信息码
|
*/
|
private Integer statusErrorCode;
|
|
/**
|
* PLC输入状态
|
*/
|
private byte plcInputStatus;
|
|
/**
|
* 当前或者之前读到的二维码值
|
*/
|
private String currentOrBeforeCode;
|
|
/**
|
* 读到的二维码X方向偏移量
|
*/
|
private Integer codeOffsetX;
|
|
/**
|
* 读到的二维码Y方向偏移量
|
*/
|
private Integer codeOffsetY;
|
|
/**
|
* 当前的电压值
|
*/
|
private Double currentVoltage;
|
|
/**
|
* 当前的模拟量值
|
*/
|
private Integer currentAnalogValue;
|
|
/**
|
* 当前的升降伺服速度
|
*/
|
private Double currentLiftServoSpeed;
|
|
/**
|
* 当前的行走伺服速度
|
*/
|
private Double currentMoveServoSpeed;
|
|
/**
|
* 当前的升降伺服负载率
|
*/
|
private Double currentLiftServoLoad;
|
|
/**
|
* 当前的行走伺服负载率
|
*/
|
private Double currentMoveServoLoad;
|
|
/**
|
* 作业标记
|
*/
|
private String pakMk = "-";
|
|
// 任务信息 ---------------------------------------------------------
|
/**
|
* 96.入库任务中
|
*/
|
private boolean pakInTask;
|
|
/**
|
* 97. 出库任务中
|
*/
|
private boolean pakOutTask;
|
|
/**
|
* 98. 移库任务中
|
*/
|
private boolean pakMoveTask;
|
|
/**
|
* 99. 回原点任务中
|
*/
|
private boolean goHpTask;
|
|
/**
|
* 100. 去反原点任务中
|
*/
|
private boolean goOHpTask;
|
|
/**
|
* 101. 去原点避让位
|
*/
|
private boolean goHpAvoid;
|
|
/**
|
* 102. 去反原点避让位
|
*/
|
private boolean goOHpAvoid;
|
|
/**
|
* 104. 入库取空结束
|
*/
|
private boolean pakInEmpty;
|
|
/**
|
* 105. 入库正常结束
|
*/
|
private boolean pakInFinish;
|
|
/**
|
* 106. 出库取空结束
|
*/
|
private boolean pakOutEmpty;
|
|
/**
|
* 107. 出库正常结束
|
*/
|
private boolean pakOutFinish;
|
|
/**
|
* 108. 去原点避让完成
|
*/
|
private boolean goHpAvoidFinish;
|
|
/**
|
* 109. 去反原点避让完成
|
*/
|
private boolean goOHpAvoidFinish;
|
|
/**
|
* 110. 去原点避让完成
|
*/
|
private boolean goHpAvoidErr;
|
|
/**
|
* 111. 去反原点避让完成
|
*/
|
private boolean goOHpAvoidErr;
|
|
public void setBusyStatus(Boolean status) {
|
this.busyStatus = status;
|
this.busyStatusType = ShuttleStatusType.get(status);
|
}
|
|
public void setBusyStatus(ShuttleStatusType type) {
|
this.busyStatus = type.id.booleanValue();
|
this.busyStatusType = type;
|
}
|
|
}
|