#include <Connectivity.h>
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_ |
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] |
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().
Definition at line 64 of file Connectivity.h.
Referenced by dtnsim::ConnCommand::exec(), and dtnsim::Connectivity::set_state().
Definition at line 65 of file Connectivity.h.
Referenced by parse_options(), and dtnsim::Connectivity::set_state().
Definition at line 66 of file Connectivity.h.
Referenced by parse_options(), and dtnsim::Connectivity::set_state().