puzhibing
2025-04-25 0dcba4fd1cb536ab426622e31213d8a0194449ff
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
package com.ruoyi.dataInterchange.model;
 
import io.netty.buffer.ByteBuf;
import lombok.Data;
 
/**
 * 下级平台主动关闭主从链路通知
 * @author zhibing.pu
 * @Date 2025/2/24 11:02
 */
@Data
public class UPCloseLinkInform {
    /**
     * 链路关闭原因
     * 0x00:从链路断开
     * 0x01:其他
     */
    private int reasonCode;
    
    
    /**
     * 解析报文
     */
    public UPCloseLinkInform decode(ByteBuf byteBuf) {
        try {
            this.reasonCode = byteBuf.readByte();
        }catch (Exception e){
            e.printStackTrace();
        }
        return this;
    }
}