X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=src%2FW1Util.cc;h=ba6b944a986ab58326a6d4ae23da4b236d7d5551;hb=d7ead1c059ca51e1d71e0f3928f41733d4c7f29c;hp=c5773bc781f2cdb805c770ace2d1e9389b2a32ce;hpb=e3fe75505f606622b3a21cf1c4b71b7144639e06;p=lib1wire.git diff --git a/src/W1Util.cc b/src/W1Util.cc index c5773bc..ba6b944 100644 --- a/src/W1Util.cc +++ b/src/W1Util.cc @@ -296,34 +296,3 @@ Date W1Util::parse_date_str(string date_str) { ss >>ret_val.year >>c >>ret_val.month >>c >>ret_val.day >>ret_val.hour >>c >>ret_val.min >>c >>ret_val.sec; return ret_val; } - -Data *W1Util::parse_data_line(const string& dataline) { - stringstream ss(dataline); - string item; - double val; - Data *ret_val; - int ii; - bool suc_flg; - vector v; - Date date; - - ii = 0; - while(getline(ss, item, '|')) { - if (ii == 0) { - // parse date - date = parse_date_str(item); - } - // skip the device type and device id fields - // TODO: store device type and id to own file - else if (ii >= 3) { - suc_flg = string_to_number(val, item, dec); - if (suc_flg) { - //log_debug("adding number: %f\n", val); - v.push_back(val); - } - } - ii++; - } - ret_val = new Data(v, &date); - return ret_val; -}