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) { } }