dtnsim::Connectivity Class Reference

Base class for the underlying connectivity management between nodes in the simulation. More...

#include <Connectivity.h>

List of all members.

Public Member Functions

 Connectivity ()
 Constructor.
virtual ~Connectivity ()
 Destructor.
const ConnStatelookup (Node *n1, Node *n2)
 Get the current connectivity state between two nodes.

Static Public Member Functions

static Connectivityinstance ()
 Singleton accessor.

Protected Types

typedef oasys::StringHashMap
< ConnState
StateTable
 The state structures are stored in a table indexed by strings of the form NODE1,NODE2.

Protected Member Functions

void set_state (const char *n1, const char *n2, const ConnState &s)
 Set the current connectivity state.

Static Protected Member Functions

static Connectivitycreate_conn ()
 Static bootstrap initializer.

Protected Attributes

StateTable state_

Static Protected Attributes

static std::string type_
 The module type.
static Connectivityinstance_
 Singleton instance.

Friends

class ConnCommand


Detailed Description

Base class for the underlying connectivity management between nodes in the simulation.

Definition at line 67 of file Connectivity.h.


Member Typedef Documentation

typedef oasys::StringHashMap<ConnState> dtnsim::Connectivity::StateTable [protected]

The state structures are stored in a table indexed by strings of the form NODE1,NODE2.

Defaults can be set in the config with a node name of '*' (and are stored in the table as such).

Definition at line 105 of file Connectivity.h.


Constructor & Destructor Documentation

dtnsim::Connectivity::Connectivity (  ) 

Constructor.

Definition at line 41 of file Connectivity.cc.

Referenced by create_conn().

virtual dtnsim::Connectivity::~Connectivity (  )  [inline, virtual]

Destructor.

Definition at line 90 of file Connectivity.h.


Member Function Documentation

Connectivity * dtnsim::Connectivity::create_conn (  )  [static, protected]

Static bootstrap initializer.

Definition at line 48 of file Connectivity.cc.

References ASSERT, Connectivity(), and type_.

Referenced by instance().

static Connectivity* dtnsim::Connectivity::instance (  )  [inline, static]

Singleton accessor.

Definition at line 72 of file Connectivity.h.

References ASSERT, create_conn(), instance_, and type_.

Referenced by dtnsim::ConnCommand::exec(), set_state(), and dtnsim::SimLink::start_next_bundle().

const ConnState * dtnsim::Connectivity::lookup ( Node n1,
Node n2 
)

Get the current connectivity state between two nodes.

Definition at line 167 of file Connectivity.cc.

References dtnsim::Node::name(), and state_.

Referenced by dtnsim::SimLink::start_next_bundle().

void dtnsim::Connectivity::set_state ( const char *  n1,
const char *  n2,
const ConnState s 
) [protected]


Friends And Related Function Documentation

friend class ConnCommand [friend]

Definition at line 98 of file Connectivity.h.


Member Data Documentation

Singleton instance.

Definition at line 119 of file Connectivity.h.

Referenced by instance().

Definition at line 106 of file Connectivity.h.

Referenced by lookup(), and set_state().

std::string dtnsim::Connectivity::type_ [static, protected]

The module type.

Definition at line 118 of file Connectivity.h.

Referenced by dtnsim::ConnCommand::ConnCommand(), create_conn(), and instance().


The documentation for this class was generated from the following files:

Generated on Fri Jan 30 09:27:05 2009 for DTN Reference Implementation by  doxygen 1.5.8