A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
wimax
model
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
31
UlJob::~UlJob
(
void
)
32
{
33
}
34
35
SSRecord
*
36
UlJob::GetSsRecord
(
void
)
37
{
38
return
m_ssRecord
;
39
}
40
void
41
UlJob::SetSsRecord
(
SSRecord
* ssRecord)
42
{
43
m_ssRecord
= ssRecord;
44
}
45
46
enum
47
ServiceFlow::SchedulingType
UlJob::GetSchedulingType
(
void
)
48
{
49
return
m_schedulingType
;
50
}
51
52
void
53
UlJob::SetSchedulingType
(
ServiceFlow::SchedulingType
schedulingType)
54
{
55
m_schedulingType
= schedulingType;
56
}
57
58
ReqType
59
UlJob::GetType
(
void
)
60
{
61
return
m_type
;
62
}
63
64
void
65
UlJob::SetType
(
ReqType
type)
66
{
67
m_type
= type;
68
}
69
70
ServiceFlow
*
71
UlJob::GetServiceFlow
(
void
)
72
{
73
return
m_serviceFlow
;
74
}
75
76
void
77
UlJob::SetServiceFlow
(
ServiceFlow
*serviceFlow)
78
{
79
m_serviceFlow
= serviceFlow;
80
}
81
82
Time
83
UlJob::GetReleaseTime
(
void
)
84
{
85
return
m_releaseTime
;
86
}
87
88
void
89
UlJob::SetReleaseTime
(
Time
releaseTime)
90
{
91
m_releaseTime
= releaseTime;
92
}
93
94
Time
95
UlJob::GetPeriod
(
void
)
96
{
97
return
m_period
;
98
}
99
void
100
UlJob::SetPeriod
(
Time
period)
101
{
102
m_period
= period;
103
}
104
105
Time
106
UlJob::GetDeadline
(
void
)
107
{
108
return
m_deadline
;
109
}
110
void
111
UlJob::SetDeadline
(
Time
deadline)
112
{
113
m_deadline
= deadline;
114
}
115
116
uint32_t
117
UlJob::GetSize
(
void
)
118
{
119
return
m_size
;
120
}
121
122
void
123
UlJob::SetSize
(uint32_t size)
124
{
125
m_size
= size;
126
}
127
134
bool
operator ==
(
const
UlJob
&a,
const
UlJob
&b)
135
{
136
UlJob
A = a;
137
UlJob
B = b;
138
139
if
((A.
GetServiceFlow
() == B.
GetServiceFlow
()) && (A.
GetSsRecord
() == B.
GetSsRecord
()))
140
{
141
return
true
;
142
}
143
return
false
;
144
}
145
146
PriorityUlJob::PriorityUlJob
(
void
)
147
{
148
}
149
150
int
151
PriorityUlJob::GetPriority
(
void
)
152
{
153
return
m_priority
;
154
}
155
156
void
157
PriorityUlJob::SetPriority
(
int
priority)
158
{
159
m_priority
= priority;
160
}
161
162
Ptr<UlJob>
163
PriorityUlJob::GetUlJob
(
void
)
164
{
165
return
m_job
;
166
}
167
void
168
PriorityUlJob::SetUlJob
(
Ptr<UlJob>
job)
169
{
170
m_job
= job;
171
}
172
173
}
// namespace ns3
ns3::UlJob::GetType
ReqType GetType(void)
Get type.
Definition:
ul-job.cc:59
ul-job.h
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:102
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::UlJob::GetPeriod
Time GetPeriod(void)
Get period.
Definition:
ul-job.cc:95
ns3::ReqType
ReqType
Request type enumeration.
Definition:
ul-job.h:37
ns3::UlJob::SetDeadline
void SetDeadline(Time deadline)
Set deadline.
Definition:
ul-job.cc:111
ns3::UlJob::~UlJob
virtual ~UlJob(void)
Definition:
ul-job.cc:31
ns3::UlJob::m_releaseTime
Time m_releaseTime
The time after which the job can be processed.
Definition:
ul-job.h:151
ns3::UlJob::SetSize
void SetSize(uint32_t size)
Set size.
Definition:
ul-job.cc:123
ns3::UlJob
this class implements a structure to compute the priority of service flows
Definition:
ul-job.h:47
ns3::UlJob::UlJob
UlJob(void)
Definition:
ul-job.cc:27
ns3::PriorityUlJob::GetUlJob
Ptr< UlJob > GetUlJob(void)
Get UL job functiion.
Definition:
ul-job.cc:163
ns3::UlJob::m_ssRecord
SSRecord * m_ssRecord
Pointer to SSRecord.
Definition:
ul-job.h:157
ns3::UlJob::GetDeadline
Time GetDeadline(void)
Get deadline.
Definition:
ul-job.cc:106
ns3::UlJob::SetReleaseTime
void SetReleaseTime(Time releaseTime)
Set release time.
Definition:
ul-job.cc:89
ns3::UlJob::SetPeriod
void SetPeriod(Time period)
Set period.
Definition:
ul-job.cc:100
ns3::UlJob::m_schedulingType
enum ServiceFlow::SchedulingType m_schedulingType
Scheduling type of flow.
Definition:
ul-job.h:155
ns3::ServiceFlow::SchedulingType
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition:
service-flow.h:58
ns3::UlJob::GetReleaseTime
Time GetReleaseTime(void)
Get release time.
Definition:
ul-job.cc:83
ns3::UlJob::m_deadline
Time m_deadline
Request should be satisfied by this time.
Definition:
ul-job.h:153
ns3::UlJob::SetSsRecord
void SetSsRecord(SSRecord *ssRecord)
Set SS record.
Definition:
ul-job.cc:41
ns3::PriorityUlJob::SetPriority
void SetPriority(int priority)
Set priority.
Definition:
ul-job.cc:157
ns3::UlJob::GetSsRecord
SSRecord * GetSsRecord(void)
Get SS record.
Definition:
ul-job.cc:36
ns3::UlJob::SetServiceFlow
void SetServiceFlow(ServiceFlow *serviceFlow)
Set service flow.
Definition:
ul-job.cc:77
ns3::UlJob::m_type
ReqType m_type
Type of request, DATA or Unicast req slots.
Definition:
ul-job.h:159
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition:
service-flow.h:39
ns3::PriorityUlJob::SetUlJob
void SetUlJob(Ptr< UlJob > job)
Set UL job.
Definition:
ul-job.cc:168
ns3::UlJob::m_period
Time m_period
For periodic jobs.
Definition:
ul-job.h:152
ns3::UlJob::m_size
uint32_t m_size
Number of minislots requested.
Definition:
ul-job.h:154
ns3::PriorityUlJob::m_priority
int m_priority
the priority
Definition:
ul-job.h:200
ns3::UlJob::SetSchedulingType
void SetSchedulingType(ServiceFlow::SchedulingType schedulingType)
Set scheduling type.
Definition:
ul-job.cc:53
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition:
nstime.h:1014
ns3::operator==
bool operator==(const EventId &a, const EventId &b)
Definition:
event-id.h:135
ns3::UlJob::GetServiceFlow
ServiceFlow * GetServiceFlow(void)
Get service flow.
Definition:
ul-job.cc:71
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:146
ns3::UlJob::m_serviceFlow
ServiceFlow * m_serviceFlow
service flow
Definition:
ul-job.h:160
ns3::SSRecord
This class is used by the base station to store some information related to subscriber station in the...
Definition:
ss-record.h:43
ns3::PriorityUlJob::GetPriority
int GetPriority(void)
Get priority.
Definition:
ul-job.cc:151
ns3::UlJob::GetSchedulingType
enum ServiceFlow::SchedulingType GetSchedulingType(void)
Get scheduling type.
Definition:
ul-job.cc:47
ns3::UlJob::GetSize
uint32_t GetSize(void)
Get size.
Definition:
ul-job.cc:117
ns3::PriorityUlJob::m_job
Ptr< UlJob > m_job
the job
Definition:
ul-job.h:201
ns3::UlJob::SetType
void SetType(ReqType type)
Set type.
Definition:
ul-job.cc:65
Generated on Wed Nov 7 2018 10:02:16 for ns-3 by
1.8.14