dtnsim::GlueNode Class Reference

#include <GlueNode.h>

Inheritance diagram for dtnsim::GlueNode:

oasys::Logger dtnsim::Node dtnsim::SimEventHandler dtn::BundleDaemon dtn::BundleEventHandler oasys::Thread oasys::Logger List of all members.

Detailed Description

Definition at line 58 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

BundleRouterrouter_
 The active bundle router.
FloodConsumerconsumer_
int id_
std::vector< Message * > msgq_

Static Private Attributes

static long total_


Constructor & Destructor Documentation

dtnsim::GlueNode::GlueNode ( int  id,
const char *  logpath 
)

Definition at line 49 of file GlueNode.cc.

References consumer_, log_info, and router_.

virtual dtnsim::GlueNode::~Node (  )  [virtual]

Destructor.

Reimplemented from dtnsim::Node.


Member Function Documentation

void dtnsim::GlueNode::process ( Event *  e  )  [virtual]

Virtual functions from Node virtual function from Processable.

Definition at line 115 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]

Definition at line 77 of file GlueNode.cc.

References forward_event().

void dtnsim::GlueNode::open_contact ( SimContact c  )  [virtual]

Definition at line 91 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 101 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 59 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 219 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 141 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 155 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 195 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]

Definition at line 56 of file Node2.h.

References total_.

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 65 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]


Member Data Documentation

BundleRouter* dtnsim::GlueNode::router_ [private]

The active bundle router.

Reimplemented from dtn::BundleDaemon.

Definition at line 93 of file GlueNode.h.

Referenced by create_consumer(), forward_event(), and GlueNode().

FloodConsumer* dtnsim::GlueNode::consumer_ [private]

Definition at line 94 of file GlueNode.h.

Referenced by create_consumer(), and GlueNode().

long dtnsim::GlueNode::total_ [static, private]

Definition at line 74 of file Node2.h.

Referenced by next().

int dtnsim::GlueNode::id_ [private]

Definition at line 75 of file Node2.h.

Referenced by create_consumer(), and id().

std::vector<Message*> dtnsim::GlueNode::msgq_ [private]

Definition at line 76 of file Node2.h.


The documentation for this class was generated from the following files:
Generated on Fri Dec 22 14:48:05 2006 for DTN Reference Implementation by  doxygen 1.5.1