#include <pydtn/Statistics.h>


Public Member Functions | |
| Statistics (DTN::Node *owner) | |
| Default constructor. | |
| virtual | ~Statistics () |
| Virtual destructor. | |
| virtual void | operator() (const DTN::Bundle &b) |
| Functional method. | |
| virtual void | drop (const DTN::Bundle &b, const DTN::DropCause &c) |
| Recording method for dropped DTN::Bundles. | |
| virtual void | custody (const DTN::Bundle &b) |
| Recording method for accepting custody of a DTN::Bundle. | |
| virtual void | persistentStore (const DTN::Bundle &b) |
| Recording method for adding a DTN::Bundle to the persistent store. | |
| virtual void | persistentRemove (const DTN::Bundle &b, bool cleanup=true) |
| Recording method for removing a DTN::Bundle from the persistent store. | |
| virtual void | send (const DTN::Bundle &b) |
| Recording method for sending a DTN::Bundle. | |
| virtual void | recv (const DTN::Bundle &b) |
| Recording method for receiving a DTN::Bundle. | |
| virtual void | exhausted (const DTN::Bundle &b) |
| Recording method for persistent storage exhaustion. | |
| const StatCollection & | since () const |
| |
| const StatCollection & | total () const |
| |
| void | reset () |
| Reset short-term accumulators. | |
| void | resetTotals () |
| Reset long-term accumulators. | |
| virtual unsigned long int | used () const |
| |
| virtual unsigned long int | capacity () const |
| |
Protected Member Functions | |
| void | testOrigin (const DTN::Bundle &b) |
| Test a bundle to see if this looks like the origin. | |
Protected Attributes | |
| StatCollection | m_total |
| Collection of statistics from the start of the simulation. | |
| StatCollection | m_since |
| Collection of statistics since the last reset(). | |
Definition at line 160 of file Statistics.h.
| void Statistics::operator() | ( | const DTN::Bundle & | b | ) | [virtual] |
Functional method.
| b | A bundle to process |
Implements DTN::Consumer.
Definition at line 155 of file Statistics.cc.
References StatCollection::addDelivered(), DTN::Bundle::kACK, DTN::Bundle::kData, m_since, m_total, and DTN::Bundle::type().
| void Statistics::drop | ( | const DTN::Bundle & | b, | |
| const DTN::DropCause & | c | |||
| ) | [virtual] |
Recording method for dropped DTN::Bundles.
| b | A bundle being dropped | |
| c | The reason for dropping the bundle |
Reimplemented from DTN::Consumer.
Definition at line 170 of file Statistics.cc.
References StatCollection::addDropped(), m_since, and m_total.
| void Statistics::custody | ( | const DTN::Bundle & | b | ) | [virtual] |
Recording method for accepting custody of a DTN::Bundle.
| b | A bundle being custodially accepted |
Reimplemented from DTN::Consumer.
Definition at line 178 of file Statistics.cc.
| void Statistics::persistentStore | ( | const DTN::Bundle & | b | ) | [virtual] |
Recording method for adding a DTN::Bundle to the persistent store.
| b | A bundle being stored |
Reimplemented from DTN::Consumer.
Reimplemented in MultiNodeStatistics.
Definition at line 183 of file Statistics.cc.
References DTN::Consumer::m_owner, m_since, m_total, StatCollection::setExhausted(), and used().
| void Statistics::persistentRemove | ( | const DTN::Bundle & | b, | |
| bool | cleanup = true | |||
| ) | [virtual] |
Recording method for removing a DTN::Bundle from the persistent store.
| b | A bundle being removed | |
| cleanup | Whether the persistent store's clean-up method should be invoked (can cause recursion loops) |
Reimplemented from DTN::Consumer.
Definition at line 213 of file Statistics.cc.
| void Statistics::send | ( | const DTN::Bundle & | b | ) | [virtual] |
Recording method for sending a DTN::Bundle.
| b | A bundle being sent |
Reimplemented from DTN::Consumer.
Definition at line 218 of file Statistics.cc.
References StatCollection::addSent(), m_since, m_total, DTN::Bundle::size(), and testOrigin().
| void Statistics::recv | ( | const DTN::Bundle & | b | ) | [virtual] |
Recording method for receiving a DTN::Bundle.
| b | A bundle being received |
Reimplemented from DTN::Consumer.
Definition at line 228 of file Statistics.cc.
References StatCollection::addReceived(), m_since, m_total, and DTN::Bundle::size().
| void Statistics::exhausted | ( | const DTN::Bundle & | b | ) | [virtual] |
Recording method for persistent storage exhaustion.
| b | A bundle that could not be stored |
Reimplemented from DTN::Consumer.
Definition at line 236 of file Statistics.cc.
References m_since, m_total, and StatCollection::setExhausted().
| void Statistics::reset | ( | ) | [inline] |
Reset short-term accumulators.
This is useful for looking at statistics in discrete time bins.
Definition at line 212 of file Statistics.h.
References m_since, and StatCollection::reset().
Referenced by GStatDump::dump().
| void Statistics::resetTotals | ( | ) | [inline] |
Reset long-term accumulators.
This should only be done if you really want to erase the entire accumulated history.
Definition at line 216 of file Statistics.h.
References m_since, m_total, and StatCollection::reset().
Referenced by GStatEntity::handler().
| void Statistics::testOrigin | ( | const DTN::Bundle & | b | ) | [protected] |
Test a bundle to see if this looks like the origin.
If so, add to the originated count. This should be called from persistentStore() in any subclass
| b | A bundle being tested |
Definition at line 197 of file Statistics.cc.
References StatCollection::addOriginated(), DTN::Bundle::kACK, m_since, m_total, DTN::Bundle::send(), DTN::Bundle::source(), and DTN::Bundle::type().
Referenced by send().
1.5.4