Added method to detect whether an inverter is reachable

This commit is contained in:
Thomas Basler
2022-10-01 02:16:47 +02:00
parent a261eb838c
commit 862b65e844
6 changed files with 36 additions and 1 deletions

View File

@@ -49,6 +49,11 @@ bool InverterAbstract::isProducing()
return Statistics()->getChannelFieldValue(CH0, FLD_PAC) > 0;
}
bool InverterAbstract::isReachable()
{
return Statistics()->getRxFailureCount() <= MAX_ONLINE_FAILURE_COUNT;
}
AlarmLogParser* InverterAbstract::EventLog()
{
return _alarmLogParser.get();