Commit 5929511b authored by Michael Ott's avatar Michael Ott
Browse files

Only stpore actual readings and ignore dummies to read errors

parent 3357b61f
......@@ -59,8 +59,7 @@ void BACnetSensorGroup::read() {
reading.value = _bacClient->readProperty(s->getDeviceInstance(), s->getObjectInstance(), s->getObjectType(), s->getPropertyId()) * s->getFactor();
} catch (const std::exception& e) {
LOG(error) << _groupName << "::" << s->getName() << " could not read value: " << e.what();
//dummy value
reading.value = 0;
continue;
}
#ifdef DEBUG
LOG(debug) << _groupName << "::" << s->getName() << ": \"" << reading.value << "\"";
......
......@@ -78,8 +78,6 @@ void IPMISensorGroup::read() {
}
} catch (const std::exception& e) {
LOG(error) << _groupName << "::" << s->getName() << " could not read value: " << e.what();
//dummy value
reading.value = 0;
continue;
}
#ifdef DEBUG
......
......@@ -119,8 +119,7 @@ void PDUSensorGroup::read() {
reading.value = stoul(readStr);
} catch (const std::exception& e) {
LOG(error) << _groupName << "::" << s->getName() << " could not read value: " << e.what();
//dummy value
reading.value = 0;
continue;
}
#ifdef DEBUG
LOG(debug) << _groupName << "::" << s->getName() << ": \"" << reading.value << "\"";
......
......@@ -75,9 +75,8 @@ void SysfsSensorGroup::read() {
reading.value = stoll(buf);
}
} catch (const std::exception& e) {
LOG(error) << _groupName << "::" << s->getName() << " could not read value!";
//dummy value
reading.value = 0;
LOG(error) << _groupName << "::" << s->getName() << " could not read value: " << e.what();
continue;
}
#ifdef DEBUG
LOG(debug) << _groupName << "::" << s->getName() << ": \"" << reading.value << "\"";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment