#include <dtn/SpaceAvailCustody.h>


Public Member Functions | |
| SpaceAvailCustody (Node *owner) | |
| Constructor. | |
| virtual | ~SpaceAvailCustody () |
| Virtual destructor. | |
| virtual CustodyReturn | takeCustody (const Bundle &b) |
| Check if custody should be accepted for a Bundle. | |
| virtual void | retry () |
| Attempt to re-send stored Bundles that have not been acknowledged. | |
Definition at line 42 of file SpaceAvailCustody.h.
| CustodyPolicy::CustodyReturn SpaceAvailCustody::takeCustody | ( | const Bundle & | b | ) | [virtual] |
Check if custody should be accepted for a Bundle.
If so, a copy of the Bundle is added to the owner's persistent store, modified to reflect the change in custody. The original Bundle must also be changed by the caller to reflect the new custodian.
| b | A reference to an incoming Bundle |
Implements DTN::CustodyPolicy.
Definition at line 38 of file SpaceAvailCustody.cc.
References DTN::BundleStore::addBundle(), DTN::Node::addr(), DTN::Bundle::clone(), DTN::Bundle::custodian(), DTN::BundlePointer::isNull(), DTN::Bundle::kACK, DTN::Bundle::kBcast, DTN::Bundle::kCustodial, DTN::CustodyPolicy::kCustodyTaken, DTN::CustodyPolicy::kDropBundle, DTN::CustodyPolicy::kNoCustody, DTN::NodePolicy::m_owner, DTN::NodePolicy::m_store, DTN::Node::persistentCap(), DTN::Node::signalExhausted(), DTN::Bundle::size(), DTN::Bundle::type(), and DTN::Node::usedPersistentCap().
| void SpaceAvailCustody::retry | ( | ) | [virtual] |
Attempt to re-send stored Bundles that have not been acknowledged.
This might also drop Bundles that are deemed undeliverable.
Implements DTN::CustodyPolicy.
Definition at line 82 of file SpaceAvailCustody.cc.
References DTN::BundlePointerRepr::bundle(), DTN::Bundle::clone(), DTN::Node::forward(), DTN::BundleStore::getPointer(), DTN::BundlePointer::isNull(), DTN::NodePolicy::m_owner, DTN::NodePolicy::m_store, DTN::BundlePointer::next(), and DTN::BundlePointer::repr().
1.5.4