jiazx0107@163.com
2023-08-28 664bb4d0b7799328667ffc47e39da711a77ddbfa
igds-protocol-modbus/src/main/java/com/ld/igds/protocol/modbus/ServerUtil.java
@@ -1,5 +1,6 @@
package com.ld.igds.protocol.modbus;
import com.ld.igds.constant.Constant;
import com.ld.igds.util.ContextUtil;
import java.util.HashMap;
@@ -10,11 +11,6 @@
 */
public class ServerUtil {
    /**
     * 用来缓存,TCP设备执行时间记录key = TCP唯一标志,value = 当前执行时间
     */
    public static Map<String, Long> contextExeModbusTcp = new HashMap<>();
    /**
@@ -38,4 +34,17 @@
        return contextStatusMap;
    }
    public static int getAddrExe(String temp) {
        if (Constant.YN_N.equals(temp)) return 65535;
        if (temp.length() > 4) {
            temp = temp.substring(temp.length() - 4);
        }
        return Integer.valueOf(temp) - 1;
    }
}