A Discrete-Event Network Simulator
API
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 
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 
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 void
169 {
170  m_job = job;
171 }
172 
173 } // namespace ns3
void SetUlJob(Ptr< UlJob > job)
Set UL job.
Definition: ul-job.cc:168
int GetPriority(void)
Get priority.
Definition: ul-job.cc:151
void SetPriority(int priority)
Set priority.
Definition: ul-job.cc:157
Ptr< UlJob > GetUlJob(void)
Get UL job functiion.
Definition: ul-job.cc:163
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:201
int m_priority
the priority
Definition: ul-job.h:200
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:44
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:40
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:59
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
this class implements a structure to compute the priority of service flows
Definition: ul-job.h:48
void SetSize(uint32_t size)
Set size.
Definition: ul-job.cc:123
Time GetPeriod(void)
Get period.
Definition: ul-job.cc:95
void SetServiceFlow(ServiceFlow *serviceFlow)
Set service flow.
Definition: ul-job.cc:77
void SetSsRecord(SSRecord *ssRecord)
Set SS record.
Definition: ul-job.cc:41
ServiceFlow * m_serviceFlow
service flow
Definition: ul-job.h:160
uint32_t GetSize(void)
Get size.
Definition: ul-job.cc:117
Time GetReleaseTime(void)
Get release time.
Definition: ul-job.cc:83
ReqType m_type
Type of request, DATA or Unicast req slots.
Definition: ul-job.h:159
SSRecord * m_ssRecord
Pointer to SSRecord.
Definition: ul-job.h:157
UlJob(void)
Definition: ul-job.cc:27
uint32_t m_size
Number of minislots requested.
Definition: ul-job.h:154
Time GetDeadline(void)
Get deadline.
Definition: ul-job.cc:106
void SetReleaseTime(Time releaseTime)
Set release time.
Definition: ul-job.cc:89
ReqType GetType(void)
Get type.
Definition: ul-job.cc:59
Time m_deadline
Request should be satisfied by this time.
Definition: ul-job.h:153
void SetSchedulingType(ServiceFlow::SchedulingType schedulingType)
Set scheduling type.
Definition: ul-job.cc:53
void SetType(ReqType type)
Set type.
Definition: ul-job.cc:65
void SetPeriod(Time period)
Set period.
Definition: ul-job.cc:100
Time m_releaseTime
The time after which the job can be processed.
Definition: ul-job.h:151
enum ServiceFlow::SchedulingType m_schedulingType
Scheduling type of flow.
Definition: ul-job.h:155
ServiceFlow * GetServiceFlow(void)
Get service flow.
Definition: ul-job.cc:71
virtual ~UlJob(void)
Definition: ul-job.cc:31
SSRecord * GetSsRecord(void)
Get SS record.
Definition: ul-job.cc:36
Time m_period
For periodic jobs.
Definition: ul-job.h:152
void SetDeadline(Time deadline)
Set deadline.
Definition: ul-job.cc:111
enum ServiceFlow::SchedulingType GetSchedulingType(void)
Get scheduling type.
Definition: ul-job.cc:47
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1244
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:158
ReqType
Request type enumeration.
Definition: ul-job.h:38