Skip to content

Commit

Permalink
WifiStatus: Added TXRATE and RXRATE options
Browse files Browse the repository at this point in the history
  • Loading branch information
brianferguson committed Nov 29, 2021
1 parent 93d5fa7 commit bbfb459
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Library/MeasureWifiStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ void MeasureWifiStatus::ReadOptions(ConfigParser& parser, const WCHAR* section)
{
infoType = MeasureType::QUALITY;
}
else if (_wcsicmp(L"TXRATE", type) == 0)
{
infoType = MeasureType::TXRATE;
}
else if (_wcsicmp(L"RXRATE", type) == 0)
{
infoType = MeasureType::RXRATE;
}
else
{
LogErrorF(this, L"WifiStatus: WifiInfoType=%s not valid", type);
Expand Down Expand Up @@ -279,6 +287,14 @@ void MeasureWifiStatus::UpdateValue()
m_Value = (double)wlan_cattr->wlanAssociationAttributes.wlanSignalQuality;
break;

case MeasureType::TXRATE:
m_Value = (double)wlan_cattr->wlanAssociationAttributes.ulRxRate;
break;

case MeasureType::RXRATE:
m_Value = (double)wlan_cattr->wlanAssociationAttributes.ulRxRate;
break;

default: // Invalid type
m_StatusString.clear();
break;
Expand Down
2 changes: 2 additions & 0 deletions Library/MeasureWifiStatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class MeasureWifiStatus : public Measure
PHY,

QUALITY = 200U,
TXRATE,
RXRATE,

UNKNOWN = 9999U
};
Expand Down

0 comments on commit bbfb459

Please sign in to comment.