49 std::cout <<
"> updatePacketsCount()" << std::endl;
63 std::cout <<
"> updateAcksCount()" << std::endl;
79 std::cout <<
"> getPacketsLastMinute()" << std::endl;
90 if (t_max_ == t_min_) {
92 }
else if ((t_max_ - t_min_) <=
102 if ((t_max_ - t_min_) <=
MINUTE) {
106 if (t_max_ == t_min_) {
121 std::cout <<
"> getAcksLastMinute()" << std::endl;
123 long t_min_ = t_max_;
132 if (t_max_ == t_min_) {
134 }
else if ((t_max_ - t_min_) <=
144 if ((t_max_ - t_min_) <=
MINUTE)
147 if (t_max_ == t_min_) {
159 std::cout <<
"> getLoad()" << std::endl;
long list_acks_max_time_
Clock of the last ack received by the node.
int pointer_packets_
Pointer of the first avaiable space in list_packets list.
ostringstream osstream_
Used to convert to string.
static const int LISTLENGTH
Used by the load metric to set the number of the acks tracked.
virtual const int getPacketsLastMinute() const
Returns the number of packets processed by the current node in the last interval of time (MINUTE).
long list_packets_max_time_
Clock of the last packet received by the node.
virtual void updatePacketsCount()
Updates the number of packets processed by the current node.
virtual const int getAcksLastMinute() const
Returns the number of acks received by the current node in the last interval of time (MINUTE).
static const int MINUTE
Used by the load metric to set the period to consider for the evaluation of the metric.
virtual void updateAcksCount()
Updates the number of acks received by the current node.
double list_acks[LISTLENGTH]
List of the last LISTLENGTH temporal instants in which the node received acks.
double alpha_
Parameters used by Load metric.
double list_packets[LISTLENGTH]
List of the last LISTLENGTH temporal instants in which the node received data packets.
virtual const double getLoad() const
Returns the load index of the current node combining the information from getPacketsLastMinute() and ...
int pointer_acks_
Pointer of the first avaiable space in list_acks list.
bool acks_array_full
true if list of acks is full, false otherwise.
bool packets_array_full
true if list of packets is full, false otherwise.
#define STACK_TRACE
Used to keep track of methods call.
Dinamic source routing protocol, this file contains Nodes specifications.