Commit c9e3d846 authored by Micha Mueller's avatar Micha Mueller
Browse files

Make Opa sensors read deltas by default

parent 18f03ef4
......@@ -474,6 +474,9 @@ Explanation of the values specific for the Opa plugin:
| portNum | Number of which omni-path port to query (starting with 1)
| cntData | Name which data counter to query. A list of possible values can be found below.
> NOTE     As perfevent counters are usually always monotonic, the delta attribute is by default set to true for all sensors. One has to explicitly set delta to "off" for a sensor to overwrite this behaviour.
### counterData <a name="opaCounterData"></a>
Possible values for cntData:
......
......@@ -52,7 +52,10 @@ void OpaConfigurator::sensorBase(OpaSensorBase& s, CFG_VAL config) {
} else {
LOG(warning) << " cntData \"" << val.second.data() << "\" not known.";
}
}
} else if (boost::iequals(val.first, "delta")) {
//it is explicitly stated to be off --> set it to false
s.setDelta( !(val.second.data() == "off") );
}
}
}
......
......@@ -44,7 +44,10 @@ class OpaSensorBase : public SensorBase {
public:
OpaSensorBase(const std::string& name) :
SensorBase(name),
_counterData(999) {}
_counterData(999) {
//default delta to true, as opa has only monotonic sensors usually
_delta = true;
}
OpaSensorBase(const OpaSensorBase& other) : SensorBase(other),
_counterData(other._counterData) {}
......
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