A Discrete-Event Network Simulator
API
bs-net-device.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2007,2008,2009 INRIA, UDcast
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  * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20  * <amine.ismail@UDcast.com>
21  */
22 
23 #include <cmath>
24 
25 #include "ns3/simulator.h"
26 #include "ns3/node.h"
27 #include "bs-uplink-scheduler.h"
28 #include "bs-net-device.h"
29 #include "wimax-phy.h"
30 #include "ns3/packet-burst.h"
31 #include "ss-record.h"
32 #include "bs-scheduler.h"
33 #include "wimax-mac-queue.h"
34 #include "burst-profile-manager.h"
35 #include "ss-manager.h"
36 #include "ns3/trace-source-accessor.h"
37 #include "ns3/pointer.h"
38 #include "ns3/enum.h"
39 #include "ns3/uinteger.h"
40 #include "service-flow.h"
41 #include "service-flow-manager.h"
42 #include "connection-manager.h"
43 #include "bs-link-manager.h"
44 #include "bandwidth-manager.h"
45 #include "ns3/ipv4-address.h"
46 #include "ns3/llc-snap-header.h"
47 
48 namespace ns3 {
49 
50 NS_LOG_COMPONENT_DEFINE ("BaseStationNetDevice");
51 
52 NS_OBJECT_ENSURE_REGISTERED (BaseStationNetDevice);
53 
55 {
56  static TypeId tid = TypeId ("ns3::BaseStationNetDevice")
57 
59 
60  .SetGroupName("Wimax")
61 
62  .AddConstructor<BaseStationNetDevice> ()
63 
64  .AddAttribute ("BSScheduler",
65  "Downlink Scheduler for BS",
66  PointerValue (),
68  MakePointerChecker<BSScheduler> ())
69 
70  .AddAttribute ("InitialRangInterval",
71  "Time between Initial Ranging regions assigned by the BS. Maximum is 2s",
72  TimeValue (Seconds (0.05)),
75  MakeTimeChecker ())
76 
77  .AddAttribute ("DcdInterval",
78  "Time between transmission of DCD messages. Maximum value is 10s.",
79  TimeValue (Seconds (3)),
81  MakeTimeChecker ())
82 
83  .AddAttribute ("UcdInterval",
84  "Time between transmission of UCD messages. Maximum value is 10s.",
85  TimeValue (Seconds (3)),
87  MakeTimeChecker ())
88 
89  .AddAttribute ("IntervalT8",
90  "Wait for DSA/DSC Acknowledge timeout. Maximum 300ms.",
91  TimeValue (Seconds (0.05)),
93  MakeTimeChecker ())
94 
95  .AddAttribute ("RangReqOppSize",
96  "The ranging opportunity size in symbols",
97  UintegerValue (8),
100  MakeUintegerChecker<uint8_t> (1, 256))
101 
102  .AddAttribute ("BwReqOppSize",
103  "The bandwidth request opportunity size in symbols",
104  UintegerValue (2),
106  MakeUintegerChecker<uint8_t> (1, 256))
107 
108  .AddAttribute ("MaxRangCorrectionRetries",
109  "Number of retries on contention Ranging Requests",
110  UintegerValue (16),
113  MakeUintegerChecker<uint8_t> (1, 16))
114 
115  .AddAttribute ("SSManager",
116  "The ss manager attached to this device.",
117  PointerValue (),
119  MakePointerChecker<SSManager> ())
120 
121  .AddAttribute ("Scheduler",
122  "The BS scheduler attached to this device.",
123  PointerValue (),
125  MakePointerChecker<BSScheduler> ())
126 
127  .AddAttribute ("LinkManager",
128  "The link manager attached to this device.",
129  PointerValue (),
131  MakePointerChecker<BSLinkManager> ())
132 
133  .AddAttribute ("UplinkScheduler",
134  "The uplink scheduler attached to this device.",
135  PointerValue (),
138  MakePointerChecker<UplinkScheduler> ())
139 
140  .AddAttribute ("BsIpcsPacketClassifier",
141  "The uplink IP packet classifier attached to this device.",
142  PointerValue (),
144  MakePointerChecker<IpcsClassifier> ())
145 
146  .AddAttribute ("ServiceFlowManager",
147  "The service flow manager attached to this device.",
148  PointerValue (),
151  MakePointerChecker<ServiceFlowManager> ())
152 
153  .AddTraceSource ("BSTx",
154  "A packet has been received from higher layers "
155  "and is being processed in preparation "
156  "for queueing for transmission.",
158  "ns3::Packet::TracedCallback")
159 
160  .AddTraceSource ("BSTxDrop",
161  "A packet has been dropped in the MAC layer "
162  "before being queued for transmission.",
164  "ns3::Packet::TracedCallback")
165 
166  .AddTraceSource ("BSPromiscRx",
167  "A packet has been received by this device, "
168  "has been passed up from the physical layer "
169  "and is being forwarded up the local protocol stack. "
170  "This is a promiscuous trace,",
172  "ns3::Packet::TracedCallback")
173 
174  .AddTraceSource ("BSRx",
175  "A packet has been received by this device, "
176  "has been passed up from the physical layer "
177  "and is being forwarded up the local protocol stack. "
178  "This is a non-promiscuous trace,",
180  "ns3::Packet::TracedCallback")
181 
182  .AddTraceSource ("BSRxDrop",
183  "A packet has been dropped in the MAC layer "
184  "after it has been passed up from the physical layer.",
186  "ns3::Packet::TracedCallback");
187  return tid;
188 }
189 
191 {
193 }
194 
195 void
197 {
198 
199  m_initialRangInterval = Seconds (0.05); // maximum is 2
200  m_dcdInterval = Seconds (3); // maximum is 10
201  m_ucdInterval = Seconds (3); // maximum is 10
202  m_intervalT8 = MilliSeconds (50); // maximum is 300 milliseconds
205  m_rangReqOppSize = 8; // 8 symbols = 2 (preamble) + 2 (RNG-REQ) + 4 (round-trip propagation time)
206  m_bwReqOppSize = 2; // 2 symbols = 1 (preamble) + 1 (bandwidth request header)
207  m_nrDlSymbols = 0;
208  m_nrUlSymbols = 0;
209  m_nrDlMapSent = 0;
210  m_nrUlMapSent = 0;
211  m_nrDcdSent = 0;
212  m_nrUcdSent = 0;
217  m_nrDlFrames = 0;
218  m_nrUlFrames = 0;
219  m_nrSsRegistered = 0;
220  m_nrDlAllocations = 0;
221  m_nrUlAllocations = 0;
225  m_rangingOppNumber = 0;
227  m_psDuration = Seconds (0);
229  m_linkManager = CreateObject<BSLinkManager> (this);
230  m_cidFactory = new CidFactory ();
231  m_ssManager = CreateObject<SSManager> ();
232  m_bsClassifier = CreateObject<IpcsClassifier> ();
233  m_serviceFlowManager = CreateObject<BsServiceFlowManager> (this);
234 
235 }
236 
238 {
240  this->SetNode (node);
241  this->SetPhy (phy);
242 }
243 
246  Ptr<UplinkScheduler> uplinkScheduler,
247  Ptr<BSScheduler> bsScheduler)
248 {
250  this->SetNode (node);
251  this->SetPhy (phy);
252  m_uplinkScheduler = uplinkScheduler;
253  m_scheduler = bsScheduler;
254 }
255 
257 {
258 }
259 
260 void
262 {
263  delete m_cidFactory;
264 
265  m_linkManager = 0;
266  m_ssManager = 0;
267  m_bsClassifier = 0;
269  m_uplinkScheduler = 0;
270  m_cidFactory = 0;
271  m_ssManager = 0;
272  m_uplinkScheduler = 0;
273  m_scheduler = 0;
274 
276 }
277 
278 void
280 {
281  m_bsClassifier = bsc;
282 }
283 
286 {
287  return m_bsClassifier;
288 }
289 
290 void
292 {
293  m_initialRangInterval = initialRangInterval;
294 }
295 
296 Time
298 {
299  return m_initialRangInterval;
300 }
301 
302 void
304 {
305  m_dcdInterval = dcdInterval;
306 }
307 
308 Time
310 {
311  return m_dcdInterval;
312 }
313 
314 void
316 {
317  m_ucdInterval = ucdInterval;
318 }
319 
320 Time
322 {
323  return m_ucdInterval;
324 }
325 
326 void
328 {
329  m_intervalT8 = interval;
330 }
331 
332 Time
334 {
335  return m_intervalT8;
336 }
337 
338 void
340 {
341  m_maxRangCorrectionRetries = maxRangCorrectionRetries;
342 }
343 
344 uint8_t
346 {
348 }
349 
350 void
351 BaseStationNetDevice::SetMaxInvitedRangRetries (uint8_t maxInvitedRangRetries)
352 {
353  m_maxInvitedRangRetries = maxInvitedRangRetries;
354 }
355 
356 uint8_t
358 {
360 }
361 
362 void
364 {
365  m_rangReqOppSize = rangReqOppSize;
366 }
367 
368 uint8_t
370 {
371  return m_rangReqOppSize;
372 }
373 
374 void
376 {
377  m_bwReqOppSize = bwReqOppSize;
378 }
379 
380 uint8_t
382 {
383  return m_bwReqOppSize;
384 }
385 
386 void
388 {
389  m_nrDlSymbols = nrDlSymbols;
390 }
391 
392 uint32_t
394 {
395  return m_nrDlSymbols;
396 }
397 
398 void
400 {
401  m_nrUlSymbols = nrUlSymbols;
402 }
403 
404 uint32_t
406 {
407  return m_nrUlSymbols;
408 }
409 
410 uint32_t
412 {
413  return m_nrDcdSent;
414 }
415 
416 uint32_t
418 {
419  return m_nrUcdSent;
420 }
421 
422 Time
424 {
425  return m_dlSubframeStartTime;
426 }
427 
428 Time
430 {
431  return m_ulSubframeStartTime;
432 }
433 
434 uint8_t
436 {
437  return m_rangingOppNumber;
438 }
439 
442 {
443  return m_ssManager;
444 }
445 
446 void
448 {
449  m_ssManager = ssm;
450 }
451 
454 {
455  return m_serviceFlowManager;
456 }
457 
458 void
460 {
461  m_serviceFlowManager = sfm;
462 }
463 
466 {
467  return m_uplinkScheduler;
468 }
469 
470 void
472 {
473  m_uplinkScheduler = uls;
474 }
475 
478 {
479  return m_linkManager;
480 }
481 
482 void
484 {
485  m_linkManager = lm;
486 }
487 
488 void
490 {
491  m_scheduler = bss;
492 }
495 {
496  return m_scheduler;
497 }
498 
499 Time
501 {
502  return m_psDuration;
503 }
504 
505 Time
507 {
508  return m_symbolDuration;
509 }
510 
511 void
513 {
515  GetConnectionManager ()->SetCidFactory (m_cidFactory);
516  GetPhy ()->SetPhyParameters ();
517  GetPhy ()->SetDataRates ();
518  SetTtg (GetPhy ()->GetTtg ());
519  SetRtg (GetPhy ()->GetRtg ());
520  m_psDuration = GetPhy ()->GetPsDuration ();
521  m_symbolDuration = GetPhy ()->GetSymbolDuration ();
522  GetBandwidthManager ()->SetSubframeRatio ();
523 
525  GetPhy ()->SetSimplex (m_linkManager->SelectDlChannel ());
527 
528  /* shall actually be 2 symbols = 1 (preamble) + 1 (bandwidth request header)*/
529  m_bwReqOppSize = 6;
530  m_uplinkScheduler->InitOnce ();
531 }
532 
533 void
535 {
536 }
537 
538 void
540 {
541  //setting DL/UL subframe allocation for this frame
542  uint32_t symbolsPerFrame = GetPhy ()->GetSymbolsPerFrame ();
543  SetNrDlSymbols ((symbolsPerFrame / 2) - static_cast<uint32_t> (std::ceil (GetTtg ()*m_psDuration.GetSeconds ()/m_symbolDuration.GetSeconds ())));
544  SetNrUlSymbols ((symbolsPerFrame / 2) - static_cast<uint32_t> (std::ceil (GetRtg ()*m_psDuration.GetSeconds ()/m_symbolDuration.GetSeconds ())));
545 
547 
548  NS_LOG_INFO ("----------------------frame" << GetNrFrames () + 1 << "----------------------");
549 
550  StartDlSubFrame ();
551 }
552 
553 void
555 {
556  m_dlSubframeStartTime = Simulator::Now (); // same as m_frameStartTime
557 
558  NS_LOG_DEBUG ("DL frame started : " << m_frameStartTime.As (Time::S));
559 
560  SetNrFrames (GetNrFrames () + 1);
563  m_uplinkScheduler->Schedule ();
565  m_scheduler->Schedule ();
566  SendBursts ();
569  this);
570 }
571 
572 void
574 {
575  m_nrDlFrames++;
578 }
579 
580 void
582 {
584 
585  NS_LOG_INFO ("UL frame started : " << m_ulSubframeStartTime.As (Time::S));
586 
592  this);
593 }
594 
595 void
597 {
598  m_nrUlFrames++;
601 }
602 
603 void
605 {
606  StartFrame ();
607 }
608 
609 bool
611  const Mac48Address &source,
612  const Mac48Address &dest,
613  uint16_t protocolNumber)
614 {
615  Ptr<PacketBurst> burst = Create<PacketBurst> ();
616  ServiceFlow *serviceFlow = 0;
617 
618  NS_LOG_INFO ("BS (" << source << "):");
619  NS_LOG_INFO ("\tSending packet...");
620  NS_LOG_INFO ("\t\tDestination: " << dest);
621  NS_LOG_INFO ("\t\tPaket Size: " << packet->GetSize ());
622  NS_LOG_INFO ("\t\tProtocol: " << protocolNumber);
623 
624 
625  if (protocolNumber == 2048)
626  {
627  serviceFlow = m_bsClassifier->Classify (packet, GetServiceFlowManager (), ServiceFlow::SF_DIRECTION_DOWN);
628  }
629 
630  if (protocolNumber != 2048 || serviceFlow == 0)
631  {
632  serviceFlow = *GetServiceFlowManager ()->GetServiceFlows (ServiceFlow::SF_TYPE_ALL).begin ();
633  }
634 
635  if (serviceFlow == 0)
636  {
637  NS_LOG_INFO ("No Service Flow!!");
638  m_bsTxDropTrace (packet);
639  return false;
640  }
641  if (serviceFlow->GetIsEnabled ())
642  {
643  if (!Enqueue (packet, MacHeaderType (), serviceFlow->GetConnection ()))
644  {
645  NS_LOG_INFO ("Enqueue Error!!");
646  m_bsTxDropTrace (packet);
647  return false;
648  }
649  }
650  else
651  {
652  m_bsTxDropTrace (packet);
653  NS_LOG_INFO ("Service Flow is not enabled");
654  return false;
655  }
656  m_bsTxTrace (packet);
657 
658  return true;
659 }
660 
661 bool
663 {
664  NS_ASSERT_MSG (connection != 0,
665  "BS: Can not enqueue packet on the selected connection: the connection is not initialized");
666 
667  GenericMacHeader hdr;
668  hdr.SetLen (packet->GetSize () + hdr.GetSerializedSize ());
669 
670  hdr.SetCid (connection->GetCid ());
671 
672  return connection->Enqueue (packet, hdrType, hdr);
673 }
674 
675 void
677 {
678  GenericMacHeader gnrcMacHdr;
679  BandwidthRequestHeader bwRequestHdr;
680  ManagementMessageType msgType;
681  RngReq rngReq;
682  Cid cid;
683  uint8_t type = 0;
684  GrantManagementSubheader grantMgmntSubhdr;
685  Mac48Address source;
686  LlcSnapHeader llc;
687  Ptr<WimaxConnection> connection = 0;
688  FragmentationSubheader fragSubhdr;
689  bool fragmentation = false; // it becomes true when there is a fragmentation subheader
690 
691  packet->RemoveHeader (gnrcMacHdr);
692  if (gnrcMacHdr.GetHt () == MacHeaderType::HEADER_TYPE_GENERIC)
693  {
694  if (gnrcMacHdr.check_hcs () == false)
695  {
696  // The header is noisy
697  m_bsRxDropTrace (packet);
698  NS_LOG_INFO ("Header HCS ERROR");
699  return;
700  }
701 
702  cid = gnrcMacHdr.GetCid ();
703 
704  // checking for subheaders (only grant management subheader is implemented)
705  type = gnrcMacHdr.GetType ();
706  if (type)
707  {
708  // checking 1st bit, see Table 6
709  if (type & 1)
710  {
711  packet->RemoveHeader (grantMgmntSubhdr);
712  }
713  // Check if there is a fragmentation Subheader
714  uint8_t tmpType = type;
715  if (((tmpType >> 2) & 1) == 1)
716  {
717  // a TRANSPORT packet with fragmentation subheader has been received!
718  NS_LOG_INFO ("FRAG_DEBUG: DoReceive -> the packet is a fragment" << std::endl);
719  fragmentation = true;
720  }
721  }
722 
723  if (cid.IsInitialRanging ()) // initial ranging connection
724  {
725  packet->RemoveHeader (msgType);
726  switch (msgType.GetType ())
727  {
729  {
730  packet->RemoveHeader (rngReq);
731  m_linkManager->ProcessRangingRequest (cid, rngReq);
732  break;
733  }
735  // from other base station, ignore
736  break;
737  default:
738  NS_FATAL_ERROR ("Invalid message type");
739  }
740  }
741  else if (m_cidFactory->IsBasic (cid)) // basic management connection
742  {
743  source = m_ssManager->GetMacAddress (cid);
744  m_traceBSRx (packet, source, cid);
745  packet->RemoveHeader (msgType);
746  switch (msgType.GetType ())
747  {
749  {
750  packet->RemoveHeader (rngReq);
751  m_linkManager->ProcessRangingRequest (cid, rngReq);
752  break;
753  }
755  // from other base station, ignore
756  break;
757  default:
758  NS_FATAL_ERROR ("Invalid message type");
759  }
760  }
761  else if (m_cidFactory->IsPrimary (cid)) // primary management connection
762  {
763  source = m_ssManager->GetMacAddress (cid);
764  m_traceBSRx (packet, source, cid);
765  packet->RemoveHeader (msgType);
766  switch (msgType.GetType ())
767  {
769  // not yet implemented
770  break;
772  // from other base station, ignore
773  break;
775  {
776  DsaReq dsaReq;
777  packet->RemoveHeader (dsaReq);
778  GetServiceFlowManager ()->AllocateServiceFlows (dsaReq, cid);
779  break;
780  }
782 
783  /*from other base station, as DSA initiated
784  from BS is not supported, ignore*/
785  break;
787  {
788  Simulator::Cancel (GetServiceFlowManager ()->GetDsaAckTimeoutEvent ());
789  DsaAck dsaAck;
790  packet->RemoveHeader (dsaAck);
791  GetServiceFlowManager ()->ProcessDsaAck (dsaAck, cid);
792  break;
793  }
794  default:
795  NS_FATAL_ERROR ("Invalid message type");
796  }
797  }
798  else if (cid.IsBroadcast ()) // broadcast connection
799  {
800  // from other base station, ignore
801  // or perhaps data packet (using other protocol) for BS, handle later
802  return;
803  }
804  else // transport connection
805  {
806  // If fragmentation is true, the packet is a fragment.
807  Ptr<Packet> C_Packet = packet->Copy ();
808  if (!fragmentation)
809  {
810  C_Packet->RemoveHeader (llc);
811  source = m_ssManager->GetMacAddress (cid);
812  m_bsRxTrace (packet);
813  ForwardUp (packet->Copy (), source, Mac48Address ("ff:ff:ff:ff:ff:ff"));
814  }
815  else
816  {
817  NS_LOG_INFO ( "FRAG_DEBUG: BS DoReceive, the Packet is a fragment" << std::endl);
818  packet->RemoveHeader (fragSubhdr);
819  uint32_t fc = fragSubhdr.GetFc ();
820  NS_LOG_INFO ("\t fragment size = " << packet->GetSize () << std::endl);
821  if (fc == 2)
822  {
823  // This is the latest fragment.
824  // Take the fragment queue, defragment a packet and send it to the upper layer
825  NS_LOG_INFO ("\t Received the latest fragment" << std::endl);
826  GetConnectionManager ()->GetConnection (cid)
827  ->FragmentEnqueue (packet);
829  GetConnection (cid)->GetFragmentsQueue ();
830  Ptr<Packet> fullPacket = Create<Packet> ();
831 
832  // DEFRAGMENTATION
833  NS_LOG_INFO ("\t BS PACKET DEFRAGMENTATION" << std::endl);
834  for (std::list<Ptr<const Packet> >::const_iterator iter = fragmentsQueue.begin ();
835  iter != fragmentsQueue.end (); ++iter)
836  {
837  // Create the whole Packet
838  fullPacket->AddAtEnd (*iter);
839  }
840  GetConnectionManager ()->GetConnection (cid)
841  ->ClearFragmentsQueue ();
842 
843  NS_LOG_INFO ("\t fullPacket size = " << fullPacket->GetSize () << std::endl);
844  source = m_ssManager->GetMacAddress (cid);
845  m_bsRxTrace (fullPacket);
846  ForwardUp (fullPacket->Copy (), source, Mac48Address ("ff:ff:ff:ff:ff:ff"));
847  }
848  else
849  {
850  // This is the first or middle fragment.
851  // Take the fragment queue, store the fragment into the queue
852  NS_LOG_INFO ("\t Received the first or the middle fragment" << std::endl);
853  GetConnectionManager ()->GetConnection (cid)
854  ->FragmentEnqueue (packet);
855  }
856  }
857  }
858  }
859  else
860  {
861  // bandwidth request header
862  packet->AddHeader (gnrcMacHdr);
863  packet->RemoveHeader (bwRequestHdr);
865  "A bandwidth request should be carried by a bandwidth header type");
866  if (bwRequestHdr.check_hcs () == false)
867  {
868  // The header is noisy
869  NS_LOG_INFO ("BS:Header HCS ERROR");
870  return;
871  }
872  cid = bwRequestHdr.GetCid ();
873  source = m_ssManager->GetMacAddress (cid);
874  m_traceBSRx (packet, source, cid);
875  GetBandwidthManager ()->ProcessBandwidthRequest (bwRequestHdr);
876  }
877 
878 }
879 
880 void
882 {
883  Ptr<Packet> dlmap, ulmap;
884  bool sendDcd = false, sendUcd = false, updateDcd = false, updateUcd = false;
885 
886  uint16_t currentNrSsRegistered = m_ssManager->GetNRegisteredSSs ();
887 
888  if (m_nrSsRegistered == currentNrSsRegistered)
889  {
890  m_uplinkScheduler->GetChannelDescriptorsToUpdate (updateDcd, updateUcd, sendDcd, sendUcd);
891  }
892  else
893  {
894  sendDcd = sendUcd = true;
895  }
896 
897  m_nrSsRegistered = currentNrSsRegistered;
898 
899  /*either DCD and UCD must be created first because CCC is set during their
900  creation, or CCC must be calculated first so that it could be set during
901  creation of DL-MAP and UL-MAP and then set duirng creation of DCD and UCD*/
902 
903  if (sendDcd)
904  {
905  m_dcdConfigChangeCount += 1 % 256;
906  }
907 
908  if (sendUcd)
909  {
910  m_ucdConfigChangeCount += 1 % 256;
911  }
912 
913  dlmap = CreateDlMap ();
915  m_nrDlMapSent++;
916 
917  ulmap = CreateUlMap ();
919  m_nrUlMapSent++;
920 
921  CreateDescriptorMessages (sendDcd, sendUcd);
922 }
923 
924 void
926 {
927  Ptr<Packet> dcd, ucd;
928 
929  if (sendDcd)
930  {
931  dcd = CreateDcd ();
933  m_nrDcdSent++;
935  }
936  else
937  {
939  }
940 
941  if (sendUcd)
942  {
943  ucd = CreateUcd ();
945  m_nrUcdSent++;
947  }
948  else
949  {
951  }
952 }
953 
954 /*
955  Sends bursts in the downlink subframe. i.e., creates the downlink subframe. The first burst
956  is broadcast burst with MAC management messages. The rest of the bursts contain data packets.
957  */
958 void
960 {
961  Time txTime = Seconds (0);
962  std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > pair;
964  std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > > *downlinkBursts = m_scheduler->GetDownlinkBursts ();
965  Ptr<PacketBurst> burst;
966  OfdmDlMapIe *dlMapIe;
967  Cid cid;
968 
969  while (downlinkBursts->size ())
970  {
971  pair = downlinkBursts->front ();
972  burst = pair.second;
973  dlMapIe = pair.first;
974  cid = dlMapIe->GetCid ();
975  uint8_t diuc = dlMapIe->GetDiuc ();
976 
977  if (cid != GetInitialRangingConnection ()->GetCid () && cid != GetBroadcastConnection ()->GetCid ())
978  {
979  if (m_serviceFlowManager->GetServiceFlow (cid) != 0)
980  {
981  modulationType = GetBurstProfileManager ()->GetModulationType (diuc, WimaxNetDevice::DIRECTION_DOWNLINK);
982  }
983  else
984  {
985  modulationType = GetBurstProfileManager ()->GetModulationType (diuc, WimaxNetDevice::DIRECTION_DOWNLINK);
986  }
987  }
988  else
989  {
990  modulationType = WimaxPhy::MODULATION_TYPE_BPSK_12;
991  }
992 
993  Simulator::Schedule (txTime, &WimaxNetDevice::ForwardDown, this, burst, modulationType);
994  txTime += GetPhy ()->GetTransmissionTime (burst->GetSize (), modulationType);
995  downlinkBursts->pop_front ();
996  delete dlMapIe;
997  }
998 }
999 
1002 {
1003  m_nrDlAllocations = 0;
1004 
1005  DlMap dlmap;
1007  dlmap.SetBaseStationId (GetMacAddress ());
1008 
1009  std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > > *downlinkBursts = m_scheduler->GetDownlinkBursts ();
1010 
1011  for (std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > >::iterator iter = downlinkBursts->begin (); iter
1012  != downlinkBursts->end (); ++iter)
1013  {
1014  iter->first->SetPreamblePresent (0);
1015  iter->first->SetStartTime (0);
1016  dlmap.AddDlMapElement (*(iter->first));
1017  }
1018 
1019  OfdmDlMapIe dlMapIeEnd;
1020 
1021  dlMapIeEnd.SetCid (Cid::InitialRanging ());
1023  dlMapIeEnd.SetPreamblePresent (0);
1024  dlMapIeEnd.SetStartTime (0);
1025 
1026  dlmap.AddDlMapElement (dlMapIeEnd);
1027  m_nrDlAllocations = downlinkBursts->size ();
1028 
1029  Ptr<Packet> p = Create<Packet> ();
1030  p->AddHeader (dlmap);
1032  return p;
1033 }
1034 
1037 {
1038  Dcd dcd;
1039  OfdmDcdChannelEncodings chnlEncodings;
1040 
1041  chnlEncodings.SetBsEirp (0);
1042  chnlEncodings.SetEirxPIrMax (0);
1043  chnlEncodings.SetFrequency (GetPhy ()->GetFrequency ());
1044  chnlEncodings.SetChannelNr (0);
1045  chnlEncodings.SetTtg (GetTtg ());
1046  chnlEncodings.SetRtg (GetRtg ());
1047  chnlEncodings.SetBaseStationId (GetMacAddress ());
1048  chnlEncodings.SetFrameDurationCode (GetPhy ()->GetFrameDurationCode ());
1049  chnlEncodings.SetFrameNumber (GetNrFrames ());
1050 
1052  dcd.SetChannelEncodings (chnlEncodings);
1053 
1054  SetDlBurstProfiles (&dcd);
1055  SetCurrentDcd (dcd);
1056 
1057  Ptr<Packet> p = Create<Packet> ();
1058  p->AddHeader (dcd);
1060  return p;
1061 }
1062 
1065 {
1067  m_rangingOppNumber = 0;
1068  m_nrUlAllocations = 0;
1069 
1070  UlMap ulmap;
1072  ulmap.SetAllocationStartTime (m_uplinkScheduler->CalculateAllocationStartTime ());
1073 
1074  std::list<OfdmUlMapIe> uplinkAllocations = m_uplinkScheduler->GetUplinkAllocations ();
1075 
1076  for (std::list<OfdmUlMapIe>::iterator iter = uplinkAllocations.begin (); iter != uplinkAllocations.end (); ++iter)
1077  {
1078  ulmap.AddUlMapElement (*iter);
1079  }
1080 
1081  m_nrUlAllocations = uplinkAllocations.size ();
1082 
1083  Ptr<Packet> p = Create<Packet> ();
1084  p->AddHeader (ulmap);
1086  return p;
1087 }
1088 
1091 {
1092  Ucd ucd;
1094  ucd.SetRangingBackoffStart (3); // setting to 7. i.e., 2^3 = 8 -> 0-7
1095  ucd.SetRangingBackoffEnd (6); // setting to 63. i.e., 2^6 = 64 -> 0-63
1096  ucd.SetRequestBackoffStart (3);
1097  ucd.SetRequestBackoffEnd (6);
1098 
1099  OfdmUcdChannelEncodings chnlEncodings;
1100 
1101  chnlEncodings.SetBwReqOppSize (m_bwReqOppSize * GetPhy ()->GetPsPerSymbol ());
1102  chnlEncodings.SetRangReqOppSize (m_rangReqOppSize * GetPhy ()->GetPsPerSymbol ());
1103 
1104  chnlEncodings.SetFrequency (GetPhy ()->GetFrequency ());
1105  chnlEncodings.SetSbchnlReqRegionFullParams (0);
1106  chnlEncodings.SetSbchnlFocContCodes (0);
1107 
1108  ucd.SetChannelEncodings (chnlEncodings);
1109 
1110  SetUlBurstProfiles (&ucd);
1111  SetCurrentUcd (ucd);
1112 
1113  Ptr<Packet> p = Create<Packet> ();
1114  p->AddHeader (ucd);
1116  return p;
1117 }
1118 
1119 void
1121 {
1122  for (int i = 0; i < GetBurstProfileManager ()->GetNrBurstProfilesToDefine (); ++i)
1123  {
1124  OfdmDlBurstProfile brstProfile;
1125  brstProfile.SetType (0);
1126  brstProfile.SetLength (0);
1127  brstProfile.SetDiuc (i + 1); // DIUC will be between 1-11, see Table 237
1128  brstProfile.SetFecCodeType (i);
1129  dcd->AddDlBurstProfile (brstProfile);
1130  }
1131 }
1132 
1133 void
1135 {
1136  for (int i = 0; i < GetBurstProfileManager ()->GetNrBurstProfilesToDefine (); ++i)
1137  {
1138  OfdmUlBurstProfile brstProfile;
1139  brstProfile.SetType (0);
1140  brstProfile.SetLength (0);
1141  // UIUC will be between 5-12, see Table 246. UIUC 1 (initial ranging) is not included
1142  brstProfile.SetUiuc (i + 5);
1143  brstProfile.SetFecCodeType (i);
1144 
1145  ucd->AddUlBurstProfile (brstProfile);
1146  }
1147 }
1148 
1151 {
1152  Ptr<WimaxConnection> connection = 0;
1153  if (cid.IsInitialRanging ())
1154  {
1155  return GetInitialRangingConnection ();
1156  }
1157  else if (cid.IsBroadcast ())
1158  {
1159  connection = GetBroadcastConnection ();
1160  }
1161  else
1162  {
1163  connection = GetConnectionManager ()->GetConnection (cid);
1164  }
1165 
1166  NS_ASSERT_MSG (connection != 0, "BS: Invalid connection=0");
1167  return connection;
1168 }
1169 
1170 void
1172 {
1173  uint16_t symbolsToAllocation = 0;
1174  std::list<OfdmUlMapIe> uplinkAllocations = m_uplinkScheduler->GetUplinkAllocations ();
1175  for (std::list<OfdmUlMapIe>::iterator iter = uplinkAllocations.begin (); iter != uplinkAllocations.end (); ++iter)
1176  {
1177  OfdmUlMapIe uplinkAllocation = *iter;
1178 
1179  if (uplinkAllocation.GetUiuc () == OfdmUlBurstProfile::UIUC_END_OF_MAP)
1180  {
1181  break;
1182  }
1183 
1184  symbolsToAllocation = uplinkAllocation.GetStartTime ();
1185  MarkUplinkAllocationStart (symbolsToAllocation * m_symbolDuration);
1186  MarkUplinkAllocationEnd ((symbolsToAllocation + uplinkAllocation.GetDuration ())
1187  * m_symbolDuration, uplinkAllocation.GetCid (), uplinkAllocation.GetUiuc ());
1188  }
1189 }
1190 
1191 void
1193 {
1195 }
1196 
1197 void
1198 BaseStationNetDevice::MarkUplinkAllocationEnd (Time allocationEndTime, Cid cid, uint8_t uiuc)
1199 {
1200  Simulator::Schedule (allocationEndTime, &BaseStationNetDevice::UplinkAllocationEnd, this, cid, uiuc);
1201 }
1202 
1203 void
1205 {
1207 
1208  NS_LOG_DEBUG ("--UL allocation " << (uint32_t) m_ulAllocationNumber << " started : "
1209  << Simulator::Now ().As (Time::S));
1210 
1211 }
1212 
1213 void
1215 {
1216  NS_LOG_DEBUG ("--UL allocation " << (uint32_t) m_ulAllocationNumber << " ended : " << Simulator::Now ().As (Time::S));
1217 
1218  if (m_cidFactory->IsBasic (cid))
1219  {
1220  m_linkManager->VerifyInvitedRanging (cid, uiuc);
1221  }
1222 }
1223 
1224 void
1226 {
1227  Simulator::Schedule (rangingOppStartTime, &BaseStationNetDevice::RangingOppStart, this);
1228 }
1229 
1230 void
1232 {
1234 
1235  NS_LOG_DEBUG ("Ranging TO " << (uint32_t) m_rangingOppNumber << ": " << Simulator::Now ().As (Time::S));
1236 }
1237 
1238 } // namespace ns3
ns3::BaseStationNetDevice::Start
void Start(void)
Start device.
Definition: bs-net-device.cc:512
ns3::BandwidthRequestHeader::check_hcs
bool check_hcs(void) const
Check HCS.
Definition: wimax-mac-header.cc:485
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::BaseStationNetDevice::SetDcdInterval
void SetDcdInterval(Time dcdInterval)
Definition: bs-net-device.cc:303
ns3::WimaxNetDevice::m_direction
static uint8_t m_direction
downlink or uplink
Definition: wimax-net-device.h:277
ns3::BaseStationNetDevice
Definition: bs-net-device.h:51
ns3::OfdmDcdChannelEncodings::SetFrameDurationCode
void SetFrameDurationCode(uint8_t frameDurationCode)
Set frame duration code field.
Definition: dl-mac-messages.cc:144
ns3::BaseStationNetDevice::m_bsTxTrace
TracedCallback< Ptr< const Packet > > m_bsTxTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition,...
Definition: bs-net-device.h:466
ns3::BaseStationNetDevice::GetDlSubframeStartTime
Time GetDlSubframeStartTime(void) const
Definition: bs-net-device.cc:423
ns3::BaseStationNetDevice::m_nrUlMapSent
uint32_t m_nrUlMapSent
number UL map sent
Definition: bs-net-device.h:417
ns3::BaseStationNetDevice::StartFrame
void StartFrame(void)
Start frame function.
Definition: bs-net-device.cc:539
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
ns3::BaseStationNetDevice::m_framesSinceLastDcd
uint32_t m_framesSinceLastDcd
frames since last DCD
Definition: bs-net-device.h:425
ns3::BaseStationNetDevice::SetDlBurstProfiles
void SetDlBurstProfiles(Dcd *dcd)
Send DL burst profiles.
Definition: bs-net-device.cc:1120
ns3::Cid
Cid class.
Definition: cid.h:38
ns3::MakeTimeChecker
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:533
ns3::WimaxNetDevice::ForwardUp
void ForwardUp(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest)
Forward a packet to the next layer above the device.
Definition: wimax-net-device.cc:348
ns3::BaseStationNetDevice::SetBwReqOppSize
void SetBwReqOppSize(uint8_t bwReqOppSize)
Definition: bs-net-device.cc:375
ns3::Ucd::SetChannelEncodings
void SetChannelEncodings(OfdmUcdChannelEncodings channelEncodings)
Set channel encodings.
Definition: ul-mac-messages.cc:302
ns3::BaseStationNetDevice::SetMaxRangingCorrectionRetries
void SetMaxRangingCorrectionRetries(uint8_t maxRangCorrectionRetries)
Definition: bs-net-device.cc:339
ns3::WimaxNetDevice::GetTtg
uint16_t GetTtg(void) const
Get transmission/receive transition gap.
Definition: wimax-net-device.cc:183
ns3::BaseStationNetDevice::GetNrUcdSent
uint32_t GetNrUcdSent(void) const
Definition: bs-net-device.cc:417
ns3::WimaxNetDevice::GetConnectionManager
Ptr< ConnectionManager > GetConnectionManager(void) const
Get the connection manager of the device.
Definition: wimax-net-device.cc:475
bandwidth-manager.h
ns3::BaseStationNetDevice::EndDlSubFrame
void EndDlSubFrame(void)
End DL subframe function.
Definition: bs-net-device.cc:573
ns3::BaseStationNetDevice::GetBwReqOppSize
uint8_t GetBwReqOppSize(void) const
Definition: bs-net-device.cc:381
ns3::BaseStationNetDevice::EndFrame
void EndFrame(void)
End frame function.
Definition: bs-net-device.cc:604
ns3::Packet::GetSize
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:852
ns3::WimaxNetDevice::ForwardDown
void ForwardDown(Ptr< PacketBurst > burst, WimaxPhy::ModulationType modulationType)
Forward a packet down the stack.
Definition: wimax-net-device.cc:583
ns3::MacHeaderType::HEADER_TYPE_GENERIC
@ HEADER_TYPE_GENERIC
Definition: wimax-mac-header.h:42
ns3::Packet::AddHeader
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
ns3::BaseStationNetDevice::GetNrUlSymbols
uint32_t GetNrUlSymbols(void) const
Definition: bs-net-device.cc:405
ns3::OfdmDcdChannelEncodings::SetTtg
void SetTtg(uint8_t ttg)
Set TTG field.
Definition: dl-mac-messages.cc:126
ns3::BaseStationNetDevice::m_bsTxDropTrace
TracedCallback< Ptr< const Packet > > m_bsTxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
Definition: bs-net-device.h:474
ns3::WimaxNetDevice::GetRtg
uint16_t GetRtg(void) const
Get receive/transmit transition gap.
Definition: wimax-net-device.cc:195
ns3::Ucd::SetConfigurationChangeCount
void SetConfigurationChangeCount(uint8_t ucdCount)
Set configuration change count.
Definition: ul-mac-messages.cc:272
ns3::Simulator::Now
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:195
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::OfdmDcdChannelEncodings::SetFrameNumber
void SetFrameNumber(uint32_t frameNumber)
Set frame number field.
Definition: dl-mac-messages.cc:150
ns3::Dcd::AddDlBurstProfile
void AddDlBurstProfile(OfdmDlBurstProfile dlBurstProfile)
Add DL burst profile field.
Definition: dl-mac-messages.cc:347
ns3::BaseStationNetDevice::BS_STATE_TTG
@ BS_STATE_TTG
Definition: bs-net-device.h:58
ns3::BaseStationNetDevice::BaseStationNetDevice
BaseStationNetDevice(void)
Definition: bs-net-device.cc:190
ns3::WimaxNetDevice::SetState
void SetState(uint8_t state)
Set the device state.
Definition: wimax-net-device.cc:427
ns3::BaseStationNetDevice::GetMaxInvitedRangRetries
uint8_t GetMaxInvitedRangRetries(void) const
Definition: bs-net-device.cc:357
ns3::CidFactory::IsBasic
bool IsBasic(Cid cid) const
This function determines if the CID is basic.
Definition: cid-factory.cc:111
ns3::BaseStationNetDevice::m_framesSinceLastUcd
uint32_t m_framesSinceLastUcd
frames since last UCD
Definition: bs-net-device.h:426
ns3::BaseStationNetDevice::GetSymbolDuration
Time GetSymbolDuration(void) const
Definition: bs-net-device.cc:506
ns3::Cid::IsBroadcast
bool IsBroadcast(void) const
Definition: cid.cc:56
ns3::UcdChannelEncodings::SetBwReqOppSize
void SetBwReqOppSize(uint16_t bwReqOppSize)
Set BW request opp size.
Definition: ul-mac-messages.cc:42
ns3::WimaxNetDevice::GetBurstProfileManager
Ptr< BurstProfileManager > GetBurstProfileManager(void) const
Get the burst profile manager.
Definition: wimax-net-device.cc:487
ns3::OfdmUcdChannelEncodings
This class implements the OFDM UCD channel encodings as described by "IEEE Standard for Local and met...
Definition: ul-mac-messages.h:134
ns3::OfdmUcdChannelEncodings::SetSbchnlFocContCodes
void SetSbchnlFocContCodes(uint8_t sbchnlFocContCodes)
Set SB channel for control codes.
Definition: ul-mac-messages.cc:123
ns3::ManagementMessageType::MESSAGE_TYPE_DL_MAP
@ MESSAGE_TYPE_DL_MAP
Definition: mac-messages.h:51
ns3::BandwidthRequestHeader
This class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
Definition: wimax-mac-header.h:252
ns3::OfdmDlMapIe::SetCid
void SetCid(Cid cid)
Set CID function.
Definition: dl-mac-messages.cc:471
ns3::OfdmDlBurstProfile::SetLength
void SetLength(uint8_t length)
Set length field.
Definition: dl-mac-messages.cc:244
ns3::BaseStationNetDevice::m_linkManager
Ptr< BSLinkManager > m_linkManager
the link manager
Definition: bs-net-device.h:451
ns3::Ucd::SetRangingBackoffStart
void SetRangingBackoffStart(uint8_t rangingBackoffStart)
Set ranging backoff start.
Definition: ul-mac-messages.cc:278
ns3::ManagementMessageType
Mac Management messages Section 6.3.2.3 MAC Management messages page 42, Table 14 page 43.
Definition: mac-messages.h:44
ns3::BaseStationNetDevice::GetRangingOppNumber
uint8_t GetRangingOppNumber(void) const
Definition: bs-net-device.cc:435
ns3::ManagementMessageType::MESSAGE_TYPE_DSA_REQ
@ MESSAGE_TYPE_DSA_REQ
Definition: mac-messages.h:57
ns3::BaseStationNetDevice::m_intervalT8
Time m_intervalT8
in milliseconds, wait for DSA/DSC Acknowledge timeout
Definition: bs-net-device.h:405
ns3::OfdmUlMapIe::GetCid
Cid GetCid(void) const
Get CID.
Definition: ul-mac-messages.cc:512
ns3::FragmentationSubheader::GetFc
uint8_t GetFc(void) const
Get FC field.
Definition: wimax-mac-header.cc:611
ns3::BaseStationNetDevice::StartDlSubFrame
void StartDlSubFrame(void)
Start DL subframe function.
Definition: bs-net-device.cc:554
ns3::BaseStationNetDevice::BS_STATE_UL_SUB_FRAME
@ BS_STATE_UL_SUB_FRAME
Definition: bs-net-device.h:57
ns3::BaseStationNetDevice::m_nrSsRegistered
uint16_t m_nrSsRegistered
number SS registered
Definition: bs-net-device.h:433
ns3::MacHeaderType
This class Represents the HT (Header Type) field of generic MAC and bandwidth request headers.
Definition: wimax-mac-header.h:37
ns3::Dcd::SetConfigurationChangeCount
void SetConfigurationChangeCount(uint8_t configurationChangeCount)
Set configuration change count field.
Definition: dl-mac-messages.cc:329
ns3::BaseStationNetDevice::m_cidFactory
CidFactory * m_cidFactory
the CID factory
Definition: bs-net-device.h:444
ns3::OfdmDlMapIe::GetCid
Cid GetCid(void) const
Set CID field.
Definition: dl-mac-messages.cc:495
ns3::BaseStationNetDevice::~BaseStationNetDevice
~BaseStationNetDevice(void)
Definition: bs-net-device.cc:256
ns3::MacHeaderType::HEADER_TYPE_BANDWIDTH
@ HEADER_TYPE_BANDWIDTH
Definition: wimax-mac-header.h:43
ns3::BaseStationNetDevice::m_ulAllocationNumber
uint8_t m_ulAllocationNumber
to see UL burst number
Definition: bs-net-device.h:441
ns3::GenericMacHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition: wimax-mac-header.cc:227
wimax-mac-queue.h
ns3::BaseStationNetDevice::m_nrUlSymbols
uint32_t m_nrUlSymbols
number of UL symbols
Definition: bs-net-device.h:413
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition: pointer.h:37
ns3::Mac48Address
an EUI-48 address
Definition: mac48-address.h:44
ns3::BaseStationNetDevice::GetNrDlSymbols
uint32_t GetNrDlSymbols(void) const
Definition: bs-net-device.cc:393
ns3::BaseStationNetDevice::SetLinkManager
void SetLinkManager(Ptr< BSLinkManager > linkManager)
Definition: bs-net-device.cc:483
ns3::BaseStationNetDevice::m_bsRxDropTrace
TracedCallback< Ptr< const Packet > > m_bsRxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
Definition: bs-net-device.h:500
ns3::BaseStationNetDevice::MarkUplinkAllocationStart
void MarkUplinkAllocationStart(Time allocationStartTime)
Mark uplink allocation start.
Definition: bs-net-device.cc:1192
ns3::BaseStationNetDevice::m_nrDlMapSent
uint32_t m_nrDlMapSent
number DL map sent
Definition: bs-net-device.h:416
ns3::WimaxPhy::MODULATION_TYPE_BPSK_12
@ MODULATION_TYPE_BPSK_12
Definition: wimax-phy.h:51
ns3::BaseStationNetDevice::GetBSScheduler
Ptr< BSScheduler > GetBSScheduler(void) const
Definition: bs-net-device.cc:494
ns3::Time::As
TimeWithUnit As(const enum Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
Definition: time.cc:429
ns3::ServiceFlow::GetIsEnabled
bool GetIsEnabled(void) const
Get is enabled flag.
Definition: service-flow.cc:234
ns3::BaseStationNetDevice::m_bsRxTrace
TracedCallback< Ptr< const Packet > > m_bsRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
Definition: bs-net-device.h:492
ns3::BaseStationNetDevice::m_nrDlSymbols
uint32_t m_nrDlSymbols
number of DL symbols
Definition: bs-net-device.h:412
ns3::UlMap
This class implements the UL-MAP_IE message as described by "IEEE Standard for Local and metropolitan...
Definition: ul-mac-messages.h:574
ns3::Simulator::Schedule
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:556
ns3::OfdmUlBurstProfile::SetUiuc
void SetUiuc(uint8_t uiuc)
Set UIUC.
Definition: ul-mac-messages.cc:191
ns3::BaseStationNetDevice::BS_STATE_RTG
@ BS_STATE_RTG
Definition: bs-net-device.h:59
ns3::BaseStationNetDevice::m_dcdConfigChangeCount
uint32_t m_dcdConfigChangeCount
DCD config change count.
Definition: bs-net-device.h:422
ns3::BaseStationNetDevice::m_traceBSRx
TracedCallback< Ptr< const Packet >, Mac48Address, Cid > m_traceBSRx
the base station receive trace callback
Definition: bs-net-device.h:458
ns3::GenericMacHeader::GetHt
uint8_t GetHt(void) const
Get HT field.
Definition: wimax-mac-header.cc:160
ns3::WimaxNetDevice::CreateDefaultConnections
void CreateDefaultConnections(void)
Creates the initial ranging and broadcast connections.
Definition: wimax-net-device.cc:511
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
ns3::WimaxConnection::FragmentsQueue
std::list< Ptr< const Packet > > FragmentsQueue
Definition of Fragments Queue data type.
Definition: wimax-connection.h:132
ns3::Ucd::SetRequestBackoffEnd
void SetRequestBackoffEnd(uint8_t requestBackoffEnd)
Set request backoff end.
Definition: ul-mac-messages.cc:296
ns3::BaseStationNetDevice::m_ucdConfigChangeCount
uint32_t m_ucdConfigChangeCount
UCD config change count.
Definition: bs-net-device.h:423
ns3::BaseStationNetDevice::SetUcdInterval
void SetUcdInterval(Time ucdInterval)
Definition: bs-net-device.cc:315
ns3::DlMap::AddDlMapElement
void AddDlMapElement(OfdmDlMapIe dlMapElement)
Add DL Map element field.
Definition: dl-mac-messages.cc:573
ns3::DlMap::SetDcdCount
void SetDcdCount(uint8_t dcdCount)
Set DCD count field.
Definition: dl-mac-messages.cc:561
ns3::WimaxNetDevice::GetInitialRangingConnection
Ptr< WimaxConnection > GetInitialRangingConnection(void) const
Get the initial ranging connection.
Definition: wimax-net-device.cc:439
ns3::BaseStationNetDevice::m_bsPromiscRxTrace
TracedCallback< Ptr< const Packet > > m_bsPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
Definition: bs-net-device.h:483
ns3::MakeTraceSourceAccessor
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Definition: trace-source-accessor.h:202
ns3::BaseStationNetDevice::SetMaxInvitedRangRetries
void SetMaxInvitedRangRetries(uint8_t maxInvitedRangRetries)
Definition: bs-net-device.cc:351
ns3::BaseStationNetDevice::MarkUplinkAllocationEnd
void MarkUplinkAllocationEnd(Time allocationEndTime, Cid cid, uint8_t uiuc)
Mark uplink allocation end.
Definition: bs-net-device.cc:1198
ns3::BaseStationNetDevice::GetConnection
Ptr< WimaxConnection > GetConnection(Cid cid)
Definition: bs-net-device.cc:1150
ns3::DcdChannelEncodings::SetBsEirp
void SetBsEirp(uint16_t bs_eirp)
Set BS EIRP field.
Definition: dl-mac-messages.cc:42
ns3::ManagementMessageType::MESSAGE_TYPE_DSA_RSP
@ MESSAGE_TYPE_DSA_RSP
Definition: mac-messages.h:58
ns3::GenericMacHeader::SetLen
void SetLen(uint16_t len)
Set length field.
Definition: wimax-mac-header.cc:145
ns3::BandwidthRequestHeader::GetHt
uint8_t GetHt(void) const
Get HT field.
Definition: wimax-mac-header.cc:353
ns3::BaseStationNetDevice::SetBsClassifier
void SetBsClassifier(Ptr< IpcsClassifier > classifier)
Definition: bs-net-device.cc:279
ns3::BaseStationNetDevice::GetNrDcdSent
uint32_t GetNrDcdSent(void) const
Definition: bs-net-device.cc:411
ns3::BaseStationNetDevice::GetBsClassifier
Ptr< IpcsClassifier > GetBsClassifier(void) const
Definition: bs-net-device.cc:285
ns3::BaseStationNetDevice::MarkUplinkAllocations
void MarkUplinkAllocations(void)
Mark uplink allocations.
Definition: bs-net-device.cc:1171
ns3::BaseStationNetDevice::GetDcdInterval
Time GetDcdInterval(void) const
Definition: bs-net-device.cc:309
ns3::BaseStationNetDevice::m_allocationStartTime
uint32_t m_allocationStartTime
allocation start time
Definition: bs-net-device.h:446
ns3::BaseStationNetDevice::GetPsDuration
Time GetPsDuration(void) const
Definition: bs-net-device.cc:500
ns3::Ptr< Node >
ns3::BaseStationNetDevice::InitBaseStationNetDevice
void InitBaseStationNetDevice(void)
initializes the BS net device and sets its parameters to the default values
Definition: bs-net-device.cc:196
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
ns3::DsaReq
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:374
ns3::OfdmUlBurstProfile::SetType
void SetType(uint8_t type)
Set type.
Definition: ul-mac-messages.cc:179
ns3::BaseStationNetDevice::GetUplinkScheduler
Ptr< UplinkScheduler > GetUplinkScheduler(void) const
Definition: bs-net-device.cc:465
ns3::WimaxNetDevice
Hold together all WiMAX-related objects in a NetDevice.
Definition: wimax-net-device.h:69
ns3::BaseStationNetDevice::MarkRangingOppStart
void MarkRangingOppStart(Time rangingOppStartTime)
Mark ranging opp start.
Definition: bs-net-device.cc:1225
ns3::OfdmUlBurstProfile::SetLength
void SetLength(uint8_t length)
Set length.
Definition: ul-mac-messages.cc:185
ns3::BaseStationNetDevice::SetUplinkScheduler
void SetUplinkScheduler(Ptr< UplinkScheduler > ulScheduler)
Definition: bs-net-device.cc:471
ns3::ServiceFlow::SF_DIRECTION_DOWN
@ SF_DIRECTION_DOWN
Definition: service-flow.h:45
ns3::WimaxPhy::ModulationType
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:50
ns3::OfdmUlMapIe::GetStartTime
uint16_t GetStartTime(void) const
Get start time.
Definition: ul-mac-messages.cc:518
ns3::WimaxNetDevice::DIRECTION_UPLINK
@ DIRECTION_UPLINK
Definition: wimax-net-device.h:75
ns3::BaseStationNetDevice::m_dcdInterval
Time m_dcdInterval
in seconds
Definition: bs-net-device.h:403
ns3::Ucd::SetRequestBackoffStart
void SetRequestBackoffStart(uint8_t requestBackoffStart)
Set request backoff start.
Definition: ul-mac-messages.cc:290
ns3::BaseStationNetDevice::m_nrUlFrames
uint32_t m_nrUlFrames
number UL frames
Definition: bs-net-device.h:430
ns3::OfdmDlMapIe
This class implements the OFDM DL-MAP information element as described by "IEEE Standard for Local an...
Definition: dl-mac-messages.h:447
ns3::BaseStationNetDevice::SendBursts
void SendBursts(void)
Send burst function.
Definition: bs-net-device.cc:959
ns3::BaseStationNetDevice::Enqueue
bool Enqueue(Ptr< Packet > packet, const MacHeaderType &hdrType, Ptr< WimaxConnection > connection)
Enqueue a packet into a connection queue.
Definition: bs-net-device.cc:662
ns3::DsaAck
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:573
ns3::OfdmDlBurstProfile::DIUC_END_OF_MAP
@ DIUC_END_OF_MAP
Definition: dl-mac-messages.h:270
ns3::OfdmUlMapIe
This class implements the UL-MAP_IE message as described by "IEEE Standard for Local and metropolitan...
Definition: ul-mac-messages.h:453
ns3::WimaxNetDevice::SetTtg
void SetTtg(uint16_t ttg)
Set transmission/receive transition gap.
Definition: wimax-net-device.cc:177
ns3::ManagementMessageType::GetType
uint8_t GetType(void) const
Get type field.
Definition: mac-messages.cc:56
ns3::Cid::InitialRanging
static Cid InitialRanging(void)
Definition: cid.cc:82
ns3::Simulator::Cancel
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
Definition: simulator.cc:268
ns3::BaseStationNetDevice::GetLinkManager
Ptr< BSLinkManager > GetLinkManager(void) const
Definition: bs-net-device.cc:477
ns3::OfdmDcdChannelEncodings
This class implements the OFDM DCD channel encodings as described by "IEEE Standard for Local and met...
Definition: dl-mac-messages.h:133
ns3::OfdmUlBurstProfile
This class implements the UL burst profile as described by "IEEE Standard for Local and metropolitan ...
Definition: ul-mac-messages.h:204
NS_LOG_INFO
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:281
ns3::BaseStationNetDevice::m_uplinkScheduler
Ptr< UplinkScheduler > m_uplinkScheduler
the uplink scheduler
Definition: bs-net-device.h:449
ns3::DcdChannelEncodings::SetFrequency
void SetFrequency(uint32_t frequency)
Set frequency field.
Definition: dl-mac-messages.cc:54
ns3::BaseStationNetDevice::SetRangReqOppSize
void SetRangReqOppSize(uint8_t rangReqOppSize)
Definition: bs-net-device.cc:363
ns3::ManagementMessageType::MESSAGE_TYPE_RNG_RSP
@ MESSAGE_TYPE_RNG_RSP
Definition: mac-messages.h:54
ns3::MilliSeconds
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1297
wimax-phy.h
ns3::Packet::RemoveHeader
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
ns3::BaseStationNetDevice::BS_STATE_DL_SUB_FRAME
@ BS_STATE_DL_SUB_FRAME
Definition: bs-net-device.h:56
ns3::BaseStationNetDevice::SetSSManager
void SetSSManager(Ptr< SSManager > ssManager)
Definition: bs-net-device.cc:447
connection-manager.h
ns3::OfdmUlMapIe::GetDuration
uint16_t GetDuration(void) const
Get duration.
Definition: ul-mac-messages.cc:536
ns3::BaseStationNetDevice::m_ucdInterval
Time m_ucdInterval
in seconds
Definition: bs-net-device.h:404
ns3::OfdmDlBurstProfile::SetType
void SetType(uint8_t type)
Set type field.
Definition: dl-mac-messages.cc:238
ns3::BaseStationNetDevice::m_rangReqOppSize
uint8_t m_rangReqOppSize
in symbols
Definition: bs-net-device.h:409
ns3::ManagementMessageType::MESSAGE_TYPE_REG_RSP
@ MESSAGE_TYPE_REG_RSP
Definition: mac-messages.h:56
ns3::ManagementMessageType::MESSAGE_TYPE_REG_REQ
@ MESSAGE_TYPE_REG_REQ
Definition: mac-messages.h:55
ns3::WimaxNetDevice::SetPhy
void SetPhy(Ptr< WimaxPhy > phy)
Set the physical layer object.
Definition: wimax-net-device.cc:363
ns3::ManagementMessageType::MESSAGE_TYPE_DSA_ACK
@ MESSAGE_TYPE_DSA_ACK
Definition: mac-messages.h:59
ns3::BaseStationNetDevice::CreateMapMessages
void CreateMapMessages(void)
creates the MAC management messages DL-MAP and UL-MAP
Definition: bs-net-device.cc:881
ns3::BaseStationNetDevice::Stop
void Stop(void)
Stop device.
Definition: bs-net-device.cc:534
ns3::BaseStationNetDevice::m_ssManager
Ptr< SSManager > m_ssManager
the SS manager
Definition: bs-net-device.h:448
ns3::GenericMacHeader::GetType
uint8_t GetType(void) const
Get type field.
Definition: wimax-mac-header.cc:170
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::BaseStationNetDevice::m_nrDcdSent
uint32_t m_nrDcdSent
number DCD sent
Definition: bs-net-device.h:419
ns3::UcdChannelEncodings::SetRangReqOppSize
void SetRangReqOppSize(uint16_t rangReqOppSize)
Set range request opp size.
Definition: ul-mac-messages.cc:48
ns3::DlMap::SetBaseStationId
void SetBaseStationId(Mac48Address baseStationID)
Set base station ID field.
Definition: dl-mac-messages.cc:567
ns3::OfdmDlMapIe::SetDiuc
void SetDiuc(uint8_t diuc)
Set DIUC field.
Definition: dl-mac-messages.cc:477
ns3::BaseStationNetDevice::m_nrUlAllocations
uint16_t m_nrUlAllocations
number UL allocations
Definition: bs-net-device.h:436
ns3::BaseStationNetDevice::GetSSManager
Ptr< SSManager > GetSSManager(void) const
Definition: bs-net-device.cc:441
ns3::FragmentationSubheader
This class implements the fragmentation sub-header as described by IEEE Standard for Local and metrop...
Definition: wimax-mac-header.h:458
NS_ASSERT_MSG
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:88
ns3::DlMap
This class implements DL-MAP as described by "IEEE Standard for Local and metropolitan area networks ...
Definition: dl-mac-messages.h:542
ns3::WimaxNetDevice::GetMacAddress
Mac48Address GetMacAddress(void) const
Get the MAC address.
Definition: wimax-net-device.cc:421
ns3::BaseStationNetDevice::CreateUcd
Ptr< Packet > CreateUcd(void)
Create UCD.
Definition: bs-net-device.cc:1090
ns3::WimaxNetDevice::GetNrFrames
uint32_t GetNrFrames(void) const
Get the number of frames.
Definition: wimax-net-device.cc:396
ns3::BaseStationNetDevice::SetServiceFlowManager
void SetServiceFlowManager(Ptr< BsServiceFlowManager > sfm)
Set service flow manager.
Definition: bs-net-device.cc:459
ns3::BaseStationNetDevice::m_nrUcdSent
uint32_t m_nrUcdSent
number UCD sent
Definition: bs-net-device.h:420
list
#define list
Definition: openflow-interface.h:47
ns3::BaseStationNetDevice::SetNrDlSymbols
void SetNrDlSymbols(uint32_t dlSymbols)
Definition: bs-net-device.cc:387
service-flow.h
ns3::OfdmUlBurstProfile::UIUC_END_OF_MAP
@ UIUC_END_OF_MAP
Definition: ul-mac-messages.h:222
ns3::BaseStationNetDevice::m_maxRangCorrectionRetries
uint8_t m_maxRangCorrectionRetries
maximum range correction retries
Definition: bs-net-device.h:407
ns3::Cid::IsInitialRanging
bool IsInitialRanging(void) const
Definition: cid.cc:66
ns3::BaseStationNetDevice::m_psDuration
Time m_psDuration
ps duration
Definition: bs-net-device.h:455
ns3::WimaxNetDevice::DIRECTION_DOWNLINK
@ DIRECTION_DOWNLINK
Definition: wimax-net-device.h:74
ns3::BaseStationNetDevice::UplinkAllocationStart
void UplinkAllocationStart(void)
Uplink allocation start.
Definition: bs-net-device.cc:1204
ns3::BaseStationNetDevice::CreateUlMap
Ptr< Packet > CreateUlMap(void)
Create UL map.
Definition: bs-net-device.cc:1064
ns3::MakePointerAccessor
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: pointer.h:227
ns3::GenericMacHeader
This class implements the Generic mac Header as described by IEEE Standard for Local and metropolitan...
Definition: wimax-mac-header.h:109
ns3::WimaxNetDevice::GetBroadcastConnection
Ptr< WimaxConnection > GetBroadcastConnection(void) const
Get the broadcast connection.
Definition: wimax-net-device.cc:445
ns3::OfdmDlMapIe::GetDiuc
uint8_t GetDiuc(void) const
Get DIUC field.
Definition: dl-mac-messages.cc:501
ns3::WimaxNetDevice::SetRtg
void SetRtg(uint16_t rtg)
Set receive/transmit transition gap.
Definition: wimax-net-device.cc:189
ns3::WimaxNetDevice::SetCurrentUcd
void SetCurrentUcd(Ucd ucd)
Set the current UCD.
Definition: wimax-net-device.cc:463
ns3::DcdChannelEncodings::SetEirxPIrMax
void SetEirxPIrMax(uint16_t rss_ir_max)
Set EIRX IR MAX field.
Definition: dl-mac-messages.cc:48
ns3::BaseStationNetDevice::m_bwReqOppSize
uint8_t m_bwReqOppSize
in symbols
Definition: bs-net-device.h:410
ns3::OfdmDlBurstProfile
This class implements the OFDM Downlink burst profile descriptor as described by "IEEE Standard for L...
Definition: dl-mac-messages.h:251
ns3::Ucd::AddUlBurstProfile
void AddUlBurstProfile(OfdmUlBurstProfile ulBurstProfile)
Add UL burst profile.
Definition: ul-mac-messages.cc:308
ns3::BaseStationNetDevice::m_dlSubframeStartTime
Time m_dlSubframeStartTime
DL subframe start time.
Definition: bs-net-device.h:438
ns3::Packet::AddAtEnd
void AddAtEnd(Ptr< const Packet > packet)
Concatenate the input packet at the end of the current packet.
Definition: packet.cc:335
ss-record.h
ns3::ServiceFlow::GetConnection
Ptr< WimaxConnection > GetConnection(void) const
Can return a null connection is this service flow has not been associated yet to a connection.
Definition: service-flow.cc:222
ns3::BaseStationNetDevice::m_rangingOppNumber
uint8_t m_rangingOppNumber
current ranging TO number
Definition: bs-net-device.h:442
ns3::ManagementMessageType::MESSAGE_TYPE_UL_MAP
@ MESSAGE_TYPE_UL_MAP
Definition: mac-messages.h:52
NS_LOG_DEBUG
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
ns3::BaseStationNetDevice::SetBSScheduler
void SetBSScheduler(Ptr< BSScheduler > bsSchedule)
Definition: bs-net-device.cc:489
ns3::GrantManagementSubheader
This class implements the grant management sub-header as described by IEEE Standard for Local and met...
Definition: wimax-mac-header.h:377
ns3::WimaxNetDevice::SetNode
virtual void SetNode(Ptr< Node > node)
Set node pointer.
Definition: wimax-net-device.cc:318
ns3::GenericMacHeader::check_hcs
bool check_hcs(void) const
Check HCS.
Definition: wimax-mac-header.cc:300
ns3::WimaxNetDevice::GetBandwidthManager
Ptr< BandwidthManager > GetBandwidthManager(void) const
Get the bandwidth manager on the device.
Definition: wimax-net-device.cc:499
ns3::BaseStationNetDevice::m_serviceFlowManager
Ptr< BsServiceFlowManager > m_serviceFlowManager
the service flow manager
Definition: bs-net-device.h:453
ns3::BaseStationNetDevice::SetInitialRangingInterval
void SetInitialRangingInterval(Time initialRangInterval)
Definition: bs-net-device.cc:291
ns3::BaseStationNetDevice::GetMaxRangingCorrectionRetries
uint8_t GetMaxRangingCorrectionRetries(void) const
Definition: bs-net-device.cc:345
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::Packet::Copy
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Definition: packet.cc:121
bs-scheduler.h
ns3::Time::S
@ S
second
Definition: nstime.h:115
ns3::BaseStationNetDevice::RangingOppStart
void RangingOppStart(void)
Ranging opp start.
Definition: bs-net-device.cc:1231
ns3::CidFactory
This class is used exclusively by the BS to allocate CIDs to new connections.
Definition: cid-factory.h:46
ns3::BaseStationNetDevice::m_initialRangInterval
Time m_initialRangInterval
in seconds
Definition: bs-net-device.h:402
ns3::BaseStationNetDevice::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: bs-net-device.cc:54
ns3::WimaxNetDevice::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: wimax-net-device.cc:158
ns3::WimaxNetDevice::SetReceiveCallback
void SetReceiveCallback(void)
Set receive callback function.
Definition: wimax-net-device.cc:538
ns3::CidFactory::IsPrimary
bool IsPrimary(Cid cid) const
This function determines if the CID is primary.
Definition: cid-factory.cc:105
ns3::TimeValue
AttributeValue implementation for Time.
Definition: nstime.h:1353
ns3::BaseStationNetDevice::GetIntervalT8
Time GetIntervalT8(void) const
Definition: bs-net-device.cc:333
ns3::ManagementMessageType::MESSAGE_TYPE_DCD
@ MESSAGE_TYPE_DCD
Definition: mac-messages.h:50
ns3::BaseStationNetDevice::m_nrDlAllocations
uint16_t m_nrDlAllocations
number DL allocations
Definition: bs-net-device.h:435
ns3::BaseStationNetDevice::GetInitialRangingInterval
Time GetInitialRangingInterval(void) const
Definition: bs-net-device.cc:297
ns3::BaseStationNetDevice::StartUlSubFrame
void StartUlSubFrame(void)
Start UL subframe function.
Definition: bs-net-device.cc:581
ns3::Dcd::SetChannelEncodings
void SetChannelEncodings(OfdmDcdChannelEncodings channelEncodings)
Set channel encodings field.
Definition: dl-mac-messages.cc:335
ns3::OfdmUcdChannelEncodings::SetSbchnlReqRegionFullParams
void SetSbchnlReqRegionFullParams(uint8_t sbchnlReqRegionFullParams)
Set SB channel reguest region full parameters.
Definition: ul-mac-messages.cc:116
ns3::BaseStationNetDevice::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: bs-net-device.cc:261
ns3::OfdmUlBurstProfile::SetFecCodeType
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
Definition: ul-mac-messages.cc:197
ns3::GenericMacHeader::GetCid
Cid GetCid(void) const
Get CID field.
Definition: wimax-mac-header.cc:190
ns3::BaseStationNetDevice::CreateDlMap
Ptr< Packet > CreateDlMap(void)
Create DL map.
Definition: bs-net-device.cc:1001
ns3::BaseStationNetDevice::EndUlSubFrame
void EndUlSubFrame(void)
End UL subframe function.
Definition: bs-net-device.cc:596
ns3::UlMap::SetAllocationStartTime
void SetAllocationStartTime(uint32_t allocationStartTime)
Set allocation start time.
Definition: ul-mac-messages.cc:601
ns3::ManagementMessageType::MESSAGE_TYPE_RNG_REQ
@ MESSAGE_TYPE_RNG_REQ
Definition: mac-messages.h:53
ns3::BaseStationNetDevice::SetNrUlSymbols
void SetNrUlSymbols(uint32_t ulSymbols)
Definition: bs-net-device.cc:399
ns3::BaseStationNetDevice::GetRangReqOppSize
uint8_t GetRangReqOppSize(void) const
Definition: bs-net-device.cc:369
ns3::WimaxNetDevice::m_frameStartTime
static Time m_frameStartTime
temp, to determine the frame start time at SS side, shall actually be determined by frame start pream...
Definition: wimax-net-device.h:279
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:40
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
ns3::BaseStationNetDevice::m_symbolDuration
Time m_symbolDuration
symbol duration
Definition: bs-net-device.h:456
ns3::LlcSnapHeader
Header for the LLC/SNAP encapsulation.
Definition: llc-snap-header.h:43
ns3::OfdmDcdChannelEncodings::SetChannelNr
void SetChannelNr(uint8_t channelNr)
Set channel number field.
Definition: dl-mac-messages.cc:120
ss-manager.h
ns3::GenericMacHeader::SetCid
void SetCid(Cid cid)
Set CID field.
Definition: wimax-mac-header.cc:150
ns3::WimaxNetDevice::SetNrFrames
void SetNrFrames(uint32_t nrFrames)
Set the number of frames.
Definition: wimax-net-device.cc:391
ns3::OfdmUlMapIe::GetUiuc
uint8_t GetUiuc(void) const
Get UIUC.
Definition: ul-mac-messages.cc:530
ns3::ServiceFlow::SF_TYPE_ALL
@ SF_TYPE_ALL
Definition: service-flow.h:66
ns3::BaseStationNetDevice::m_maxInvitedRangRetries
uint8_t m_maxInvitedRangRetries
maximum invited range retries
Definition: bs-net-device.h:408
ns3::MakeUintegerAccessor
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: uinteger.h:45
ns3::Ucd
This class implements the UCD message as described by "IEEE Standard for Local and metropolitan area ...
Definition: ul-mac-messages.h:318
ns3::BaseStationNetDevice::m_ulSubframeStartTime
Time m_ulSubframeStartTime
UL subframe start time.
Definition: bs-net-device.h:439
ns3::BaseStationNetDevice::CreateDcd
Ptr< Packet > CreateDcd(void)
Create DCD.
Definition: bs-net-device.cc:1036
ns3::Ucd::SetRangingBackoffEnd
void SetRangingBackoffEnd(uint8_t rangingBackoffEnd)
Set ranging backoff end.
Definition: ul-mac-messages.cc:284
ns3::UlMap::AddUlMapElement
void AddUlMapElement(OfdmUlMapIe ulMapElement)
Add UL map element.
Definition: ul-mac-messages.cc:607
ns3::BaseStationNetDevice::SetUlBurstProfiles
void SetUlBurstProfiles(Ucd *ucd)
Send UL burst profiles.
Definition: bs-net-device.cc:1134
service-flow-manager.h
ns3::UlMap::SetUcdCount
void SetUcdCount(uint8_t ucdCount)
Set UCD count.
Definition: ul-mac-messages.cc:595
ns3::BaseStationNetDevice::CreateDescriptorMessages
void CreateDescriptorMessages(bool sendDcd, bool sendUcd)
creates the channel descriptor MAC management messages DCD and UCD
Definition: bs-net-device.cc:925
ns3::BaseStationNetDevice::m_scheduler
Ptr< BSScheduler > m_scheduler
the base station scheduler
Definition: bs-net-device.h:450
ns3::OfdmDlBurstProfile::SetFecCodeType
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
Definition: dl-mac-messages.cc:256
ns3::OfdmDlMapIe::SetPreamblePresent
void SetPreamblePresent(uint8_t preamblePresent)
Set preamble present field.
Definition: dl-mac-messages.cc:483
ns3::ManagementMessageType::MESSAGE_TYPE_UCD
@ MESSAGE_TYPE_UCD
Definition: mac-messages.h:49
ns3::Simulator::ScheduleNow
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
Definition: simulator.h:587
ns3::OfdmDcdChannelEncodings::SetBaseStationId
void SetBaseStationId(Mac48Address baseStationId)
Set base station ID field.
Definition: dl-mac-messages.cc:138
ns3::BaseStationNetDevice::GetUlSubframeStartTime
Time GetUlSubframeStartTime(void) const
Definition: bs-net-device.cc:429
ns3::BaseStationNetDevice::GetServiceFlowManager
Ptr< BsServiceFlowManager > GetServiceFlowManager(void) const
Definition: bs-net-device.cc:453
ns3::BaseStationNetDevice::SetIntervalT8
void SetIntervalT8(Time interval)
Definition: bs-net-device.cc:327
ns3::BaseStationNetDevice::m_nrDlFrames
uint32_t m_nrDlFrames
number DL frames
Definition: bs-net-device.h:429
bs-net-device.h
ns3::Time::GetSeconds
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:380
ns3::Dcd
This class implements Downlink channel descriptor as described by "IEEE Standard for Local and metrop...
Definition: dl-mac-messages.h:356
ns3::BaseStationNetDevice::DoReceive
void DoReceive(Ptr< Packet > packet)
Receive packet.
Definition: bs-net-device.cc:676
ns3::OfdmDlBurstProfile::SetDiuc
void SetDiuc(uint8_t diuc)
Set DIUC field.
Definition: dl-mac-messages.cc:250
ns3::OfdmDcdChannelEncodings::SetRtg
void SetRtg(uint8_t rtg)
Set RTG field.
Definition: dl-mac-messages.cc:132
ns3::WimaxNetDevice::GetPhy
Ptr< WimaxPhy > GetPhy(void) const
Get the physical layer object.
Definition: wimax-net-device.cc:369
third.phy
phy
Definition: third.py:93
ns3::MakeTimeAccessor
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: nstime.h:1354
ns3::WimaxNetDevice::SetCurrentDcd
void SetCurrentDcd(Dcd dcd)
Set the current DCD.
Definition: wimax-net-device.cc:451
ns3::BaseStationNetDevice::DoSend
bool DoSend(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest, uint16_t protocolNumber)
Send packet.
Definition: bs-net-device.cc:610
ns3::UcdChannelEncodings::SetFrequency
void SetFrequency(uint32_t frequency)
Set frequency.
Definition: ul-mac-messages.cc:54
ns3::OfdmDlMapIe::SetStartTime
void SetStartTime(uint16_t startTime)
Set start time field.
Definition: dl-mac-messages.cc:489
ns3::BaseStationNetDevice::m_bsClassifier
Ptr< IpcsClassifier > m_bsClassifier
the base station classifier
Definition: bs-net-device.h:452
ns3::BaseStationNetDevice::UplinkAllocationEnd
void UplinkAllocationEnd(Cid cid, uint8_t uiuc)
Uplink allocation end.
Definition: bs-net-device.cc:1214
ns3::BaseStationNetDevice::GetUcdInterval
Time GetUcdInterval(void) const
Definition: bs-net-device.cc:321
burst-profile-manager.h
ns3::BandwidthRequestHeader::GetCid
Cid GetCid(void) const
Get CID field.
Definition: wimax-mac-header.cc:373
ns3::RngReq
This class implements the ranging request message described by "IEEE Standard for Local and metropoli...
Definition: mac-messages.h:643