#include <plp/log.h>
-#include "W1Store.hh"
+#include "DeviceConfig.hh"
#include "W1Scanner.hh"
using namespace w1;
long scan_interval;
long store_interval;
string location;
- bool err_flg;
W1Device *device;
// default values than can be overwritten with parameters
if (argc > 3) {
try_parse_long(argv[3], &store_interval);
}
- log_info("start scanning, data saved to location: %s, scan interval: %d, store interval: %d\n", location.c_str(), scan_interval, store_interval);
- W1Store::set_base_dir_name(location);
+ log_info("start scanning, data saved to location: %s, scan interval: %ld, store interval: %ld\n", location.c_str(), scan_interval, store_interval);
+ DeviceConfig::set_base_dir_name(location);
scanner = new W1Scanner();
device_list = scanner->get_device_list();
round = 0;
round++;
for(list<W1Device *>::iterator list_iter = device_list.begin(); list_iter != device_list.end(); list_iter++) {
device = (W1Device *)*list_iter;
-
device->printout();
sleep(1);
if (round >= store_interval) {