huangcm
2025-04-09 02d4ce54b909bd733f12e9f3fa4c1b03cf2d6f45
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
package com.DeviceTest.helper;
 
public class PCIEInfo {
    private String staSpeed;
    private String staWidth;
 
    public String getStaSpeed() {
        return staSpeed;
    }
 
    public void setStaSpeed(String staSpeed) {
        this.staSpeed = staSpeed;
    }
 
    public String getStaWidth() {
        return staWidth;
    }
 
    public void setStaWidth(String staWidth) {
        this.staWidth = staWidth;
    }
 
    @Override
    public String toString() {
        String gen = staSpeed;
        if ("2.5GT/s".equals(staSpeed)) {
            gen = "gen1";
        } else if ("5GT/s".equals(staSpeed)) {
            gen = "gen2";
        } else if ("8GT/s".equals(staSpeed)) {
            gen = "gen3";
        }
        String lane = staWidth;
        if ("x1".equals(staWidth)) {
            lane = "1Lane";
        } else if ("x2".equals(staWidth)) {
            lane = "2Lanes";
        } else if ("x4".equals(staWidth)) {
            lane = "4Lanes";
        }
        return "gen='" + gen + '\'' +
                ", lane='" + lane + '\'';
    }
}