branch merge
This commit is contained in:
@@ -94,11 +94,6 @@ AirtimeLinkMetricCalculator::CalculateMetric (Mac48Address peerAddress, Ptr<Mesh
|
||||
mac->GetPifs () + mac->GetSlot () + mac->GetEifsNoDifs () + //DIFS + SIFS + AckTxTime = PIFS + SLOT + EifsNoDifs
|
||||
mac->GetWifiPhy () ->CalculateTxDuration (m_testFrame->GetSize (), mode, WIFI_PREAMBLE_LONG)
|
||||
).GetMicroSeconds () / (10.24 * (1.0 - failAvg)));
|
||||
std::cout << "pure overhead is " << (uint32_t)((double)(/*Overhead + payload*/
|
||||
mac->GetPifs () + mac->GetSlot () + mac->GetEifsNoDifs ()
|
||||
).GetMicroSeconds ()/10.24) << "\n";
|
||||
std::cout << "mode is:" << mode.GetDataRate () << "\n";
|
||||
std::cout << "Metric is :" << metric << "\n";
|
||||
return metric;
|
||||
}
|
||||
} //namespace dot11s
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -724,6 +724,16 @@ MeshWifiInterfaceMac::TxFailed (WifiMacHeader const &hdr)
|
||||
{
|
||||
m_txErrCallback (hdr);
|
||||
}
|
||||
void
|
||||
MeshWifiInterfaceMac::DoStart ()
|
||||
{
|
||||
m_beaconDca->Start ();
|
||||
for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); i ++)
|
||||
{
|
||||
i->second->Start ();
|
||||
}
|
||||
WifiMac::DoStart ();
|
||||
}
|
||||
|
||||
void
|
||||
MeshWifiInterfaceMac::FinishConfigureStandard (enum WifiPhyStandard standard)
|
||||
|
||||
@@ -180,6 +180,8 @@ private:
|
||||
bool GetBeaconGeneration () const;
|
||||
/// Real d-tor
|
||||
virtual void DoDispose ();
|
||||
///Initiator at t=0
|
||||
void DoStart ();
|
||||
|
||||
private:
|
||||
typedef std::map<AccessClass, Ptr<DcaTxop> > Queues;
|
||||
|
||||
@@ -293,4 +293,11 @@ AdhocWifiMac::TxFailed (const WifiMacHeader &hdr)
|
||||
{
|
||||
m_txErrCallback (hdr);
|
||||
}
|
||||
void
|
||||
AdhocWifiMac::DoStart ()
|
||||
{
|
||||
m_dca->Start ();
|
||||
WifiMac::DoStart ();
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
@@ -82,6 +82,7 @@ public:
|
||||
private:
|
||||
// inherited from Object base class.
|
||||
virtual void DoDispose (void);
|
||||
void DoStart ();
|
||||
/* invoked by the MacLows. */
|
||||
void ForwardUp (Ptr<Packet> packet, const WifiMacHeader *hdr);
|
||||
AdhocWifiMac (const AdhocWifiMac & ctor_arg);
|
||||
|
||||
@@ -268,6 +268,13 @@ DcaTxop::NeedRts (Ptr<const Packet> packet, const WifiMacHeader *header)
|
||||
packet);
|
||||
}
|
||||
|
||||
void
|
||||
DcaTxop::DoStart ()
|
||||
{
|
||||
m_dcf->ResetCw ();
|
||||
m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ()));
|
||||
ns3::Dcf::DoStart ();
|
||||
}
|
||||
bool
|
||||
DcaTxop::NeedRtsRetransmission (void)
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ private:
|
||||
|
||||
// Inherited from ns3::Object
|
||||
Ptr<MacLow> Low (void);
|
||||
|
||||
void DoStart ();
|
||||
/* dcf notifications forwarded here */
|
||||
bool NeedsAccess (void) const;
|
||||
void NotifyAccessGranted (void);
|
||||
|
||||
@@ -1080,5 +1080,11 @@ EdcaTxopN::SendDelbaFrame (Mac48Address addr, uint8_t tid, bool byOriginator)
|
||||
|
||||
PushFront (packet, hdr);
|
||||
}
|
||||
|
||||
void
|
||||
EdcaTxopN::DoStart ()
|
||||
{
|
||||
m_dcf->ResetCw ();
|
||||
m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ()));
|
||||
ns3::Dcf::DoStart ();
|
||||
}
|
||||
} //namespace ns3
|
||||
|
||||
@@ -147,6 +147,7 @@ public:
|
||||
void SendDelbaFrame (Mac48Address addr, uint8_t tid, bool byOriginator);
|
||||
|
||||
private:
|
||||
void DoStart ();
|
||||
/**
|
||||
* This functions are used only to correctly set addresses in a-msdu subframe.
|
||||
* If aggregating sta is a STA (in an infrastructured network):
|
||||
|
||||
@@ -249,8 +249,7 @@ void
|
||||
MinstrelWifiManager::DoReportRxOk (WifiRemoteStation *st,
|
||||
double rxSnr, WifiMode txMode)
|
||||
{
|
||||
MinstrelWifiRemoteStation *station = (MinstrelWifiRemoteStation *)st;
|
||||
NS_LOG_DEBUG("DoReportRxOk m_txrate=" << station->m_txrate);
|
||||
NS_LOG_DEBUG("DoReportRxOk m_txrate=" << ((MinstrelWifiRemoteStation *)st)->m_txrate);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -603,6 +603,8 @@ NqapWifiMac::DoStart (void)
|
||||
{
|
||||
m_beaconEvent = Simulator::ScheduleNow (&NqapWifiMac::SendOneBeacon, this);
|
||||
}
|
||||
m_dca->Start ();
|
||||
m_beaconDca->Start ();
|
||||
WifiMac::DoStart ();
|
||||
}
|
||||
|
||||
|
||||
@@ -686,5 +686,10 @@ NqstaWifiMac::FinishConfigureStandard (enum WifiPhyStandard standard)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
NqstaWifiMac::DoStart ()
|
||||
{
|
||||
m_dca->Start ();
|
||||
WifiMac::DoStart ();
|
||||
}
|
||||
} // namespace ns3
|
||||
|
||||
@@ -119,6 +119,7 @@ private:
|
||||
BEACON_MISSED,
|
||||
REFUSED
|
||||
};
|
||||
void DoStart ();
|
||||
void SetBssid (Mac48Address bssid);
|
||||
void SetActiveProbing (bool enable);
|
||||
bool GetActiveProbing (void) const;
|
||||
|
||||
@@ -108,10 +108,6 @@ QadhocWifiMac::DoDispose (void)
|
||||
m_dcfManager = 0;
|
||||
m_low = 0;
|
||||
m_phy = 0;
|
||||
m_voEdca = 0;
|
||||
m_viEdca = 0;
|
||||
m_beEdca = 0;
|
||||
m_bkEdca = 0;
|
||||
m_stationManager = 0;
|
||||
for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i)
|
||||
{
|
||||
@@ -445,6 +441,15 @@ QadhocWifiMac::GetBEQueue (void) const
|
||||
{
|
||||
return m_queues.find (AC_BE)->second;
|
||||
}
|
||||
void
|
||||
QadhocWifiMac::DoStart ()
|
||||
{
|
||||
for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i)
|
||||
{
|
||||
i->second->Start ();
|
||||
}
|
||||
WifiMac::DoStart ();
|
||||
}
|
||||
|
||||
Ptr<EdcaTxopN>
|
||||
QadhocWifiMac::GetBKQueue (void) const
|
||||
|
||||
@@ -83,6 +83,7 @@ public:
|
||||
private:
|
||||
Callback<void, Ptr<Packet>, Mac48Address, Mac48Address> m_forwardUp;
|
||||
virtual void DoDispose (void);
|
||||
void DoStart ();
|
||||
void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr);
|
||||
void ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to);
|
||||
QadhocWifiMac &operator = (const QadhocWifiMac &);
|
||||
@@ -107,10 +108,6 @@ private:
|
||||
Ptr<EdcaTxopN> GetBKQueue (void) const;
|
||||
|
||||
Queues m_queues;
|
||||
Ptr<EdcaTxopN> m_voEdca;
|
||||
Ptr<EdcaTxopN> m_viEdca;
|
||||
Ptr<EdcaTxopN> m_beEdca;
|
||||
Ptr<EdcaTxopN> m_bkEdca;
|
||||
Ptr<MacLow> m_low;
|
||||
Ptr<WifiPhy> m_phy;
|
||||
Ptr<WifiRemoteStationManager> m_stationManager;
|
||||
|
||||
@@ -851,6 +851,11 @@ QapWifiMac::FinishConfigureStandard (enum WifiPhyStandard standard)
|
||||
void
|
||||
QapWifiMac::DoStart (void)
|
||||
{
|
||||
m_beaconDca->Start ();
|
||||
for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i)
|
||||
{
|
||||
i->second->Start ();
|
||||
}
|
||||
m_beaconEvent.Cancel ();
|
||||
if (m_enableBeaconGeneration)
|
||||
{
|
||||
|
||||
@@ -796,6 +796,15 @@ QstaWifiMac::SetQueue (enum AccessClass ac)
|
||||
edca->CompleteConfig ();
|
||||
m_queues.insert (std::make_pair(ac, edca));
|
||||
}
|
||||
void
|
||||
QstaWifiMac::DoStart ()
|
||||
{
|
||||
for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i)
|
||||
{
|
||||
i->second->Start ();
|
||||
}
|
||||
WifiMac::DoStart ();
|
||||
}
|
||||
|
||||
void
|
||||
QstaWifiMac::FinishConfigureStandard (enum WifiPhyStandard standard)
|
||||
|
||||
@@ -92,6 +92,7 @@ public:
|
||||
void StartActiveAssociation (void);
|
||||
|
||||
private:
|
||||
void DoStart ();
|
||||
void SetBssid (Mac48Address bssid);
|
||||
Mac48Address GetBroadcastBssid (void);
|
||||
void Receive (Ptr<Packet> p, const WifiMacHeader *hdr);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user