21 #include <ns3/object.h>
25 #include "ns3/interference-helper.h"
26 #include "ns3/wifi-phy.h"
37 virtual void DoRun (
void);
84 if (calculatedDurationMicroSeconds != knownDurationMicroSeconds)
86 std::cerr <<
" size=" << size
87 <<
" mode=" << payloadMode
88 <<
" known=" << knownDurationMicroSeconds
89 <<
" calculated=" << calculatedDurationMicroSeconds
100 txVector.
SetMode (payloadMode);
105 if (calculatedDurationMicroSeconds != knownDurationMicroSeconds)
107 std::cerr <<
" size=" << size
108 <<
" mode=" << payloadMode
109 <<
" preamble=" << preamble
110 <<
" known=" << knownDurationMicroSeconds
111 <<
" calculated=" << calculatedDurationMicroSeconds
207 :
TestSuite (
"devices-wifi-tx-duration", UNIT)
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
void SetStbc(bool stbc)
Sets if STBC is being used.
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for ODFM at 54Mbps.
bool CheckTxDuration(uint32_t size, WifiMode payloadMode, WifiPreamble preamble, double knownDurationMicroSeconds)
Check if the overall tx duration returned by InterferenceHelper corresponds to a known value of the p...
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-ODFM at 54Mbps.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
static double GetPayloadDurationMicroSeconds(uint32_t size, WifiTxVector txvector)
int64_t GetMicroSeconds(void) const
static WifiMode GetOfdmRate65MbpsBW20MHzShGi()
Return a WifiMode for ODFM at 65Mbps with 20MHz channel spacing.
void SetNss(uint8_t nss)
Sets the number of Nss refer to IEEE802.11n Table 20-28 for explanation and range.
NS_LOG_COMPONENT_DEFINE("InterferenceHelperTxDurationTest")
static WifiMode GetOfdmRate65MbpsBW20MHz()
Return a WifiMode for ODFM at 65Mbps with 20MHz channel spacing.
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
static TxDurationTestSuite g_txDurationTestSuite
bool CheckPayloadDuration(uint32_t size, WifiMode payloadMode, uint32_t knownDurationMicroSeconds)
Check if the payload tx duration returned by InterferenceHelper corresponds to a known value of the p...
virtual void DoRun(void)
Implementation to actually run this TestCase.
static Time CalculateTxDuration(uint32_t size, WifiTxVector txvector, enum WifiPreamble preamble)
void SetNess(uint8_t ness)
Sets the Ness number refer to IEEE802.11n Table 20-6 for explanation.
static WifiMode GetDsssRate2Mbps()
Return a WifiMode for DSSS at 2Mbps.
virtual ~TxDurationTest()