|  |  |  | 
|---|
|  |  |  | protected static byte[] creatHead4Upgrade(String rtuAddr, String preCode, String sufCode)throws Exception { | 
|---|
|  |  |  | byte[] bsHead = new byte[12] ; | 
|---|
|  |  |  | byte index = 0 ; | 
|---|
|  |  |  | bsHead[index] = ProtocolConstantV206V1.P_Head_Byte ; | 
|---|
|  |  |  | bsHead[index] = ProtocolConstantV206V1.UG_P_Head_Byte ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | index++ ; | 
|---|
|  |  |  | bsHead[index] = 0 ;//帧长度 | 
|---|
|  |  |  | 
|---|
|  |  |  | bsHead[index] = 0 ;//帧长度 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | index++ ; | 
|---|
|  |  |  | bsHead[index] = ProtocolConstantV206V1.P_Head_Byte ; | 
|---|
|  |  |  | bsHead[index] = ProtocolConstantV206V1.UG_P_Head_Byte ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | index++ ; | 
|---|
|  |  |  | bsHead[index] = ByteUtil.hex2Bytes(preCode)[0]; //功能码域 | 
|---|