Commit b2ceb1cb authored by Michael Ott's avatar Michael Ott
Browse files

Report correct message rates for Lenovo XCC metrics

parent f384aa77
......@@ -49,6 +49,24 @@ IPMISensorGroup &IPMISensorGroup::operator=(const IPMISensorGroup &other) {
return *this;
float IPMISensorGroup::getMsgRate() {
float msgRate = 0;
for (const auto &s : _sensors) {
switch(s->getType()) {
case IPMISensorBase::sensorType::xccDatastorePower:
case IPMISensorBase::sensorType::xccBulkPower:
msgRate+= 100.0f / _minValues;
case IPMISensorBase::sensorType::xccBulkEnergy:
msgRate+= 101.0f / _minValues;
msgRate+= SensorGroupTemplate::getMsgRate();
return msgRate;
uint64_t IPMISensorGroup::readRaw(const std::vector<uint8_t> &rawCmd, uint8_t lsb, uint8_t msb) {
uint8_t buf[256];
int len = -1;
......@@ -43,6 +43,7 @@ class IPMISensorGroup : public SensorGroupTemplateEntity<IPMISensorBase, IPMIHos
IPMISensorGroup(const IPMISensorGroup &other);
virtual ~IPMISensorGroup();
IPMISensorGroup &operator=(const IPMISensorGroup &other);
float getMsgRate() final override;
uint64_t nextReadingTime() override;
bool checkConfig();
void execOnInit() final override;
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