src/devices/wifi/mac-stations.cc
changeset 1980 3fa3bac40b5b
parent 1975 32e6677b99fb
child 1983 a6306f2e88a7
--- a/src/devices/wifi/mac-stations.cc	Tue Oct 16 18:09:49 2007 +0200
+++ b/src/devices/wifi/mac-stations.cc	Wed Oct 17 12:00:43 2007 +0200
@@ -20,6 +20,9 @@
 
 #include "mac-stations.h"
 #include "ns3/assert.h"
+#include "ns3/log.h"
+
+NS_LOG_COMPONENT_DEFINE ("MacStations");
 
 namespace ns3 {
 
@@ -77,11 +80,15 @@
 WifiMode 
 NonUnicastMacStation::GetDataMode (uint32_t size)
 {
-  return m_stations->GetBasicMode (0);
+  WifiMode mode = m_stations->GetBasicMode (0);
+  NS_LOG_DEBUG ("non-unicast size="<<size<<", mode="<<mode);
+  return mode;
 }
 WifiMode 
 NonUnicastMacStation::GetRtsMode (void)
 {
+  NS_ASSERT (false);
+  // theoretically, no rts for broadcast/multicast packets.
   return m_stations->GetBasicMode (0);
 }
 MacStations *
@@ -152,6 +159,7 @@
 WifiMode 
 MacStations::GetBasicMode (uint32_t i) const
 {
+  NS_ASSERT (i < m_basicModes.size ());
   return m_basicModes[i-1];
 }
 MacStations::BasicModesIterator