A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
regular-wifi-mac.cc
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 #include "regular-wifi-mac.h"
21 
22 #include "ns3/log.h"
23 #include "ns3/boolean.h"
24 #include "ns3/pointer.h"
25 #include "ns3/uinteger.h"
26 #include "ns3/trace-source-accessor.h"
27 
28 #include "mac-rx-middle.h"
29 #include "mac-tx-middle.h"
30 #include "mac-low.h"
31 #include "dcf.h"
32 #include "dcf-manager.h"
33 #include "wifi-phy.h"
34 
35 #include "msdu-aggregator.h"
36 
37 NS_LOG_COMPONENT_DEFINE ("RegularWifiMac");
38 
39 namespace ns3 {
40 
41 NS_OBJECT_ENSURE_REGISTERED (RegularWifiMac);
42 
43 RegularWifiMac::RegularWifiMac ()
44 {
45  NS_LOG_FUNCTION (this);
46  m_rxMiddle = new MacRxMiddle ();
47  m_rxMiddle->SetForwardCallback (MakeCallback (&RegularWifiMac::Receive, this));
48 
49  m_txMiddle = new MacTxMiddle ();
50 
51  m_low = CreateObject<MacLow> ();
52  m_low->SetRxCallback (MakeCallback (&MacRxMiddle::Receive, m_rxMiddle));
53 
54  m_dcfManager = new DcfManager ();
55  m_dcfManager->SetupLowListener (m_low);
56 
57  m_dca = CreateObject<DcaTxop> ();
58  m_dca->SetLow (m_low);
59  m_dca->SetManager (m_dcfManager);
60  m_dca->SetTxOkCallback (MakeCallback (&RegularWifiMac::TxOk, this));
61  m_dca->SetTxFailedCallback (MakeCallback (&RegularWifiMac::TxFailed, this));
62 
63  m_spectrumManager = NULL;
64  // Construct the EDCAFs. The ordering is important - highest
65  // priority (see Table 9-1 in IEEE 802.11-2007) must be created
66  // first.
71 }
72 
73 RegularWifiMac::~RegularWifiMac ()
74 {
75  NS_LOG_FUNCTION (this);
76 }
77 
78 void
80 {
81  NS_LOG_FUNCTION (this);
82 
83  m_dca->Initialize ();
84 
85  for (EdcaQueues::iterator i = m_edca.begin (); i != m_edca.end (); ++i)
86  {
87  i->second->Initialize ();
88  }
89 }
90 
91 void
93 {
94  NS_LOG_FUNCTION (this);
95  delete m_rxMiddle;
96  m_rxMiddle = NULL;
97 
98  delete m_txMiddle;
99  m_txMiddle = NULL;
100 
101  delete m_dcfManager;
102  m_dcfManager = NULL;
103 
104  m_low->Dispose ();
105  m_low = NULL;
106 
107  m_phy = NULL;
108  m_stationManager = NULL;
109 
110  m_dca->Dispose ();
111  m_dca = NULL;
112 
113  if (m_spectrumManager != NULL)
114  {
115  delete m_spectrumManager;
116  m_spectrumManager = NULL;
117  }
118 
119  for (EdcaQueues::iterator i = m_edca.begin (); i != m_edca.end (); ++i)
120  {
121  i->second = NULL;
122  }
123 }
124 
125 void
127 {
128  NS_LOG_FUNCTION (this << stationManager);
129  m_stationManager = stationManager;
130  m_low->SetWifiRemoteStationManager (stationManager);
131 
132  m_dca->SetWifiRemoteStationManager (stationManager);
133 
134  for (EdcaQueues::iterator i = m_edca.begin (); i != m_edca.end (); ++i)
135  {
136  i->second->SetWifiRemoteStationManager (stationManager);
137  }
138 }
139 
142 {
143  return m_stationManager;
144 }
145 
146 void
148 {
149  NS_LOG_FUNCTION (this << ac);
150 
151  // Our caller shouldn't be attempting to setup a queue that is
152  // already configured.
153  NS_ASSERT (m_edca.find (ac) == m_edca.end ());
154 
155  Ptr<EdcaTxopN> edca = CreateObject<EdcaTxopN> ();
156  edca->SetLow (m_low);
157  edca->SetManager (m_dcfManager);
158  edca->SetTxMiddle (m_txMiddle);
159  edca->SetTxOkCallback (MakeCallback (&RegularWifiMac::TxOk, this));
160  edca->SetTxFailedCallback (MakeCallback (&RegularWifiMac::TxFailed, this));
161  edca->SetAccessCategory (ac);
162  edca->CompleteConfig ();
163  m_edca.insert (std::make_pair (ac, edca));
164 }
165 
166 void
168 {
169  NS_LOG_FUNCTION (this << type);
170  for (EdcaQueues::iterator i = m_edca.begin (); i != m_edca.end (); ++i)
171  {
172  i->second->SetTypeOfStation (type);
173  }
174 }
175 
178 {
179  return m_dca;
180 }
181 
184 {
185  return m_edca.find (AC_VO)->second;
186 }
187 
190 {
191  return m_edca.find (AC_VI)->second;
192 }
193 
196 {
197  return m_edca.find (AC_BE)->second;
198 }
199 
202 {
203  return m_edca.find (AC_BK)->second;
204 }
205 
206 void
208 {
209  NS_LOG_FUNCTION (this << phy);
210  m_phy = phy;
211  m_dcfManager->SetupPhyListener (phy);
212  m_low->SetPhy (phy);
213 }
214 
217 {
218  return m_phy;
219 }
220 
221 void
223 {
224  NS_LOG_FUNCTION (this);
225  m_forwardUp = upCallback;
226 }
227 
228 void
230 {
231  NS_LOG_FUNCTION (this);
232  m_linkUp = linkUp;
233 }
234 
235 void
237 {
238  NS_LOG_FUNCTION (this);
239  m_linkDown = linkDown;
240 }
241 
242 void
244 {
245  NS_LOG_FUNCTION (this);
246  m_qosSupported = enable;
247 }
248 
249 bool
251 {
252  return m_qosSupported;
253 }
254 
255 void
257 {
258  NS_LOG_FUNCTION (this << slotTime);
259  m_dcfManager->SetSlot (slotTime);
260  m_low->SetSlotTime (slotTime);
261 }
262 
263 Time
265 {
266  return m_low->GetSlotTime ();
267 }
268 
269 void
271 {
272  NS_LOG_FUNCTION (this << sifs);
273  m_dcfManager->SetSifs (sifs);
274  m_low->SetSifs (sifs);
275 }
276 
277 Time
279 {
280  return m_low->GetSifs ();
281 }
282 
283 void
285 {
286  NS_LOG_FUNCTION (this << eifsNoDifs);
287  m_dcfManager->SetEifsNoDifs (eifsNoDifs);
288 }
289 
290 Time
292 {
293  return m_dcfManager->GetEifsNoDifs ();
294 }
295 
296 void
298 {
299  NS_LOG_FUNCTION (this << pifs);
300  m_low->SetPifs (pifs);
301 }
302 
303 Time
305 {
306  return m_low->GetPifs ();
307 }
308 
309 void
311 {
312  NS_LOG_FUNCTION (this << ackTimeout);
313  m_low->SetAckTimeout (ackTimeout);
314 }
315 
316 Time
318 {
319  return m_low->GetAckTimeout ();
320 }
321 
322 void
324 {
325  NS_LOG_FUNCTION (this << ctsTimeout);
326  m_low->SetCtsTimeout (ctsTimeout);
327 }
328 
329 Time
331 {
332  return m_low->GetCtsTimeout ();
333 }
334 
335 void
336 RegularWifiMac::SetBasicBlockAckTimeout (Time blockAckTimeout)
337 {
338  NS_LOG_FUNCTION (this << blockAckTimeout);
339  m_low->SetBasicBlockAckTimeout (blockAckTimeout);
340 }
341 
342 Time
343 RegularWifiMac::GetBasicBlockAckTimeout (void) const
344 {
345  return m_low->GetBasicBlockAckTimeout ();
346 }
347 
348 void
349 RegularWifiMac::SetCompressedBlockAckTimeout (Time blockAckTimeout)
350 {
351  NS_LOG_FUNCTION (this << blockAckTimeout);
352  m_low->SetCompressedBlockAckTimeout (blockAckTimeout);
353 }
354 
355 Time
356 RegularWifiMac::GetCompressedBlockAckTimeout (void) const
357 {
358  return m_low->GetCompressedBlockAckTimeout ();
359 }
360 
361 void
363 {
364  NS_LOG_FUNCTION (this << address);
365  m_low->SetAddress (address);
366 }
367 
370 {
371  return m_low->GetAddress ();
372 }
373 
374 void
376 {
377  NS_LOG_FUNCTION (this << ssid);
378  m_ssid = ssid;
379 }
380 
381 Ssid
383 {
384  return m_ssid;
385 }
386 
387 void
389 {
390  NS_LOG_FUNCTION (this << bssid);
391  m_low->SetBssid (bssid);
392 }
393 
396 {
397  return m_low->GetBssid ();
398 }
399 
400 void
402 {
403  m_low->SetPromisc ();
404 }
405 
406 void
408  Mac48Address to, Mac48Address from)
409 {
410  // We expect RegularWifiMac subclasses which do support forwarding (e.g.,
411  // AP) to override this method. Therefore, we throw a fatal error if
412  // someone tries to invoke this method on a class which has not done
413  // this.
414  NS_FATAL_ERROR ("This MAC entity (" << this << ", " << GetAddress ()
415  << ") does not support Enqueue() with from address");
416 }
417 
418 bool
419 RegularWifiMac::SupportsSendFrom (void) const
420 {
421  return false;
422 }
423 
424 void
425 RegularWifiMac::ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to)
426 {
427  NS_LOG_FUNCTION (this << packet << from);
428  m_forwardUp (packet, from, to);
429 }
430 
431 void
433 {
434  NS_LOG_FUNCTION (this << packet << hdr);
435 
436  Mac48Address to = hdr->GetAddr1 ();
437  Mac48Address from = hdr->GetAddr2 ();
438 
439  // We don't know how to deal with any frame that is not addressed to
440  // us (and odds are there is nothing sensible we could do anyway),
441  // so we ignore such frames.
442  //
443  // The derived class may also do some such filtering, but it doesn't
444  // hurt to have it here too as a backstop.
445  if (to != GetAddress ())
446  {
447  return;
448  }
449 
450  if (hdr->IsMgt () && hdr->IsAction ())
451  {
452  // There is currently only any reason for Management Action
453  // frames to be flying about if we are a QoS STA.
455 
456  WifiActionHeader actionHdr;
457  packet->RemoveHeader (actionHdr);
458 
459  switch (actionHdr.GetCategory ())
460  {
461  case WifiActionHeader::BLOCK_ACK:
462 
463  switch (actionHdr.GetAction ().blockAck)
464  {
465  case WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST:
466  {
467  MgtAddBaRequestHeader reqHdr;
468  packet->RemoveHeader (reqHdr);
469 
470  // We've received an ADDBA Request. Our policy here is
471  // to automatically accept it, so we get the ADDBA
472  // Response on it's way immediately.
473  SendAddBaResponse (&reqHdr, from);
474  // This frame is now completely dealt with, so we're done.
475  return;
476  }
477 
478  case WifiActionHeader::BLOCK_ACK_ADDBA_RESPONSE:
479  {
480  MgtAddBaResponseHeader respHdr;
481  packet->RemoveHeader (respHdr);
482 
483  // We've received an ADDBA Response. We assume that it
484  // indicates success after an ADDBA Request we have
485  // sent (we could, in principle, check this, but it
486  // seems a waste given the level of the current model)
487  // and act by locally establishing the agreement on
488  // the appropriate queue.
489  AcIndex ac = QosUtilsMapTidToAc (respHdr.GetTid ());
490  m_edca[ac]->GotAddBaResponse (&respHdr, from);
491  // This frame is now completely dealt with, so we're done.
492  return;
493  }
494 
495  case WifiActionHeader::BLOCK_ACK_DELBA:
496  {
497  MgtDelBaHeader delBaHdr;
498  packet->RemoveHeader (delBaHdr);
499 
500  if (delBaHdr.IsByOriginator ())
501  {
502  // This DELBA frame was sent by the originator, so
503  // this means that an ingoing established
504  // agreement exists in MacLow and we need to
505  // destroy it.
506  m_low->DestroyBlockAckAgreement (from, delBaHdr.GetTid ());
507  }
508  else
509  {
510  // We must have been the originator. We need to
511  // tell the correct queue that the agreement has
512  // been torn down
513  AcIndex ac = QosUtilsMapTidToAc (delBaHdr.GetTid ());
514  m_edca[ac]->GotDelBaFrame (&delBaHdr, from);
515  }
516  // This frame is now completely dealt with, so we're done.
517  return;
518  }
519 
520  default:
521  NS_FATAL_ERROR ("Unsupported Action field in Block Ack Action frame");
522  }
523 
524  default:
525  NS_FATAL_ERROR ("Unsupported Action frame received");
526  }
527  }
528  NS_FATAL_ERROR ("Don't know how to handle frame (type=" << hdr->GetType ());
529 }
530 
531 void
533 {
534  NS_LOG_FUNCTION (this);
535  m_dca->RestartAccessIfNeeded();
536 }
537 
538 void
540  const WifiMacHeader *hdr)
541 {
542  MsduAggregator::DeaggregatedMsdus packets =
543  MsduAggregator::Deaggregate (aggregatedPacket);
544 
545  for (MsduAggregator::DeaggregatedMsdusCI i = packets.begin ();
546  i != packets.end (); ++i)
547  {
548  ForwardUp ((*i).first, (*i).second.GetSourceAddr (),
549  (*i).second.GetDestinationAddr ());
550  }
551 }
552 
553 void
555  Mac48Address originator)
556 {
557  NS_LOG_FUNCTION (this);
558  WifiMacHeader hdr;
559  hdr.SetAction ();
560  hdr.SetAddr1 (originator);
561  hdr.SetAddr2 (GetAddress ());
562  hdr.SetAddr3 (GetAddress ());
563  hdr.SetDsNotFrom ();
564  hdr.SetDsNotTo ();
565 
566  MgtAddBaResponseHeader respHdr;
567  StatusCode code;
568  code.SetSuccess ();
569  respHdr.SetStatusCode (code);
570  //Here a control about queues type?
571  respHdr.SetAmsduSupport (reqHdr->IsAmsduSupported ());
572 
573  if (reqHdr->IsImmediateBlockAck ())
574  {
575  respHdr.SetImmediateBlockAck ();
576  }
577  else
578  {
579  respHdr.SetDelayedBlockAck ();
580  }
581  respHdr.SetTid (reqHdr->GetTid ());
582  // For now there's not no control about limit of reception. We
583  // assume that receiver has no limit on reception. However we assume
584  // that a receiver sets a bufferSize in order to satisfy next
585  // equation: (bufferSize + 1) % 16 = 0 So if a recipient is able to
586  // buffer a packet, it should be also able to buffer all possible
587  // packet's fragments. See section 7.3.1.14 in IEEE802.11e for more
588  // details.
589  respHdr.SetBufferSize (1023);
590  respHdr.SetTimeout (reqHdr->GetTimeout ());
591 
592  WifiActionHeader actionHdr;
594  action.blockAck = WifiActionHeader::BLOCK_ACK_ADDBA_RESPONSE;
595  actionHdr.SetAction (WifiActionHeader::BLOCK_ACK, action);
596 
597  Ptr<Packet> packet = Create<Packet> ();
598  packet->AddHeader (respHdr);
599  packet->AddHeader (actionHdr);
600 
601  // We need to notify our MacLow object as it will have to buffer all
602  // correctly received packets for this Block Ack session
603  m_low->CreateBlockAckAgreement (&respHdr, originator,
604  reqHdr->GetStartingSequence ());
605 
606  // It is unclear which queue this frame should go into. For now we
607  // bung it into the queue corresponding to the TID for which we are
608  // establishing an agreement, and push it to the head.
609  m_edca[QosUtilsMapTidToAc (reqHdr->GetTid ())]->PushFront (packet, hdr);
610 }
611 
612 TypeId
613 RegularWifiMac::GetTypeId (void)
614 {
615  static TypeId tid = TypeId ("ns3::RegularWifiMac")
616  .SetParent<WifiMac> ()
617  .AddAttribute ("QosSupported",
618  "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA",
619  BooleanValue (false),
620  MakeBooleanAccessor (&RegularWifiMac::SetQosSupported,
622  MakeBooleanChecker ())
623  .AddAttribute ("DcaTxop", "The DcaTxop object",
624  PointerValue (),
625  MakePointerAccessor (&RegularWifiMac::GetDcaTxop),
626  MakePointerChecker<DcaTxop> ())
627  .AddAttribute ("VO_EdcaTxopN",
628  "Queue that manages packets belonging to AC_VO access class",
629  PointerValue (),
630  MakePointerAccessor (&RegularWifiMac::GetVOQueue),
631  MakePointerChecker<EdcaTxopN> ())
632  .AddAttribute ("VI_EdcaTxopN",
633  "Queue that manages packets belonging to AC_VI access class",
634  PointerValue (),
635  MakePointerAccessor (&RegularWifiMac::GetVIQueue),
636  MakePointerChecker<EdcaTxopN> ())
637  .AddAttribute ("BE_EdcaTxopN",
638  "Queue that manages packets belonging to AC_BE access class",
639  PointerValue (),
640  MakePointerAccessor (&RegularWifiMac::GetBEQueue),
641  MakePointerChecker<EdcaTxopN> ())
642  .AddAttribute ("BK_EdcaTxopN",
643  "Queue that manages packets belonging to AC_BK access class",
644  PointerValue (),
645  MakePointerAccessor (&RegularWifiMac::GetBKQueue),
646  MakePointerChecker<EdcaTxopN> ())
647  .AddAttribute ("SensingTime",
648  "The sensing time of the node",
649  TimeValue(MilliSeconds(100)),
650  MakeTimeAccessor(&RegularWifiMac::m_snsInterval),
651  MakeTimeChecker())
652  .AddAttribute ("TransmissionTime",
653  "The transmission time of the node",
654  TimeValue(Seconds(1.0)),
655  MakeTimeAccessor(&RegularWifiMac::m_txInterval),
656  MakeTimeChecker())
657  .AddAttribute ("ProbabilityMisDetect",
658  "The probability that a node mis-detects a Primary User",
659  DoubleValue(0.1),
660  MakeDoubleAccessor(&RegularWifiMac::m_probMisdetect),
661  MakeDoubleChecker<double>())
662  .AddTraceSource ( "TxOkHeader",
663  "The header of successfully transmitted packet",
664  MakeTraceSourceAccessor (&RegularWifiMac::m_txOkCallback))
665  .AddTraceSource ("TxErrHeader",
666  "The header of unsuccessfully transmitted packet",
667  MakeTraceSourceAccessor (&RegularWifiMac::m_txErrCallback))
668  ;
669 
670  return tid;
671 }
672 
673 void
675 {
676  uint32_t cwmin;
677  uint32_t cwmax;
678 
679  switch (standard)
680  {
683  cwmin = 15;
684  cwmax = 511;
685  break;
686 
692  cwmin = 15;
693  cwmax = 1023;
694  break;
695 
697  cwmin = 31;
698  cwmax = 1023;
699  break;
700 
701  default:
702  NS_FATAL_ERROR ("Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()");
703  }
704 
705  // The special value of AC_BE_NQOS which exists in the Access
706  // Category enumeration allows us to configure plain old DCF.
707  ConfigureDcf (m_dca, cwmin, cwmax, AC_BE_NQOS);
708 
709  // Now we configure the EDCA functions
710  for (EdcaQueues::iterator i = m_edca.begin (); i != m_edca.end (); ++i)
711  {
712  // Special configuration for 802.11p CCH
713  if (standard == WIFI_PHY_STANDARD_80211p_CCH)
714  {
715  ConfigureCCHDcf (i->second, cwmin, cwmax, i->first);
716  }
717  else
718  {
719  ConfigureDcf (i->second, cwmin, cwmax, i->first);
720  }
721  }
722 }
723 
724 void
725 RegularWifiMac::TxOk (const WifiMacHeader &hdr)
726 {
727  NS_LOG_FUNCTION (this << hdr);
728  m_txOkCallback (hdr);
729 }
730 
731 void
732 RegularWifiMac::TxFailed (const WifiMacHeader &hdr)
733 {
734  NS_LOG_FUNCTION (this << hdr);
735  m_txErrCallback (hdr);
736 }
737 
738 bool
739 RegularWifiMac::IsTxRadio()
740 {
741  return m_low->IsTxRadio();
742 }
743 
744 void
745 RegularWifiMac::SetTxRadio(bool isTx)
746 {
747  m_low->SetTxRadio(isTx);
748 }
749 
750 bool
751 RegularWifiMac::IsRxRadio()
752 {
753  return m_low->IsRxRadio();
754 }
755 
756 void
757 RegularWifiMac::SetRxRadio(bool isRx, Ptr<Node> node, Ptr<Repository> repo,
758  Ptr<PUModel> puModel, Ptr<WifiPhy> wifiPhy)
759 {
760  m_node = node;
761  if (m_spectrumManager == NULL)
762  {
763  m_spectrumManager = new SpectrumManager(this, wifiPhy, m_node->GetId(), m_snsInterval, m_txInterval);
764  m_spectrumManager->SetPuModel(m_probMisdetect, puModel);
765  m_spectrumManager->SetRepository(repo);
766  m_spectrumManager->Start();
767  }
768  m_low->SetRxRadio(isRx);
769 }
770 
771 } // namespace ns3
void SetQosSupported(bool enable)
uint32_t RemoveHeader(Header &header)
Definition: packet.cc:285
keep track of time unit.
Definition: nstime.h:149
void SetSifs(Time sifs)
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
#define NS_LOG_FUNCTION(parameters)
Definition: log.h:311
Hold a bool native type.
Definition: boolean.h:38
virtual void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > stationManager)
void SetPifs(Time pifs)
#define NS_ASSERT(condition)
Definition: assert.h:64
void SetPuModel(double prob, Ptr< PUModel > p)
#define NS_LOG_COMPONENT_DEFINE(name)
Definition: log.h:122
virtual void SetSsid(Ssid ssid)
void SetSlot(Time slotTime)
bool GetQosSupported() const
virtual void DeaggregateAmsduAndForward(Ptr< Packet > aggregatedPacket, const WifiMacHeader *hdr)
virtual void SetLinkDownCallback(Callback< void > linkDown)
virtual Ssid GetSsid(void) const
virtual void Enqueue(Ptr< const Packet > packet, Mac48Address to, Mac48Address from)
virtual void Receive(Ptr< Packet > packet, const WifiMacHeader *hdr)
#define NS_FATAL_ERROR(msg)
fatal error handling
Definition: fatal-error.h:72
void Receive(Ptr< Packet > packet, const WifiMacHeader *hdr)
virtual Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager() const
virtual void SetBssid(Mac48Address bssid)
Ptr< EdcaTxopN > GetVOQueue(void) const
Time GetSifs(void) const
Time GetCtsTimeout(void) const
virtual void SetForwardUpCallback(ForwardUpCallback upCallback)
void SetEifsNoDifs(Time eifsNoDifs)
virtual void SetWifiPhy(Ptr< WifiPhy > phy)
void SetTypeOfStation(TypeOfStation type)
hold objects of type ns3::Time
Definition: nstime.h:700
Ptr< DcaTxop > m_dca
Ptr< EdcaTxopN > GetBEQueue(void) const
Ptr< DcaTxop > GetDcaTxop(void) const
base class for all MAC-level wifi objects.This class encapsulates all the low-level MAC functionality...
Definition: wifi-mac.h:47
Time GetAckTimeout(void) const
Time GetSlot(void) const
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Definition: qos-utils.cc:27
virtual void SetAddress(Mac48Address address)
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Definition: callback.h:502
Time GetPifs(void) const
virtual void SendAddBaResponse(const MgtAddBaRequestHeader *reqHdr, Mac48Address originator)
Ptr< EdcaTxopN > GetVIQueue(void) const
virtual void SetLinkUpCallback(Callback< void > linkUp)
virtual void DoDispose()
hold objects of type Ptr<T>
Definition: pointer.h:33
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
an EUI-48 address
Definition: mac48-address.h:41
void SetEifsNoDifs(Time eifsNoDifs)
Definition: dcf-manager.cc:325
void SetCtsTimeout(Time ctsTimeout)
Definition: ssid.h:35
virtual Ptr< WifiPhy > GetWifiPhy() const
virtual Mac48Address GetBssid(void) const
void SetSlot(Time slotTime)
Definition: dcf-manager.cc:313
Time Seconds(double seconds)
create ns3::Time instances in units of seconds.
Definition: nstime.h:586
Ptr< EdcaTxopN > GetBKQueue(void) const
uint32_t GetId(void) const
Definition: node.cc:105
void SetRepository(Ptr< Repository > rep)
virtual Mac48Address GetAddress(void) const
Time GetEifsNoDifs() const
Definition: dcf-manager.cc:331
virtual void DoInitialize()
Time MilliSeconds(uint64_t ms)
create ns3::Time instances in units of milliseconds.
Definition: nstime.h:601
virtual void SetPromisc(void)
Sets the interface in promiscuous mode.
Hold an floating point type.
Definition: double.h:41
a unique identifier for an interface.
Definition: type-id.h:44
TypeId SetParent(TypeId tid)
Definition: type-id.cc:471
void SetAckTimeout(Time ackTimeout)
AcIndex
Definition: qos-utils.h:35
void SetSifs(Time sifs)
Definition: dcf-manager.cc:319
void AddHeader(const Header &header)
Definition: packet.cc:270
virtual void FinishConfigureStandard(enum WifiPhyStandard standard)
Time GetEifsNoDifs(void) const
void SetupEdcaQueue(enum AcIndex ac)