1、根据江海协议中开阀类型变化,修改相应代码;
2、江海协议RTU模拟器启动参数注释。
2个文件已修改
43 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/CommonV202404.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-simulate-rtu202404/src/main/java/com/dy/simRtu202404/PipIrrMwSimulateRtu202404Application.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/CommonV202404.java
@@ -253,19 +253,21 @@
    }
    /**
     * 0x01:刷卡开阀
     * 0x02:中心站开阀
     * 0x08:用户App远程开阀
     * 0x0B:巡检卡开阀
     * 0x00:正常刷卡开泵/阀用水
     * 0x01:平台远程开泵/阀用水
     * 0x02:用户远程开泵/阀用水
     * 0x03:测试卡,
     * 0x04:其它
     * @param type
     * @return
     */
    public static String openValveType(byte type){
        return switch (type) {
            case 1 -> "刷卡开阀";
            case 2 -> "中心站开阀";
            case 8 -> "用户App远程开阀";
            case 11 -> "巡检卡开阀";
            case 0 -> "刷卡开阀";
            case 1 -> "中心站开阀";
            case 2 -> "用户远程开阀";
            case 3 -> "测试卡开阀";
            case 4 -> "其它开阀";
            default -> "未知";
        };
    }
@@ -279,10 +281,10 @@
     */
    public static byte openType2P206V1(byte type){
        return switch (type) {
            case 1 -> (byte)1 ;
            case 2 -> (byte)3 ;
            case 8 -> (byte)3 ;
            case 11 -> (byte)11 ;
            case 0 -> (byte)1 ;
            case 1 -> (byte)3 ;
            case 2 -> (byte)8 ;
            case 3 -> (byte)11 ;
            default -> (byte)-1;
        };
    }
@@ -344,13 +346,13 @@
    public static byte closeType2P206V1(byte type){
        return switch (type) {
            case 0 -> (byte)2;
            case 1,2 -> (byte)4;
            case 1,11 -> (byte)4;
            case 2 -> (byte)9;
            case 3 -> (byte)12;
            case 4,5 -> (byte)6;
            case 6,7,10 -> (byte)5;
            case 4,5,10 -> (byte)6;
            case 6,7 -> (byte)5;
            case 8 -> (byte)16;
            case 9,12 -> (byte)7;
            case 11 -> (byte)9;
            default -> (byte)-1;
        };
    }
pipIrr-platform/pipIrr-mw/pipIrr-mw-simulate-rtu202404/src/main/java/com/dy/simRtu202404/PipIrrMwSimulateRtu202404Application.java
@@ -33,6 +33,15 @@
)
public class PipIrrMwSimulateRtu202404Application implements CommandLineRunner {
    /**
     * 参数0:rtu地址
     * 参数1:IC卡地址
     * 参数2:IC卡编号
     * 参数3:通信中间件IP
     * 参数4:通信中间件端口
     * 参数5:运行方式(0:只上报心跳;1:上报心跳 + 1次(开阀);2:上报心跳 + 1次(关阀);3:上报心跳 + 1次(开阀 + 关阀);4:上报心跳 +
     * @param args
     */
    public static void main(String[] args) {
        parseArg0(args, 0) ;
        parseArg1(args, 1) ;