#
whycq
2024-08-19 a5519c76cb177d22ed5d001410132e430664c877
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
package com.example.agvcontroller.protocol2;
 
import com.example.agvcontroller.protocol.PacBody;
import com.example.agvcontroller.protocol.PacErrorType;
import com.example.agvcontroller.protocol.PacHeader;
 
import io.netty.buffer.ByteBuf;
 
public class AgvPackage {
 
    /**
     * 源数据包缓冲区(引用)
     */
    private ByteBuf sourceBuff;
 
    /**
     * 原始消息对应的16进制字符串
     */
    private String sourceHexStr;
 
    /**
     * 消息头部
     */
    private PacHeader header;
 
    /**
     * 消息体
     */
    private PacBody body;
 
    public ByteBuf getSourceBuff() {
        return sourceBuff;
    }
 
    public void setSourceBuff(ByteBuf sourceBuff) {
        this.sourceBuff = sourceBuff;
    }
 
    public String getSourceHexStr() {
        return sourceHexStr;
    }
 
    public void setSourceHexStr(String sourceHexStr) {
        this.sourceHexStr = sourceHexStr;
    }
 
    public PacHeader getHeader() {
        return header;
    }
 
    public void setHeader(PacHeader header) {
        this.header = header;
    }
 
    public int getValidCode() {
        return validCode;
    }
 
    public void setValidCode(int validCode) {
        this.validCode = validCode;
    }
 
    public PacBody getBody() {
        return body;
    }
 
    public void setBody(PacBody body) {
        this.body = body;
    }
 
    public boolean isErrorPac() {
        return errorPac;
    }
 
    public void setErrorPac(boolean errorPac) {
        this.errorPac = errorPac;
    }
 
    public PacErrorType getPacErrorType() {
        return pacErrorType;
    }
 
    public void setPacErrorType(PacErrorType pacErrorType) {
        this.pacErrorType = pacErrorType;
    }
 
    /**
     * 消息的校正码
     */
    private int validCode;
 
    /**
     * 是否为校验异常包
     */
    private boolean errorPac;
 
    /**
     * 校验异常类型
     */
    private PacErrorType pacErrorType;
}