|  |  |  | 
|---|
|  |  |  | import com.dy.common.mw.protocol.*; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.p206V1_0_0.*; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.p206V1_0_0.parse.global.GlParse; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd81Vo; | 
|---|
|  |  |  | import com.dy.common.util.ByteUtil; | 
|---|
|  |  |  | import org.apache.logging.log4j.LogManager; | 
|---|
|  |  |  | import org.apache.logging.log4j.Logger; | 
|---|
|  |  |  | 
|---|
|  |  |  | protected void doParse(byte[] bs, int bsLen, String dataCode, Data data) throws Exception { | 
|---|
|  |  |  | DataV1_0_1 dV1 = (DataV1_0_1)data.getSubData() ; | 
|---|
|  |  |  | DataCd81Vo cdData = new DataCd81Vo() ; | 
|---|
|  |  |  | dV1.dataCd81Vo = cdData ; | 
|---|
|  |  |  | dV1.subData = cdData ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | short index = ProtocolConstantV206V1_0_0.dataIndex ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //报警数据 | 
|---|
|  |  |  | cdData.alarmVo = GlParse.parseAlarm(bs, index) ; | 
|---|
|  |  |  | index += 2 ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(bs.length == 28){ | 
|---|
|  |  |  | //带瞬时流量 | 
|---|
|  |  |  | index += 5 ;//瞬时流量 | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //状态数据 | 
|---|
|  |  |  | cdData.stateVo = GlParse.parseState(bs, index) ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | index += 2 ; | 
|---|
|  |  |  | //控制器时钟 | 
|---|
|  |  |  | cdData.rtuDt = GlParse.parseTp(bs, index) ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|