A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-remote-station-info.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2005,2006,2007 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7 */
8
9#ifndef WIFI_REMOTE_STATION_INFO_H
10#define WIFI_REMOTE_STATION_INFO_H
11
12#include "ns3/nstime.h"
13#include "ns3/uinteger.h"
14
15namespace ns3
16{
17
18/**
19 * \brief TID independent remote station statistics
20 *
21 * Structure is similar to struct sta_info in Linux kernel (see
22 * net/mac80211/sta_info.h)
23 */
25{
26 public:
28 virtual ~WifiRemoteStationInfo();
29
30 /**
31 * \brief Updates average frame error rate when data or RTS was transmitted successfully.
32 *
33 * \param retryCounter is SLRC or SSRC value at the moment of success transmission.
34 */
35 void NotifyTxSuccess(uint32_t retryCounter);
36 /**
37 * Updates average frame error rate when final data or RTS has failed.
38 */
39 void NotifyTxFailed();
40 /**
41 * Return frame error rate (probability that frame is corrupted due to transmission error).
42 * \returns the frame error rate
43 */
44 double GetFrameErrorRate() const;
45
46 private:
47 /**
48 * \brief Calculate averaging coefficient for frame error rate. Depends on time of the last
49 * update.
50 *
51 * \attention Calling this method twice gives different results,
52 * because it resets time of last update.
53 *
54 * \return average coefficient for frame error rate
55 */
57
58 Time m_memoryTime; ///< averaging coefficient depends on the memory time
59 Time m_lastUpdate; ///< when last update has occurred
60 double m_failAvg; ///< moving percentage of failed frames
61};
62
63} // namespace ns3
64
65#endif /* WIFI_REMOTE_STATION_INFO_H */
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
TID independent remote station statistics.
double m_failAvg
moving percentage of failed frames
Time m_lastUpdate
when last update has occurred
double CalculateAveragingCoefficient()
Calculate averaging coefficient for frame error rate.
void NotifyTxSuccess(uint32_t retryCounter)
Updates average frame error rate when data or RTS was transmitted successfully.
Time m_memoryTime
averaging coefficient depends on the memory time
double GetFrameErrorRate() const
Return frame error rate (probability that frame is corrupted due to transmission error).
void NotifyTxFailed()
Updates average frame error rate when final data or RTS has failed.
Every class exported by the ns3 library is enclosed in the ns3 namespace.