#include <BundleCore.h>
Inherits dtn::daemon::IntegratedComponent, dtn::core::EventReceiver, and dtn::data::Validator.

Public Member Functions | |
| WallClock & | getClock () |
| void | setStorage (dtn::core::BundleStorage *storage) |
| dtn::core::BundleStorage & | getStorage () |
| void | transferTo (const dtn::data::EID &destination, const dtn::data::BundleID &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) |
| virtual const std::string | getName () const |
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 117 of file BundleCore.cpp.
References dtn::net::ConnectionManager::addConnection().
Referenced by main().

| void dtn::core::BundleCore::addConvergenceLayer | ( | dtn::net::ConvergenceLayer * | cl | ) |
Definition at line 112 of file BundleCore.cpp.
References dtn::net::ConnectionManager::addConvergenceLayer().
Referenced by createConvergenceLayers().

| void dtn::core::BundleCore::componentDown | ( | ) | [protected, virtual] |
Definition at line 72 of file BundleCore.cpp.
References dtn::daemon::IntegratedComponent::terminate().

| void dtn::core::BundleCore::componentUp | ( | ) | [protected, virtual] |
Definition at line 63 of file BundleCore.cpp.
References dtn::daemon::IntegratedComponent::initialize(), and dtn::daemon::IntegratedComponent::startup().

| WallClock & dtn::core::BundleCore::getClock | ( | ) |
Definition at line 92 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(), main(), dtn::net::UDPConvergenceLayer::operator>>(), dtn::net::operator>>(), dtn::net::LOWPANConvergenceLayer::operator>>(), dtn::daemon::operator>>(), dtn::net::UDPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), and dtn::routing::BaseRouter::transferTo().
| const std::string dtn::core::BundleCore::getName | ( | ) | const [virtual] |
Definition at line 257 of file BundleCore.cpp.
| const std::set< dtn::core::Node > dtn::core::BundleCore::getNeighbors | ( | ) |
Definition at line 122 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(), and raiseEvent().
| void dtn::core::BundleCore::raiseEvent | ( | const dtn::core::Event * | evt | ) |
evaluate the current local time
Definition at line 127 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, 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, | |
| const dtn::data::BundleID & | bundle | |||
| ) |
Definition at line 97 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::Block & | obj, | |
| const size_t | length | |||
| ) | const throw (RejectedException) [virtual] |
Implements dtn::data::Validator.
Definition at line 225 of file BundleCore.cpp.
References blocksizelimit, and IBRCOMMON_LOGGER.
| void dtn::core::BundleCore::validate | ( | const dtn::data::Bundle & | obj | ) | const throw (RejectedException) [virtual] |
Implements dtn::data::Validator.
Definition at line 244 of file BundleCore.cpp.
| void dtn::core::BundleCore::validate | ( | const dtn::data::PrimaryBlock & | obj | ) | const throw (RejectedException) [virtual] |
Implements dtn::data::Validator.
Definition at line 193 of file BundleCore.cpp.
References forwarding, IBRCOMMON_LOGGER, 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 main(), and validate().
Definition at line 34 of file BundleCore.h.
Referenced by dtn::net::TCPConvergenceLayer::Server::accept(), dtn::core::BundleStorage::acceptCustody(), dtn::core::BundleStorage::BundleStorage(), dtn::net::HTTPConvergenceLayer::componentRun(), dtn::net::ConnectionManager::discovered(), dtn::routing::EpidemicRoutingExtension::EpidemicRoutingExtension(), dtn::daemon::ClientHandler::eventConnectionUp(), dtn::core::AbstractWorker::initialize(), dtn::net::TCPConvergenceLayer::Server::queue(), dtn::routing::BaseRouter::raiseEvent(), raiseEvent(), dtn::core::BundleStorage::rejectCustody(), dtn::daemon::ClientHandler::run(), dtn::net::IPNDAgent::sendAnnoucement(), setGlobalVars(), dtn::core::SQLiteBundleStorage::store(), and validate().
1.7.1