| | |
| | | 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.ComCd22Vo; |
| | | import com.dy.common.mw.protocol.p206V202404.downVos.ComCd26Vo; |
| | | import com.dy.common.mw.protocol.p206V202404.parse.global.GlCreate; |
| | | import com.dy.common.util.ByteUtil; |
| | |
| | | if(cvo == null){ |
| | | throw new Exception("json转ComCd22Vo为null") ; |
| | | } |
| | | if(cvo.ipChannel != 1 && cvo.ipChannel !=2){ |
| | | throw new Exception("IP通道号只能是1或2") ; |
| | | } |
| | | |
| | | if(cvo.maxAmountYear < 0 || cvo.maxAmountYear > 99999999){ |
| | | throw new Exception("设备终端年用水量必须是0~99999999范围内的整数") ; |
| | | } |
| | | |
| | | byte[] bs = new byte[15] ; |
| | | byte[] bs = new byte[14] ; |
| | | int index = 0 ; |
| | | bs[index] = (byte)(Integer.parseInt(cvo.controllerType, 16)); |
| | | |
| | | index ++ ; |
| | | bs[index] = cvo.projectNo.byteValue() ; |
| | | |
| | | index ++ ; |
| | | bs[index] = cvo.ipChannel.byteValue() ; |
| | | |
| | | index ++ ; |
| | | String strTemp = "" + cvo.maxAmountYear ; |