A Discrete-Event Network Simulator
API
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 
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 
131  void SetRequestedBandwidth (uint32_t requestedBandwidth);
136  void UpdateRequestedBandwidth (uint32_t requestedBandwidth);
140  uint32_t GetRequestedBandwidth (void);
141 
146  void SetGrantedBandwidth (uint32_t grantedBandwidth);
151  void UpdateGrantedBandwidth (uint32_t grantedBandwidth);
155  uint32_t GetGrantedBandwidth (void);
156 
161  void SetGrantedBandwidthTemp (uint32_t grantedBandwidthTemp);
166  void UpdateGrantedBandwidthTemp (uint32_t grantedBandwidthTemp);
170  uint32_t GetGrantedBandwidthTemp (void);
171 
176  void SetBwSinceLastExpiry (uint32_t bwSinceLastExpiry);
181  void UpdateBwSinceLastExpiry (uint32_t bwSinceLastExpiry);
185  uint32_t GetBwSinceLastExpiry (void);
186 
191  void SetLastGrantTime (Time grantTime);
195  Time GetLastGrantTime (void) const;
196 
201  void SetBacklogged (uint32_t backlogged);
206  void IncreaseBacklogged (uint32_t backlogged);
210  uint32_t GetBacklogged (void) const;
211 
216  void SetBackloggedTemp (uint32_t backloggedTemp);
221  void IncreaseBackloggedTemp (uint32_t backloggedTemp);
225  uint32_t GetBackloggedTemp (void) const;
226 
227 private:
228  uint32_t m_grantSize;
231 
232  // stats members
233  uint32_t m_pktsSent;
234  uint32_t m_pktsRcvd;
235 
236  uint32_t m_bytesSent;
237  uint32_t m_bytesRcvd;
238 
242 
247  int32_t m_backlogged;
249 
250 };
251 
252 } // namespace ns3
253 
254 #endif /* SERVICE_FLOW_RECORD_H */
ns3::ServiceFlowRecord::GetPktsSent
uint32_t GetPktsSent(void) const
Definition: service-flow-record.cc:97
ns3::ServiceFlowRecord::SetDlTimeStamp
void SetDlTimeStamp(Time dlTimeStamp)
Set the DlTimeStamp.
Definition: service-flow-record.cc:73
ns3::ServiceFlowRecord::UpdateBytesRcvd
void UpdateBytesRcvd(uint32_t bytesRcvd)
update the number of received bytes by adding bytesRcvd
Definition: service-flow-record.cc:145
ns3::ServiceFlowRecord::SetPktsRcvd
void SetPktsRcvd(uint32_t pktsRcvd)
Set the number of received packets.
Definition: service-flow-record.cc:103
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ServiceFlowRecord::GetBwSinceLastExpiry
uint32_t GetBwSinceLastExpiry(void)
Definition: service-flow-record.cc:270
ns3::ServiceFlowRecord::UpdateGrantedBandwidthTemp
void UpdateGrantedBandwidthTemp(uint32_t grantedBandwidthTemp)
update the temporary granted bandwidth
Definition: service-flow-record.cc:197
ns3::ServiceFlowRecord::m_grantSize
uint32_t m_grantSize
only used for UGS flow
Definition: service-flow-record.h:228
ns3::ServiceFlowRecord::GetPktsRcvd
uint32_t GetPktsRcvd(void) const
Definition: service-flow-record.cc:115
ns3::ServiceFlowRecord::GetBytesSent
uint32_t GetBytesSent(void) const
Definition: service-flow-record.cc:133
ns3::ServiceFlowRecord::m_dlTimeStamp
Time m_dlTimeStamp
time when this service flow's traffic was last sent
Definition: service-flow-record.h:230
ns3::ServiceFlowRecord::GetGrantTimeStamp
Time GetGrantTimeStamp(void) const
Definition: service-flow-record.cc:67
ns3::ServiceFlowRecord::m_backloggedTemp
int32_t m_backloggedTemp
back logged temp
Definition: service-flow-record.h:248
ns3::ServiceFlowRecord::m_bwSinceLastExpiry
uint32_t m_bwSinceLastExpiry
bandwidth granted since last expiry of minimum reserved traffic rate interval, only for nrtPS,...
Definition: service-flow-record.h:245
ns3::ServiceFlowRecord::GetRequestedBandwidth
uint32_t GetRequestedBandwidth(void)
Definition: service-flow-record.cc:168
ns3::ServiceFlowRecord::m_grantTimeStamp
Time m_grantTimeStamp
allocation (for data) for UGS flows and unicast poll (for bandwidth requests) for non-UGS flows
Definition: service-flow-record.h:229
ns3::ServiceFlowRecord
this class implements a structure to manage some parameters and statistics related to a service flow
Definition: service-flow-record.h:37
ns3::ServiceFlowRecord::SetGrantedBandwidth
void SetGrantedBandwidth(uint32_t grantedBandwidth)
set the granted bandwidth
Definition: service-flow-record.cc:174
ns3::ServiceFlowRecord::ServiceFlowRecord
ServiceFlowRecord(void)
Definition: service-flow-record.cc:25
ns3::ServiceFlowRecord::SetGrantedBandwidthTemp
void SetGrantedBandwidthTemp(uint32_t grantedBandwidthTemp)
set the temporary granted bandwidth
Definition: service-flow-record.cc:191
ns3::ServiceFlowRecord::m_pktsRcvd
uint32_t m_pktsRcvd
packets received
Definition: service-flow-record.h:234
ns3::ServiceFlowRecord::SetPktsSent
void SetPktsSent(uint32_t pktsSent)
set the number of sent packets in this service flow
Definition: service-flow-record.cc:85
ns3::ServiceFlowRecord::GetBackloggedTemp
uint32_t GetBackloggedTemp(void) const
Definition: service-flow-record.cc:252
ns3::ServiceFlowRecord::IncreaseBacklogged
void IncreaseBacklogged(uint32_t backlogged)
increase backlogged
Definition: service-flow-record.cc:228
ns3::ServiceFlowRecord::UpdatePktsRcvd
void UpdatePktsRcvd(uint32_t pktsRcvd)
update the number of received packets by adding pktsRcvd
Definition: service-flow-record.cc:109
ns3::ServiceFlowRecord::SetLastGrantTime
void SetLastGrantTime(Time grantTime)
set last grant time
Definition: service-flow-record.cc:210
ns3::ServiceFlowRecord::IncreaseBackloggedTemp
void IncreaseBackloggedTemp(uint32_t backloggedTemp)
increase temporary back logged
Definition: service-flow-record.cc:246
ns3::ServiceFlowRecord::m_bytesRcvd
uint32_t m_bytesRcvd
bytes received
Definition: service-flow-record.h:237
ns3::ServiceFlowRecord::m_grantedBandwidthTemp
uint32_t m_grantedBandwidthTemp
Temporary variable used to sort list. Necessary to keep original order.
Definition: service-flow-record.h:241
ns3::ServiceFlowRecord::SetRequestedBandwidth
void SetRequestedBandwidth(uint32_t requestedBandwidth)
set the requested bandwidth
Definition: service-flow-record.cc:157
ns3::ServiceFlowRecord::~ServiceFlowRecord
~ServiceFlowRecord(void)
Definition: service-flow-record.cc:44
ns3::ServiceFlowRecord::UpdateBytesSent
void UpdateBytesSent(uint32_t bytesSent)
update the number of sent bytes by adding bytesSent
Definition: service-flow-record.cc:127
ns3::ServiceFlowRecord::GetGrantSize
uint32_t GetGrantSize(void) const
Definition: service-flow-record.cc:55
ns3::ServiceFlowRecord::SetBytesSent
void SetBytesSent(uint32_t bytesSent)
Set the number of sent bytes.
Definition: service-flow-record.cc:121
ns3::ServiceFlowRecord::m_grantedBandwidth
uint32_t m_grantedBandwidth
granted badnwidth
Definition: service-flow-record.h:240
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::ServiceFlowRecord::SetGrantSize
void SetGrantSize(uint32_t grantSize)
Set the grant size (only for UGS service flows)
Definition: service-flow-record.cc:49
ns3::ServiceFlowRecord::SetBwSinceLastExpiry
void SetBwSinceLastExpiry(uint32_t bwSinceLastExpiry)
set BW since last expiry
Definition: service-flow-record.cc:258
ns3::ServiceFlowRecord::m_lastGrantTime
Time m_lastGrantTime
last grant time
Definition: service-flow-record.h:246
ns3::ServiceFlowRecord::m_backlogged
int32_t m_backlogged
back logged
Definition: service-flow-record.h:247
ns3::ServiceFlowRecord::GetGrantedBandwidth
uint32_t GetGrantedBandwidth(void)
Definition: service-flow-record.cc:186
ns3::ServiceFlowRecord::UpdateBwSinceLastExpiry
void UpdateBwSinceLastExpiry(uint32_t bwSinceLastExpiry)
update BW since last expiry
Definition: service-flow-record.cc:264
ns3::ServiceFlowRecord::SetBackloggedTemp
void SetBackloggedTemp(uint32_t backloggedTemp)
set temporary back logged
Definition: service-flow-record.cc:240
ns3::ServiceFlowRecord::SetBacklogged
void SetBacklogged(uint32_t backlogged)
set backlogged
Definition: service-flow-record.cc:222
ns3::ServiceFlowRecord::GetGrantedBandwidthTemp
uint32_t GetGrantedBandwidthTemp(void)
Definition: service-flow-record.cc:204
ns3::ServiceFlowRecord::GetBytesRcvd
uint32_t GetBytesRcvd(void) const
Definition: service-flow-record.cc:151
ns3::ServiceFlowRecord::GetDlTimeStamp
Time GetDlTimeStamp(void) const
Definition: service-flow-record.cc:79
ns3::ServiceFlowRecord::SetGrantTimeStamp
void SetGrantTimeStamp(Time grantTimeStamp)
Set the grant time stamp.
Definition: service-flow-record.cc:61
ns3::ServiceFlowRecord::UpdatePktsSent
void UpdatePktsSent(uint32_t pktsSent)
update the number of sent packets by adding pktsSent
Definition: service-flow-record.cc:91
ns3::ServiceFlowRecord::SetBytesRcvd
void SetBytesRcvd(uint32_t bytesRcvd)
Set the number of received bytes.
Definition: service-flow-record.cc:139
ns3::ServiceFlowRecord::m_bytesSent
uint32_t m_bytesSent
bytes sent
Definition: service-flow-record.h:236
ns3::ServiceFlowRecord::GetLastGrantTime
Time GetLastGrantTime(void) const
Definition: service-flow-record.cc:216
ns3::ServiceFlowRecord::GetBacklogged
uint32_t GetBacklogged(void) const
Definition: service-flow-record.cc:234
ns3::ServiceFlowRecord::UpdateGrantedBandwidth
void UpdateGrantedBandwidth(uint32_t grantedBandwidth)
update the granted bandwidth
Definition: service-flow-record.cc:180
ns3::ServiceFlowRecord::m_pktsSent
uint32_t m_pktsSent
packets sent
Definition: service-flow-record.h:233
ns3::ServiceFlowRecord::UpdateRequestedBandwidth
void UpdateRequestedBandwidth(uint32_t requestedBandwidth)
update the requested bandwidth
Definition: service-flow-record.cc:162
bs-net-device.h
ns3::ServiceFlowRecord::m_requestedBandwidth
uint32_t m_requestedBandwidth
requested bandwidth
Definition: service-flow-record.h:239