A Discrete-Event Network Simulator
API
service-flow.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007,2008,2009 INRIA, UDcast
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19  * <amine.ismail@UDcast.com>
20  */
21 
22 #include "service-flow.h"
23 
24 #include "service-flow-record.h"
25 #include "wimax-tlv.h"
26 
27 #include "ns3/simulator.h"
28 
29 namespace ns3
30 {
31 
33 {
34  InitValues();
35  m_direction = direction;
38  m_sfid = 0;
39  m_connection = nullptr;
40  m_isEnabled = false;
41  m_isMulticast = false;
43 }
44 
46  : m_sfid(0),
47  m_direction(SF_DIRECTION_DOWN),
48  m_type(SF_TYPE_PROVISIONED),
49  m_connection(nullptr),
50  m_isEnabled(false),
51  m_record(new ServiceFlowRecord())
52 {
53  InitValues();
54  m_isMulticast = false;
56 }
57 
58 ServiceFlow::ServiceFlow(uint32_t sfid, Direction direction, Ptr<WimaxConnection> connection)
59 {
60  InitValues();
62  m_isEnabled = false;
63  m_connection = connection;
64  m_connection->SetServiceFlow(this);
66  m_direction = direction;
67  m_sfid = sfid;
68  m_isMulticast = false;
70 }
71 
73 {
74  InitValues();
75  m_connection = nullptr;
76  m_isEnabled = false;
80  "Invalid TLV");
81 
82  SfVectorTlvValue* param;
83  param = (SfVectorTlvValue*)(tlv.PeekValue());
84 
85  if (tlv.GetType() == Tlv::UPLINK_SERVICE_FLOW)
86  {
88  }
89  else
90  {
92  }
93 
94  for (auto iter = param->Begin(); iter != param->End(); ++iter)
95  {
96  switch ((*iter)->GetType())
97  {
99  m_sfid = ((U32TlvValue*)((*iter)->PeekValue()))->GetValue();
100  break;
101  }
102  case SfVectorTlvValue::CID: {
103  uint16_t cid = ((U16TlvValue*)((*iter)->PeekValue()))->GetValue();
104  m_connection = CreateObject<WimaxConnection>(cid, Cid::TRANSPORT);
105  break;
106  }
108  m_qosParamSetType = ((U8TlvValue*)((*iter)->PeekValue()))->GetValue();
109  break;
110  }
112  m_trafficPriority = ((U8TlvValue*)((*iter)->PeekValue()))->GetValue();
113  break;
114  }
116  m_maxSustainedTrafficRate = ((U32TlvValue*)((*iter)->PeekValue()))->GetValue();
117  break;
118  }
120  m_maxTrafficBurst = ((U32TlvValue*)((*iter)->PeekValue()))->GetValue();
121  break;
122  }
124  m_minReservedTrafficRate = ((U32TlvValue*)((*iter)->PeekValue()))->GetValue();
125  break;
126  }
128  m_minTolerableTrafficRate = ((U32TlvValue*)((*iter)->PeekValue()))->GetValue();
129  break;
130  }
133  (ServiceFlow::SchedulingType)((U8TlvValue*)((*iter)->PeekValue()))->GetValue();
134  break;
135  }
137  m_requestTransmissionPolicy = ((U32TlvValue*)((*iter)->PeekValue()))->GetValue();
138  break;
139  }
141  m_toleratedJitter = ((U32TlvValue*)((*iter)->PeekValue()))->GetValue();
142  break;
143  }
145  m_maximumLatency = ((U32TlvValue*)((*iter)->PeekValue()))->GetValue();
146  break;
147  }
149  m_fixedversusVariableSduIndicator = ((U8TlvValue*)((*iter)->PeekValue()))->GetValue();
150  break;
151  }
154  (CsSpecification)(((U8TlvValue*)((*iter)->PeekValue()))->GetValue());
155  break;
156  }
157 
160  break;
161  }
162  }
163  }
164  m_isMulticast = false;
166 }
167 
169 {
170  if (m_record != nullptr)
171  {
172  delete m_record;
173  m_record = nullptr;
174  }
175  m_connection = nullptr;
176 }
177 
178 void
180 {
181  m_direction = direction;
182 }
183 
186 {
187  return m_direction;
188 }
189 
190 void
192 {
193  m_type = type;
194 }
195 
198 {
199  return m_type;
200 }
201 
202 void
204 {
205  m_connection = connection;
206  m_connection->SetServiceFlow(this);
207 }
208 
211 {
212  return m_connection;
213 }
214 
215 void
217 {
218  m_isEnabled = isEnabled;
219 }
220 
221 bool
223 {
224  return m_isEnabled;
225 }
226 
227 void
229 {
230  m_record = record;
231 }
232 
235 {
236  return m_record;
237 }
238 
241 {
242  if (!m_connection)
243  {
244  return nullptr;
245  }
246  return m_connection->GetQueue();
247 }
248 
251 {
252  return m_schedulingType;
253 }
254 
255 bool
257 {
258  if (!m_connection)
259  {
260  return false;
261  }
262  return m_connection->HasPackets();
263 }
264 
265 bool
267 {
268  if (!m_connection)
269  {
270  return false;
271  }
272  return m_connection->HasPackets(packetType);
273 }
274 
275 void
277 {
278  GenericMacHeader hdr;
279  Time timeStamp;
280  Ptr<Packet> packet;
281  Time currentTime = Simulator::Now();
282  if (m_connection)
283  {
284  while (m_connection->HasPackets())
285  {
286  packet = m_connection->GetQueue()->Peek(hdr, timeStamp);
287 
288  if (currentTime - timeStamp > MilliSeconds(GetMaximumLatency()))
289  {
290  m_connection->Dequeue();
291  }
292  else
293  {
294  break;
295  }
296  }
297  }
298 }
299 
300 void
302 {
303 }
304 
305 // ==============================================================================
306 
307 uint32_t
309 {
310  return m_sfid;
311 }
312 
313 uint16_t
315 {
316  if (!m_connection)
317  {
318  return 0;
319  }
320  return m_connection->GetCid().GetIdentifier();
321 }
322 
323 std::string
325 {
326  return m_serviceClassName;
327 }
328 
329 uint8_t
331 {
332  return m_qosParamSetType;
333 }
334 
335 uint8_t
337 {
338  return m_trafficPriority;
339 }
340 
341 uint32_t
343 {
345 }
346 
347 uint32_t
349 {
350  return m_maxTrafficBurst;
351 }
352 
353 uint32_t
355 {
357 }
358 
359 uint32_t
361 {
363 }
364 
367 {
368  return m_schedulingType;
369 }
370 
371 uint32_t
373 {
375 }
376 
377 uint32_t
379 {
380  return m_toleratedJitter;
381 }
382 
383 uint32_t
385 {
386  return m_maximumLatency;
387 }
388 
389 uint8_t
391 {
393 }
394 
395 uint8_t
397 {
398  return m_sduSize;
399 }
400 
401 uint16_t
403 {
404  return m_targetSAID;
405 }
406 
407 uint8_t
409 {
410  return m_arqEnable;
411 }
412 
413 uint16_t
415 {
416  return m_arqWindowSize;
417 }
418 
419 uint16_t
421 {
422  return m_arqRetryTimeoutTx;
423 }
424 
425 uint16_t
427 {
428  return m_arqRetryTimeoutRx;
429 }
430 
431 uint16_t
433 {
434  return m_arqBlockLifeTime;
435 }
436 
437 uint16_t
439 {
440  return m_arqSyncLoss;
441 }
442 
443 uint8_t
445 {
446  return m_arqDeliverInOrder;
447 }
448 
449 uint16_t
451 {
452  return m_arqPurgeTimeout;
453 }
454 
455 uint16_t
457 {
458  return m_arqBlockSize;
459 }
460 
463 {
464  return m_csSpecification;
465 }
466 
469 {
471 }
472 
473 uint16_t
475 {
477 }
478 
479 uint16_t
481 {
483 }
484 
485 bool
487 {
488  return m_isMulticast;
489 }
490 
493 {
494  return m_modulationType;
495 }
496 
497 // ==============================================================================
498 
499 void
500 ServiceFlow::SetSfid(uint32_t sfid)
501 {
502  m_sfid = sfid;
503 }
504 
505 void
507 {
508  m_serviceClassName = name;
509 }
510 
511 void
513 {
515 }
516 
517 void
519 {
520  m_trafficPriority = priority;
521 }
522 
523 void
524 ServiceFlow::SetMaxSustainedTrafficRate(uint32_t maxSustainedRate)
525 {
526  m_maxSustainedTrafficRate = maxSustainedRate;
527 }
528 
529 void
530 ServiceFlow::SetMaxTrafficBurst(uint32_t maxTrafficBurst)
531 {
532  m_maxTrafficBurst = maxTrafficBurst;
533 }
534 
535 void
537 {
538  m_minReservedTrafficRate = minResvRate;
539 }
540 
541 void
543 {
544  m_minTolerableTrafficRate = minJitter;
545 }
546 
547 void
549 {
550  m_schedulingType = schedType;
551 }
552 
553 void
555 {
557 }
558 
559 void
561 {
562  m_toleratedJitter = jitter;
563 }
564 
565 void
566 ServiceFlow::SetMaximumLatency(uint32_t MaximumLatency)
567 {
568  m_maximumLatency = MaximumLatency;
569 }
570 
571 void
573 {
574  m_fixedversusVariableSduIndicator = sduIndicator;
575 }
576 
577 void
578 ServiceFlow::SetSduSize(uint8_t sduSize)
579 {
580  m_sduSize = sduSize;
581 }
582 
583 void
584 ServiceFlow::SetTargetSAID(uint16_t targetSaid)
585 {
586  m_targetSAID = targetSaid;
587 }
588 
589 void
590 ServiceFlow::SetArqEnable(uint8_t arqEnable)
591 {
592  m_arqEnable = arqEnable;
593 }
594 
595 void
596 ServiceFlow::SetArqWindowSize(uint16_t arqWindowSize)
597 {
598  m_arqWindowSize = arqWindowSize;
599 }
600 
601 void
603 {
605 }
606 
607 void
609 {
611 }
612 
613 void
615 {
616  m_arqBlockLifeTime = lifeTime;
617 }
618 
619 void
620 ServiceFlow::SetArqSyncLoss(uint16_t syncLoss)
621 {
622  m_arqSyncLoss = syncLoss;
623 }
624 
625 void
627 {
628  m_arqDeliverInOrder = inOrder;
629 }
630 
631 void
633 {
635 }
636 
637 void
639 {
640  m_arqBlockSize = size;
641 }
642 
643 void
645 {
646  m_csSpecification = spec;
647 }
648 
649 void
651 {
652  m_convergenceSublayerParam = csparam;
653 }
654 
655 void
656 ServiceFlow::SetUnsolicitedGrantInterval(uint16_t unsolicitedGrantInterval)
657 {
658  m_unsolicitedGrantInterval = unsolicitedGrantInterval;
659 }
660 
661 void
662 ServiceFlow::SetUnsolicitedPollingInterval(uint16_t unsolicitedPollingInterval)
663 {
664  m_unsolicitedPollingInterval = unsolicitedPollingInterval;
665 }
666 
667 void
669 {
670  m_isMulticast = isMulticast;
671 }
672 
673 void
675 {
676  m_modulationType = modulationType;
677 }
678 
679 void
681 {
682  m_sfid = 0;
683  m_serviceClassName = "";
684  m_qosParamSetType = 0;
685  m_trafficPriority = 0;
687  m_maxTrafficBurst = 0;
692  m_toleratedJitter = 0;
693  m_maximumLatency = 0;
695  m_sduSize = 0;
696  m_targetSAID = 0;
697  m_arqEnable = 0;
698  m_arqWindowSize = 0;
704  m_arqBlockLifeTime = 0;
705  m_arqSyncLoss = 0;
707  m_arqPurgeTimeout = 0;
708  m_arqBlockSize = 0;
711  m_isMulticast = false;
713 }
714 
715 void
717 {
730  m_sduSize = sf.GetSduSize();
732  m_arqEnable = sf.GetArqEnable();
740  m_direction = sf.GetDirection();
743 }
744 
746 {
747  m_sfid = sf.GetSfid();
760  m_sduSize = sf.GetSduSize();
762  m_arqEnable = sf.GetArqEnable();
770  m_direction = sf.GetDirection();
771  m_type = sf.GetType();
773  m_isEnabled = sf.GetIsEnabled();
774  m_record = new ServiceFlowRecord();
775  (*m_record) = (*sf.GetRecord());
778 }
779 
782 {
783  m_sfid = o.GetSfid();
796  m_sduSize = o.GetSduSize();
807  m_type = o.GetType();
812  if (m_record != nullptr)
813  {
814  delete m_record;
815  }
816 
817  m_record = new ServiceFlowRecord();
818 
819  (*m_record) = (*o.GetRecord());
820  return *this;
821 }
822 
823 char*
825 {
826  switch (m_schedulingType)
827  {
828  case SF_TYPE_UGS:
829  return (char*)"UGS";
830  case SF_TYPE_RTPS:
831  return (char*)"rtPS";
832  case SF_TYPE_NRTPS:
833  return (char*)"nrtPS";
834  case SF_TYPE_BE:
835  return (char*)"BE";
836  default:
837  NS_FATAL_ERROR("Invalid scheduling type");
838  }
839  return nullptr;
840 }
841 
842 Tlv
844 {
845  SfVectorTlvValue tmpSfVector;
846  tmpSfVector.Add(Tlv(SfVectorTlvValue::SFID, 4, U32TlvValue(m_sfid)));
847  tmpSfVector.Add(Tlv(SfVectorTlvValue::CID, 2, U16TlvValue(GetCid())));
848  tmpSfVector.Add(
852  4,
854  tmpSfVector.Add(
857  4,
860  4,
862  tmpSfVector.Add(
865  4,
870  1,
875  tmpSfVector.Add(m_convergenceSublayerParam.ToTlv());
877  {
878  return Tlv(Tlv::UPLINK_SERVICE_FLOW, tmpSfVector.GetSerializedSize(), tmpSfVector);
879  }
880  else
881  {
882  return Tlv(Tlv::DOWNLINK_SERVICE_FLOW, tmpSfVector.GetSerializedSize(), tmpSfVector);
883  }
884 }
885 
886 bool
888  Ipv4Address dstAddress,
889  uint16_t srcPort,
890  uint16_t dstPort,
891  uint8_t proto) const
892 {
894  dstAddress,
895  srcPort,
896  dstPort,
897  proto);
898 }
899 } // namespace ns3
@ TRANSPORT
Definition: cid.h:46
CsParameters class.
Definition: cs-parameters.h:36
Tlv ToTlv() const
creates a tlv from the classifier record
IpcsClassifierRecord GetPacketClassifierRule() const
This class implements the Generic mac Header as described by IEEE Standard for Local and metropolitan...
bool CheckMatch(Ipv4Address srcAddress, Ipv4Address dstAddress, uint16_t srcPort, uint16_t dstPort, uint8_t proto) const
check if a packets can be used with this classifier
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
HeaderType
Header type enumeration.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:43
uint16_t m_targetSAID
target SAID
Definition: service-flow.h:584
uint32_t m_requestTransmissionPolicy
request transmission policy
Definition: service-flow.h:579
uint16_t GetArqSyncLoss() const
Get ARQ sync loss.
void SetTargetSAID(uint16_t targetSaid)
Set target SAID.
void SetRequestTransmissionPolicy(uint32_t policy)
Set request transmission policy.
void SetDirection(Direction direction)
Set direction.
uint16_t m_arqBlockSize
ARQ block size.
Definition: service-flow.h:593
void SetSfid(uint32_t sfid)
Set SFID.
void SetCsSpecification(CsSpecification spec)
Set CS specification.
uint16_t GetTargetSAID() const
Get target SAID.
ServiceFlow & operator=(const ServiceFlow &o)
assignment operator
std::string m_serviceClassName
service class name
Definition: service-flow.h:571
uint32_t GetRequestTransmissionPolicy() const
Get request transmission policy.
uint32_t m_toleratedJitter
tolerated jitter
Definition: service-flow.h:580
ServiceFlow::SchedulingType GetServiceSchedulingType() const
Get service scheduling type.
uint16_t GetArqWindowSize() const
Get ARQ retry timeout transmit.
uint32_t GetMaxSustainedTrafficRate() const
Get max sustained traffic rate.
void SetArqEnable(uint8_t arqEnable)
Set ARQ enable.
void SetArqBlockSize(uint16_t size)
Set ARQ block size.
uint32_t GetMaxTrafficBurst() const
Get max traffic burst.
void SetServiceClassName(std::string name)
Set service class name.
uint32_t GetSfid() const
Get SFID.
uint32_t m_maximumLatency
maximum latency
Definition: service-flow.h:581
uint32_t m_minTolerableTrafficRate
minimum tolerable traffic rate
Definition: service-flow.h:577
uint32_t GetMaximumLatency() const
Get maximum latency.
uint8_t GetFixedversusVariableSduIndicator() const
Get fixed versus variable SDU indicator.
void PrintQoSParameters() const
Print QoS parameters.
uint16_t m_arqBlockLifeTime
ARQ block life time.
Definition: service-flow.h:589
ServiceFlow::SchedulingType GetSchedulingType() const
Get scheduling type.
~ServiceFlow()
Destructor.
uint16_t m_unsolicitedGrantInterval
unsolicited grant interval
Definition: service-flow.h:596
uint16_t GetUnsolicitedPollingInterval() const
Get unsolicited polling interval.
CsParameters m_convergenceSublayerParam
convergence sublayer parameters
Definition: service-flow.h:595
bool m_isEnabled
is enabled?
Definition: service-flow.h:601
std::string GetServiceClassName() const
Get service class name.
uint16_t m_arqRetryTimeoutTx
ARQ retry timeout transmit.
Definition: service-flow.h:587
uint8_t m_trafficPriority
traffic priority
Definition: service-flow.h:573
uint32_t m_minReservedTrafficRate
minimum reserved traffic rate
Definition: service-flow.h:576
Ptr< WimaxConnection > m_connection
connection
Definition: service-flow.h:600
void SetMaxTrafficBurst(uint32_t maxTrafficBurst)
Set maximum traffic burst.
void SetArqSyncLoss(uint16_t syncLoss)
Set ARQ sync loss.
void SetServiceSchedulingType(ServiceFlow::SchedulingType schedType)
Set service scheduling type.
Tlv ToTlv() const
creates a TLV from this service flow
uint8_t GetQosParamSetType() const
Get QOS parameter set type.
uint32_t m_maxSustainedTrafficRate
maximum sustained traffic rate
Definition: service-flow.h:574
void SetMaximumLatency(uint32_t MaximumLatency)
Set maximum latency.
uint8_t m_arqDeliverInOrder
ARQ deliver in order.
Definition: service-flow.h:591
void SetModulation(WimaxPhy::ModulationType modulationType)
Set modulation.
uint16_t GetArqRetryTimeoutRx() const
Get ARQ retry timeout receive.
void InitValues()
Initialize values.
void SetQosParamSetType(uint8_t type)
Set QOS parameter set type.
uint32_t m_maxTrafficBurst
maximum traffic burst
Definition: service-flow.h:575
uint16_t m_unsolicitedPollingInterval
unsolicited polling interval
Definition: service-flow.h:597
uint8_t m_qosParamSetType
QOS parameter type.
Definition: service-flow.h:572
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:62
ServiceFlow()
Default constructor.
Definition: service-flow.cc:45
uint16_t m_arqSyncLoss
ARQ sync loss.
Definition: service-flow.h:590
void SetArqWindowSize(uint16_t arqWindowSize)
Set ARQ retry timeout transmit.
void SetConvergenceSublayerParam(CsParameters csparam)
Set convergence sublayer parameters.
void SetSduSize(uint8_t sduSize)
Set SDU size.
void SetRecord(ServiceFlowRecord *record)
Set service flow record.
char * GetSchedulingTypeStr() const
Get scheduling type string.
uint8_t GetTrafficPriority() const
Get traffic priority.
bool m_isMulticast
is multicast?
Definition: service-flow.h:602
uint8_t GetArqEnable() const
Get ARQ enable.
uint32_t GetMinReservedTrafficRate() const
Get minimum reserved traffic rate.
void SetArqPurgeTimeout(uint16_t timeout)
Set ARQ purge timeout.
uint16_t m_arqPurgeTimeout
ARQ purge timeout.
Definition: service-flow.h:592
Type
Type enumeration.
Definition: service-flow.h:54
uint16_t GetCid() const
Get CID.
bool GetIsEnabled() const
Get is enabled flag.
void SetTrafficPriority(uint8_t priority)
Set traffic priority.
ServiceFlowRecord * m_record
service flow record
Definition: service-flow.h:605
bool HasPackets() const
Check if packets are present.
uint8_t GetSduSize() const
Get SDU size.
void SetArqBlockLifeTime(uint16_t lifeTime)
Set ARQ block lifetime.
CsSpecification GetCsSpecification() const
Get CS specification.
void CopyParametersFrom(ServiceFlow sf)
Copy parameters from another service flow.
uint16_t GetArqRetryTimeoutTx() const
Get ARQ retry timeout transmit.
void SetMinTolerableTrafficRate(uint32_t minJitter)
Set minimum tolerable traffic rate.
uint16_t m_arqWindowSize
ARQ window size.
Definition: service-flow.h:586
void SetIsMulticast(bool isMulticast)
Set is multicast.
uint8_t GetArqDeliverInOrder() const
Get ARQ deliver in order.
void SetArqRetryTimeoutTx(uint16_t timeout)
Set ARQ retry timeout transmit.
ServiceFlow::SchedulingType m_schedulingType
scheduling type
Definition: service-flow.h:578
Type GetType() const
Get type of service flow.
uint8_t m_arqEnable
ARQ enable.
Definition: service-flow.h:585
uint8_t m_fixedversusVariableSduIndicator
fixed versus variable SDI indicator
Definition: service-flow.h:582
uint32_t GetMinTolerableTrafficRate() const
Get minimum tolerable traffic rate.
void SetToleratedJitter(uint32_t jitter)
Set tolerated jitter.
WimaxPhy::ModulationType GetModulation() const
Get modulation.
void SetUnsolicitedGrantInterval(uint16_t unsolicitedGrantInterval)
Set unsolicited grant interval.
ServiceFlowRecord * GetRecord() const
Get service flow record.
uint8_t m_sduSize
SDU size.
Definition: service-flow.h:583
void SetArqDeliverInOrder(uint8_t inOrder)
Set ARQ deliver in order.
uint16_t GetArqBlockLifeTime() const
Get ARQ block lifetime.
uint16_t m_arqRetryTimeoutRx
ARQ retry timeout receive.
Definition: service-flow.h:588
uint16_t GetArqBlockSize() const
Get ARQ block size.
void SetArqRetryTimeoutRx(uint16_t timeout)
Set ARQ retry timeout receive.
void SetUnsolicitedPollingInterval(uint16_t unsolicitedPollingInterval)
Set unsolicited polling interval.
void SetMinReservedTrafficRate(uint32_t minResvRate)
Set minimum reserved traffic rate.
void SetType(Type type)
Set type of service flow.
uint16_t GetArqPurgeTimeout() const
Get ARQ purge timeout.
bool GetIsMulticast() const
Get is multicast.
CsSpecification
section 11.13.19.2 CS parameter encoding rules, page 707
Definition: service-flow.h:74
bool CheckClassifierMatch(Ipv4Address srcAddress, Ipv4Address dstAddress, uint16_t srcPort, uint16_t dstPort, uint8_t proto) const
check classifier match.
CsSpecification m_csSpecification
CS specification.
Definition: service-flow.h:594
uint32_t GetToleratedJitter() const
Get tolerated jitter.
Direction
Direction enumeration.
Definition: service-flow.h:47
Ptr< WimaxMacQueue > GetQueue() const
Get pointer to queue.
uint16_t GetUnsolicitedGrantInterval() const
Get unsolicited grant interval.
uint32_t m_sfid
SFID.
Definition: service-flow.h:570
void SetFixedversusVariableSduIndicator(uint8_t sduIndicator)
Set fixed versus variable SDU indicator.
Direction GetDirection() const
Get direction.
Direction m_direction
direction
Definition: service-flow.h:598
CsParameters GetConvergenceSublayerParam() const
Get convergence sublayer.
void SetMaxSustainedTrafficRate(uint32_t maxSustainedRate)
Set max sustained traffic rate.
Ptr< WimaxConnection > GetConnection() const
Can return a null connection is this service flow has not been associated yet to a connection.
void CleanUpQueue()
Shall be called only by BS.
WimaxPhy::ModulationType m_modulationType
modulation type
Definition: service-flow.h:603
void SetConnection(Ptr< WimaxConnection > connection)
Set connection.
void SetIsEnabled(bool isEnabled)
Set is enabled flag.
this class implements a structure to manage some parameters and statistics related to a service flow
SfVectorTlvValue class.
Definition: wimax-tlv.h:337
@ Fixed_length_versus_Variable_length_SDU_Indicator
Definition: wimax-tlv.h:356
static Time Now()
Return the current simulation virtual time.
Definition: simulator.cc:208
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
This class implements the Type-Len-Value structure channel encodings as described by "IEEE Standard f...
Definition: wimax-tlv.h:87
uint8_t GetType() const
Get type value.
Definition: wimax-tlv.cc:211
TlvValue * PeekValue()
Peek value.
Definition: wimax-tlv.cc:223
@ UPLINK_SERVICE_FLOW
Definition: wimax-tlv.h:96
@ DOWNLINK_SERVICE_FLOW
Definition: wimax-tlv.h:95
U16TlvValue class.
Definition: wimax-tlv.h:215
U32TlvValue class.
Definition: wimax-tlv.h:255
U8TlvValue class.
Definition: wimax-tlv.h:175
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Definition: wimax-tlv.cc:251
Iterator End() const
End iterator.
Definition: wimax-tlv.cc:278
Iterator Begin() const
Begin iterator.
Definition: wimax-tlv.cc:272
void Add(const Tlv &val)
Add a TLV.
Definition: wimax-tlv.cc:284
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:54
@ MODULATION_TYPE_QPSK_12
Definition: wimax-phy.h:56
#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:86
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:179
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1338
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Time timeout