22 #include "ns3/wifi-remote-station-manager.h" 
   23 #include "ns3/wifi-mode.h" 
   24 #include "ns3/wifi-tx-vector.h" 
   33   static TypeId tid = 
TypeId (
"ns3::dot11s::AirtimeLinkMetricCalculator")
 
   35     .SetGroupName (
"Mesh")
 
   37     .AddAttribute ( 
"TestLength",
 
   38                     "Rate should be estimated using test length.",
 
   42                     MakeUintegerChecker<uint16_t> (1)
 
   44     .AddAttribute ( 
"Dot11MetricTid",
 
   45                     "TID used to calculate metric (data rate)",
 
   49                     MakeUintegerChecker<uint8_t> (0)
 
   68   m_testFrame = Create<Packet> (testLength + 6  + 36 );
 
   87   double failAvg = mac->GetWifiRemoteStationManager ()->GetInfo (peerAddress).GetFrameErrorRate ();
 
   91       return (uint32_t)0xffffffff;
 
   97   uint32_t metric = (uint32_t)((
double)( 
 
   98                                  mac->GetPifs () + mac->GetSlot () + mac->GetEifsNoDifs () + 
 
  100                                  ).GetMicroSeconds () / (10.24 * (1.0 - failAvg)));
 
Smart pointer class similar to boost::intrusive_ptr. 
 
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
 
uint32_t GetSize(void) const 
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
 
void SetHeaderTid(uint8_t tid)
 
uint32_t CalculateMetric(Mac48Address peerAddress, Ptr< MeshWifiInterfaceMac > mac)
 
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
 
AirtimeLinkMetricCalculator()
 
Hold an unsigned integer type. 
 
Airtime link metric calculator. 
 
static TypeId GetTypeId()
 
void SetTestLength(uint16_t testLength)
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
void SetMode(WifiMode mode)
Sets the selected payload transmission mode. 
 
Ptr< Packet > m_testFrame
 
A base class which provides memory management and object aggregation. 
 
WifiMacHeader m_testHeader
 
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
a unique identifier for an interface. 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId.