| | |
| | | |
| | | import com.dy.common.mw.protocol.*; |
| | | import com.dy.common.mw.protocol.p206V202404.*; |
| | | import com.dy.common.mw.protocol.p206V202404.upVos.DataCd86Vo; |
| | | import com.dy.common.mw.protocol.p206V202404.upVos.DataCd87Vo; |
| | | import com.dy.common.util.ByteUtil; |
| | | import com.dy.common.util.ByteUtilUnsigned; |
| | |
| | | para.upCode, |
| | | para.data) ; |
| | | } |
| | | log.info("分析上行数据<" + CodeV202404.getCodeName(para.upCode) + " RTU地址=" + para.rtuAddr + ">:\n" + para.data.toString()); |
| | | log.info("\n分析命令应答数据<" + CodeV202404.getCodeName(para.upCode) + " RTU地址=" + para.rtuAddr + ">:\n" + para.data.toString()); |
| | | |
| | | MidResultFromRtu midRs = new MidResultFromRtu() ; |
| | | midRs.protocolName = para.protocolName ;//协议名称 |
| | |
| | | short portLen = ByteUtilUnsigned.byte2Byte(bs, index) ; |
| | | |
| | | index++ ; |
| | | cdData.domain = ByteUtil.bytes2String_LE(bs, index, index + domainLen - 1) ; |
| | | cdData.domain = ByteUtil.bytes2String_BE(bs, index, index + domainLen - 1) ; |
| | | |
| | | index += domainLen ; |
| | | cdData.port = Integer.parseInt(ByteUtil.bytes2String_LE(bs, index, index + portLen - 1)) ; |
| | | cdData.port = Integer.parseInt(ByteUtil.bytes2String_BE(bs, index, index + portLen - 1)) ; |
| | | } |
| | | |
| | | } |