| | |
| | | package com.ruoyi.dataInterchange.model; |
| | | |
| | | import com.ruoyi.dataInterchange.pojo.BaseModel; |
| | | import io.netty.buffer.ByteBuf; |
| | | import io.netty.buffer.Unpooled; |
| | | import lombok.Data; |
| | | import org.springframework.data.elasticsearch.annotations.Field; |
| | | import org.springframework.data.elasticsearch.annotations.FieldType; |
| | | |
| | | /** |
| | | * 主动请求停止实时音视频传输应答 |
| | |
| | | * @Date 2025/3/21 9:54 |
| | | */ |
| | | @Data |
| | | public class UPRealvideoMsgEndAck { |
| | | public class UPRealvideoMsgEndAck extends BaseModel { |
| | | /** |
| | | * 车牌号 |
| | | */ |
| | | @Field(type = FieldType.Text) |
| | | private String vehicleNo; |
| | | /** |
| | | * 车牌颜色 |
| | | */ |
| | | @Field(type = FieldType.Integer) |
| | | private Integer vehicleColor; |
| | | /** |
| | | * 子业务类型标识 |
| | | */ |
| | | @Field(type = FieldType.Integer) |
| | | private Integer dataType; |
| | | /** |
| | | * 后续数据长度 |
| | | */ |
| | | @Field(type = FieldType.Integer) |
| | | private Integer dataLength; |
| | | /** |
| | | * 应答结果 |
| | |
| | | * 0x02: 不支持 |
| | | * 0x03: 会话结束 |
| | | */ |
| | | private Integer result; |
| | | @Field(type = FieldType.Integer) |
| | | private int result; |
| | | |
| | | |
| | | /** |
| | | * 解析报文 |
| | | */ |
| | | public UPRealvideoMsgEndAck decode(RealVideoMsg realVideoMsg) { |
| | | byte[] data = realVideoMsg.getData(); |
| | | ByteBuf byteBuf = Unpooled.wrappedBuffer(data); |
| | | this.vehicleNo = realVideoMsg.getVehicleNo(); |
| | | this.vehicleColor = realVideoMsg.getVehicleColor(); |
| | | this.dataType = realVideoMsg.getDataType(); |
| | | this.dataLength = realVideoMsg.getDataLength(); |
| | | |
| | | //报警处理结果 |
| | | this.result = byteBuf.readByte(); |
| | | return this; |
| | | } |
| | | } |