wifi: Update EnableLogComponents
This commit is contained in:
@@ -755,33 +755,50 @@ WifiHelper::Install (const WifiPhyHelper &phy,
|
||||
void
|
||||
WifiHelper::EnableLogComponents (void)
|
||||
{
|
||||
LogComponentEnable ("Aarfcd", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("AarfWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("AarfcdWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("AdhocWifiMac", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("AmrrWifiRemoteStation", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("AmrrWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("ApWifiMac", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("AparfWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("ArfWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("Cara", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("BlockAckAgreement", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("BlockAckCache", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("BlockAckManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("CaraWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("ConstantRateWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("DcaTxop", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("DcfManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("DsssErrorRateModel", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("EdcaTxopN", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("IdealWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("InterferenceHelper", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("Jakes", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("MacLow", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("MacRxMiddle", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("MacTxMiddle", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("MinstrelHtWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("MinstrelWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("MpduAggregator", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("MpduStandardAggregator", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("MsduAggregator", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("MsduStandardAggregator", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("NistErrorRateModel", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("OnoeWifiRemoteStation", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("PropagationLossModel", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("OnoeWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("ParfWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("RegularWifiMac", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("RraaWifiManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("SpectrumWifiPhy", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("StaWifiMac", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("SupportedRates", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiChannel", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiMac", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiNetDevice", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiPhyStateHelper", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiPhy", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiRadioEnergyModel", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiRemoteStationManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiSpectrumPhyInterface", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiSpectrumSignalParameters", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiTxCurrentModel", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("YansErrorRateModel", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("YansWifiChannel", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("YansWifiPhy", LOG_LEVEL_ALL);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Aarfcd");
|
||||
NS_LOG_COMPONENT_DEFINE ("AarfcdWifiManager");
|
||||
|
||||
/**
|
||||
* \brief hold per-remote-station state for AARF-CD Wifi manager.
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("AmrrWifiRemoteStation");
|
||||
NS_LOG_COMPONENT_DEFINE ("AmrrWifiManager");
|
||||
|
||||
/**
|
||||
* \brief hold per-remote-station state for AMRR Wifi manager.
|
||||
|
||||
@@ -20,12 +20,9 @@
|
||||
|
||||
#include "amsdu-subframe-header.h"
|
||||
#include "ns3/address-utils.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("AmsduSubframeHeader");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (AmsduSubframeHeader);
|
||||
|
||||
TypeId
|
||||
@@ -48,25 +45,21 @@ AmsduSubframeHeader::GetInstanceTypeId (void) const
|
||||
AmsduSubframeHeader::AmsduSubframeHeader ()
|
||||
: m_length (0)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
AmsduSubframeHeader::~AmsduSubframeHeader ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
AmsduSubframeHeader::GetSerializedSize () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (6 + 6 + 2);
|
||||
}
|
||||
|
||||
void
|
||||
AmsduSubframeHeader::Serialize (Buffer::Iterator i) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &i);
|
||||
WriteTo (i, m_da);
|
||||
WriteTo (i, m_sa);
|
||||
i.WriteHtonU16 (m_length);
|
||||
@@ -75,7 +68,6 @@ AmsduSubframeHeader::Serialize (Buffer::Iterator i) const
|
||||
uint32_t
|
||||
AmsduSubframeHeader::Deserialize (Buffer::Iterator start)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &start);
|
||||
Buffer::Iterator i = start;
|
||||
ReadFrom (i, m_da);
|
||||
ReadFrom (i, m_sa);
|
||||
@@ -86,49 +78,42 @@ AmsduSubframeHeader::Deserialize (Buffer::Iterator start)
|
||||
void
|
||||
AmsduSubframeHeader::Print (std::ostream &os) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &os);
|
||||
os << "DA = " << m_da << ", SA = " << m_sa << ", length = " << m_length;
|
||||
}
|
||||
|
||||
void
|
||||
AmsduSubframeHeader::SetDestinationAddr (Mac48Address to)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << to);
|
||||
m_da = to;
|
||||
}
|
||||
|
||||
void
|
||||
AmsduSubframeHeader::SetSourceAddr (Mac48Address from)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << from);
|
||||
m_sa = from;
|
||||
}
|
||||
|
||||
void
|
||||
AmsduSubframeHeader::SetLength (uint16_t length)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << length);
|
||||
m_length = length;
|
||||
}
|
||||
|
||||
Mac48Address
|
||||
AmsduSubframeHeader::GetDestinationAddr (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_da;
|
||||
}
|
||||
|
||||
Mac48Address
|
||||
AmsduSubframeHeader::GetSourceAddr (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_sa;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
AmsduSubframeHeader::GetLength (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_length;
|
||||
}
|
||||
|
||||
|
||||
@@ -411,6 +411,7 @@ ApWifiMac::GetSupportedRates (void) const
|
||||
DsssParameterSet
|
||||
ApWifiMac::GetDsssParameterSet (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
DsssParameterSet dsssParameters;
|
||||
if (m_dsssSupported)
|
||||
{
|
||||
@@ -423,6 +424,7 @@ ApWifiMac::GetDsssParameterSet (void) const
|
||||
CapabilityInformation
|
||||
ApWifiMac::GetCapabilities (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
CapabilityInformation capabilities;
|
||||
capabilities.SetShortPreamble (GetShortPreambleEnabled ());
|
||||
capabilities.SetShortSlotTime (GetShortSlotTimeEnabled ());
|
||||
@@ -432,6 +434,7 @@ ApWifiMac::GetCapabilities (void) const
|
||||
ErpInformation
|
||||
ApWifiMac::GetErpInformation (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
ErpInformation information;
|
||||
information.SetErpSupported (1);
|
||||
if (m_erpSupported)
|
||||
@@ -453,6 +456,7 @@ ApWifiMac::GetErpInformation (void) const
|
||||
EdcaParameterSet
|
||||
ApWifiMac::GetEdcaParameterSet (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
EdcaParameterSet edcaParameters;
|
||||
edcaParameters.SetQosSupported (1);
|
||||
if (m_qosSupported)
|
||||
@@ -498,6 +502,7 @@ ApWifiMac::GetEdcaParameterSet (void) const
|
||||
HtOperation
|
||||
ApWifiMac::GetHtOperation (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
HtOperation operation;
|
||||
operation.SetHtSupported (1);
|
||||
if (m_htSupported)
|
||||
@@ -518,6 +523,7 @@ ApWifiMac::GetHtOperation (void) const
|
||||
VhtOperation
|
||||
ApWifiMac::GetVhtOperation (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
VhtOperation operation;
|
||||
operation.SetVhtSupported (1);
|
||||
if (m_vhtSupported)
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
#define Min(a,b) ((a < b) ? a : b)
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("ns3::AparfWifiManager");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("AparfWifiManager");
|
||||
|
||||
/**
|
||||
* Hold per-remote-station state for APARF Wifi manager.
|
||||
*
|
||||
|
||||
@@ -19,22 +19,17 @@
|
||||
*/
|
||||
|
||||
#include "capability-information.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("CapabilityInformation");
|
||||
|
||||
CapabilityInformation::CapabilityInformation ()
|
||||
: m_capability (0)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
void
|
||||
CapabilityInformation::SetEss (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Set (0);
|
||||
Clear (1);
|
||||
}
|
||||
@@ -42,7 +37,6 @@ CapabilityInformation::SetEss (void)
|
||||
void
|
||||
CapabilityInformation::SetIbss (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Clear (0);
|
||||
Set (1);
|
||||
}
|
||||
@@ -50,7 +44,6 @@ CapabilityInformation::SetIbss (void)
|
||||
void
|
||||
CapabilityInformation::SetShortPreamble (bool shortPreamble)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
if (shortPreamble)
|
||||
{
|
||||
Set (5);
|
||||
@@ -60,7 +53,6 @@ CapabilityInformation::SetShortPreamble (bool shortPreamble)
|
||||
void
|
||||
CapabilityInformation::SetShortSlotTime (bool shortSlotTime)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
if (shortSlotTime)
|
||||
{
|
||||
Set (10);
|
||||
@@ -70,35 +62,30 @@ CapabilityInformation::SetShortSlotTime (bool shortSlotTime)
|
||||
bool
|
||||
CapabilityInformation::IsEss (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return Is (0);
|
||||
}
|
||||
|
||||
bool
|
||||
CapabilityInformation::IsIbss (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return Is (1);
|
||||
}
|
||||
|
||||
bool
|
||||
CapabilityInformation::IsShortPreamble (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return Is (5);
|
||||
}
|
||||
|
||||
bool
|
||||
CapabilityInformation::IsShortSlotTime (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return Is (10);
|
||||
}
|
||||
|
||||
void
|
||||
CapabilityInformation::Set (uint8_t n)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << static_cast<uint32_t> (n));
|
||||
uint32_t mask = 1 << n;
|
||||
m_capability |= mask;
|
||||
}
|
||||
@@ -106,7 +93,6 @@ CapabilityInformation::Set (uint8_t n)
|
||||
void
|
||||
CapabilityInformation::Clear (uint8_t n)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << static_cast<uint32_t> (n));
|
||||
uint32_t mask = 1 << n;
|
||||
m_capability &= ~mask;
|
||||
}
|
||||
@@ -114,7 +100,6 @@ CapabilityInformation::Clear (uint8_t n)
|
||||
bool
|
||||
CapabilityInformation::Is (uint8_t n) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << static_cast<uint32_t> (n));
|
||||
uint32_t mask = 1 << n;
|
||||
return (m_capability & mask) == mask;
|
||||
}
|
||||
@@ -122,14 +107,12 @@ CapabilityInformation::Is (uint8_t n) const
|
||||
uint32_t
|
||||
CapabilityInformation::GetSerializedSize (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return 2;
|
||||
}
|
||||
|
||||
Buffer::Iterator
|
||||
CapabilityInformation::Serialize (Buffer::Iterator start) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &start);
|
||||
start.WriteHtolsbU16 (m_capability);
|
||||
return start;
|
||||
}
|
||||
@@ -137,7 +120,6 @@ CapabilityInformation::Serialize (Buffer::Iterator start) const
|
||||
Buffer::Iterator
|
||||
CapabilityInformation::Deserialize (Buffer::Iterator start)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &start);
|
||||
m_capability = start.ReadLsbtohU16 ();
|
||||
return start;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Cara");
|
||||
NS_LOG_COMPONENT_DEFINE ("CaraWifiManager");
|
||||
|
||||
/**
|
||||
* \brief hold per-remote-station state for CARA Wifi manager.
|
||||
|
||||
@@ -18,12 +18,10 @@
|
||||
* Author: Mirko Banchi <mk.banchi@gmail.com>
|
||||
*/
|
||||
|
||||
#include "ns3/log.h"
|
||||
#include "ctrl-headers.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("CtrlHeaders");
|
||||
|
||||
/***********************************
|
||||
* Block ack request
|
||||
@@ -36,18 +34,15 @@ CtrlBAckRequestHeader::CtrlBAckRequestHeader ()
|
||||
m_multiTid (false),
|
||||
m_compressed (false)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
CtrlBAckRequestHeader::~CtrlBAckRequestHeader ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
TypeId
|
||||
CtrlBAckRequestHeader::GetTypeId (void)
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
static TypeId tid = TypeId ("ns3::CtrlBAckRequestHeader")
|
||||
.SetParent<Header> ()
|
||||
.SetGroupName ("Wifi")
|
||||
@@ -59,21 +54,18 @@ CtrlBAckRequestHeader::GetTypeId (void)
|
||||
TypeId
|
||||
CtrlBAckRequestHeader::GetInstanceTypeId (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return GetTypeId ();
|
||||
}
|
||||
|
||||
void
|
||||
CtrlBAckRequestHeader::Print (std::ostream &os) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &os);
|
||||
os << "TID_INFO=" << m_tidInfo << ", StartingSeq=" << std::hex << m_startingSeq << std::dec;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
CtrlBAckRequestHeader::GetSerializedSize () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
uint32_t size = 0;
|
||||
size += 2; //Bar control
|
||||
if (!m_multiTid)
|
||||
@@ -97,7 +89,6 @@ CtrlBAckRequestHeader::GetSerializedSize () const
|
||||
void
|
||||
CtrlBAckRequestHeader::Serialize (Buffer::Iterator start) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &start);
|
||||
Buffer::Iterator i = start;
|
||||
i.WriteHtolsbU16 (GetBarControl ());
|
||||
if (!m_multiTid)
|
||||
@@ -120,7 +111,6 @@ CtrlBAckRequestHeader::Serialize (Buffer::Iterator start) const
|
||||
uint32_t
|
||||
CtrlBAckRequestHeader::Deserialize (Buffer::Iterator start)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &start);
|
||||
Buffer::Iterator i = start;
|
||||
SetBarControl (i.ReadLsbtohU16 ());
|
||||
if (!m_multiTid)
|
||||
@@ -144,7 +134,6 @@ CtrlBAckRequestHeader::Deserialize (Buffer::Iterator start)
|
||||
uint16_t
|
||||
CtrlBAckRequestHeader::GetBarControl (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
uint16_t res = 0;
|
||||
if (m_barAckPolicy)
|
||||
{
|
||||
@@ -165,7 +154,6 @@ CtrlBAckRequestHeader::GetBarControl (void) const
|
||||
void
|
||||
CtrlBAckRequestHeader::SetBarControl (uint16_t bar)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << bar);
|
||||
m_barAckPolicy = ((bar & 0x01) == 1) ? true : false;
|
||||
m_multiTid = (((bar >> 1) & 0x01) == 1) ? true : false;
|
||||
m_compressed = (((bar >> 2) & 0x01) == 1) ? true : false;
|
||||
@@ -175,28 +163,24 @@ CtrlBAckRequestHeader::SetBarControl (uint16_t bar)
|
||||
uint16_t
|
||||
CtrlBAckRequestHeader::GetStartingSequenceControl (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (m_startingSeq << 4) & 0xfff0;
|
||||
}
|
||||
|
||||
void
|
||||
CtrlBAckRequestHeader::SetStartingSequenceControl (uint16_t seqControl)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seqControl);
|
||||
m_startingSeq = (seqControl >> 4) & 0x0fff;
|
||||
}
|
||||
|
||||
void
|
||||
CtrlBAckRequestHeader::SetHtImmediateAck (bool immediateAck)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << immediateAck);
|
||||
m_barAckPolicy = immediateAck;
|
||||
}
|
||||
|
||||
void
|
||||
CtrlBAckRequestHeader::SetType (BlockAckType type)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << type);
|
||||
switch (type)
|
||||
{
|
||||
case BASIC_BLOCK_ACK:
|
||||
@@ -220,28 +204,24 @@ CtrlBAckRequestHeader::SetType (BlockAckType type)
|
||||
void
|
||||
CtrlBAckRequestHeader::SetTidInfo (uint8_t tid)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << static_cast<uint32_t> (tid));
|
||||
m_tidInfo = static_cast<uint16_t> (tid);
|
||||
}
|
||||
|
||||
void
|
||||
CtrlBAckRequestHeader::SetStartingSequence (uint16_t seq)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seq);
|
||||
m_startingSeq = seq;
|
||||
}
|
||||
|
||||
bool
|
||||
CtrlBAckRequestHeader::MustSendHtImmediateAck (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_barAckPolicy;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
CtrlBAckRequestHeader::GetTidInfo (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
uint8_t tid = static_cast<uint8_t> (m_tidInfo);
|
||||
return tid;
|
||||
}
|
||||
@@ -249,28 +229,24 @@ CtrlBAckRequestHeader::GetTidInfo (void) const
|
||||
uint16_t
|
||||
CtrlBAckRequestHeader::GetStartingSequence (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_startingSeq;
|
||||
}
|
||||
|
||||
bool
|
||||
CtrlBAckRequestHeader::IsBasic (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (!m_multiTid && !m_compressed) ? true : false;
|
||||
}
|
||||
|
||||
bool
|
||||
CtrlBAckRequestHeader::IsCompressed (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (!m_multiTid && m_compressed) ? true : false;
|
||||
}
|
||||
|
||||
bool
|
||||
CtrlBAckRequestHeader::IsMultiTid (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (m_multiTid && m_compressed) ? true : false;
|
||||
}
|
||||
|
||||
@@ -286,13 +262,11 @@ CtrlBAckResponseHeader::CtrlBAckResponseHeader ()
|
||||
m_multiTid (false),
|
||||
m_compressed (false)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
memset (&bitmap, 0, sizeof (bitmap));
|
||||
}
|
||||
|
||||
CtrlBAckResponseHeader::~CtrlBAckResponseHeader ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
TypeId
|
||||
@@ -315,14 +289,12 @@ CtrlBAckResponseHeader::GetInstanceTypeId (void) const
|
||||
void
|
||||
CtrlBAckResponseHeader::Print (std::ostream &os) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &os);
|
||||
os << "TID_INFO=" << m_tidInfo << ", StartingSeq=" << std::hex << m_startingSeq << std::dec;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
CtrlBAckResponseHeader::GetSerializedSize (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
uint32_t size = 0;
|
||||
size += 2; //Bar control
|
||||
if (!m_multiTid)
|
||||
@@ -353,7 +325,6 @@ CtrlBAckResponseHeader::GetSerializedSize (void) const
|
||||
void
|
||||
CtrlBAckResponseHeader::Serialize (Buffer::Iterator start) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &start);
|
||||
Buffer::Iterator i = start;
|
||||
i.WriteHtolsbU16 (GetBaControl ());
|
||||
if (!m_multiTid)
|
||||
@@ -377,7 +348,6 @@ CtrlBAckResponseHeader::Serialize (Buffer::Iterator start) const
|
||||
uint32_t
|
||||
CtrlBAckResponseHeader::Deserialize (Buffer::Iterator start)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &start);
|
||||
Buffer::Iterator i = start;
|
||||
SetBaControl (i.ReadLsbtohU16 ());
|
||||
if (!m_multiTid)
|
||||
@@ -402,14 +372,12 @@ CtrlBAckResponseHeader::Deserialize (Buffer::Iterator start)
|
||||
void
|
||||
CtrlBAckResponseHeader::SetHtImmediateAck (bool immediateAck)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << immediateAck);
|
||||
m_baAckPolicy = immediateAck;
|
||||
}
|
||||
|
||||
void
|
||||
CtrlBAckResponseHeader::SetType (BlockAckType type)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << type);
|
||||
switch (type)
|
||||
{
|
||||
case BASIC_BLOCK_ACK:
|
||||
@@ -433,28 +401,24 @@ CtrlBAckResponseHeader::SetType (BlockAckType type)
|
||||
void
|
||||
CtrlBAckResponseHeader::SetTidInfo (uint8_t tid)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << static_cast<uint32_t> (tid));
|
||||
m_tidInfo = static_cast<uint16_t> (tid);
|
||||
}
|
||||
|
||||
void
|
||||
CtrlBAckResponseHeader::SetStartingSequence (uint16_t seq)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seq);
|
||||
m_startingSeq = seq;
|
||||
}
|
||||
|
||||
bool
|
||||
CtrlBAckResponseHeader::MustSendHtImmediateAck (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (m_baAckPolicy) ? true : false;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
CtrlBAckResponseHeader::GetTidInfo (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
uint8_t tid = static_cast<uint8_t> (m_tidInfo);
|
||||
return tid;
|
||||
}
|
||||
@@ -462,35 +426,30 @@ CtrlBAckResponseHeader::GetTidInfo (void) const
|
||||
uint16_t
|
||||
CtrlBAckResponseHeader::GetStartingSequence (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_startingSeq;
|
||||
}
|
||||
|
||||
bool
|
||||
CtrlBAckResponseHeader::IsBasic (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (!m_multiTid && !m_compressed) ? true : false;
|
||||
}
|
||||
|
||||
bool
|
||||
CtrlBAckResponseHeader::IsCompressed (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (!m_multiTid && m_compressed) ? true : false;
|
||||
}
|
||||
|
||||
bool
|
||||
CtrlBAckResponseHeader::IsMultiTid (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (m_multiTid && m_compressed) ? true : false;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
CtrlBAckResponseHeader::GetBaControl (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
uint16_t res = 0;
|
||||
if (m_baAckPolicy)
|
||||
{
|
||||
@@ -511,7 +470,6 @@ CtrlBAckResponseHeader::GetBaControl (void) const
|
||||
void
|
||||
CtrlBAckResponseHeader::SetBaControl (uint16_t ba)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << ba);
|
||||
m_baAckPolicy = ((ba & 0x01) == 1) ? true : false;
|
||||
m_multiTid = (((ba >> 1) & 0x01) == 1) ? true : false;
|
||||
m_compressed = (((ba >> 2) & 0x01) == 1) ? true : false;
|
||||
@@ -521,21 +479,18 @@ CtrlBAckResponseHeader::SetBaControl (uint16_t ba)
|
||||
uint16_t
|
||||
CtrlBAckResponseHeader::GetStartingSequenceControl (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (m_startingSeq << 4) & 0xfff0;
|
||||
}
|
||||
|
||||
void
|
||||
CtrlBAckResponseHeader::SetStartingSequenceControl (uint16_t seqControl)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seqControl);
|
||||
m_startingSeq = (seqControl >> 4) & 0x0fff;
|
||||
}
|
||||
|
||||
Buffer::Iterator
|
||||
CtrlBAckResponseHeader::SerializeBitmap (Buffer::Iterator start) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &start);
|
||||
Buffer::Iterator i = start;
|
||||
if (!m_multiTid)
|
||||
{
|
||||
@@ -568,7 +523,6 @@ CtrlBAckResponseHeader::SerializeBitmap (Buffer::Iterator start) const
|
||||
Buffer::Iterator
|
||||
CtrlBAckResponseHeader::DeserializeBitmap (Buffer::Iterator start)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &start);
|
||||
Buffer::Iterator i = start;
|
||||
if (!m_multiTid)
|
||||
{
|
||||
@@ -601,7 +555,6 @@ CtrlBAckResponseHeader::DeserializeBitmap (Buffer::Iterator start)
|
||||
void
|
||||
CtrlBAckResponseHeader::SetReceivedPacket (uint16_t seq)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seq);
|
||||
if (!IsInBitmap (seq))
|
||||
{
|
||||
return;
|
||||
@@ -635,7 +588,6 @@ CtrlBAckResponseHeader::SetReceivedPacket (uint16_t seq)
|
||||
void
|
||||
CtrlBAckResponseHeader::SetReceivedFragment (uint16_t seq, uint8_t frag)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seq << static_cast<uint32_t> (frag));
|
||||
NS_ASSERT (frag < 16);
|
||||
if (!IsInBitmap (seq))
|
||||
{
|
||||
@@ -669,7 +621,6 @@ CtrlBAckResponseHeader::SetReceivedFragment (uint16_t seq, uint8_t frag)
|
||||
bool
|
||||
CtrlBAckResponseHeader::IsPacketReceived (uint16_t seq) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seq);
|
||||
if (!IsInBitmap (seq))
|
||||
{
|
||||
return false;
|
||||
@@ -704,7 +655,6 @@ CtrlBAckResponseHeader::IsPacketReceived (uint16_t seq) const
|
||||
bool
|
||||
CtrlBAckResponseHeader::IsFragmentReceived (uint16_t seq, uint8_t frag) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seq << static_cast<uint32_t> (frag));
|
||||
NS_ASSERT (frag < 16);
|
||||
if (!IsInBitmap (seq))
|
||||
{
|
||||
@@ -742,7 +692,6 @@ CtrlBAckResponseHeader::IsFragmentReceived (uint16_t seq, uint8_t frag) const
|
||||
uint8_t
|
||||
CtrlBAckResponseHeader::IndexInBitmap (uint16_t seq) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seq);
|
||||
uint8_t index;
|
||||
if (seq >= m_startingSeq)
|
||||
{
|
||||
@@ -759,28 +708,24 @@ CtrlBAckResponseHeader::IndexInBitmap (uint16_t seq) const
|
||||
bool
|
||||
CtrlBAckResponseHeader::IsInBitmap (uint16_t seq) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seq);
|
||||
return (seq - m_startingSeq + 4096) % 4096 < 64;
|
||||
}
|
||||
|
||||
const uint16_t*
|
||||
CtrlBAckResponseHeader::GetBitmap (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return bitmap.m_bitmap;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
CtrlBAckResponseHeader::GetCompressedBitmap (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return bitmap.m_compressedBitmap;
|
||||
}
|
||||
|
||||
void
|
||||
CtrlBAckResponseHeader::ResetBitmap (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
memset (&bitmap, 0, sizeof (bitmap));
|
||||
}
|
||||
|
||||
|
||||
@@ -20,12 +20,9 @@
|
||||
|
||||
#include "dcf.h"
|
||||
#include "ns3/uinteger.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Dcf");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (Dcf);
|
||||
|
||||
TypeId
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
*/
|
||||
|
||||
#include "dsss-parameter-set.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("DsssParameterSet");
|
||||
|
||||
DsssParameterSet::DsssParameterSet ()
|
||||
: m_currentChannel (0),
|
||||
m_dsssSupported (0)
|
||||
|
||||
@@ -19,13 +19,10 @@
|
||||
*/
|
||||
|
||||
#include "edca-parameter-set.h"
|
||||
#include "ns3/log.h"
|
||||
#include <cmath>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("EdcaParameterSet");
|
||||
|
||||
EdcaParameterSet::EdcaParameterSet ()
|
||||
: m_qosInfo (0),
|
||||
m_reserved (0),
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
*/
|
||||
|
||||
#include "erp-information.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("ErpInformation");
|
||||
|
||||
ErpInformation::ErpInformation ()
|
||||
: m_erpInformation (0),
|
||||
m_erpSupported (0)
|
||||
|
||||
@@ -20,12 +20,9 @@
|
||||
*/
|
||||
|
||||
#include "ht-capabilities.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("HtCapabilities");
|
||||
|
||||
HtCapabilities::HtCapabilities ()
|
||||
: m_ldpc (0),
|
||||
m_supportedChannelWidth (0),
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
*/
|
||||
|
||||
#include "ht-operation.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("HtOperation");
|
||||
|
||||
HtOperation::HtOperation ()
|
||||
: m_primaryChannel (0),
|
||||
m_secondaryChannelOffset (0),
|
||||
|
||||
@@ -23,16 +23,21 @@
|
||||
|
||||
#include "mac-tx-middle.h"
|
||||
#include "wifi-mac-header.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("MacTxMiddle");
|
||||
|
||||
MacTxMiddle::MacTxMiddle ()
|
||||
: m_sequence (0)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
MacTxMiddle::~MacTxMiddle ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
for (std::map<Mac48Address,uint16_t*>::iterator i = m_qosSequences.begin (); i != m_qosSequences.end (); i++)
|
||||
{
|
||||
delete [] i->second;
|
||||
@@ -42,6 +47,7 @@ MacTxMiddle::~MacTxMiddle ()
|
||||
uint16_t
|
||||
MacTxMiddle::GetNextSequenceNumberfor (const WifiMacHeader *hdr)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
uint16_t retval;
|
||||
if (hdr->IsQosData ()
|
||||
&& !hdr->GetAddr1 ().IsGroup ())
|
||||
@@ -80,6 +86,7 @@ MacTxMiddle::GetNextSequenceNumberfor (const WifiMacHeader *hdr)
|
||||
uint16_t
|
||||
MacTxMiddle::PeekNextSequenceNumberfor (const WifiMacHeader *hdr)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
uint16_t retval;
|
||||
if (hdr->IsQosData ()
|
||||
&& !hdr->GetAddr1 ().IsGroup ())
|
||||
@@ -106,6 +113,7 @@ MacTxMiddle::PeekNextSequenceNumberfor (const WifiMacHeader *hdr)
|
||||
uint16_t
|
||||
MacTxMiddle::GetNextSeqNumberByTidAndAddress (uint8_t tid, Mac48Address addr) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
NS_ASSERT (tid < 16);
|
||||
uint16_t seq = 0;
|
||||
std::map <Mac48Address,uint16_t*>::const_iterator it = m_qosSequences.find (addr);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("OnoeWifiRemoteStation");
|
||||
NS_LOG_COMPONENT_DEFINE ("OnoeWifiManager");
|
||||
|
||||
/**
|
||||
* \brief hold per-remote-station state for ONOE Wifi manager.
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
#define Min(a,b) ((a < b) ? a : b)
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("ns3::ParfWifiManager");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("ParfWifiManager");
|
||||
|
||||
/**
|
||||
* Hold per-remote-station state for PARF Wifi manager.
|
||||
*
|
||||
|
||||
@@ -139,6 +139,7 @@ RegularWifiMac::GetWifiRemoteStationManager () const
|
||||
HtCapabilities
|
||||
RegularWifiMac::GetHtCapabilities (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
HtCapabilities capabilities;
|
||||
capabilities.SetHtSupported (1);
|
||||
if (m_htSupported)
|
||||
@@ -178,6 +179,7 @@ RegularWifiMac::GetHtCapabilities (void) const
|
||||
VhtCapabilities
|
||||
RegularWifiMac::GetVhtCapabilities (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
VhtCapabilities capabilities;
|
||||
capabilities.SetVhtSupported (1);
|
||||
if (m_vhtSupported)
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
*/
|
||||
|
||||
#include "vht-capabilities.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("VhtCapabilities");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
*/
|
||||
|
||||
#include "vht-operation.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("VhtOperation");
|
||||
|
||||
VhtOperation::VhtOperation ()
|
||||
: m_channelWidth (0),
|
||||
m_channelCenterFrequencySegment0 (0),
|
||||
|
||||
@@ -18,13 +18,10 @@
|
||||
* Author: Mathieu Lacage, <mathieu.lacage@sophia.inria.fr>
|
||||
*/
|
||||
|
||||
#include "ns3/log.h"
|
||||
#include "wifi-channel.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("WifiChannel");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (WifiChannel);
|
||||
|
||||
TypeId
|
||||
|
||||
@@ -20,11 +20,13 @@
|
||||
|
||||
#include "wifi-mac.h"
|
||||
#include "dcf.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (WifiMac);
|
||||
NS_LOG_COMPONENT_DEFINE ("WifiMac");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (WifiMac);
|
||||
|
||||
Time
|
||||
WifiMac::GetDefaultMaxPropagationDelay (void)
|
||||
@@ -238,6 +240,7 @@ WifiMac::GetTypeId (void)
|
||||
void
|
||||
WifiMac::SetMaxPropagationDelay (Time delay)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << delay);
|
||||
m_maxPropagationDelay = delay;
|
||||
}
|
||||
|
||||
@@ -286,6 +289,7 @@ WifiMac::NotifyRxDrop (Ptr<const Packet> packet)
|
||||
void
|
||||
WifiMac::ConfigureStandard (WifiPhyStandard standard)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << standard);
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211a:
|
||||
@@ -325,6 +329,7 @@ WifiMac::ConfigureStandard (WifiPhyStandard standard)
|
||||
void
|
||||
WifiMac::Configure80211a (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
SetSifs (MicroSeconds (16));
|
||||
SetSlot (MicroSeconds (9));
|
||||
SetEifsNoDifs (MicroSeconds (16 + 44));
|
||||
@@ -336,6 +341,7 @@ WifiMac::Configure80211a (void)
|
||||
void
|
||||
WifiMac::Configure80211b (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
SetSifs (MicroSeconds (10));
|
||||
SetSlot (MicroSeconds (20));
|
||||
SetEifsNoDifs (MicroSeconds (10 + 304));
|
||||
@@ -347,6 +353,7 @@ WifiMac::Configure80211b (void)
|
||||
void
|
||||
WifiMac::Configure80211g (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
SetSifs (MicroSeconds (10));
|
||||
// Slot time defaults to the "long slot time" of 20 us in the standard
|
||||
// according to mixed 802.11b/g deployments. Short slot time is enabled
|
||||
@@ -362,6 +369,7 @@ WifiMac::Configure80211g (void)
|
||||
void
|
||||
WifiMac::Configure80211_10Mhz (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
SetSifs (MicroSeconds (32));
|
||||
SetSlot (MicroSeconds (13));
|
||||
SetEifsNoDifs (MicroSeconds (32 + 88));
|
||||
@@ -373,6 +381,7 @@ WifiMac::Configure80211_10Mhz (void)
|
||||
void
|
||||
WifiMac::Configure80211_5Mhz (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
SetSifs (MicroSeconds (64));
|
||||
SetSlot (MicroSeconds (21));
|
||||
SetEifsNoDifs (MicroSeconds (64 + 176));
|
||||
@@ -384,6 +393,7 @@ WifiMac::Configure80211_5Mhz (void)
|
||||
void
|
||||
WifiMac::Configure80211n_2_4Ghz (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Configure80211g ();
|
||||
SetRifs (MicroSeconds (2));
|
||||
SetBasicBlockAckTimeout (GetSifs () + GetSlot () + GetDefaultBasicBlockAckDelay () + GetDefaultMaxPropagationDelay () * 2);
|
||||
@@ -392,6 +402,7 @@ WifiMac::Configure80211n_2_4Ghz (void)
|
||||
void
|
||||
WifiMac::Configure80211n_5Ghz (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Configure80211a ();
|
||||
SetRifs (MicroSeconds (2));
|
||||
SetBasicBlockAckTimeout (GetSifs () + GetSlot () + GetDefaultBasicBlockAckDelay () + GetDefaultMaxPropagationDelay () * 2);
|
||||
@@ -401,12 +412,14 @@ WifiMac::Configure80211n_5Ghz (void)
|
||||
void
|
||||
WifiMac::Configure80211ac (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Configure80211n_5Ghz ();
|
||||
}
|
||||
|
||||
void
|
||||
WifiMac::ConfigureDcf (Ptr<Dcf> dcf, uint32_t cwmin, uint32_t cwmax, bool isDsss, AcIndex ac)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << dcf << cwmin << cwmax << isDsss << ac);
|
||||
/* see IEE802.11 section 7.3.2.29 */
|
||||
switch (ac)
|
||||
{
|
||||
|
||||
@@ -27,8 +27,6 @@ namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("WifiTxCurrentModel");
|
||||
|
||||
// ------------------------------------------------------------------------- //
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (WifiTxCurrentModel);
|
||||
|
||||
TypeId
|
||||
@@ -49,8 +47,6 @@ WifiTxCurrentModel::~WifiTxCurrentModel()
|
||||
{
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------- //
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (LinearWifiTxCurrentModel);
|
||||
|
||||
TypeId
|
||||
@@ -81,27 +77,32 @@ LinearWifiTxCurrentModel::GetTypeId (void)
|
||||
|
||||
LinearWifiTxCurrentModel::LinearWifiTxCurrentModel ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
LinearWifiTxCurrentModel::~LinearWifiTxCurrentModel()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
void
|
||||
LinearWifiTxCurrentModel::SetEta (double eta)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << eta);
|
||||
m_eta = eta;
|
||||
}
|
||||
|
||||
void
|
||||
LinearWifiTxCurrentModel::SetVoltage (double voltage)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << voltage);
|
||||
m_voltage = voltage;
|
||||
}
|
||||
|
||||
void
|
||||
LinearWifiTxCurrentModel::SetIdleCurrent (double idleCurrent)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << idleCurrent);
|
||||
m_idleCurrent = idleCurrent;
|
||||
}
|
||||
|
||||
@@ -126,9 +127,8 @@ LinearWifiTxCurrentModel::GetIdleCurrent (void) const
|
||||
double
|
||||
LinearWifiTxCurrentModel::CalcTxCurrent (double txPowerDbm) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << txPowerDbm);
|
||||
return DbmToW (txPowerDbm) / (m_voltage * m_eta) + m_idleCurrent;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------- //
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
Reference in New Issue
Block a user