A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
28
UlJob::UlJob
()
29
: m_deadline(
Seconds
(0)),
30
m_size(0)
31
{
32
}
33
34
UlJob::~UlJob
()
35
{
36
}
37
38
SSRecord
*
39
UlJob::GetSsRecord
()
40
{
41
return
m_ssRecord
;
42
}
43
44
void
45
UlJob::SetSsRecord
(
SSRecord
* ssRecord)
46
{
47
m_ssRecord
= ssRecord;
48
}
49
50
enum
ServiceFlow::SchedulingType
51
UlJob::GetSchedulingType
()
52
{
53
return
m_schedulingType
;
54
}
55
56
void
57
UlJob::SetSchedulingType
(
ServiceFlow::SchedulingType
schedulingType)
58
{
59
m_schedulingType
= schedulingType;
60
}
61
62
ReqType
63
UlJob::GetType
()
64
{
65
return
m_type
;
66
}
67
68
void
69
UlJob::SetType
(
ReqType
type
)
70
{
71
m_type
=
type
;
72
}
73
74
ServiceFlow
*
75
UlJob::GetServiceFlow
()
76
{
77
return
m_serviceFlow
;
78
}
79
80
void
81
UlJob::SetServiceFlow
(
ServiceFlow
* serviceFlow)
82
{
83
m_serviceFlow
= serviceFlow;
84
}
85
86
Time
87
UlJob::GetReleaseTime
()
88
{
89
return
m_releaseTime
;
90
}
91
92
void
93
UlJob::SetReleaseTime
(
Time
releaseTime)
94
{
95
m_releaseTime
= releaseTime;
96
}
97
98
Time
99
UlJob::GetPeriod
()
100
{
101
return
m_period
;
102
}
103
104
void
105
UlJob::SetPeriod
(
Time
period)
106
{
107
m_period
= period;
108
}
109
110
Time
111
UlJob::GetDeadline
()
112
{
113
return
m_deadline
;
114
}
115
116
void
117
UlJob::SetDeadline
(
Time
deadline)
118
{
119
m_deadline
= deadline;
120
}
121
122
uint32_t
123
UlJob::GetSize
()
const
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
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
153
PriorityUlJob::PriorityUlJob
()
154
{
155
}
156
157
int
158
PriorityUlJob::GetPriority
()
const
159
{
160
return
m_priority
;
161
}
162
163
void
164
PriorityUlJob::SetPriority
(
int
priority)
165
{
166
m_priority
= priority;
167
}
168
169
Ptr<UlJob>
170
PriorityUlJob::GetUlJob
()
171
{
172
return
m_job
;
173
}
174
175
void
176
PriorityUlJob::SetUlJob
(
Ptr<UlJob>
job)
177
{
178
m_job
= job;
179
}
180
181
}
// namespace ns3
ns3::PriorityUlJob::SetUlJob
void SetUlJob(Ptr< UlJob > job)
Set UL job.
Definition:
ul-job.cc:176
ns3::PriorityUlJob::GetUlJob
Ptr< UlJob > GetUlJob()
Get UL job function.
Definition:
ul-job.cc:170
ns3::PriorityUlJob::SetPriority
void SetPriority(int priority)
Set priority.
Definition:
ul-job.cc:164
ns3::PriorityUlJob::GetPriority
int GetPriority() const
Get priority.
Definition:
ul-job.cc:158
ns3::PriorityUlJob::PriorityUlJob
PriorityUlJob()
this class implements an auxiliary struct to compute the priority of the rtPS and nrtPS in the interm...
Definition:
ul-job.cc:153
ns3::PriorityUlJob::m_job
Ptr< UlJob > m_job
the job
Definition:
ul-job.h:199
ns3::PriorityUlJob::m_priority
int m_priority
the priority
Definition:
ul-job.h:198
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
ns3::SSRecord
This class is used by the base station to store some information related to subscriber station in the...
Definition:
ss-record.h:46
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition:
service-flow.h:43
ns3::ServiceFlow::SchedulingType
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition:
service-flow.h:62
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::UlJob
this class implements a structure to compute the priority of service flows
Definition:
ul-job.h:50
ns3::UlJob::SetSize
void SetSize(uint32_t size)
Set size.
Definition:
ul-job.cc:129
ns3::UlJob::GetServiceFlow
ServiceFlow * GetServiceFlow()
Get service flow.
Definition:
ul-job.cc:75
ns3::UlJob::GetPeriod
Time GetPeriod()
Get period.
Definition:
ul-job.cc:99
ns3::UlJob::SetServiceFlow
void SetServiceFlow(ServiceFlow *serviceFlow)
Set service flow.
Definition:
ul-job.cc:81
ns3::UlJob::SetSsRecord
void SetSsRecord(SSRecord *ssRecord)
Set SS record.
Definition:
ul-job.cc:45
ns3::UlJob::m_serviceFlow
ServiceFlow * m_serviceFlow
service flow
Definition:
ul-job.h:161
ns3::UlJob::GetDeadline
Time GetDeadline()
Get deadline.
Definition:
ul-job.cc:111
ns3::UlJob::m_type
ReqType m_type
Type of request, DATA or Unicast req slots.
Definition:
ul-job.h:160
ns3::UlJob::m_ssRecord
SSRecord * m_ssRecord
Pointer to SSRecord.
Definition:
ul-job.h:158
ns3::UlJob::m_size
uint32_t m_size
Number of minislots requested.
Definition:
ul-job.h:155
ns3::UlJob::UlJob
UlJob()
Definition:
ul-job.cc:28
ns3::UlJob::SetReleaseTime
void SetReleaseTime(Time releaseTime)
Set release time.
Definition:
ul-job.cc:93
ns3::UlJob::m_deadline
Time m_deadline
Request should be satisfied by this time.
Definition:
ul-job.h:154
ns3::UlJob::SetSchedulingType
void SetSchedulingType(ServiceFlow::SchedulingType schedulingType)
Set scheduling type.
Definition:
ul-job.cc:57
ns3::UlJob::GetSize
uint32_t GetSize() const
Get size.
Definition:
ul-job.cc:123
ns3::UlJob::SetType
void SetType(ReqType type)
Set type.
Definition:
ul-job.cc:69
ns3::UlJob::SetPeriod
void SetPeriod(Time period)
Set period.
Definition:
ul-job.cc:105
ns3::UlJob::m_releaseTime
Time m_releaseTime
The time after which the job can be processed.
Definition:
ul-job.h:152
ns3::UlJob::GetType
ReqType GetType()
Get type.
Definition:
ul-job.cc:63
ns3::UlJob::m_schedulingType
enum ServiceFlow::SchedulingType m_schedulingType
Scheduling type of flow.
Definition:
ul-job.h:156
ns3::UlJob::GetSchedulingType
enum ServiceFlow::SchedulingType GetSchedulingType()
Get scheduling type.
Definition:
ul-job.cc:51
ns3::UlJob::~UlJob
~UlJob() override
Definition:
ul-job.cc:34
ns3::UlJob::m_period
Time m_period
For periodic jobs.
Definition:
ul-job.h:153
ns3::UlJob::GetReleaseTime
Time GetReleaseTime()
Get release time.
Definition:
ul-job.cc:87
ns3::UlJob::SetDeadline
void SetDeadline(Time deadline)
Set deadline.
Definition:
ul-job.cc:117
ns3::UlJob::GetSsRecord
SSRecord * GetSsRecord()
Get SS record.
Definition:
ul-job.cc:39
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition:
nstime.h:1336
check-style-clang-format.type
type
Definition:
check-style-clang-format.py:657
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator==
bool operator==(const EventId &a, const EventId &b)
Definition:
event-id.h:157
ns3::ReqType
ReqType
Request type enumeration.
Definition:
ul-job.h:40
ul-job.h
src
wimax
model
ul-job.cc
Generated on Fri Mar 31 2023 13:30:57 for ns-3 by
1.9.1