This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters which are to be used for a transmission. More...
#include <wifi-tx-vector.h>
Public Member Functions | |
WifiTxVector () | |
WifiTxVector (WifiMode mode, uint8_t powerLevel, uint8_t retries, bool shortGuardInterval, uint8_t nss, uint8_t ness, bool stbc) | |
Create a TXVECTOR with the given parameters. More... | |
WifiMode | GetMode (void) const |
uint8_t | GetNess (void) const |
uint8_t | GetNss (void) const |
uint8_t | GetRetries (void) const |
uint8_t | GetTxPowerLevel (void) const |
bool | IsShortGuardInterval (void) const |
bool | IsStbc (void) const |
Check if STBC is used or not. More... | |
void | SetMode (WifiMode mode) |
Sets the selected payload transmission mode. More... | |
void | SetNess (uint8_t ness) |
Sets the Ness number refer to IEEE 802.11n Table 20-6 for explanation. More... | |
void | SetNss (uint8_t nss) |
Sets the number of Nss refer to IEEE 802.11n Table 20-28 for explanation and range. More... | |
void | SetRetries (uint8_t retries) |
Sets the number of retries. More... | |
void | SetShortGuardInterval (bool guardinterval) |
Sets if short gurad interval is being used. More... | |
void | SetStbc (bool stbc) |
Sets if STBC is being used. More... | |
void | SetTxPowerLevel (uint8_t powerlevel) |
Sets the selected transmission power level. More... | |
Private Attributes | |
WifiMode | m_mode |
The DATARATE parameter in Table 15-4. More... | |
bool | m_modeInitialized |
uint8_t | m_ness |
number of streams in beamforming More... | |
uint8_t | m_nss |
number of streams More... | |
uint8_t | m_retries |
The DATA_RETRIES/RTS_RETRIES parameter for Click radiotap information. More... | |
bool | m_shortGuardInterval |
true if short GI is going to be used More... | |
bool | m_stbc |
STBC used or not. More... | |
uint8_t | m_txPowerLevel |
The TXPWR_LEVEL parameter in Table 15-4. More... | |
bool | m_txPowerLevelInitialized |
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters which are to be used for a transmission.
See IEEE 802.11-2007 15.2.6 "Transmit PLCP", and also 15.4.4.2 "PMD_SAP peer-to-peer service primitive parameters".
If this class is constructed with the constructor that takes no arguments, then the client must explicitly set the mode and transmit power level parameters before using them. Default member initializers are provided for the other parameters, to conform to a non-MIMO/long guard configuration, although these may also be explicitly set after object construction.
When used in a infrastructure context, WifiTxVector values should be drawn from WifiRemoteStationManager parameters since rate adaptation is responsible for picking the mode, number of streams, etc., but in the case in which there is no such manager (e.g. mesh), the client still needs to initialize at least the mode and transmit power level appropriately.
Definition at line 61 of file wifi-tx-vector.h.
ns3::WifiTxVector::WifiTxVector | ( | ) |
Definition at line 27 of file wifi-tx-vector.cc.
ns3::WifiTxVector::WifiTxVector | ( | WifiMode | mode, |
uint8_t | powerLevel, | ||
uint8_t | retries, | ||
bool | shortGuardInterval, | ||
uint8_t | nss, | ||
uint8_t | ness, | ||
bool | stbc | ||
) |
Create a TXVECTOR with the given parameters.
mode | WifiMode |
powerLevel | transmission power level |
retries | retries |
shortGuardInterval | enable or disable short guard interval |
nss | the number of spatial STBC streams (NSS) |
ness | the number of extension spatial streams (NESS) |
stbc | enable or disable STBC |
Definition at line 38 of file wifi-tx-vector.cc.
WifiMode ns3::WifiTxVector::GetMode | ( | void | ) | const |
Definition at line 53 of file wifi-tx-vector.cc.
References m_mode, m_modeInitialized, and NS_FATAL_ERROR.
Referenced by ns3::WifiPhy::CalculatePlcpDuration(), ns3::MacLow::CalculateTransmissionTime(), ns3::WifiPhy::CalculateTxDuration(), ns3::MacLow::ForwardDown(), ns3::MacLow::GetAckDuration(), ns3::MacLow::GetBlockAckDuration(), ns3::MacLow::GetCtsDuration(), ns3::WaveMacLow::GetDataTxVector(), ns3::WifiPhy::GetPayloadDuration(), ns3::WifiRemoteStationManager::NeedCtsToSelf(), ns3::operator<<(), ns3::MacLow::ReceiveOk(), ns3::MacLow::SendBlockAckAfterAmpdu(), ns3::MacLow::SendBlockAckResponse(), ns3::MacLow::SendCtsAfterRts(), ns3::MacLow::SendCtsToSelf(), ns3::MacLow::SendDataAfterCts(), ns3::MacLow::SendDataPacket(), ns3::YansWifiPhy::SendPacket(), ns3::MacLow::SendRtsForPacket(), ns3::MacLow::StartDataTxTimers(), ns3::YansWifiPhy::StartReceivePacket(), ns3::YansWifiPhy::StartReceivePlcp(), ns3::WifiPhyStateHelper::SwitchFromRxEndOk(), ns3::WifiPhyStateHelper::SwitchToTx(), PowerRateAdaptationTest::TestAparf(), and PowerRateAdaptationTest::TestParf().
uint8_t ns3::WifiTxVector::GetNess | ( | void | ) | const |
Definition at line 86 of file wifi-tx-vector.cc.
References m_ness.
Referenced by ns3::WifiPhy::GetPlcpHtTrainingSymbolDuration(), and ns3::operator<<().
uint8_t ns3::WifiTxVector::GetNss | ( | void | ) | const |
Definition at line 81 of file wifi-tx-vector.cc.
References m_nss.
Referenced by ns3::WifiPhy::GetPayloadDuration(), ns3::WifiPhy::GetPlcpHtTrainingSymbolDuration(), ns3::operator<<(), and ns3::YansWifiPhy::SendPacket().
uint8_t ns3::WifiTxVector::GetRetries | ( | void | ) | const |
Definition at line 71 of file wifi-tx-vector.cc.
References m_retries.
Referenced by ns3::operator<<().
uint8_t ns3::WifiTxVector::GetTxPowerLevel | ( | void | ) | const |
Definition at line 62 of file wifi-tx-vector.cc.
References m_txPowerLevel, m_txPowerLevelInitialized, and NS_FATAL_ERROR.
Referenced by ns3::WaveMacLow::GetDataTxVector(), ns3::operator<<(), ns3::YansWifiPhy::SendPacket(), ns3::WifiPhyStateHelper::SwitchToTx(), PowerRateAdaptationTest::TestAparf(), and PowerRateAdaptationTest::TestParf().
bool ns3::WifiTxVector::IsShortGuardInterval | ( | void | ) | const |
Definition at line 76 of file wifi-tx-vector.cc.
References m_shortGuardInterval.
Referenced by ns3::operator<<().
bool ns3::WifiTxVector::IsStbc | ( | void | ) | const |
Check if STBC is used or not.
Definition at line 91 of file wifi-tx-vector.cc.
References m_stbc.
Referenced by ns3::WifiPhy::GetPayloadDuration(), and ns3::operator<<().
void ns3::WifiTxVector::SetMode | ( | WifiMode | mode | ) |
Sets the selected payload transmission mode.
mode |
Definition at line 97 of file wifi-tx-vector.cc.
References m_mode, and m_modeInitialized.
Referenced by ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric(), TxDurationTest::CheckPayloadDuration(), TxDurationTest::CheckTxDuration(), ns3::VsaManager::DoSendVsa(), ns3::WifiRemoteStationManager::GetAckTxVector(), ns3::WifiRemoteStationManager::GetBlockAckTxVector(), ns3::WifiRemoteStationManager::GetCtsTxVector(), ns3::WaveMacLow::GetDataTxVector(), ns3::WifiRemoteStationManager::GetDataTxVector(), PsrExperiment::Send(), ns3::WaveNetDevice::Send(), CollisionExperiment::SendA(), CollisionExperiment::SendB(), ns3::WaveNetDevice::SendX(), ns3::MinstrelWifiManager::SetupPhy(), and NodeStatistics::SetupPhy().
void ns3::WifiTxVector::SetNess | ( | uint8_t | ness | ) |
Sets the Ness number refer to IEEE 802.11n Table 20-6 for explanation.
ness |
Definition at line 124 of file wifi-tx-vector.cc.
References m_ness.
Referenced by TxDurationTest::CheckTxDuration(), and ns3::WifiRemoteStationManager::GetDataTxVector().
void ns3::WifiTxVector::SetNss | ( | uint8_t | nss | ) |
Sets the number of Nss refer to IEEE 802.11n Table 20-28 for explanation and range.
nss |
Definition at line 119 of file wifi-tx-vector.cc.
References m_nss.
Referenced by TxDurationTest::CheckTxDuration(), and ns3::WifiRemoteStationManager::GetDataTxVector().
void ns3::WifiTxVector::SetRetries | ( | uint8_t | retries | ) |
Sets the number of retries.
retries |
Definition at line 109 of file wifi-tx-vector.cc.
References m_retries.
void ns3::WifiTxVector::SetShortGuardInterval | ( | bool | guardinterval | ) |
Sets if short gurad interval is being used.
guardinterval | enable or disable short guard interval |
Definition at line 114 of file wifi-tx-vector.cc.
References m_shortGuardInterval.
Referenced by ns3::WifiRemoteStationManager::GetDataTxVector().
void ns3::WifiTxVector::SetStbc | ( | bool | stbc | ) |
Sets if STBC is being used.
stbc | enable or disable STBC |
Definition at line 129 of file wifi-tx-vector.cc.
References m_stbc.
Referenced by TxDurationTest::CheckTxDuration(), and ns3::WifiRemoteStationManager::GetDataTxVector().
void ns3::WifiTxVector::SetTxPowerLevel | ( | uint8_t | powerlevel | ) |
Sets the selected transmission power level.
powerlevel |
Definition at line 103 of file wifi-tx-vector.cc.
References m_txPowerLevel, and m_txPowerLevelInitialized.
Referenced by ns3::VsaManager::DoSendVsa(), ns3::WaveMacLow::GetDataTxVector(), ns3::WifiRemoteStationManager::GetDataTxVector(), PsrExperiment::Send(), ns3::WaveNetDevice::Send(), CollisionExperiment::SendA(), CollisionExperiment::SendB(), and ns3::WaveNetDevice::SendX().
|
private |
The DATARATE parameter in Table 15-4.
It is the value that will be passed to PMD_RATE.request
Definition at line 153 of file wifi-tx-vector.h.
|
private |
Definition at line 166 of file wifi-tx-vector.h.
|
private |
number of streams in beamforming
Definition at line 163 of file wifi-tx-vector.h.
|
private |
number of streams
Definition at line 162 of file wifi-tx-vector.h.
|
private |
The DATA_RETRIES/RTS_RETRIES parameter for Click radiotap information.
Definition at line 159 of file wifi-tx-vector.h.
Referenced by GetRetries(), and SetRetries().
|
private |
true if short GI is going to be used
Definition at line 161 of file wifi-tx-vector.h.
Referenced by IsShortGuardInterval(), and SetShortGuardInterval().
|
private |
STBC used or not.
Definition at line 164 of file wifi-tx-vector.h.
|
private |
The TXPWR_LEVEL parameter in Table 15-4.
It is the value that will be passed to PMD_TXPWRLVL.request
Definition at line 156 of file wifi-tx-vector.h.
Referenced by GetTxPowerLevel(), and SetTxPowerLevel().
|
private |
Definition at line 167 of file wifi-tx-vector.h.
Referenced by GetTxPowerLevel(), and SetTxPowerLevel().