A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
service-flow-record.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 */
8
9#ifndef SERVICE_FLOW_RECORD_H
10#define SERVICE_FLOW_RECORD_H
11
12#include "bs-net-device.h"
13#include "bs-uplink-scheduler.h"
14
15#include "ns3/nstime.h"
16#include "ns3/ptr.h"
17
18#include <stdint.h>
19
20namespace ns3
21{
22
23/**
24 * \ingroup wimax
25 * \brief this class implements a structure to manage some parameters and statistics related to a
26 * service flow
27 */
29{
30 public:
33
34 /**
35 * \brief Set the grant size (only for UGS service flows)
36 * \param grantSize the grant size to set
37 */
38 void SetGrantSize(uint32_t grantSize);
39 /**
40 * \return the grant size (only for ugs service flows)
41 */
42 uint32_t GetGrantSize() const;
43 /**
44 * \brief Set the grant time stamp. Used for data allocation for ugs flows, and unicast poll
45 * (bw request) for non-UGS flows
46 * \param grantTimeStamp the grant time stamp to set
47 */
48 void SetGrantTimeStamp(Time grantTimeStamp);
49 /**
50 * \return the grant time stamp. Used for data allocation for ugs flows, and unicast poll (bw
51 * request) for non-UGS flows
52 */
53 Time GetGrantTimeStamp() const;
54 /**
55 * \brief Set the DlTimeStamp.
56 * \param dlTimeStamp time when this service flow's traffic was last sent.
57 */
58 void SetDlTimeStamp(Time dlTimeStamp);
59 /**
60 * \return the DlTimeStamp: time when this service flow's traffic was last sent
61 */
62 Time GetDlTimeStamp() const;
63 /**
64 * \brief set the number of sent packets in this service flow
65 * \param pktsSent the number of sent packets
66 */
67 void SetPktsSent(uint32_t pktsSent);
68 /**
69 * \brief update the number of sent packets by adding pktsSent
70 * \param pktsSent the number of sent packets to add
71 */
72 void UpdatePktsSent(uint32_t pktsSent);
73 /**
74 * \return the number of sent packet in this service flow
75 */
76 uint32_t GetPktsSent() const;
77 /**
78 * \brief Set the number of received packets
79 * \param pktsRcvd The number of received packets
80 */
81 void SetPktsRcvd(uint32_t pktsRcvd);
82 /**
83 * \brief update the number of received packets by adding pktsRcvd
84 * \param pktsRcvd the number of received packets to add
85 */
86 void UpdatePktsRcvd(uint32_t pktsRcvd);
87 /**
88 * \return the number of received packet
89 */
90 uint32_t GetPktsRcvd() const;
91 /**
92 * \brief Set the number of sent bytes
93 * \param bytesSent the number of sent bytes
94 */
95 void SetBytesSent(uint32_t bytesSent);
96 /**
97 * \brief update the number of sent bytes by adding bytesSent
98 * \param bytesSent the number of bytes to add
99 */
100 void UpdateBytesSent(uint32_t bytesSent);
101 /**
102 * \return The number of sent bytes
103 */
104 uint32_t GetBytesSent() const;
105 /**
106 * \brief Set the number of received bytes
107 * \param bytesRcvd the number of received bytes
108 */
109 void SetBytesRcvd(uint32_t bytesRcvd);
110 /**
111 * \brief update the number of received bytes by adding bytesRcvd
112 * \param bytesRcvd the number of bytes to add
113 */
114 void UpdateBytesRcvd(uint32_t bytesRcvd);
115 /**
116 * \return The number of received bytes
117 */
118 uint32_t GetBytesRcvd() const;
119
120 /**
121 * \brief set the requested bandwidth
122 * \param requestedBandwidth the requested bandwidth
123 */
124 void SetRequestedBandwidth(uint32_t requestedBandwidth);
125 /**
126 * \brief update the requested bandwidth
127 * \param requestedBandwidth the requested bandwidth update
128 */
129 void UpdateRequestedBandwidth(uint32_t requestedBandwidth);
130 /**
131 * \return The requested bandwidth
132 */
134
135 /**
136 * \brief set the granted bandwidth
137 * \param grantedBandwidth the granted bandwidth
138 */
139 void SetGrantedBandwidth(uint32_t grantedBandwidth);
140 /**
141 * \brief update the granted bandwidth
142 * \param grantedBandwidth the granted bandwidth update
143 */
144 void UpdateGrantedBandwidth(uint32_t grantedBandwidth);
145 /**
146 * \return The granted bandwidth
147 */
149
150 /**
151 * \brief set the temporary granted bandwidth
152 * \param grantedBandwidthTemp the temporary granted bandwidth
153 */
154 void SetGrantedBandwidthTemp(uint32_t grantedBandwidthTemp);
155 /**
156 * \brief update the temporary granted bandwidth
157 * \param grantedBandwidthTemp the temporary granted bandwidth
158 */
159 void UpdateGrantedBandwidthTemp(uint32_t grantedBandwidthTemp);
160 /**
161 * \return The temporary granted bandwidth
162 */
164
165 /**
166 * \brief set BW since last expiry
167 * \param bwSinceLastExpiry bandwidth since last expiry
168 */
169 void SetBwSinceLastExpiry(uint32_t bwSinceLastExpiry);
170 /**
171 * \brief update BW since last expiry
172 * \param bwSinceLastExpiry bandwidth since last expiry
173 */
174 void UpdateBwSinceLastExpiry(uint32_t bwSinceLastExpiry);
175 /**
176 * \return The bandwidth since last expiry
177 */
179
180 /**
181 * \brief set last grant time
182 * \param grantTime grant time to set
183 */
184 void SetLastGrantTime(Time grantTime);
185 /**
186 * \return The last grant time
187 */
188 Time GetLastGrantTime() const;
189
190 /**
191 * \brief set backlogged
192 * \param backlogged number of backlogged
193 */
194 void SetBacklogged(uint32_t backlogged);
195 /**
196 * \brief increase backlogged
197 * \param backlogged the number of backlogged to update
198 */
199 void IncreaseBacklogged(uint32_t backlogged);
200 /**
201 * \return The number of backlogged
202 */
203 uint32_t GetBacklogged() const;
204
205 /**
206 * \brief set temporary back logged
207 * \param backloggedTemp the temporary backlogged value
208 */
209 void SetBackloggedTemp(uint32_t backloggedTemp);
210 /**
211 * \brief increase temporary back logged
212 * \param backloggedTemp the temporary backlogged value
213 */
214 void IncreaseBackloggedTemp(uint32_t backloggedTemp);
215 /**
216 * \return The value of temporary backlogged
217 */
219
220 private:
221 uint32_t m_grantSize; ///< only used for UGS flow
222 Time m_grantTimeStamp; ///< allocation (for data) for UGS flows and unicast poll (for bandwidth
223 ///< requests) for non-UGS flows
224 Time m_dlTimeStamp; ///< time when this service flow's traffic was last sent
225
226 // stats members
227 uint32_t m_pktsSent; ///< packets sent
228 uint32_t m_pktsRcvd; ///< packets received
229
230 uint32_t m_bytesSent; ///< bytes sent
231 uint32_t m_bytesRcvd; ///< bytes received
232
233 uint32_t m_requestedBandwidth; ///< requested bandwidth
234 uint32_t m_grantedBandwidth; ///< granted badnwidth
235 uint32_t m_grantedBandwidthTemp; ///< Temporary variable used to sort list. Necessary to keep
236 ///< original order
237
238 /** bandwidth granted since last expiry of minimum reserved traffic rate interval,
239 * only for nrtPS, to make sure minimum reserved traffic rate is maintained */
241 Time m_lastGrantTime; ///< last grant time
242 int32_t m_backlogged; ///< back logged
243 int32_t m_backloggedTemp; ///< back logged temp
244};
245
246} // namespace ns3
247
248#endif /* SERVICE_FLOW_RECORD_H */
this class implements a structure to manage some parameters and statistics related to a service flow
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
Every class exported by the ns3 library is enclosed in the ns3 namespace.