| | |
| | | import java.nio.ByteBuffer;
|
| | | import java.nio.ByteOrder;
|
| | | import java.nio.charset.Charset;
|
| | | import java.util.Calendar;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.apache.logging.log4j.Level;
|
| | |
| | | ForceReadVidData = false;
|
| | | }
|
| | |
|
| | | /*
|
| | | |
| | | if(this.getBTSSoftwareVersion() >= 37) {
|
| | | Calendar cad = Calendar.getInstance();
|
| | | long t_pc = cad.getTimeInMillis()/1000;
|
| | | long t_dev = m_StatAndParam.m_FBS_VCData.m_SysState.DTime.getTimeInMillis()/1000;
|
| | | |
| | | if(Math.abs(t_pc - t_dev) > 30) {
|
| | | long t_dev = m_StatAndParam.m_SysState.DTime.getTimeInMillis()/1000;
|
| | | //System.err.println("系统时间"+Com.getDateTimeFormat(cad.getTime(), Com.DTF_YMDhms));
|
| | | //System.err.println("设备时间"+Com.getDateTimeFormat(new Date(m_StatAndParam.m_SysState.DTime.getTimeInMillis()), Com.DTF_YMDhms));
|
| | | if(Math.abs(t_pc - t_dev) >= 60) {
|
| | | sleep(500);
|
| | | SocketComm(FBS9100_ComBase.CMD_SetDateTime,
|
| | | m_StatAndParam.m_FBS_VCData.m_SysState.getDateTimeByteBuffer(), socket);
|
| | | m_StatAndParam.m_SysState.getDateTimeByteBuffer(), socket);
|
| | | }
|
| | | }
|
| | | */
|
| | | |
| | | } else {
|
| | | if(DevReadCount_Rate > 1) {
|
| | | if(0 == (DevReadCount%(5*(DevReadCount_Rate/10+1)))) {
|
| | |
| | | }else {
|
| | | cipher_tx_t = plain_tx_t;
|
| | | }
|
| | | System.out.println("发送数据:"+ComFn.bytesToHexString(plain_tx_t, plain_tx_t.length));
|
| | | //System.out.println("发送数据:"+ComFn.bytesToHexString(plain_tx_t, plain_tx_t.length));
|
| | | }
|
| | |
|
| | | //=====================================================================//
|
| | |
| | | }else {
|
| | | plain_buf = cipher_buf;
|
| | | }
|
| | | System.out.println("接收数据:"+ComFn.bytesToHexString(plain_buf,plain_buf.length));
|
| | | //System.out.println("接收数据:"+ComFn.bytesToHexString(plain_buf,plain_buf.length));
|
| | | if((cipher_buf.length > 8) && (true == getDataFromCommBuf(plain_buf))) {
|
| | | m_StatAndParam.m_SysState.setCommCountInc();
|
| | | rx_errcount_for_live_of_thread = 0;
|