-static void apc_write_percent (char *host, char *inst, char *val)
-{
- rrd_update_file (host, load_file_template, val, load_ds_def, load_ds_num);
-}
-
-static void apc_write_timeleft (char *host, char *inst, char *val)
-{
- rrd_update_file (host, time_file_template, val, time_ds_def, time_ds_num);
-}
-
-static void apc_write_temperature (char *host, char *inst, char *val)
-{
- rrd_update_file (host, temp_file_template, val, temp_ds_def, temp_ds_num);
-}
-
-static void apc_write_frequency (char *host, char *inst, char *val)
-{
-<<<<<<< .mine
- struct apc_detail_s apcups_detail;
-
- apcups_detail.linev = 0.0;
- apcups_detail.loadpct = 0.0;
- apcups_detail.bcharge = 0.0;
- apcups_detail.timeleft = 0.0;
- apcups_detail.outputv = 0.0;
- apcups_detail.itemp = 0.0;
- apcups_detail.battv = 0.0;
- apcups_detail.linefreq = 0.0;
- apcups_detail.connected = 0;
-=======
- char file[512];
- int status;
->>>>>>> .r743
-
-<<<<<<< .mine
-
- if (!*host || strcmp(host, "0.0.0.0") == 0)
- host = "localhost";
-
- if(do_apc_status(host, port, &apcups_detail) < 0) return;
-
- /*
- * if we did not connect then do not bother submitting
- * zeros. We want rrd files to have NAN.
- */
- if(!apcups_detail.connected) return;
-=======
- status = snprintf (file, 512, freq_file_template, inst);
- if ((status < 1) || (status >= 512))
- return;
->>>>>>> .r743
-
-<<<<<<< .mine
- apcups_submit (host, &apcups_detail);
- apc_bvolt_submit (host, &apcups_detail);
- apc_load_submit (host, &apcups_detail);
- apc_charge_submit (host, &apcups_detail);
- apc_temp_submit (host, &apcups_detail);
- apc_time_submit (host, &apcups_detail);
- apc_freq_submit (host, &apcups_detail);
-=======
- rrd_update_file (host, file, val, freq_ds_def, freq_ds_num);
->>>>>>> .r743
-}
-
-static void apc_submit_generic (char *type, char *inst,
- double value)
-{
-<<<<<<< .mine
- char file[512];
- int status;
-
- status = snprintf (file, 512, volt_file_template, inst);
- if (status < 1)
- return;
- else if (status >= 512)
- return;
-
- rrd_update_file (host, file, val, volt_ds_def, volt_ds_num);
-}
-=======
- char buf[512];
- int status;
->>>>>>> .r743
-
-<<<<<<< .mine
-static void apc_bvolt_write (char *host, char *inst, char *val)
-{
- char file[512];
- int status;
-
- status = snprintf (file, 512, bvolt_file_template, inst);
- if (status < 1)
- return;
- else if (status >= 512)
- return;
-
- rrd_update_file (host, file, val, bvolt_ds_def, bvolt_ds_num);
-}
-=======
- status = snprintf (buf, 512, "%u:%f",
- (unsigned int) curtime, value);
- if ((status < 1) || (status >= 512))
- return;
->>>>>>> .r743
-
-<<<<<<< .mine
-static void apc_load_write (char *host, char *inst, char *val)
-{
- char file[512];
- int status;
-
- status = snprintf (file, 512, load_file_template, inst);
- if (status < 1)
- return;
- else if (status >= 512)
- return;
-
- rrd_update_file (host, file, val, load_ds_def, load_ds_num);
-=======
- plugin_submit (type, inst, buf);
->>>>>>> .r743