#include <logging-data-struct.h>
Collaboration diagram for LoggingDataStructNode:

Definition at line 46 of file logging-data-struct.h.
Public Member Functions | |
| void | log (Packet *pkt) |
| LoggingDataStructNode (int id, LoggingDataStructNode *next) | |
| void | pushbackSent (double limit, double expectedStatusRate) |
| void | registerStatus (double arrRate) |
| void | sentRefresh (double limit) |
| ~LoggingDataStructNode () | |
Data Fields | |
| int | countLessReportedRate_ |
| int | gotStatus_ |
| double | limit_ |
| LoggingDataStructNode * | next_ |
| int | nid_ |
| int | pushbackSent_ |
| RateEstimator * | rateEstimator_ |
| int | sentRefresh_ |
| double | statusArrivalRate_ |
|
||||||||||||
|
Definition at line 178 of file logging-data-struct.cc. References countLessReportedRate_, gotStatus_, limit_, next_, nid_, pushbackSent_, rateEstimator_, sentRefresh_, and statusArrivalRate_. 00178 { 00179 00180 //printf("LGDSN: Setting up node for %d\n", id); 00181 nid_ = id; 00182 rateEstimator_ = new RateEstimator(); 00183 00184 pushbackSent_ = 0; 00185 limit_ = -1; 00186 gotStatus_ = 0; 00187 statusArrivalRate_ = -1; 00188 countLessReportedRate_=0; 00189 sentRefresh_=0; 00190 next_ = next; 00191 }
|
|
|
Definition at line 242 of file logging-data-struct.cc. References rateEstimator_. 00242 { 00243 delete(rateEstimator_); 00244 }
|
|
|
Definition at line 234 of file logging-data-struct.cc. References RateEstimator::bytesArr_, RateEstimator::estimateRate(), RateEstimator::estRate_, nid_, and rateEstimator_. Referenced by LoggingDataStruct::log(). 00234 { 00235 rateEstimator_->estimateRate(pkt); 00236 #ifdef DEBUG_LGDSN 00237 printf("LGDSN: for neighbor %d total = %g rate = %g \n", nid_, 00238 rateEstimator_->bytesArr_/500.0, rateEstimator_->estRate_); 00239 #endif 00240 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 194 of file logging-data-struct.cc. References limit_, pushbackSent_, and statusArrivalRate_. Referenced by PushbackAgent::pushbackCheck(). 00194 { 00195 pushbackSent_ = 1; 00196 limit_ = limit; 00197 statusArrivalRate_ = expectedStatusRate; 00198 }
|
|
|
Definition at line 207 of file logging-data-struct.cc. References countLessReportedRate_, gotStatus_, INFINITE_LIMIT, limit_, and statusArrivalRate_. Referenced by LoggingDataStruct::registerStatus(). 00207 { 00208 gotStatus_ = 1; 00209 00210 //not doing precise math for floating imprecision 00211 if (limit_ < INFINITE_LIMIT - 1 ) { 00212 statusArrivalRate_ = arrRate; 00213 countLessReportedRate_=0; 00214 return; 00215 } 00216 00217 if (arrRate >= statusArrivalRate_) { 00218 statusArrivalRate_ = arrRate; 00219 countLessReportedRate_=0; 00220 return; 00221 } else { 00222 countLessReportedRate_++; 00223 if (countLessReportedRate_ > 1) { 00224 statusArrivalRate_=(arrRate+statusArrivalRate_)/2; 00225 return; 00226 } 00227 else { 00228 //keep the old rate 00229 } 00230 } 00231 }
|
|
|
Definition at line 201 of file logging-data-struct.cc. References limit_, and sentRefresh_. Referenced by PushbackAgent::refreshUpstreamLimits(). 00201 { 00202 sentRefresh_ = 1; 00203 limit_ = limit; 00204 }
|
|
|
Definition at line 57 of file logging-data-struct.h. Referenced by LoggingDataStructNode(), and registerStatus(). |
|
|
Definition at line 55 of file logging-data-struct.h. Referenced by LoggingDataStruct::consolidateStatus(), LoggingDataStructNode(), registerStatus(), and LoggingDataStruct::resetStatus(). |
|
|
Definition at line 52 of file logging-data-struct.h. Referenced by LoggingDataStructNode(), pushbackSent(), registerStatus(), and sentRefresh(). |
|
|
|
Definition at line 48 of file logging-data-struct.h. Referenced by LoggingDataStruct::getNodeByID(), log(), LoggingDataStructNode(), RateLimitSession::merge(), PushbackAgent::pushbackCancel(), PushbackAgent::pushbackCheck(), and PushbackAgent::refreshUpstreamLimits(). |
|
|
Definition at line 51 of file logging-data-struct.h. Referenced by LoggingDataStructNode(), PushbackAgent::pushbackCheck(), and pushbackSent(). |
|
|
Definition at line 49 of file logging-data-struct.h. Referenced by log(), LoggingDataStructNode(), RateLimitSession::merge(), PushbackAgent::pushbackCheck(), and ~LoggingDataStructNode(). |
|
|
Definition at line 59 of file logging-data-struct.h. Referenced by LoggingDataStructNode(), PushbackAgent::refreshUpstreamLimits(), and sentRefresh(). |
|
|
Definition at line 56 of file logging-data-struct.h. Referenced by LoggingDataStruct::consolidateStatus(), LoggingDataStructNode(), RateLimitSession::merge(), pushbackSent(), PushbackAgent::refreshUpstreamLimits(), and registerStatus(). |
1.4.6