| | |
| | | |
| | | MidResultToRtu midRs = new MidResultToRtu() ; |
| | | midRs.protocolName = para.protocolName ;//协议名称 |
| | | midRs.rtuResultSendWebUrl = para.rtuResultSendWebUrl ; |
| | | midRs.rtuAddr = para.rtuAddr ;//Rtu地址 |
| | | midRs.commandId = para.commandId ;//命令ID,发起命令的客户端(web端)生成,以匹配命令结果 |
| | | midRs.downCode = para.commandCode ;//下行命令功能码; |
| | |
| | | byte[] bs = new byte[8] ; |
| | | bs[0] = (byte)(Integer.parseInt(cdData.getControllerType(), 16)); |
| | | bs[1] = cdData.projectNo.byteValue() ; |
| | | GlCreate.createTp(bs, 3) ; |
| | | GlCreate.createTp(bs, 2) ; |
| | | bytes = ByteUtil.bytesMerge(bytes, bs) ; |
| | | }else{ |
| | | throw new Exception("下行命令参数据为null") ; |