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 37 of file GlueNode.h.


Public Member Functions

 GlueNode (int id, const char *logpath)
virtual void process (Event *e)
 Virtual functions from Node.
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)
 Execute the list of actions as returned by bundle-router.
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 28 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 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]

Definition at line 56 of file GlueNode.cc.

References forward_event().

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]

Execute the list of actions as returned by bundle-router.

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]

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


Member Data Documentation

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]

Definition at line 73 of file GlueNode.h.

Referenced by create_consumer(), and GlueNode().

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

Definition at line 53 of file Node2.h.

Referenced by next().

int dtnsim::GlueNode::id_ [private]

Definition at line 54 of file Node2.h.

Referenced by create_consumer(), and id().

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

Definition at line 55 of file Node2.h.


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 08:36:23 2007 for DTN Reference Implementation by  doxygen 1.5.3