<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>DTN Reference Implementation: dtnsim::Connectivity Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespacedtnsim.html">dtnsim</a>::<a class="el" href="classdtnsim_1_1Connectivity.html">Connectivity</a> </div> </div> <div class="contents"> <h1>dtnsim::Connectivity Class Reference</h1><!-- doxytag: class="dtnsim::Connectivity" --><code>#include <<a class="el" href="Connectivity_8h-source.html">Connectivity.h</a>></code> <p> <p> <a href="classdtnsim_1_1Connectivity-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> Base class for the underlying connectivity management between nodes in the simulation. <p>Definition at line <a class="el" href="Connectivity_8h-source.html#l00067">67</a> of file <a class="el" href="Connectivity_8h-source.html">Connectivity.h</a>.</p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#489070a1939865c3692e3b9c9a6f7b89">Connectivity</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#489070a1939865c3692e3b9c9a6f7b89"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#82f1f6e09c7f37af974e5680ba6fb975">~Connectivity</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#82f1f6e09c7f37af974e5680ba6fb975"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="structdtnsim_1_1ConnState.html">ConnState</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#a51f2d31913b28dafe3db9448c34c4ef">lookup</a> (<a class="el" href="classdtnsim_1_1Node.html">Node</a> *n1, <a class="el" href="classdtnsim_1_1Node.html">Node</a> *n2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current connectivity state between two nodes. <a href="#a51f2d31913b28dafe3db9448c34c4ef"></a><br></td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classdtnsim_1_1Connectivity.html">Connectivity</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#497447ab2f860f9767b44ee5946516a6">instance</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Singleton accessor. <a href="#497447ab2f860f9767b44ee5946516a6"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef oasys::StringHashMap<br> < <a class="el" href="structdtnsim_1_1ConnState.html">ConnState</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#c965579ac6f10cc8e5e6e6d8dd4d84cd">StateTable</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The state structures are stored in a table indexed by strings of the form NODE1,NODE2. <a href="#c965579ac6f10cc8e5e6e6d8dd4d84cd"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#97f42de775239141dc64c94586cc5472">set_state</a> (const char *n1, const char *n2, const <a class="el" href="structdtnsim_1_1ConnState.html">ConnState</a> &s)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the current connectivity state. <a href="#97f42de775239141dc64c94586cc5472"></a><br></td></tr> <tr><td colspan="2"><br><h2>Static Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classdtnsim_1_1Connectivity.html">Connectivity</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#bae34be743e761c3925fcbb5dccae2db">create_conn</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Static bootstrap initializer. <a href="#bae34be743e761c3925fcbb5dccae2db"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtnsim_1_1Connectivity.html#c965579ac6f10cc8e5e6e6d8dd4d84cd">StateTable</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#f24151607c75a34b47f884ac81125e1c">state_</a></td></tr> <tr><td colspan="2"><br><h2>Static Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#b2bf15456d5c86a5bc2518b8e51d53ce">type_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The module type. <a href="#b2bf15456d5c86a5bc2518b8e51d53ce"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classdtnsim_1_1Connectivity.html">Connectivity</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#a110f1940bfb1a51790bc1675c052212">instance_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Singleton instance. <a href="#a110f1940bfb1a51790bc1675c052212"></a><br></td></tr> <tr><td colspan="2"><br><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtnsim_1_1Connectivity.html#554f928c74edc32bf6953fe5d4f164b0">ConnCommand</a></td></tr> </table> <hr><h2>Member Typedef Documentation</h2> <a class="anchor" name="c965579ac6f10cc8e5e6e6d8dd4d84cd"></a><!-- doxytag: member="dtnsim::Connectivity::StateTable" ref="c965579ac6f10cc8e5e6e6d8dd4d84cd" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef oasys::StringHashMap<<a class="el" href="structdtnsim_1_1ConnState.html">ConnState</a>> <a class="el" href="classdtnsim_1_1Connectivity.html#c965579ac6f10cc8e5e6e6d8dd4d84cd">dtnsim::Connectivity::StateTable</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> The state structures are stored in a table indexed by strings of the form NODE1,NODE2. <p> Defaults can be set in the config with a node name of '*' (and are stored in the table as such). <p>Definition at line <a class="el" href="Connectivity_8h-source.html#l00105">105</a> of file <a class="el" href="Connectivity_8h-source.html">Connectivity.h</a>.</p> </div> </div><p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="489070a1939865c3692e3b9c9a6f7b89"></a><!-- doxytag: member="dtnsim::Connectivity::Connectivity" ref="489070a1939865c3692e3b9c9a6f7b89" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">dtnsim::Connectivity::Connectivity </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor. <p> <p>Definition at line <a class="el" href="Connectivity_8cc-source.html#l00041">41</a> of file <a class="el" href="Connectivity_8cc-source.html">Connectivity.cc</a>.</p> <p>Referenced by <a class="el" href="Connectivity_8cc-source.html#l00048">create_conn()</a>.</p> </div> </div><p> <a class="anchor" name="82f1f6e09c7f37af974e5680ba6fb975"></a><!-- doxytag: member="dtnsim::Connectivity::~Connectivity" ref="82f1f6e09c7f37af974e5680ba6fb975" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual dtnsim::Connectivity::~Connectivity </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Destructor. <p> <p>Definition at line <a class="el" href="Connectivity_8h-source.html#l00090">90</a> of file <a class="el" href="Connectivity_8h-source.html">Connectivity.h</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="497447ab2f860f9767b44ee5946516a6"></a><!-- doxytag: member="dtnsim::Connectivity::instance" ref="497447ab2f860f9767b44ee5946516a6" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classdtnsim_1_1Connectivity.html">Connectivity</a>* dtnsim::Connectivity::instance </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Singleton accessor. <p> <p>Definition at line <a class="el" href="Connectivity_8h-source.html#l00072">72</a> of file <a class="el" href="Connectivity_8h-source.html">Connectivity.h</a>.</p> <p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="Connectivity_8cc-source.html#l00048">create_conn()</a>, <a class="el" href="Connectivity_8h-source.html#l00119">instance_</a>, and <a class="el" href="Connectivity_8h-source.html#l00118">type_</a>.</p> <p>Referenced by <a class="el" href="ConnCommand_8cc-source.html#l00041">dtnsim::ConnCommand::exec()</a>, <a class="el" href="SimConvergenceLayer_8cc-source.html#l00431">dtnsim::SimConvergenceLayer::open_contact()</a>, and <a class="el" href="SimConvergenceLayer_8cc-source.html#l00152">dtnsim::SimLink::start_next_bundle()</a>.</p> </div> </div><p> <a class="anchor" name="a51f2d31913b28dafe3db9448c34c4ef"></a><!-- doxytag: member="dtnsim::Connectivity::lookup" ref="a51f2d31913b28dafe3db9448c34c4ef" args="(Node *n1, Node *n2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="structdtnsim_1_1ConnState.html">ConnState</a> * dtnsim::Connectivity::lookup </td> <td>(</td> <td class="paramtype"><a class="el" href="classdtnsim_1_1Node.html">Node</a> * </td> <td class="paramname"> <em>n1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classdtnsim_1_1Node.html">Node</a> * </td> <td class="paramname"> <em>n2</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Get the current connectivity state between two nodes. <p> <p>Definition at line <a class="el" href="Connectivity_8cc-source.html#l00167">167</a> of file <a class="el" href="Connectivity_8cc-source.html">Connectivity.cc</a>.</p> <p>References <a class="el" href="sim_2Node_8h-source.html#l00115">dtnsim::Node::name()</a>, and <a class="el" href="Connectivity_8h-source.html#l00106">state_</a>.</p> <p>Referenced by <a class="el" href="SimConvergenceLayer_8cc-source.html#l00152">dtnsim::SimLink::start_next_bundle()</a>.</p> </div> </div><p> <a class="anchor" name="bae34be743e761c3925fcbb5dccae2db"></a><!-- doxytag: member="dtnsim::Connectivity::create_conn" ref="bae34be743e761c3925fcbb5dccae2db" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classdtnsim_1_1Connectivity.html">Connectivity</a> * dtnsim::Connectivity::create_conn </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [static, protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Static bootstrap initializer. <p> <p>Definition at line <a class="el" href="Connectivity_8cc-source.html#l00048">48</a> of file <a class="el" href="Connectivity_8cc-source.html">Connectivity.cc</a>.</p> <p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="Connectivity_8cc-source.html#l00041">Connectivity()</a>, and <a class="el" href="Connectivity_8h-source.html#l00118">type_</a>.</p> <p>Referenced by <a class="el" href="Connectivity_8h-source.html#l00072">instance()</a>.</p> </div> </div><p> <a class="anchor" name="97f42de775239141dc64c94586cc5472"></a><!-- doxytag: member="dtnsim::Connectivity::set_state" ref="97f42de775239141dc64c94586cc5472" args="(const char *n1, const char *n2, const ConnState &s)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void dtnsim::Connectivity::set_state </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>n1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>n2</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structdtnsim_1_1ConnState.html">ConnState</a> & </td> <td class="paramname"> <em>s</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set the current connectivity state. <p> <p>Definition at line <a class="el" href="Connectivity_8cc-source.html#l00120">120</a> of file <a class="el" href="Connectivity_8cc-source.html">Connectivity.cc</a>.</p> <p>References <a class="el" href="Connectivity_8h-source.html#l00059">dtnsim::ConnState::bw_</a>, <a class="el" href="Topology_8cc-source.html#l00038">dtnsim::Topology::find_node()</a>, <a class="el" href="SimConvergenceLayer_8h-source.html#l00047">dtnsim::SimConvergenceLayer::instance()</a>, <a class="el" href="Connectivity_8h-source.html#l00060">dtnsim::ConnState::latency_</a>, <a class="el" href="Topology_8h-source.html#l00042">dtnsim::Topology::node_table()</a>, <a class="el" href="Connectivity_8h-source.html#l00058">dtnsim::ConnState::open_</a>, and <a class="el" href="Connectivity_8h-source.html#l00106">state_</a>.</p> <p>Referenced by <a class="el" href="ConnCommand_8cc-source.html#l00041">dtnsim::ConnCommand::exec()</a>.</p> </div> </div><p> <hr><h2>Friends And Related Function Documentation</h2> <a class="anchor" name="554f928c74edc32bf6953fe5d4f164b0"></a><!-- doxytag: member="dtnsim::Connectivity::ConnCommand" ref="554f928c74edc32bf6953fe5d4f164b0" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">friend class <a class="el" href="classdtnsim_1_1ConnCommand.html">ConnCommand</a><code> [friend]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="Connectivity_8h-source.html#l00098">98</a> of file <a class="el" href="Connectivity_8h-source.html">Connectivity.h</a>.</p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="f24151607c75a34b47f884ac81125e1c"></a><!-- doxytag: member="dtnsim::Connectivity::state_" ref="f24151607c75a34b47f884ac81125e1c" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classdtnsim_1_1Connectivity.html#c965579ac6f10cc8e5e6e6d8dd4d84cd">StateTable</a> <a class="el" href="classdtnsim_1_1Connectivity.html#f24151607c75a34b47f884ac81125e1c">dtnsim::Connectivity::state_</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="Connectivity_8h-source.html#l00106">106</a> of file <a class="el" href="Connectivity_8h-source.html">Connectivity.h</a>.</p> <p>Referenced by <a class="el" href="Connectivity_8cc-source.html#l00167">lookup()</a>, and <a class="el" href="Connectivity_8cc-source.html#l00120">set_state()</a>.</p> </div> </div><p> <a class="anchor" name="b2bf15456d5c86a5bc2518b8e51d53ce"></a><!-- doxytag: member="dtnsim::Connectivity::type_" ref="b2bf15456d5c86a5bc2518b8e51d53ce" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string <a class="el" href="classdtnsim_1_1Connectivity.html#b2bf15456d5c86a5bc2518b8e51d53ce">dtnsim::Connectivity::type_</a><code> [static, protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> The module type. <p> <p>Definition at line <a class="el" href="Connectivity_8h-source.html#l00118">118</a> of file <a class="el" href="Connectivity_8h-source.html">Connectivity.h</a>.</p> <p>Referenced by <a class="el" href="ConnCommand_8cc-source.html#l00030">dtnsim::ConnCommand::ConnCommand()</a>, <a class="el" href="Connectivity_8cc-source.html#l00048">create_conn()</a>, and <a class="el" href="Connectivity_8h-source.html#l00072">instance()</a>.</p> </div> </div><p> <a class="anchor" name="a110f1940bfb1a51790bc1675c052212"></a><!-- doxytag: member="dtnsim::Connectivity::instance_" ref="a110f1940bfb1a51790bc1675c052212" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classdtnsim_1_1Connectivity.html">Connectivity</a> * <a class="el" href="classdtnsim_1_1Connectivity.html#a110f1940bfb1a51790bc1675c052212">dtnsim::Connectivity::instance_</a><code> [static, protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> Singleton instance. <p> <p>Definition at line <a class="el" href="Connectivity_8h-source.html#l00119">119</a> of file <a class="el" href="Connectivity_8h-source.html">Connectivity.h</a>.</p> <p>Referenced by <a class="el" href="Connectivity_8h-source.html#l00072">instance()</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="Connectivity_8h-source.html">Connectivity.h</a><li><a class="el" href="Connectivity_8cc-source.html">Connectivity.cc</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:55 2008 for DTN Reference Implementation by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>