A Discrete-Event Network Simulator
API
lr-wpan-csmaca.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 The Boeing Company
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:
19  * kwong yin <kwong-sang.yin@boeing.com>
20  * Sascha Alexander Jopen <jopen@cs.uni-bonn.de>
21  * Alberto Gallegos Ramonet <ramonet@fc.ritsumei.ac.jp>
22  */
23 
24 #include "lr-wpan-csmaca.h"
25 #include <ns3/random-variable-stream.h>
26 #include <ns3/simulator.h>
27 #include <ns3/log.h>
28 #include <algorithm>
29 
30 #undef NS_LOG_APPEND_CONTEXT
31 #define NS_LOG_APPEND_CONTEXT \
32  std::clog << "[address " << m_mac->GetShortAddress () << "] ";
33 
34 namespace ns3 {
35 
36 NS_LOG_COMPONENT_DEFINE ("LrWpanCsmaCa");
37 
38 NS_OBJECT_ENSURE_REGISTERED (LrWpanCsmaCa);
39 
40 TypeId
42 {
43  static TypeId tid = TypeId ("ns3::LrWpanCsmaCa")
44  .SetParent<Object> ()
45  .SetGroupName ("LrWpan")
46  .AddConstructor<LrWpanCsmaCa> ()
47  ;
48  return tid;
49 }
50 
52 {
53  // TODO-- make these into ns-3 attributes
54 
55  m_isSlotted = false;
56  m_NB = 0;
57  m_CW = 2;
58  m_macBattLifeExt = false;
59  m_macMinBE = 3;
60  m_macMaxBE = 5;
62  m_aUnitBackoffPeriod = 20; // symbols
63  m_random = CreateObject<UniformRandomVariable> ();
64  m_BE = m_macMinBE;
65  m_ccaRequestRunning = false;
67  m_coorDest = false;
68 }
69 
71 {
72  m_mac = 0;
73 }
74 
75 void
77 {
78  m_lrWpanMacStateCallback = MakeNullCallback <void, LrWpanMacState> ();
79  m_lrWpanMacTransCostCallback = MakeNullCallback <void, uint32_t> ();
80 
81  Cancel ();
82  m_mac = 0;
83 }
84 
85 void
87 {
88  m_mac = mac;
89 }
90 
93 {
94  return m_mac;
95 }
96 
97 void
99 {
100  NS_LOG_FUNCTION (this);
101  m_isSlotted = true;
102 }
103 
104 void
106 {
107  NS_LOG_FUNCTION (this);
108  m_isSlotted = false;
109 }
110 
111 bool
113 {
114  NS_LOG_FUNCTION (this);
115  return (m_isSlotted);
116 }
117 
118 bool
120 {
121  NS_LOG_FUNCTION (this);
122  return (!m_isSlotted);
123 }
124 
125 void
126 LrWpanCsmaCa::SetMacMinBE (uint8_t macMinBE)
127 {
128  NS_LOG_FUNCTION (this << macMinBE);
129  m_macMinBE = macMinBE;
130 }
131 
132 uint8_t
134 {
135  NS_LOG_FUNCTION (this);
136  return m_macMinBE;
137 }
138 
139 void
140 LrWpanCsmaCa::SetMacMaxBE (uint8_t macMaxBE)
141 {
142  NS_LOG_FUNCTION (this << macMaxBE);
143  m_macMinBE = macMaxBE;
144 }
145 
146 uint8_t
148 {
149  NS_LOG_FUNCTION (this);
150  return m_macMaxBE;
151 }
152 
153 void
154 LrWpanCsmaCa::SetMacMaxCSMABackoffs (uint8_t macMaxCSMABackoffs)
155 {
156  NS_LOG_FUNCTION (this << macMaxCSMABackoffs);
157  m_macMaxCSMABackoffs = macMaxCSMABackoffs;
158 }
159 
160 uint8_t
162 {
163  NS_LOG_FUNCTION (this);
164  return m_macMaxCSMABackoffs;
165 }
166 
167 void
168 LrWpanCsmaCa::SetUnitBackoffPeriod (uint64_t unitBackoffPeriod)
169 {
170  NS_LOG_FUNCTION (this << unitBackoffPeriod);
171  m_aUnitBackoffPeriod = unitBackoffPeriod;
172 }
173 
174 uint64_t
176 {
177  NS_LOG_FUNCTION (this);
178  return m_aUnitBackoffPeriod;
179 }
180 
181 
182 Time
184 {
185  NS_LOG_FUNCTION (this);
186 
187  // The reference for the beginning of the CAP changes depending
188  // on the data packet being sent from the Coordinator/outgoing frame (Tx beacon time reference)
189  // or other device/incoming frame (Rx beacon time reference).
190 
191  uint32_t elapsedSuperframe;
192  uint64_t currentTimeSymbols;
193  uint32_t symbolsToBoundary;
194  Time nextBoundary;
195 
196  currentTimeSymbols = Simulator::Now ().GetSeconds () * m_mac->GetPhy ()->GetDataOrSymbolRate (false);
197 
198 
199  if (m_coorDest)
200  {
201  // Take the Incoming Frame Reference
202  elapsedSuperframe = currentTimeSymbols - m_mac->m_beaconRxTime;
203  }
204  else
205  {
206  // Take the Outgoing Frame Reference
207  elapsedSuperframe = currentTimeSymbols - m_mac->m_macBeaconTxTime;
208  }
209 
210  symbolsToBoundary = m_aUnitBackoffPeriod - std::fmod (elapsedSuperframe,m_aUnitBackoffPeriod);
211  nextBoundary = MicroSeconds (symbolsToBoundary * 1000 * 1000 / m_mac->GetPhy ()->GetDataOrSymbolRate (false));
212 
213  NS_LOG_DEBUG ("Elapsed symbols in CAP: " << elapsedSuperframe << "(" << elapsedSuperframe / m_aUnitBackoffPeriod << " backoff periods)");
214  NS_LOG_DEBUG ("Next backoff period boundary in " << symbolsToBoundary << " symbols ("
215  << nextBoundary.GetSeconds () << " s)");
216 
217 
218  return nextBoundary;
219 
220 }
221 
222 
223 void
225 {
226  NS_LOG_FUNCTION (this);
227  m_NB = 0;
228  if (IsSlottedCsmaCa ())
229  {
230  // TODO: Check if the current PHY is using the Japanese band 950 Mhz:
231  // (IEEE_802_15_4_950MHZ_BPSK and IEEE_802_15_4_950MHZ_2GFSK)
232  // if in use, m_CW = 1.
233  // Currently 950 Mhz band PHYs are not supported in ns-3.
234  // To know the current used PHY, making the method for GetPhy()->GetMyPhyOption()
235  // public is necessary. Alternatively, the current PHY used
236  // can be known using phyCurrentPage variable.
237 
238  m_CW = 2;
239 
240  if (m_macBattLifeExt)
241  {
242  m_BE = std::min (static_cast<uint8_t> (2), m_macMinBE);
243  }
244  else
245  {
246  m_BE = m_macMinBE;
247  }
248 
249  // m_coorDest to decide between incoming and outgoing superframes times
250  m_coorDest = m_mac->isCoordDest ();
251 
252  // Locate backoff period boundary. (i.e. a time delay to align with the next backoff period boundary)
253  Time backoffBoundary = GetTimeToNextSlot ();
255 
256  }
257  else
258  {
259  m_BE = m_macMinBE;
261  }
262 }
263 
264 void
266 {
270 }
271 
272 
273 
274 void
276 {
277  NS_LOG_FUNCTION (this);
278 
279  uint64_t upperBound = (uint64_t) pow (2, m_BE) - 1;
280  Time randomBackoff;
281  uint64_t symbolRate;
282  uint32_t backoffPeriodsLeftInCap;
283 
284  symbolRate = (uint64_t) m_mac->GetPhy ()->GetDataOrSymbolRate (false); //symbols per second
285 
286  // We should not recalculate the random backoffPeriods if we are in a slotted CSMA-CA and the
287  // transmission was previously deferred (m_randomBackoffPeriods != 0)
289  {
290  m_randomBackoffPeriodsLeft = (uint64_t)m_random->GetValue (0, upperBound + 1);
291  }
292 
293  randomBackoff = MicroSeconds (m_randomBackoffPeriodsLeft * GetUnitBackoffPeriod () * 1000 * 1000 / symbolRate);
294 
295  if (IsUnSlottedCsmaCa ())
296  {
297  NS_LOG_DEBUG ("Unslotted CSMA-CA: requesting CCA after backoff of " << m_randomBackoffPeriodsLeft <<
298  " periods (" << randomBackoff.GetSeconds () << " s)");
300  }
301  else
302  {
303  // We must make sure there are enough backoff periods left in the CAP, otherwise we continue in
304  // the CAP of the next superframe after the transmission/reception of the beacon (and the IFS)
305  backoffPeriodsLeftInCap = GetBackoffPeriodsLeftInCap ();
306 
307  NS_LOG_DEBUG ("Slotted CSMA-CA: proceeding after backoff of " << m_randomBackoffPeriodsLeft <<
308  " periods (" << randomBackoff.GetSeconds () << " s)");
309 
310  Time rmnCapTime = MicroSeconds (backoffPeriodsLeftInCap * GetUnitBackoffPeriod () * 1000 * 1000 / symbolRate);
311  NS_LOG_DEBUG ("Backoff periods left in CAP: " << backoffPeriodsLeftInCap << " (" << rmnCapTime.GetSeconds () << " s)");
312 
313  if (m_randomBackoffPeriodsLeft > backoffPeriodsLeftInCap)
314  {
315  m_randomBackoffPeriodsLeft = m_randomBackoffPeriodsLeft - backoffPeriodsLeftInCap;
316  NS_LOG_DEBUG ("No time in CAP to complete backoff delay, deferring to the next CAP");
317 
319  }
320  else
321  {
323  }
324  }
325 }
326 
327 
328 uint32_t
330 {
331  uint64_t currentTimeSymbols;
332  uint16_t capSymbols;
333  uint64_t endCapSymbols;
334  uint64_t activeSlot;
335 
336 
337  //At this point, the currentTime should be aligned on a backoff period boundary
338 
339 
340  currentTimeSymbols = Simulator::Now ().GetMicroSeconds () * 1000 * 1000 *
341  m_mac->GetPhy ()->GetDataOrSymbolRate (false);
342 
343  if (m_coorDest)
344  { // Take Incoming frame reference
345  activeSlot = m_mac->m_incomingSuperframeDuration / 16;
346  capSymbols = activeSlot * (m_mac->m_incomingFnlCapSlot + 1);
347  endCapSymbols = m_mac->m_beaconRxTime + capSymbols;
348  }
349  else
350  { // Take Outgoing frame reference
351  activeSlot = m_mac->m_superframeDuration / 16;
352  capSymbols = activeSlot * (m_mac->m_fnlCapSlot + 1);
353  endCapSymbols = m_mac->m_macBeaconTxTime + capSymbols;
354  }
355 
356  return ((endCapSymbols - currentTimeSymbols) / m_aUnitBackoffPeriod);
357 }
358 
359 
360 void
362 {
363  NS_LOG_FUNCTION (this);
364 
365  uint32_t backoffPeriodsLeftInCap;
366  uint16_t ccaSymbols;
367  uint32_t transactionSymbols;
368  uint64_t symbolRate;
369 
370  ccaSymbols = 0;
372  symbolRate = (uint64_t) m_mac->GetPhy ()->GetDataOrSymbolRate (false);
373  backoffPeriodsLeftInCap = GetBackoffPeriodsLeftInCap ();
374 
375 
376  // TODO: On the 950 Mhz Band (Japanese Band)
377  // only a single CCA check is performed;
378  // the CCA check duration time is:
379  //
380  // CCA symbols = phyCCADuration * m_CW (1)
381  // other PHYs:
382  // CCA symbols = 8 * m_CW(2)
383  //
384  // note: phyCCADuration & 950Mhz band PHYs are
385  // not currently implemented in ns-3.
386  ccaSymbols += 8 * m_CW;
387 
388  // The MAC sublayer shall proceed if the remaining CSMA-CA algorithm steps
389  // can be completed before the end of the CAP.
390  // See IEEE 802.15.4-2011 (Sections 5.1.1.1 and 5.1.1.4)
391  // Transaction = 2 CCA + frame transmission (PPDU) + turnaroudtime or Ack time (optional) + IFS
392 
393  transactionSymbols = ccaSymbols + m_mac->GetTxPacketSymbols ();
394 
395  if (m_mac->isTxAckReq ())
396  {
397  NS_LOG_DEBUG ("ACK duration symbols: " << m_mac->GetMacAckWaitDuration ());
398  transactionSymbols += m_mac->GetMacAckWaitDuration ();
399  }
400  else
401  {
402  //time the PHY takes to switch from TX to Rx or Rx to Tx
403  transactionSymbols += m_mac->GetPhy ()->aTurnaroundTime;
404  }
405  transactionSymbols += m_mac->GetIfsSize ();
406 
407  // Report the transaction cost
409  {
410  m_lrWpanMacTransCostCallback (transactionSymbols);
411  }
412 
413  NS_LOG_DEBUG ("Total required transaction symbols: " << transactionSymbols);
414 
415  if (transactionSymbols > (backoffPeriodsLeftInCap * GetUnitBackoffPeriod ()))
416  {
417  NS_LOG_DEBUG ("Transaction of " << transactionSymbols << " symbols " <<
418  "cannot be completed in CAP, deferring transmission to the next CAP");
419 
420  Time waitTime = MicroSeconds (backoffPeriodsLeftInCap * GetUnitBackoffPeriod () * 1000 * 10000 / symbolRate);
421 
422  NS_LOG_DEBUG ("Symbols left in CAP: " << backoffPeriodsLeftInCap * GetUnitBackoffPeriod () <<
423  " (" << waitTime.GetSeconds () << "s)");
424 
426  }
427  else
428  {
430  }
431 
432 }
433 
434 void
436 {
437  NS_LOG_FUNCTION (this);
438  m_ccaRequestRunning = true;
439  m_mac->GetPhy ()->PlmeCcaRequest ();
440 }
441 
442 void
444 {
445  NS_LOG_FUNCTION (this);
447 }
448 
449 void
451 {
452  NS_LOG_FUNCTION (this << status);
453 
454  // Only react on this event, if we are actually waiting for a CCA.
455  // If the CSMA algorithm was canceled, we could still receive this event from
456  // the PHY. In this case we ignore the event.
458  {
459  m_ccaRequestRunning = false;
460  if (status == IEEE_802_15_4_PHY_IDLE)
461  {
462  if (IsSlottedCsmaCa ())
463  {
464  m_CW--;
465  if (m_CW == 0)
466  {
467  // inform MAC channel is idle
469  {
470  NS_LOG_LOGIC ("Notifying MAC of idle channel");
472  }
473  }
474  else
475  {
476  NS_LOG_LOGIC ("Perform CCA again, m_CW = " << m_CW);
477  m_requestCcaEvent = Simulator::ScheduleNow (&LrWpanCsmaCa::RequestCCA, this); // Perform CCA again
478  }
479  }
480  else
481  {
482  // inform MAC, channel is idle
484  {
485  NS_LOG_LOGIC ("Notifying MAC of idle channel");
487  }
488  }
489  }
490  else
491  {
492  if (IsSlottedCsmaCa ())
493  {
494  m_CW = 2;
495  }
496  m_BE = std::min (static_cast<uint16_t> (m_BE + 1), static_cast<uint16_t> (m_macMaxBE));
497  m_NB++;
499  {
500  // no channel found so cannot send pkt
501  NS_LOG_DEBUG ("Channel access failure");
503  {
504  NS_LOG_LOGIC ("Notifying MAC of Channel access failure");
506  }
507  return;
508  }
509  else
510  {
511  NS_LOG_DEBUG ("Perform another backoff; m_NB = " << static_cast<uint16_t> (m_NB));
512  m_randomBackoffEvent = Simulator::ScheduleNow (&LrWpanCsmaCa::RandomBackoffDelay, this); //Perform another backoff (step 2)
513  }
514  }
515  }
516 }
517 
518 
519 void
521 {
522  NS_LOG_FUNCTION (this);
524 }
525 
526 
527 void
529 {
530  NS_LOG_FUNCTION (this);
532 }
533 
534 void
535 LrWpanCsmaCa::SetBatteryLifeExtension (bool batteryLifeExtension)
536 {
537  m_macBattLifeExt = batteryLifeExtension;
538 }
539 
540 
541 int64_t
543 {
544  NS_LOG_FUNCTION (this);
545  m_random->SetStream (stream);
546  return 1;
547 }
548 
549 uint8_t
551 {
552  return m_NB;
553 }
554 
555 bool
557 {
558  return m_macBattLifeExt;
559 }
560 
561 } //namespace ns3
static TypeId GetTypeId(void)
Get the type ID.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
void SetMacMinBE(uint8_t macMinBE)
Set the minimum backoff exponent value.
#define min(a, b)
Definition: 80211b.c:42
CHANNEL_IDLE.
Definition: lr-wpan-mac.h:76
void PlmeCcaConfirm(LrWpanPhyEnumeration status)
IEEE 802.15.4-2006 section 6.2.2.2 PLME-CCA.confirm status.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:361
uint8_t m_CW
Contention window length (used in slotted ver only).
MAC_CSMA_DEFERRED.
Definition: lr-wpan-mac.h:80
void SetMac(Ptr< LrWpanMac > mac)
Set the MAC to which this CSMA/CA implementation is attached to.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
uint8_t GetMacMinBE(void) const
Get the minimum backoff exponent value.
uint8_t GetMacMaxBE(void) const
Get the maximum backoff exponent value.
uint8_t m_NB
Number of backoffs for the current transmission.
void SetLrWpanMacTransCostCallback(LrWpanMacTransCostCallback trans)
Set the callback function to report a transaction cost in slotted CSMA-CA.
uint8_t GetNB(void)
Get the number of CSMA retries.
bool m_macBattLifeExt
Battery Life Extension.
void SetUnitBackoffPeriod(uint64_t unitBackoffPeriod)
Set the number of symbols forming the basic time period used by the CSMA-CA algorithm.
LrWpanMacTransCostCallback m_lrWpanMacTransCostCallback
The callback to inform the cost of a transaction in slotted CSMA-CA.
uint8_t m_macMinBE
Minimum backoff exponent.
void SetBatteryLifeExtension(bool batteryLifeExtension)
Set the value of the Battery Life Extension.
void DeferCsmaTimeout(void)
The CSMA algorithm call this function at the end of the CAP to return the MAC state back to to IDLE a...
LrWpanMacStateCallback m_lrWpanMacStateCallback
The callback to inform the configured MAC of the CSMA/CA result.
uint8_t GetMacMaxCSMABackoffs(void) const
Get the maximum number of backoffs.
void SetMacMaxBE(uint8_t macMaxBE)
Set the maximum backoff exponent value.
void SetUnSlottedCsmaCa(void)
Configure for the use of the unslotted CSMA/CA version.
uint64_t m_randomBackoffPeriodsLeft
Count the number of remaining random backoff periods left to delay.
void RequestCCA(void)
Request the Phy to perform CCA (Step 3)
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Definition: simulator.h:1390
virtual void DoDispose(void)
Destructor implementation.
void RandomBackoffDelay(void)
In step 2 of the CSMA-CA, perform a random backoff in the range of 0 to 2^BE -1.
void Start(void)
Start CSMA-CA algorithm (step 1), initialize NB, BE for both slotted and unslotted CSMA-CA...
void Cancel(void)
Cancel CSMA-CA algorithm.
mac
Definition: third.py:99
uint64_t m_aUnitBackoffPeriod
Number of symbols per CSMA/CA time unit, default 20 symbols.
LrWpanCsmaCa(void)
Default constructor.
Ptr< LrWpanMac > m_mac
The MAC instance for which this CSMA/CA implemenation is configured.
uint64_t GetUnitBackoffPeriod(void) const
Get the number of symbols forming the basic time period used by the CSMA-CA algorithm.
bool m_ccaRequestRunning
Flag indicating that the PHY is currently running a CCA.
int64_t GetMicroSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:369
void SetLrWpanMacStateCallback(LrWpanMacStateCallback macState)
Set the callback function to the MAC.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< UniformRandomVariable > m_random
Uniform random variable stream.
Time GetTimeToNextSlot(void) const
Locates the time to the next backoff period boundary and returns the amount of time left (in symbols)...
double GetValue(double min, double max)
Get the next random value, as a double in the specified range .
bool IsUnSlottedCsmaCa(void) const
Check if the unslotted CSMA/CA version is being used.
bool m_isSlotted
Beacon-enabled slotted or nonbeacon-enabled unslotted CSMA-CA.
uint8_t m_macMaxBE
Maximum backoff exponent.
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
Definition: simulator.h:1579
EventId m_randomBackoffEvent
Scheduler event for the start of the next random backoff/slot.
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:193
bool GetBatteryLifeExtension(void)
Get the value of the Battery Life Extension.
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
uint32_t GetBackoffPeriodsLeftInCap()
Get the periods left in the CAP portion of the Outgoing or Incoming frame.
bool m_coorDest
Indicates whether the CSMA procedure is targeted for a message to be sent to the coordinator.
CHANNEL_ACCESS_FAILURE.
Definition: lr-wpan-mac.h:75
void SetSlottedCsmaCa(void)
Configure for the use of the slotted CSMA/CA version.
void CanProceed(void)
In the slotted CSMA-CA, after random backoff, determine if the remaining CSMA-CA operation can procee...
virtual ~LrWpanCsmaCa(void)
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
uint8_t m_BE
Backoff exponent.
EventId m_canProceedEvent
Scheduler event for checking if we can complete the transmission before the end of the CAP...
This class is a helper for the LrWpanMac to manage the Csma/CA state machine according to IEEE 802...
void SetMacMaxCSMABackoffs(uint8_t macMaxCSMABackoffs)
Set the maximum number of backoffs.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition: event-id.cc:53
bool IsSlottedCsmaCa(void) const
Check if the slotted CSMA/CA version is being used.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1086
LrWpanPhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.
Definition: lr-wpan-phy.h:105
A base class which provides memory management and object aggregation.
Definition: object.h:87
EventId m_requestCcaEvent
Scheduler event when to start the CCA after a random backoff.
Ptr< LrWpanMac > GetMac(void) const
Get the MAC to which this CSMA/CA implementation is attached to.
bool IsNull(void) const
Check for null implementation.
Definition: callback.h:1372
a unique identifier for an interface.
Definition: type-id.h:58
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
EventId m_endCapEvent
Scheduler event for the end of the current CAP.
uint8_t m_macMaxCSMABackoffs
Maximum number of backoffs.