|  |  | 
 |  |  | import com.dy.common.mw.protocol.*; | 
 |  |  | import com.dy.common.mw.protocol.p206V202404.CodeV202404; | 
 |  |  | import com.dy.common.mw.protocol.p206V202404.ParseParamsForDownV202404; | 
 |  |  | import com.dy.common.mw.protocol.p206V202404.downVos.ComCd10Vo; | 
 |  |  | import com.dy.common.mw.protocol.p206V202404.downVos.ComCd15Vo; | 
 |  |  | import com.dy.common.mw.protocol.p206V202404.parse.global.GlCreate; | 
 |  |  | import com.dy.common.util.ByteUtil; | 
 |  |  | 
 |  |  |  | 
 |  |  |         MidResultToRtu midRs = new MidResultToRtu() ; | 
 |  |  |         midRs.protocolName = para.protocolName ;//协议名称 | 
 |  |  |         midRs.protocolVersion = para.protocolVersion ;//协议版本号 | 
 |  |  |         midRs.rtuResultSendWebUrl = para.rtuResultSendWebUrl ; | 
 |  |  |         midRs.rtuAddr = para.rtuAddr ;//Rtu地址 | 
 |  |  |         midRs.commandId = para.commandId ;//命令ID,发起命令的客户端(web端)生成,以匹配命令结果 | 
 |  |  |         midRs.downCode = para.commandCode ;//下行命令功能码; | 
 |  |  |         midRs.downCodeName = CodeV202404.getCodeName(para.commandCode) ;//下行命令功能码名称; | 
 |  |  |         midRs.downBuffer = bs ;//下行命令数据 | 
 |  |  |         midRs.downBufHex = ByteUtil.bytes2Hex(bs, true) ;//下行命令数据十六进制形式 | 
 |  |  |         midRs.hasResponse = true ;//是否有应答 | 
 |  |  | 
 |  |  |             if(cvo.flowNo.length() != 12){ | 
 |  |  |                 throw new Exception("流水号必须是12位数字") ; | 
 |  |  |             } | 
 |  |  |             byte[] bs = new byte[40] ; | 
 |  |  |             byte[] bs = new byte[43] ; | 
 |  |  |             int index = 0 ; | 
 |  |  |             bs[index] = (byte)(Integer.parseInt(cvo.controllerType, 16)); | 
 |  |  |  |