|  |  | 
 |  |  | import com.dy.common.mw.protocol.p206V1_0_0.ProtocolConstantV206V1_0_0; | 
 |  |  | import com.dy.common.mw.protocol.p206V1_0_0.parse.global.GlCreate; | 
 |  |  | import com.dy.common.util.ByteUtil; | 
 |  |  | import com.dy.common.util.ByteUtilUnsigned; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @Author liurunyu | 
 |  |  | 
 |  |  |  | 
 |  |  |         ByteUtil.hex2Bytes(para.commandCode, bsHead, index) ; | 
 |  |  |  | 
 |  |  |         if(para.param == null){ | 
 |  |  |             throw new Exception("未提供命令参数数据,不能构造功能码为" + para.commandCode + "的下行命令") ; | 
 |  |  |         }else{ | 
 |  |  |             index = 0 ; | 
 |  |  |             byte[] bs = new byte[8] ; | 
 |  |  |             GlCreate.createPw(bs, index); | 
 |  |  |             index += 2 ; | 
 |  |  |             GlCreate.createTp(bs, index); | 
 |  |  |             bytes = ByteUtil.bytesMerge(bsHead, bs) ; | 
 |  |  |         } | 
 |  |  |         index = 0 ; | 
 |  |  |         byte[] bs = new byte[8] ; | 
 |  |  |         GlCreate.createPw(bs, index); | 
 |  |  |         index += 2 ; | 
 |  |  |         GlCreate.createTp(bs, index); | 
 |  |  |         bytes = ByteUtil.bytesMerge(bsHead, bs) ; | 
 |  |  |  | 
 |  |  |         GlCreate.createLen(bytes);//长度放字节数组中 | 
 |  |  |  |