Xiajijian
2025-10-13 e90fcceee583f9428b40a551c31ae29a3492f2bf
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.ard.work.component.netty.command.notice;
 
import com.ard.work.component.netty.command.BaseCmd;
import io.netty.buffer.ByteBuf;
import lombok.Data;
 
/**
 * 无人机准备完成通知回复指令
 *
 * @author liusuyi
 * @date 2024年10月26日11:54
 **/
@Data
public class UavReadyReplyCmd extends BaseCmd {
    private final byte encryptFlag = 0x00;  // 加密标志
    private final byte actionCode = 0x3D;   // 动作编号
    private final byte batteryPower;        // 电池电量
    private final double longitude;         // 经度
    private final double latitude;          // 纬度
    private final int altitude;             // 海拔高度
 
    public UavReadyReplyCmd(String boxSn, byte batteryPower, double longitude, double latitude, int altitude) {
        setDataHeader((short) 0x6A77);      // 设置帧头
        setCmdCode((byte) 0x3D);            // 设置指令编号
        setDataLength((short) 39);          // 数据长度
 
        this.batteryPower = batteryPower;
        this.longitude = longitude;
        this.latitude = latitude;
        this.altitude = altitude;
        setBoxSn(boxSn.getBytes());
    }
 
    public void encode(ByteBuf out) {
 
    }
}