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/drop-tail-queue.h"
25 #include "ns3/node.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 
284 }
285 
286 void
288 {
289  m_lostDlMapInterval = lostDlMapInterval;
290 }
291 
292 Time
294 {
295  return m_lostDlMapInterval;
296 }
297 
298 void
300 {
301  m_lostUlMapInterval = lostUlMapInterval;
302 }
303 
304 Time
306 {
307  return m_lostUlMapInterval;
308 }
309 
310 void
312 {
313  m_maxDcdInterval = maxDcdInterval;
314 }
315 
316 Time
318 {
319  return m_maxDcdInterval;
320 }
321 
322 void
324 {
325  m_maxUcdInterval = maxUcdInterval;
326 }
327 
328 Time
330 {
331  return m_maxUcdInterval;
332 }
333 
334 void
336 {
337  m_intervalT1 = interval;
338 }
339 
340 Time
342 {
343  return m_intervalT1;
344 }
345 
346 void
348 {
349  m_intervalT2 = interval;
350 }
351 
352 Time
354 {
355  return m_intervalT2;
356 }
357 
358 void
360 {
361  m_intervalT3 = interval;
362 }
363 
364 Time
366 {
367  return m_intervalT3;
368 }
369 
370 void
372 {
373  m_intervalT7 = interval;
374 }
375 
376 Time
378 {
379  return m_intervalT7;
380 }
381 
382 void
384 {
385  m_intervalT12 = interval;
386 }
387 
388 Time
390 {
391  return m_intervalT12;
392 }
393 
394 void
396 {
397  m_intervalT20 = interval;
398 }
399 
400 Time
402 {
403  return m_intervalT20;
404 }
405 
406 void
408 {
409  m_intervalT21 = interval;
410 }
411 
412 Time
414 {
415  return m_intervalT21;
416 }
417 
418 void
420 {
421  m_maxContentionRangingRetries = maxContentionRangingRetries;
422 }
423 
424 uint8_t
426 {
428 }
429 
430 void
432 {
433  m_basicConnection = basicConnection;
434 }
435 
438 {
439  return m_basicConnection;
440 }
441 
442 void
444 {
445  m_primaryConnection = primaryConnection;
446 }
447 
450 {
451  return m_primaryConnection;
452 }
453 
454 Cid
456 {
457  return m_basicConnection->GetCid ();
458 }
459 
460 Cid
462 {
463  return m_primaryConnection->GetCid ();
464 }
465 
466 void
468 {
469  m_modulationType = modulationType;
470 }
471 
474 {
475  return m_modulationType;
476 }
477 
478 void
480 {
481  m_areManagementConnectionsAllocated = areManagementConnectionsAllocated;
482 }
483 
484 bool
486 {
488 }
489 
490 void
492 {
493  m_areServiceFlowsAllocated = areServiceFlowsAllocated;
494 }
495 
496 bool
498 {
500 }
501 
504 {
505  return m_scheduler;
506 }
507 
508 void
510 {
511  m_scheduler = scheduler;
512 }
513 
514 bool
516 {
517  return GetServiceFlowManager ()->GetServiceFlows (ServiceFlow::SF_TYPE_ALL).size () > 0;
518 }
519 
522 {
523 
524  return m_classifier;
525 }
526 
527 void
529 {
530  m_classifier = classifier;
531 }
532 
535 {
536  return m_linkManager;
537 }
538 
539 void
541 {
542  m_linkManager = linkManager;
543 }
544 
547 {
548  return m_serviceFlowManager;
549 }
550 
551 void
553 {
554  m_serviceFlowManager = sfm;
555 }
556 
557 void
559 {
561 
562  GetPhy ()->SetPhyParameters ();
563  GetPhy ()->SetDataRates ();
564  m_intervalT20 = Seconds (4 * GetPhy ()->GetFrameDuration ().GetSeconds ());
565 
568 }
569 
570 void
572 {
574 }
575 
576 void
578 {
579  GetServiceFlowManager ()->AddServiceFlow (sf);
580 }
581 
582 void
584 {
585  GetServiceFlowManager ()->AddServiceFlow (sf);
586 }
587 
588 bool
590  const Mac48Address &source,
591  const Mac48Address &dest,
592  uint16_t protocolNumber)
593 {
594  NS_LOG_INFO ("SS (" << source << "):" );
595  NS_LOG_INFO ("\tSending packet..." );
596  NS_LOG_INFO ("\t\tDestination: " << dest );
597  NS_LOG_INFO ("\t\tPacket Size: " << packet->GetSize () );
598  NS_LOG_INFO ("\t\tProtocol: " << protocolNumber );
599 
600  ServiceFlow *serviceFlow = 0;
601 
602  if (IsRegistered ())
603  {
604  NS_LOG_DEBUG ("SS (Basic CID: " << m_basicConnection->GetCid () << ")");
605  }
606  else
607  {
608  NS_LOG_DEBUG ("SS (" << GetMacAddress () << ")");
609  NS_LOG_INFO ("\tCan't send packet! (NotRegitered with the network)");
610  return false;
611  }
612 
613  NS_LOG_DEBUG ("packet to send, size : " << packet->GetSize () << ", destination : " << dest);
614 
615  if (GetServiceFlowManager ()->GetNrServiceFlows () == 0)
616  {
617  NS_LOG_INFO ("\tCan't send packet! (No service Flow)");
618  return false;
619  }
620 
621  if (protocolNumber == 2048)
622  {
623  serviceFlow = m_classifier->Classify (packet, GetServiceFlowManager (), ServiceFlow::SF_DIRECTION_UP);
624  }
625 
626  if ((protocolNumber != 2048) || (serviceFlow == NULL))
627  {
628  serviceFlow = *GetServiceFlowManager ()->GetServiceFlows (ServiceFlow::SF_TYPE_ALL).begin ();
629  NS_LOG_INFO ("\tNo service flows matches...using the default one.");
630  }
631 
632  NS_LOG_INFO ("\tPacket classified in the service flow SFID = " << serviceFlow->GetSfid () << " CID = "
633  << serviceFlow->GetCid ());
634  if (serviceFlow->GetIsEnabled ())
635  {
636  if (!Enqueue (packet, MacHeaderType (), serviceFlow->GetConnection ()))
637  {
638  NS_LOG_INFO ("\tEnqueue ERROR!!" );
639  m_ssTxDropTrace (packet);
640  return false;
641  }
642  else
643  {
644  m_ssTxTrace (packet);
645  }
646  }
647  else
648  {
649  NS_LOG_INFO ("Error!! The Service Flow is not enabled" );
650  m_ssTxDropTrace (packet);
651  return false;
652  }
653 
654  return true;
655 }
656 
657 bool
659  const MacHeaderType &hdrType,
660  Ptr<WimaxConnection> connection)
661 {
662  NS_ASSERT_MSG (connection != 0, "SS: Can not enqueue the packet: the selected connection is nor initialized");
663 
664  GenericMacHeader hdr;
665 
667  {
668  hdr.SetLen (packet->GetSize () + hdr.GetSerializedSize ());
669  hdr.SetCid (connection->GetCid ());
670 
671  }
672 
673  if (connection->GetType () == Cid::TRANSPORT)
674  {
675 
676  if (connection->GetSchedulingType () == ServiceFlow::SF_TYPE_UGS && m_scheduler->GetPollMe ())
677  {
679  "Error while equeuing packet: incorrect header type");
680 
681  GrantManagementSubheader grantMgmntSubhdr;
682  grantMgmntSubhdr.SetPm (true);
683  packet->AddHeader (grantMgmntSubhdr);
684  }
685  }
686  NS_LOG_INFO ("ServiceFlowManager: enqueuing packet" );
687  return connection->Enqueue (packet, hdrType, hdr);
688 }
689 
690 void
692  uint16_t nrSymbols,
693  Ptr<WimaxConnection> connection,
694  MacHeaderType::HeaderType packetType)
695 {
696  WimaxPhy::ModulationType modulationType;
697 
699  {
700  modulationType = WimaxPhy::MODULATION_TYPE_BPSK_12;
701  }
702  else
703  {
704  modulationType = GetBurstProfileManager ()->GetModulationType (uiuc, DIRECTION_UPLINK);
705  }
706  Ptr<PacketBurst> burst = m_scheduler->Schedule (nrSymbols, modulationType, packetType, connection);
707 
708  if (burst->GetNPackets () == 0)
709  {
710  return;
711  }
712 
713  if (IsRegistered ())
714  {
715  NS_LOG_DEBUG ("SS (Basic CID: " << m_basicConnection->GetCid () << ")");
716  }
717  else
718  {
719  NS_LOG_DEBUG ("SS (" << GetMacAddress () << ")");
720  }
721 
722  if (connection->GetType () == Cid::TRANSPORT)
723  {
724  ServiceFlowRecord *record = connection->GetServiceFlow ()->GetRecord ();
725  record->UpdatePktsSent (burst->GetNPackets ());
726  record->UpdateBytesSent (burst->GetSize ());
727 
728  NS_LOG_DEBUG (" sending burst" << ", SFID: " << connection->GetServiceFlow ()->GetSfid () << ", pkts sent: "
729  << record->GetPktsSent () << ", pkts rcvd: " << record->GetPktsRcvd () << ", bytes sent: "
730  << record->GetBytesSent () << ", bytes rcvd: " << record->GetBytesRcvd () );
731 
732  }
733  else
734  {
735 
736  }
737  ForwardDown (burst, modulationType);
738 }
739 
740 void
742 {
743  GenericMacHeader gnrcMacHdr;
744  ManagementMessageType msgType;
745  RngRsp rngrsp;
746  Cid cid;
747  uint32_t pktSize = packet->GetSize ();
748  packet->RemoveHeader (gnrcMacHdr);
749  FragmentationSubheader fragSubhdr;
750  bool fragmentation = false; // it becames true when there is a fragmentation subheader
751 
752  if (gnrcMacHdr.GetHt () == MacHeaderType::HEADER_TYPE_GENERIC)
753  {
754  if (gnrcMacHdr.check_hcs () == false)
755  {
756  // The header is noisy
757  NS_LOG_INFO ("Header HCS ERROR");
758  m_ssRxDropTrace (packet);
759  return;
760  }
761 
762  cid = gnrcMacHdr.GetCid ();
763 
764  // checking for subheaders
765  uint8_t type = gnrcMacHdr.GetType ();
766  if (type)
767  {
768  // Check if there is a fragmentation Subheader
769  uint8_t tmpType = type;
770  if (((tmpType >> 2) & 1) == 1)
771  {
772  // a TRANSPORT packet with fragmentation subheader has been received!
773  fragmentation = true;
774  NS_LOG_INFO ("SS DoReceive -> the packet is a fragment" << std::endl);
775  }
776  }
777 
778  if (cid == GetBroadcastConnection ()->GetCid () && !fragmentation)
779  {
780  packet->RemoveHeader (msgType);
781  switch (msgType.GetType ())
782  {
784  {
786  {
787  Simulator::Cancel (m_linkManager->GetDlMapSyncTimeoutEvent ());
788  }
789 
791  {
793  }
794 
795  m_linkManager->ScheduleScanningRestart (m_lostDlMapInterval, EVENT_LOST_DL_MAP, false, m_lostDlMapEvent);
796 
798  {
800  }
801 
802  m_linkManager->ScheduleScanningRestart (m_intervalT1,
804  false,
806 
808  {
810  }
811 
812  m_linkManager->ScheduleScanningRestart (m_intervalT12,
814  true,
816 
817  DlMap dlmap;
818  packet->RemoveHeader (dlmap);
819  ProcessDlMap (dlmap);
820  break;
821  }
823  {
825  {
827  m_linkManager->ScheduleScanningRestart (m_lostUlMapInterval,
829  true,
831  }
832 
833  UlMap ulmap;
834  packet->RemoveHeader (ulmap);
835 
836  ProcessUlMap (ulmap);
837 
839  {
840  if (m_linkManager->GetRangingIntervalFound ())
841  {
843  {
845  }
846  m_linkManager->PerformBackoff ();
847  }
848  }
849  break;
850  }
852  {
854  {
856  }
857 
859  {
861  m_linkManager->ScheduleScanningRestart (m_intervalT1,
863  false,
865  }
866 
867  Dcd dcd;
868  // number of burst profiles is set to number of DL-MAP IEs after processing DL-MAP, not a very good solution
869  // dcd.SetNrDlBurstProfiles (m_nrDlMapElements);
870  dcd.SetNrDlBurstProfiles (7);
871  packet->RemoveHeader (dcd);
872 
873  ProcessDcd (dcd);
874  break;
875  }
877  {
878  Ucd ucd;
879  // number of burst profiles is set to number of UL-MAP IEs after processing UL-MAP, not a very good solution
880  // ucd.SetNrUlBurstProfiles (m_nrUlMapElements);
881  ucd.SetNrUlBurstProfiles (7);
882  packet->RemoveHeader (ucd);
883 
884  ProcessUcd (ucd);
885 
887  {
889  m_linkManager->ScheduleScanningRestart (m_intervalT12,
891  true,
893  }
894 
896  {
897  /*state indicating that SS has completed scanning, synchronization and parameter acquisition
898  successfully and now waiting for UL-MAP to start initial ranging.*/
900 
901  m_linkManager->ScheduleScanningRestart (m_intervalT2,
903  false,
905  m_linkManager->ScheduleScanningRestart (m_lostUlMapInterval,
907  true,
909  }
910  break;
911  }
912  default:
913  NS_FATAL_ERROR ("Invalid management message type");
914  }
915  }
916  else if (GetInitialRangingConnection () != 0 && cid == GetInitialRangingConnection ()->GetCid () && !fragmentation)
917  {
918  m_traceSSRx (packet, GetMacAddress (), cid);
919  packet->RemoveHeader (msgType);
920  switch (msgType.GetType ())
921  {
923  // intended for base station, ignore
924  break;
927  "SS: Error while receiving a ranging response message: SS state should be SS_STATE_WAITING_RNG_RSP");
928  packet->RemoveHeader (rngrsp);
929  m_linkManager->PerformRanging (cid, rngrsp);
930  break;
931  default:
932  NS_LOG_ERROR ("Invalid management message type");
933  }
934  }
935  else if (m_basicConnection != 0 && cid == m_basicConnection->GetCid () && !fragmentation)
936  {
937  m_traceSSRx (packet, GetMacAddress (), cid);
938  packet->RemoveHeader (msgType);
939  switch (msgType.GetType ())
940  {
942  // intended for base station, ignore
943  break;
946  "SS: Error while receiving a ranging response message: SS state should be SS_STATE_WAITING_RNG_RSP");
947  packet->RemoveHeader (rngrsp);
948  m_linkManager->PerformRanging (cid, rngrsp);
949  break;
950  default:
951  NS_LOG_ERROR ("Invalid management message type");
952  }
953  }
954  else if (m_primaryConnection != 0 && cid == m_primaryConnection->GetCid () && !fragmentation)
955  {
956  m_traceSSRx (packet, GetMacAddress (), cid);
957  packet->RemoveHeader (msgType);
958  switch (msgType.GetType ())
959  {
961  // not yet implemented
962  break;
964  // intended for base station, ignore
965  break;
967  /*from other station as DSA initiation
968  by BS is not supported, ignore*/
969  break;
971  {
972  Simulator::Cancel (GetServiceFlowManager ()->GetDsaRspTimeoutEvent ());
973  DsaRsp dsaRsp;
974  packet->RemoveHeader (dsaRsp);
975  GetServiceFlowManager ()->ProcessDsaRsp (dsaRsp);
976  break;
977  }
979  /*from other station as DSA initiation
980  by BS is not supported, ignore*/
981  break;
982  default:
983  NS_LOG_ERROR ("Invalid management message type");
984  }
985  }
986  else if (GetConnectionManager ()->GetConnection (cid)) // transport connection
987  {
988  ServiceFlow *serviceFlow = GetConnectionManager ()->GetConnection (cid)->GetServiceFlow ();
989  ServiceFlowRecord *record = serviceFlow->GetRecord ();
990 
991  record->UpdatePktsRcvd (1);
992  record->UpdateBytesRcvd (pktSize);
993 
994  // If fragmentation is true, the packet is a fragment.
995  if (!fragmentation)
996  {
997  m_ssRxTrace (packet);
998  ForwardUp (packet, m_baseStationId, GetMacAddress ()); // source shall be BS's address or sender SS's?
999  }
1000  else
1001  {
1002  NS_LOG_INFO ( "FRAG_DEBUG: SS DoReceive, the Packet is a fragment" << std::endl);
1003  packet->RemoveHeader (fragSubhdr);
1004  uint32_t fc = fragSubhdr.GetFc ();
1005  NS_LOG_INFO ( "\t fragment size = " << packet->GetSize () << std::endl);
1006 
1007  if (fc == 2)
1008  {
1009  // This is the latest fragment.
1010  // Take the fragment queue, defragment a packet and send it to the upper layer
1011  NS_LOG_INFO ( "\t Received the latest fragment" << std::endl);
1012  GetConnectionManager ()->GetConnection (cid)
1013  ->FragmentEnqueue (packet);
1014 
1016  GetConnection (cid)->GetFragmentsQueue ();
1017 
1018  Ptr<Packet> fullPacket = Create<Packet> ();
1019 
1020  // DEFRAGMENTATION
1021  NS_LOG_INFO ( "\t SS PACKET DEFRAGMENTATION" << std::endl);
1022  for (std::list<Ptr<const Packet> >::const_iterator iter = fragmentsQueue.begin ();
1023  iter != fragmentsQueue.end (); ++iter)
1024  {
1025  // Create the whole Packet
1026  fullPacket->AddAtEnd (*iter);
1027  }
1028  GetConnectionManager ()->GetConnection (cid)
1029  ->ClearFragmentsQueue ();
1030  NS_LOG_INFO ( "\t fullPacket size = " << fullPacket->GetSize () << std::endl);
1031 
1032  m_ssRxTrace (fullPacket);
1033  ForwardUp (fullPacket, m_baseStationId, GetMacAddress ()); // source shall be BS's address or sender SS's?
1034  }
1035  else
1036  {
1037  // This is the first or middle fragment.
1038  // Take the fragment queue, store the fragment into the queue
1039  NS_LOG_INFO ( "\t Received the first or the middle fragment" << std::endl);
1040  GetConnectionManager ()->GetConnection (cid)->FragmentEnqueue (packet);
1041  }
1042  }
1043  }
1044  else if (cid.IsMulticast ())
1045  {
1046  m_traceSSRx (packet, GetMacAddress (), cid);
1047  ForwardUp (packet, m_baseStationId, GetMacAddress ()); // source shall be BS's address or sender SS's?
1048  }
1049  else if (IsPromisc ())
1050  {
1051  NotifyPromiscTrace (packet);
1052  m_ssPromiscRxTrace (packet);
1053 
1054  // not for me, ignore
1055  }
1056  else
1057  {
1058  // not for me drop
1059  }
1060  }
1061  else
1062  {
1063  // from other SS, ignore
1064  }
1065 }
1066 
1067 void
1069 {
1070  m_nrDlMapRecvd++;
1071  m_dcdCount = dlmap.GetDcdCount ();
1072  m_baseStationId = dlmap.GetBaseStationId ();
1073  std::list<OfdmDlMapIe> dlMapElements = dlmap.GetDlMapElements ();
1074 
1075  for (std::list<OfdmDlMapIe>::iterator iter = dlMapElements.begin (); iter != dlMapElements.end (); ++iter)
1076  {
1077  if (iter->GetDiuc () == OfdmDlBurstProfile::DIUC_END_OF_MAP)
1078  {
1079  break;
1080  }
1081 
1082  if (iter->GetCid () == m_basicConnection->GetCid ())
1083  {
1084  /*here the SS shall actually acquire the start time it shall start receiving the burst at. start time is used for power saving
1085  which is not implemented here, furthermore there is no need since the simulator architecture automatically callbacks the receive
1086  function. shall acquire the DIUC (burst profile) as well to decode the burst, again not required again because the callback
1087  mechanism automatically passes it as parameter.*/
1088  }
1089 
1090 #if 0 /* a template for future implementation following */
1091  uint8_t temp = iter->GetDiuc ();
1092  temp = iter->GetPreamblePresent ();
1093  temp = iter->GetStartTime ();
1094 #endif
1095  }
1096 }
1097 
1098 void
1100 {
1101  m_nrUlMapRecvd++;
1102  m_ucdCount = ulmap.GetUcdCount ();
1104  std::list<OfdmUlMapIe> ulMapElements = ulmap.GetUlMapElements ();
1105  m_linkManager->SetRangingIntervalFound (false);
1106 
1107  for (std::list<OfdmUlMapIe>::iterator iter = ulMapElements.begin (); iter != ulMapElements.end (); ++iter)
1108  {
1109  OfdmUlMapIe ulMapIe = *iter;
1110 
1111  if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_END_OF_MAP)
1112  {
1113  break;
1114  }
1115 
1116  Cid cid = ulMapIe.GetCid ();
1117 
1118  if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_INITIAL_RANGING && cid == GetBroadcastConnection ()->GetCid ())
1119  {
1120  m_linkManager->SetRangingIntervalFound (true);
1121  }
1122 
1123  if (m_areManagementConnectionsAllocated && cid == m_basicConnection->GetCid ())
1124  {
1125 
1126  Time timeToAllocation = GetTimeToAllocation (Seconds (ulMapIe.GetStartTime ()
1127  * GetPhy ()->GetSymbolDuration ().GetSeconds ()));
1128 
1129  if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_INITIAL_RANGING) // invited ranging interval
1130 
1131  {
1132 
1133  m_linkManager->IncrementNrInvitedPollsRecvd ();
1135  "SS: Error while processing UL MAP: SS state should be SS_STATE_WAITING_INV_RANG_INTRVL");
1136  Simulator::Schedule (timeToAllocation,
1138  m_linkManager,
1139  ulMapIe.GetUiuc (),
1140  ulMapIe.GetDuration ());
1141  }
1142  else if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_REQ_REGION_FULL) // unicast poll
1143 
1144  {
1145 
1146  Simulator::Schedule (timeToAllocation,
1149  ulMapIe.GetUiuc (),
1150  ulMapIe.GetDuration ());
1151  }
1152  else // regular allocation/grant for data, for UGS flows or in response of requests for non-UGS flows
1153 
1154  {
1155 
1156  Ptr<WimaxConnection> connection = NULL;
1157  Simulator::Schedule (timeToAllocation,
1159  this,
1160  ulMapIe.GetUiuc (),
1161  ulMapIe.GetDuration (),
1162  connection,
1164  }
1165  }
1166  else
1167  {
1168  if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_INITIAL_RANGING && cid
1169  == GetBroadcastConnection ()->GetCid ()) // regular ranging interval
1170 
1171  {
1173  {
1174  m_linkManager->SetNrRangingTransOpps ((ulMapIe.GetDuration () * GetPhy ()->GetPsPerSymbol ())
1176 
1177  }
1178 
1180  {
1181  m_linkManager->StartContentionResolution ();
1182  }
1183 
1184  }
1185  }
1186  }
1187 }
1188 
1189 void
1191 {
1192  m_nrDcdRecvd++;
1194  {
1195  return; // nothing new in DCD so dont read
1196 
1197  }
1198  SetCurrentDcd (dcd);
1199  OfdmDcdChannelEncodings dcdChnlEncodings = dcd.GetChannelEncodings ();
1200 
1201  // parameters for initial ranging
1202  m_linkManager->SetBsEirp (dcdChnlEncodings.GetBsEirp ());
1203  m_linkManager->SetEirXPIrMax (dcdChnlEncodings.GetEirxPIrMax ());
1204 
1205  GetPhy ()->GetFrameDuration (dcdChnlEncodings.GetFrameDurationCode ());
1206 
1207  std::vector<OfdmDlBurstProfile> dlBurstProfiles = dcd.GetDlBurstProfiles ();
1208 
1209  for (std::vector<OfdmDlBurstProfile>::iterator iter = dlBurstProfiles.begin (); iter != dlBurstProfiles.end (); ++iter)
1210  {
1211  OfdmDlBurstProfile brstProfile = *iter;
1212 
1213  /*NS-2 does this, may be not correct, assumes DIUC/UIUC to
1214  modulation type mapping in DCD/UCD may change over time*/
1215  if (brstProfile.GetFecCodeType () == m_modulationType)
1216  {
1218  m_dlBurstProfile->SetDiuc (brstProfile.GetDiuc ());
1219  }
1220  }
1221 }
1222 
1223 void
1225 {
1226  m_nrUcdRecvd++;
1227  if (!m_linkManager->IsUlChannelUsable ())
1228  {
1229  m_linkManager->StartScanning (EVENT_NONE, false);
1230  return;
1231  }
1232 
1234  {
1235  return; // nothing new in UCD so don't read
1236 
1237  }
1238  SetCurrentUcd (ucd);
1239  m_linkManager->SetRangingCW ((uint8_t) std::pow ((double) 2, (double) ucd.GetRangingBackoffStart ()) - 1); // initializing ranging CW
1240  OfdmUcdChannelEncodings ucdChnlEncodings = ucd.GetChannelEncodings ();
1241 
1242  std::vector<OfdmUlBurstProfile> ulBurstProfiles = ucd.GetUlBurstProfiles ();
1243 
1244  for (std::vector<OfdmUlBurstProfile>::iterator iter = ulBurstProfiles.begin (); iter != ulBurstProfiles.end (); ++iter)
1245  {
1246  OfdmUlBurstProfile brstProfile = *iter;
1247 
1248  /*NS-2 does this, may be not correct, assumes DIUC/UIUC to
1249  modulation type mapping in DCD/UCD may change over time*/
1250  if (brstProfile.GetFecCodeType () == m_modulationType)
1251  {
1253  m_ulBurstProfile->SetUiuc (brstProfile.GetUiuc ());
1254  }
1255  }
1256 }
1257 
1258 /*temporarily assuming registered if ranging is complete,
1259  shall actually consider the registration step also */
1260 bool
1262 {
1263  return GetState () >= SS_STATE_REGISTERED;
1264 }
1265 
1266 Time
1268 {
1269  Time timeAlreadyElapsed = Simulator::Now () - m_frameStartTime;
1270  Time timeToUlSubframe = Seconds (m_allocationStartTime * GetPhy ()->GetPsDuration ().GetSeconds ())
1271  - timeAlreadyElapsed;
1272  return timeToUlSubframe + defferTime;
1273 }
1274 
1275 void
1277 {
1278  if (GetState () == SS_STATE_STOPPED)
1279  {
1280  Simulator::Cancel (eventId); // cancelling this event (already scheduled in function call)
1281  return;
1282  }
1283 
1284  event = eventId;
1285 }
1286 
1287 } // namespace ns`
void SendBandwidthRequest(uint8_t uiuc, uint16_t allocationSize)
uint8_t GetFecCodeType(void) const
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:268
OfdmDcdChannelEncodings GetChannelEncodings(void) const
void SetIntervalT3(Time interval3)
Introspection did not find any typical Config paths.
Definition: mac-messages.h:344
void SetTimer(EventId eventId, EventId &event)
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
bool GetIsEnabled(void) const
void SetIntervalT1(Time interval1)
Time GetIntervalT2(void) const
returns the wait for broadcast ranging timeout, i.e., wait for initial ranging opportunity ...
static Time GetDefaultLostDlMapInterval()
Introspection did not find any typical Config paths.
void SetLostDlMapInterval(Time lostDlMapInterval)
void ProcessUcd(const Ucd &ucd)
Time GetMaxUcdInterval(void) const
returns the maximum time between transmission of UCD messages
void ProcessDcd(const Dcd &dcd)
void SetIntervalT21(Time interval21)
Ptr< WimaxConnection > m_basicConnection
Introspection did not find any typical Config paths.
Definition: mac-messages.h:97
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:44
Ptr< WimaxConnection > m_primaryConnection
uint8_t GetFrameDurationCode(void) const
std::list< OfdmDlMapIe > GetDlMapElements(void) const
Introspection did not find any typical Config paths.
Definition: mac-messages.h:41
uint8_t GetConfigurationChangeCount(void) const
this class implements a structure to manage some parameters and statistics related to a service flow ...
void SetIntervalT2(Time interval2)
void SetModulationType(WimaxPhy::ModulationType modulationType)
Set the most efficient modulation and coding scheme (MCS) supported by the device.
bool GetAreManagementConnectionsAllocated(void) const
uint32_t GetBytesRcvd(void) const
void ProcessDlMap(const DlMap &dlmap)
bool IsMulticast(void) const
Definition: cid.cc:51
void ForwardUp(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
void SetMaxDcdInterval(Time maxDcdInterval)
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:903
Dcd GetCurrentDcd(void) const
void SetAreManagementConnectionsAllocated(bool areManagementConnectionsAllocated)
Ptr< WimaxConnection > GetBroadcastConnection(void) const
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:792
Time GetIntervalT7(void) const
returns the wait for DSA/DSC/DSD Response timeout
void SetLostUlMapInterval(Time lostUlMapInterval)
uint32_t GetSfid(void) const
Cid GetCid(void) const
uint8_t GetConfigurationChangeCount(void) const
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:244
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
Time GetLostUlMapInterval(void) const
returns the time since last received UL-MAP before uplink synchronization is considered lost ...
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:321
void SetScheduler(Ptr< SSScheduler > ssScheduler)
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
Definition: event-id.cc:65
void SetMaxUcdInterval(Time maxUcdInterval)
Ptr< ConnectionManager > GetConnectionManager(void) const
Time GetIntervalT12(void) const
returns the wait for UCD descriptor timeout
Ptr< IpcsClassifier > GetIpcsClassifier() const
uint8_t GetType(void) const
Definition: mac-messages.cc:56
TracedCallback< Ptr< const Packet > > m_ssPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
uint8_t GetDcdCount(void) const
Ptr< SSScheduler > m_scheduler
void ProcessUlMap(const UlMap &ulmap)
Ptr< WimaxConnection > GetConnection(void) const
uint16_t GetRangReqOppSize(void) const
void SetDiuc(uint8_t diuc)
this class implements the Generic mac Header as described by IEEE Standard for Local and metropolitan...
uint8_t GetType(void) const
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:446
Ptr< SSScheduler > GetScheduler(void) const
uint8_t GetFc(void) const
void SetNrUlBurstProfiles(uint8_t nrUlBurstProfiles)
void DoReceive(Ptr< Packet > packet)
TracedCallback< Ptr< const Packet > > m_ssRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:341
void AddAtEnd(Ptr< const Packet > packet)
Concatenate the input packet at the end of the current packet.
Definition: packet.cc:313
void SetNrDlBurstProfiles(uint8_t nrDlBurstProfiles)
uint32_t GetSerializedSize(void) const
tuple phy
Definition: third.py:86
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:220
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Definition: simulator.h:1238
void SetIntervalT20(Time interval20)
void SetMaxContentionRangingRetries(uint8_t maxContentionRangingRetries)
Cid GetCid(void) const
void SetCurrentDcd(Dcd dcd)
AttributeValue implementation for Time.
Definition: nstime.h:957
void SetIntervalT12(Time interval12)
void SetFecCodeType(uint8_t fecCodeType)
bool DoSend(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest, uint16_t protocolNumber)
Hold an unsigned integer type.
Definition: uinteger.h:44
OfdmUcdChannelEncodings GetChannelEncodings(void) const
bool Enqueue(Ptr< Packet > packet, const MacHeaderType &hdrType, Ptr< WimaxConnection > connection)
Enqueue a packet into a connection queue.
void SetUiuc(uint8_t uiuc)
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 ...
Time GetTimeToAllocation(Time defferTime)
Introspection did not find any typical Config paths.
uint8_t GetRangingBackoffStart(void) const
Ptr< SsServiceFlowManager > m_serviceFlowManager
uint8_t GetFecCodeType(void) const
Introspection did not find any typical Config paths.
uint8_t GetHt(void) const
std::list< OfdmUlMapIe > GetUlMapElements(void) const
Ptr< WimaxConnection > GetInitialRangingConnection(void) const
Ptr< BandwidthManager > GetBandwidthManager(void) const
Ptr< SSLinkManager > GetLinkManager(void) const
TracedCallback< Ptr< const Packet > > m_ssTxTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition...
uint8_t GetUiuc(void) const
Introspection did not find any typical Config paths.
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.
Mac48Address GetMacAddress(void) const
Represents the HT (Header Type) field of generic MAC and bandwidth request headers.
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 ...
virtual void DoDispose(void)
Destructor implementation.
#define list
void UpdatePktsRcvd(uint32_t pktsRcvd)
update the number of received packets by adding pktsRcvd
uint8_t GetUiuc(void) const
uint16_t GetEirxPIrMax(void) const
Hold together all Wimax-related objects in a NetDevice.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t GetDuration(void) const
Hold objects of type Ptr.
Definition: pointer.h:36
uint16_t GetBsEirp(void) const
static TypeId GetTypeId(void)
Definition: cid.h:35
void DoDispose(void)
Destructor implementation.
WimaxPhy::ModulationType GetModulationType(void) const
returns the most efficient modulation and coding scheme (MCS) supported by the device ...
uint32_t GetPktsRcvd(void) const
uint8_t GetUcdCount(void) const
Ucd GetCurrentUcd(void) const
an EUI-48 address
Definition: mac48-address.h:43
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:39
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
Definition: simulator.h:1401
std::list< Ptr< const Packet > > FragmentsQueue
Ptr< SSLinkManager > m_linkManager
void SetBasicConnection(Ptr< WimaxConnection > basicConnection)
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:958
TracedCallback< Ptr< const Packet >, Mac48Address, const Cid & > m_traceSSRx
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:224
void SetPhy(Ptr< WimaxPhy > phy)
Mac48Address GetBaseStationId(void) const
ServiceFlowRecord * GetRecord(void) const
Ptr< WimaxConnection > GetBasicConnection(void) const
void SetAreServiceFlowsAllocated(bool areServiceFlowsAllocated)
this class implements the fragmentation sub-header as described by IEEE Standard for Local and metrop...
#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:90
void NotifyPromiscTrace(Ptr< Packet > p)
Ptr< BurstProfileManager > GetBurstProfileManager(void) const
Time GetIntervalT21(void) const
returns the time the SS searches for (decodable) DL-MAP on a given channel
void SetLinkManager(Ptr< SSLinkManager >)
sets the link manager to be used
An identifier for simulation events.
Definition: event-id.h:53
std::vector< OfdmDlBurstProfile > GetDlBurstProfiles(void) const
std::vector< OfdmUlBurstProfile > GetUlBurstProfiles(void) const
void SetCurrentUcd(Ucd ucd)
Time GetIntervalT1(void) const
returns the wait for DCD timeout
Introspection did not find any typical Config paths.
void ForwardDown(Ptr< PacketBurst > burst, WimaxPhy::ModulationType modulationType)
Ptr< WimaxPhy > GetPhy(void) const
Time GetMaxDcdInterval(void) const
returns the maximum time between transmission of DCD messages
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:236
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:895
void SetIntervalT7(Time interval7)
uint8_t GetType(void) const
void CreateDefaultConnections(void)
Creates the initial ranging and broadcast connections.
uint32_t GetAllocationStartTime(void) const
uint32_t GetBytesSent(void) const
OfdmDlBurstProfile * m_dlBurstProfile
Time GetLostDlMapInterval(void) const
Time GetIntervalT20(void) const
returns the Time the SS searches for preambles on a given channel
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:911
void SetState(uint8_t state)
void SetServiceFlowManager(Ptr< SsServiceFlowManager >)
Sets the service flow manager to be installed on the device.
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:220
uint8_t GetDiuc(void) const
Ptr< IpcsClassifier > m_classifier
void InitSubscriberStationNetDevice(void)
initializes the net device and sets the parameters to the default values
bool check_hcs(void) const
WimaxPhy::ModulationType m_modulationType
void UpdateBytesSent(uint32_t bytesSent)
update the number of sent bytes by adding bytesSent
virtual void SetNode(Ptr< Node > node)
OfdmUlBurstProfile * m_ulBurstProfile
void SetIpcsPacketClassifier(Ptr< IpcsClassifier >)
Sets the packet classifier to be used.
Ptr< SsServiceFlowManager > GetServiceFlowManager(void) const
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
void AddServiceFlow(ServiceFlow *sf)
adds a new service flow
a unique identifier for an interface.
Definition: type-id.h:58
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:904
static Time m_frameStartTime
uint16_t GetStartTime(void) const
void SetPrimaryConnection(Ptr< WimaxConnection > primaryConnection)
uint8_t GetMaxContentionRangingRetries(void) const
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:257
uint8_t GetState(void) const
void SetFecCodeType(uint8_t fecCodeType)
Ptr< WimaxConnection > GetPrimaryConnection(void) const
returns the primary connection currently usde
void SetLen(uint16_t len)
HeaderType
this class implements the mac header type field.
uint16_t GetCid(void) const
bool GetAreServiceFlowsAllocated(void) const
void UpdatePktsSent(uint32_t pktsSent)
update the number of sent packets by adding pktsSent
Time GetIntervalT3(void) const
returns the ranging Response reception timeout following the transmission of a ranging request ...
uint32_t GetPktsSent(void) const
void UpdateBytesRcvd(uint32_t bytesRcvd)
update the number of received bytes by adding bytesRcvd