liurunyu
2023-11-18 c1ddfd71223c1a7d704b6f21b669fbfcb37adc82
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
package com.dy.common.mw.protocol.pMeterV1_0_1;
 
import com.dy.common.mw.protocol.CodeParseParams;
import com.dy.common.mw.protocol.Data;
 
public class ParseParamsForUpV1_0_1 implements CodeParseParams{
    
    public String protocolName ;//协议名称
    public String rtuAddr ;//IMEI号(IMEI号)
    public String meterNo ;//水表号
    public Integer productId ;//电信平台产品ID,当不在电信平台运行时,为null
    public String deviceId ;//电信平台设备ID,当不在电信平台运行时,为null
    public String upCode ;//上行报文数据中的功能码
    public String upHex ;//行报文数据十六进制形式
    public byte[] upBuffer ;//行报文数据字节数组
    public Data data ;//解析后的数据
 
    public ParseParamsForUpV1_0_1(){}
    
    public void clear(){
        this.protocolName = null ; 
        this.rtuAddr = null ; 
        this.meterNo = null ; 
        this.productId = null ; 
        this.deviceId = null ; 
        this.upCode = null ; 
        this.upHex = null ; 
        this.upBuffer = null ; 
        this.data = null ;
    }
    
    public void setValue(String protocolName, 
            String rtuAddr, 
            String meterNo,
            Integer productId, 
            String deviceId, 
            String upCode, 
            String upHex, 
            byte[] upBuffer,
            Data data){
        this.protocolName = protocolName ; 
        this.rtuAddr = rtuAddr ; 
        this.meterNo = meterNo ; 
        this.productId = productId ; 
        this.deviceId = deviceId ; 
        this.upCode = upCode ; 
        this.upHex = upHex ; 
        this.upBuffer = upBuffer ; 
        this.data = data ;
    }
}