A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
service-flow-record.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008, 2009 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 */
8
10
11namespace ns3
12{
13
15 : m_grantSize(0),
16 m_grantTimeStamp(Seconds(0)),
17 m_dlTimeStamp(Seconds(0)),
18 m_pktsSent(0),
19 m_pktsRcvd(0),
20 m_bytesSent(0),
21 m_bytesRcvd(0),
22 m_requestedBandwidth(0),
23 m_grantedBandwidth(0),
24 m_bwSinceLastExpiry(0)
25{
27 m_backlogged = 0;
30}
31
35
36void
38{
39 m_grantSize = grantSize;
40}
41
47
48void
50{
51 m_grantTimeStamp = grantTimeStamp;
52}
53
54Time
59
60void
62{
63 m_dlTimeStamp = dlTimeStamp;
64}
65
66Time
71
72void
74{
75 m_pktsSent = pktsSent;
76}
77
78void
80{
81 m_pktsSent += pktsSent;
82}
83
86{
87 return m_pktsSent;
88}
89
90void
92{
93 m_pktsRcvd = pktsRcvd;
94}
95
96void
98{
99 m_pktsRcvd += pktsRcvd;
100}
101
104{
105 return m_pktsRcvd;
106}
107
108void
110{
111 m_bytesSent = bytesSent;
112}
113
114void
116{
117 m_bytesSent += bytesSent;
118}
119
122{
123 return m_bytesSent;
124}
125
126void
128{
129 m_bytesRcvd = bytesRcvd;
130}
131
132void
134{
135 m_bytesRcvd += bytesRcvd;
136}
137
140{
141 return m_bytesRcvd;
142}
143
144void
146{
147 m_requestedBandwidth = requestedBandwidth;
148}
149
150void
152{
153 m_requestedBandwidth += requestedBandwidth;
154}
155
161
162void
164{
165 m_grantedBandwidth = grantedBandwidth;
166}
167
168void
170{
171 m_grantedBandwidth += grantedBandwidth;
172}
173
179
180void
182{
183 m_grantedBandwidthTemp = grantedBandwidthTemp;
184}
185
186void
188{
189 m_grantedBandwidthTemp += grantedBandwidthTemp;
190}
191
197
198void
200{
201 m_lastGrantTime = grantTime;
202}
203
204Time
209
210void
212{
213 m_backlogged = backlogged;
214}
215
216void
218{
219 m_backlogged += backlogged;
220}
221
224{
225 return m_backlogged;
226}
227
228void
230{
231 m_backloggedTemp = backloggedTemp;
232}
233
234void
236{
237 m_backloggedTemp += backloggedTemp;
238}
239
245
246void
248{
249 m_bwSinceLastExpiry = bwSinceLastExpiry;
250}
251
252void
254{
255 m_bwSinceLastExpiry += bwSinceLastExpiry;
256}
257
263
264} // namespace ns3
void UpdateRequestedBandwidth(uint32_t requestedBandwidth)
update the requested bandwidth
void UpdateBytesRcvd(uint32_t bytesRcvd)
update the number of received bytes by adding bytesRcvd
void UpdatePktsSent(uint32_t pktsSent)
update the number of sent packets by adding pktsSent
int32_t m_backlogged
back logged
void SetPktsRcvd(uint32_t pktsRcvd)
Set the number of received packets.
void UpdateGrantedBandwidthTemp(uint32_t grantedBandwidthTemp)
update the temporary granted bandwidth
uint32_t GetRequestedBandwidth() const
void UpdateBytesSent(uint32_t bytesSent)
update the number of sent bytes by adding bytesSent
uint32_t m_pktsRcvd
packets received
void SetRequestedBandwidth(uint32_t requestedBandwidth)
set the requested bandwidth
uint32_t m_bytesRcvd
bytes received
void IncreaseBacklogged(uint32_t backlogged)
increase backlogged
void SetDlTimeStamp(Time dlTimeStamp)
Set the DlTimeStamp.
uint32_t GetBackloggedTemp() const
void SetBackloggedTemp(uint32_t backloggedTemp)
set temporary back logged
void SetPktsSent(uint32_t pktsSent)
set the number of sent packets in this service flow
uint32_t GetGrantedBandwidthTemp() const
Time m_lastGrantTime
last grant time
uint32_t m_grantedBandwidthTemp
Temporary variable used to sort list.
uint32_t m_pktsSent
packets sent
void SetGrantSize(uint32_t grantSize)
Set the grant size (only for UGS service flows)
uint32_t GetGrantedBandwidth() const
void SetGrantedBandwidthTemp(uint32_t grantedBandwidthTemp)
set the temporary granted bandwidth
uint32_t m_grantedBandwidth
granted badnwidth
void IncreaseBackloggedTemp(uint32_t backloggedTemp)
increase temporary back logged
void UpdatePktsRcvd(uint32_t pktsRcvd)
update the number of received packets by adding pktsRcvd
void SetBwSinceLastExpiry(uint32_t bwSinceLastExpiry)
set BW since last expiry
uint32_t m_requestedBandwidth
requested bandwidth
void UpdateGrantedBandwidth(uint32_t grantedBandwidth)
update the granted bandwidth
void SetBytesRcvd(uint32_t bytesRcvd)
Set the number of received bytes.
uint32_t m_bwSinceLastExpiry
bandwidth granted since last expiry of minimum reserved traffic rate interval, only for nrtPS,...
void UpdateBwSinceLastExpiry(uint32_t bwSinceLastExpiry)
update BW since last expiry
void SetBacklogged(uint32_t backlogged)
set backlogged
uint32_t m_bytesSent
bytes sent
void SetBytesSent(uint32_t bytesSent)
Set the number of sent bytes.
uint32_t GetBwSinceLastExpiry() const
Time m_dlTimeStamp
time when this service flow's traffic was last sent
void SetLastGrantTime(Time grantTime)
set last grant time
void SetGrantTimeStamp(Time grantTimeStamp)
Set the grant time stamp.
void SetGrantedBandwidth(uint32_t grantedBandwidth)
set the granted bandwidth
int32_t m_backloggedTemp
back logged temp
Time m_grantTimeStamp
allocation (for data) for UGS flows and unicast poll (for bandwidth requests) for non-UGS flows
uint32_t m_grantSize
only used for UGS flow
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1308
Every class exported by the ns3 library is enclosed in the ns3 namespace.