package com.dev.dummyload;
|
|
import java.nio.ByteBuffer;
|
import java.nio.ByteOrder;
|
|
import com.ComBase;
|
|
public class DummyLoad_TestParm {
|
|
private int workMode; //¹¤×÷ģʽ 0:Çл»Ä£Ê½ 1:¼Ù¸ºÔØÄ£Ê½
|
private int testCurr; //É趨µçÁ÷¡¢
|
|
|
private int currRange; //µçÁ÷Á¿³Ì
|
private int loadCount; //¸ºÔظöÊý
|
|
private float onlineVol; //У׼ÔÚÏßµçѹ
|
private float groupVol; //У׼×é¶Ëµçѹ
|
private float devTmp; //У׼É豸ζÈ
|
|
|
private float disCurrSlope; //·ÅµçµçÁ÷бÂÊ
|
private float disCurrSkew; //·ÅµçµçÁ÷Æ«ÒÆ
|
|
private float chrCurrSlope; //³äµçµçÁ÷бÂÊ
|
private float chrCurrSkew; //³äµçµçÁ÷Æ«ÒÆ
|
|
private float posiCurr; //Õý¼«ÁãµãµçÁ÷
|
private float negaCurr; //¸º¼«ÁãµãµçÁ÷
|
|
public ByteBuffer getByteBufferWorkParam() {
|
|
ByteBuffer tmpbuf = ByteBuffer.allocate(4);
|
tmpbuf.order(ByteOrder.BIG_ENDIAN);
|
tmpbuf.position(0);
|
|
tmpbuf.putShort(ComBase.changeIntToShort(workMode));
|
tmpbuf.putShort(ComBase.changeIntToShort(testCurr));
|
|
tmpbuf.flip();
|
return tmpbuf;
|
}
|
|
public boolean putByteBufferWorkParam(ByteBuffer bf) {
|
if(bf.limit() < 4) {
|
return false;
|
}
|
ByteBuffer tmpbuf = bf;
|
|
tmpbuf.position(0);
|
|
workMode = ComBase.changeShortToInt(tmpbuf.getShort());
|
testCurr = ComBase.changeShortToInt(tmpbuf.getShort());
|
|
return true;
|
}
|
|
public ByteBuffer getByteBufferTestParam() {
|
|
ByteBuffer tmpbuf = ByteBuffer.allocate(4);
|
tmpbuf.order(ByteOrder.BIG_ENDIAN);
|
tmpbuf.position(0);
|
|
tmpbuf.putShort(ComBase.changeIntToShort(currRange));
|
tmpbuf.putShort(ComBase.changeIntToShort(loadCount));
|
|
tmpbuf.flip();
|
return tmpbuf;
|
}
|
|
|
|
public boolean putByteBufferTestParam(ByteBuffer bf) {
|
if(bf.limit() < 4) {
|
return false;
|
}
|
ByteBuffer tmpbuf = bf;
|
|
tmpbuf.position(0);
|
|
currRange = ComBase.changeShortToInt(tmpbuf.getShort());
|
loadCount = ComBase.changeShortToInt(tmpbuf.getShort());
|
|
return true;
|
}
|
|
|
|
public float getDisCurrSlope() {
|
return disCurrSlope;
|
}
|
|
public float getDisCurrSkew() {
|
return disCurrSkew;
|
}
|
|
public float getChrCurrSlope() {
|
return chrCurrSlope;
|
}
|
|
public float getChrCurrSkew() {
|
return chrCurrSkew;
|
}
|
|
public float getPosiCurr() {
|
return posiCurr;
|
}
|
|
public float getNegaCurr() {
|
return negaCurr;
|
}
|
|
public void setDisCurrSlope(float disCurrSlope) {
|
this.disCurrSlope = disCurrSlope;
|
}
|
|
public void setDisCurrSkew(float disCurrSkew) {
|
this.disCurrSkew = disCurrSkew;
|
}
|
|
public void setChrCurrSlope(float chrCurrSlope) {
|
this.chrCurrSlope = chrCurrSlope;
|
}
|
|
public void setChrCurrSkew(float chrCurrSkew) {
|
this.chrCurrSkew = chrCurrSkew;
|
}
|
|
public void setPosiCurr(float posiCurr) {
|
this.posiCurr = posiCurr;
|
}
|
|
public void setNegaCurr(float negaCurr) {
|
this.negaCurr = negaCurr;
|
}
|
|
public int getWorkMode() {
|
return workMode;
|
}
|
public int getTestCurr() {
|
return testCurr;
|
}
|
public int getCurrRange() {
|
return currRange;
|
}
|
public int getLoadCount() {
|
return loadCount;
|
}
|
public void setWorkMode(int workMode) {
|
this.workMode = workMode;
|
}
|
public void setTestCurr(int testCurr) {
|
this.testCurr = testCurr;
|
}
|
public void setCurrRange(int currRange) {
|
this.currRange = currRange;
|
}
|
public void setLoadCount(int loadCount) {
|
this.loadCount = loadCount;
|
}
|
public float getOnlineVol() {
|
return onlineVol;
|
}
|
public float getGroupVol() {
|
return groupVol;
|
}
|
public float getDevTmp() {
|
return devTmp;
|
}
|
public void setOnlineVol(float onlineVol) {
|
this.onlineVol = onlineVol;
|
}
|
public void setGroupVol(float groupVol) {
|
this.groupVol = groupVol;
|
}
|
public void setDevTmp(float devTmp) {
|
this.devTmp = devTmp;
|
}
|
|
@Override
|
public String toString() {
|
return "SwitchDevice_TestParm [workMode=" + workMode + ", testCurr=" + testCurr + ", currRange=" + currRange
|
+ ", loadCount=" + loadCount + ", onlineVol=" + onlineVol + ", groupVol=" + groupVol + ", devTmp="
|
+ devTmp + ", disCurrSlope=" + disCurrSlope + ", disCurrSkew=" + disCurrSkew + ", chrCurrSlope="
|
+ chrCurrSlope + ", chrCurrSkew=" + chrCurrSkew + ", posiCurr=" + posiCurr + ", negaCurr=" + negaCurr
|
+ "]";
|
}
|
|
|
}
|