wifi: WifiTxTimer::FeedTraceSource methods do not need to be template class members
This commit is contained in:
@@ -116,10 +116,8 @@ WifiTxTimer::SetMpduResponseTimeoutCallback (MpduResponseTimeout callback) const
|
||||
m_mpduResponseTimeoutCallback = callback;
|
||||
}
|
||||
|
||||
template<>
|
||||
void
|
||||
WifiTxTimer::FeedTraceSource<Ptr<WifiMacQueueItem>, WifiTxVector> (Ptr<WifiMacQueueItem> item,
|
||||
WifiTxVector txVector)
|
||||
WifiTxTimer::FeedTraceSource (Ptr<WifiMacQueueItem> item, WifiTxVector txVector)
|
||||
{
|
||||
if (!m_mpduResponseTimeoutCallback.IsNull ())
|
||||
{
|
||||
@@ -133,10 +131,8 @@ WifiTxTimer::SetPsduResponseTimeoutCallback (PsduResponseTimeout callback) const
|
||||
m_psduResponseTimeoutCallback = callback;
|
||||
}
|
||||
|
||||
template<>
|
||||
void
|
||||
WifiTxTimer::FeedTraceSource<Ptr<WifiPsdu>, WifiTxVector> (Ptr<WifiPsdu> psdu,
|
||||
WifiTxVector txVector)
|
||||
WifiTxTimer::FeedTraceSource (Ptr<WifiPsdu> psdu, WifiTxVector txVector)
|
||||
{
|
||||
if (!m_psduResponseTimeoutCallback.IsNull ())
|
||||
{
|
||||
@@ -150,11 +146,9 @@ WifiTxTimer::SetPsduMapResponseTimeoutCallback (PsduMapResponseTimeout callback)
|
||||
m_psduMapResponseTimeoutCallback = callback;
|
||||
}
|
||||
|
||||
template<>
|
||||
void
|
||||
WifiTxTimer::FeedTraceSource<WifiPsduMap*, std::set<Mac48Address>*, std::size_t> (WifiPsduMap* psduMap,
|
||||
std::set<Mac48Address>* missingStations,
|
||||
std::size_t nTotalStations)
|
||||
WifiTxTimer::FeedTraceSource (WifiPsduMap* psduMap, std::set<Mac48Address>* missingStations,
|
||||
std::size_t nTotalStations)
|
||||
{
|
||||
if (!m_psduMapResponseTimeoutCallback.IsNull ())
|
||||
{
|
||||
|
||||
@@ -186,15 +186,33 @@ private:
|
||||
void Timeout (MEM mem_ptr, OBJ obj, Args... args);
|
||||
|
||||
/**
|
||||
* This method is called when the timer expires to feed the trace sources
|
||||
* reporting timeout events. This method does nothing, while its specializations
|
||||
* actually do the job of feeding the trace sources.
|
||||
* This method is called when the timer expires to feed the MPDU response
|
||||
* timeout callback.
|
||||
*
|
||||
* \tparam Args \deduced Type template parameter pack
|
||||
* \param args The arguments to pass to the trace sources
|
||||
* \param item the MPDU followed by no response
|
||||
* \param txVector the TXVECTOR used to transmit the MPDU
|
||||
*/
|
||||
template<typename... Args>
|
||||
void FeedTraceSource (Args... args);
|
||||
void FeedTraceSource (Ptr<WifiMacQueueItem> item, WifiTxVector txVector);
|
||||
|
||||
/**
|
||||
* This method is called when the timer expires to feed the PSDU response
|
||||
* timeout callback.
|
||||
*
|
||||
* \param psdu the PSDU followed by no response
|
||||
* \param txVector the TXVECTOR used to transmit the PSDU
|
||||
*/
|
||||
void FeedTraceSource (Ptr<WifiPsdu> psdu, WifiTxVector txVector);
|
||||
|
||||
/**
|
||||
* This method is called when the timer expires to feed the PSDU map response
|
||||
* timeout callback.
|
||||
*
|
||||
* \param psduMap the PSDU map for which not all responses were received
|
||||
* \param missingStations the set of stations that did not respond
|
||||
* \param nTotalStations the total number of expected responses
|
||||
*/
|
||||
void FeedTraceSource (WifiPsduMap* psduMap, std::set<Mac48Address>* missingStations,
|
||||
std::size_t nTotalStations);
|
||||
|
||||
EventId m_timeoutEvent; //!< the timeout event after a missing response
|
||||
Reason m_reason; //!< the reason why the timer was started
|
||||
@@ -212,50 +230,6 @@ private:
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* Declaration of member function template specialization.
|
||||
***************************************************************/
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* Explicit specialization of the FeedTraceSource member function template
|
||||
* that feeds the MPDU response timeout callback.
|
||||
*
|
||||
* \param item the MPDU followed by no response
|
||||
* \param txVector the TXVECTOR used to transmit the MPDU
|
||||
*/
|
||||
template<>
|
||||
void WifiTxTimer::FeedTraceSource<Ptr<WifiMacQueueItem>, WifiTxVector> (Ptr<WifiMacQueueItem> item,
|
||||
WifiTxVector txVector);
|
||||
|
||||
/**
|
||||
* Explicit specialization of the FeedTraceSource member function template
|
||||
* that feeds the PSDU response timeout callback.
|
||||
*
|
||||
* \param psdu the PSDU followed by no response
|
||||
* \param txVector the TXVECTOR used to transmit the PSDU
|
||||
*/
|
||||
template<>
|
||||
void WifiTxTimer::FeedTraceSource<Ptr<WifiPsdu>, WifiTxVector> (Ptr<WifiPsdu> psdu,
|
||||
WifiTxVector txVector);
|
||||
|
||||
/**
|
||||
* Explicit specialization of the FeedTraceSource member function template
|
||||
* that feeds the PSDU map response timeout callback.
|
||||
*
|
||||
* \param psduMap the PSDU map for which not all responses were received
|
||||
* \param missingStations the set of stations that did not respond
|
||||
* \param nTotalStations the total number of expected responses
|
||||
*/
|
||||
template<>
|
||||
void WifiTxTimer::FeedTraceSource<WifiPsduMap*, std::set<Mac48Address>*, std::size_t> (WifiPsduMap* psduMap,
|
||||
std::set<Mac48Address>* missingStations,
|
||||
std::size_t nTotalStations);
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* Implementation of the templates declared above.
|
||||
***************************************************************/
|
||||
@@ -287,12 +261,6 @@ WifiTxTimer::Timeout (MEM mem_ptr, OBJ obj, Args... args)
|
||||
((*obj).*mem_ptr)(std::forward<Args> (args)...);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
void
|
||||
WifiTxTimer::FeedTraceSource (Args... args)
|
||||
{
|
||||
}
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
#endif /* WIFI_TX_TIMER_H */
|
||||
|
||||
Reference in New Issue
Block a user