定制版本逆变电源通讯程序[增加干节点状态读取和母联开关状态读取以及防雷显示]
V10.646 edit at date 2022-03-19 lijun
1.逆变有母联设备新增切换箱接触器正负极开关状态读取
2.新增主控与服务器时间超过1分钟自动将服务器时间同步给主控
3个文件已修改
22 ■■■■■ 已修改文件
BattMonitor_FBS9100S_Inverter/src/com/dev/btse/comm/FBS9100S_SocketClient2.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BattMonitor_FBS9100S_Inverter/src/com/dev/btse/data/FBS9100_DateTime.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BattMonitor_FBS9100S_Inverter/src/com/version_inf/version_inf.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BattMonitor_FBS9100S_Inverter/src/com/dev/btse/comm/FBS9100S_SocketClient2.java
@@ -7,6 +7,7 @@
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;
@@ -526,19 +527,20 @@
                        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)))) {
@@ -827,7 +829,7 @@
                    }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));
                }
                
                //=====================================================================//
@@ -898,7 +900,7 @@
                    }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;
BattMonitor_FBS9100S_Inverter/src/com/dev/btse/data/FBS9100_DateTime.java
@@ -42,6 +42,7 @@
        ByteBuffer bytebuffer = ByteBuffer.allocate(12);
        bytebuffer.order(ByteOrder.LITTLE_ENDIAN);
        Calendar cad = Calendar.getInstance();
        //cad.set(23, 5, 10);
        bytebuffer.put(FBS9100_ComBase.changeIntToByte(cad.get(Calendar.YEAR)%100));
        bytebuffer.put(FBS9100_ComBase.changeIntToByte(cad.get(Calendar.MONTH)+1));
        bytebuffer.put(FBS9100_ComBase.changeIntToByte(cad.get(Calendar.DAY_OF_MONTH)));
@@ -49,7 +50,7 @@
        bytebuffer.put(FBS9100_ComBase.changeIntToByte(cad.get(Calendar.MINUTE)));
        bytebuffer.put(FBS9100_ComBase.changeIntToByte(cad.get(Calendar.SECOND)));
        bytebuffer.flip();
        //System.out.println("设置时间:"+cad.get(Calendar.YEAR)+"-"+(cad.get(Calendar.MONTH)+1)+"-"+cad.get(Calendar.DAY_OF_MONTH)+" "+cad.get(Calendar.HOUR_OF_DAY)+":"+cad.get(Calendar.MINUTE)+":"+cad.get(Calendar.SECOND));
        return bytebuffer;
    }
    
BattMonitor_FBS9100S_Inverter/src/com/version_inf/version_inf.txt
@@ -1,5 +1,6 @@
V10.646 edit at date 2022-03-19 lijun
    1.逆变有母联设备新增切换箱接触器正负极开关状态读取
    2.新增主控与服务器时间超过1分钟自动将服务器时间同步给主控
V10.645 edit at date 2022-03-03 lijun
    1.修复远程升级BTS只能远程升级加密版本BTSbug