|
|
@@ -2513,7 +2513,7 @@ static int proc_power(char *path, int op, GlobalPowerManger *power)
|
|
|
r = ini_rw(dic, token, &tmp->product_ch_addr, sizeof(tmp->product_ch_addr), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
sprintf(token, "power:channel%d.name",tmp->product_ch_id);
|
|
|
- r = ini_rw(dic, token, tmp->product_ch_name, sizeof(tmp->product_ch_name), TYPE_INT, op, 1); if(r) break;
|
|
|
+ r = ini_rw(dic, token, tmp->product_ch_name, sizeof(tmp->product_ch_name), TYPE_STR, op, 1); if(r) break;
|
|
|
|
|
|
sprintf(token, "power:channel%d.type",tmp->product_ch_id);
|
|
|
r = ini_rw(dic, token, &tmp->product_ch_type, sizeof(tmp->product_ch_type), TYPE_INT, op, 1); if(r) break;
|
|
|
@@ -2649,7 +2649,7 @@ static int proc_power(char *path, int op, GlobalPowerManger *power)
|
|
|
r = ini_rw(dic, token, &tmp->product_ch_addr, sizeof(tmp->product_ch_addr), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
sprintf(token, "power:channel%d.name",tmp->product_ch_id);
|
|
|
- r = ini_rw(dic, token, tmp->product_ch_name, sizeof(tmp->product_ch_name), TYPE_INT, op, 1); if(r) break;
|
|
|
+ r = ini_rw(dic, token, tmp->product_ch_name, sizeof(tmp->product_ch_name), TYPE_STR, op, 1); if(r) break;
|
|
|
|
|
|
sprintf(token, "power:channel%d.type",tmp->product_ch_id);
|
|
|
r = ini_rw(dic, token, &tmp->product_ch_type, sizeof(tmp->product_ch_type), TYPE_INT, op, 1); if(r) break;
|
|
|
@@ -2763,7 +2763,7 @@ static int proc_power3(char *path, int op, GlobalTreeACManager *power)
|
|
|
case PARAS_CHECK:
|
|
|
{
|
|
|
if(ppower->product_ch_addr<0) {
|
|
|
- LOGE("___ check power, product_ch_addr %d is invalid, must greater than 0\n", ppower->product_ch_addr);
|
|
|
+ LOGE("___ check power3, product_ch_addr %d is invalid, must greater than 0\n", ppower->product_ch_addr);
|
|
|
r = -1;
|
|
|
}
|
|
|
return r;
|
|
|
@@ -2778,7 +2778,7 @@ static int proc_power3(char *path, int op, GlobalTreeACManager *power)
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
- fprintf(fp, "[power]\n");
|
|
|
+ fprintf(fp, "[power3]\n");
|
|
|
fprintf(fp, "\n");
|
|
|
fclose(fp);
|
|
|
return 0;
|
|
|
@@ -2798,91 +2798,91 @@ static int proc_power3(char *path, int op, GlobalTreeACManager *power)
|
|
|
for(i=1; i<=dm->brdMax*3; i++) {
|
|
|
int channelID = i;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.addr",i);
|
|
|
+ sprintf(token, "power3:channel%d.addr",i);
|
|
|
r = ini_rw(dic, token, &tmp->product_saddr, sizeof(tmp->product_saddr), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
tmp->product_ph_id = channelID-1;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.ch_addr",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.ch_addr",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_ch_addr, sizeof(tmp->product_ch_addr), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.ch_id",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.ch_id",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_ch_id, sizeof(tmp->product_ch_id), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.ph_type",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.ph_type",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_ph_type, sizeof(tmp->product_ph_type), TYPE_INT, op, 1); if(r) break;
|
|
|
/*
|
|
|
- sprintf(token, "power:channel%d.ph_otype",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.ph_otype",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_ph_outputType, sizeof(tmp->product_ph_outputType), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.ph_ostat",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.ph_ostat",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_ph_outputStatus, sizeof(tmp->product_ph_outputStatus), TYPE_INT, op, 1); if(r) break;
|
|
|
*/
|
|
|
///////////voltage//////////
|
|
|
GlobalOverManager *pover=&tmp->global_over_manager;
|
|
|
//upper
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.up.en",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.up.en",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_upper_enable, sizeof(pover->product_vol_upper_enable), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.up.val",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.up.val",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_upper_threshold, sizeof(pover->product_vol_upper_threshold), TYPE_FLOAT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.up.act",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.up.act",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_over_upper_threshold_ctrl, sizeof(pover->product_vol_over_upper_threshold_ctrl), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.up.para",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.up.para",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_over_upper_threshold_ctrl_para, sizeof(pover->product_vol_over_upper_threshold_ctrl_para), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
//lower
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.lo.en",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.lo.en",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_lower_enable, sizeof(pover->product_vol_lower_enable), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.lo.val",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.lo.val",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_lower_threshold, sizeof(pover->product_vol_lower_threshold), TYPE_FLOAT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.lo.act",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.lo.act",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_over_lower_threshold_ctrl, sizeof(pover->product_vol_over_lower_threshold_ctrl), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.lo.para",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.lo.para",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_over_lower_threshold_ctrl_para, sizeof(pover->product_vol_over_lower_threshold_ctrl_para), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
///////////current//////////
|
|
|
- sprintf(token, "power:channel%d.threshold.current.up.en",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.current.up.en",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_cur_upper_enable, sizeof(pover->product_cur_upper_enable), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.current.up.val",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.current.up.val",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_cur_upper_threshold, sizeof(pover->product_cur_upper_threshold), TYPE_FLOAT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.current.up.act",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.current.up.act",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_cur_over_upper_threshold_ctrl, sizeof(pover->product_cur_over_upper_threshold_ctrl), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.current.up.para",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.current.up.para",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_cur_over_upper_threshold_ctrl_para, sizeof(pover->product_cur_over_upper_threshold_ctrl_para), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
///////////power//////////
|
|
|
- sprintf(token, "power:channel%d.threshold.power.up.en",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.power.up.en",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwr_upper_enable, sizeof(pover->product_pwr_upper_enable), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.power.up.val",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.power.up.val",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwr_upper_threshold, sizeof(pover->product_pwr_upper_threshold), TYPE_FLOAT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.power.up.act",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.power.up.act",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwr_over_upper_threshold_ctrl, sizeof(pover->product_pwr_over_upper_threshold_ctrl), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.power.up.para",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.power.up.para",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwr_over_upper_threshold_ctrl_para, sizeof(pover->product_pwr_over_upper_threshold_ctrl_para), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
///////////power consumption//////////
|
|
|
- sprintf(token, "power:channel%d.threshold.powerc.up.en",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.powerc.up.en",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwrcon_upper_enable, sizeof(pover->product_pwrcon_upper_enable), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.powerc.up.val",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.powerc.up.val",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwrcon_upper_threshold, sizeof(pover->product_pwrcon_upper_threshold), TYPE_FLOAT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.powerc.up.act",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.powerc.up.act",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwrcon_over_upper_threshold_ctrl, sizeof(pover->product_pwrcon_over_upper_threshold_ctrl), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.powerc.up.para",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.powerc.up.para",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwrcon_over_upper_threshold_ctrl_para, sizeof(pover->product_pwrcon_over_upper_threshold_ctrl_para), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
if(chk_ok==0) {
|
|
|
@@ -2897,8 +2897,6 @@ static int proc_power3(char *path, int op, GlobalTreeACManager *power)
|
|
|
r = get_power(tmp->product_ch_id, &pwr); if(r) break;
|
|
|
|
|
|
pwr.global_over_manager = tmp->global_over_manager;
|
|
|
- r = dev_update_power_manage_over_info(dm->db, 0, pwr.product_ch_id, &pwr); if(r) break;
|
|
|
-
|
|
|
r = dev_update_t_ac_power_manage_over_info(dm->db, tmp); if(r) break;
|
|
|
|
|
|
r = g_switch_set_all_single_threshold(&dm->_globalRelaySampManger,
|
|
|
@@ -2942,92 +2940,92 @@ static int proc_power3(char *path, int op, GlobalTreeACManager *power)
|
|
|
|
|
|
r = proc_power3(path, PARAS_CHECK, tmp); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.addr",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.addr",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_saddr, sizeof(tmp->product_saddr), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.ch_id",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.ch_id",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_ch_id, sizeof(tmp->product_ch_id), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.ch_addr",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.ch_addr",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_ch_addr, sizeof(tmp->product_ch_addr), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- //sprintf(token, "power:channel%d.ph_id",channelID);
|
|
|
+ //sprintf(token, "power3:channel%d.ph_id",channelID);
|
|
|
//r = ini_rw(dic, token, &tmp->product_ph_id, sizeof(tmp->product_ph_id), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.ph_type",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.ph_type",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_ph_type, sizeof(tmp->product_ph_type), TYPE_INT, op, 1); if(r) break;
|
|
|
/*
|
|
|
- sprintf(token, "power:channel%d.ph_otype",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.ph_otype",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_ph_outputType, sizeof(tmp->product_ph_outputType), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.ph_ostat",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.ph_ostat",channelID);
|
|
|
r = ini_rw(dic, token, &tmp->product_ph_outputStatus, sizeof(tmp->product_ph_outputStatus), TYPE_INT, op, 1); if(r) break;
|
|
|
*/
|
|
|
///////////voltage//////////
|
|
|
GlobalOverManager *pover=&tmp->global_over_manager;
|
|
|
//upper
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.up.en",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.up.en",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_upper_enable, sizeof(pover->product_vol_upper_enable), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.up.val",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.up.val",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_upper_threshold, sizeof(pover->product_vol_upper_threshold), TYPE_FLOAT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.up.act",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.up.act",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_over_upper_threshold_ctrl, sizeof(pover->product_vol_over_upper_threshold_ctrl), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.up.para",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.up.para",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_over_upper_threshold_ctrl_para, sizeof(pover->product_vol_over_upper_threshold_ctrl_para), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
//lower
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.lo.en",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.lo.en",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_lower_enable, sizeof(pover->product_vol_lower_enable), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.lo.val",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.lo.val",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_lower_threshold, sizeof(pover->product_vol_lower_threshold), TYPE_FLOAT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.lo.act",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.lo.act",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_over_lower_threshold_ctrl, sizeof(pover->product_vol_over_lower_threshold_ctrl), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.voltage.lo.para",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.voltage.lo.para",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_vol_over_lower_threshold_ctrl_para, sizeof(pover->product_vol_over_lower_threshold_ctrl_para), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
///////////current//////////
|
|
|
- sprintf(token, "power:channel%d.threshold.current.up.en",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.current.up.en",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_cur_upper_enable, sizeof(pover->product_cur_upper_enable), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.current.up.val",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.current.up.val",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_cur_upper_threshold, sizeof(pover->product_cur_upper_threshold), TYPE_FLOAT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.current.up.act",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.current.up.act",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_cur_over_upper_threshold_ctrl, sizeof(pover->product_cur_over_upper_threshold_ctrl), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.current.up.para",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.current.up.para",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_cur_over_upper_threshold_ctrl_para, sizeof(pover->product_cur_over_upper_threshold_ctrl_para), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
///////////power//////////
|
|
|
- sprintf(token, "power:channel%d.threshold.power.up.en",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.power.up.en",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwr_upper_enable, sizeof(pover->product_pwr_upper_enable), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.power.up.val",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.power.up.val",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwr_upper_threshold, sizeof(pover->product_pwr_upper_threshold), TYPE_FLOAT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.power.up.act",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.power.up.act",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwr_over_upper_threshold_ctrl, sizeof(pover->product_pwr_over_upper_threshold_ctrl), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.power.up.para",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.power.up.para",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwr_over_upper_threshold_ctrl_para, sizeof(pover->product_pwr_over_upper_threshold_ctrl_para), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
///////////power consumption//////////
|
|
|
- sprintf(token, "power:channel%d.threshold.powerc.up.en",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.powerc.up.en",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwrcon_upper_enable, sizeof(pover->product_pwrcon_upper_enable), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.powerc.up.val",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.powerc.up.val",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwrcon_upper_threshold, sizeof(pover->product_pwrcon_upper_threshold), TYPE_FLOAT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.powerc.up.act",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.powerc.up.act",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwrcon_over_upper_threshold_ctrl, sizeof(pover->product_pwrcon_over_upper_threshold_ctrl), TYPE_INT, op, 1); if(r) break;
|
|
|
|
|
|
- sprintf(token, "power:channel%d.threshold.powerc.up.para",channelID);
|
|
|
+ sprintf(token, "power3:channel%d.threshold.powerc.up.para",channelID);
|
|
|
r = ini_rw(dic, token, &pover->product_pwrcon_over_upper_threshold_ctrl_para, sizeof(pover->product_pwrcon_over_upper_threshold_ctrl_para), TYPE_INT, op, 1); if(r) break;
|
|
|
cnt++;
|
|
|
}
|
|
|
@@ -3509,25 +3507,17 @@ int paras_alarm_xport(char *path, int io)
|
|
|
int r=-1,pwr3;
|
|
|
char temp[100];
|
|
|
|
|
|
- pwr3 = is_power3();
|
|
|
+ //pwr3 = is_power3();
|
|
|
if(io==PARAS_IMPORT) {
|
|
|
- if(pwr3) {
|
|
|
- r = proc_power3(path, PARAS_READ, NULL);
|
|
|
- }
|
|
|
- else {
|
|
|
- r = proc_power(path, PARAS_READ, NULL);
|
|
|
- }
|
|
|
+ r = proc_power(path, PARAS_READ, NULL);
|
|
|
+ r = proc_power3(path, PARAS_READ, NULL);
|
|
|
}
|
|
|
else if(io==PARAS_EXPORT) {
|
|
|
get_curtime_str(temp,sizeof(temp));
|
|
|
sprintf(path, "/tmp/power_%s.ini", temp);
|
|
|
|
|
|
- if(pwr3) {
|
|
|
- r = proc_power3(path, PARAS_WRITE, NULL);
|
|
|
- }
|
|
|
- else {
|
|
|
- r = proc_power(path, PARAS_WRITE, NULL);
|
|
|
- }
|
|
|
+ r = proc_power(path, PARAS_WRITE, NULL);
|
|
|
+ r = proc_power3(path, PARAS_WRITE, NULL);
|
|
|
}
|
|
|
|
|
|
return r;
|