src/devices/wifi/wifi-remote-station-manager.cc
changeset 4927 5f402ca784d1
parent 4918 00c83f6ae8b7
child 4958 8094a10e311d
--- a/src/devices/wifi/wifi-remote-station-manager.cc	Wed Apr 01 17:38:22 2009 +0400
+++ b/src/devices/wifi/wifi-remote-station-manager.cc	Wed Apr 01 17:50:19 2009 +0400
@@ -422,9 +422,7 @@
   : m_state (BRAND_NEW),
     m_ssrc (0),
     m_slrc (0)
-{
-	m_txStat = CreateObject<WifiTxStatistics> ();
-}
+{}
 WifiRemoteStation::~WifiRemoteStation ()
 {}
 
@@ -545,7 +543,7 @@
 WifiMode 
 WifiRemoteStation::GetAckMode (WifiMode dataMode)
 {
-  return dataMode;
+  return GetControlAnswerMode (dataMode);
 }
 
 uint32_t 
@@ -574,14 +572,12 @@
 {
   if (GetManager ()->IsLowLatency ())
     {
-      m_txStat->NotifyDataSent(fullPacketSize, DoGetDataMode (fullPacketSize).GetDataRate());
       return DoGetDataMode (fullPacketSize);
     }
   TxModeTag tag;
   bool found;
   found = ConstCast<Packet> (packet)->RemovePacketTag (tag);
   NS_ASSERT (found);
-  m_txStat->NotifyDataSent(fullPacketSize, tag.GetDataMode ().GetDataRate());
   return tag.GetDataMode ();
 }
 WifiMode 
@@ -589,14 +585,12 @@
 {
   if (GetManager ()->IsLowLatency ())
     {
-      m_txStat->NotifyDataSent(packet->GetSize() +36, DoGetRtsMode().GetDataRate());
       return DoGetRtsMode ();
     }
   TxModeTag tag;
   bool found;
   found = ConstCast<Packet> (packet)->RemovePacketTag (tag);
   NS_ASSERT (found);
-  m_txStat->NotifyDataSent(packet->GetSize() +36, tag.GetRtsMode ().GetDataRate());
   return tag.GetRtsMode ();
 }
 
@@ -699,7 +693,6 @@
 void 
 WifiRemoteStation::ReportRtsOk (double ctsSnr, WifiMode ctsMode, double rtsSnr)
 {
-  m_txStat->NotifyRtsSuccess(m_ssrc);
   m_ssrc = 0;
   DoReportRtsOk (ctsSnr, ctsMode, rtsSnr);
 }
@@ -707,7 +700,6 @@
 void 
 WifiRemoteStation::ReportDataOk (double ackSnr, WifiMode ackMode, double dataSnr)
 {
-  m_txStat->NotifyGotAck(m_slrc);
   m_slrc = 0;
   DoReportDataOk (ackSnr, ackMode, dataSnr);
 }
@@ -716,7 +708,6 @@
 WifiRemoteStation::ReportFinalRtsFailed (void)
 {
   m_ssrc = 0;
-  m_txStat->NotifyRtsFailed();
   DoReportFinalRtsFailed ();
 }
 
@@ -724,7 +715,6 @@
 WifiRemoteStation::ReportFinalDataFailed (void)
 {
   m_slrc = 0;
-  m_txStat->NotifyDataFailed();
   DoReportFinalDataFailed ();
 }
 
@@ -733,16 +723,5 @@
 {
   DoReportRxOk (rxSnr, txMode);
 }
-WifiTxStatistics::TX_STATISTICS
-WifiRemoteStation::GetTxStat()
-{
-	return m_txStat->GetTxStatRateLength();
-}
-void
-WifiRemoteStation::ResetTxStat()
-{
-	m_txStat->ResetStatistics();
-}
-
 } // namespace ns3