zhang
2 天以前 59365e74fcda73ce10cfab475de43f171bb99a2a
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
package com.zy.acs.common.domain.protocol;
 
import com.zy.acs.common.utils.Utils;
import lombok.Data;
 
import java.io.Serializable;
 
/**
 * 路径数据包回复ack
 * Created by vincent on 2023/3/16
 */
@Data
public class AGV_B1_DOWN implements IMessageBody, Serializable {
 
    private static final long serialVersionUID = 6922520569887812372L;
 
    @Override
    public byte[] writeToBytes() {
 
        String serialNo = Utils.zeroFill(this.serialNo, 16);
        byte[] serialNoBytes = Utils.reverse(serialNo.getBytes());
 
        byte pathLen0 = (byte) this.pathLen;
 
        return Utils.merge(serialNoBytes, pathLen0);
    }
 
    @Override
    public void readFromBytes(byte[] messageBodyBytes) {
 
    }
 
    // 流水号 - 16
    private String serialNo;
 
    // 路径长度
    private int pathLen;
 
}