liusuyi
2025-11-19 6c9ad02f19d5bd8e597bd23006bead9b9ebcd593
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
package com.ard.work.component.netty.command.register;
 
import com.ard.work.component.netty.command.BaseCmd;
import com.ard.work.component.netty.protobuf.TelemetryDataPB;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.EqualsAndHashCode;
 
/**
 *  无人机就绪通知命令
 *
 * @author 刘苏义
 * @date 2024/10/24 17:18
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class UavInitReplyCmd extends BaseCmd {
 
    private byte actionCode = 0x42;
    private TelemetryDataPB.UavInitInfo uavInitInfo;
 
    public UavInitReplyCmd(String boxSn, TelemetryDataPB.UavInitInfo uavInitInfo) {
        setDataHeader((short) 0x6A77); // 设置帧头
        // setDataLength((short) (1 + uavState.toByteArray().length)); // 数据长度
        setBoxSn(boxSn.getBytes());
        setCmdCode((byte) 0xD1); // 设置命令编号
        this.uavInitInfo = uavInitInfo;
    }
 
    @Override
    public void encode(ByteBuf out) {
 
    }
}