#
whycq
2024-08-15 e54492fb532366faac8aa5d46ad8905ea3ff38d5
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
package com.example.agvcontroller.protocol;
 
 
import java.io.Serializable;
 
/**
 * Created by vincent on 2023/3/23
 */
//@Data
public class AgvProtocol implements Serializable {
 
    private static final long serialVersionUID = 8858385758421567504L;
 
    private String agvNo;
 
    private int timestamp;
 
    private IMessageBody messageBody;
 
    public static AgvProtocol build(String agvNo) {
        AgvProtocol protocol = new AgvProtocol();
        protocol.setAgvNo(agvNo);
        //protocol.setTimestamp((int) (System.currentTimeMillis()/1000));
        return protocol;
    }
 
    public AgvProtocol setAgvNo(String agvNo) {
        this.agvNo = agvNo;
        return this;
    }
 
    public AgvProtocol setMessageBody(IMessageBody messageBody) {
        this.messageBody = messageBody;
        return this;
    }
 
}