| | |
| | | |
| | | public enum FireDataType { |
| | | |
| | | HEARTBEAT(0x30, 0x30, "心跳信息"), |
| | | HEARTBEAT(0x36, 0x39, "心跳信息"), |
| | | |
| | | FIRE_ALARM(0x38, 0x30, "火警"), |
| | | |
| | |
| | | // System.out.println(byteBuf.refCnt()); |
| | | this.no = analyze(new byte[]{bytes[3], bytes[4]}); |
| | | this.loop = analyze(new byte[]{bytes[5], bytes[6]}); |
| | | this.partNo = analyze(new byte[]{bytes[7], bytes[8]}); |
| | | this.partNo = analyze(new byte[]{bytes[7], bytes[8]}); //0100201 对应 30 31 0200201 对应 34 35 |
| | | this.year = analyze(new byte[]{bytes[11], bytes[12]}); |
| | | this.month = analyze(new byte[]{bytes[13], bytes[14]}); |
| | | this.day = analyze(new byte[]{bytes[15], bytes[16]}); |
| | |
| | | break; |
| | | case FIRE_ALARM: |
| | | //消防IO点编号 |
| | | String fireNo = fire3030.getNo().toString() + fire3030.getLoop().toString() + fire3030.getPartNo().toString(); |
| | | // String fireNo = fire3030.getNo().toString() + fire3030.getLoop().toString() + fire3030.getPartNo().toString(); |
| | | String fireNo =fire3030.getPartNo().toString(); //0100201 对应 30 31 0200201 对应 34 35 |
| | | String fireTime = "20" + fire3030.getYear() + "-" + fire3030.getMonth() + "-" + fire3030.getDay() |
| | | + " " + fire3030.getHour() + ":" + fire3030.getMinute() + ":" + fire3030.getSeconds(); |
| | | Date dt = DateUtils.convert(fireTime); |