yangys
2024-05-07 9b677ea5c6978788d135fc15da3d78c5a93789c2
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
package com.qianwen.smartman.modules.dnc.dto.serial;
 
public enum Parity {
    None(0, "无奇偶校验"),
    Odd(1, "奇校验"),
    Even(2, "偶校验"),
    Mark(3, "奇偶校验位设置为 1"),
    Space(4, "奇偶校验位设置为 0");
    
    private final Integer code;
    private final String desc;
 
    Parity(final Integer code, final String desc) {
        this.code = code;
        this.desc = desc;
    }
 
    public Integer getCode() {
        return this.code;
    }
 
    public String getDesc() {
        return this.desc;
    }
}