24.09., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit 49d8cb4e authored by Michael Ott's avatar Michael Ott

Merge branch 'development'

parents 045c4a13 07345740
...@@ -200,7 +200,13 @@ class SensorGroupInterface { ...@@ -200,7 +200,13 @@ class SensorGroupInterface {
* *
* @return The message rate in messages/s. * @return The message rate in messages/s.
*/ */
virtual float getMsgRate() { return (float)_baseSensors.size() * (1000.0f / (float)_interval) / (float)_minValues; } virtual float getMsgRate() {
float val = 0;
for (const auto s: _baseSensors) {
val+= 1.0f / s->getSubsampling();
}
return val * (1000.0f / (float)_interval) / (float)_minValues;
}
/** /**
* @brief Print interface configuration. * @brief Print interface configuration.
......
...@@ -54,11 +54,13 @@ float IPMISensorGroup::getMsgRate() { ...@@ -54,11 +54,13 @@ float IPMISensorGroup::getMsgRate() {
for (const auto &s : _sensors) { for (const auto &s : _sensors) {
switch(s->getType()) { switch(s->getType()) {
case IPMISensorBase::sensorType::xccDatastorePower: case IPMISensorBase::sensorType::xccDatastorePower:
msgRate+= 3000.0f / (s->getSubsampling() * _minValues);
break;
case IPMISensorBase::sensorType::xccBulkPower: case IPMISensorBase::sensorType::xccBulkPower:
msgRate+= 100.0f / _minValues; msgRate+= 100.0f / (s->getSubsampling() * _minValues);
break; break;
case IPMISensorBase::sensorType::xccBulkEnergy: case IPMISensorBase::sensorType::xccBulkEnergy:
msgRate+= 101.0f / _minValues; msgRate+= 101.0f / (s->getSubsampling() * _minValues);
break; break;
default: default:
msgRate+= SensorGroupTemplate::getMsgRate(); msgRate+= SensorGroupTemplate::getMsgRate();
......
Markdown is supported
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