21 #ifndef ATHSTATS_HELPER_H
22 #define ATHSTATS_HELPER_H
27 #include "ns3/nstime.h"
28 #include "ns3/object.h"
30 #include "ns3/type-id.h"
31 #include "ns3/wifi-phy-state.h"
32 #include "ns3/wifi-phy-common.h"
38 class NetDeviceContainer;
58 void EnableAthstats (std::string filename, uint32_t nodeid, uint32_t deviceid);
218 void Open (std::string
const& name);
create AthstatsWifiTraceSink instances and connect them to wifi devices
void EnableAthstats(std::string filename, uint32_t nodeid, uint32_t deviceid)
Enable athstats.
trace sink for wifi device that mimics madwifi's athstats tool.
void TxFinalRtsFailedTrace(std::string context, Mac48Address address)
Function to be called when the transmission of a RTS frame has exceeded the retry limit.
void TxFinalDataFailedTrace(std::string context, Mac48Address address)
Function to be called when the transmission of a data frame has exceeded the retry limit.
void PhyRxOkTrace(std::string context, Ptr< const Packet > packet, double snr, WifiMode mode, WifiPreamble preamble)
Function to be called when the PHY layer of the considered device receives a frame.
uint32_t m_txCount
transmit count
void DevRxTrace(std::string context, Ptr< const Packet > p)
function to be called when the net device receives a packet
std::ofstream * m_writer
output stream
uint32_t m_rxCount
receive count
uint32_t m_shortRetryCount
short retry count
void WriteStats()
Write status function.
void TxRtsFailedTrace(std::string context, Mac48Address address)
Function to be called when a RTS frame transmission by the considered device has failed.
void PhyStateTrace(std::string context, Time start, Time duration, WifiPhyState state)
Function to be called when the PHY layer of the considered device changes state.
void PhyRxErrorTrace(std::string context, Ptr< const Packet > packet, double snr)
Function to be called when a frame reception by the PHY layer of the considered device resulted in an...
static TypeId GetTypeId(void)
Get the type ID.
void DevTxTrace(std::string context, Ptr< const Packet > p)
function to be called when the net device transmits a packet
uint32_t m_longRetryCount
long retry count
void PhyTxTrace(std::string context, Ptr< const Packet > packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower)
Function to be called when a frame is being transmitted by the PHY layer of the considered device.
uint32_t m_phyTxCount
PHY transmit count.
void TxDataFailedTrace(std::string context, Mac48Address address)
Function to be called when a data frame transmission by the considered device has failed.
uint32_t m_phyRxOkCount
PHY receive OK count.
virtual ~AthstatsWifiTraceSink()
uint32_t m_phyRxErrorCount
PHY receive error count.
void ResetCounters()
Reset counters function.
void Open(std::string const &name)
Open a file for output.
uint32_t m_exceededRetryCount
exceeded retry count
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
A base class which provides memory management and object aggregation.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
represent a single transmission mode
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiPhyState
The state of the PHY layer.