| | |
| | | {
|
| | | int errcode = m_FBS_Cmd.RecState;
|
| | | if(errcode > 0) {
|
| | | logger.error(this.getName(), "FGCD_Cmd.CMD:"+m_FBS_Cmd.CMD+"\t RTN:"+errcode);
|
| | | logger.error(this.getName()+"DevId:"+m_StatAndParam.dev_id+"\tFGCD_Cmd.CMD:"+m_FBS_Cmd.CMD+"\t RTN:"+errcode);
|
| | | }
|
| | | sysState.dev_captest_stop_type = m_FBS_Cmd.Alarm;
|
| | | //sysState.dev_workstate = 2;
|
| | |
| | | }else if(FGCD_ComBase.CMD_SETNOWWORKBATT == m_FBS_Cmd.CMD) {
|
| | | if(FGCD_ComBase.RETURN_SUCCESS == m_FBS_Cmd.RecState) {
|
| | | m_StatAndParam.op_cmd_ack = FGCD_ComBase.CMD_SetNowBatt_ACK;
|
| | | if(FGCD_ComBase.CMD_ForceSwitchBatt == m_FBS_Cmd.RecState) {
|
| | | m_StatAndParam.op_cmd_ack = FGCD_ComBase.CMD_ForceSetNowBatt_ACK;
|
| | | }
|
| | | logger.debug("dev_id:"+m_StatAndParam.dev_id+"\t 设置电池组号" + testParam.groupCount + "成功");
|
| | |
|
| | | FGCD_SocketClient_Thread_SQL.updateFbs9100SetParamCmdAckBydev_id(m_ConnPool,m_StatAndParam);
|
| | | isSuccess = true;
|
| | | logger.debug("dev_id:"+m_StatAndParam.dev_id+"\t 设置电池组号" + testParam.groupCount + "成功");
|
| | | }else if(FGCD_ComBase.CMD_ForceSwitchBatt == m_FBS_Cmd.RecState) {
|
| | | m_StatAndParam.op_cmd_ack = FGCD_ComBase.CMD_ForceSetNowBatt_ACK;
|
| | | logger.debug("dev_id:"+m_StatAndParam.dev_id+"\t 强制切换电池组号" + testParam.groupCount + "成功");
|
| | | FGCD_SocketClient_Thread_SQL.updateFbs9100SetParamCmdAckBydev_id(m_ConnPool,m_StatAndParam);
|
| | | isSuccess = true;
|
| | | }
|
| | | }else if(FGCD_ComBase.CMD_STARTSHOWPIC == m_FBS_Cmd.CMD) {
|
| | | if(FGCD_ComBase.RETURN_SUCCESS == m_FBS_Cmd.RecState) {
|
| | |
| | | + "a059_group_vol2=" + String.format("%1.2f", m_pm.onlineInfo.batt2_vol) + ", " //电池组2组端电压
|
| | | + "a059_group_curr1=" + String.format("%1.2f", m_pm.sysState.getNowCurr(m_pm.onlineInfo.currBattNum, 1)) + ", " //电池组1组端电流
|
| | | + "a059_group_curr2=" + String.format("%1.2f", m_pm.sysState.getNowCurr(m_pm.onlineInfo.currBattNum, 2)) + ", " //电池组2组端电流
|
| | | + "a059_onlineSaveVol=" + String.format("%1.2f", m_pm.onlineInfo.onlineSaveVol) + "," //切换电池组保护电压
|
| | | + "a059_acvolLowFlag=" + String.format("%d", m_pm.onlineInfo.acvolLowFlag); //切换电池组保护电压
|
| | | + "a059_onlineSaveVol=" + String.format("%1.2f", m_pm.onlineInfo.onlineSaveVol) + "," //切换电池组保护电压
|
| | | + "a059_acvolLowFlag=" + String.format("%d", m_pm.onlineInfo.acvolLowFlag) + "," //市电中断状态
|
| | | + "a059_switchVolMin=" + String.format("%1.2f", m_pm.onlineInfo.switchVolMin) + "," //回切组端电压范围低
|
| | | + "a059_switchVolMax=" + String.format("%1.2f", m_pm.onlineInfo.switchVolMax); //回切组端电压范围高
|
| | |
|
| | | String sql_str_update = "UPDATE " + sql_str_base + " WHERE dev_id=" + m_pm.dev_id;
|
| | | sql.sqlMysqlExecute(sql_str_update);
|
| | |
| | | }
|
| | | m_pm.onlineInfo.onlineSaveVol = res.getFloat("a059_onlineSaveVol"); //切换电池组保护电压
|
| | | m_pm.onlineInfo.acvolLowFlag = res.getInt("a059_acvolLowFlag"); //市电中断状态
|
| | | |
| | | m_pm.onlineInfo.switchVolMin = res.getInt("a059_switchVolMin"); //回切组端电压范围低
|
| | | m_pm.onlineInfo.switchVolMax = res.getInt("a059_switchVolMax"); //回切组端电压范围高
|
| | | }
|
| | |
|
| | |
|
| | |
| | |
|
| | | public float onlineSaveVol; //切换电池组保护电压
|
| | |
|
| | | public int backup2[] = new int[8];
|
| | | public float switchVolMin; //回切组端电压安全范围低
|
| | | public float switchVolMax; //回切组端电压安全范围高
|
| | |
|
| | |
|
| | | public boolean putByteBuffer(ByteBuffer bf) {
|
| | |
| | | onlineSaveVol = bf.getFloat();
|
| | | //System.out.println("onlineSaveVol:"+onlineSaveVol);
|
| | |
|
| | | for(int i = 0 ; i < backup2.length ; i++) {
|
| | | backup2[i] = FGCD_ComBase.changeByteToInt(bf.get());
|
| | | }
|
| | | switchVolMin = bf.getFloat(); //组端电压安全范围低
|
| | | switchVolMax = bf.getFloat(); //组端电压安全范围高
|
| | | |
| | | // for(int i = 0 ; i < backup2.length ; i++) {
|
| | | // backup2[i] = FGCD_ComBase.changeByteToInt(bf.get());
|
| | | // }
|
| | | return true;
|
| | | }
|
| | |
|
| | |
| | | public String toString() {
|
| | | return "FGCD_OnlineInfo [BYTE_LEN=" + BYTE_LEN + ", batt1_vol=" + batt1_vol + ", batt2_vol=" + batt2_vol
|
| | | + ", currBattNum=" + currBattNum + ", endoscopeState=" + endoscopeState + ", acvolLowFlag="
|
| | | + acvolLowFlag + ",acvolLowBoxCnt=" + acvolLowBoxCnt + ", onlineSaveVol=" + onlineSaveVol + ", backup2="
|
| | | + Arrays.toString(backup2) + "]";
|
| | | + acvolLowFlag + ",acvolLowBoxCnt=" + acvolLowBoxCnt + ", onlineSaveVol=" + onlineSaveVol + ", switchVolMin="
|
| | | + switchVolMin + ",switchVolMax = " + switchVolMax + "]";
|
| | | }
|
| | | |
| | | |
| | | |
| | | |
| | | }
|