#include <BundleCore.h>
Public Member Functions | |
| WallClock & | getClock () |
| void | setStorage (dtn::core::BundleStorage *storage) |
| dtn::core::BundleStorage & | getStorage () |
| void | transferTo (const dtn::data::EID &destination, dtn::data::Bundle &bundle) |
| void | addConvergenceLayer (dtn::net::ConvergenceLayer *cl) |
| void | addConnection (const dtn::core::Node &n) |
| const std::set< dtn::core::Node > | getNeighbors () |
| void | raiseEvent (const dtn::core::Event *evt) |
| virtual void | validate (const dtn::data::PrimaryBlock &obj) const throw (RejectedException) |
| virtual void | validate (const dtn::data::Block &obj, const size_t length) const throw (RejectedException) |
| virtual void | validate (const dtn::data::Bundle &obj) const throw (RejectedException) |
Static Public Member Functions | |
| static BundleCore & | getInstance () |
Static Public Attributes | |
| static dtn::data::EID | local |
| static size_t | blocksizelimit = 0 |
| static bool | forwarding = true |
Protected Member Functions | |
| virtual void | componentUp () |
| virtual void | componentDown () |
The BundleCore manage the Bundle Protocol basics
Definition at line 31 of file BundleCore.h.
| void dtn::core::BundleCore::addConnection | ( | const dtn::core::Node & | n | ) |
Definition at line 111 of file BundleCore.cpp.
References dtn::net::ConnectionManager::addConnection().
Referenced by main().
| void dtn::core::BundleCore::addConvergenceLayer | ( | dtn::net::ConvergenceLayer * | cl | ) |
Definition at line 106 of file BundleCore.cpp.
References dtn::net::ConnectionManager::addConvergenceLayer().
Referenced by createConvergenceLayers().
| void dtn::core::BundleCore::componentDown | ( | ) | [protected, virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 72 of file BundleCore.cpp.
References dtn::daemon::IndependentComponent::terminate(), and dtn::daemon::IntegratedComponent::terminate().
| void dtn::core::BundleCore::componentUp | ( | ) | [protected, virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 63 of file BundleCore.cpp.
References dtn::daemon::IndependentComponent::initialize(), dtn::daemon::IntegratedComponent::initialize(), and dtn::daemon::IndependentComponent::startup().
| WallClock & dtn::core::BundleCore::getClock | ( | ) |
Definition at line 88 of file BundleCore.cpp.
| BundleCore & dtn::core::BundleCore::getInstance | ( | ) | [static] |
Definition at line 32 of file BundleCore.cpp.
Referenced by dtn::core::SimpleBundleStorage::BundleContainer::Holder::getBundle(), dtn::net::UDPConvergenceLayer::operator>>(), dtn::net::operator>>(), dtn::net::LOWPANConvergenceLayer::operator>>(), dtn::daemon::operator>>(), dtn::routing::BaseRouter::raiseEvent(), dtn::daemon::ClientHandler::run(), and dtn::routing::BaseRouter::transferTo().
| const std::set< dtn::core::Node > dtn::core::BundleCore::getNeighbors | ( | ) |
Definition at line 116 of file BundleCore.cpp.
References dtn::net::ConnectionManager::getNeighbors().
| dtn::core::BundleStorage & dtn::core::BundleCore::getStorage | ( | ) |
Definition at line 83 of file BundleCore.cpp.
Referenced by main(), dtn::routing::BaseRouter::raiseEvent(), raiseEvent(), and dtn::daemon::ClientHandler::run().
| void dtn::core::BundleCore::raiseEvent | ( | const dtn::core::Event * | evt | ) | [virtual] |
evaluate the current local time
Implements dtn::core::EventReceiver.
Definition at line 121 of file BundleCore.cpp.
References dtn::data::CustodySignalBlock::_bundle_sequence, dtn::data::CustodySignalBlock::_bundle_timestamp, dtn::data::CustodySignalBlock::_fragment_length, dtn::data::CustodySignalBlock::_fragment_offset, dtn::data::CustodySignalBlock::_source, dtn::routing::QueueBundleEvent::bundle, dtn::core::BUNDLE_DELETED, dtn::core::BUNDLE_DELIVERED, dtn::data::MetaBundle::destination, dtn::data::StatusReportBlock::DESTINATION_ENDPOINT_ID_UNINTELLIGIBLE, dtn::core::BundleStorage::get(), dtn::data::Bundle::getBlock(), getStorage(), dtn::utils::Clock::getTime(), dtn::data::SDNV::getValue(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, local, dtn::utils::Clock::quality, dtn::core::BundleEvent::raise(), dtn::core::BundleStorage::releaseCustody(), dtn::core::BundleStorage::remove(), and dtn::data::Bundle::toString().
| void dtn::core::BundleCore::setStorage | ( | dtn::core::BundleStorage * | storage | ) |
Definition at line 78 of file BundleCore.cpp.
Referenced by createBundleStorage().
| void dtn::core::BundleCore::transferTo | ( | const dtn::data::EID & | destination, | |
| dtn::data::Bundle & | bundle | |||
| ) |
Definition at line 93 of file BundleCore.cpp.
References dtn::net::ConnectionManager::queue(), and dtn::routing::RequeueBundleEvent::raise().
Referenced by dtn::routing::BaseRouter::transferTo().
| void dtn::core::BundleCore::validate | ( | const dtn::data::Bundle & | obj | ) | const throw (RejectedException) [virtual] |
Implements dtn::data::Validator.
Definition at line 238 of file BundleCore.cpp.
| void dtn::core::BundleCore::validate | ( | const dtn::data::Block & | obj, | |
| const size_t | length | |||
| ) | const throw (RejectedException) [virtual] |
Implements dtn::data::Validator.
Definition at line 219 of file BundleCore.cpp.
References blocksizelimit, IBRCOMMON_LOGGER, and IBRCOMMON_LOGGER_ENDL.
| void dtn::core::BundleCore::validate | ( | const dtn::data::PrimaryBlock & | obj | ) | const throw (RejectedException) [virtual] |
Implements dtn::data::Validator.
Definition at line 187 of file BundleCore.cpp.
References forwarding, IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, and local.
size_t dtn::core::BundleCore::blocksizelimit = 0 [static] |
Define a global block size limit. This is used in the validator to reject bundles while receiving.
Definition at line 60 of file BundleCore.h.
Referenced by setGlobalVars(), and validate().
bool dtn::core::BundleCore::forwarding = true [static] |
Define if forwarding is allowed. If set to false, this daemon only accepts bundles for local applications.
Definition at line 65 of file BundleCore.h.
Referenced by validate().
Definition at line 34 of file BundleCore.h.
Referenced by dtn::net::TCPConvergenceLayer::Server::accept(), dtn::core::BundleStorage::acceptCustody(), dtn::net::HTTPConvergenceLayer::componentRun(), dtn::net::ConnectionManager::discovered(), dtn::daemon::ClientHandler::eventConnectionUp(), dtn::core::AbstractWorker::initialize(), raiseEvent(), dtn::core::BundleStorage::rejectCustody(), dtn::daemon::ClientHandler::run(), dtn::net::IPNDAgent::sendAnnoucement(), setGlobalVars(), and validate().
1.6.3