A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::WifiCoTraceHelper::DeviceRecord Struct Reference

Keeps track of channel occupancy statistics observed at a WifiNetDevice. More...

#include "wifi-co-trace-helper.h"

+ Collaboration diagram for ns3::WifiCoTraceHelper::DeviceRecord:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DeviceRecord()

ns3::WifiCoTraceHelper::DeviceRecord::DeviceRecord ( Ptr< WifiNetDevice > device)

Constructor.

Parameters
deviceThe 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.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddLinkMeasurement()

void ns3::WifiCoTraceHelper::DeviceRecord::AddLinkMeasurement ( size_t linkId,
Time start,
Time duration,
WifiPhyState state )

Update the duration statistics for the provided linkId and state.

Parameters
linkIdId of Link whose statistics is updated.
startTime at which link switched its WifiPhyState to state.
durationDuration of time that the link stayed in this state.
stateThe 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.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_deviceName

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().

◆ m_ifIndex

uint32_t ns3::WifiCoTraceHelper::DeviceRecord::m_ifIndex

Device Id of WifiNetDevice.

Definition at line 57 of file wifi-co-trace-helper.h.

◆ m_linkStateDurations

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.

◆ m_nodeId

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.

◆ m_nodeName

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().


The documentation for this struct was generated from the following files: