| | |
| | | * 解析报文 |
| | | */ |
| | | public UPWarnMsgUrgeTodoAck decode(WarnMsg warnMsg) { |
| | | byte[] data = warnMsg.getData(); |
| | | ByteBuf byteBuf = Unpooled.wrappedBuffer(data); |
| | | this.vehicleNo = warnMsg.getVehicleNo(); |
| | | this.vehicleColor = warnMsg.getVehicleColor(); |
| | | this.dataType = warnMsg.getDataType(); |
| | | this.dataLength = warnMsg.getDataLength(); |
| | | |
| | | //报警督办ID |
| | | this.supervisionId = byteBuf.readInt(); |
| | | //报警处理结果 |
| | | this.result = byteBuf.readByte(); |
| | | try { |
| | | byte[] data = warnMsg.getData(); |
| | | ByteBuf byteBuf = Unpooled.wrappedBuffer(data); |
| | | this.vehicleNo = warnMsg.getVehicleNo(); |
| | | this.vehicleColor = warnMsg.getVehicleColor(); |
| | | this.dataType = warnMsg.getDataType(); |
| | | this.dataLength = warnMsg.getDataLength(); |
| | | |
| | | //报警督办ID |
| | | this.supervisionId = byteBuf.readInt(); |
| | | //报警处理结果 |
| | | this.result = byteBuf.readByte(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | return this; |
| | | } |
| | | } |