View | Details | Raw Unified | Return to bug 706
Collapse All | Expand All

(-)a/src/devices/mesh/mesh-wifi-interface-mac.cc (+10 lines)
 Lines 748-753    Link Here 
748
      break;
748
      break;
749
    }
749
    }
750
}
750
}
751
void
752
MeshWifiInterfaceMac::DoStart ()
753
{
754
  m_beaconDca->Start ();
755
  for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); i ++)
756
  {
757
    i->second->Start ();
758
  }
759
  WifiMac::DoStart ();
760
}
751
761
752
} // namespace ns3
762
} // namespace ns3
753
763
(-)a/src/devices/mesh/mesh-wifi-interface-mac.h (+2 lines)
 Lines 178-183    Link Here 
178
  bool GetBeaconGeneration () const;
178
  bool GetBeaconGeneration () const;
179
  /// Real d-tor
179
  /// Real d-tor
180
  virtual void DoDispose ();
180
  virtual void DoDispose ();
181
  ///Initiator at t=0
182
  void DoStart ();
181
183
182
private:
184
private:
183
  typedef std::map<AccessClass, Ptr<DcaTxop> > Queues;
185
  typedef std::map<AccessClass, Ptr<DcaTxop> > Queues;
(-)a/src/devices/wifi/adhoc-wifi-mac.cc (+7 lines)
 Lines 298-301    Link Here 
298
{
298
{
299
  m_txErrCallback (hdr);
299
  m_txErrCallback (hdr);
300
}
300
}
301
void
302
AdhocWifiMac::DoStart ()
303
{
304
  m_dca->Start ();
305
  WifiMac::DoStart ();
306
}
307
301
} // namespace ns3
308
} // namespace ns3
(-)a/src/devices/wifi/adhoc-wifi-mac.h (+1 lines)
 Lines 82-87    Link Here 
82
private:
82
private:
83
  // inherited from Object base class.
83
  // inherited from Object base class.
84
  virtual void DoDispose (void);
84
  virtual void DoDispose (void);
85
  void DoStart ();
85
  /* invoked by the MacLows. */
86
  /* invoked by the MacLows. */
86
  void ForwardUp (Ptr<Packet> packet, const WifiMacHeader *hdr);
87
  void ForwardUp (Ptr<Packet> packet, const WifiMacHeader *hdr);
87
  AdhocWifiMac (const AdhocWifiMac & ctor_arg);
88
  AdhocWifiMac (const AdhocWifiMac & ctor_arg);
(-)a/src/devices/wifi/dca-txop.cc (+8 lines)
 Lines 268-273    Link Here 
268
  return m_low;
268
  return m_low;
269
}
269
}
270
270
271
void
272
DcaTxop::DoStart ()
273
{
274
  m_dcf->ResetCw ();
275
  m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ()));
276
  NS_LOG_UNCOND ("Starting backoff!");
277
  ns3::Dcf::DoStart ();
278
}
271
bool
279
bool
272
DcaTxop::NeedRts (void)
280
DcaTxop::NeedRts (void)
273
{
281
{
(-)a/src/devices/wifi/dca-txop.h (-1 / +1 lines)
 Lines 121-127    Link Here 
121
121
122
  // Inherited from ns3::Object
122
  // Inherited from ns3::Object
123
  Ptr<MacLow> Low (void);
123
  Ptr<MacLow> Low (void);
124
124
  void DoStart ();
125
  /* dcf notifications forwarded here */
125
  /* dcf notifications forwarded here */
126
  bool NeedsAccess (void) const;
126
  bool NeedsAccess (void) const;
127
  void NotifyAccessGranted (void);
127
  void NotifyAccessGranted (void);
(-)a/src/devices/wifi/edca-txop-n.cc (-1 / +7 lines)
 Lines 686-690    Link Here 
686
{
686
{
687
  m_aggregator = aggr;
687
  m_aggregator = aggr;
688
}
688
}
689
689
void
690
EdcaTxopN::DoStart ()
691
{
692
  m_dcf->ResetCw ();
693
  m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ()));
694
  ns3::Dcf::DoStart ();
695
}
690
} //namespace ns3
696
} //namespace ns3
(-)a/src/devices/wifi/edca-txop-n.h (+1 lines)
 Lines 132-137    Link Here 
132
  void SetMsduAggregator (Ptr<MsduAggregator> aggr);
132
  void SetMsduAggregator (Ptr<MsduAggregator> aggr);
133
133
134
private:
134
private:
135
  void DoStart ();
