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
25namespace ns3
26{
27
29 : m_deadline(Seconds(0)),
30 m_size(0)
31{
32}
33
35{
36}
37
40{
41 return m_ssRecord;
42}
43
44void
46{
47 m_ssRecord = ssRecord;
48}
49
52{
53 return m_schedulingType;
54}
55
56void
58{
59 m_schedulingType = schedulingType;
60}
61
64{
65 return m_type;
66}
67
68void
70{
71 m_type = type;
72}
73
76{
77 return m_serviceFlow;
78}
79
80void
82{
83 m_serviceFlow = serviceFlow;
84}
85
86Time
88{
89 return m_releaseTime;
90}
91
92void
94{
95 m_releaseTime = releaseTime;
96}
97
98Time
100{
101 return m_period;
102}
103
104void
106{
107 m_period = period;
108}
109
110Time
112{
113 return m_deadline;
114}
115
116void
118{
119 m_deadline = deadline;
120}
121
124{
125 return m_size;
126}
127
128void
130{
131 m_size = size;
132}
133
140bool
141operator==(const UlJob& a, const UlJob& b)
142{
143 UlJob A = a;
144 UlJob B = b;
145
146 if ((A.GetServiceFlow() == B.GetServiceFlow()) && (A.GetSsRecord() == B.GetSsRecord()))
147 {
148 return true;
149 }
150 return false;
151}
152
154{
155}
156
157int
159{
160 return m_priority;
161}
162
163void
165{
166 m_priority = priority;
167}
168
171{
172 return m_job;
173}
174
175void
177{
178 m_job = job;
179}
180
181} // namespace ns3
void SetUlJob(Ptr< UlJob > job)
Set UL job.
Definition: ul-job.cc:176
Ptr< UlJob > GetUlJob()
Get UL job functiion.
Definition: ul-job.cc:170
void SetPriority(int priority)
Set priority.
Definition: ul-job.cc:164
int GetPriority()
Get priority.
Definition: ul-job.cc:158
PriorityUlJob()
this class implements an auxiliary struct to compute the priority of the rtPS and nrtPS in the interm...
Definition: ul-job.cc:153
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:78
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
ServiceFlow * GetServiceFlow()
Get service flow.
Definition: ul-job.cc:75
Time GetPeriod()
Get period.
Definition: ul-job.cc:99
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
Time GetDeadline()
Get deadline.
Definition: ul-job.cc:111
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 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
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
ReqType GetType()
Get type.
Definition: ul-job.cc:63
enum ServiceFlow::SchedulingType m_schedulingType
Scheduling type of flow.
Definition: ul-job.h:156
uint32_t GetSize()
Get size.
Definition: ul-job.cc:123
enum ServiceFlow::SchedulingType GetSchedulingType()
Get scheduling type.
Definition: ul-job.cc:51
~UlJob() override
Definition: ul-job.cc:34
Time m_period
For periodic jobs.
Definition: ul-job.h:153
Time GetReleaseTime()
Get release time.
Definition: ul-job.cc:87
void SetDeadline(Time deadline)
Set deadline.
Definition: ul-job.cc:117
SSRecord * GetSsRecord()
Get SS record.
Definition: ul-job.cc:39
Time Seconds(double 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.
bool operator==(const EventId &a, const EventId &b)
Definition: event-id.h:157
ReqType
Request type enumeration.
Definition: ul-job.h:40