📄 stacker.java
字号:
package com.zcsoft.stock;
/** 堆垛机数据对象 */
public class Stacker extends Allocator
{
/** 设备错误状态 */
private int status;
/** 是否满货位入库错误状态 */
public static final int FULL_IN = 2;
/** 是否空货位出库错误状态 */
public static final int EMPTY_OUT = 3;
/** 当前列 */
private int column;
/** 当前层 */
private int layer = 0;
/** 起升运行方向:Boolean.TRUE=提升;Boolean.FALSE=下降;null静止 */
private Boolean verticalDirection;
/** 起升运行速度 */
private int verticalSpeed;
/** use serialVersionUID from JDK 1.0.2 for interoperability */
private static final long serialVersionUID = -8605125614022003001L;
/** @param ID 设备唯一标识号 */
public Stacker(Object ID)
{
super(ID);
// super.setSpeed(2);
// super.setDirection(Boolean.TRUE);
}
public int getLayer()
{
return layer;
}
/** @param newLayer */
public void setLayer(int l)
{
int old = this.layer;
this.layer = l;
this.firePropertyChange("layer", old, l);
}
/** @param an */
public void copyFieldFrom(Device an)
{
super.copyFieldFrom(an);
Stacker s = (Stacker)an;
this.setColumn(s.column);
this.setLayer(s.layer);
this.setStatus(s.layer);
this.setVerticalSpeed(s.verticalSpeed);
this.setVerticalDirection(s.verticalDirection);
}
/**
* 获取状态代码
* @return
*/
public int getStatus()
{
return status;
}
/**
* 记录状态代码
* @param status
*/
public void setStatus(int status)
{
this.status = status;
}
public void setColumn(int column)
{
int old = this.column;
this.column = column;
this.firePropertyChange("column", old, column);
}
public int getColumn()
{
return column;
}
public void setVerticalSpeed(int speed)
{
int old = this.verticalSpeed;
this.verticalSpeed = speed;
this.firePropertyChange("verticalSpeed", old, speed);
}
public int getVerticalSpeed()
{
return verticalSpeed;
}
public void setVerticalDirection(Boolean direction)
{
Boolean old = this.verticalDirection;
this.verticalDirection = direction;
this.firePropertyChange("verticalDirection", old, direction);
}
public Boolean getVerticalDirection()
{
return verticalDirection;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -