dtnsim::ConnState Struct Reference

#include <Connectivity.h>

List of all members.


Detailed Description

Helper struct to store the current connectivity settings between a pair (or set) of nodes.

Definition at line 34 of file Connectivity.h.

Public Member Functions

 ConnState ()
 Default constructor, also implicitly the default connectivity state.
 ConnState (bool open, int bw, int latency)
 Constructor with explicit settings.
bool parse_bw (const char *bw_str, int *bw)
 Utility function to parse a bandwidth specification.
bool parse_time (const char *time_str, int *time)
 Utility function to parse a time specification.
bool parse_options (int argc, const char **argv, const char **invalidp)
 Utility function to fill in the values from a set of options (e.g.

Public Attributes

bool open_
int bw_
int latency_


Constructor & Destructor Documentation

dtnsim::ConnState::ConnState (  )  [inline]

Default constructor, also implicitly the default connectivity state.

Definition at line 39 of file Connectivity.h.

dtnsim::ConnState::ConnState ( bool  open,
int  bw,
int  latency 
) [inline]

Constructor with explicit settings.

Definition at line 44 of file Connectivity.h.


Member Function Documentation

bool dtnsim::ConnState::parse_bw ( const char *  bw_str,
int *  bw 
)

Utility function to parse a bandwidth specification.

Definition at line 60 of file Connectivity.cc.

References end.

Referenced by parse_options().

bool dtnsim::ConnState::parse_time ( const char *  time_str,
int *  time 
)

Utility function to parse a time specification.

Definition at line 92 of file Connectivity.cc.

References end.

Referenced by parse_options().

bool dtnsim::ConnState::parse_options ( int  argc,
const char **  argv,
const char **  invalidp 
)

Utility function to fill in the values from a set of options (e.g.

bw=10kbps, latency=10ms).

Definition at line 129 of file Connectivity.cc.

References oasys::OptParser::addopt(), bw_, latency_, oasys::OptParser::parse(), parse_bw(), and parse_time().

Referenced by dtnsim::ConnCommand::exec().


Member Data Documentation

bool dtnsim::ConnState::open_

Definition at line 64 of file Connectivity.h.

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

int dtnsim::ConnState::bw_

Definition at line 65 of file Connectivity.h.

Referenced by parse_options(), and dtnsim::Connectivity::set_state().

int dtnsim::ConnState::latency_

Definition at line 66 of file Connectivity.h.

Referenced by parse_options(), and dtnsim::Connectivity::set_state().


The documentation for this struct was generated from the following files:
Generated on Thu Jun 7 16:56:59 2007 for DTN Reference Implementation by  doxygen 1.5.1