#include <ProphetRouter.h>
Definition at line 30 of file ProphetRouter.h.
Public Types | |
typedef prophet::ProphetParams | Params |
Public Member Functions | |
ProphetRouter () | |
Constructor. | |
virtual | ~ProphetRouter () |
Destructor. | |
void | initialize () |
Post-constructor initialization routine. | |
void | get_routing_state (oasys::StringBuffer *) |
Write out routing state to StringBuffer. | |
bool | accept_bundle (Bundle *, int *) |
Virtual from BundleRouter. | |
void | handle_event (BundleEvent *) |
Virtual from BundleRouter. | |
void | handle_bundle_received (BundleReceivedEvent *) |
Virtual from BundleRouter. | |
void | handle_bundle_delivered (BundleDeliveredEvent *) |
Virtual from BundleRouter. | |
void | handle_bundle_expired (BundleExpiredEvent *) |
Virtual from BundleRouter. | |
void | handle_bundle_transmitted (BundleTransmittedEvent *) |
Virtual from BundleRouter. | |
void | handle_contact_up (ContactUpEvent *) |
Virtual from BundleRouter. | |
void | handle_contact_down (ContactDownEvent *) |
Virtual from BundleRouter. | |
void | handle_link_available (LinkAvailableEvent *) |
Virtual from BundleRouter. | |
void | shutdown () |
Virtual from BundleRouter. | |
void | set_queue_policy () |
Callback methods for handling runtime configuration changes. | |
void | set_hello_interval () |
Callback methods for handling runtime configuration changes. | |
void | set_max_route () |
Callback methods for handling runtime configuration changes. | |
Static Public Member Functions | |
static bool | is_init () |
Query the router as to whether initialization is complete. | |
Static Public Attributes | |
static prophet::ProphetParams | params_ |
Prophet's configuration and default values. | |
Protected Attributes | |
ProphetBundleCore * | core_ |
facade interface into BundleDaemon, etc | |
prophet::Controller * | oracle_ |
list of active Prophet peering sessions | |
oasys::SpinLock * | lock_ |
control concurrent access to core_ and oracle_ | |
Static Protected Attributes | |
static bool | is_init_ = false |
flag to indicate whether initialization has run |
Definition at line 33 of file ProphetRouter.h.
dtn::ProphetRouter::ProphetRouter | ( | ) |
dtn::ProphetRouter::~ProphetRouter | ( | ) | [virtual] |
void dtn::ProphetRouter::initialize | ( | ) | [virtual] |
Post-constructor initialization routine.
Reimplemented from dtn::BundleRouter.
Definition at line 55 of file ProphetRouter.cc.
References dtn::BundleRouter::actions_, ASSERT, dtn::ProphetBundleCore::bundles(), core_, is_init_, dtn::ProphetBundleCore::load_prophet_nodes(), lock_, oracle_, params_, and dtn::prophet_router_shutdown().
static bool dtn::ProphetRouter::is_init | ( | ) | [inline, static] |
Query the router as to whether initialization is complete.
Definition at line 53 of file ProphetRouter.h.
References is_init_.
Referenced by dtn::ProphetCommand::exec().
void dtn::ProphetRouter::get_routing_state | ( | oasys::StringBuffer * | buf | ) | [virtual] |
Write out routing state to StringBuffer.
Implements dtn::BundleRouter.
Definition at line 93 of file ProphetRouter.cc.
References dtn::ProphetBundleCore::bundles(), core_, lock_, and oracle_.
Virtual from BundleRouter.
Reimplemented from dtn::BundleRouter.
Definition at line 144 of file ProphetRouter.cc.
References dtn::BundleRouter::accept_bundle(), core_, dtn::ProphetBundleCore::get_temp_bundle(), lock_, oracle_, and dtn::BundleProtocol::REASON_NO_ADDTL_INFO.
void dtn::ProphetRouter::handle_event | ( | BundleEvent * | e | ) | [virtual] |
Virtual from BundleRouter.
Implements dtn::BundleRouter.
Definition at line 87 of file ProphetRouter.cc.
References dtn::BundleEventHandler::dispatch_event().
void dtn::ProphetRouter::handle_bundle_received | ( | BundleReceivedEvent * | e | ) | [virtual] |
Virtual from BundleRouter.
Reimplemented from dtn::BundleEventHandler.
Definition at line 171 of file ProphetRouter.cc.
References dtn::ProphetBundleList::add(), dtn::ProphetBundleCore::add(), ASSERT, dtn::BundleReceivedEvent::bundleref_, dtn::ProphetBundleCore::bundles_, core_, dtn::EVENTSRC_APP, dtn::EVENTSRC_STORE, dtn::ProphetBundleCore::get_link(), dtn::ProphetBundleCore::get_temp_bundle(), dtn::BundleReceivedEvent::link_, lock_, oracle_, and dtn::BundleReceivedEvent::source_.
void dtn::ProphetRouter::handle_bundle_delivered | ( | BundleDeliveredEvent * | e | ) | [virtual] |
Virtual from BundleRouter.
Reimplemented from dtn::BundleEventHandler.
Definition at line 215 of file ProphetRouter.cc.
References dtn::BundleDeliveredEvent::bundleref_, core_, dtn::ProphetBundleCore::get_bundle(), lock_, and oracle_.
void dtn::ProphetRouter::handle_bundle_expired | ( | BundleExpiredEvent * | e | ) | [virtual] |
Virtual from BundleRouter.
Reimplemented from dtn::BundleEventHandler.
Definition at line 235 of file ProphetRouter.cc.
References dtn::BundleExpiredEvent::bundleref_, core_, dtn::ProphetBundleCore::del(), dtn::ProphetBundleCore::get_bundle(), lock_, and oracle_.
void dtn::ProphetRouter::handle_bundle_transmitted | ( | BundleTransmittedEvent * | e | ) | [virtual] |
Virtual from BundleRouter.
Reimplemented from dtn::BundleEventHandler.
Definition at line 252 of file ProphetRouter.cc.
References dtn::BundleTransmittedEvent::bundleref_, core_, dtn::ProphetBundleCore::get_bundle(), dtn::ProphetBundleCore::get_link(), dtn::BundleTransmittedEvent::link_, and oracle_.
void dtn::ProphetRouter::handle_contact_up | ( | ContactUpEvent * | e | ) | [virtual] |
Virtual from BundleRouter.
Reimplemented from dtn::BundleEventHandler.
Definition at line 261 of file ProphetRouter.cc.
References dtn::ProphetBundleCore::add(), dtn::ContactUpEvent::contact_, core_, dtn::ProphetBundleCore::get_link(), lock_, and oracle_.
void dtn::ProphetRouter::handle_contact_down | ( | ContactDownEvent * | e | ) | [virtual] |
Virtual from BundleRouter.
Reimplemented from dtn::BundleEventHandler.
Definition at line 279 of file ProphetRouter.cc.
References dtn::ContactDownEvent::contact_, core_, dtn::ProphetBundleCore::del(), dtn::ProphetBundleCore::get_link(), lock_, and oracle_.
void dtn::ProphetRouter::handle_link_available | ( | LinkAvailableEvent * | e | ) | [virtual] |
Virtual from BundleRouter.
Reimplemented from dtn::BundleEventHandler.
Definition at line 297 of file ProphetRouter.cc.
References dtn::BundleRouter::actions_, ASSERT, dtn::LinkAvailableEvent::link_, and dtn::BundleActions::open_link().
void dtn::ProphetRouter::shutdown | ( | ) | [virtual] |
Virtual from BundleRouter.
Reimplemented from dtn::BundleRouter.
Definition at line 78 of file ProphetRouter.cc.
References core_, lock_, oracle_, and dtn::ProphetBundleCore::shutdown().
void dtn::ProphetRouter::set_queue_policy | ( | ) |
Callback methods for handling runtime configuration changes.
Definition at line 314 of file ProphetRouter.cc.
References lock_, and oracle_.
Referenced by dtn::ProphetCommand::exec().
void dtn::ProphetRouter::set_hello_interval | ( | ) |
Callback methods for handling runtime configuration changes.
Definition at line 324 of file ProphetRouter.cc.
References lock_, and oracle_.
Referenced by dtn::ProphetCommand::exec().
void dtn::ProphetRouter::set_max_route | ( | ) |
Callback methods for handling runtime configuration changes.
Definition at line 334 of file ProphetRouter.cc.
References lock_, and oracle_.
Referenced by dtn::ProphetCommand::exec().
Prophet's configuration and default values.
Definition at line 82 of file ProphetRouter.h.
Referenced by dtn::ProphetCommand::exec(), initialize(), and dtn::ProphetCommand::ProphetCommand().
ProphetBundleCore* dtn::ProphetRouter::core_ [protected] |
facade interface into BundleDaemon, etc
Definition at line 86 of file ProphetRouter.h.
Referenced by accept_bundle(), get_routing_state(), handle_bundle_delivered(), handle_bundle_expired(), handle_bundle_received(), handle_bundle_transmitted(), handle_contact_down(), handle_contact_up(), initialize(), shutdown(), and ~ProphetRouter().
prophet::Controller* dtn::ProphetRouter::oracle_ [protected] |
list of active Prophet peering sessions
Definition at line 87 of file ProphetRouter.h.
Referenced by accept_bundle(), get_routing_state(), handle_bundle_delivered(), handle_bundle_expired(), handle_bundle_received(), handle_bundle_transmitted(), handle_contact_down(), handle_contact_up(), initialize(), set_hello_interval(), set_max_route(), set_queue_policy(), shutdown(), and ~ProphetRouter().
oasys::SpinLock* dtn::ProphetRouter::lock_ [protected] |
control concurrent access to core_ and oracle_
Definition at line 88 of file ProphetRouter.h.
Referenced by accept_bundle(), get_routing_state(), handle_bundle_delivered(), handle_bundle_expired(), handle_bundle_received(), handle_contact_down(), handle_contact_up(), initialize(), set_hello_interval(), set_max_route(), set_queue_policy(), shutdown(), and ~ProphetRouter().
bool dtn::ProphetRouter::is_init_ = false [static, protected] |
flag to indicate whether initialization has run
Definition at line 89 of file ProphetRouter.h.
Referenced by initialize(), and is_init().