222
DELL
2024-10-30 9764dbb84e14efa922af7d487d15c8c4eabbbdcf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
package com.dev.switchdev;
 
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
 
import com.ComBase;
 
public class SwitchDevice_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
                + "]";
    }
    
    
}