4 * Created on: Oct 20, 2010
13 #include "W1Scanner.hh"
18 int main(int argc, char** argv)
21 list<W1Device *> device_list;
26 interval_seconds = 60;
28 scanner = new W1Scanner();
29 device_list = scanner->get_device_list();
31 if (device_list.size() > 0) {
34 for(list<W1Device *>::iterator list_iter = device_list.begin(); list_iter != device_list.end(); list_iter++)
36 W1Device *device = (W1Device *)*list_iter;
38 string name = device->get_name();
39 string value = device->get_value();
40 string unit = device->get_unit();
41 cout << name << ": " << value << " " << unit << endl;
45 if (round >= store_interval) {
49 sleep(interval_seconds);
50 if (round >= store_interval) {
56 log_debug("could not find 1-wire devices.\n");