]> pilppa.org Git - lib1wire.git/blobdiff - src/W1CounterDevice.cc
fix build warnings
[lib1wire.git] / src / W1CounterDevice.cc
index 58e9a55ef742e5a9d9ef8e98142dc6f98b04f809..c77b872db77786d3da509746e232645f9ad7cbaa 100644 (file)
@@ -28,14 +28,14 @@ bool string_to_number(NumberDataType& result,
        return !(iss >> format >> result).fail();
 }
 
-W1CounterDevice::W1CounterDevice(int family_code_param,
-                               string device_id_param,
-                               dirent *direntry_param): W1Device(family_code_param, device_id_param, direntry_param) {
+W1CounterDevice::W1CounterDevice(string device_id_param,
+               string device_type_param,
+               dirent *direntry_param): W1Device(device_id_param, device_type_param, direntry_param) {
        string text;
 
        ifstream ifs(slave_file.c_str());
        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("%s: %s failed to read data from file: %s\n", id.c_str(), get_type().c_str(), slave_file.c_str());
                log_error("Verify that you have w1_ds2423 kernel module loaded.\n");
                ifs.close();
        }
@@ -45,18 +45,6 @@ W1CounterDevice::~W1CounterDevice() {
        // TODO Auto-generated destructor stub
 }
 
-bool W1CounterDevice::is_supported_w1_family_code(int family_code) {
-       bool    ret_val;
-
-       ret_val = false;
-       switch(family_code) {
-               case 0x1d:
-                       ret_val = true;
-                       break;
-       }
-       return ret_val;
-}
-
 vector<double> *W1CounterDevice::get_raw_data() {
        int             pos;
        int             b_cnt;
@@ -91,10 +79,6 @@ string W1CounterDevice::get_unit() {
        return "";
 }
 
-string W1CounterDevice::get_device_type() {
-       return "Counter Device";
-}
-
 unsigned int W1CounterDevice::get_data_decimal_precision() {
        return 0;
 }