4 * Created on: Oct 20, 2010
14 #include "W1Scanner.hh"
19 int main(int argc, char** argv) {
21 list<W1Device *> device_list;
30 log_info("storage location: %s\n", location.c_str());
33 log_warning("storage location was not given as a parameter, using default location: %s\n", location.c_str());
35 W1Store::set_location(location.c_str());
36 interval_seconds = 600;
38 scanner = new W1Scanner();
39 device_list = scanner->get_device_list();
41 if (device_list.size() > 0) {
44 for(list<W1Device *>::iterator list_iter = device_list.begin(); list_iter != device_list.end(); list_iter++)
46 W1Device *device = (W1Device *)*list_iter;
50 if (round >= store_interval) {
54 sleep(interval_seconds);
55 if (round >= store_interval) {
61 log_debug("could not find 1-wire devices.\n");