Base class for the underlying connectivity management between nodes in the simulation. More...
#include <Connectivity.h>
Public Member Functions | |
| Connectivity () | |
| Constructor. | |
| virtual | ~Connectivity () |
| Destructor. | |
| const ConnState * | lookup (Node *n1, Node *n2) |
| Get the current connectivity state between two nodes. | |
Static Public Member Functions | |
| static Connectivity * | instance () |
| 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 Connectivity * | create_conn () |
| Static bootstrap initializer. | |
Protected Attributes | |
| StateTable | state_ |
Static Protected Attributes | |
| static std::string | type_ |
| The module type. | |
| static Connectivity * | instance_ |
| Singleton instance. | |
Friends | |
| class | ConnCommand |
Base class for the underlying connectivity management between nodes in the simulation.
Definition at line 67 of file Connectivity.h.
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.
| dtnsim::Connectivity::Connectivity | ( | ) |
Constructor.
Definition at line 35 of file Connectivity.cc.
| virtual dtnsim::Connectivity::~Connectivity | ( | ) | [inline, virtual] |
Destructor.
Definition at line 90 of file Connectivity.h.
| Connectivity * dtnsim::Connectivity::create_conn | ( | ) | [static, protected] |
Static bootstrap initializer.
Definition at line 42 of file Connectivity.cc.
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(), and dtnsim::SimLink::start_next_bundle().
Get the current connectivity state between two nodes.
Definition at line 161 of file Connectivity.cc.
Referenced by dtnsim::SimLink::start_next_bundle().
| void dtnsim::Connectivity::set_state | ( | const char * | n1, | |
| const char * | n2, | |||
| const ConnState & | s | |||
| ) | [protected] |
Set the current connectivity state.
Definition at line 114 of file Connectivity.cc.
Referenced by dtnsim::ConnCommand::exec().
friend class ConnCommand [friend] |
Definition at line 98 of file Connectivity.h.
Connectivity * dtnsim::Connectivity::instance_ [static, protected] |
StateTable dtnsim::Connectivity::state_ [protected] |
Definition at line 106 of file Connectivity.h.
std::string dtnsim::Connectivity::type_ [static, protected] |
The module type.
Definition at line 118 of file Connectivity.h.
Referenced by dtnsim::ConnCommand::ConnCommand(), and instance().
1.6.3