src/devices/wifi/mac-stations.cc
changeset 1906 c0901f40bd7e
parent 1893 d72388b06b22
child 1908 af48a02fe9a2
--- a/src/devices/wifi/mac-stations.cc	Wed Oct 03 15:46:28 2007 +0200
+++ b/src/devices/wifi/mac-stations.cc	Mon Oct 08 14:33:29 2007 +0200
@@ -20,7 +20,6 @@
  */
 
 #include "mac-stations.h"
-#include "mac-station.h"
 
 namespace ns3 {
 
@@ -51,4 +50,52 @@
   return station;
 }
 
-}; // namespace ns3
+} // namespace ns3
+
+/***************************************************************
+ *           MacStation below.
+ ***************************************************************/ 
+
+namespace ns3 {
+
+MacStation::MacStation ()
+  : m_state (DISASSOC)
+{}
+
+
+MacStation::~MacStation ()
+{}
+
+bool 
+MacStation::IsAssociated (void) const
+{
+  return m_state == GOT_ASSOC_TX_OK;
+}
+bool 
+MacStation::IsWaitAssocTxOk (void) const
+{
+  return m_state == WAIT_ASSOC_TX_OK;
+}
+void 
+MacStation::RecordWaitAssocTxOk (void)
+{
+  m_state = WAIT_ASSOC_TX_OK;
+}
+void 
+MacStation::RecordGotAssocTxOk (void)
+{
+  m_state = GOT_ASSOC_TX_OK;
+}
+void 
+MacStation::RecordGotAssocTxFailed (void)
+{
+  m_state = DISASSOC;
+}
+void 
+MacStation::RecordDisassociated (void)
+{
+  m_state = DISASSOC;
+}
+
+} // namespace ns3
+