| | |
| | | this.hour = ComBase.changeByteToInt(bf.get()); |
| | | this.minute = ComBase.changeByteToInt(bf.get()); |
| | | this.second = ComBase.changeByteToInt(bf.get()); |
| | | System.out.println(year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second); |
| | | //System.out.println(year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second); |
| | | } |
| | | |
| | | public Date getFBODateTime() { |
| | | Calendar c = Calendar.getInstance(); |
| | | c.set(2000+year, month, day, hour, minute, second); |
| | | //System.out.println("测试开始时间"+Com.getDateTimeFormat(c.getTime(),Com.DTF_YMDhms)); |
| | | ////System.out.println("测试开始时间"+Com.getDateTimeFormat(c.getTime(),Com.DTF_YMDhms)); |
| | | return c.getTime(); |
| | | //return Com.get_DT_FromStr(year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second, Com.DTF_YMDhms); |
| | | } |
| | |
| | | |
| | | public void setDataInf(byte[] buf,FboDataHeadStop fboHeadStop) { |
| | | if(buf.length < BYTE_LEN) { |
| | | System.out.println("头部数据长度异常"); |
| | | //System.out.println("头部数据长度异常"); |
| | | return; |
| | | } |
| | | ByteBuffer bf = ByteBuffer.allocate(buf.length); |
| | |
| | | |
| | | private void checkBattBrand() { |
| | | byte[] batt_brand_tmp = new byte[batt_brand_len]; |
| | | System.arraycopy(this.batt_brand, 0, batt_brand_tmp, 0, batt_brand_tmp.length); |
| | | //System.arraycopy(this.batt_brand, 0, batt_brand_tmp, 0, batt_brand_tmp.length); |
| | | this.battBrandStr = new String(batt_brand_tmp); |
| | | |
| | | } |
| | |
| | | |
| | | public void checkBattName() { |
| | | byte[] batt = new byte[battname_len]; |
| | | System.arraycopy(this.battname, 0, batt, 0, batt.length); |
| | | //System.arraycopy(this.battname, 0, batt, 0, batt.length); |
| | | this.battNameStr = new String(batt); |
| | | } |
| | | |
| | | public void checkBattDate() { |
| | | byte[] date = new byte[batt_date_len]; |
| | | System.arraycopy(this.batt_date, 0, date, 0, date.length); |
| | | //System.arraycopy(this.batt_date, 0, date, 0, date.length); |
| | | this.batt_date_str = new String(date); |
| | | } |
| | | |