|  |  |  | 
|---|
|  |  |  | return bsHead ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 0xf0阀门 0x00水泵 | 
|---|
|  |  |  | * @param controllerTypeByHex | 
|---|
|  |  |  | * @param bs | 
|---|
|  |  |  | * @param index | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public static void createValveOrPump(String controllerTypeByHex, byte[] bs, int index){ | 
|---|
|  |  |  | if(controllerTypeByHex != null && controllerTypeByHex.equals("57")){ | 
|---|
|  |  |  | bs[index] = (byte)0x00 ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | bs[index] = (byte)0xF0 ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 生成控制器地址 | 
|---|
|  |  |  | * 6字节BCD码(12位行政区划) + 2字节HEX | 
|---|
|  |  |  | 
|---|
|  |  |  | byte[] crcBs = new byte[4] ; | 
|---|
|  |  |  | ByteUtil.int2Bytes_BE(crcBs, crc, 0); | 
|---|
|  |  |  | byte[] bytes = new byte[ProtocolConstantV206V202404.UG_lenTail] ; | 
|---|
|  |  |  | bytes[0] = crcBs[3] ; | 
|---|
|  |  |  | bytes[1] = crcBs[4] ; | 
|---|
|  |  |  | bytes[0] = crcBs[2] ; | 
|---|
|  |  |  | bytes[1] = crcBs[3] ; | 
|---|
|  |  |  | bytes[2] = ProtocolConstantV206V202404.P_Tail_Byte ; | 
|---|
|  |  |  | return bytes ; | 
|---|
|  |  |  | } | 
|---|