A Discrete-Event Network Simulator
API
ss-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 "ns3/simulator.h"
24 #include "ns3/node.h"
25 #include "ns3/config.h"
26 #include "ss-net-device.h"
27 #include "wimax-phy.h"
28 #include "ns3/packet-burst.h"
29 #include <algorithm>
30 #include "dl-mac-messages.h"
31 #include "ul-mac-messages.h"
32 #include "ss-scheduler.h"
33 #include "wimax-mac-queue.h"
34 #include "ns3/trace-source-accessor.h"
35 #include "ns3/pointer.h"
36 #include "ns3/enum.h"
37 #include "service-flow.h"
38 #include "service-flow-record.h"
39 #include "service-flow-manager.h"
40 #include "connection-manager.h"
41 #include "burst-profile-manager.h"
42 #include "ss-link-manager.h"
43 #include "bandwidth-manager.h"
44 
45 namespace ns3 {
46 
47 NS_LOG_COMPONENT_DEFINE ("SubscriberStationNetDevice");
48 
49 NS_OBJECT_ENSURE_REGISTERED (SubscriberStationNetDevice);
50 
52 {
53  return (MicroSeconds (500000));
54 }
55 
56 TypeId
58 {
59  static TypeId
60  tid =
61  TypeId ("ns3::SubscriberStationNetDevice")
62 
64  .SetGroupName ("Wimax")
65 
66  .AddConstructor<SubscriberStationNetDevice> ()
67 
68  .AddAttribute ("BasicConnection",
69  "Basic connection",
70  PointerValue (),
72  MakePointerChecker<WimaxConnection> ())
73 
74  .AddAttribute ("PrimaryConnection",
75  "Primary connection",
76  PointerValue (),
78  MakePointerChecker<WimaxConnection> ())
79 
80  .AddAttribute ("LostDlMapInterval",
81  "Time since last received DL-MAP message before downlink synchronization is considered lost. Maximum is 600ms",
82  TimeValue (Seconds (0.5)),
85  MakeTimeChecker ())
86 
87  .AddAttribute ("LostUlMapInterval",
88  "Time since last received UL-MAP before uplink synchronization is considered lost, maximum is 600.",
89  TimeValue (MilliSeconds (500)),
92  MakeTimeChecker ())
93 
94  .AddAttribute ("MaxDcdInterval",
95  "Maximum time between transmission of DCD messages. Maximum is 10s",
96  TimeValue (Seconds (10)),
99  MakeTimeChecker ())
100 
101  .AddAttribute ("MaxUcdInterval",
102  "Maximum time between transmission of UCD messages. Maximum is 10s",
103  TimeValue (Seconds (10)),
106  MakeTimeChecker ())
107 
108  .AddAttribute ("IntervalT1",
109  "Wait for DCD timeout. Maximum is 5*maxDcdInterval",
110  TimeValue (Seconds (50)),
113  MakeTimeChecker ())
114 
115  .AddAttribute ("IntervalT2",
116  "Wait for broadcast ranging timeout, i.e., wait for initial ranging opportunity. Maximum is 5*Ranging interval",
117  TimeValue (Seconds (10)),
120  MakeTimeChecker ())
121 
122  .AddAttribute ("IntervalT3",
123  "ranging Response reception timeout following the transmission of a ranging request. Maximum is 200ms",
124  TimeValue (Seconds (0.2)),
127  MakeTimeChecker ())
128 
129  .AddAttribute ("IntervalT7",
130  "wait for DSA/DSC/DSD Response timeout. Maximum is 1s",
131  TimeValue (Seconds (0.1)),
134  MakeTimeChecker ())
135 
136  .AddAttribute ("IntervalT12",
137  "Wait for UCD descriptor.Maximum is 5*MaxUcdInterval",
138  TimeValue (Seconds (10)),
141  MakeTimeChecker ())
142 
143  .AddAttribute ("IntervalT20",
144  "Time the SS searches for preambles on a given channel. Minimum is 2 MAC frames",
145  TimeValue (Seconds (0.5)),
148  MakeTimeChecker ())
149 
150  .AddAttribute ("IntervalT21",
151  "time the SS searches for (decodable) DL-MAP on a given channel",
152  TimeValue (Seconds (10)),
155  MakeTimeChecker ())
156 
157  .AddAttribute ("MaxContentionRangingRetries",
158  "Number of retries on contention Ranging Requests",
159  UintegerValue (16),
162  MakeUintegerChecker<uint8_t> (1, 16))
163 
164  .AddAttribute ("SSScheduler",
165  "The ss scheduler attached to this device.",
166  PointerValue (),
169  MakePointerChecker<SSScheduler> ())
170 
171  .AddAttribute ("LinkManager",
172  "The ss link manager attached to this device.",
173  PointerValue (),
176  MakePointerChecker<SSLinkManager> ())
177 
178  .AddAttribute ("Classifier",
179  "The ss classifier attached to this device.",
180  PointerValue (),
183  MakePointerChecker<IpcsClassifier> ())
184 
185  .AddTraceSource ("SSTxDrop",
186  "A packet has been dropped in the MAC layer before being queued for transmission.",
188  "ns3::Packet::TracedCallback")
189 
190  .AddTraceSource ("SSPromiscRx",
191  "A packet has been received by this device, has been passed up from the physical layer "
192  "and is being forwarded up the local protocol stack. This is a promiscuous trace,",
194  "ns3::Packet::TracedCallback")
195 
196  .AddTraceSource ("SSRx",
197  "A packet has been received by this device, has been passed up from the physical layer "
198  "and is being forwarded up the local protocol stack. This is a non-promiscuous trace,",
200  "ns3::Packet::TracedCallback")
201 
202  .AddTraceSource ("SSRxDrop",
203  "A packet has been dropped in the MAC layer after it has been passed up from the physical "
204  "layer.",
206  "ns3::Packet::TracedCallback")
207  ;
208  return tid;
209 }
210 
212 {
213 
215 
216 }
217 
218 void
220 {
223  m_maxDcdInterval = Seconds (10);
224  m_maxUcdInterval = Seconds (10);
226  m_intervalT2 = Seconds (5 * 2); // shall be 5 * RangingInterval, if ranging interval=see T2 at page 638) means Initial Ranging Interval=see page 637)
227  m_intervalT3 = MilliSeconds (200);
228  m_intervalT7 = Seconds (0.1); // maximum is 1
230  m_intervalT21 = Seconds (11);
232  m_dcdCount = 0;
233  m_baseStationId = Mac48Address ("00:00:00:00:00:00");
234  m_ucdCount = 0;
236  m_nrDlMapElements = 0;
237  m_nrUlMapElements = 0;
238  m_nrDlMapRecvd = 0;
239  m_nrUlMapRecvd = 0;
240  m_nrDcdRecvd = 0;
241  m_nrUcdRecvd = 0;
245 
246  m_basicConnection = 0;
248 
251  m_classifier = CreateObject<IpcsClassifier> ();
252  m_linkManager = CreateObject<SSLinkManager> (this);
253  m_scheduler = CreateObject<SSScheduler> (this);
254  m_serviceFlowManager = CreateObject<SsServiceFlowManager> (this);
255 }
256 
258 {
260  this->SetNode (node);
261  this->SetPhy (phy);
262 }
263 
265 {
266 }
267 
268 void
270 {
271  delete m_dlBurstProfile;
272  delete m_ulBurstProfile;
273  m_scheduler = 0;
275  m_basicConnection = 0;
277  m_classifier = 0;
278  m_dlBurstProfile = 0;
279  m_ulBurstProfile = 0;
280 
281  m_linkManager = 0;
282 
286 
288 }
289 
290 void
292 {
293  m_lostDlMapInterval = lostDlMapInterval;
294 }
295 
296 Time
298 {
299  return m_lostDlMapInterval;
300 }
301 
302 void
304 {
305  m_lostUlMapInterval = lostUlMapInterval;
306 }
307 
308 Time
310 {
311  return m_lostUlMapInterval;
312 }
313 
314 void
316 {
317  m_maxDcdInterval = maxDcdInterval;
318 }
319 
320 Time
322 {
323  return m_maxDcdInterval;
324 }
325 
326 void
328 {
329  m_maxUcdInterval = maxUcdInterval;
330 }
331 
332 Time
334 {
335  return m_maxUcdInterval;
336 }
337 
338 void
340 {
341  m_intervalT1 = interval;
342 }
343 
344 Time
346 {
347  return m_intervalT1;
348 }
349 
350 void
352 {
353  m_intervalT2 = interval;
354 }
355 
356 Time
358 {
359  return m_intervalT2;
360 }
361 
362 void
364 {
365  m_intervalT3 = interval;
366 }
367 
368 Time
370 {
371  return m_intervalT3;
372 }
373 
374 void
376 {
377  m_intervalT7 = interval;
378 }
379 
380 Time
382 {
383  return m_intervalT7;
384 }
385 
386 void
388 {
389  m_intervalT12 = interval;
390 }
391 
392 Time
394 {
395  return m_intervalT12;
396 }
397 
398 void
400 {
401  m_intervalT20 = interval;
402 }
403 
404 Time
406 {
407  return m_intervalT20;
408 }
409 
410 void
412 {
413  m_intervalT21 = interval;
414 }
415 
416 Time
418 {
419  return m_intervalT21;
420 }
421 
422 void
424 {
425  m_maxContentionRangingRetries = maxContentionRangingRetries;
426 }
427 
428 uint8_t
430 {
432 }
433 
434 void
436 {
437  m_basicConnection = basicConnection;
438  uint32_t nodeId = GetNode ()->GetId ();
439  uint32_t ifaceId = GetIfIndex ();
440 
442  {
443  std::ostringstream oss;
444  oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId << "/$ns3::SubscriberStationNetDevice/BasicConnection/TxQueue/Enqueue";
446  }
448  {
449  std::ostringstream oss;
450  oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId << "/$ns3::SubscriberStationNetDevice/BasicConnection/TxQueue/Dequeue";
452  }
454  {
455  std::ostringstream oss;
456  oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId << "/$ns3::SubscriberStationNetDevice/BasicConnection/TxQueue/Drop";
458  }
459 }
460 
463 {
464  return m_basicConnection;
465 }
466 
467 void
469 {
470  m_primaryConnection = primaryConnection;
471 
472  uint32_t nodeId = GetNode ()->GetId ();
473  uint32_t ifaceId = GetIfIndex ();
474 
476  {
477  std::ostringstream oss;
478  oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId << "/$ns3::SubscriberStationNetDevice/PrimaryConnection/TxQueue/Enqueue";
480  }
482  {
483  std::ostringstream oss;
484  oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId << "/$ns3::SubscriberStationNetDevice/PrimaryConnection/TxQueue/Dequeue";
486  }
488  {
489  std::ostringstream oss;
490  oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId << "/$ns3::SubscriberStationNetDevice/PrimaryConnection/TxQueue/Drop";
492  }
493 }
494 
497 {
498  return m_primaryConnection;
499 }
500 
501 Cid
503 {
504  return m_basicConnection->GetCid ();
505 }
506 
507 Cid
509 {
510  return m_primaryConnection->GetCid ();
511 }
512 
513 void
515 {
516  m_modulationType = modulationType;
517 }
518 
521 {
522  return m_modulationType;
523 }
524 
525 void
527 {
528  m_areManagementConnectionsAllocated = areManagementConnectionsAllocated;
529 }
530 
531 bool
533 {
535 }
536 
537 void
539 {
540  m_areServiceFlowsAllocated = areServiceFlowsAllocated;
541 }
542 
543 bool
545 {
547 }
548 
551 {
552  return m_scheduler;
553 }
554 
555 void
557 {
558  m_scheduler = scheduler;
559 }
560 
561 bool
563 {
564  return GetServiceFlowManager ()->GetServiceFlows (ServiceFlow::SF_TYPE_ALL).size () > 0;
565 }
566 
569 {
570 
571  return m_classifier;
572 }
573 
574 void
576 {
577  m_classifier = classifier;
578 }
579 
582 {
583  return m_linkManager;
584 }
585 
586 void
588 {
589  m_linkManager = linkManager;
590 }
591 
594 {
595  return m_serviceFlowManager;
596 }
597 
598 void
600 {
601  m_serviceFlowManager = sfm;
602 }
603 
604 void
606 {
608 
609  GetPhy ()->SetPhyParameters ();
610  GetPhy ()->SetDataRates ();
611  m_intervalT20 = Seconds (4 * GetPhy ()->GetFrameDuration ().GetSeconds ());
612 
615 }
616 
617 void
619 {
621 }
622 
623 void
625 {
626  GetServiceFlowManager ()->AddServiceFlow (sf);
627 }
628 
629 void
631 {
632  GetServiceFlowManager ()->AddServiceFlow (sf);
633 }
634 
635 bool
637  const Mac48Address &source,
638  const Mac48Address &dest,
639  uint16_t protocolNumber)
640 {
641  NS_LOG_INFO ("SS (" << source << "):" );
642  NS_LOG_INFO ("\tSending packet..." );
643  NS_LOG_INFO ("\t\tDestination: " << dest );
644  NS_LOG_INFO ("\t\tPacket Size: " << packet->GetSize () );
645  NS_LOG_INFO ("\t\tProtocol: " << protocolNumber );
646 
647  ServiceFlow *serviceFlow = 0;
648 
649  if (IsRegistered ())
650  {
651  NS_LOG_DEBUG ("SS (Basic CID: " << m_basicConnection->GetCid () << ")");
652  }
653  else
654  {
655  NS_LOG_DEBUG ("SS (" << GetMacAddress () << ")");
656  NS_LOG_INFO ("\tCan't send packet! (NotRegitered with the network)");
657  return false;
658  }
659 
660  NS_LOG_DEBUG ("packet to send, size : " << packet->GetSize () << ", destination : " << dest);
661 
662  if (GetServiceFlowManager ()->GetNrServiceFlows () == 0)
663  {
664  NS_LOG_INFO ("\tCan't send packet! (No service Flow)");
665  return false;
666  }
667 
668  if (protocolNumber == 2048)
669  {
670  serviceFlow = m_classifier->Classify (packet, GetServiceFlowManager (), ServiceFlow::SF_DIRECTION_UP);
671  }
672 
673  if ((protocolNumber != 2048) || (serviceFlow == NULL))
674  {
675  serviceFlow = *GetServiceFlowManager ()->GetServiceFlows (ServiceFlow::SF_TYPE_ALL).begin ();
676  NS_LOG_INFO ("\tNo service flows matches...using the default one.");
677  }
678 
679  NS_LOG_INFO ("\tPacket classified in the service flow SFID = " << serviceFlow->GetSfid () << " CID = "
680  << serviceFlow->GetCid ());
681  if (serviceFlow->GetIsEnabled ())
682  {
683  if (!Enqueue (packet, MacHeaderType (), serviceFlow->GetConnection ()))
684  {
685  NS_LOG_INFO ("\tEnqueue ERROR!!" );
686  m_ssTxDropTrace (packet);
687  return false;
688  }
689  else
690  {
691  m_ssTxTrace (packet);
692  }
693  }
694  else
695  {
696  NS_LOG_INFO ("Error!! The Service Flow is not enabled" );
697  m_ssTxDropTrace (packet);
698  return false;
699  }
700 
701  return true;
702 }
703 
704 bool
706  const MacHeaderType &hdrType,
707  Ptr<WimaxConnection> connection)
708 {
709  NS_ASSERT_MSG (connection != 0, "SS: Can not enqueue the packet: the selected connection is nor initialized");
710 
711  GenericMacHeader hdr;
712 
714  {
715  hdr.SetLen (packet->GetSize () + hdr.GetSerializedSize ());
716  hdr.SetCid (connection->GetCid ());
717 
718  }
719 
720  if (connection->GetType () == Cid::TRANSPORT)
721  {
722 
723  if (connection->GetSchedulingType () == ServiceFlow::SF_TYPE_UGS && m_scheduler->GetPollMe ())
724  {
726  "Error while equeuing packet: incorrect header type");
727 
728  GrantManagementSubheader grantMgmntSubhdr;
729  grantMgmntSubhdr.SetPm (true);
730  packet->AddHeader (grantMgmntSubhdr);
731  }
732  }
733  NS_LOG_INFO ("ServiceFlowManager: enqueuing packet" );
734  return connection->Enqueue (packet, hdrType, hdr);
735 }
736 
737 void
739  uint16_t nrSymbols,
740  Ptr<WimaxConnection> connection,
741  MacHeaderType::HeaderType packetType)
742 {
743  WimaxPhy::ModulationType modulationType;
744 
746  {
747  modulationType = WimaxPhy::MODULATION_TYPE_BPSK_12;
748  }
749  else
750  {
751  modulationType = GetBurstProfileManager ()->GetModulationType (uiuc, DIRECTION_UPLINK);
752  }
753  Ptr<PacketBurst> burst = m_scheduler->Schedule (nrSymbols, modulationType, packetType, connection);
754 
755  if (burst->GetNPackets () == 0)
756  {
757  return;
758  }
759 
760  if (IsRegistered ())
761  {
762  NS_LOG_DEBUG ("SS (Basic CID: " << m_basicConnection->GetCid () << ")");
763  }
764  else
765  {
766  NS_LOG_DEBUG ("SS (" << GetMacAddress () << ")");
767  }
768 
769  if (connection->GetType () == Cid::TRANSPORT)
770  {
771  ServiceFlowRecord *record = connection->GetServiceFlow ()->GetRecord ();
772  record->UpdatePktsSent (burst->GetNPackets ());
773  record->UpdateBytesSent (burst->GetSize ());
774 
775  NS_LOG_DEBUG (" sending burst" << ", SFID: " << connection->GetServiceFlow ()->GetSfid () << ", pkts sent: "
776  << record->GetPktsSent () << ", pkts rcvd: " << record->GetPktsRcvd () << ", bytes sent: "
777  << record->GetBytesSent () << ", bytes rcvd: " << record->GetBytesRcvd () );
778 
779  }
780  else
781  {
782 
783  }
784  ForwardDown (burst, modulationType);
785 }
786 
787 void
789 {
790  GenericMacHeader gnrcMacHdr;
791  ManagementMessageType msgType;
792  RngRsp rngrsp;
793  Cid cid;
794  uint32_t pktSize = packet->GetSize ();
795  packet->RemoveHeader (gnrcMacHdr);
796  FragmentationSubheader fragSubhdr;
797  bool fragmentation = false; // it becomes true when there is a fragmentation subheader
798 
799  if (gnrcMacHdr.GetHt () == MacHeaderType::HEADER_TYPE_GENERIC)
800  {
801  if (gnrcMacHdr.check_hcs () == false)
802  {
803  // The header is noisy
804  NS_LOG_INFO ("Header HCS ERROR");
805  m_ssRxDropTrace (packet);
806  return;
807  }
808 
809  cid = gnrcMacHdr.GetCid ();
810 
811  // checking for subheaders
812  uint8_t type = gnrcMacHdr.GetType ();
813  if (type)
814  {
815  // Check if there is a fragmentation Subheader
816  uint8_t tmpType = type;
817  if (((tmpType >> 2) & 1) == 1)
818  {
819  // a TRANSPORT packet with fragmentation subheader has been received!
820  fragmentation = true;
821  NS_LOG_INFO ("SS DoReceive -> the packet is a fragment" << std::endl);
822  }
823  }
824 
825  if (cid == GetBroadcastConnection ()->GetCid () && !fragmentation)
826  {
827  packet->RemoveHeader (msgType);
828  switch (msgType.GetType ())
829  {
831  {
833  {
834  Simulator::Cancel (m_linkManager->GetDlMapSyncTimeoutEvent ());
835  }
836 
838  {
840  }
841 
842  m_linkManager->ScheduleScanningRestart (m_lostDlMapInterval, EVENT_LOST_DL_MAP, false, m_lostDlMapEvent);
843 
845  {
847  }
848 
849  m_linkManager->ScheduleScanningRestart (m_intervalT1,
851  false,
853 
855  {
857  }
858 
859  m_linkManager->ScheduleScanningRestart (m_intervalT12,
861  true,
863 
864  DlMap dlmap;
865  packet->RemoveHeader (dlmap);
866  ProcessDlMap (dlmap);
867  break;
868  }
870  {
872  {
874  m_linkManager->ScheduleScanningRestart (m_lostUlMapInterval,
876  true,
878  }
879 
880  UlMap ulmap;
881  packet->RemoveHeader (ulmap);
882 
883  ProcessUlMap (ulmap);
884 
886  {
887  if (m_linkManager->GetRangingIntervalFound ())
888  {
890  {
892  }
893  m_linkManager->PerformBackoff ();
894  }
895  }
896  break;
897  }
899  {
901  {
903  }
904 
906  {
908  m_linkManager->ScheduleScanningRestart (m_intervalT1,
910  false,
912  }
913 
914  Dcd dcd;
915  // number of burst profiles is set to number of DL-MAP IEs after processing DL-MAP, not a very good solution
916  // dcd.SetNrDlBurstProfiles (m_nrDlMapElements);
917  dcd.SetNrDlBurstProfiles (7);
918  packet->RemoveHeader (dcd);
919 
920  ProcessDcd (dcd);
921  break;
922  }
924  {
925  Ucd ucd;
926  // number of burst profiles is set to number of UL-MAP IEs after processing UL-MAP, not a very good solution
927  // ucd.SetNrUlBurstProfiles (m_nrUlMapElements);
928  ucd.SetNrUlBurstProfiles (7);
929  packet->RemoveHeader (ucd);
930 
931  ProcessUcd (ucd);
932 
934  {
936  m_linkManager->ScheduleScanningRestart (m_intervalT12,
938  true,
940  }
941 
943  {
944  /*state indicating that SS has completed scanning, synchronization and parameter acquisition
945  successfully and now waiting for UL-MAP to start initial ranging.*/
947 
948  m_linkManager->ScheduleScanningRestart (m_intervalT2,
950  false,
952  m_linkManager->ScheduleScanningRestart (m_lostUlMapInterval,
954  true,
956  }
957  break;
958  }
959  default:
960  NS_FATAL_ERROR ("Invalid management message type");
961  }
962  }
963  else if (GetInitialRangingConnection () != 0 && cid == GetInitialRangingConnection ()->GetCid () && !fragmentation)
964  {
965  m_traceSSRx (packet, GetMacAddress (), cid);
966  packet->RemoveHeader (msgType);
967  switch (msgType.GetType ())
968  {
970  // intended for base station, ignore
971  break;
974  "SS: Error while receiving a ranging response message: SS state should be at least SS_STATE_WAITING_REG_RANG_INTRVL");
975  packet->RemoveHeader (rngrsp);
976  m_linkManager->PerformRanging (cid, rngrsp);
977  break;
978  default:
979  NS_LOG_ERROR ("Invalid management message type");
980  }
981  }
982  else if (m_basicConnection != 0 && cid == m_basicConnection->GetCid () && !fragmentation)
983  {
984  m_traceSSRx (packet, GetMacAddress (), cid);
985  packet->RemoveHeader (msgType);
986  switch (msgType.GetType ())
987  {
989  // intended for base station, ignore
990  break;
993  "SS: Error while receiving a ranging response message: SS state should be SS_STATE_WAITING_RNG_RSP");
994  packet->RemoveHeader (rngrsp);
995  m_linkManager->PerformRanging (cid, rngrsp);
996  break;
997  default:
998  NS_LOG_ERROR ("Invalid management message type");
999  }
1000  }
1001  else if (m_primaryConnection != 0 && cid == m_primaryConnection->GetCid () && !fragmentation)
1002  {
1003  m_traceSSRx (packet, GetMacAddress (), cid);
1004  packet->RemoveHeader (msgType);
1005  switch (msgType.GetType ())
1006  {
1008  // not yet implemented
1009  break;
1011  // intended for base station, ignore
1012  break;
1014  /*from other station as DSA initiation
1015  by BS is not supported, ignore*/
1016  break;
1018  {
1019  Simulator::Cancel (GetServiceFlowManager ()->GetDsaRspTimeoutEvent ());
1020  DsaRsp dsaRsp;
1021  packet->RemoveHeader (dsaRsp);
1022  GetServiceFlowManager ()->ProcessDsaRsp (dsaRsp);
1023  break;
1024  }
1026  /*from other station as DSA initiation
1027  by BS is not supported, ignore*/
1028  break;
1029  default:
1030  NS_LOG_ERROR ("Invalid management message type");
1031  }
1032  }
1033  else if (GetConnectionManager ()->GetConnection (cid)) // transport connection
1034  {
1035  ServiceFlow *serviceFlow = GetConnectionManager ()->GetConnection (cid)->GetServiceFlow ();
1036  ServiceFlowRecord *record = serviceFlow->GetRecord ();
1037 
1038  record->UpdatePktsRcvd (1);
1039  record->UpdateBytesRcvd (pktSize);
1040 
1041  // If fragmentation is true, the packet is a fragment.
1042  if (!fragmentation)
1043  {
1044  m_ssRxTrace (packet);
1045  ForwardUp (packet, m_baseStationId, GetMacAddress ()); // source shall be BS's address or sender SS's?
1046  }
1047  else
1048  {
1049  NS_LOG_INFO ( "FRAG_DEBUG: SS DoReceive, the Packet is a fragment" << std::endl);
1050  packet->RemoveHeader (fragSubhdr);
1051  uint32_t fc = fragSubhdr.GetFc ();
1052  NS_LOG_INFO ( "\t fragment size = " << packet->GetSize () << std::endl);
1053 
1054  if (fc == 2)
1055  {
1056  // This is the latest fragment.
1057  // Take the fragment queue, defragment a packet and send it to the upper layer
1058  NS_LOG_INFO ( "\t Received the latest fragment" << std::endl);
1059  GetConnectionManager ()->GetConnection (cid)
1060  ->FragmentEnqueue (packet);
1061 
1063  GetConnection (cid)->GetFragmentsQueue ();
1064 
1065  Ptr<Packet> fullPacket = Create<Packet> ();
1066 
1067  // DEFRAGMENTATION
1068  NS_LOG_INFO ( "\t SS PACKET DEFRAGMENTATION" << std::endl);
1069  for (std::list<Ptr<const Packet> >::const_iterator iter = fragmentsQueue.begin ();
1070  iter != fragmentsQueue.end (); ++iter)
1071  {
1072  // Create the whole Packet
1073  fullPacket->AddAtEnd (*iter);
1074  }
1075  GetConnectionManager ()->GetConnection (cid)
1076  ->ClearFragmentsQueue ();
1077  NS_LOG_INFO ( "\t fullPacket size = " << fullPacket->GetSize () << std::endl);
1078 
1079  m_ssRxTrace (fullPacket);
1080  ForwardUp (fullPacket, m_baseStationId, GetMacAddress ()); // source shall be BS's address or sender SS's?
1081  }
1082  else
1083  {
1084  // This is the first or middle fragment.
1085  // Take the fragment queue, store the fragment into the queue
1086  NS_LOG_INFO ( "\t Received the first or the middle fragment" << std::endl);
1087  GetConnectionManager ()->GetConnection (cid)->FragmentEnqueue (packet);
1088  }
1089  }
1090  }
1091  else if (cid.IsMulticast ())
1092  {
1093  m_traceSSRx (packet, GetMacAddress (), cid);
1094  ForwardUp (packet, m_baseStationId, GetMacAddress ()); // source shall be BS's address or sender SS's?
1095  }
1096  else if (IsPromisc ())
1097  {
1098  NotifyPromiscTrace (packet);
1099  m_ssPromiscRxTrace (packet);
1100 
1101  // not for me, ignore
1102  }
1103  else
1104  {
1105  // not for me drop
1106  }
1107  }
1108  else
1109  {
1110  // from other SS, ignore
1111  }
1112 }
1113 
1114 void
1116 {
1117  m_nrDlMapRecvd++;
1118  m_dcdCount = dlmap.GetDcdCount ();
1119  m_baseStationId = dlmap.GetBaseStationId ();
1120  std::list<OfdmDlMapIe> dlMapElements = dlmap.GetDlMapElements ();
1121 
1122  for (std::list<OfdmDlMapIe>::iterator iter = dlMapElements.begin (); iter != dlMapElements.end (); ++iter)
1123  {
1124  if (iter->GetDiuc () == OfdmDlBurstProfile::DIUC_END_OF_MAP)
1125  {
1126  break;
1127  }
1128 
1129  if (iter->GetCid () == m_basicConnection->GetCid ())
1130  {
1131  /*here the SS shall actually acquire the start time it shall start receiving the burst at. start time is used for power saving
1132  which is not implemented here, furthermore there is no need since the simulator architecture automatically callbacks the receive
1133  function. shall acquire the DIUC (burst profile) as well to decode the burst, again not required again because the callback
1134  mechanism automatically passes it as parameter.*/
1135  }
1136 
1137 #if 0 /* a template for future implementation following */
1138  uint8_t temp = iter->GetDiuc ();
1139  temp = iter->GetPreamblePresent ();
1140  temp = iter->GetStartTime ();
1141 #endif
1142  }
1143 }
1144 
1145 void
1147 {
1148  m_nrUlMapRecvd++;
1149  m_ucdCount = ulmap.GetUcdCount ();
1151  std::list<OfdmUlMapIe> ulMapElements = ulmap.GetUlMapElements ();
1152  m_linkManager->SetRangingIntervalFound (false);
1153 
1154  for (std::list<OfdmUlMapIe>::iterator iter = ulMapElements.begin (); iter != ulMapElements.end (); ++iter)
1155  {
1156  OfdmUlMapIe ulMapIe = *iter;
1157 
1158  if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_END_OF_MAP)
1159  {
1160  break;
1161  }
1162 
1163  Cid cid = ulMapIe.GetCid ();
1164 
1165  if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_INITIAL_RANGING && cid == GetBroadcastConnection ()->GetCid ())
1166  {
1167  m_linkManager->SetRangingIntervalFound (true);
1168  }
1169 
1170  if (m_areManagementConnectionsAllocated && cid == m_basicConnection->GetCid ())
1171  {
1172 
1173  Time timeToAllocation = GetTimeToAllocation (Seconds (ulMapIe.GetStartTime ()
1174  * GetPhy ()->GetSymbolDuration ().GetSeconds ()));
1175 
1176  if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_INITIAL_RANGING) // invited ranging interval
1177 
1178  {
1179 
1180  m_linkManager->IncrementNrInvitedPollsRecvd ();
1182  "SS: Error while processing UL MAP: SS state should be SS_STATE_WAITING_INV_RANG_INTRVL");
1183  Simulator::Schedule (timeToAllocation,
1185  m_linkManager,
1186  ulMapIe.GetUiuc (),
1187  ulMapIe.GetDuration ());
1188  }
1189  else if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_REQ_REGION_FULL) // unicast poll
1190 
1191  {
1192 
1193  Simulator::Schedule (timeToAllocation,
1196  ulMapIe.GetUiuc (),
1197  ulMapIe.GetDuration ());
1198  }
1199  else // regular allocation/grant for data, for UGS flows or in response of requests for non-UGS flows
1200 
1201  {
1202 
1203  Ptr<WimaxConnection> connection = NULL;
1204  Simulator::Schedule (timeToAllocation,
1206  this,
1207  ulMapIe.GetUiuc (),
1208  ulMapIe.GetDuration (),
1209  connection,
1211  }
1212  }
1213  else
1214  {
1215  if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_INITIAL_RANGING && cid
1216  == GetBroadcastConnection ()->GetCid ()) // regular ranging interval
1217 
1218  {
1219  if (GetCurrentUcd ().GetChannelEncodings ().GetRangReqOppSize () != 0)
1220  {
1221  m_linkManager->SetNrRangingTransOpps ((ulMapIe.GetDuration () * GetPhy ()->GetPsPerSymbol ())
1222  / GetCurrentUcd ().GetChannelEncodings ().GetRangReqOppSize ());
1223 
1224  }
1225 
1227  {
1228  m_linkManager->StartContentionResolution ();
1229  }
1230 
1231  }
1232  }
1233  }
1234 }
1235 
1236 void
1238 {
1239  m_nrDcdRecvd++;
1240  if (dcd.GetConfigurationChangeCount () == GetCurrentDcd ().GetConfigurationChangeCount ())
1241  {
1242  return; // nothing new in DCD so don't read
1243 
1244  }
1245  SetCurrentDcd (dcd);
1246  OfdmDcdChannelEncodings dcdChnlEncodings = dcd.GetChannelEncodings ();
1247 
1248  // parameters for initial ranging
1249  m_linkManager->SetBsEirp (dcdChnlEncodings.GetBsEirp ());
1250  m_linkManager->SetEirXPIrMax (dcdChnlEncodings.GetEirxPIrMax ());
1251 
1252  GetPhy ()->GetFrameDuration (dcdChnlEncodings.GetFrameDurationCode ());
1253 
1254  std::vector<OfdmDlBurstProfile> dlBurstProfiles = dcd.GetDlBurstProfiles ();
1255 
1256  for (std::vector<OfdmDlBurstProfile>::iterator iter = dlBurstProfiles.begin (); iter != dlBurstProfiles.end (); ++iter)
1257  {
1258  OfdmDlBurstProfile brstProfile = *iter;
1259 
1260  /*NS-2 does this, may be not correct, assumes DIUC/UIUC to
1261  modulation type mapping in DCD/UCD may change over time*/
1262  if (brstProfile.GetFecCodeType () == m_modulationType)
1263  {
1265  m_dlBurstProfile->SetDiuc (brstProfile.GetDiuc ());
1266  }
1267  }
1268 }
1269 
1270 void
1272 {
1273  m_nrUcdRecvd++;
1274  if (!m_linkManager->IsUlChannelUsable ())
1275  {
1276  m_linkManager->StartScanning (EVENT_NONE, false);
1277  return;
1278  }
1279 
1280  if (ucd.GetConfigurationChangeCount () == GetCurrentUcd ().GetConfigurationChangeCount ())
1281  {
1282  return; // nothing new in UCD so don't read
1283 
1284  }
1285  SetCurrentUcd (ucd);
1286  m_linkManager->SetRangingCW ((uint8_t) std::pow ((double) 2, (double) ucd.GetRangingBackoffStart ()) - 1); // initializing ranging CW
1287  OfdmUcdChannelEncodings ucdChnlEncodings = ucd.GetChannelEncodings ();
1288 
1289  std::vector<OfdmUlBurstProfile> ulBurstProfiles = ucd.GetUlBurstProfiles ();
1290 
1291  for (std::vector<OfdmUlBurstProfile>::iterator iter = ulBurstProfiles.begin (); iter != ulBurstProfiles.end (); ++iter)
1292  {
1293  OfdmUlBurstProfile brstProfile = *iter;
1294 
1295  /*NS-2 does this, may be not correct, assumes DIUC/UIUC to
1296  modulation type mapping in DCD/UCD may change over time*/
1297  if (brstProfile.GetFecCodeType () == m_modulationType)
1298  {
1300  m_ulBurstProfile->SetUiuc (brstProfile.GetUiuc ());
1301  }
1302  }
1303 }
1304 
1305 /*temporarily assuming registered if ranging is complete,
1306  shall actually consider the registration step also */
1307 bool
1309 {
1310  return GetState () >= SS_STATE_REGISTERED;
1311 }
1312 
1313 Time
1315 {
1316  Time timeAlreadyElapsed = Simulator::Now () - m_frameStartTime;
1317  Time timeToUlSubframe = Seconds (m_allocationStartTime * GetPhy ()->GetPsDuration ().GetSeconds ())
1318  - timeAlreadyElapsed;
1319  return timeToUlSubframe + deferTime;
1320 }
1321 
1322 void
1324 {
1325  if (GetState () == SS_STATE_STOPPED)
1326  {
1327  Simulator::Cancel (eventId); // cancelling this event (already scheduled in function call)
1328  return;
1329  }
1330 
1331  event = eventId;
1332 }
1333 
1334 void
1336 {
1338 }
1339 
1340 void
1342 {
1344 }
1345 
1346 void
1348 {
1349  m_asciiTxQueueDropCb = cb;
1350 }
1351 
1352 } // namespace ns`
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::SubscriberStationNetDevice::SetAreManagementConnectionsAllocated
void SetAreManagementConnectionsAllocated(bool areManagementConnectionsAllocated)
Definition: ss-net-device.cc:526
ns3::ServiceFlowRecord::GetPktsSent
uint32_t GetPktsSent(void) const
Definition: service-flow-record.cc:97
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::SubscriberStationNetDevice::GetModulationType
WimaxPhy::ModulationType GetModulationType(void) const
Definition: ss-net-device.cc:520
ns3::SubscriberStationNetDevice::SetIntervalT3
void SetIntervalT3(Time interval3)
Definition: ss-net-device.cc:363
ns3::SubscriberStationNetDevice::SetLinkManager
void SetLinkManager(Ptr< SSLinkManager > linkManager)
sets the link manager to be used
Definition: ss-net-device.cc:587
ns3::SubscriberStationNetDevice::GetIntervalT2
Time GetIntervalT2(void) const
Definition: ss-net-device.cc:357
ns3::ServiceFlowRecord::UpdateBytesRcvd
void UpdateBytesRcvd(uint32_t bytesRcvd)
update the number of received bytes by adding bytesRcvd
Definition: service-flow-record.cc:145
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
ns3::SubscriberStationNetDevice::SetMaxDcdInterval
void SetMaxDcdInterval(Time maxDcdInterval)
Definition: ss-net-device.cc:315
ns3::SubscriberStationNetDevice::m_maxContentionRangingRetries
uint8_t m_maxContentionRangingRetries
maximum contention ranging retries
Definition: ss-net-device.h:422
ns3::SubscriberStationNetDevice::SetMaxUcdInterval
void SetMaxUcdInterval(Time maxUcdInterval)
Definition: ss-net-device.cc:327
ns3::SubscriberStationNetDevice::GetIpcsClassifier
Ptr< IpcsClassifier > GetIpcsClassifier() const
Definition: ss-net-device.cc:568
ns3::SubscriberStationNetDevice::EVENT_NONE
@ EVENT_NONE
Definition: ss-net-device.h:70
ns3::SubscriberStationNetDevice::SetLostDlMapInterval
void SetLostDlMapInterval(Time lostDlMapInterval)
Definition: ss-net-device.cc:291
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::UlMap::GetUlMapElements
std::list< OfdmUlMapIe > GetUlMapElements(void) const
Get UL map elements.
Definition: ul-mac-messages.cc:625
ns3::SubscriberStationNetDevice::EVENT_LOST_UL_MAP
@ EVENT_LOST_UL_MAP
Definition: ss-net-device.h:74
ns3::SubscriberStationNetDevice::ProcessUcd
void ProcessUcd(const Ucd &ucd)
Process UCD.
Definition: ss-net-device.cc:1271
ns3::WimaxNetDevice::GetConnectionManager
Ptr< ConnectionManager > GetConnectionManager(void) const
Get the connection manager of the device.
Definition: wimax-net-device.cc:475
ns3::SubscriberStationNetDevice::Stop
void Stop(void)
Stop the device.
Definition: ss-net-device.cc:618
ns3::SubscriberStationNetDevice::Start
void Start(void)
Start the device.
Definition: ss-net-device.cc:605
ns3::ServiceFlow::SF_DIRECTION_UP
@ SF_DIRECTION_UP
Definition: service-flow.h:46
ns3::Dcd::GetDlBurstProfiles
std::vector< OfdmDlBurstProfile > GetDlBurstProfiles(void) const
Get DL burst profile field.
Definition: dl-mac-messages.cc:365
bandwidth-manager.h
ss-net-device.h
ns3::EventId
An identifier for simulation events.
Definition: event-id.h:54
ns3::Ucd::GetRangingBackoffStart
uint8_t GetRangingBackoffStart(void) const
Get ranging backoff start.
Definition: ul-mac-messages.cc:327
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::SubscriberStationNetDevice::SendBurst
void SendBurst(uint8_t uiuc, uint16_t nrSymbols, Ptr< WimaxConnection > connection, MacHeaderType::HeaderType packetType=MacHeaderType::HEADER_TYPE_GENERIC)
Sends a burst on the uplink frame.
Definition: ss-net-device.cc:738
ns3::MacHeaderType::HEADER_TYPE_GENERIC
@ HEADER_TYPE_GENERIC
Definition: wimax-mac-header.h:42
ns3::Node::GetId
uint32_t GetId(void) const
Definition: node.cc:109
ns3::Packet::AddHeader
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
ns3::Callback< void, std::string, Ptr< const Packet > >
ns3::SubscriberStationNetDevice::m_linkManager
Ptr< SSLinkManager > m_linkManager
link manager
Definition: ss-net-device.h:316
ns3::Dcd::SetNrDlBurstProfiles
void SetNrDlBurstProfiles(uint8_t nrDlBurstProfiles)
Set number DL burst profile field.
Definition: dl-mac-messages.cc:341
ns3::Cid::IsMulticast
bool IsMulticast(void) const
Definition: cid.cc:51
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::SubscriberStationNetDevice::GetMaxDcdInterval
Time GetMaxDcdInterval(void) const
Definition: ss-net-device.cc:321
ns3::SubscriberStationNetDevice::m_maxUcdInterval
Time m_maxUcdInterval
in seconds, maximum time between transmission of UCD messages
Definition: ss-net-device.h:414
ns3::WimaxNetDevice::SetState
void SetState(uint8_t state)
Set the device state.
Definition: wimax-net-device.cc:427
ns3::MacHeaderType::GetType
uint8_t GetType(void) const
Get type field.
Definition: wimax-mac-header.cc:51
ns3::Callback::IsNull
bool IsNull(void) const
Check for null implementation.
Definition: callback.h:1386
ns3::SubscriberStationNetDevice::m_dlBurstProfile
OfdmDlBurstProfile * m_dlBurstProfile
DL burst profile.
Definition: ss-net-device.h:450
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::ServiceFlowRecord::GetPktsRcvd
uint32_t GetPktsRcvd(void) const
Definition: service-flow-record.cc:115
ns3::SubscriberStationNetDevice::m_ssRxTrace
TracedCallback< Ptr< const Packet > > m_ssRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
Definition: ss-net-device.h:498
ns3::SubscriberStationNetDevice::GetAreManagementConnectionsAllocated
bool GetAreManagementConnectionsAllocated(void) const
Definition: ss-net-device.cc:532
ns3::ServiceFlow::GetCid
uint16_t GetCid(void) const
Get CID.
Definition: service-flow.cc:325
ns3::MicroSeconds
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
ns3::ManagementMessageType::MESSAGE_TYPE_DL_MAP
@ MESSAGE_TYPE_DL_MAP
Definition: mac-messages.h:51
ns3::OfdmUlBurstProfile::GetFecCodeType
uint8_t GetFecCodeType(void) const
Get FEC code type.
Definition: ul-mac-messages.cc:221
ns3::ServiceFlowRecord::GetBytesSent
uint32_t GetBytesSent(void) const
Definition: service-flow-record.cc:133
ns3::Cid::TRANSPORT
@ TRANSPORT
Definition: cid.h:47
ns3::OfdmUlBurstProfile::UIUC_INITIAL_RANGING
@ UIUC_INITIAL_RANGING
Definition: ul-mac-messages.h:209
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::SubscriberStationNetDevice::GetIntervalT1
Time GetIntervalT1(void) const
Definition: ss-net-device.cc:345
ns3::GrantManagementSubheader::SetPm
void SetPm(uint8_t pm)
Set PM field.
Definition: wimax-mac-header.cc:510
ns3::SubscriberStationNetDevice::SetAsciiTxQueueDequeueCallback
void SetAsciiTxQueueDequeueCallback(AsciiTraceCallback cb)
Set the Dequeue callback for ASCII tracing.
Definition: ss-net-device.cc:1341
ns3::ManagementMessageType::MESSAGE_TYPE_DSA_REQ
@ MESSAGE_TYPE_DSA_REQ
Definition: mac-messages.h:57
ns3::SubscriberStationNetDevice::EVENT_UCD_WAIT_TIMEOUT
@ EVENT_UCD_WAIT_TIMEOUT
Definition: ss-net-device.h:76
ns3::SubscriberStationNetDevice::m_ssRxDropTrace
TracedCallback< Ptr< const Packet > > m_ssRxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
Definition: ss-net-device.h:506
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::MacHeaderType
This class Represents the HT (Header Type) field of generic MAC and bandwidth request headers.
Definition: wimax-mac-header.h:37
ns3::OfdmUlBurstProfile::GetUiuc
uint8_t GetUiuc(void) const
Get UIUC.
Definition: ul-mac-messages.cc:215
ns3::MacHeaderType::HEADER_TYPE_BANDWIDTH
@ HEADER_TYPE_BANDWIDTH
Definition: wimax-mac-header.h:43
ns3::SubscriberStationNetDevice::m_intervalT3
Time m_intervalT3
in milliseconds, ranging Response reception timeout following the transmission of a ranging request
Definition: ss-net-device.h:417
ul-mac-messages.h
ns3::GenericMacHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition: wimax-mac-header.cc:227
wimax-mac-queue.h
ns3::ServiceFlow::SF_TYPE_UGS
@ SF_TYPE_UGS
Definition: service-flow.h:65
ns3::SubscriberStationNetDevice::m_nrDlMapElements
uint16_t m_nrDlMapElements
number DL Map elements
Definition: ss-net-device.h:433
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition: pointer.h:37
ns3::Mac48Address
an EUI-48 address
Definition: mac48-address.h:44
ns3::SubscriberStationNetDevice::SetMaxContentionRangingRetries
void SetMaxContentionRangingRetries(uint8_t maxContentionRangingRetries)
Definition: ss-net-device.cc:423
ns3::SubscriberStationNetDevice::SS_STATE_WAITING_RNG_RSP
@ SS_STATE_WAITING_RNG_RSP
Definition: ss-net-device.h:60
ns3::SubscriberStationNetDevice::m_areManagementConnectionsAllocated
bool m_areManagementConnectionsAllocated
are management connections allocated
Definition: ss-net-device.h:457
ns3::SubscriberStationNetDevice::m_baseStationId
Mac48Address m_baseStationId
base station ID
Definition: ss-net-device.h:426
ns3::ServiceFlowRecord
this class implements a structure to manage some parameters and statistics related to a service flow
Definition: service-flow-record.h:37
ns3::WimaxPhy::MODULATION_TYPE_BPSK_12
@ MODULATION_TYPE_BPSK_12
Definition: wimax-phy.h:51
ns3::SubscriberStationNetDevice::SetIntervalT1
void SetIntervalT1(Time interval1)
Definition: ss-net-device.cc:339
ns3::Ucd::GetChannelEncodings
OfdmUcdChannelEncodings GetChannelEncodings(void) const
Get channel encodings.
Definition: ul-mac-messages.cc:351
ns3::SubscriberStationNetDevice::GetScheduler
Ptr< SSScheduler > GetScheduler(void) const
Definition: ss-net-device.cc:550
ns3::SubscriberStationNetDevice::SetModulationType
void SetModulationType(WimaxPhy::ModulationType modulationType)
Set the most efficient modulation and coding scheme (MCS) supported by the device.
Definition: ss-net-device.cc:514
ns3::SubscriberStationNetDevice::m_intervalT7
Time m_intervalT7
in seconds, wait for DSA/DSC/DSD Response timeout
Definition: ss-net-device.h:418
ns3::SubscriberStationNetDevice::GetBasicConnection
Ptr< WimaxConnection > GetBasicConnection(void) const
Definition: ss-net-device.cc:462
ns3::SubscriberStationNetDevice::m_lostDlMapEvent
EventId m_lostDlMapEvent
lost DL map event
Definition: ss-net-device.h:439
ns3::SubscriberStationNetDevice::~SubscriberStationNetDevice
~SubscriberStationNetDevice(void)
Definition: ss-net-device.cc:264
ns3::ServiceFlow::GetIsEnabled
bool GetIsEnabled(void) const
Get is enabled flag.
Definition: service-flow.cc:234
ns3::SubscriberStationNetDevice::m_asciiTxQueueDropCb
AsciiTraceCallback m_asciiTxQueueDropCb
Bound callback to perform ASCII logging for Drop events.
Definition: ss-net-device.h:513
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:557
ns3::SubscriberStationNetDevice::SS_STATE_WAITING_REG_RANG_INTRVL
@ SS_STATE_WAITING_REG_RANG_INTRVL
Definition: ss-net-device.h:58
ns3::OfdmUlBurstProfile::SetUiuc
void SetUiuc(uint8_t uiuc)
Set UIUC.
Definition: ul-mac-messages.cc:191
ns3::SubscriberStationNetDevice::SetLostUlMapInterval
void SetLostUlMapInterval(Time lostUlMapInterval)
Definition: ss-net-device.cc:303
ns3::DlMap::GetBaseStationId
Mac48Address GetBaseStationId(void) const
Get base station ID field.
Definition: dl-mac-messages.cc:585
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::SubscriberStationNetDevice::m_primaryConnection
Ptr< WimaxConnection > m_primaryConnection
primary connection
Definition: ss-net-device.h:437
ns3::WimaxNetDevice::GetInitialRangingConnection
Ptr< WimaxConnection > GetInitialRangingConnection(void) const
Get the initial ranging connection.
Definition: wimax-net-device.cc:439
ns3::SubscriberStationNetDevice::m_dcdWaitTimeoutEvent
EventId m_dcdWaitTimeoutEvent
DCD wait timeout event.
Definition: ss-net-device.h:441
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::DlMap::GetDlMapElements
std::list< OfdmDlMapIe > GetDlMapElements(void) const
Get DL Map elements field.
Definition: dl-mac-messages.cc:591
ns3::SubscriberStationNetDevice::m_maxDcdInterval
Time m_maxDcdInterval
in seconds, maximum time between transmission of DCD messages
Definition: ss-net-device.h:413
ns3::OfdmDlBurstProfile::GetDiuc
uint8_t GetDiuc(void) const
Definition: dl-mac-messages.cc:274
ns3::SubscriberStationNetDevice::SS_STATE_ADJUSTING_PARAMETERS
@ SS_STATE_ADJUSTING_PARAMETERS
Definition: ss-net-device.h:61
ns3::SubscriberStationNetDevice::GetServiceFlowManager
Ptr< SsServiceFlowManager > GetServiceFlowManager(void) const
Definition: ss-net-device.cc:593
ns3::SubscriberStationNetDevice::SetAsciiTxQueueDropCallback
void SetAsciiTxQueueDropCallback(AsciiTraceCallback cb)
Set the Drop callback for ASCII tracing.
Definition: ss-net-device.cc:1347
ns3::ManagementMessageType::MESSAGE_TYPE_DSA_RSP
@ MESSAGE_TYPE_DSA_RSP
Definition: mac-messages.h:58
ns3::ServiceFlow::GetRecord
ServiceFlowRecord * GetRecord(void) const
Get service flow record.
Definition: service-flow.cc:246
ns3::GenericMacHeader::SetLen
void SetLen(uint16_t len)
Set length field.
Definition: wimax-mac-header.cc:145
ns3::SubscriberStationNetDevice::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: ss-net-device.cc:57
ns3::SubscriberStationNetDevice::m_classifier
Ptr< IpcsClassifier > m_classifier
the classifier
Definition: ss-net-device.h:462
ns3::Ptr< Node >
ns3::SubscriberStationNetDevice::m_intervalT21
Time m_intervalT21
in seconds, time the SS searches for (decodable) DL-MAP on a given channel
Definition: ss-net-device.h:421
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
ns3::ServiceFlowRecord::UpdatePktsRcvd
void UpdatePktsRcvd(uint32_t pktsRcvd)
update the number of received packets by adding pktsRcvd
Definition: service-flow-record.cc:109
ns3::WimaxNetDevice::GetIfIndex
virtual uint32_t GetIfIndex(void) const
Get interface index.
Definition: wimax-net-device.cc:219
ns3::WimaxNetDevice
Hold together all WiMAX-related objects in a NetDevice.
Definition: wimax-net-device.h:69
ns3::SubscriberStationNetDevice::GetIntervalT7
Time GetIntervalT7(void) const
Definition: ss-net-device.cc:381
ns3::EventId::IsRunning
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
Definition: event-id.cc:71
ns3::Dcd::GetConfigurationChangeCount
uint8_t GetConfigurationChangeCount(void) const
Get configuration change count field.
Definition: dl-mac-messages.cc:353
ns3::SubscriberStationNetDevice::SS_STATE_ACQUIRING_PARAMETERS
@ SS_STATE_ACQUIRING_PARAMETERS
Definition: ss-net-device.h:57
ns3::SubscriberStationNetDevice::m_ssTxDropTrace
TracedCallback< Ptr< const Packet > > m_ssTxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
Definition: ss-net-device.h:480
ns3::SubscriberStationNetDevice::GetIntervalT21
Time GetIntervalT21(void) const
Definition: ss-net-device.cc:417
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::SubscriberStationNetDevice::m_modulationType
WimaxPhy::ModulationType m_modulationType
modulation type
Definition: ss-net-device.h:455
ns3::SubscriberStationNetDevice::m_intervalT1
Time m_intervalT1
in seconds, wait for DCD timeout
Definition: ss-net-device.h:415
ns3::SubscriberStationNetDevice::EVENT_DCD_WAIT_TIMEOUT
@ EVENT_DCD_WAIT_TIMEOUT
Definition: ss-net-device.h:75
ns3::Ucd::GetConfigurationChangeCount
uint8_t GetConfigurationChangeCount(void) const
Get configuration change count.
Definition: ul-mac-messages.cc:321
ns3::Ucd::GetUlBurstProfiles
std::vector< OfdmUlBurstProfile > GetUlBurstProfiles(void) const
Get UL burst profiles.
Definition: ul-mac-messages.cc:357
ns3::MacHeaderType::HeaderType
HeaderType
Header type enumeration.
Definition: wimax-mac-header.h:41
ns3::OfdmDlBurstProfile::DIUC_END_OF_MAP
@ DIUC_END_OF_MAP
Definition: dl-mac-messages.h:270
ns3::SubscriberStationNetDevice::EVENT_LOST_DL_MAP
@ EVENT_LOST_DL_MAP
Definition: ss-net-device.h:73
ns3::WimaxNetDevice::GetNode
virtual Ptr< Node > GetNode(void) const
Get node pointer.
Definition: wimax-net-device.cc:324
ns3::SubscriberStationNetDevice::SetIntervalT20
void SetIntervalT20(Time interval20)
Definition: ss-net-device.cc:399
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::SubscriberStationNetDevice::SetPrimaryConnection
void SetPrimaryConnection(Ptr< WimaxConnection > primaryConnection)
Definition: ss-net-device.cc:468
ns3::ManagementMessageType::GetType
uint8_t GetType(void) const
Get type field.
Definition: mac-messages.cc:56
ns3::ServiceFlowRecord::UpdateBytesSent
void UpdateBytesSent(uint32_t bytesSent)
update the number of sent bytes by adding bytesSent
Definition: service-flow-record.cc:127
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::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::WimaxNetDevice::GetCurrentUcd
Ucd GetCurrentUcd(void) const
Get the current UCD.
Definition: wimax-net-device.cc:469
ns3::WimaxNetDevice::GetState
uint8_t GetState(void) const
Get the device state.
Definition: wimax-net-device.cc:433
ns3::ManagementMessageType::MESSAGE_TYPE_RNG_RSP
@ MESSAGE_TYPE_RNG_RSP
Definition: mac-messages.h:54
ns3::Dcd::GetChannelEncodings
OfdmDcdChannelEncodings GetChannelEncodings(void) const
Get channel encodings field.
Definition: dl-mac-messages.cc:359
ns3::MilliSeconds
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1297
ns3::SubscriberStationNetDevice::m_nrDlMapRecvd
uint32_t m_nrDlMapRecvd
number DL map received
Definition: ss-net-device.h:445
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::SubscriberStationNetDevice::m_nrUcdRecvd
uint32_t m_nrUcdRecvd
number UCD received
Definition: ss-net-device.h:448
connection-manager.h
ns3::OfdmUlMapIe::GetDuration
uint16_t GetDuration(void) const
Get duration.
Definition: ul-mac-messages.cc:536
ns3::ManagementMessageType::MESSAGE_TYPE_REG_RSP
@ MESSAGE_TYPE_REG_RSP
Definition: mac-messages.h:56
ns3::SubscriberStationNetDevice::GetLostDlMapInterval
Time GetLostDlMapInterval(void) const
Definition: ss-net-device.cc:297
ns3::ManagementMessageType::MESSAGE_TYPE_REG_REQ
@ MESSAGE_TYPE_REG_REQ
Definition: mac-messages.h:55
ns3::DsaRsp
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
Definition: mac-messages.h:475
ns3::WimaxNetDevice::SetPhy
void SetPhy(Ptr< WimaxPhy > phy)
Set the physical layer object.
Definition: wimax-net-device.cc:363
ns3::Ucd::SetNrUlBurstProfiles
void SetNrUlBurstProfiles(uint8_t nrUlBurstProfiles)
Set NR UL burst profiles.
Definition: ul-mac-messages.cc:314
ns3::ManagementMessageType::MESSAGE_TYPE_DSA_ACK
@ MESSAGE_TYPE_DSA_ACK
Definition: mac-messages.h:59
ns3::SubscriberStationNetDevice::m_nrUlMapElements
uint16_t m_nrUlMapElements
number UL Map elements
Definition: ss-net-device.h:434
ns3::WimaxNetDevice::IsPromisc
bool IsPromisc(void)
Check if device is promiscious.
Definition: wimax-net-device.cc:565
ns3::SubscriberStationNetDevice::SS_STATE_WAITING_INV_RANG_INTRVL
@ SS_STATE_WAITING_INV_RANG_INTRVL
Definition: ss-net-device.h:59
ns3::GenericMacHeader::GetType
uint8_t GetType(void) const
Get type field.
Definition: wimax-mac-header.cc:170
ns3::SubscriberStationNetDevice::Enqueue
bool Enqueue(Ptr< Packet > packet, const MacHeaderType &hdrType, Ptr< WimaxConnection > connection)
Enqueue a packet into a connection queue.
Definition: ss-net-device.cc:705
ns3::SubscriberStationNetDevice::m_traceSSRx
TracedCallback< Ptr< const Packet >, Mac48Address, const Cid & > m_traceSSRx
trace SS receive callback
Definition: ss-net-device.h:464
ns3::SubscriberStationNetDevice::GetTimeToAllocation
Time GetTimeToAllocation(Time deferTime)
Get time to allocation.
Definition: ss-net-device.cc:1314
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::SubscriberStationNetDevice::SS_STATE_REGISTERED
@ SS_STATE_REGISTERED
Definition: ss-net-device.h:62
ns3::OfdmDlBurstProfile::GetFecCodeType
uint8_t GetFecCodeType(void) const
Definition: dl-mac-messages.cc:280
ns3::SubscriberStationNetDevice::DoDispose
void DoDispose(void)
Destructor implementation.
Definition: ss-net-device.cc:269
ns3::SubscriberStationNetDevice::HasServiceFlows
bool HasServiceFlows(void) const
Definition: ss-net-device.cc:562
ns3::SubscriberStationNetDevice::m_intervalT12
Time m_intervalT12
in seconds, wait for UCD descriptor
Definition: ss-net-device.h:419
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
list
#define list
Definition: openflow-interface.h:47
ns3::SubscriberStationNetDevice::SetAsciiTxQueueEnqueueCallback
void SetAsciiTxQueueEnqueueCallback(AsciiTraceCallback cb)
Set the Enqueue callback for ASCII tracing.
Definition: ss-net-device.cc:1335
service-flow.h
ns3::OfdmUlBurstProfile::UIUC_END_OF_MAP
@ UIUC_END_OF_MAP
Definition: ul-mac-messages.h:222
ns3::SubscriberStationNetDevice
SubscriberStationNetDevice subclass of WimaxNetDevice.
Definition: ss-net-device.h:49
ns3::WimaxNetDevice::GetCurrentDcd
Dcd GetCurrentDcd(void) const
Get the current DCD.
Definition: wimax-net-device.cc:457
ns3::SubscriberStationNetDevice::SubscriberStationNetDevice
SubscriberStationNetDevice(void)
Definition: ss-net-device.cc:211
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
NS_LOG_ERROR
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:257
ns3::WimaxNetDevice::GetBroadcastConnection
Ptr< WimaxConnection > GetBroadcastConnection(void) const
Get the broadcast connection.
Definition: wimax-net-device.cc:445
ns3::SubscriberStationNetDevice::GetIntervalT12
Time GetIntervalT12(void) const
Definition: ss-net-device.cc:393
ns3::SubscriberStationNetDevice::SS_STATE_STOPPED
@ SS_STATE_STOPPED
Definition: ss-net-device.h:64
ns3::SubscriberStationNetDevice::m_scheduler
Ptr< SSScheduler > m_scheduler
the scheduler
Definition: ss-net-device.h:460
ns3::BandwidthManager::SendBandwidthRequest
void SendBandwidthRequest(uint8_t uiuc, uint16_t allocationSize)
Send bandwidth request.
Definition: bandwidth-manager.cc:155
ns3::SubscriberStationNetDevice::m_areServiceFlowsAllocated
bool m_areServiceFlowsAllocated
are service flows allocated
Definition: ss-net-device.h:458
ns3::WimaxNetDevice::SetCurrentUcd
void SetCurrentUcd(Ucd ucd)
Set the current UCD.
Definition: wimax-net-device.cc:463
ns3::SubscriberStationNetDevice::SetIntervalT2
void SetIntervalT2(Time interval2)
Definition: ss-net-device.cc:351
ns3::SubscriberStationNetDevice::SetTimer
void SetTimer(EventId eventId, EventId &event)
Set timer.
Definition: ss-net-device.cc:1323
ns3::SubscriberStationNetDevice::m_lostUlMapEvent
EventId m_lostUlMapEvent
lost UL map event
Definition: ss-net-device.h:440
ns3::SubscriberStationNetDevice::SetAreServiceFlowsAllocated
void SetAreServiceFlowsAllocated(bool areServiceFlowsAllocated)
Definition: ss-net-device.cc:538
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::SubscriberStationNetDevice::GetLinkManager
Ptr< SSLinkManager > GetLinkManager(void) const
Definition: ss-net-device.cc:581
ns3::Config::Connect
void Connect(std::string path, const CallbackBase &cb)
Definition: config.cc:920
ns3::Packet::AddAtEnd
void AddAtEnd(Ptr< const Packet > packet)
Concatenate the input packet at the end of the current packet.
Definition: packet.cc:335
dl-mac-messages.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::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::OfdmDcdChannelEncodings::GetFrameDurationCode
uint8_t GetFrameDurationCode(void) const
Get frame duration code field.
Definition: dl-mac-messages.cc:180
ns3::SubscriberStationNetDevice::AddServiceFlow
void AddServiceFlow(ServiceFlow *sf)
adds a new service flow
Definition: ss-net-device.cc:630
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::SubscriberStationNetDevice::m_dcdCount
uint8_t m_dcdCount
DCD count.
Definition: ss-net-device.h:425
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::SubscriberStationNetDevice::ProcessUlMap
void ProcessUlMap(const UlMap &ulmap)
Process UL map.
Definition: ss-net-device.cc:1146
ns3::SubscriberStationNetDevice::IsRegistered
bool IsRegistered(void) const
Definition: ss-net-device.cc:1308
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::SubscriberStationNetDevice::m_asciiTxQueueEnqueueCb
AsciiTraceCallback m_asciiTxQueueEnqueueCb
Bound callback to perform ASCII logging for Enqueue events.
Definition: ss-net-device.h:509
ns3::SubscriberStationNetDevice::GetMaxUcdInterval
Time GetMaxUcdInterval(void) const
Definition: ss-net-device.cc:333
ns3::DlMap::GetDcdCount
uint8_t GetDcdCount(void) const
Get DCD count field.
Definition: dl-mac-messages.cc:579
ns3::SubscriberStationNetDevice::SetIntervalT12
void SetIntervalT12(Time interval12)
Definition: ss-net-device.cc:387
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
pktSize
uint32_t pktSize
packet size used for the simulation (in bytes)
Definition: wifi-bianchi.cc:86
ns3::SubscriberStationNetDevice::ProcessDcd
void ProcessDcd(const Dcd &dcd)
Process DCD.
Definition: ss-net-device.cc:1237
ns3::SubscriberStationNetDevice::GetPrimaryCid
Cid GetPrimaryCid(void) const
Definition: ss-net-device.cc:508
ns3::OfdmUlBurstProfile::UIUC_REQ_REGION_FULL
@ UIUC_REQ_REGION_FULL
Definition: ul-mac-messages.h:210
ns3::SubscriberStationNetDevice::GetAreServiceFlowsAllocated
bool GetAreServiceFlowsAllocated(void) const
Definition: ss-net-device.cc:544
ns3::TimeValue
AttributeValue implementation for Time.
Definition: nstime.h:1353
ns3::SubscriberStationNetDevice::GetMaxContentionRangingRetries
uint8_t GetMaxContentionRangingRetries(void) const
Definition: ss-net-device.cc:429
ns3::WimaxNetDevice::NotifyPromiscTrace
void NotifyPromiscTrace(Ptr< Packet > p)
Notify promiscious trace of a packet arrival.
Definition: wimax-net-device.cc:571
ns3::ManagementMessageType::MESSAGE_TYPE_DCD
@ MESSAGE_TYPE_DCD
Definition: mac-messages.h:50
ns3::SubscriberStationNetDevice::m_allocationStartTime
double m_allocationStartTime
allocation start time
Definition: ss-net-device.h:430
ns3::DcdChannelEncodings::GetEirxPIrMax
uint16_t GetEirxPIrMax(void) const
Get EIRX IR MAX field.
Definition: dl-mac-messages.cc:66
ns3::ServiceFlowRecord::GetBytesRcvd
uint32_t GetBytesRcvd(void) const
Definition: service-flow-record.cc:151
ns3::SubscriberStationNetDevice::GetIntervalT3
Time GetIntervalT3(void) const
Definition: ss-net-device.cc:369
ns3::SubscriberStationNetDevice::m_intervalT2
Time m_intervalT2
in seconds, wait for broadcast ranging timeout, i.e., wait for initial ranging opportunity
Definition: ss-net-device.h:416
ns3::SubscriberStationNetDevice::SetServiceFlowManager
void SetServiceFlowManager(Ptr< SsServiceFlowManager > sfm)
Sets the service flow manager to be installed on the device.
Definition: ss-net-device.cc:599
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
ss-scheduler.h
ns3::SubscriberStationNetDevice::DoReceive
void DoReceive(Ptr< Packet > packet)
Receive a packet.
Definition: ss-net-device.cc:788
ns3::ManagementMessageType::MESSAGE_TYPE_RNG_REQ
@ MESSAGE_TYPE_RNG_REQ
Definition: mac-messages.h:53
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::SubscriberStationNetDevice::SetIntervalT7
void SetIntervalT7(Time interval7)
Definition: ss-net-device.cc:375
ns3::ServiceFlowRecord::UpdatePktsSent
void UpdatePktsSent(uint32_t pktsSent)
update the number of sent packets by adding pktsSent
Definition: service-flow-record.cc:91
ns3::SubscriberStationNetDevice::m_ssTxTrace
TracedCallback< Ptr< const Packet > > m_ssTxTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition,...
Definition: ss-net-device.h:472
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::SubscriberStationNetDevice::m_nrUlMapRecvd
uint32_t m_nrUlMapRecvd
number UL map received
Definition: ss-net-device.h:446
ns3::GenericMacHeader::SetCid
void SetCid(Cid cid)
Set CID field.
Definition: wimax-mac-header.cc:150
ns3::SubscriberStationNetDevice::SetIntervalT21
void SetIntervalT21(Time interval21)
Definition: ss-net-device.cc:411
ns3::SubscriberStationNetDevice::m_ssPromiscRxTrace
TracedCallback< Ptr< const Packet > > m_ssPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
Definition: ss-net-device.h:489
service-flow-record.h
ns3::OfdmUlMapIe::GetUiuc
uint8_t GetUiuc(void) const
Get UIUC.
Definition: ul-mac-messages.cc:530
ns3::SubscriberStationNetDevice::DoSend
bool DoSend(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest, uint16_t protocolNumber)
Send a packet.
Definition: ss-net-device.cc:636
ns3::ServiceFlow::SF_TYPE_ALL
@ SF_TYPE_ALL
Definition: service-flow.h:66
ns3::SubscriberStationNetDevice::GetLostUlMapInterval
Time GetLostUlMapInterval(void) const
Definition: ss-net-device.cc:309
ns3::SubscriberStationNetDevice::m_nrDcdRecvd
uint32_t m_nrDcdRecvd
number DCD received
Definition: ss-net-device.h:447
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::SubscriberStationNetDevice::GetBasicCid
Cid GetBasicCid(void) const
Definition: ss-net-device.cc:502
ns3::SubscriberStationNetDevice::GetIntervalT20
Time GetIntervalT20(void) const
Definition: ss-net-device.cc:405
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::SubscriberStationNetDevice::m_serviceFlowManager
Ptr< SsServiceFlowManager > m_serviceFlowManager
the service flow manager
Definition: ss-net-device.h:461
ns3::SubscriberStationNetDevice::m_lostDlMapInterval
Time m_lostDlMapInterval
in milliseconds, time since last received DL-MAP before downlink synchronization is considered lost,...
Definition: ss-net-device.h:411
ns3::SubscriberStationNetDevice::m_ucdCount
uint8_t m_ucdCount
UCD count.
Definition: ss-net-device.h:429
ns3::SubscriberStationNetDevice::SetScheduler
void SetScheduler(Ptr< SSScheduler > ssScheduler)
Definition: ss-net-device.cc:556
ns3::ServiceFlow::GetSfid
uint32_t GetSfid(void) const
Get SFID.
Definition: service-flow.cc:320
service-flow-manager.h
ns3::SubscriberStationNetDevice::m_ulBurstProfile
OfdmUlBurstProfile * m_ulBurstProfile
UL burst profile.
Definition: ss-net-device.h:451
ns3::OfdmDlBurstProfile::SetFecCodeType
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
Definition: dl-mac-messages.cc:256
ns3::RngRsp
This class implements the ranging response message described by "IEEE Standard for Local and metropol...
Definition: mac-messages.h:122
ns3::SubscriberStationNetDevice::SS_STATE_SYNCHRONIZING
@ SS_STATE_SYNCHRONIZING
Definition: ss-net-device.h:56
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:588
ns3::SubscriberStationNetDevice::InitSubscriberStationNetDevice
void InitSubscriberStationNetDevice(void)
initializes the net device and sets the parameters to the default values
Definition: ss-net-device.cc:219
ns3::SubscriberStationNetDevice::m_lostUlMapInterval
Time m_lostUlMapInterval
in milliseconds, time since last received UL-MAP before uplink synchronization is considered lost,...
Definition: ss-net-device.h:412
ns3::SubscriberStationNetDevice::GetDefaultLostDlMapInterval
static Time GetDefaultLostDlMapInterval()
Get default lost DL map interval.
Definition: ss-net-device.cc:51
ns3::DcdChannelEncodings::GetBsEirp
uint16_t GetBsEirp(void) const
Get BS EIRP field.
Definition: dl-mac-messages.cc:60
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::UlMap::GetAllocationStartTime
uint32_t GetAllocationStartTime(void) const
Get allocation start time.
Definition: ul-mac-messages.cc:619
ns3::OfdmDlBurstProfile::SetDiuc
void SetDiuc(uint8_t diuc)
Set DIUC field.
Definition: dl-mac-messages.cc:250
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::SubscriberStationNetDevice::SetIpcsPacketClassifier
void SetIpcsPacketClassifier(Ptr< IpcsClassifier > classifier)
Sets the packet classifier to be used.
Definition: ss-net-device.cc:575
ns3::SubscriberStationNetDevice::EVENT_RANG_OPP_WAIT_TIMEOUT
@ EVENT_RANG_OPP_WAIT_TIMEOUT
Definition: ss-net-device.h:77
ns3::SubscriberStationNetDevice::m_basicConnection
Ptr< WimaxConnection > m_basicConnection
basic connection
Definition: ss-net-device.h:436
ns3::WimaxNetDevice::SetCurrentDcd
void SetCurrentDcd(Dcd dcd)
Set the current DCD.
Definition: wimax-net-device.cc:451
ns3::SubscriberStationNetDevice::m_ucdWaitTimeoutEvent
EventId m_ucdWaitTimeoutEvent
UCD wait timeout event.
Definition: ss-net-device.h:442
ns3::SubscriberStationNetDevice::ProcessDlMap
void ProcessDlMap(const DlMap &dlmap)
Process DL map.
Definition: ss-net-device.cc:1115
ns3::SubscriberStationNetDevice::m_asciiTxQueueDequeueCb
AsciiTraceCallback m_asciiTxQueueDequeueCb
Bound callback to perform ASCII logging for Dequeue events.
Definition: ss-net-device.h:511
ns3::SubscriberStationNetDevice::m_rangOppWaitTimeoutEvent
EventId m_rangOppWaitTimeoutEvent
range opp wait timeout event
Definition: ss-net-device.h:443
ns3::UlMap::GetUcdCount
uint8_t GetUcdCount(void) const
Get UCD count.
Definition: ul-mac-messages.cc:613
ns3::Callback::Nullify
void Nullify(void)
Discard the implementation, set it to null.
Definition: callback.h:1391
ns3::SubscriberStationNetDevice::SetBasicConnection
void SetBasicConnection(Ptr< WimaxConnection > basicConnection)
Definition: ss-net-device.cc:435
burst-profile-manager.h
ns3::SubscriberStationNetDevice::GetPrimaryConnection
Ptr< WimaxConnection > GetPrimaryConnection(void) const
Definition: ss-net-device.cc:496
ns3::SubscriberStationNetDevice::m_intervalT20
Time m_intervalT20
in seconds, time the SS searches for preambles on a given channel
Definition: ss-net-device.h:420