| | |
| | | |
| | | import com.dy.common.mw.protocol.*; |
| | | import com.dy.common.mw.protocol.p206V202404.*; |
| | | import com.dy.common.mw.protocol.p206V202404.upVos.DataCd86Vo; |
| | | import com.dy.common.mw.protocol.p206V202404.upVos.DataCd87Vo; |
| | | import com.dy.common.util.ByteUtil; |
| | | import com.dy.common.util.ByteUtilUnsigned; |
| | |
| | | */ |
| | | protected void doParse(byte[] bs, int bsLen, String dataCode, Data data) throws Exception { |
| | | DataV202404 dV1 = (DataV202404)data.getSubData() ; |
| | | DataCd87Vo cdData = new DataCd87Vo() ; |
| | | DataCd87Vo cdData = new DataCd87Vo(CodeV202404.getCodeName(dataCode)) ; |
| | | dV1.subData = cdData ; |
| | | int index = ProtocolConstantV206V202404.dataIndex ; |
| | | cdData.controllerType = ByteUtil.bytes2Hex(bs, false, index, 1) ; |
| | |
| | | short portLen = ByteUtilUnsigned.byte2Byte(bs, index) ; |
| | | |
| | | index++ ; |
| | | cdData.domain = ByteUtil.bytes2String_LE(bs, index, index + domainLen - 1) ; |
| | | cdData.domain = ByteUtil.bytes2String_BE(bs, index, index + domainLen - 1) ; |
| | | |
| | | index += domainLen ; |
| | | cdData.port = Integer.parseInt(ByteUtil.bytes2String_LE(bs, index, index + portLen - 1)) ; |
| | | cdData.port = Integer.parseInt(ByteUtil.bytes2String_BE(bs, index, index + portLen - 1)) ; |
| | | } |
| | | |
| | | } |