A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ul-job.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Juliana Freitag Borin, Flavio Kubota and Nelson L.
19  * S. da Fonseca - wimaxgroup@lrc.ic.unicamp.br
20  */
21 
22 #include <stdint.h>
23 #include "ul-job.h"
24 
25 namespace ns3 {
26 
27 UlJob::UlJob (void) : m_deadline (Seconds (0)), m_size (0)
28 {
29 }
30 
32 {
33 }
34 
35 SSRecord*
37 {
38  return m_ssRecord;
39 }
40 void
42 {
43  m_ssRecord = ssRecord;
44 }
45 
46 enum
48 {
49  return m_schedulingType;
50 }
51 
52 void
54 {
55  m_schedulingType = schedulingType;
56 }
57 
58 ReqType
60 {
61  return m_type;
62 }
63 
64 void
66 {
67  m_type = type;
68 }
69 
72 {
73  return m_serviceFlow;
74 }
75 
76 void
78 {
79  m_serviceFlow = serviceFlow;
80 }
81 
82 Time
84 {
85  return m_releaseTime;
86 }
87 
88 void
90 {
91  m_releaseTime = releaseTime;
92 }
93 
94 Time
96 {
97  return m_period;
98 }
99 void
101 {
102  m_period = period;
103 }
104 
105 Time
107 {
108  return m_deadline;
109 }
110 void
112 {
113  m_deadline = deadline;
114 }
115 
116 uint32_t
118 {
119  return m_size;
120 }
121 
122 void
123 UlJob::SetSize (uint32_t size)
124 {
125  m_size = size;
126 }
127 
128 bool operator == (const UlJob &a, const UlJob &b)
129 {
130  UlJob A = a;
131  UlJob B = b;
132 
133  if ((A.GetServiceFlow () == B.GetServiceFlow ()) && (A.GetSsRecord () == B.GetSsRecord ()))
134  {
135  return true;
136  }
137  return false;
138 }
139 
141 {
142 }
143 
144 int
146 {
147  return m_priority;
148 }
149 
150 void
152 {
153  m_priority = priority;
154 }
155 
158 {
159  return m_job;
160 }
161 void
163 {
164  m_job = job;
165 }
166 
167 } // namespace ns3
ReqType GetType(void)
Definition: ul-job.cc:59
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
Time GetPeriod(void)
Definition: ul-job.cc:95
ReqType
Definition: ul-job.h:36
void SetDeadline(Time deadline)
Definition: ul-job.cc:111
virtual ~UlJob(void)
Definition: ul-job.cc:31
Time m_releaseTime
Definition: ul-job.h:81
void SetSize(uint32_t size)
Definition: ul-job.cc:123
this class implements a structure to compute the priority of service flows
Definition: ul-job.h:45
UlJob(void)
Definition: ul-job.cc:27
Ptr< UlJob > GetUlJob(void)
Definition: ul-job.cc:157
SSRecord * m_ssRecord
Definition: ul-job.h:93
Time GetDeadline(void)
Definition: ul-job.cc:106
void SetReleaseTime(Time releaseTime)
Definition: ul-job.cc:89
void SetPeriod(Time period)
Definition: ul-job.cc:100
enum ServiceFlow::SchedulingType m_schedulingType
Definition: ul-job.h:85
Time GetReleaseTime(void)
Definition: ul-job.cc:83
Time m_deadline
Definition: ul-job.h:83
void SetSsRecord(SSRecord *ssRecord)
Definition: ul-job.cc:41
void SetPriority(int priority)
Definition: ul-job.cc:151
SSRecord * GetSsRecord(void)
Definition: ul-job.cc:36
void SetServiceFlow(ServiceFlow *serviceFlow)
Definition: ul-job.cc:77
ReqType m_type
Definition: ul-job.h:95
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:39
void SetUlJob(Ptr< UlJob > job)
Definition: ul-job.cc:162
Time m_period
Definition: ul-job.h:82
uint32_t m_size
Definition: ul-job.h:84
void SetSchedulingType(ServiceFlow::SchedulingType schedulingType)
Definition: ul-job.cc:53
bool operator==(const EventId &a, const EventId &b)
Definition: event-id.cc:89
ServiceFlow * GetServiceFlow(void)
Definition: ul-job.cc:71
PriorityUlJob()
this class implements an auxiliar struct to compute the priority of the rtPS and nrtPS in the interme...
Definition: ul-job.cc:140
ServiceFlow * m_serviceFlow
Definition: ul-job.h:96
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:43
int GetPriority(void)
Definition: ul-job.cc:145
enum ServiceFlow::SchedulingType GetSchedulingType(void)
Definition: ul-job.cc:47
uint32_t GetSize(void)
Definition: ul-job.cc:117
Ptr< UlJob > m_job
Definition: ul-job.h:119
void SetType(ReqType type)
Definition: ul-job.cc:65