Keeps track of channel occupancy statistics observed at a WifiNetDevice. More...
#include "wifi-co-trace-helper.h"
Public Member Functions | |
DeviceRecord (Ptr< WifiNetDevice > device) | |
Constructor. | |
void | AddLinkMeasurement (size_t linkId, Time start, Time duration, WifiPhyState state) |
Update the duration statistics for the provided linkId and state. | |
Public Attributes | |
std::string | m_deviceName |
Device name. It's empty if the name isn't configured. | |
uint32_t | m_ifIndex |
Device Id of WifiNetDevice. | |
std::map< uint8_t, std::map< WifiPhyState, Time > > | m_linkStateDurations |
Duration statistics by link and state. | |
uint32_t | m_nodeId |
Id of Node on which the WifiNetDevice is installed. | |
std::string | m_nodeName |
Name of Node on which the WifiNetDevice is installed. | |
Keeps track of channel occupancy statistics observed at a WifiNetDevice.
Data structure to track durations of each WifiPhy state. Elements in m_linkStateDurations are indexed by "linkId".
Definition at line 52 of file wifi-co-trace-helper.h.
ns3::WifiCoTraceHelper::DeviceRecord::DeviceRecord | ( | Ptr< WifiNetDevice > | device | ) |
Constructor.
device | The WifiNetDevice whose links will be monitored to collect statistics. |
Definition at line 361 of file wifi-co-trace-helper.cc.
References ns3::Names::FindName(), m_deviceName, m_nodeName, and NS_LOG_FUNCTION.
void ns3::WifiCoTraceHelper::DeviceRecord::AddLinkMeasurement | ( | size_t | linkId, |
Time | start, | ||
Time | duration, | ||
WifiPhyState | state ) |
Update the duration statistics for the provided linkId and state.
linkId | Id of Link whose statistics is updated. |
start | Time at which link switched its WifiPhyState to state. |
duration | Duration of time that the link stayed in this state. |
state | The state of the link from start to (start + duration). |
Definition at line 377 of file wifi-co-trace-helper.cc.
References ns3::Time::As(), NS_LOG_FUNCTION, and ns3::Time::S.
std::string ns3::WifiCoTraceHelper::DeviceRecord::m_deviceName |
Device name. It's empty if the name isn't configured.
Definition at line 58 of file wifi-co-trace-helper.h.
Referenced by DeviceRecord().
uint32_t ns3::WifiCoTraceHelper::DeviceRecord::m_ifIndex |
Device Id of WifiNetDevice.
Definition at line 57 of file wifi-co-trace-helper.h.
std::map<uint8_t, std::map<WifiPhyState, Time> > ns3::WifiCoTraceHelper::DeviceRecord::m_linkStateDurations |
Duration statistics by link and state.
LinkId is the key in the first map, and the WifiPhyState is the key to the second.
Definition at line 64 of file wifi-co-trace-helper.h.
uint32_t ns3::WifiCoTraceHelper::DeviceRecord::m_nodeId |
Id of Node on which the WifiNetDevice is installed.
Definition at line 54 of file wifi-co-trace-helper.h.
std::string ns3::WifiCoTraceHelper::DeviceRecord::m_nodeName |
Name of Node on which the WifiNetDevice is installed.
It's empty if the name isn't configured.
Definition at line 55 of file wifi-co-trace-helper.h.
Referenced by DeviceRecord().