#include <stdlib.h>
#include <plp/log.h>
+#include <plp/Date.hh>
+#include <plp/DataReader.hh>
+#include <plp/DeviceConfig.hh>
-#include "Date.hh"
-#include "DataReader.hh"
-#include "DeviceConfig.hh"
#include "Factory.hh"
-#include "W1Util.hh"
using namespace std;
using namespace plp;
list<Device *>::iterator list_iter;
// default values than can be overwritten with parameters
- loc = "/tmp/w1data";
+ loc = DeviceConfig::get_base_dir_name();
if (argc > 1) {
loc = argv[1];
log_info("storage location: %s\n", loc.c_str());
+ DeviceConfig::set_base_dir_name(loc);
}
else {
log_warning("No storage location parameter given, using default location: %s\n", loc.c_str());
}
- DeviceConfig::set_base_dir_name(loc);
dev_lst = Factory::get_device_list();
for(list_iter = dev_lst.begin(); list_iter != dev_lst.end(); list_iter++) {
device = (Device *)*list_iter;