#include <vector>
+#include <plp/log.h>
+
#include "W1CounterDevice.hh"
using namespace std;
string text;
ifstream ifs(slave_file.c_str());
- if (ifs.is_open() == true) {
- text = get_time() + ": device type = " + get_device_type() + ", id = " + id + ", could not read file: " + slave_file;
- cout << text << endl;
- cout << "verify that you have w1_ds2423 kernel module loaded." << endl;
+ if (ifs.is_open() == false) {
+ log_error("%s: %s failed to read data from file: %s\n", id.c_str(), get_device_type().c_str(), slave_file.c_str());
+ log_error("Verify that you have w1_ds2423 kernel module loaded.\n");
ifs.close();
}
}
string W1CounterDevice::get_device_type() {
return "Counter Device";
}
+
+unsigned int W1CounterDevice::get_data_decimal_precision() {
+ return 0;
+}