A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
service-flow-record.cc
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007,2008, 2009 INRIA
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: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19
*/
20
21
#include "
service-flow-record.h
"
22
23
namespace
ns3 {
24
25
ServiceFlowRecord::ServiceFlowRecord
(
void
)
26
: m_grantSize (0),
27
m_grantTimeStamp (
Seconds
(0)),
28
m_dlTimeStamp (
Seconds
(0)),
29
m_pktsSent (0),
30
m_pktsRcvd (0),
31
m_bytesSent (0),
32
m_bytesRcvd (0),
33
m_requestedBandwidth (0),
34
m_grantedBandwidth (0),
35
m_bwSinceLastExpiry (0)
36
{
37
38
m_lastGrantTime
=
Seconds
(0);
39
m_backlogged
= 0;
40
m_backloggedTemp
= 0;
41
m_grantedBandwidthTemp
= 0;
42
}
43
44
ServiceFlowRecord::~ServiceFlowRecord
(
void
)
45
{
46
}
47
48
void
49
ServiceFlowRecord::SetGrantSize
(uint32_t grantSize)
50
{
51
m_grantSize
= grantSize;
52
}
53
54
uint32_t
55
ServiceFlowRecord::GetGrantSize
(
void
)
const
56
{
57
return
m_grantSize
;
58
}
59
60
void
61
ServiceFlowRecord::SetGrantTimeStamp
(
Time
grantTimeStamp)
62
{
63
m_grantTimeStamp
= grantTimeStamp;
64
}
65
66
Time
67
ServiceFlowRecord::GetGrantTimeStamp
(
void
)
const
68
{
69
return
m_grantTimeStamp
;
70
}
71
72
void
73
ServiceFlowRecord::SetDlTimeStamp
(
Time
dlTimeStamp)
74
{
75
m_dlTimeStamp
= dlTimeStamp;
76
}
77
78
Time
79
ServiceFlowRecord::GetDlTimeStamp
(
void
)
const
80
{
81
return
m_dlTimeStamp
;
82
}
83
84
void
85
ServiceFlowRecord::SetPktsSent
(uint32_t pktsSent)
86
{
87
m_pktsSent
= pktsSent;
88
}
89
90
void
91
ServiceFlowRecord::UpdatePktsSent
(uint32_t pktsSent)
92
{
93
m_pktsSent
+= pktsSent;
94
}
95
96
uint32_t
97
ServiceFlowRecord::GetPktsSent
(
void
)
const
98
{
99
return
m_pktsSent
;
100
}
101
102
void
103
ServiceFlowRecord::SetPktsRcvd
(uint32_t pktsRcvd)
104
{
105
m_pktsRcvd
= pktsRcvd;
106
}
107
108
void
109
ServiceFlowRecord::UpdatePktsRcvd
(uint32_t pktsRcvd)
110
{
111
m_pktsRcvd
+= pktsRcvd;
112
}
113
114
uint32_t
115
ServiceFlowRecord::GetPktsRcvd
(
void
)
const
116
{
117
return
m_pktsRcvd
;
118
}
119
120
void
121
ServiceFlowRecord::SetBytesSent
(uint32_t bytesSent)
122
{
123
m_bytesSent
= bytesSent;
124
}
125
126
void
127
ServiceFlowRecord::UpdateBytesSent
(uint32_t bytesSent)
128
{
129
m_bytesSent
+= bytesSent;
130
}
131
132
uint32_t
133
ServiceFlowRecord::GetBytesSent
(
void
)
const
134
{
135
return
m_bytesSent
;
136
}
137
138
void
139
ServiceFlowRecord::SetBytesRcvd
(uint32_t bytesRcvd)
140
{
141
m_bytesRcvd
= bytesRcvd;
142
}
143
144
void
145
ServiceFlowRecord::UpdateBytesRcvd
(uint32_t bytesRcvd)
146
{
147
m_bytesRcvd
+= bytesRcvd;
148
}
149
150
uint32_t
151
ServiceFlowRecord::GetBytesRcvd
(
void
)
const
152
{
153
return
m_bytesRcvd
;
154
}
155
156
void
157
ServiceFlowRecord::SetRequestedBandwidth
(uint32_t requestedBandwidth)
158
{
159
m_requestedBandwidth
= requestedBandwidth;
160
}
161
void
162
ServiceFlowRecord::UpdateRequestedBandwidth
(uint32_t requestedBandwidth)
163
{
164
m_requestedBandwidth
+= requestedBandwidth;
165
}
166
167
uint32_t
168
ServiceFlowRecord::GetRequestedBandwidth
(
void
)
169
{
170
return
m_requestedBandwidth
;
171
}
172
173
void
174
ServiceFlowRecord::SetGrantedBandwidth
(uint32_t grantedBandwidth)
175
{
176
m_grantedBandwidth
= grantedBandwidth;
177
}
178
179
void
180
ServiceFlowRecord::UpdateGrantedBandwidth
(uint32_t grantedBandwidth)
181
{
182
m_grantedBandwidth
+= grantedBandwidth;
183
}
184
185
uint32_t
186
ServiceFlowRecord::GetGrantedBandwidth
(
void
)
187
{
188
return
m_grantedBandwidth
;
189
}
190
void
191
ServiceFlowRecord::SetGrantedBandwidthTemp
(uint32_t grantedBandwidthTemp)
192
{
193
m_grantedBandwidthTemp
= grantedBandwidthTemp;
194
}
195
196
void
197
ServiceFlowRecord::UpdateGrantedBandwidthTemp
(
198
uint32_t grantedBandwidthTemp)
199
{
200
m_grantedBandwidthTemp
+= grantedBandwidthTemp;
201
}
202
203
uint32_t
204
ServiceFlowRecord::GetGrantedBandwidthTemp
(
void
)
205
{
206
return
m_grantedBandwidthTemp
;
207
}
208
209
void
210
ServiceFlowRecord::SetLastGrantTime
(
Time
grantTime)
211
{
212
m_lastGrantTime
= grantTime;
213
}
214
215
Time
216
ServiceFlowRecord::GetLastGrantTime
(
void
)
const
217
{
218
return
m_lastGrantTime
;
219
}
220
221
void
222
ServiceFlowRecord::SetBacklogged
(uint32_t backlogged)
223
{
224
m_backlogged
= backlogged;
225
}
226
227
void
228
ServiceFlowRecord::IncreaseBacklogged
(uint32_t backlogged)
229
{
230
m_backlogged
+= backlogged;
231
}
232
233
uint32_t
234
ServiceFlowRecord::GetBacklogged
(
void
)
const
235
{
236
return
m_backlogged
;
237
}
238
239
void
240
ServiceFlowRecord::SetBackloggedTemp
(uint32_t backloggedTemp)
241
{
242
m_backloggedTemp
= backloggedTemp;
243
}
244
245
void
246
ServiceFlowRecord::IncreaseBackloggedTemp
(uint32_t backloggedTemp)
247
{
248
m_backloggedTemp
+= backloggedTemp;
249
}
250
251
uint32_t
252
ServiceFlowRecord::GetBackloggedTemp
(
void
)
const
253
{
254
return
m_backloggedTemp
;
255
}
256
257
void
258
ServiceFlowRecord::SetBwSinceLastExpiry
(uint32_t bwSinceLastExpiry)
259
{
260
m_bwSinceLastExpiry
= bwSinceLastExpiry;
261
}
262
263
void
264
ServiceFlowRecord::UpdateBwSinceLastExpiry
(uint32_t bwSinceLastExpiry)
265
{
266
m_bwSinceLastExpiry
+= bwSinceLastExpiry;
267
}
268
269
uint32_t
270
ServiceFlowRecord::GetBwSinceLastExpiry
(
void
)
271
{
272
return
m_bwSinceLastExpiry
;
273
}
274
275
}
// namespace ns3
src
wimax
model
service-flow-record.cc
Generated on Tue Oct 9 2012 16:45:50 for ns-3 by
1.8.1.2