huang
2025-10-30 a99650cb00bf5b0650c33f39a4221b765201d228
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
package com.mes.connect.protocol;
 
 
/**
 * 协议地址类
 *
 * @author yzx
 * @version 1.0
 */
public class ProtocolAddress {
    private final ProtocolType protocol;
    private final int functionCode;
    private final int dbNumber;
    private final int address;
    private final int bit;
 
    /**
     * @param protocol
     * @param functionCode
     * @param dbNumber
     * @param address
     * @param bit
     */
    public ProtocolAddress(ProtocolType protocol, int functionCode, int dbNumber, int address, int bit) {
        this.protocol = protocol;
        this.functionCode = functionCode;
        this.dbNumber = dbNumber;
        this.address = address;
        this.bit = bit;
    }
 
    /**
     * @return
     */
    public ProtocolType getProtocol() {
        return protocol;
    }
 
    /**
     * @return
     */
    public int getFunctionCode() {
        return functionCode;
    }
 
    /**
     * @return
     */
    public int getDbNumber() {
        return dbNumber;
    }
 
    /**
     * @return
     */
    public int getAddress() {
        return address;
    }
 
    /**
     * @return
     */
    public int getBit() {
        return bit;
    }
 
    @Override
    public String toString() {
        return "ProtocolAddress{" +
                "protocol=" + protocol +
                ", functionCode=" + functionCode +
                ", dbNumber=" + dbNumber +
                ", address=" + address +
                ", bit=" + bit +
                '}';
    }
}