135
  /**
136
  /**
136
   * This functions are used only to correctly set addresses in a-msdu subframe.
137
   * This functions are used only to correctly set addresses in a-msdu subframe.
137
   * If aggregating sta is a STA (in an infrastructured network):
138
   * If aggregating sta is a STA (in an infrastructured network):
(-)a/src/devices/wifi/nqap-wifi-mac.cc (+2 lines)
 Lines 606-611    Link Here 
606
    {
606
    {
607
      m_beaconEvent = Simulator::ScheduleNow (&NqapWifiMac::SendOneBeacon, this);
607
      m_beaconEvent = Simulator::ScheduleNow (&NqapWifiMac::SendOneBeacon, this);
608
    }
608
    }
609
  m_dca->Start ();
610
  m_beaconDca->Start ();
609
  WifiMac::DoStart ();
611
  WifiMac::DoStart ();
610
}
612
}
611
613
(-)a/src/devices/wifi/nqsta-wifi-mac.cc (-1 / +6 lines)
 Lines 686-690    Link Here 
686
      break;
686
      break;
687
    }
687
    }
688
}
688
}
689
689
void
690
NqstaWifiMac::DoStart ()
691
{
692
  m_dca->Start ();
693
  WifiMac::DoStart ();
694
}
690
} // namespace ns3
695
} // namespace ns3
(-)a/src/devices/wifi/nqsta-wifi-mac.h (+1 lines)
 Lines 119-124    Link Here 
119
    BEACON_MISSED,
119
    BEACON_MISSED,
120
    REFUSED
120
    REFUSED
121
  };
121
  };
122
  void DoStart ();
122
  void SetBssid (Mac48Address bssid);
123
  void SetBssid (Mac48Address bssid);
123
  void SetActiveProbing (bool enable);
124
  void SetActiveProbing (bool enable);
124
  bool GetActiveProbing (void) const;
125
  bool GetActiveProbing (void) const;
(-)a/src/devices/wifi/qadhoc-wifi-mac.cc (-4 / +9 lines)
 Lines 108-117    Link Here 
108
  m_dcfManager = 0;
108
  m_dcfManager = 0;
109
  m_low = 0;
109
  m_low = 0;
110
  m_phy = 0;
110
  m_phy = 0;
111
  m_voEdca = 0;
112
  m_viEdca = 0;
113
  m_beEdca = 0;
114
  m_bkEdca = 0;
115
  m_stationManager = 0;
111
  m_stationManager = 0;
116
  for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i)
112
  for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i)
117
    {
113
    {
 Lines 445-449    Link Here 
445
      break;
441
      break;
446
    }
442
    }
447
}
443
}
444
void
445
QadhocWifiMac::DoStart ()
446
{
447
  for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i)
448
    {
449
      i->second->Start ();
450
    }
451
  WifiMac::DoStart ();
452
}
448
453
449
} //namespace ns3
454
} //namespace ns3
(-)a/src/devices/wifi/qadhoc-wifi-mac.h (-4 / +1 lines)
 Lines 78-83    Link Here 
78
private:
78
private:
79
  Callback<void, Ptr<Packet>, Mac48Address, Mac48Address> m_forwardUp;
79
  Callback<void, Ptr<Packet>, Mac48Address, Mac48Address> m_forwardUp;
80
  virtual void DoDispose (void);
80
  virtual void DoDispose (void);
81
  void DoStart ();
81
  void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr);
82
  void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr);
82
  void ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to);
83
  void ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to);
83
  QadhocWifiMac &operator = (const QadhocWifiMac &);
84
  QadhocWifiMac &operator = (const QadhocWifiMac &);
 Lines 101-110    Link Here 
101
  Ptr<EdcaTxopN> GetBKQueue (void) const;
102
  Ptr<EdcaTxopN> GetBKQueue (void) const;
102
103
103
  Queues m_queues;
104
  Queues m_queues;
104
  Ptr<EdcaTxopN> m_voEdca;
105
  Ptr<EdcaTxopN> m_viEdca;
106
  Ptr<EdcaTxopN> m_beEdca;
107
  Ptr<EdcaTxopN> m_bkEdca;
108
  Ptr<MacLow> m_low;
105
  Ptr<MacLow> m_low;
109
  Ptr<WifiPhy> m_phy;
106
  Ptr<WifiPhy> m_phy;
110
  Ptr<WifiRemoteStationManager> m_stationManager;
107
  Ptr<WifiRemoteStationManager> m_stationManager;
(-)a/src/devices/wifi/qap-wifi-mac.cc (+5 lines)
 Lines 791-796    Link Here 
791
void
791
void
792
QapWifiMac::DoStart (void)
792
QapWifiMac::DoStart (void)
793
{
793
{
794
  m_beaconDca->Start ();
795
  for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i)
796
    {
797
      i->second->Start ();
798
    }
794
  m_beaconEvent.Cancel ();
799
  m_beaconEvent.Cancel ();
795
  if (m_enableBeaconGeneration)
800
  if (m_enableBeaconGeneration)
796
    {
801
    {
(-)a/src/devices/wifi/qsta-wifi-mac.cc (-1 / +9 lines)
 Lines 775-779    Link Here 
775
    }
775
    }
776
}
776
}
777
777
778
778
void
779
QstaWifiMac::DoStart ()
780
{
781
  for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i)
782
    {
783
      i->second->Start ();
784
    }
785
  WifiMac::DoStart ();
786
}
779
}  //namespace ns3
787
}  //namespace ns3
(-)a/src/devices/wifi/qsta-wifi-mac.h (+1 lines)
 Lines 87-92    Link Here 
87
  void StartActiveAssociation (void);
87
  void StartActiveAssociation (void);
88
88
89
private:
89
private:
90
  void DoStart ();
90
  void SetBssid (Mac48Address bssid);
91
  void SetBssid (Mac48Address bssid);
91
  Mac48Address GetBroadcastBssid (void);
92
  Mac48Address GetBroadcastBssid (void);
92
  void Receive (Ptr<Packet> p, const WifiMacHeader *hdr);
93
  void Receive (Ptr<Packet> p, const WifiMacHeader *hdr);

Return to bug 706