21 #include "service-flow-record.h"
25 ServiceFlowRecord::ServiceFlowRecord (
void)
33 m_requestedBandwidth (0),
34 m_grantedBandwidth (0),
35 m_bwSinceLastExpiry (0)
41 m_grantedBandwidthTemp = 0;
44 ServiceFlowRecord::~ServiceFlowRecord (
void)
51 m_grantSize = grantSize;
63 m_grantTimeStamp = grantTimeStamp;
69 return m_grantTimeStamp;
75 m_dlTimeStamp = dlTimeStamp;
87 m_pktsSent = pktsSent;
93 m_pktsSent += pktsSent;
105 m_pktsRcvd = pktsRcvd;
111 m_pktsRcvd += pktsRcvd;
123 m_bytesSent = bytesSent;
129 m_bytesSent += bytesSent;
141 m_bytesRcvd = bytesRcvd;
147 m_bytesRcvd += bytesRcvd;
157 ServiceFlowRecord::SetRequestedBandwidth (uint32_t requestedBandwidth)
159 m_requestedBandwidth = requestedBandwidth;
162 ServiceFlowRecord::UpdateRequestedBandwidth (uint32_t requestedBandwidth)
164 m_requestedBandwidth += requestedBandwidth;
168 ServiceFlowRecord::GetRequestedBandwidth (
void)
170 return m_requestedBandwidth;
174 ServiceFlowRecord::SetGrantedBandwidth (uint32_t grantedBandwidth)
176 m_grantedBandwidth = grantedBandwidth;
180 ServiceFlowRecord::UpdateGrantedBandwidth (uint32_t grantedBandwidth)
182 m_grantedBandwidth += grantedBandwidth;
186 ServiceFlowRecord::GetGrantedBandwidth (
void)
188 return m_grantedBandwidth;
191 ServiceFlowRecord::SetGrantedBandwidthTemp (uint32_t grantedBandwidthTemp)
193 m_grantedBandwidthTemp = grantedBandwidthTemp;
197 ServiceFlowRecord::UpdateGrantedBandwidthTemp (
198 uint32_t grantedBandwidthTemp)
200 m_grantedBandwidthTemp += grantedBandwidthTemp;
204 ServiceFlowRecord::GetGrantedBandwidthTemp (
void)
206 return m_grantedBandwidthTemp;
210 ServiceFlowRecord::SetLastGrantTime (Time grantTime)
212 m_lastGrantTime = grantTime;
216 ServiceFlowRecord::GetLastGrantTime (
void)
const
218 return m_lastGrantTime;
222 ServiceFlowRecord::SetBacklogged (uint32_t backlogged)
224 m_backlogged = backlogged;
228 ServiceFlowRecord::IncreaseBacklogged (uint32_t backlogged)
230 m_backlogged += backlogged;
234 ServiceFlowRecord::GetBacklogged (
void)
const
240 ServiceFlowRecord::SetBackloggedTemp (uint32_t backloggedTemp)
242 m_backloggedTemp = backloggedTemp;
246 ServiceFlowRecord::IncreaseBackloggedTemp (uint32_t backloggedTemp)
248 m_backloggedTemp += backloggedTemp;
252 ServiceFlowRecord::GetBackloggedTemp (
void)
const
254 return m_backloggedTemp;
258 ServiceFlowRecord::SetBwSinceLastExpiry (uint32_t bwSinceLastExpiry)
260 m_bwSinceLastExpiry = bwSinceLastExpiry;
264 ServiceFlowRecord::UpdateBwSinceLastExpiry (uint32_t bwSinceLastExpiry)
266 m_bwSinceLastExpiry += bwSinceLastExpiry;
270 ServiceFlowRecord::GetBwSinceLastExpiry (
void)
272 return m_bwSinceLastExpiry;
uint32_t GetBytesRcvd(void) const
Time GetGrantTimeStamp(void) const
void SetGrantTimeStamp(Time grantTimeStamp)
Set the grant time stamp. Used for data alocation for ugs flows, and unicast poll (bw request) for no...
void SetGrantSize(uint32_t grantSize)
Set the grant size (only for UGS service flows)
void UpdatePktsRcvd(uint32_t pktsRcvd)
update the number of received packets by adding pktsRcvd
uint32_t GetPktsRcvd(void) const
void SetDlTimeStamp(Time dlTimeStamp)
Set the DlTimeStamp.
Time Seconds(double seconds)
create ns3::Time instances in units of seconds.
Time GetDlTimeStamp(void) const
uint32_t GetGrantSize(void) const
uint32_t GetBytesSent(void) const
void SetBytesRcvd(uint32_t bytesRcvd)
Set the number of received bytes.
void UpdateBytesSent(uint32_t bytesSent)
update the number of sent bytes by adding bytesSent
void SetPktsRcvd(uint32_t pktsRcvd)
Set the number of received packet.
void SetBytesSent(uint32_t bytesSent)
Set the number of sent bytes.
void UpdatePktsSent(uint32_t pktsSent)
update the number of sent packets by adding pktsSent
void SetPktsSent(uint32_t pktsSent)
set the number of sent packets in this service flow
uint32_t GetPktsSent(void) const
void UpdateBytesRcvd(uint32_t bytesRcvd)
update the number of received bytes by adding bytesRcvd