Ref T698, functions to count network VATLIB calls to identify packets

* functions in network classes
* context functions
This commit is contained in:
Klaus Basan
2019-07-04 00:14:21 +02:00
parent f90baedf8a
commit d6f92f9f49
9 changed files with 262 additions and 17 deletions

View File

@@ -807,6 +807,20 @@ namespace BlackCore
return m_airspace->partsLastModified(callsign);
}
QString CContextNetwork::getNetworkStatistics(bool reset, const QString &separator)
{
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
if (!m_network) { return QString(); }
return m_network->getNetworkStatisticsAsText(reset, separator);
}
bool CContextNetwork::setNetworkStatisticsEnable(bool enabled)
{
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
if (!m_network) { return false; }
return m_network->setStatisticsEnable(enabled);
}
bool CContextNetwork::testAddAltitudeOffset(const CCallsign &callsign, const CLength &offset)
{
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }