#include <ProphetLists.h>
The "right" answer is to either rewrite BundleList as a template, to allow a vector with which to seed BoundedPriorityQueue ... or largely duplicate BundleList below, in a derived class of priority_queue.
Definition at line 1252 of file ProphetLists.h.
Public Types | |
typedef oasys::BoundedPriorityQueue < Bundle *, BundleSz, QueueComp > | BundleBPQ |
Public Member Functions | |
ProphetBundleQueue (const BundleList *list, BundleActions *actions, ProphetParams *params, QueueComp comp=QueueCompFIFO()) | |
virtual | ~ProphetBundleQueue () |
oasys::SpinLock * | lock () const |
size_t | bundle_list (BundleList &list) const |
copy out a sequence from internal heap; among other purposes, one use for this is to seed BundleOfferTLV's (via ProphetBundleOffer) | |
void | drop_bundle (Bundle *b) |
void | pop () |
Decrement bounds tracking by this entry's TSize(), then utilize priority_queue's default pop() behavior. | |
void | push (Bundle *b) |
void | set_comp (QueueComp *c) |
Protected Member Functions | |
void | erase_member (iterator pos) |
void | enforce_bound () |
Drop lowest priority elements until maximum bounds is no longer exceeded. | |
Protected Attributes | |
BundleList | bundles_ |
BundleActions * | actions_ |
ProphetParams * | params_ |
Definition at line 1256 of file ProphetLists.h.
dtn::ProphetBundleQueue::ProphetBundleQueue | ( | const BundleList * | list, | |
BundleActions * | actions, | |||
ProphetParams * | params, | |||
QueueComp | comp = QueueCompFIFO() | |||
) | [inline] |
Definition at line 1258 of file ProphetLists.h.
References ASSERT, dtn::BundleList::begin(), dtn::BundleList::end(), ExamineDump::l, and dtn::BundleList::lock().
virtual dtn::ProphetBundleQueue::~ProphetBundleQueue | ( | ) | [inline, virtual] |
Definition at line 1278 of file ProphetLists.h.
oasys::SpinLock* dtn::ProphetBundleQueue::lock | ( | ) | const [inline] |
Definition at line 1280 of file ProphetLists.h.
Referenced by dtn::ProphetEncounter::handle_bundle_tlv(), dtn::ProphetEncounter::send_bundle_offer(), and dtn::ProphetEncounter::send_dictionary().
size_t dtn::ProphetBundleQueue::bundle_list | ( | BundleList & | list | ) | const [inline] |
copy out a sequence from internal heap; among other purposes, one use for this is to seed BundleOfferTLV's (via ProphetBundleOffer)
To export this list, caller must hold lock() on this object
Definition at line 1290 of file ProphetLists.h.
References ASSERT, dtn::BundleList::push_back(), and dtn::BundleList::size().
Referenced by dtn::ProphetEncounter::handle_bundle_tlv(), dtn::ProphetEncounter::send_bundle_offer(), and dtn::ProphetEncounter::send_dictionary().
void dtn::ProphetBundleQueue::drop_bundle | ( | Bundle * | b | ) | [inline] |
Definition at line 1304 of file ProphetLists.h.
Referenced by dtn::ProphetController::handle_bundle_delivered(), dtn::ProphetController::handle_bundle_expired(), and dtn::ProphetEncounter::handle_bundle_tlv().
void dtn::ProphetBundleQueue::pop | ( | ) | [inline] |
Decrement bounds tracking by this entry's TSize(), then utilize priority_queue's default pop() behavior.
Reimplemented from oasys::BoundedPriorityQueue< T, TSize, TCompare >.
Definition at line 1314 of file ProphetLists.h.
void dtn::ProphetBundleQueue::push | ( | Bundle * | b | ) | [inline] |
Definition at line 1319 of file ProphetLists.h.
Referenced by dtn::ProphetController::handle_bundle_received().
void dtn::ProphetBundleQueue::set_comp | ( | QueueComp * | c | ) | [inline] |
Definition at line 1329 of file ProphetLists.h.
References comp_, ExamineDump::l, and seq_.
Referenced by dtn::ProphetController::handle_queue_policy_change().
void dtn::ProphetBundleQueue::erase_member | ( | iterator | pos | ) | [inline, protected] |
Definition at line 1337 of file ProphetLists.h.
void dtn::ProphetBundleQueue::enforce_bound | ( | ) | [inline, protected] |
Drop lowest priority elements until maximum bounds is no longer exceeded.
Reimplemented from oasys::BoundedPriorityQueue< T, TSize, TCompare >.
Definition at line 1344 of file ProphetLists.h.
References comp_, ExamineDump::l, dtn::Prophet::LEPR, NUM_FWD, and seq_.
BundleList dtn::ProphetBundleQueue::bundles_ [protected] |
Definition at line 1375 of file ProphetLists.h.
BundleActions* dtn::ProphetBundleQueue::actions_ [protected] |
Definition at line 1376 of file ProphetLists.h.
ProphetParams* dtn::ProphetBundleQueue::params_ [protected] |
Definition at line 1377 of file ProphetLists.h.