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.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007,2008 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
#ifndef SERVICE_FLOW_RECORD_H
22
#define SERVICE_FLOW_RECORD_H
23
24
#include <stdint.h>
25
#include "ns3/nstime.h"
26
#include "
bs-uplink-scheduler.h
"
27
#include "
bs-net-device.h
"
28
#include "ns3/ptr.h"
29
30
namespace
ns3 {
31
36
class
ServiceFlowRecord
37
{
38
public
:
39
ServiceFlowRecord
(
void
);
40
~ServiceFlowRecord
(
void
);
41
46
void
SetGrantSize
(uint32_t grantSize);
50
uint32_t
GetGrantSize
(
void
)
const
;
56
void
SetGrantTimeStamp
(
Time
grantTimeStamp);
60
Time
GetGrantTimeStamp
(
void
)
const
;
65
void
SetDlTimeStamp
(
Time
dlTimeStamp);
69
Time
GetDlTimeStamp
(
void
)
const
;
74
void
SetPktsSent
(uint32_t pktsSent);
79
void
UpdatePktsSent
(uint32_t pktsSent);
83
uint32_t
GetPktsSent
(
void
)
const
;
88
void
SetPktsRcvd
(uint32_t pktsRcvd);
93
void
UpdatePktsRcvd
(uint32_t pktsRcvd);
97
uint32_t
GetPktsRcvd
(
void
)
const
;
102
void
SetBytesSent
(uint32_t bytesSent);
107
void
UpdateBytesSent
(uint32_t bytesSent);
111
uint32_t
GetBytesSent
(
void
)
const
;
116
void
SetBytesRcvd
(uint32_t bytesRcvd);
121
void
UpdateBytesRcvd
(uint32_t bytesRcvd);
125
uint32_t
GetBytesRcvd
(
void
)
const
;
126
127
void
SetRequestedBandwidth
(uint32_t requestedBandwidth);
128
void
UpdateRequestedBandwidth
(uint32_t requestedBandwidth);
129
uint32_t
GetRequestedBandwidth
(
void
);
130
131
void
SetGrantedBandwidth
(uint32_t grantedBandwidth);
132
void
UpdateGrantedBandwidth
(uint32_t grantedBandwidth);
133
uint32_t
GetGrantedBandwidth
(
void
);
134
135
void
SetGrantedBandwidthTemp
(uint32_t grantedBandwidthTemp);
136
void
UpdateGrantedBandwidthTemp
(uint32_t grantedBandwidthTemp);
137
uint32_t
GetGrantedBandwidthTemp
(
void
);
138
139
void
SetBwSinceLastExpiry
(uint32_t bwSinceLastExpiry);
140
void
UpdateBwSinceLastExpiry
(uint32_t bwSinceLastExpiry);
141
uint32_t
GetBwSinceLastExpiry
(
void
);
142
143
void
SetLastGrantTime
(
Time
grantTime);
144
Time
GetLastGrantTime
(
void
)
const
;
145
146
void
SetBacklogged
(uint32_t backlogged);
147
void
IncreaseBacklogged
(uint32_t backlogged);
148
uint32_t
GetBacklogged
(
void
)
const
;
149
150
void
SetBackloggedTemp
(uint32_t backloggedTemp);
151
void
IncreaseBackloggedTemp
(uint32_t backloggedTemp);
152
uint32_t
GetBackloggedTemp
(
void
)
const
;
153
154
private
:
155
uint32_t
m_grantSize
;
// only used for UGS flow
156
Time
m_grantTimeStamp
;
// allocation (for data) for UGS flows and unicast poll (for bandwidth requests) for non-UGS flows
157
Time
m_dlTimeStamp
;
// time when this service flow's traffic was last sent
158
159
// stats members
160
uint32_t
m_pktsSent
;
161
uint32_t
m_pktsRcvd
;
162
163
uint32_t
m_bytesSent
;
164
uint32_t
m_bytesRcvd
;
165
166
uint32_t
m_requestedBandwidth
;
167
uint32_t
m_grantedBandwidth
;
168
uint32_t
m_grantedBandwidthTemp
;
// Temporary variable used to sort list. Necessary to keep original order
169
170
/* bandwidth granted since last expiry of minimum reserved traffic rate interval,
171
/only for nrtPS, to make sure minimum reserved traffic rate is maintained */
172
uint32_t
m_bwSinceLastExpiry
;
173
Time
m_lastGrantTime
;
174
int32_t
m_backlogged
;
175
int32_t
m_backloggedTemp
;
176
177
};
178
179
}
// namespace ns3
180
181
#endif
/* SERVICE_FLOW_RECORD_H */
src
wimax
model
service-flow-record.h
Generated on Tue Nov 13 2012 10:32:26 for ns-3 by
1.8.1.2