#include <GlueNode.h>
Inheritance diagram for dtnsim::GlueNode:
Definition at line 37 of file GlueNode.h.
Public Member Functions | |
GlueNode (int id, const char *logpath) | |
virtual void | process (Event *e) |
Virtual functions from Node virtual function from Processable. | |
virtual void | chewing_complete (SimContact *c, double size, Message *msg) |
virtual void | open_contact (SimContact *c) |
virtual void | close_contact (SimContact *c) |
virtual void | message_received (Message *msg) |
virtual void | create_consumer () |
Node (int id) | |
virtual | ~Node () |
Destructor. | |
virtual void | process (Event *e) |
virtual function from Processable | |
int | id () |
virtual void | chewing_complete (Contact *c, double size, Message *msg) |
virtual void | open_contact (Contact *c) |
virtual void | close_contact (Contact *c) |
virtual void | forward (Message *msg) |
Static Public Member Functions | |
static long | next () |
Private Member Functions | |
virtual void | forward (Message *msg) |
Forward the message to next hop. | |
void | execute_router_action (BundleAction *action) |
Routine that actually effects the forwarding operations as returned from the BundleRouter. | |
void | forward_event (BundleEvent *event) |
Forward a BundleEvent to BundleRouter. | |
Private Attributes | |
BundleRouter * | router_ |
The active bundle router. | |
FloodConsumer * | consumer_ |
int | id_ |
std::vector< Message * > | msgq_ |
Static Private Attributes | |
static long | total_ |
dtnsim::GlueNode::GlueNode | ( | int | id, | |
const char * | logpath | |||
) |
virtual dtnsim::GlueNode::~Node | ( | ) | [virtual] |
void dtnsim::GlueNode::process | ( | Event * | e | ) | [virtual] |
Virtual functions from Node virtual function from Processable.
Definition at line 94 of file GlueNode.cc.
References forward_event(), dtnsim::Message::id(), log_info, message_received(), dtnsim::Message::set_size(), and dtnsim::Message::size().
void dtnsim::GlueNode::chewing_complete | ( | SimContact * | c, | |
double | size, | |||
Message * | msg | |||
) | [virtual] |
void dtnsim::GlueNode::open_contact | ( | SimContact * | c | ) | [virtual] |
Definition at line 70 of file GlueNode.cc.
References dtnsim::SimContact::dst(), forward_event(), id(), dtnsim::SimContact::id(), and log_debug.
void dtnsim::GlueNode::close_contact | ( | SimContact * | c | ) | [virtual] |
Definition at line 80 of file GlueNode.cc.
References dtnsim::SimContact::dst(), forward_event(), id(), dtnsim::SimContact::id(), and log_debug.
void dtnsim::GlueNode::message_received | ( | Message * | msg | ) | [virtual] |
Definition at line 38 of file GlueNode.cc.
References dtnsim::Message::dst(), forward(), dtnsim::Message::id(), id(), log_info, dtnsim::Message::size(), and dtnsim::Message::src().
Referenced by process().
void dtnsim::GlueNode::create_consumer | ( | ) | [virtual] |
Definition at line 198 of file GlueNode.cc.
References consumer_, dtn::EVENTSRC_ADMIN, forward_event(), id_, router_, and dtnsim::FloodConsumer::set_router().
void dtnsim::GlueNode::forward | ( | Message * | msg | ) | [private, virtual] |
Forward the message to next hop.
Basically, forwards the decision making to bundle-router.
Definition at line 120 of file GlueNode.cc.
References dtn::EVENTSRC_PEER, and forward_event().
Referenced by message_received().
void dtnsim::GlueNode::execute_router_action | ( | BundleAction * | action | ) | [private] |
Routine that actually effects the forwarding operations as returned from the BundleRouter.
Definition at line 134 of file GlueNode.cc.
References dtn::Bundle::bundleid_, log_debug, and log_info.
Referenced by forward_event().
void dtnsim::GlueNode::forward_event | ( | BundleEvent * | event | ) | [private] |
Forward a BundleEvent to BundleRouter.
Definition at line 174 of file GlueNode.cc.
References dtn::BundleDaemon::actions(), ASSERT, execute_router_action(), dtn::BundleRouter::handle_event(), and router_.
Referenced by chewing_complete(), close_contact(), create_consumer(), forward(), open_contact(), and process().
static long dtnsim::GlueNode::next | ( | ) | [inline, static] |
dtnsim::GlueNode::Node | ( | int | id | ) |
virtual void dtnsim::GlueNode::process | ( | Event * | e | ) | [virtual] |
virtual function from Processable
int dtnsim::GlueNode::id | ( | ) | [inline] |
Definition at line 44 of file Node2.h.
References id_.
Referenced by close_contact(), message_received(), and open_contact().
virtual void dtnsim::GlueNode::chewing_complete | ( | Contact * | c, | |
double | size, | |||
Message * | msg | |||
) | [virtual] |
virtual void dtnsim::GlueNode::open_contact | ( | Contact * | c | ) | [virtual] |
virtual void dtnsim::GlueNode::close_contact | ( | Contact * | c | ) | [virtual] |
virtual void dtnsim::GlueNode::forward | ( | Message * | msg | ) | [virtual] |
BundleRouter* dtnsim::GlueNode::router_ [private] |
The active bundle router.
Reimplemented from dtn::BundleDaemon.
Definition at line 72 of file GlueNode.h.
Referenced by create_consumer(), forward_event(), and GlueNode().
FloodConsumer* dtnsim::GlueNode::consumer_ [private] |
long dtnsim::GlueNode::total_ [static, private] |
int dtnsim::GlueNode::id_ [private] |
std::vector<Message*> dtnsim::GlueNode::msgq_ [private] |