liurunyu
2024-12-02 7fd3ff6715939467e3850763206d37fac8564e41
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/Cd_21_Down.java
@@ -31,6 +31,7 @@
        MidResultToRtu midRs = new MidResultToRtu() ;
        midRs.rtuResultSendWebUrl = para.rtuResultSendWebUrl ;//rtu返回命令结果 发向目的地web URL
        midRs.protocolName = para.protocolName ;//协议名称
        midRs.protocolVersion = para.protocolVersion ;//协议版本号
        midRs.rtuAddr = para.rtuAddr ;//Rtu地址
        midRs.commandId = para.commandId ;//命令ID,发起命令的客户端(web端)生成,以匹配命令结果
        midRs.downCode = para.commandCode ;//下行命令功能码;
@@ -77,13 +78,13 @@
            CommonV2 commonV_1 = new CommonV2() ;
            byte[] bytes ;
            byte[] bsHead = new byte[ProtocolConstantV206V2.lenHead2Code] ;
            byte index = GlCreate.createHead(bsHead);
            byte index = GlCreate.createHead(para.protocolVersion, bsHead);
            index++ ;
            bsHead[index] = commonV_1.createCtrl((byte)0, (byte)0) ;
            index++ ;
            GlCreate.createRtuAddr(para.rtuAddr, bsHead, index);
            GlCreate.createRtuAddr4P206(para.rtuAddr, bsHead, index);
            index += 5 ;
            ByteUtil.hex2Bytes(para.commandCode, bsHead, index) ;
@@ -105,7 +106,7 @@
            GlCreate.createLen(bytes);//长度放字节数组中
            byte[] bsTail = GlCreate.createCrcTail(bytes) ;//CRC和尾叠加字节数组中
            byte[] bsTail = GlCreate.createCrcTail4P206(bytes) ;//CRC和尾叠加字节数组中
            bytes = ByteUtil.bytesMerge(bytes, bsTail) ;