#
whycq
2024-08-17 0ef7a67000a98a753910f627a221d15a5ba2d5cd
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
package com.example.agvcontroller.action;
 
import com.example.agvcontroller.protocol.IActionBody;
import com.example.agvcontroller.socket.RadixTools;
 
import java.io.Serializable;
 
public class ForwardBackAction implements IActionBody, Serializable {
 
    private static final long serialVersionUID = -3250235107705010316L;
 
    private Short pwd;
 
    @Override
    public byte[] writeToBytes() {
        byte[] bytes = RadixTools.shortToByte(pwd);
//        byte[] bytes = Integer.toHexString(pwd & 0xFFFF).getBytes();
        return bytes;
    }
 
    @Override
    public void readFromBytes(byte[] messageBodyBytes) {
 
    }
 
    public Short getPwd() {
        return pwd;
    }
 
    public void setPwd(Short pwd) {
        this.pwd = pwd;
    }
}