Pu Zhibing
2025-03-07 297512bc22b179b7038d96a1ff033eceaed38c4b
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
package com.ruoyi.dataInterchange.server;
 
import com.ruoyi.dataInterchange.model.UPCloseLinkInform;import com.ruoyi.dataInterchange.model.UPDisconnectInform;
import com.ruoyi.dataInterchange.util.jtt809.packet.common.OuterPacket;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
 
 
/**
 * @author zhibing.pu
 * @Date 2025/3/6 16:02
 */
@Slf4j
@Component
public class UPCloseLinkInformService {
    
    
    /**
     * 下级平台主动关闭主从链路通知
     * @param ctx
     * @param out
     */
    public void closeLinkInform(ChannelHandlerContext ctx, OuterPacket out){
        ByteBuf byteBuf = Unpooled.wrappedBuffer(out.getBody());
        UPCloseLinkInform upCloseLinkInform = new UPCloseLinkInform().decode(byteBuf);
    }
}