liurunyu
2024-05-16 f3d3eacf5af65ebfcfcc3b82e7488401ac545453
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.dy.common.mw.protocol;
 
/**
 * 处理出错
 */
public class MidResultError implements MidResult{
 
    public static final long serialVersionUID;
    static {
        serialVersionUID = 201606271057001L;
    }
 
    public String protocolName ;//协议名称
    public String rtuAddr ;//Rtu地址,注意rtuAddr可能为null
    public String message ;//出错消息
    public Exception e ;//异常
    
    public MidResultError(String protocolName, String rtuAddr, String message, Exception e){
        this.protocolName = protocolName ;
        this.rtuAddr = rtuAddr ;
        this.message = message ;
        this.e = e ;
    }
    
    @Override
    public void action() {
         ProtocolUnit.getInstance().adapter.getSingleActionError(this.protocolName).doAction(this); 
    }
 
}