A Discrete-Event Network Simulator
API
ul-job.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c)
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  * Author: Juliana Freitag Borin, Flavio Kubota and Nelson L.
18  * S. da Fonseca - wimaxgroup@lrc.ic.unicamp.br
19  */
20 
21 #include "ul-job.h"
22 
23 #include <stdint.h>
24 
25 namespace ns3
26 {
27 
29  : m_deadline(Seconds(0)),
30  m_size(0)
31 {
32 }
33 
35 {
36 }
37 
38 SSRecord*
40 {
41  return m_ssRecord;
42 }
43 
44 void
46 {
47  m_ssRecord = ssRecord;
48 }
49 
52 {
53  return m_schedulingType;
54 }
55 
56 void
58 {
59  m_schedulingType = schedulingType;
60 }
61 
62 ReqType
64 {
65  return m_type;
66 }
67 
68 void
70 {
71  m_type = type;
72 }
73 
76 {
77  return m_serviceFlow;
78 }
79 
80 void
82 {
83  m_serviceFlow = serviceFlow;
84 }
85 
86 Time
88 {
89  return m_releaseTime;
90 }
91 
92 void
94 {
95  m_releaseTime = releaseTime;
96 }
97 
98 Time
100 {
101  return m_period;
102 }
103 
104 void
106 {
107  m_period = period;
108 }
109 
110 Time
112 {
113  return m_deadline;
114 }
115 
116 void
118 {
119  m_deadline = deadline;
120 }
121 
122 uint32_t
124 {
125  return m_size;
126 }
127 
128 void
129 UlJob::SetSize(uint32_t size)
130 {
131  m_size = size;
132 }
133 
140 bool
141 operator==(const UlJob& a, const UlJob& b)
142 {
143  return a.GetServiceFlow() == b.GetServiceFlow() && a.GetSsRecord() == b.GetSsRecord();
144 }
145 
147 {
148 }
149 
150 int
152 {
153  return m_priority;
154 }
155 
156 void
158 {
159  m_priority = priority;
160 }
161 
164 {
165  return m_job;
166 }
167 
168 void
170 {
171  m_job = job;
172 }
173 
174 } // namespace ns3
void SetUlJob(Ptr< UlJob > job)
Set UL job.
Definition: ul-job.cc:169
Ptr< UlJob > GetUlJob() const
Get UL job function.
Definition: ul-job.cc:163
void SetPriority(int priority)
Set priority.
Definition: ul-job.cc:157
int GetPriority() const
Get priority.
Definition: ul-job.cc:151
PriorityUlJob()
this class implements an auxiliary struct to compute the priority of the rtPS and nrtPS in the interm...
Definition: ul-job.cc:146
Ptr< UlJob > m_job
the job
Definition: ul-job.h:199
int m_priority
the priority
Definition: ul-job.h:198
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:46
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:43
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:62
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
this class implements a structure to compute the priority of service flows
Definition: ul-job.h:50
void SetSize(uint32_t size)
Set size.
Definition: ul-job.cc:129
SSRecord * GetSsRecord() const
Get SS record.
Definition: ul-job.cc:39
void SetServiceFlow(ServiceFlow *serviceFlow)
Set service flow.
Definition: ul-job.cc:81
void SetSsRecord(SSRecord *ssRecord)
Set SS record.
Definition: ul-job.cc:45
ServiceFlow * m_serviceFlow
service flow
Definition: ul-job.h:161
ServiceFlow::SchedulingType GetSchedulingType() const
Get scheduling type.
Definition: ul-job.cc:51
ReqType m_type
Type of request, DATA or Unicast req slots.
Definition: ul-job.h:160
SSRecord * m_ssRecord
Pointer to SSRecord.
Definition: ul-job.h:158
uint32_t m_size
Number of minislots requested.
Definition: ul-job.h:155
void SetReleaseTime(Time releaseTime)
Set release time.
Definition: ul-job.cc:93
Time GetReleaseTime() const
Get release time.
Definition: ul-job.cc:87
Time m_deadline
Request should be satisfied by this time.
Definition: ul-job.h:154
void SetSchedulingType(ServiceFlow::SchedulingType schedulingType)
Set scheduling type.
Definition: ul-job.cc:57
uint32_t GetSize() const
Get size.
Definition: ul-job.cc:123
void SetType(ReqType type)
Set type.
Definition: ul-job.cc:69
void SetPeriod(Time period)
Set period.
Definition: ul-job.cc:105
Time m_releaseTime
The time after which the job can be processed.
Definition: ul-job.h:152
Time GetDeadline() const
Get deadline.
Definition: ul-job.cc:111
Time GetPeriod() const
Get period.
Definition: ul-job.cc:99
ServiceFlow * GetServiceFlow() const
Get service flow.
Definition: ul-job.cc:75
ReqType GetType() const
Get type.
Definition: ul-job.cc:63
ServiceFlow::SchedulingType m_schedulingType
Scheduling type of flow.
Definition: ul-job.h:156
~UlJob() override
Definition: ul-job.cc:34
Time m_period
For periodic jobs.
Definition: ul-job.h:153
void SetDeadline(Time deadline)
Set deadline.
Definition: ul-job.cc:117
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1326
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator==(const EventId &a, const EventId &b)
Definition: event-id.h:157
ReqType
Request type enumeration.
Definition: ul-job.h:40