wifi: Add tests for A-MPDU reception
This commit is contained in:
@@ -269,7 +269,7 @@ void
|
||||
MacLow::ResetPhy (void)
|
||||
{
|
||||
m_phy->SetReceiveOkCallback (MakeNullCallback<void, Ptr<Packet>, double, WifiTxVector> ());
|
||||
m_phy->SetReceiveErrorCallback (MakeNullCallback<void> ());
|
||||
m_phy->SetReceiveErrorCallback (MakeNullCallback<void, Ptr<Packet>> ());
|
||||
RemovePhyMacLowListener (m_phy);
|
||||
m_phy = 0;
|
||||
}
|
||||
@@ -651,9 +651,9 @@ MacLow::NeedCtsToSelf (void) const
|
||||
}
|
||||
|
||||
void
|
||||
MacLow::ReceiveError (void)
|
||||
MacLow::ReceiveError (Ptr<Packet> packet)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
NS_LOG_FUNCTION (this << packet);
|
||||
NS_LOG_DEBUG ("rx failed");
|
||||
if (IsCfPeriod () && m_currentHdr.IsCfPoll ())
|
||||
{
|
||||
|
||||
@@ -334,10 +334,12 @@ public:
|
||||
*/
|
||||
void ReceiveOk (Ptr<Packet> packet, double rxSnr, WifiTxVector txVector, bool ampduSubframe);
|
||||
/**
|
||||
* \param packet packet received.
|
||||
*
|
||||
* This method is typically invoked by the lower PHY layer to notify
|
||||
* the MAC layer that a packet was unsuccessfully received.
|
||||
*/
|
||||
void ReceiveError (void);
|
||||
void ReceiveError (Ptr<Packet> packet);
|
||||
/**
|
||||
* \param duration switching delay duration.
|
||||
*
|
||||
|
||||
@@ -480,7 +480,7 @@ WifiPhyStateHelper::SwitchFromRxEndError (Ptr<Packet> packet, double snr)
|
||||
DoSwitchFromRx ();
|
||||
if (!m_rxErrorCallback.IsNull ())
|
||||
{
|
||||
m_rxErrorCallback ();
|
||||
m_rxErrorCallback (packet);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,8 +46,10 @@ class Packet;
|
||||
typedef Callback<void, Ptr<Packet>, double, WifiTxVector> RxOkCallback;
|
||||
/**
|
||||
* Callback if packet unsuccessfully received
|
||||
*
|
||||
* arg1: packet received unsuccessfully
|
||||
*/
|
||||
typedef Callback<void> RxErrorCallback;
|
||||
typedef Callback<void, Ptr<Packet>> RxErrorCallback;
|
||||
|
||||
/**
|
||||
* \ingroup wifi
|
||||
|
||||
@@ -79,8 +79,9 @@ protected:
|
||||
void SpectrumWifiPhyRxSuccess (Ptr<Packet> p, double snr, WifiTxVector txVector);
|
||||
/**
|
||||
* Spectrum wifi receive failure function
|
||||
*/
|
||||
void SpectrumWifiPhyRxFailure (void);
|
||||
* \param p the packet
|
||||
- */
|
||||
void SpectrumWifiPhyRxFailure (Ptr<Packet> p);
|
||||
uint32_t m_count; ///< count
|
||||
|
||||
private:
|
||||
@@ -144,9 +145,9 @@ SpectrumWifiPhyBasicTest::SpectrumWifiPhyRxSuccess (Ptr<Packet> p, double snr, W
|
||||
}
|
||||
|
||||
void
|
||||
SpectrumWifiPhyBasicTest::SpectrumWifiPhyRxFailure (void)
|
||||
SpectrumWifiPhyBasicTest::SpectrumWifiPhyRxFailure (Ptr<Packet> p)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
NS_LOG_FUNCTION (this << p);
|
||||
m_count++;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -78,8 +78,9 @@ protected:
|
||||
virtual void RxSuccess (Ptr<Packet> p, double snr, WifiTxVector txVector);
|
||||
/**
|
||||
* PHY receive failure callback function
|
||||
* \param p the packet
|
||||
*/
|
||||
virtual void RxFailure (void);
|
||||
virtual void RxFailure (Ptr<Packet> p);
|
||||
/**
|
||||
* PHY dropped packet callback function
|
||||
* \param p the packet
|
||||
@@ -183,9 +184,9 @@ WifiPhyThresholdsTest::RxSuccess (Ptr<Packet> p, double snr, WifiTxVector txVect
|
||||
}
|
||||
|
||||
void
|
||||
WifiPhyThresholdsTest::RxFailure (void)
|
||||
WifiPhyThresholdsTest::RxFailure (Ptr<Packet> p)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
NS_LOG_FUNCTION (this << p);
|
||||
m_rxFailure++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user